@dubai-design-system/components-js 3.12.16 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +95 -0
- package/dist/cjs/dda-accordion.cjs.entry.js +4 -4
- package/dist/cjs/dda-alert.cjs.entry.js +11 -4
- package/dist/cjs/dda-attach-file.cjs.entry.js +19 -4
- package/dist/cjs/dda-avatar.cjs.entry.js +12 -6
- package/dist/cjs/dda-banner.cjs.entry.js +2 -2
- package/dist/cjs/dda-breadcrumb.cjs.entry.js +2 -2
- package/dist/cjs/dda-button.cjs.entry.js +3 -3
- package/dist/cjs/dda-checkbox.cjs.entry.js +2 -2
- package/dist/cjs/dda-chip.cjs.entry.js +4 -4
- package/dist/cjs/dda-credit-card.cjs.entry.js +3 -3
- package/dist/cjs/dda-creditcard-field.cjs.entry.js +22 -4
- package/dist/cjs/dda-dropdown.cjs.entry.js +3 -3
- package/dist/cjs/dda-footer.cjs.entry.js +5 -3
- package/dist/cjs/dda-header.cjs.entry.js +3 -3
- package/dist/cjs/dda-home-banner.cjs.entry.js +172 -13
- package/dist/cjs/dda-horizontal-stepper.cjs.entry.js +4 -4
- package/dist/cjs/dda-input.cjs.entry.js +21 -4
- package/dist/cjs/dda-link-button_2.cjs.entry.js +7 -7
- package/dist/cjs/dda-number-field.cjs.entry.js +19 -4
- package/dist/cjs/dda-pagination.cjs.entry.js +4 -4
- package/dist/cjs/dda-phonefield.cjs.entry.js +22 -4
- package/dist/cjs/dda-progressbar.cjs.entry.js +5 -4
- package/dist/cjs/dda-range-slider.cjs.entry.js +4 -4
- package/dist/cjs/dda-search-input.cjs.entry.js +23 -6
- package/dist/cjs/dda-segmented-tabs.cjs.entry.js +30 -5
- package/dist/cjs/dda-select.cjs.entry.js +114 -5
- package/dist/cjs/dda-sticky-footer.cjs.entry.js +5 -3
- package/dist/cjs/dda-tabs.cjs.entry.js +3 -3
- package/dist/cjs/dda-textarea.cjs.entry.js +74 -5
- package/dist/cjs/dda-toggle.cjs.entry.js +3 -3
- package/dist/cjs/dda-tooltip.cjs.entry.js +29 -4
- package/dist/cjs/dda-ui-card.cjs.entry.js +2 -2
- package/dist/cjs/dda-vertical-stepper.cjs.entry.js +2 -2
- package/dist/cjs/dda.cjs.js +3 -4
- package/dist/cjs/index-DGHrEPBX.js +1986 -0
- package/dist/cjs/loader.cjs.js +3 -4
- package/dist/collection/components/dda-accordion/dda-accordion.css +10 -0
- package/dist/collection/components/dda-accordion/dda-accordion.js +1 -1
- package/dist/collection/components/dda-alert/dda-alert.js +8 -1
- package/dist/collection/components/dda-attach-file/dda-attach-file.js +16 -1
- package/dist/collection/components/dda-avatar/dda-avatar.css +25 -1
- package/dist/collection/components/dda-avatar/dda-avatar.js +8 -2
- package/dist/collection/components/dda-chip/dda-chip.css +14 -1
- package/dist/collection/components/dda-chip/dda-chip.js +1 -1
- package/dist/collection/components/dda-credit-card/dda-credit-card.css +8 -2
- package/dist/collection/components/dda-creditcard-field/dda-creditcard-field.js +39 -1
- package/dist/collection/components/dda-creditcard-field/dda-creditcard-field.stories.js +9 -0
- package/dist/collection/components/dda-footer/dda-footer.js +3 -4
- package/dist/collection/components/dda-header/dda-header.css +36 -0
- package/dist/collection/components/dda-header/dda-header.js +1 -1
- package/dist/collection/components/dda-home-banner/dda-home-banner.js +358 -11
- package/dist/collection/components/dda-home-banner/dda-home-banner.stories.js +79 -49
- package/dist/collection/components/dda-home-banner/home-banner.css +45 -4
- package/dist/collection/components/dda-input/dda-input.js +18 -1
- package/dist/collection/components/dda-link-button/dda-link-button.js +2 -2
- package/dist/collection/components/dda-number-field/dda-number-field.js +16 -1
- package/dist/collection/components/dda-pagination/dda-pagination.css +9 -1
- package/dist/collection/components/dda-pagination/dda-pagination.js +1 -1
- package/dist/collection/components/dda-phonefield/dda-phonefield.js +39 -1
- package/dist/collection/components/dda-phonefield/dda-phonefield.stories.js +11 -1
- package/dist/collection/components/dda-progressbar/dda-progressbar.css +4 -0
- package/dist/collection/components/dda-progressbar/dda-progressbar.js +22 -1
- package/dist/collection/components/dda-progressbar/dda-progressbar.stories.js +6 -0
- package/dist/collection/components/dda-radiobutton/dda-radiobutton.css +26 -2
- package/dist/collection/components/dda-radiobutton/dda-radiobutton.js +1 -1
- package/dist/collection/components/dda-range-slider/dda-range-slider.css +18 -2
- package/dist/collection/components/dda-range-slider/dda-range-slider.js +2 -2
- package/dist/collection/components/dda-search-input/dda-search-input.js +38 -2
- package/dist/collection/components/dda-search-input/dda-search-input.stories.js +9 -0
- package/dist/collection/components/dda-select/dda-select.js +113 -2
- package/dist/collection/components/dda-sticky-footer/dda-sticky-footer.js +3 -4
- package/dist/collection/components/dda-tabs/dda-tabs.js +1 -1
- package/dist/collection/components/dda-textarea/dda-textarea.js +71 -2
- package/dist/collection/components/dda-toggle/dda-toggle.js +1 -1
- package/dist/collection/components/dda-tooltip/dda-tooltip.css +17 -1
- package/dist/collection/components/dda-tooltip/dda-tooltip.js +31 -1
- package/dist/collection/components/dda-ui-card/dda-ui-card.js +1 -1
- package/dist/collection/components/segmented-groups/dda-segmented-tabs/dda-segmented-tabs.js +89 -3
- package/dist/collection/components/segmented-groups/dda-segmented-tabs/dda-segmented-tabs.stories.js +21 -1
- package/dist/collection/components/stepper/dda-horizontal-stepper/dda-horizontal-stepper.css +15 -3
- package/dist/collection/components/stepper/dda-horizontal-stepper/dda-horizontal-stepper.js +1 -1
- package/dist/collection/components/stepper/dda-vertical-stepper/dda-vertical-stepper.js +1 -1
- package/dist/collection/global/dda-button.css +49 -18
- package/dist/collection/global/global.css +26 -2
- package/dist/collection/global/input.css +69 -8
- package/dist/collection/utils/contrast.js +38 -0
- package/dist/components/dda-accordion.js +1 -1
- package/dist/components/dda-alert.js +1 -1
- package/dist/components/dda-attach-file.js +1 -1
- package/dist/components/dda-avatar.js +1 -1
- package/dist/components/dda-banner.js +1 -1
- package/dist/components/dda-breadcrumb.js +1 -1
- package/dist/components/dda-button.js +1 -1
- package/dist/components/dda-checkbox.js +1 -1
- package/dist/components/dda-chip.js +1 -1
- package/dist/components/dda-credit-card.js +1 -1
- package/dist/components/dda-creditcard-field.js +1 -1
- package/dist/components/dda-dropdown.js +1 -1
- package/dist/components/dda-footer.js +1 -1
- package/dist/components/dda-header.js +1 -1
- package/dist/components/dda-home-banner.js +1 -1
- package/dist/components/dda-horizontal-stepper.js +1 -1
- package/dist/components/dda-input.js +1 -1
- package/dist/components/dda-link-button.js +1 -1
- package/dist/components/dda-number-field.js +1 -1
- package/dist/components/dda-pagination.js +1 -1
- package/dist/components/dda-phonefield.js +1 -1
- package/dist/components/dda-progressbar.js +1 -1
- package/dist/components/dda-radiobutton.js +1 -1
- package/dist/components/dda-range-slider.js +1 -1
- package/dist/components/dda-search-input.js +1 -1
- package/dist/components/dda-segmented-tabs.js +1 -1
- package/dist/components/dda-select.js +1 -1
- package/dist/components/dda-sticky-footer.js +1 -1
- package/dist/components/dda-tabs.js +1 -1
- package/dist/components/dda-textarea.js +1 -1
- package/dist/components/dda-toggle.js +1 -1
- package/dist/components/dda-tooltip.js +1 -1
- package/dist/components/dda-ui-card.js +1 -1
- package/dist/components/dda-vertical-stepper.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/p-BaW1ewxd.js +1 -0
- package/dist/components/p-C2ufT7tL.js +1 -0
- package/dist/components/p-CbUih1OY.js +1 -0
- package/dist/components/p-Cgvws3Uk.js +1 -0
- package/dist/components/p-HakkUtRK.js +1 -0
- package/dist/dda/dda.css +20 -0
- package/dist/dda/dda.esm.js +1 -1
- package/dist/dda/p-0b56fbcb.entry.js +1 -0
- package/dist/dda/p-1df4494d.entry.js +1 -0
- package/dist/dda/p-207c4034.entry.js +1 -0
- package/dist/dda/p-23c6a709.entry.js +1 -0
- package/dist/dda/p-2c0f4e9e.entry.js +1 -0
- package/dist/dda/p-2e4e47ec.entry.js +1 -0
- package/dist/dda/p-3b9a784a.entry.js +1 -0
- package/dist/dda/p-4400194a.entry.js +1 -0
- package/dist/dda/p-48f14688.entry.js +1 -0
- package/dist/dda/p-4aef15b0.entry.js +1 -0
- package/dist/dda/{p-0db613dc.entry.js → p-5d0b1fea.entry.js} +1 -1
- package/dist/dda/p-6150d6ca.entry.js +1 -0
- package/dist/dda/p-6def14a1.entry.js +1 -0
- package/dist/dda/p-7c8b1191.entry.js +1 -0
- package/dist/dda/p-7eb8942f.entry.js +1 -0
- package/dist/dda/p-82dc3344.entry.js +1 -0
- package/dist/dda/p-88c5aa03.entry.js +1 -0
- package/dist/dda/{p-872e0f49.entry.js → p-8bbd3b3b.entry.js} +1 -1
- package/dist/dda/p-96aaf2c6.entry.js +1 -0
- package/dist/dda/p-99e59635.entry.js +1 -0
- package/dist/dda/p-CfK_KUZU.js +2 -0
- package/dist/dda/p-b6096645.entry.js +1 -0
- package/dist/dda/p-b68b2d3a.entry.js +1 -0
- package/dist/dda/p-c39fc443.entry.js +1 -0
- package/dist/dda/p-cf6c7bc5.entry.js +1 -0
- package/dist/dda/p-d096ea61.entry.js +1 -0
- package/dist/dda/p-d5274874.entry.js +1 -0
- package/dist/dda/p-d606adfc.entry.js +1 -0
- package/dist/dda/p-da82dc4c.entry.js +1 -0
- package/dist/dda/p-dc72bfd8.entry.js +1 -0
- package/dist/dda/p-dec1b61c.entry.js +1 -0
- package/dist/dda/p-eb2d0c46.entry.js +1 -0
- package/dist/dda/p-f9c681e4.entry.js +1 -0
- package/dist/dda/p-fd637136.entry.js +1 -0
- package/dist/esm/dda-accordion.entry.js +4 -4
- package/dist/esm/dda-alert.entry.js +11 -4
- package/dist/esm/dda-attach-file.entry.js +19 -4
- package/dist/esm/dda-avatar.entry.js +12 -6
- package/dist/esm/dda-banner.entry.js +2 -2
- package/dist/esm/dda-breadcrumb.entry.js +2 -2
- package/dist/esm/dda-button.entry.js +3 -3
- package/dist/esm/dda-checkbox.entry.js +2 -2
- package/dist/esm/dda-chip.entry.js +4 -4
- package/dist/esm/dda-credit-card.entry.js +3 -3
- package/dist/esm/dda-creditcard-field.entry.js +22 -4
- package/dist/esm/dda-dropdown.entry.js +3 -3
- package/dist/esm/dda-footer.entry.js +5 -3
- package/dist/esm/dda-header.entry.js +3 -3
- package/dist/esm/dda-home-banner.entry.js +172 -13
- package/dist/esm/dda-horizontal-stepper.entry.js +4 -4
- package/dist/esm/dda-input.entry.js +21 -4
- package/dist/esm/dda-link-button_2.entry.js +7 -7
- package/dist/esm/dda-number-field.entry.js +19 -4
- package/dist/esm/dda-pagination.entry.js +4 -4
- package/dist/esm/dda-phonefield.entry.js +22 -4
- package/dist/esm/dda-progressbar.entry.js +5 -4
- package/dist/esm/dda-range-slider.entry.js +4 -4
- package/dist/esm/dda-search-input.entry.js +23 -6
- package/dist/esm/dda-segmented-tabs.entry.js +30 -5
- package/dist/esm/dda-select.entry.js +114 -5
- package/dist/esm/dda-sticky-footer.entry.js +5 -3
- package/dist/esm/dda-tabs.entry.js +3 -3
- package/dist/esm/dda-textarea.entry.js +74 -5
- package/dist/esm/dda-toggle.entry.js +3 -3
- package/dist/esm/dda-tooltip.entry.js +29 -4
- package/dist/esm/dda-ui-card.entry.js +2 -2
- package/dist/esm/dda-vertical-stepper.entry.js +2 -2
- package/dist/esm/dda.js +3 -4
- package/dist/esm/index-CfK_KUZU.js +1976 -0
- package/dist/esm/loader.js +3 -4
- package/dist/types/components/dda-alert/dda-alert.d.ts +1 -0
- package/dist/types/components/dda-attach-file/dda-attach-file.d.ts +3 -0
- package/dist/types/components/dda-creditcard-field/dda-creditcard-field.d.ts +4 -0
- package/dist/types/components/dda-creditcard-field/dda-creditcard-field.stories.d.ts +6 -0
- package/dist/types/components/dda-home-banner/dda-home-banner.d.ts +46 -1
- package/dist/types/components/dda-home-banner/dda-home-banner.stories.d.ts +27 -3
- package/dist/types/components/dda-input/dda-input.d.ts +3 -0
- package/dist/types/components/dda-number-field/dda-number-field.d.ts +3 -0
- package/dist/types/components/dda-phonefield/dda-phonefield.d.ts +4 -0
- package/dist/types/components/dda-phonefield/dda-phonefield.stories.d.ts +6 -0
- package/dist/types/components/dda-progressbar/dda-progressbar.d.ts +1 -0
- package/dist/types/components/dda-progressbar/dda-progressbar.stories.d.ts +7 -0
- package/dist/types/components/dda-search-input/dda-search-input.d.ts +4 -0
- package/dist/types/components/dda-search-input/dda-search-input.stories.d.ts +6 -0
- package/dist/types/components/dda-select/dda-select.d.ts +13 -0
- package/dist/types/components/dda-textarea/dda-textarea.d.ts +6 -0
- package/dist/types/components/dda-tooltip/dda-tooltip.d.ts +6 -0
- package/dist/types/components/segmented-groups/dda-segmented-tabs/dda-segmented-tabs.d.ts +12 -0
- package/dist/types/components/segmented-groups/dda-segmented-tabs/dda-segmented-tabs.stories.d.ts +12 -0
- package/dist/types/components.d.ts +171 -1
- package/dist/types/utils/contrast.d.ts +19 -0
- package/package.json +23 -6
- package/dist/cjs/app-globals-V2Kpy_OQ.js +0 -5
- package/dist/cjs/index-B79qki6G.js +0 -1975
- package/dist/components/p-BId7flZ3.js +0 -1
- package/dist/components/p-BvP8lGT3.js +0 -1
- package/dist/components/p-CAZwi69K.js +0 -1
- package/dist/components/p-DlU_OvNg.js +0 -1
- package/dist/components/p-DywjKcXy.js +0 -1
- package/dist/dda/p-01b5288e.entry.js +0 -1
- package/dist/dda/p-05909550.entry.js +0 -1
- package/dist/dda/p-290878ba.entry.js +0 -1
- package/dist/dda/p-2a027297.entry.js +0 -1
- package/dist/dda/p-2be2258d.entry.js +0 -1
- package/dist/dda/p-320daf89.entry.js +0 -1
- package/dist/dda/p-3b5501d5.entry.js +0 -1
- package/dist/dda/p-41d48ef1.entry.js +0 -1
- package/dist/dda/p-49efa7b5.entry.js +0 -1
- package/dist/dda/p-4d544d34.entry.js +0 -1
- package/dist/dda/p-5a8d0718.entry.js +0 -1
- package/dist/dda/p-687993df.entry.js +0 -1
- package/dist/dda/p-72cf45ff.entry.js +0 -1
- package/dist/dda/p-74136148.entry.js +0 -1
- package/dist/dda/p-7b9a03b8.entry.js +0 -1
- package/dist/dda/p-813378ca.entry.js +0 -1
- package/dist/dda/p-81e2a31e.entry.js +0 -1
- package/dist/dda/p-9ada3a28.entry.js +0 -1
- package/dist/dda/p-9bb057e8.entry.js +0 -1
- package/dist/dda/p-9eb37a5b.entry.js +0 -1
- package/dist/dda/p-CnOk80gh.js +0 -2
- package/dist/dda/p-DQuL1Twl.js +0 -1
- package/dist/dda/p-ad2eb016.entry.js +0 -1
- package/dist/dda/p-bd34eb45.entry.js +0 -1
- package/dist/dda/p-d8b2f59d.entry.js +0 -1
- package/dist/dda/p-da8e1d19.entry.js +0 -1
- package/dist/dda/p-dd16275a.entry.js +0 -1
- package/dist/dda/p-de5a5f95.entry.js +0 -1
- package/dist/dda/p-e3c3c3c8.entry.js +0 -1
- package/dist/dda/p-ebaf8588.entry.js +0 -1
- package/dist/dda/p-efdf9aba.entry.js +0 -1
- package/dist/dda/p-f135fada.entry.js +0 -1
- package/dist/dda/p-f3a93726.entry.js +0 -1
- package/dist/esm/app-globals-DQuL1Twl.js +0 -3
- package/dist/esm/index-CnOk80gh.js +0 -1966
|
@@ -1,64 +1,94 @@
|
|
|
1
|
+
const IMG_1 = 'https://images.pexels.com/photos/3680912/pexels-photo-3680912.jpeg';
|
|
2
|
+
const IMG_2 = 'https://images.pexels.com/photos/1470405/pexels-photo-1470405.jpeg';
|
|
3
|
+
const IMG_3 = 'https://images.pexels.com/photos/162031/dubai-tower-arab-emirates-162031.jpeg';
|
|
4
|
+
const slide = (src, alt, title, subtitle) => `
|
|
5
|
+
<slide>
|
|
6
|
+
<img src="${src}" alt="${alt}" />
|
|
7
|
+
<div class="slide-wrap">
|
|
8
|
+
<div class="slide-content">
|
|
9
|
+
<h2>${title}</h2>
|
|
10
|
+
<p>${subtitle}</p>
|
|
11
|
+
<dda-button button_color="default-primary" size="lg">Call to action</dda-button>
|
|
12
|
+
</div>
|
|
13
|
+
</div>
|
|
14
|
+
</slide>`;
|
|
1
15
|
export default {
|
|
2
16
|
title: 'Components/Home Banner',
|
|
3
17
|
component: 'dda-home-banner',
|
|
4
18
|
argTypes: {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
19
|
+
autoplay: { control: 'boolean', description: 'Advance through the slides automatically' },
|
|
20
|
+
interval: { control: 'number', description: 'Milliseconds each slide is shown for when autoplay is on' },
|
|
21
|
+
aria_label: { control: 'text', description: 'Accessible name for the carousel region' },
|
|
22
|
+
previous_button_label: { control: 'text', description: 'Accessible name for the previous-slide button' },
|
|
23
|
+
next_button_label: { control: 'text', description: 'Accessible name for the next-slide button' },
|
|
24
|
+
pause_button_label: { control: 'text', description: 'Accessible name for the pause button' },
|
|
25
|
+
play_button_label: { control: 'text', description: 'Accessible name for the play button' },
|
|
26
|
+
slide_button_label: { control: 'text', description: 'Prefix for each dot’s accessible name' },
|
|
8
27
|
},
|
|
9
28
|
parameters: {
|
|
10
29
|
docs: {
|
|
11
30
|
description: {
|
|
12
31
|
component: `
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
32
|
+
The banner is **slotted** — each slide must be a \`<slide>\` element. The component
|
|
33
|
+
collects slides with \`querySelectorAll('slide')\`, so \`<div>\` children are ignored.
|
|
34
|
+
|
|
35
|
+
\`\`\`html
|
|
36
|
+
<dda-home-banner autoplay="true" interval="5000">
|
|
37
|
+
<slide>
|
|
38
|
+
<img src="assets/img/home-banner.jpg" alt="Aerial view of Dubai at sunset" />
|
|
39
|
+
<div class="slide-wrap">
|
|
40
|
+
<div class="slide-content">
|
|
41
|
+
<h2>Digitalizing Life In Dubai</h2>
|
|
42
|
+
<p>Pioneering and accelerating the pace of digital transformation in the city</p>
|
|
43
|
+
</div>
|
|
44
|
+
</div>
|
|
45
|
+
</slide>
|
|
46
|
+
</dda-home-banner>
|
|
47
|
+
\`\`\`
|
|
48
|
+
|
|
49
|
+
Layout CSS ships inside the component's own chunk and is injected when the element
|
|
50
|
+
upgrades — the global \`dda.css\` plus \`defineCustomElements()\` is all you need.
|
|
51
|
+
`,
|
|
27
52
|
},
|
|
28
53
|
},
|
|
29
|
-
controls: {
|
|
30
|
-
expanded: true,
|
|
31
|
-
},
|
|
54
|
+
controls: { expanded: true },
|
|
32
55
|
},
|
|
33
56
|
};
|
|
34
|
-
const Template =
|
|
57
|
+
const Template = args => `
|
|
58
|
+
<dda-home-banner
|
|
59
|
+
autoplay="${args.autoplay}"
|
|
60
|
+
interval="${args.interval}"
|
|
61
|
+
aria_label="${args.aria_label}"
|
|
62
|
+
previous_button_label="${args.previous_button_label}"
|
|
63
|
+
next_button_label="${args.next_button_label}"
|
|
64
|
+
pause_button_label="${args.pause_button_label}"
|
|
65
|
+
play_button_label="${args.play_button_label}"
|
|
66
|
+
slide_button_label="${args.slide_button_label}"
|
|
67
|
+
>
|
|
68
|
+
${slide(IMG_1, 'Aerial view of Dubai at sunset', 'Digitalizing Life In Dubai', 'Pioneering and accelerating the pace of digital transformation in the city')}
|
|
69
|
+
${slide(IMG_2, 'Dubai skyline at dusk', 'Explore More', 'Find the services you need')}
|
|
70
|
+
${slide(IMG_3, 'Burj Khalifa against a clear sky', 'Join Us Today', 'Become part of our community')}
|
|
71
|
+
</dda-home-banner>`;
|
|
72
|
+
const defaultArgs = {
|
|
73
|
+
autoplay: false,
|
|
74
|
+
interval: 5000,
|
|
75
|
+
aria_label: 'Highlights',
|
|
76
|
+
previous_button_label: 'Previous slide',
|
|
77
|
+
next_button_label: 'Next slide',
|
|
78
|
+
pause_button_label: 'Pause slideshow',
|
|
79
|
+
play_button_label: 'Play slideshow',
|
|
80
|
+
slide_button_label: 'Go to slide',
|
|
81
|
+
};
|
|
35
82
|
export const Default = Template.bind({});
|
|
36
|
-
Default.args = {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
83
|
+
Default.args = Object.assign({}, defaultArgs);
|
|
84
|
+
export const Autoplay = Template.bind({});
|
|
85
|
+
Autoplay.args = Object.assign(Object.assign({}, defaultArgs), { autoplay: true, interval: 5000 });
|
|
86
|
+
Autoplay.parameters = {
|
|
87
|
+
docs: {
|
|
88
|
+
description: {
|
|
89
|
+
story: 'With `autoplay` on, a pause/play button is rendered next to the slide dots (WCAG 2.2.2). ' +
|
|
90
|
+
'Autoplay also suspends on hover and on keyboard focus, and is disabled entirely when ' +
|
|
91
|
+
'`prefers-reduced-motion: reduce` is set.',
|
|
92
|
+
},
|
|
93
|
+
},
|
|
44
94
|
};
|
|
45
|
-
// export const NoAutoplay = Template.bind({});
|
|
46
|
-
// NoAutoplay.args = {
|
|
47
|
-
// images: [
|
|
48
|
-
// { src: 'assets/img/home1.jpg', title: 'Welcome to Our Site', subtitle: 'Discover amazing features', link: '#' },
|
|
49
|
-
// { src: 'assets/img/home2.jpg', title: 'Explore More', subtitle: 'Find what you need', link: '#' },
|
|
50
|
-
// { src: 'assets/img/home3.jpg', title: 'Join Us Today', subtitle: 'Become part of our community', link: '#' }
|
|
51
|
-
// ],
|
|
52
|
-
// autoplay: false,
|
|
53
|
-
// interval: 3000,
|
|
54
|
-
// };
|
|
55
|
-
// export const CustomInterval = Template.bind({});
|
|
56
|
-
// CustomInterval.args = {
|
|
57
|
-
// images: [
|
|
58
|
-
// { src: 'assets/img/home1.jpg', title: 'Welcome to Our Site', subtitle: 'Discover amazing features', link: '#' },
|
|
59
|
-
// { src: 'assets/img/home2.jpg', title: 'Explore More', subtitle: 'Find what you need', link: '#' },
|
|
60
|
-
// { src: 'assets/img/home3.jpg', title: 'Join Us Today', subtitle: 'Become part of our community', link: '#' }
|
|
61
|
-
// ],
|
|
62
|
-
// autoplay: true,
|
|
63
|
-
// interval: 5000,
|
|
64
|
-
// };
|
|
@@ -102,7 +102,8 @@
|
|
|
102
102
|
z-index: 3;
|
|
103
103
|
}
|
|
104
104
|
.slider-nav .prev,
|
|
105
|
-
.slider-nav .next
|
|
105
|
+
.slider-nav .next,
|
|
106
|
+
.slider-nav .pause {
|
|
106
107
|
height: 28px;
|
|
107
108
|
width: 28px;
|
|
108
109
|
padding: 0;
|
|
@@ -119,19 +120,49 @@
|
|
|
119
120
|
transition: all 0.2s linear;
|
|
120
121
|
}
|
|
121
122
|
.slider-nav .prev:hover,
|
|
122
|
-
.slider-nav .next:hover
|
|
123
|
+
.slider-nav .next:hover,
|
|
124
|
+
.slider-nav .pause:hover {
|
|
123
125
|
background: rgba(0, 0, 0, 0.45);
|
|
124
126
|
}
|
|
127
|
+
|
|
128
|
+
/* The icon is a Material Icons ligature. Until that font loads — or if the
|
|
129
|
+
consumer never loads it — the literal text renders and would overflow the
|
|
130
|
+
28px button and cover the slide dots, making them unclickable. Clip it. */
|
|
131
|
+
.slider-nav .prev,
|
|
132
|
+
.slider-nav .next,
|
|
133
|
+
.slider-nav .pause {
|
|
134
|
+
overflow: hidden;
|
|
135
|
+
flex: 0 0 auto;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.slider-nav .prev i,
|
|
139
|
+
.slider-nav .next i,
|
|
140
|
+
.slider-nav .pause i {
|
|
141
|
+
font-size: 25px;
|
|
142
|
+
line-height: 1;
|
|
143
|
+
width: 25px;
|
|
144
|
+
height: 25px;
|
|
145
|
+
overflow: hidden;
|
|
146
|
+
}
|
|
125
147
|
.slider-nav ul {
|
|
126
148
|
display: flex;
|
|
127
149
|
align-items: center;
|
|
128
150
|
gap: 15px;
|
|
151
|
+
list-style: none;
|
|
152
|
+
margin: 0;
|
|
153
|
+
padding: 0;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.slider-nav li {
|
|
157
|
+
display: flex;
|
|
129
158
|
}
|
|
130
159
|
.slider-nav .dots {
|
|
131
160
|
display: block;
|
|
161
|
+
appearance: none;
|
|
162
|
+
-webkit-appearance: none;
|
|
132
163
|
width: 10px;
|
|
133
164
|
height: 10px;
|
|
134
|
-
background: rgba(
|
|
165
|
+
background: rgba(255, 255, 255, 0.2);
|
|
135
166
|
overflow: hidden;
|
|
136
167
|
text-indent: -100px;
|
|
137
168
|
margin: 0;
|
|
@@ -143,7 +174,17 @@
|
|
|
143
174
|
}
|
|
144
175
|
|
|
145
176
|
.slider-nav .dots.active {
|
|
146
|
-
background: rgba(
|
|
177
|
+
background: rgba(255, 255, 255, 0.85);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
/* Controls sit over photography, where the UA default focus ring is often
|
|
181
|
+
invisible. Pair a white ring with a dark outer ring so it reads on any slide. */
|
|
182
|
+
.slider-nav .prev:focus-visible,
|
|
183
|
+
.slider-nav .next:focus-visible,
|
|
184
|
+
.slider-nav .pause:focus-visible,
|
|
185
|
+
.slider-nav .dots:focus-visible {
|
|
186
|
+
outline: none;
|
|
187
|
+
box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px rgba(0, 0, 0, 0.65);
|
|
147
188
|
}
|
|
148
189
|
|
|
149
190
|
|
|
@@ -6,6 +6,23 @@ export class DdaInput {
|
|
|
6
6
|
handleInput(event) {
|
|
7
7
|
this.value = event.target.value;
|
|
8
8
|
}
|
|
9
|
+
// F-016: ids are derived from the consumer-supplied input_id, the same
|
|
10
|
+
// pattern dda-select's listboxId already relies on for uniqueness. If a
|
|
11
|
+
// consumer omits input_id, no id-based association is emitted at all
|
|
12
|
+
// (rather than colliding on a shared literal id across instances).
|
|
13
|
+
get helperId() {
|
|
14
|
+
return this.input_id ? `${this.input_id}-helper` : undefined;
|
|
15
|
+
}
|
|
16
|
+
get errorId() {
|
|
17
|
+
return this.input_id ? `${this.input_id}-error` : undefined;
|
|
18
|
+
}
|
|
19
|
+
get describedBy() {
|
|
20
|
+
const ids = [
|
|
21
|
+
this.helper_text ? this.helperId : undefined,
|
|
22
|
+
this.error_message ? this.errorId : undefined,
|
|
23
|
+
].filter(Boolean);
|
|
24
|
+
return ids.length ? ids.join(' ') : undefined;
|
|
25
|
+
}
|
|
9
26
|
render() {
|
|
10
27
|
const inputClass = [
|
|
11
28
|
'dda-input-container',
|
|
@@ -18,7 +35,7 @@ export class DdaInput {
|
|
|
18
35
|
this.component_mode,
|
|
19
36
|
this.input_name,
|
|
20
37
|
].filter(Boolean).join(' ');
|
|
21
|
-
return (h(Host, { key: '
|
|
38
|
+
return (h(Host, { key: '2cbe6df5e60ff611ece992565bb8f4f335c199fa' }, h("div", { key: 'e878d9e3055d199b69bad630541090902f24436e', class: inputClass }, this.label && h("label", { key: '336e7e91b2d3bbc2207507cbbca7636a9f8041c4', htmlFor: this.input_id, class: "dda-input-label" }, this.label), h("input", { key: '5a72ef700ad5aa6a14cc2beb04c90895586dfa82', "aria-label": this.aria_label, id: this.input_id, name: this.input_name, type: this.type, placeholder: this.placeholder, value: this.value, onInput: (event) => this.handleInput(event), class: "dda-input-field dda-input-text", "aria-describedby": this.describedBy, "aria-invalid": this.error_message ? 'true' : undefined }), this.helper_text && h("span", { key: 'd1aed2d29bb8510248da9ef409209f77b53d2021', id: this.helperId, class: "dda-helper-text" }, this.helper_text), this.error_message && h("span", { key: 'e9f72ebbb0beb1771238768a8ecdd7a27abcc309', id: this.errorId, class: "dda-error-message" }, this.error_message))));
|
|
22
39
|
}
|
|
23
40
|
static get is() { return "dda-input"; }
|
|
24
41
|
static get originalStyleUrls() {
|
|
@@ -26,9 +26,9 @@ export class DdaLinkButton {
|
|
|
26
26
|
this.custom_class, // Include custom class
|
|
27
27
|
this.component_mode,
|
|
28
28
|
].filter(Boolean).join(' ');
|
|
29
|
-
return (h(Host, { key: '
|
|
29
|
+
return (h(Host, { key: 'c05598ead44c09c1cd4d3a8699639c4012e37847' }, h("a", { key: '6f136a098f42b34d122ad5f6731334091b587938',
|
|
30
30
|
// type={this.type}
|
|
31
|
-
id: this.button_id, href: this.href, class: linkbuttonClass, "aria-label": this.aria_label }, this.start_icon && h("i", { key: '
|
|
31
|
+
id: this.button_id, href: this.href, class: linkbuttonClass, "aria-label": this.aria_label }, this.start_icon && h("i", { key: '8c073887eae47a0303486aaa79cab227e726cbbe', class: "material-icons material-symbols-outlined" }, this.start_icon), h("slot", { key: 'e320db9c64f86fe64dd33937b446cab933672689' }), this.end_icon && h("i", { key: 'c5f7efefa3751d2d9fae3afb1ba24226bd9f54ba', class: "material-icons material-symbols-outlined" }, this.end_icon))));
|
|
32
32
|
}
|
|
33
33
|
static get is() { return "dda-link-button"; }
|
|
34
34
|
static get originalStyleUrls() {
|
|
@@ -34,6 +34,21 @@ export class DdaNumberField {
|
|
|
34
34
|
return [];
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
|
+
// F-016: ids derived from the consumer-supplied input_id, same pattern as
|
|
38
|
+
// dda-input/dda-select.
|
|
39
|
+
get helperId() {
|
|
40
|
+
return this.input_id ? `${this.input_id}-helper` : undefined;
|
|
41
|
+
}
|
|
42
|
+
get errorId() {
|
|
43
|
+
return this.input_id ? `${this.input_id}-error` : undefined;
|
|
44
|
+
}
|
|
45
|
+
get describedBy() {
|
|
46
|
+
const ids = [
|
|
47
|
+
this.helper_text ? this.helperId : undefined,
|
|
48
|
+
this.error_message ? this.errorId : undefined,
|
|
49
|
+
].filter(Boolean);
|
|
50
|
+
return ids.length ? ids.join(' ') : undefined;
|
|
51
|
+
}
|
|
37
52
|
render() {
|
|
38
53
|
const containerClass = [
|
|
39
54
|
'dda-input-container',
|
|
@@ -45,7 +60,7 @@ export class DdaNumberField {
|
|
|
45
60
|
this.custom_class ? `${this.custom_class}` : '',
|
|
46
61
|
this.component_mode,
|
|
47
62
|
].filter(Boolean).join(' ');
|
|
48
|
-
return (h(Host, { key: '
|
|
63
|
+
return (h(Host, { key: '478d056b97c8fbbdeab9479d91a35b5065729f5a' }, h("div", { key: '99371519b6ecc1e1621f81b5fdaa5fdccde6bbdf', class: containerClass }, this.label && h("label", { key: '94a2fd311083fcd85676c608c5ae14c4e0347c0e', htmlFor: this.input_id, class: "dda-input-label" }, this.label), h("div", { key: '0c0d94451f0a1ccff97cef278c5c4bc3fc17e147', class: "dda-input-field-group dda-number-field" }, h("input", { key: 'b93aae1d972d9aee4fc6a62f6040c35720723916', id: this.input_id, name: this.input_name, "aria-label": this.aria_label, type: "text", placeholder: this.placeholder, value: this.value, pattern: "[0-9]*", onInput: event => this.handleInput(event), onFocus: this.handleFocus.bind(this), onBlur: this.handleBlur.bind(this), class: "dda-field-group-input", "aria-describedby": this.describedBy, "aria-invalid": this.error_message ? 'true' : undefined }), h("div", { key: '6275bae648bd43980e705530296b2b8c90899cb1', class: "dda-input-dropdown-btn" }, h("button", { key: 'b7a956128c59b5147531a4ce85b5b86ea7137e47', name: this.toggle_button_name, type: "button", class: "dda-dropdown-select", onClick: () => this.toggleCurrencyDropdown() }, this.selected_currency, " ", h("i", { key: '8a1d3737250c5ff33c37c97825b48d106f0c5196', class: `material-icons` }, this.isCurrencyDropdownOpen ? 'keyboard_arrow_up' : 'keyboard_arrow_down')), this.isCurrencyDropdownOpen && (h("div", { key: 'd260c7d405316fa6f4bcf8ab7480f6287ebf35e1', class: "dda-input-dropdown-list" }, this.parsedCurrencies.length > 0 ? (this.parsedCurrencies.map(option => (h("button", { name: this.currency_button_name, type: "button", class: `dda-input-dropdown-item ${this.selected_currency === option ? 'selected' : ''}`, onClick: () => this.selectCurrency(option) }, option)))) : (h("div", { class: "dda-input-dropdown-item" }, "No options available")))))), this.helper_text && h("span", { key: 'eb8f3492e3603259b31b6c35ced9aac4d52eb4e4', id: this.helperId, class: "dda-helper-text" }, this.helper_text), this.error_message && h("span", { key: '9c074b68b234cae9882e14aaca175e5f865d24ee', id: this.errorId, class: "dda-error-message" }, this.error_message))));
|
|
49
64
|
}
|
|
50
65
|
static get is() { return "dda-number-field"; }
|
|
51
66
|
static get originalStyleUrls() {
|
|
@@ -142,8 +142,16 @@
|
|
|
142
142
|
border-radius: 0 5px 5px 0;
|
|
143
143
|
}
|
|
144
144
|
|
|
145
|
+
/*
|
|
146
|
+
* F-022 (WCAG 2.5.8 target size, minimum): each dot is a deliberately
|
|
147
|
+
* small 10x10 visual target. Rather than growing the dots themselves
|
|
148
|
+
* (which would change the design), the gap is sized so their centres sit
|
|
149
|
+
* >= 24px apart, satisfying the spacing exception - the same approach and
|
|
150
|
+
* numbers (10px target, 25px centre-to-centre) already used for
|
|
151
|
+
* dda-home-banner's slide dots (home-banner.css `.slider-nav .dots`).
|
|
152
|
+
*/
|
|
145
153
|
.dda-pagination-full {
|
|
146
|
-
gap:
|
|
154
|
+
gap: 15px;
|
|
147
155
|
}
|
|
148
156
|
|
|
149
157
|
.dda-pagination-full button {
|
|
@@ -54,7 +54,7 @@ export class DdaPagination {
|
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
render() {
|
|
57
|
-
return (h(Host, { key: '
|
|
57
|
+
return (h(Host, { key: '85e139ac55f4589cc1aabbdcc5ee4034c08138f7' }, h("div", { key: '20403174b3a3b556016eb01ab96a624e97c17b51', class: `dda-pagination-container` }, this.renderPagination())));
|
|
58
58
|
}
|
|
59
59
|
static get is() { return "dda-pagination"; }
|
|
60
60
|
static get originalStyleUrls() {
|
|
@@ -10,6 +10,24 @@ export class DdaPhoneField {
|
|
|
10
10
|
this.is_focused = false;
|
|
11
11
|
this.dropdown_open = false;
|
|
12
12
|
this.countries = [];
|
|
13
|
+
// F-018 (WCAG 1.3.5): telephone is exactly the field type autocomplete
|
|
14
|
+
// exists for. Default to the correct token; still overridable.
|
|
15
|
+
this.autocomplete = 'tel';
|
|
16
|
+
}
|
|
17
|
+
// F-016: ids derived from the consumer-supplied input_id, same pattern as
|
|
18
|
+
// dda-input/dda-select.
|
|
19
|
+
get helperId() {
|
|
20
|
+
return this.input_id ? `${this.input_id}-helper` : undefined;
|
|
21
|
+
}
|
|
22
|
+
get errorId() {
|
|
23
|
+
return this.input_id ? `${this.input_id}-error` : undefined;
|
|
24
|
+
}
|
|
25
|
+
get describedBy() {
|
|
26
|
+
const ids = [
|
|
27
|
+
this.helper_text && !this.validation_type ? this.helperId : undefined,
|
|
28
|
+
this.error_message ? this.errorId : undefined,
|
|
29
|
+
].filter(Boolean);
|
|
30
|
+
return ids.length ? ids.join(' ') : undefined;
|
|
13
31
|
}
|
|
14
32
|
// componentWillLoad() {
|
|
15
33
|
// fetch('/path/to/countries.json')
|
|
@@ -42,7 +60,7 @@ export class DdaPhoneField {
|
|
|
42
60
|
}
|
|
43
61
|
render() {
|
|
44
62
|
const inputClass = `${this.component_mode} ${this.size ? `dda-input-size-${this.size}` : ''} ${this.error_message ? `dda-error-message` : ''} ${this.validation_type ? `dda-validation-${this.validation_type}` : ''} ${this.is_focused ? 'dda-input-focus' : ''} ${this.phone_number ? 'dda-input-focus-filled' : ''}`;
|
|
45
|
-
return (h(Host, { key: '
|
|
63
|
+
return (h(Host, { key: 'cf25902e0ce27b528e00a92f728a0eb221bb65ff' }, h("div", { key: 'ff34b06175b8ab15fedbad232468316639bbe0d3', class: `dda-input-container ${inputClass} ${this.custom_class} ${this.disabled ? 'dda-input-disabled' : ''}` }, this.label && h("label", { key: 'a277c84bebef55a5126396beca24584f70d7acb6', htmlFor: this.input_id, class: "dda-input-label" }, this.label), h("div", { key: 'ccf3e63be167ecbbe310084e8b3306e353a6f243', class: `dda-input-field-group dda-phone-field` }, h("div", { key: 'c41acbf341633482a915273f9d3c522c4b2bd95f', class: "dda-input-dropdown-btn" }, h("button", { key: '0cc277ad44e73255ad84f6e2e099847f254fe4d4', type: "button", name: this.toggle_button_name, class: "dda-dropdown-select", onClick: () => this.toggleDropdown() }, h("img", { key: '78e46d6ca28db487ebe4c66b14c8f46850a0ccd8', src: this.country_flag, alt: "", width: "20" }), " ", this.country_code, " ", h("i", { key: '31511bbcb0826bb1fd787a4431378c4b1f8b616f', class: `material-icons` }, this.dropdown_open ? 'keyboard_arrow_down' : 'keyboard_arrow_down')), this.dropdown_open && (h("div", { key: 'e541a962e8f0ea40162968f700ece1e572ce54d3', class: "dda-input-dropdown-list" }, this.countries.map(country => (h("button", { id: this.button_id, name: this.country_select_button_name, "aria-label": this.button_aria_label, type: "button", class: "dda-input-dropdown-item", onClick: () => this.selectCountry(country) }, h("img", { src: country.flag, alt: "", width: "20" }), " ", country.code)))))), h("input", { key: 'ebb15740cd44c82780ce21a7c4425893fdea7e50', id: this.input_id, name: this.phone_input_name, "aria-label": this.aria_label, type: "number", class: `dda-field-group-input`, placeholder: this.placeholder, inputmode: 'numeric', pattern: "[0-9]*", autocomplete: this.autocomplete, value: this.phone_number, onInput: this.handlephonenumberChange.bind(this), onFocus: this.handleFocus.bind(this), onBlur: this.handleBlur.bind(this), disabled: this.disabled, "aria-describedby": this.describedBy, "aria-invalid": this.error_message ? 'true' : undefined })), this.helper_text && !this.validation_type && h("span", { key: '635c07efb64846c0deac837cc269f4b544572ef7', id: this.helperId, class: "dda-helper-text" }, this.helper_text), this.error_message && h("span", { key: '7e4e2dce397eb4d761bc1e2536219f5f2005dc68', id: this.errorId, class: "dda-error-message" }, this.error_message))));
|
|
46
64
|
}
|
|
47
65
|
static get is() { return "dda-phonefield"; }
|
|
48
66
|
static get originalStyleUrls() {
|
|
@@ -362,6 +380,26 @@ export class DdaPhoneField {
|
|
|
362
380
|
"setter": false,
|
|
363
381
|
"reflect": false,
|
|
364
382
|
"attribute": "phone_input_name"
|
|
383
|
+
},
|
|
384
|
+
"autocomplete": {
|
|
385
|
+
"type": "string",
|
|
386
|
+
"mutable": false,
|
|
387
|
+
"complexType": {
|
|
388
|
+
"original": "string",
|
|
389
|
+
"resolved": "string",
|
|
390
|
+
"references": {}
|
|
391
|
+
},
|
|
392
|
+
"required": false,
|
|
393
|
+
"optional": false,
|
|
394
|
+
"docs": {
|
|
395
|
+
"tags": [],
|
|
396
|
+
"text": ""
|
|
397
|
+
},
|
|
398
|
+
"getter": false,
|
|
399
|
+
"setter": false,
|
|
400
|
+
"reflect": false,
|
|
401
|
+
"attribute": "autocomplete",
|
|
402
|
+
"defaultValue": "'tel'"
|
|
365
403
|
}
|
|
366
404
|
};
|
|
367
405
|
}
|
|
@@ -72,6 +72,10 @@ export default {
|
|
|
72
72
|
phone_input_name: {
|
|
73
73
|
control: { type: 'text' },
|
|
74
74
|
description: 'Name for the phone input field',
|
|
75
|
+
},
|
|
76
|
+
autocomplete: {
|
|
77
|
+
control: { type: 'text' },
|
|
78
|
+
description: 'Autocomplete token for the phone number input (WCAG 1.3.5). Defaults to "tel".',
|
|
75
79
|
}
|
|
76
80
|
},
|
|
77
81
|
parameters: {
|
|
@@ -97,7 +101,8 @@ To use the \`dda-phonefield\` component, pass the following props:
|
|
|
97
101
|
toggle_button_name="toggle-button"
|
|
98
102
|
country_select_button_name="country-select-button"
|
|
99
103
|
phone_input_name="phone-input"
|
|
100
|
-
|
|
104
|
+
autocomplete="tel"
|
|
105
|
+
|
|
101
106
|
></dda-phonefield>
|
|
102
107
|
\`\`\`
|
|
103
108
|
`,
|
|
@@ -129,6 +134,7 @@ Default.args = {
|
|
|
129
134
|
toggle_button_name: "toggle-button",
|
|
130
135
|
country_select_button_name: "country-select-button",
|
|
131
136
|
phone_input_name: "phone-input",
|
|
137
|
+
autocomplete: 'tel',
|
|
132
138
|
};
|
|
133
139
|
export const FocusFilled = Template.bind({});
|
|
134
140
|
FocusFilled.args = {
|
|
@@ -149,6 +155,7 @@ FocusFilled.args = {
|
|
|
149
155
|
toggle_button_name: "toggle-button",
|
|
150
156
|
country_select_button_name: "country-select-button",
|
|
151
157
|
phone_input_name: "phone-input",
|
|
158
|
+
autocomplete: 'tel',
|
|
152
159
|
};
|
|
153
160
|
export const Filled = Template.bind({});
|
|
154
161
|
Filled.args = {
|
|
@@ -168,6 +175,7 @@ Filled.args = {
|
|
|
168
175
|
toggle_button_name: "toggle-button",
|
|
169
176
|
country_select_button_name: "country-select-button",
|
|
170
177
|
phone_input_name: "phone-input",
|
|
178
|
+
autocomplete: 'tel',
|
|
171
179
|
};
|
|
172
180
|
export const Error = Template.bind({});
|
|
173
181
|
Error.args = {
|
|
@@ -187,6 +195,7 @@ Error.args = {
|
|
|
187
195
|
toggle_button_name: "toggle-button",
|
|
188
196
|
country_select_button_name: "country-select-button",
|
|
189
197
|
phone_input_name: "phone-input",
|
|
198
|
+
autocomplete: 'tel',
|
|
190
199
|
};
|
|
191
200
|
export const Disabled = Template.bind({});
|
|
192
201
|
Disabled.args = {
|
|
@@ -205,4 +214,5 @@ Disabled.args = {
|
|
|
205
214
|
toggle_button_name: "toggle-button",
|
|
206
215
|
country_select_button_name: "country-select-button",
|
|
207
216
|
phone_input_name: "phone-input",
|
|
217
|
+
autocomplete: 'tel',
|
|
208
218
|
};
|
|
@@ -5,12 +5,13 @@ export class DdaProgressBar {
|
|
|
5
5
|
this.tooltip = false;
|
|
6
6
|
this.tooltip_position = 'top';
|
|
7
7
|
this.show_percentage_text = false;
|
|
8
|
+
this.aria_label = 'Progress';
|
|
8
9
|
}
|
|
9
10
|
render() {
|
|
10
11
|
const progressStyle = {
|
|
11
12
|
width: `${this.progress}%`,
|
|
12
13
|
};
|
|
13
|
-
return (h(Host, { key: '
|
|
14
|
+
return (h(Host, { key: 'd15dd4450a6e3844824c70012a60a7ffc2929a05' }, h("div", { key: '272d319e6dc56d0887c8a5649df86ceefcbd15e1', class: `dda-progress-bar-container ${this.custom_class} ${this.component_mode}` }, h("div", { key: 'a6783ce163ce0f5d18a869f90a941b3956ab84bf', class: "dda-progress-bar", role: "progressbar", "aria-label": this.aria_label, "aria-valuenow": `${this.progress}`, "aria-valuemin": "0", "aria-valuemax": "100" }, h("div", { key: '18dde8d79aa85aa38550aad9b17f145ec1d513ac', class: "dda-progress-value", style: progressStyle }, this.tooltip && (h("div", { key: '682ba315e92ce66c2312169fe157723a0d6d7880', class: `dda-tooltip tooltip-${this.tooltip_position}` }, this.progress, "%")))), this.show_percentage_text && (h("span", { key: 'f8ac4a0f095600dfc5df8b6001fe7221533cc49f', class: "dda-percentage-text" }, this.progress, "%")))));
|
|
14
15
|
}
|
|
15
16
|
static get is() { return "dda-progressbar"; }
|
|
16
17
|
static get originalStyleUrls() {
|
|
@@ -142,6 +143,26 @@ export class DdaProgressBar {
|
|
|
142
143
|
"setter": false,
|
|
143
144
|
"reflect": false,
|
|
144
145
|
"attribute": "component_mode"
|
|
146
|
+
},
|
|
147
|
+
"aria_label": {
|
|
148
|
+
"type": "string",
|
|
149
|
+
"mutable": false,
|
|
150
|
+
"complexType": {
|
|
151
|
+
"original": "string",
|
|
152
|
+
"resolved": "string",
|
|
153
|
+
"references": {}
|
|
154
|
+
},
|
|
155
|
+
"required": false,
|
|
156
|
+
"optional": false,
|
|
157
|
+
"docs": {
|
|
158
|
+
"tags": [],
|
|
159
|
+
"text": ""
|
|
160
|
+
},
|
|
161
|
+
"getter": false,
|
|
162
|
+
"setter": false,
|
|
163
|
+
"reflect": false,
|
|
164
|
+
"attribute": "aria_label",
|
|
165
|
+
"defaultValue": "'Progress'"
|
|
145
166
|
}
|
|
146
167
|
};
|
|
147
168
|
}
|
|
@@ -32,6 +32,11 @@ export default {
|
|
|
32
32
|
options: ['light-mode'],
|
|
33
33
|
description: 'Mode of the progress bar component',
|
|
34
34
|
},
|
|
35
|
+
aria_label: {
|
|
36
|
+
control: { type: 'text' },
|
|
37
|
+
description: 'Accessible name announced for the progressbar role. Defaults to "Progress".',
|
|
38
|
+
defaultValue: 'Progress',
|
|
39
|
+
},
|
|
35
40
|
},
|
|
36
41
|
parameters: {
|
|
37
42
|
docs: {
|
|
@@ -47,6 +52,7 @@ To use the \`dda-progressbar\` component, pass the following props:
|
|
|
47
52
|
show_percentage_text="false"
|
|
48
53
|
custom_class=""
|
|
49
54
|
component_mode=""
|
|
55
|
+
aria_label="Progress"
|
|
50
56
|
></dda-progressbar>
|
|
51
57
|
\`\`\`
|
|
52
58
|
`,
|
|
@@ -63,7 +63,10 @@
|
|
|
63
63
|
--dda-on-primary-94: var(--dda-primary-20);
|
|
64
64
|
|
|
65
65
|
--dda-primary-variant-96: var(--dda-primary-30);
|
|
66
|
-
|
|
66
|
+
/* F-023 Decision 2: was var(--dda-primary-30) — 4.05:1 against the alert's
|
|
67
|
+
info text, failing 4.5:1. Darkening the fill (not the text, which is
|
|
68
|
+
also the alert's border/link/icon colour) brings it to 5.72:1. */
|
|
69
|
+
--dda-primary-variant-95: var(--dda-primary-20);
|
|
67
70
|
--dda-primary-variant-94: var(--dda-primary-25);
|
|
68
71
|
--dda-primary-variant-92: var(--dda-primary-20);
|
|
69
72
|
--dda-primary-variant-87: var(--dda-primary-12);
|
|
@@ -282,7 +285,11 @@
|
|
|
282
285
|
}
|
|
283
286
|
:root[data-theme='dark'] {
|
|
284
287
|
--dda-color-warning-50: var(--dda-warning-80);
|
|
285
|
-
|
|
288
|
+
/* F-023 Decision 2: was var(--dda-warning-50) — 2.08:1 against the alert's
|
|
289
|
+
warning fill, failing both the 24px title's 3:1 and the description's
|
|
290
|
+
4.5:1. This token is also the alert's border/link/icon colour, so the
|
|
291
|
+
text tone moves (not the fill) to stay in one place: 5.47:1. */
|
|
292
|
+
--dda-color-warning-40: var(--dda-warning-80);
|
|
286
293
|
--dda-color-warning-30: var(--dda-warning-90);
|
|
287
294
|
--dda-color-warning-20: var(--dda-warning-94);
|
|
288
295
|
|
|
@@ -499,6 +506,11 @@
|
|
|
499
506
|
--dda-on-surface-30: var(--dda-neutral-30);
|
|
500
507
|
--dda-on-surface-40: var(--dda-neutral-40);
|
|
501
508
|
--dda-on-surface-0: var(--dda-neutral-0);
|
|
509
|
+
|
|
510
|
+
/* F-023 Decision 1: theme-aware muted/disabled-text alias. --dda-neutral-60
|
|
511
|
+
itself stays a theme-invariant raw ramp step; this alias is the
|
|
512
|
+
theme-aware layer for the 8 call sites that use it as text. */
|
|
513
|
+
--dda-on-surface-muted: var(--dda-neutral-40);
|
|
502
514
|
}
|
|
503
515
|
|
|
504
516
|
:root[data-theme='dark'] {
|
|
@@ -515,6 +527,8 @@
|
|
|
515
527
|
--dda-on-surface-20: var(--dda-neutral-90);
|
|
516
528
|
--dda-on-surface-30: var(--dda-neutral-80);
|
|
517
529
|
--dda-on-surface-40: var(--dda-neutral-70);
|
|
530
|
+
|
|
531
|
+
--dda-on-surface-muted: var(--dda-neutral-70);
|
|
518
532
|
}
|
|
519
533
|
|
|
520
534
|
:root {
|
|
@@ -2036,6 +2050,16 @@
|
|
|
2036
2050
|
width: 100%;
|
|
2037
2051
|
z-index: 5;
|
|
2038
2052
|
padding: 0 20px;
|
|
2053
|
+
transform: translateY(0);
|
|
2054
|
+
transition: transform 300ms ease-in-out;
|
|
2055
|
+
}
|
|
2056
|
+
|
|
2057
|
+
/* dda-sticky-footer toggles this class off its own scroll-direction state
|
|
2058
|
+
(see dda-sticky-footer.tsx handleScroll) to hide the bar while scrolling
|
|
2059
|
+
down and bring it back while scrolling up. Same transition idiom as
|
|
2060
|
+
.dda-header in dda-header-main.css. */
|
|
2061
|
+
.dda-footer.hidden {
|
|
2062
|
+
transform: translateY(100%);
|
|
2039
2063
|
}
|
|
2040
2064
|
|
|
2041
2065
|
.footer-content {
|
|
@@ -12,7 +12,7 @@ export class DdaRadiobutton {
|
|
|
12
12
|
this.radio_status ? `dda-radio-${this.radio_status}` : '',
|
|
13
13
|
this.component_mode,
|
|
14
14
|
].filter(Boolean).join(' ');
|
|
15
|
-
return (h(Host, { key: '
|
|
15
|
+
return (h(Host, { key: 'a8c20b31595f50e03be9c176ada7abe31072a92e' }, h("div", { key: '8fa4b0fc9b43d3c3e7856b48a6d48a5a27ee3d08', class: radiobuttonClass }, h("input", { key: 'c82a834dfdfce765ca8f0bc79965b33c8609cf59', "aria-label": this.aria_label, type: "radio", id: this.input_id, name: this.group_name, checked: this.checked }), h("label", { key: 'dcdda4589a603a09992e1b43cfc1c2c33b3a9f31', htmlFor: this.input_id }, h("span", { key: 'f954a5e51ee26ae675d7c10af9b7a8c137f0ea76', class: "radio-circle" }), h("p", { key: 'af562e56bbc53e7e92358afef1c0fb42be24c717' }, h("span", { key: 'c66e2473d0b3a38b460bfc6d84a8d3cecda2c756', class: "radio-title" }, this.title_text), this.supporting && h("span", { key: '9b75dd46d93f4e17ce114200851b8bc019e7b27c', class: "radio-supporting" }, this.supporting))))));
|
|
16
16
|
}
|
|
17
17
|
static get is() { return "dda-radiobutton"; }
|
|
18
18
|
static get originalStyleUrls() {
|