Skip to content

Commit 2c464ee

Browse files
committed
https://github.com/elmsln/issues/issues/1975
1 parent 58c67d8 commit 2c464ee

File tree

27 files changed

+1169
-167
lines changed

27 files changed

+1169
-167
lines changed

elements/a11y-collapse/a11y-collapse.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ class A11yCollapse extends DDD {
9090
);
9191
font-weight: var(
9292
--a11y-collapse-heading-font-weight,
93-
var(--ddd-font-primary-bold)
93+
var(--ddd-font-weight-bold)
9494
);
9595
margin: var(--a11y-collapse-margin);
9696
color: var(--a11y-collapse-heading-color);

elements/citation-element/citation-element.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class CitationElement extends SchemaBehaviors(DDDSuper(LitElement)) {
4242
4343
a {
4444
color: var(--ddd-theme-default-link);
45-
font-weight: var(--ddd-font-primary-bold);
45+
font-weight: var(--ddd-font-weight-bold);
4646
}
4747
`,
4848
];

elements/clean-two/clean-two.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -165,19 +165,19 @@ class CleanTwo extends HAXCMSOperationButtons(
165165
padding: 16px;
166166
text-overflow: ellipsis;
167167
text-decoration: none;
168-
font-weight: var(--ddd-font-navigation-bold);
168+
font-weight: var(--ddd-font-weight-bold);
169169
text-transform: none;
170170
}
171171
site-menu-button div .top {
172172
font-size: var(--ddd-font-size-4xs);
173-
font-weight: var(--ddd-font-navigation-regular);
173+
font-weight: var(--ddd-font-weight-regular);
174174
}
175175
simple-datetime {
176176
color: black;
177177
}
178178
site-menu-button div .bottom {
179179
font-size: var(--ddd-font-size-xxs);
180-
font-weight: var(--ddd-font-navigation-bold);
180+
font-weight: var(--ddd-font-weight-bold);
181181
margin-top: var(--ddd-spacing-2);
182182
max-height: 50px;
183183
overflow: hidden;

elements/d-d-d/d-d-d.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,13 @@
44
*/
55
import { LitElement } from "lit";
66
import { SimpleColorsSuper } from "@lrnwebcomponents/simple-colors/simple-colors.js";
7-
import { DDDReset, DDDAllStyles, DDDFonts, DDDPulseEffect, DDDAnimations } from "./lib/DDDStyles.js";
7+
import {
8+
DDDReset,
9+
DDDAllStyles,
10+
DDDFonts,
11+
DDDPulseEffect,
12+
DDDAnimations,
13+
} from "./lib/DDDStyles.js";
814

915
/**
1016
* `d-d-d`

elements/d-d-d/lib/DDDStyles.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1160,7 +1160,7 @@ export const DDDDataAttributes = [
11601160
--ddd-theme-accent: var(--ddd-accent-14);
11611161
}
11621162
1163-
[data-primary="19"][data-accent="11"],
1163+
[data-primary="19"][data-accent="11"],
11641164
[data-primary="11"][data-accent="11"] {
11651165
--lowContrast-override: black;
11661166
}
@@ -4011,7 +4011,6 @@ export const DDDExtra = css`
40114011
`;
40124012

40134013
export const DDDPulseEffect = css`
4014-
40154014
/* Apply primary color as pulse effect using CSS variable */
40164015
:host([data-primary="0"]) {
40174016
--ddd-animation-pulse-color: var(--ddd-primary-0-rgb);
@@ -4111,7 +4110,7 @@ export const DDDPulseEffect = css`
41114110
}
41124111
`;
41134112

4114-
export const DDDAnimations = css`
4113+
export const DDDAnimations = css`
41154114
@keyframes pulse {
41164115
0% {
41174116
box-shadow: 0 0 0 0 rgba(var(--ddd-animation-pulse-color));

elements/d-d-d/lib/d-d-docs.js

Lines changed: 77 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -175,21 +175,21 @@ class DDDocs extends DDD {
175175
margin: var(--ddd-spacing-4) 0;
176176
}
177177
178-
.buttonContainer{
178+
.buttonContainer {
179179
display: grid;
180180
grid-template-columns: repeat(3, 1fr);
181181
width: 60%;
182182
gap: 10px;
183183
border: 1px solid var(--ddd-theme-default-limestoneLight);
184-
padding: 10px;
184+
padding: 10px;
185185
}
186-
.buttonContainer:first-of-type{
186+
.buttonContainer:first-of-type {
187187
border-bottom: none;
188188
}
189-
.buttonContainer:not(:first-of-type){
189+
.buttonContainer:not(:first-of-type) {
190190
border-top: none;
191191
}
192-
.buttonContainer:not(:last-of-type){
192+
.buttonContainer:not(:last-of-type) {
193193
border-bottom: none;
194194
}
195195
`,
@@ -198,32 +198,40 @@ class DDDocs extends DDD {
198198

199199
renderDataAttributes() {
200200
return html`${Object.keys(ApplicationAttributeData).map(
201-
(key) => html`
202-
<h2>${key}</h2>
203-
<div>
204-
${Object.keys(ApplicationAttributeData[key]).map(
205-
(key2) => html`
206-
<d-d-d-sample type="${key}" option="${key2}"
207-
><em style="margin-left:12px;"
208-
>data-${key}="${key2}"</em
209-
></d-d-d-sample
210-
>
211-
`,
212-
)}
213-
</div>
214-
`,
215-
)}
216-
<h5 style="margin-top: 64px;">Note: Pointer events are disabled so the pulsing will not self-remove on hover</h5>
217-
<div style="display: grid; grid-template-columns: repeat(4, 1fr); margin: 32px 64px 64px; row-gap: 32px; pointer-events: none;">
218-
${Object.keys(ApplicationAttributeData.primary).map(
219201
(key) => html`
220-
<simple-cta data-primary="${key}" data-pulse>Primary-${key}</simple-cta>
221-
<simple-cta data-primary="${key}" data-pulse light>Primary-${key}</simple-cta>
202+
<h2>${key}</h2>
203+
<div>
204+
${Object.keys(ApplicationAttributeData[key]).map(
205+
(key2) => html`
206+
<d-d-d-sample type="${key}" option="${key2}"
207+
><em style="margin-left:12px;"
208+
>data-${key}="${key2}"</em
209+
></d-d-d-sample
210+
>
211+
`,
212+
)}
213+
</div>
222214
`,
223215
)}
224-
</div>
225-
`;
226-
}
216+
<h5 style="margin-top: 64px;">
217+
Note: Pointer events are disabled so the pulsing will not self-remove on
218+
hover
219+
</h5>
220+
<div
221+
style="display: grid; grid-template-columns: repeat(4, 1fr); margin: 32px 64px 64px; row-gap: 32px; pointer-events: none;"
222+
>
223+
${Object.keys(ApplicationAttributeData.primary).map(
224+
(key) => html`
225+
<simple-cta data-primary="${key}" data-pulse
226+
>Primary-${key}</simple-cta
227+
>
228+
<simple-cta data-primary="${key}" data-pulse light
229+
>Primary-${key}</simple-cta
230+
>
231+
`,
232+
)}
233+
</div> `;
234+
}
227235

228236
renderHeaderSample() {
229237
let headers = [];
@@ -1670,18 +1678,26 @@ class DDDocs extends DDD {
16701678
for (let i = 0; i < 22; i++) {
16711679
let random = Math.floor(Math.random() * 14);
16721680
headers.push(html`
1673-
<div class="grid-3 " >
1681+
<div class="grid-3 ">
16741682
<simple-cta data-primary="${i}">Primary-${i}</simple-cta>
16751683
<simple-cta data-primary="${i}" light>Primary-${i} Light</simple-cta>
1676-
<simple-cta data-primary="${i}" Hotline>Primary-${i} Hotline</simple-cta>
1684+
<simple-cta data-primary="${i}" Hotline
1685+
>Primary-${i} Hotline</simple-cta
1686+
>
16771687
<simple-cta data-primary="${i}" large>Primary-${i} large</simple-cta>
1678-
<simple-cta data-primary="${i}" hide-icon>Primary-${i} hide-icon</simple-cta>
1679-
<simple-cta data-primary="${i}" saturate>Primary-${i} saturate</simple-cta>
1688+
<simple-cta data-primary="${i}" hide-icon
1689+
>Primary-${i} hide-icon</simple-cta
1690+
>
1691+
<simple-cta data-primary="${i}" saturate
1692+
>Primary-${i} saturate</simple-cta
1693+
>
16801694
</div>
16811695
`);
16821696
}
16831697
headers.push(html`
1684-
<div style="display: inline-flex; width: fit-content; align-items: center;">
1698+
<div
1699+
style="display: inline-flex; width: fit-content; align-items: center;"
1700+
>
16851701
<simple-cta>Default</simple-cta>
16861702
<simple-cta light>Default Light</simple-cta>
16871703
<simple-cta Hotline>Default Hotline</simple-cta>
@@ -1690,18 +1706,37 @@ class DDDocs extends DDD {
16901706
<simple-cta light saturate>Default saturate</simple-cta>
16911707
</div>
16921708
<h3>Buttons also support data-accent!</h3>
1693-
<div style="display: inline-flex; width: fit-content; align-items: center;">
1694-
<simple-cta data-primary="11" data-accent="7" light>Accent-7</simple-cta>
1709+
<div
1710+
style="display: inline-flex; width: fit-content; align-items: center;"
1711+
>
1712+
<simple-cta data-primary="11" data-accent="7" light
1713+
>Accent-7</simple-cta
1714+
>
16951715
<simple-cta data-primary="1" data-accent="9" light>Accent-9</simple-cta>
1696-
<simple-cta data-primary="1" data-accent="14" light>Accent-14</simple-cta>
1697-
<simple-cta data-primary="19" data-accent="10" light>Accent-10</simple-cta>
1698-
<simple-cta data-primary="19" data-accent="13" light>Accent-13</simple-cta>
1716+
<simple-cta data-primary="1" data-accent="14" light
1717+
>Accent-14</simple-cta
1718+
>
1719+
<simple-cta data-primary="19" data-accent="10" light
1720+
>Accent-10</simple-cta
1721+
>
1722+
<simple-cta data-primary="19" data-accent="13" light
1723+
>Accent-13</simple-cta
1724+
>
16991725
</div>
1700-
<h5>Note: Accent color will not be applied if the primary color does not meet constrast requirements</h5>
1701-
<div style="display: inline-flex; width: fit-content; align-items: center; margin-bottom: 64px;">
1702-
<simple-cta data-primary="15" data-accent="10" light>Accent-10</simple-cta>
1726+
<h5>
1727+
Note: Accent color will not be applied if the primary color does not
1728+
meet constrast requirements
1729+
</h5>
1730+
<div
1731+
style="display: inline-flex; width: fit-content; align-items: center; margin-bottom: 64px;"
1732+
>
1733+
<simple-cta data-primary="15" data-accent="10" light
1734+
>Accent-10</simple-cta
1735+
>
17031736
<simple-cta data-primary="8" data-accent="7" light>Accent-7</simple-cta>
1704-
<simple-cta data-primary="11" data-accent="11" light>Accent-11</simple-cta>
1737+
<simple-cta data-primary="11" data-accent="11" light
1738+
>Accent-11</simple-cta
1739+
>
17051740
</div>
17061741
`);
17071742
return headers;

elements/d-d-d/src/d-d-d.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,13 @@
44
*/
55
import { LitElement } from "lit";
66
import { SimpleColorsSuper } from "@lrnwebcomponents/simple-colors/simple-colors.js";
7-
import { DDDReset, DDDAllStyles, DDDFonts, DDDPulseEffect, DDDAnimations } from "./lib/DDDStyles.js";
7+
import {
8+
DDDReset,
9+
DDDAllStyles,
10+
DDDFonts,
11+
DDDPulseEffect,
12+
DDDAnimations,
13+
} from "./lib/DDDStyles.js";
814

915
/**
1016
* `d-d-d`

elements/figure-label/figure-label.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ class FigureLabel extends DDD {
5858
);
5959
font-size: var(--ddd-font-size-4xs);
6060
padding: var(--ddd-spacing-3);
61-
font-weight: var(--ddd-font-primary-bold);
61+
font-weight: var(--ddd-font-weight-bold);
6262
}
6363
6464
#description {
@@ -83,7 +83,7 @@ class FigureLabel extends DDD {
8383
--ddd-component-figure-label-background,
8484
var(--ddd-theme-default-white)
8585
);
86-
font-weight: var(--ddd-font-primary-regular);
86+
font-weight: var(--ddd-font-weight-regular);
8787
}
8888
`,
8989
];

elements/grid-plate/custom-elements.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
},
4545
{
4646
"name": "columns",
47-
"description": "`columns` {`number`} - number of columns at this layout / responsive size\n\nProperty: columns\n\nDefault: 6"
47+
"description": "`columns` {`number`} - number of columns at this layout / responsive size\n\nProperty: columns\n\nDefault: 4"
4848
},
4949
{
5050
"name": "disable-responsive",

elements/hax-body-behaviors/lib/HAXWiring.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -429,10 +429,11 @@ export class HAXWiring {
429429
}
430430
// support design systems supplying their own property definitions
431431
if (globalThis.HaxStore) {
432-
props = globalThis.HaxStore.requestAvailability().designSystemHAXProperties(
433-
props,
434-
tag,
435-
);
432+
props =
433+
globalThis.HaxStore.requestAvailability().designSystemHAXProperties(
434+
props,
435+
tag,
436+
);
436437
}
437438
// apply standard set of props that the system wires in
438439
props = this.standardAdvancedProps(props, tag);

elements/hax-body/hax-body.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1968,25 +1968,25 @@ class HaxBody extends I18NMixin(UndoManagerBehaviors(SimpleColors)) {
19681968
case "2-1":
19691969
node.layout = "2-1-1";
19701970
changed = true;
1971-
break;
1971+
break;
19721972
case "1-2":
19731973
node.layout = "1-2-1";
19741974
changed = true;
1975-
break;
1975+
break;
19761976
case "3-1":
19771977
node.layout = "2-1-1";
19781978
changed = true;
1979-
break;
1979+
break;
19801980
case "1-3":
19811981
node.layout = "1-1-2";
19821982
changed = true;
1983-
break;
1983+
break;
19841984
case "2-1-1":
19851985
case "1-2-1":
19861986
case "1-1-2":
19871987
node.layout = "1-1-1-1";
19881988
changed = true;
1989-
break;
1989+
break;
19901990
case "1":
19911991
node.layout = "1-1";
19921992
changed = true;
@@ -2040,12 +2040,12 @@ class HaxBody extends I18NMixin(UndoManagerBehaviors(SimpleColors)) {
20402040
case "2-1-1":
20412041
node.layout = "2-1";
20422042
changed = true;
2043-
break;
2043+
break;
20442044
case "1-2-1":
20452045
case "1-1-2":
20462046
node.layout = "1-2";
20472047
changed = true;
2048-
break;
2048+
break;
20492049
}
20502050
}
20512051
// if left, nudge everything over 1, right simple

0 commit comments

Comments
 (0)