Skip to content

Commit 2148129

Browse files
authored
Merge pull request #686 from kchar601/master
pulse added to docs
2 parents 5639e0f + d462b13 commit 2148129

File tree

2 files changed

+29
-19
lines changed

2 files changed

+29
-19
lines changed

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

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -658,6 +658,10 @@ export const DDDVariables = css`
658658
--ddd-primary-19-rgb: 74, 119, 41; /* Forest Green */
659659
--ddd-primary-20-rgb: 106, 48, 40; /* Landgrant Brown */
660660
--ddd-primary-21-rgb: 235, 255, 0; /* Global Neon */
661+
--ddd-primary-22-rgb: 95, 33, 32; /* Error */
662+
--ddd-primary-23-rgb: 102, 60, 0; /* Warning */
663+
--ddd-primary-24-rgb: 1, 67, 97; /* Info */
664+
--ddd-primary-25-rgb: 30, 70, 32; /* Success */
661665
662666
/* primary colors */
663667
--ddd-primary-0: var(
@@ -4085,6 +4089,18 @@ export const DDDPulseEffect = css`
40854089
:host([data-primary="21"]) {
40864090
--ddd-animation-pulse-color: var(--ddd-primary-21-rgb);
40874091
}
4092+
:host([data-primary="22"]) {
4093+
--ddd-animation-pulse-color: var(--ddd-primary-22-rgb);
4094+
}
4095+
:host([data-primary="23"]) {
4096+
--ddd-animation-pulse-color: var(--ddd-primary-23-rgb);
4097+
}
4098+
:host([data-primary="24"]) {
4099+
--ddd-animation-pulse-color: var(--ddd-primary-24-rgb);
4100+
}
4101+
:host([data-primary="25"]) {
4102+
--ddd-animation-pulse-color: var(--ddd-primary-25-rgb);
4103+
}
40884104
40894105
:host([data-pulse]) {
40904106
--ddd-animation-pulse-size: var(--ddd-spacing-4);

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

Lines changed: 13 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ export const styleGuideTopics = {
3939
InstructionalComponents: "InstructionalComponents",
4040
Buttons: "Buttons",
4141
PageSections: "PageSections",
42-
Contrast: "Contrast",
4342
};
4443

4544
class DDDocs extends DDD {
@@ -213,8 +212,18 @@ class DDDocs extends DDD {
213212
)}
214213
</div>
215214
`,
216-
)} `;
217-
}
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(
219+
(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>
222+
`,
223+
)}
224+
</div>
225+
`;
226+
}
218227

219228
renderHeaderSample() {
220229
let headers = [];
@@ -1682,7 +1691,6 @@ class DDDocs extends DDD {
16821691
</div>
16831692
<h3>Buttons also support data-accent!</h3>
16841693
<div style="display: inline-flex; width: fit-content; align-items: center;">
1685-
<simple-cta data-primary="11" data-accent="11" light>Accent-11</simple-cta>
16861694
<simple-cta data-primary="11" data-accent="7" light>Accent-7</simple-cta>
16871695
<simple-cta data-primary="1" data-accent="9" light>Accent-9</simple-cta>
16881696
<simple-cta data-primary="1" data-accent="14" light>Accent-14</simple-cta>
@@ -1693,6 +1701,7 @@ class DDDocs extends DDD {
16931701
<div style="display: inline-flex; width: fit-content; align-items: center; margin-bottom: 64px;">
16941702
<simple-cta data-primary="15" data-accent="10" light>Accent-10</simple-cta>
16951703
<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>
16961705
</div>
16971706
`);
16981707
return headers;
@@ -2061,21 +2070,6 @@ class DDDocs extends DDD {
20612070
`;
20622071
}
20632072

2064-
renderContrast(){
2065-
let text = [];
2066-
let exceptions = [0, 5, 7, 8, 9, 10, 12, 14, 15, 16, 17, 18, 21]
2067-
for (var i = 0; i<26; i++){
2068-
for(var j = 0; j<15; j++){
2069-
if(!exceptions.includes(i)){
2070-
text.push(html`
2071-
<p data-accent="${j}" data-primary="${i}" style="color: var(--ddd-theme-primary);">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
2072-
`);
2073-
}
2074-
}
2075-
}
2076-
return text;
2077-
}
2078-
20792073
selectOption() {
20802074
return html`
20812075
<h1 class="fs-m my-2">Select an option to render</h1>

0 commit comments

Comments
 (0)