@dubai-design-system/components-js 5.3.0 → 5.3.1
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 +24 -0
- package/MIGRATION.md +16 -1
- package/dist/cjs/dda-accordion.cjs.entry.js +3 -3
- package/dist/cjs/dda-alert.cjs.entry.js +3 -3
- package/dist/cjs/dda-attach-file.cjs.entry.js +3 -3
- package/dist/cjs/dda-avatar.cjs.entry.js +7 -7
- package/dist/cjs/dda-banner-card.cjs.entry.js +5 -5
- package/dist/cjs/dda-banner.cjs.entry.js +3 -3
- 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 +3 -3
- package/dist/cjs/dda-chip.cjs.entry.js +3 -3
- package/dist/cjs/dda-credit-card.cjs.entry.js +3 -3
- package/dist/cjs/dda-creditcard-field.cjs.entry.js +3 -3
- package/dist/cjs/dda-dropdown.cjs.entry.js +3 -3
- package/dist/cjs/dda-footer.cjs.entry.js +3 -3
- package/dist/cjs/dda-header.cjs.entry.js +1 -1
- package/dist/cjs/dda-home-banner.cjs.entry.js +9 -5
- package/dist/cjs/dda-home-carousel.cjs.entry.js +2 -2
- package/dist/cjs/dda-horizontal-stepper.cjs.entry.js +3 -3
- package/dist/cjs/dda-input.cjs.entry.js +3 -3
- package/dist/cjs/dda-link-button_2.cjs.entry.js +6 -6
- package/dist/cjs/dda-number-field.cjs.entry.js +3 -3
- package/dist/cjs/dda-pagination.cjs.entry.js +3 -3
- package/dist/cjs/dda-phonefield.cjs.entry.js +3 -3
- package/dist/cjs/dda-progressbar.cjs.entry.js +3 -3
- package/dist/cjs/dda-range-slider.cjs.entry.js +3 -3
- package/dist/cjs/dda-scroll-icon.cjs.entry.js +32 -0
- package/dist/cjs/dda-search-input.cjs.entry.js +3 -3
- package/dist/cjs/dda-segmented-tabs.cjs.entry.js +3 -3
- package/dist/cjs/dda-select.cjs.entry.js +83 -12
- package/dist/cjs/dda-sticky-footer.cjs.entry.js +4 -4
- package/dist/cjs/dda-tabs.cjs.entry.js +3 -3
- package/dist/cjs/dda-textarea.cjs.entry.js +4 -4
- package/dist/cjs/dda-toggle.cjs.entry.js +3 -3
- package/dist/cjs/dda-tooltip.cjs.entry.js +3 -3
- 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 +2 -2
- package/dist/cjs/{index-DD8fdSxb.js → index-CM4T__Je.js} +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +2 -1
- package/dist/collection/components/dda-accordion/dda-accordion.js +1 -1
- package/dist/collection/components/dda-alert/dda-alert.js +1 -1
- package/dist/collection/components/dda-attach-file/dda-attach-file.js +1 -1
- package/dist/collection/components/dda-avatar/dda-avatar.js +5 -5
- package/dist/collection/components/dda-banner/dda-banner.js +1 -1
- package/dist/collection/components/dda-banner-card/dda-banner-card.js +3 -3
- package/dist/collection/components/dda-button/dda-button.js +1 -1
- package/dist/collection/components/dda-checkbox/dda-checkbox.js +1 -1
- package/dist/collection/components/dda-chip/dda-chip.js +1 -1
- package/dist/collection/components/dda-credit-card/dda-credit-card.js +1 -1
- package/dist/collection/components/dda-creditcard-field/dda-creditcard-field.js +1 -1
- package/dist/collection/components/dda-dropdown/dda-dropdown.js +1 -1
- package/dist/collection/components/dda-footer/dda-footer.js +1 -1
- package/dist/collection/components/dda-home-banner/dda-home-banner.js +46 -2
- package/dist/collection/components/dda-home-banner/dda-home-banner.stories.js +6 -0
- package/dist/collection/components/dda-home-banner/home-banner.css +10 -0
- package/dist/collection/components/dda-input/dda-input.js +1 -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 +1 -1
- package/dist/collection/components/dda-pagination/dda-pagination.js +1 -1
- package/dist/collection/components/dda-phonefield/dda-phonefield.js +1 -1
- package/dist/collection/components/dda-progressbar/dda-progressbar.js +1 -1
- package/dist/collection/components/dda-radiobutton/dda-radiobutton.css +5 -0
- package/dist/collection/components/dda-radiobutton/dda-radiobutton.js +1 -1
- package/dist/collection/components/dda-range-slider/dda-range-slider.js +2 -2
- package/dist/collection/components/dda-scroll-icon/dda-scroll-icon.css +72 -0
- package/dist/collection/components/dda-scroll-icon/dda-scroll-icon.js +120 -0
- package/dist/collection/components/dda-scroll-icon/dda-scroll-icon.stories.js +17 -0
- package/dist/collection/components/dda-search-input/dda-search-input.js +1 -1
- package/dist/collection/components/dda-select/dda-select.js +209 -18
- package/dist/collection/components/dda-select/dda-select.stories.js +68 -10
- package/dist/collection/components/dda-sticky-footer/dda-sticky-footer.js +2 -2
- package/dist/collection/components/dda-tabs/dda-tabs.js +1 -1
- package/dist/collection/components/dda-textarea/dda-textarea.js +2 -2
- package/dist/collection/components/dda-toggle/dda-toggle.js +1 -1
- package/dist/collection/components/dda-tooltip/dda-tooltip.js +1 -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 +1 -1
- 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/global.css +5 -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-card.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-home-carousel.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-scroll-icon.d.ts +11 -0
- package/dist/components/dda-scroll-icon.js +1 -0
- 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-R9p4F9Pi.js → p-BUv5-HOm.js} +1 -1
- package/dist/components/{p-D3e_hki9.js → p-BvEnF2US.js} +1 -1
- package/dist/components/{p-DCwxgkNU.js → p-C8EPNbJC.js} +1 -1
- package/dist/components/{p-BP6BxgDV.js → p-CS5LPB9B.js} +1 -1
- package/dist/components/{p-BZzFtOHg.js → p-CedhFs0i.js} +1 -1
- package/dist/components/{p-BCtBptNq.js → p-DHgv6zQy.js} +1 -1
- package/dist/components/p-kJRBkcMn.js +1 -0
- package/dist/dda/dda.css +53 -1
- package/dist/dda/dda.esm.js +1 -1
- package/dist/dda/p-074f8dab.entry.js +1 -0
- package/dist/dda/p-1a0d490e.entry.js +1 -0
- package/dist/dda/{p-fb00dec4.entry.js → p-1c42a19b.entry.js} +1 -1
- package/dist/dda/{p-7c1abbd2.entry.js → p-1eb0af5a.entry.js} +1 -1
- package/dist/dda/p-215629d6.entry.js +1 -0
- package/dist/dda/{p-7ffce954.entry.js → p-221613e8.entry.js} +1 -1
- package/dist/dda/{p-46df4933.entry.js → p-284bc873.entry.js} +1 -1
- package/dist/dda/{p-8dbbc0ca.entry.js → p-2f99af01.entry.js} +1 -1
- package/dist/dda/{p-8108c4ed.entry.js → p-3003acb0.entry.js} +1 -1
- package/dist/dda/{p-32a7c588.entry.js → p-5b314403.entry.js} +1 -1
- package/dist/dda/{p-6430c363.entry.js → p-5b669c2f.entry.js} +1 -1
- package/dist/dda/{p-5e757702.entry.js → p-5fe5c488.entry.js} +1 -1
- package/dist/dda/{p-8852dafb.entry.js → p-6577d6b5.entry.js} +1 -1
- package/dist/dda/{p-333205aa.entry.js → p-6b358fa8.entry.js} +1 -1
- package/dist/dda/{p-47322b02.entry.js → p-6e6ce5c8.entry.js} +1 -1
- package/dist/dda/{p-b37f40a9.entry.js → p-70a20025.entry.js} +1 -1
- package/dist/dda/p-78ff5172.entry.js +1 -0
- package/dist/dda/{p-4e717a2e.entry.js → p-7afdde8a.entry.js} +1 -1
- package/dist/dda/{p-9f01cb56.entry.js → p-7ba8071a.entry.js} +1 -1
- package/dist/dda/{p-faed59dd.entry.js → p-7d20f926.entry.js} +1 -1
- package/dist/dda/{p-08e1892a.entry.js → p-806de72d.entry.js} +1 -1
- package/dist/dda/{p-06188c4c.entry.js → p-922d33f8.entry.js} +1 -1
- package/dist/dda/{p-9ff8dc84.entry.js → p-9a9e372d.entry.js} +1 -1
- package/dist/dda/{p-10c5a752.entry.js → p-9c3b7bf8.entry.js} +1 -1
- package/dist/dda/{p-BnrqwGTj.js → p-BJOt1fv7.js} +1 -1
- package/dist/dda/{p-0480f0a9.entry.js → p-a19303b5.entry.js} +1 -1
- package/dist/dda/p-c7a4e410.entry.js +1 -0
- package/dist/dda/{p-6d4f5672.entry.js → p-c9e411cb.entry.js} +1 -1
- package/dist/dda/{p-95100f73.entry.js → p-cd1d47cb.entry.js} +1 -1
- package/dist/dda/p-cfdbbd1a.entry.js +1 -0
- package/dist/dda/{p-a8a1ee5d.entry.js → p-d114dea3.entry.js} +1 -1
- package/dist/dda/{p-76859bf8.entry.js → p-db565a30.entry.js} +1 -1
- package/dist/dda/{p-9d9834ff.entry.js → p-e6043272.entry.js} +1 -1
- package/dist/dda/{p-f2efc121.entry.js → p-ef52ec1e.entry.js} +1 -1
- package/dist/dda/{p-25058697.entry.js → p-f2c9d77a.entry.js} +1 -1
- package/dist/dda/{p-169ba650.entry.js → p-faccb313.entry.js} +1 -1
- package/dist/dda/{p-6db5588a.entry.js → p-fdf0dce8.entry.js} +1 -1
- package/dist/esm/dda-accordion.entry.js +3 -3
- package/dist/esm/dda-alert.entry.js +3 -3
- package/dist/esm/dda-attach-file.entry.js +3 -3
- package/dist/esm/dda-avatar.entry.js +7 -7
- package/dist/esm/dda-banner-card.entry.js +5 -5
- package/dist/esm/dda-banner.entry.js +3 -3
- 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 +3 -3
- package/dist/esm/dda-chip.entry.js +3 -3
- package/dist/esm/dda-credit-card.entry.js +3 -3
- package/dist/esm/dda-creditcard-field.entry.js +3 -3
- package/dist/esm/dda-dropdown.entry.js +3 -3
- package/dist/esm/dda-footer.entry.js +3 -3
- package/dist/esm/dda-header.entry.js +1 -1
- package/dist/esm/dda-home-banner.entry.js +9 -5
- package/dist/esm/dda-home-carousel.entry.js +2 -2
- package/dist/esm/dda-horizontal-stepper.entry.js +3 -3
- package/dist/esm/dda-input.entry.js +3 -3
- package/dist/esm/dda-link-button_2.entry.js +6 -6
- package/dist/esm/dda-number-field.entry.js +3 -3
- package/dist/esm/dda-pagination.entry.js +3 -3
- package/dist/esm/dda-phonefield.entry.js +3 -3
- package/dist/esm/dda-progressbar.entry.js +3 -3
- package/dist/esm/dda-range-slider.entry.js +3 -3
- package/dist/esm/dda-scroll-icon.entry.js +30 -0
- package/dist/esm/dda-search-input.entry.js +3 -3
- package/dist/esm/dda-segmented-tabs.entry.js +3 -3
- package/dist/esm/dda-select.entry.js +83 -12
- package/dist/esm/dda-sticky-footer.entry.js +4 -4
- package/dist/esm/dda-tabs.entry.js +3 -3
- package/dist/esm/dda-textarea.entry.js +4 -4
- package/dist/esm/dda-toggle.entry.js +3 -3
- package/dist/esm/dda-tooltip.entry.js +3 -3
- 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 -3
- package/dist/esm/{index-BnrqwGTj.js → index-BJOt1fv7.js} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/types/components/dda-home-banner/dda-home-banner.d.ts +4 -0
- package/dist/types/components/dda-home-banner/dda-home-banner.stories.d.ts +8 -0
- package/dist/types/components/dda-scroll-icon/dda-scroll-icon.d.ts +11 -0
- package/dist/types/components/dda-scroll-icon/dda-scroll-icon.stories.d.ts +20 -0
- package/dist/types/components/dda-select/dda-select.d.ts +40 -5
- package/dist/types/components/dda-select/dda-select.stories.d.ts +25 -0
- package/dist/types/components.d.ts +137 -10
- package/package.json +1 -1
- package/dist/dda/p-5840fad9.entry.js +0 -1
- package/dist/dda/p-5bb62ef7.entry.js +0 -1
- package/dist/dda/p-9a4e34d1.entry.js +0 -1
- package/dist/dda/p-9b234635.entry.js +0 -1
- package/dist/dda/p-eaffd32d.entry.js +0 -1
|
@@ -16,7 +16,7 @@ export class DdaProgressBar {
|
|
|
16
16
|
const progressStyle = {
|
|
17
17
|
width: `${this.progress}%`,
|
|
18
18
|
};
|
|
19
|
-
return (h(Host, { key: '
|
|
19
|
+
return (h(Host, { key: '04313ddfb70c55db686fea642590ba75ab52d00f' }, h("div", { key: '9daec3039295c313c661f990a5e95a583508a744', class: `dda-progress-bar-container ${this.custom_class} ${this.component_mode}` }, h("div", { key: '784a889d7db67402936a560997cbd12d59c886df', class: "dda-progress-bar", role: "progressbar", "aria-label": this.aria_label, "aria-valuenow": `${this.progress}`, "aria-valuemin": "0", "aria-valuemax": "100" }, h("div", { key: '5429f351051181423e18a271269babd479f15e9a', class: "dda-progress-value", style: progressStyle }, this.tooltip && (h("div", { key: '2178aa8908e5fce94a72c1a2b8dada282addc9fe', class: `dda-tooltip tooltip-${this.tooltip_position}` }, this.progress, "%")))), this.show_percentage_text && (h("span", { key: '323b032598d4bbe965dd8e56874835d3573b6adb', class: "dda-percentage-text" }, this.progress, "%")))));
|
|
20
20
|
}
|
|
21
21
|
static get is() { return "dda-progressbar"; }
|
|
22
22
|
static get originalStyleUrls() {
|
|
@@ -3203,6 +3203,11 @@ body {
|
|
|
3203
3203
|
.dda-search input[type="text"]::placeholder{
|
|
3204
3204
|
color: var(--dda-on-surface-0);
|
|
3205
3205
|
}
|
|
3206
|
+
/* On the transparent header the typed text and the caret are white, like the placeholder. */
|
|
3207
|
+
.transparent dda-header:not(.dda-scrolled) .dda-search input[type="text"] {
|
|
3208
|
+
color: var(--dda-neutral-100);
|
|
3209
|
+
caret-color: var(--dda-neutral-100);
|
|
3210
|
+
}
|
|
3206
3211
|
.transparent dda-header:not(.dda-scrolled) .dda-search input[type="text"]::-ms-input-placeholder {
|
|
3207
3212
|
color: var(--dda-neutral-100);
|
|
3208
3213
|
}
|
|
@@ -13,7 +13,7 @@ export class DdaRadiobutton {
|
|
|
13
13
|
this.radio_status ? `dda-radio-${this.radio_status}` : '',
|
|
14
14
|
this.component_mode,
|
|
15
15
|
].filter(Boolean).join(' ');
|
|
16
|
-
return (h(Host, { key: '
|
|
16
|
+
return (h(Host, { key: 'dd57237727d215708e18097d29e1543b27f155fd' }, h("div", { key: 'c9997615a28ba5e6b39dd5192bce8be6bafa3294', class: radiobuttonClass }, h("input", { key: '06e80cd7290b4582174d1d5ac66016091c9be88b', "aria-label": this.aria_label, type: "radio", id: this.input_id, name: this.group_name, checked: this.checked }), h("label", { key: '1d337acbc432e898381079385de5a44ea7e84d7c', htmlFor: this.input_id }, h("span", { key: 'b3864f116634c2c3d4dca437df9f7e06c9897844', class: "radio-circle" }), h("p", { key: '19241cca6592bc73e695ef7801a6faf18e1a566f' }, h("span", { key: 'a082d64589f2452401380039adfe65d34747c679', class: "radio-title" }, this.title_text), this.supporting && h("span", { key: 'd98a860bbe61b9e09c06f164108c5d49612c9a3a', class: "radio-supporting" }, this.supporting))))));
|
|
17
17
|
}
|
|
18
18
|
static get is() { return "dda-radiobutton"; }
|
|
19
19
|
static get originalStyleUrls() {
|
|
@@ -40,10 +40,10 @@ export class DdaRangeSlider {
|
|
|
40
40
|
render() {
|
|
41
41
|
const leftId = this.left_input_id || `${this.fallbackId}-min`;
|
|
42
42
|
const rightId = this.right_input_id || `${this.fallbackId}-max`;
|
|
43
|
-
return (h(Host, { key: '
|
|
43
|
+
return (h(Host, { key: '183b4a9a57ed9c7c64158595d6d8ecc7985784a4' }, h("div", { key: '741df5d78729be31eb32701d3aa13b7fc6190682', class: `dda-range-slider-container dda-tooltip-${this.tooltip_position} ${this.custom_class} ${this.component_mode}` }, h("div", { key: '13d362fc01c2189edfce78dcc01ae6ae7a397c49', class: "dda-range-slider" }, h("div", { key: '1f5cc6b659e517107a035f15e79245eec9dbd09d', class: "dda-range-slider-track", style: {
|
|
44
44
|
left: `${this.getPercentage(this.min_value)}%`,
|
|
45
45
|
right: `${100 - this.getPercentage(this.max_value)}%`,
|
|
46
|
-
} }, h("span", { key: '
|
|
46
|
+
} }, h("span", { key: '79773cfafea77732a556d70819ea4ac8875c19fd', class: "min-label" }, this.min_value, "%"), h("span", { key: 'e5663666fce21bd4a2a59b811cd740577b890c35', class: "max-label" }, this.max_value, "%")), h("span", { key: 'b4ab6d47bb1e26e0ed4ba430eab6218f5168cefa' }, h("input", { key: '3eb384952b21acf20fefb49e8cc2fd2565c4fb9d', id: leftId, name: this.left_input_name, "aria-label": this.left_aria_label || 'Minimum', type: "range", min: this.min, max: this.max, step: this.step, value: this.min_value, onInput: (event) => this.handleMinChange(event), class: "dda-range-slider-input", style: { zIndex: `${this.min_value > this.max - this.min_value ? 5 : 3}` } })), h("span", { key: '8bfe1915e08e6ce035f74cf781ac9543736bd7e2' }, h("input", { key: '3abcde5b1d268d0d56f687caadfcf16340ae6c4f', id: rightId, name: this.right_input_name, "aria-label": this.right_aria_label || 'Maximum', type: "range", min: this.min, max: this.max, step: this.step, value: this.max_value, onInput: (event) => this.handleMaxChange(event), class: "dda-range-slider-input", style: { zIndex: `${this.max_value < this.max - this.min_value ? 5 : 3}` } }))))));
|
|
47
47
|
}
|
|
48
48
|
static get is() { return "dda-range-slider"; }
|
|
49
49
|
static get originalStyleUrls() {
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
dda-scroll-icon {
|
|
2
|
+
display: inline-flex;
|
|
3
|
+
}
|
|
4
|
+
.dda-scroll-icon-scroll {
|
|
5
|
+
border-style: solid;
|
|
6
|
+
border-radius: 20px;
|
|
7
|
+
box-sizing: border-box;
|
|
8
|
+
display: flex;
|
|
9
|
+
justify-content: center;
|
|
10
|
+
align-items: flex-start;
|
|
11
|
+
}
|
|
12
|
+
.scroll-icon-size-sm {
|
|
13
|
+
width: 16.5px;
|
|
14
|
+
height: 24px;
|
|
15
|
+
border-width: 2px;
|
|
16
|
+
}
|
|
17
|
+
.scroll-icon-size-lg {
|
|
18
|
+
width: 40px;
|
|
19
|
+
height: 60px;
|
|
20
|
+
border-width: 4px;
|
|
21
|
+
}
|
|
22
|
+
.scroll-icon-color-white {
|
|
23
|
+
border-color: #ffffff;
|
|
24
|
+
}
|
|
25
|
+
.scroll-icon-color-black {
|
|
26
|
+
border-color: #000000;
|
|
27
|
+
}
|
|
28
|
+
.dda-scroll-icon-scroll-dot {
|
|
29
|
+
border-radius: 50%;
|
|
30
|
+
}
|
|
31
|
+
.scroll-icon-color-white .dda-scroll-icon-scroll-dot {
|
|
32
|
+
background: #ffffff;
|
|
33
|
+
}
|
|
34
|
+
.scroll-icon-color-black .dda-scroll-icon-scroll-dot {
|
|
35
|
+
background: #000000;
|
|
36
|
+
}
|
|
37
|
+
.scroll-icon-size-sm .dda-scroll-icon-scroll-dot {
|
|
38
|
+
width: 4.5px;
|
|
39
|
+
height: 4.5px;
|
|
40
|
+
transform: translateY(2px);
|
|
41
|
+
}
|
|
42
|
+
.scroll-icon-size-lg .dda-scroll-icon-scroll-dot {
|
|
43
|
+
width: 12px;
|
|
44
|
+
height: 12px;
|
|
45
|
+
transform: translateY(5px);
|
|
46
|
+
}
|
|
47
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
48
|
+
.scroll-icon-size-sm .dda-scroll-icon-scroll-dot {
|
|
49
|
+
animation: dda-scroll-icon-sm var(--animation-duration, 1.8s) infinite;
|
|
50
|
+
}
|
|
51
|
+
.scroll-icon-size-lg .dda-scroll-icon-scroll-dot {
|
|
52
|
+
animation: dda-scroll-icon-lg var(--animation-duration, 1.5s) infinite;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
@keyframes dda-scroll-icon-sm {
|
|
56
|
+
0%,
|
|
57
|
+
100% {
|
|
58
|
+
transform: translateY(2px);
|
|
59
|
+
}
|
|
60
|
+
50% {
|
|
61
|
+
transform: translateY(10px);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
@keyframes dda-scroll-icon-lg {
|
|
65
|
+
0%,
|
|
66
|
+
100% {
|
|
67
|
+
transform: translateY(5px);
|
|
68
|
+
}
|
|
69
|
+
50% {
|
|
70
|
+
transform: translateY(24px);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
2
|
+
import { Host, h } from "@stencil/core";
|
|
3
|
+
// A decorative "scroll down" mouse icon. It carries no information, so it is hidden from
|
|
4
|
+
// assistive technology, and its dot moves only when the user has not asked for reduced motion.
|
|
5
|
+
export class DdaScrollIcon {
|
|
6
|
+
constructor() {
|
|
7
|
+
/** Size: `sm` (16.5 × 24px) or `lg` (40 × 60px). Default: `sm`. */
|
|
8
|
+
this.scroll_icon_size = 'sm';
|
|
9
|
+
/** Colour: `white` or `black`. Default: `white`. */
|
|
10
|
+
this.scroll_icon_color = 'white';
|
|
11
|
+
/** Extra CSS classes on the icon. */
|
|
12
|
+
this.custom_class = '';
|
|
13
|
+
}
|
|
14
|
+
render() {
|
|
15
|
+
const className = [
|
|
16
|
+
'dda-scroll-icon-scroll',
|
|
17
|
+
`scroll-icon-size-${this.scroll_icon_size || 'sm'}`,
|
|
18
|
+
`scroll-icon-color-${this.scroll_icon_color || 'white'}`,
|
|
19
|
+
this.custom_class,
|
|
20
|
+
this.component_mode,
|
|
21
|
+
]
|
|
22
|
+
.filter(Boolean)
|
|
23
|
+
.join(' ');
|
|
24
|
+
return (h(Host, { key: '7aa27a84683b21941cc9f843579736d85a5f3717', "aria-hidden": "true" }, h("div", { key: '59a540879bb9786d8088ca64ea0e0ca3ee8b82c2', class: className }, h("div", { key: 'f44dc05a49f86b9af2460de11381516fbe86127b', class: "dda-scroll-icon-scroll-dot" }))));
|
|
25
|
+
}
|
|
26
|
+
static get is() { return "dda-scroll-icon"; }
|
|
27
|
+
static get originalStyleUrls() {
|
|
28
|
+
return {
|
|
29
|
+
"$": ["dda-scroll-icon.css"]
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
static get styleUrls() {
|
|
33
|
+
return {
|
|
34
|
+
"$": ["dda-scroll-icon.css"]
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
static get properties() {
|
|
38
|
+
return {
|
|
39
|
+
"scroll_icon_size": {
|
|
40
|
+
"type": "string",
|
|
41
|
+
"mutable": false,
|
|
42
|
+
"complexType": {
|
|
43
|
+
"original": "'sm' | 'lg'",
|
|
44
|
+
"resolved": "\"lg\" | \"sm\"",
|
|
45
|
+
"references": {}
|
|
46
|
+
},
|
|
47
|
+
"required": false,
|
|
48
|
+
"optional": false,
|
|
49
|
+
"docs": {
|
|
50
|
+
"tags": [],
|
|
51
|
+
"text": "Size: `sm` (16.5 \u00D7 24px) or `lg` (40 \u00D7 60px). Default: `sm`."
|
|
52
|
+
},
|
|
53
|
+
"getter": false,
|
|
54
|
+
"setter": false,
|
|
55
|
+
"reflect": false,
|
|
56
|
+
"attribute": "scroll_icon_size",
|
|
57
|
+
"defaultValue": "'sm'"
|
|
58
|
+
},
|
|
59
|
+
"scroll_icon_color": {
|
|
60
|
+
"type": "string",
|
|
61
|
+
"mutable": false,
|
|
62
|
+
"complexType": {
|
|
63
|
+
"original": "'white' | 'black'",
|
|
64
|
+
"resolved": "\"black\" | \"white\"",
|
|
65
|
+
"references": {}
|
|
66
|
+
},
|
|
67
|
+
"required": false,
|
|
68
|
+
"optional": false,
|
|
69
|
+
"docs": {
|
|
70
|
+
"tags": [],
|
|
71
|
+
"text": "Colour: `white` or `black`. Default: `white`."
|
|
72
|
+
},
|
|
73
|
+
"getter": false,
|
|
74
|
+
"setter": false,
|
|
75
|
+
"reflect": false,
|
|
76
|
+
"attribute": "scroll_icon_color",
|
|
77
|
+
"defaultValue": "'white'"
|
|
78
|
+
},
|
|
79
|
+
"custom_class": {
|
|
80
|
+
"type": "string",
|
|
81
|
+
"mutable": false,
|
|
82
|
+
"complexType": {
|
|
83
|
+
"original": "string",
|
|
84
|
+
"resolved": "string",
|
|
85
|
+
"references": {}
|
|
86
|
+
},
|
|
87
|
+
"required": false,
|
|
88
|
+
"optional": false,
|
|
89
|
+
"docs": {
|
|
90
|
+
"tags": [],
|
|
91
|
+
"text": "Extra CSS classes on the icon."
|
|
92
|
+
},
|
|
93
|
+
"getter": false,
|
|
94
|
+
"setter": false,
|
|
95
|
+
"reflect": false,
|
|
96
|
+
"attribute": "custom_class",
|
|
97
|
+
"defaultValue": "''"
|
|
98
|
+
},
|
|
99
|
+
"component_mode": {
|
|
100
|
+
"type": "string",
|
|
101
|
+
"mutable": false,
|
|
102
|
+
"complexType": {
|
|
103
|
+
"original": "string",
|
|
104
|
+
"resolved": "string",
|
|
105
|
+
"references": {}
|
|
106
|
+
},
|
|
107
|
+
"required": false,
|
|
108
|
+
"optional": false,
|
|
109
|
+
"docs": {
|
|
110
|
+
"tags": [],
|
|
111
|
+
"text": "Theme override class, e.g. `light-mode`."
|
|
112
|
+
},
|
|
113
|
+
"getter": false,
|
|
114
|
+
"setter": false,
|
|
115
|
+
"reflect": false,
|
|
116
|
+
"attribute": "component_mode"
|
|
117
|
+
}
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
title: 'Components/Scroll Icon',
|
|
3
|
+
tags: ['autodocs'],
|
|
4
|
+
component: 'dda-scroll-icon',
|
|
5
|
+
argTypes: {
|
|
6
|
+
scroll_icon_size: { control: 'select', options: ['sm', 'lg'], description: 'Size of the icon' },
|
|
7
|
+
scroll_icon_color: { control: 'select', options: ['white', 'black'], description: 'Colour of the icon' },
|
|
8
|
+
},
|
|
9
|
+
};
|
|
10
|
+
const Template = args => `
|
|
11
|
+
<div style="padding: 24px; background: ${args.scroll_icon_color === 'white' ? '#1d211b' : '#ffffff'};">
|
|
12
|
+
<dda-scroll-icon scroll_icon_size="${args.scroll_icon_size}" scroll_icon_color="${args.scroll_icon_color}"></dda-scroll-icon>
|
|
13
|
+
</div>`;
|
|
14
|
+
export const Default = Template.bind({});
|
|
15
|
+
Default.args = { scroll_icon_size: 'sm', scroll_icon_color: 'white' };
|
|
16
|
+
export const LargeBlack = Template.bind({});
|
|
17
|
+
LargeBlack.args = { scroll_icon_size: 'lg', scroll_icon_color: 'black' };
|
|
@@ -46,7 +46,7 @@ export class DdaSearchInput {
|
|
|
46
46
|
}
|
|
47
47
|
render() {
|
|
48
48
|
const id = this.inputId;
|
|
49
|
-
return (h(Host, { key: '
|
|
49
|
+
return (h(Host, { key: '63dd0ce5b1ba526bc4f2b79cd4646f433bf7f5b1' }, h("div", { key: '4b19e3abcdd6e920b8146484f1e859c449eb6f56', class: `dda-input-container dda-input-size-${this.size} ${this.component_mode} ${this.custom_class} ${this.input_status ? `dda-input-${this.input_status}` : ''} ${this.has_error ? 'dda-validation-error' : ''}` }, this.label && h("label", { key: '54f45f95ae269e974064a01d9453934ef25f1f82', htmlFor: id, class: "dda-input-label" }, this.label), h("div", { key: '51b6460a3a04c80947ce2a9f68cbd472d2dac945', class: "dda-search-area dda-search-action" }, h("i", { key: '2d19436afd728672b1dee78a5888a66a9418e929', class: "material-icons icon-left", "aria-hidden": "true" }, "search"), h("input", { key: 'a28e11d99e628aeb122c857bad226bea62881a1f', name: this.search_input_name, "aria-label": this.aria_label, id: id, type: "text", class: "dda-input-field dda-search-field", placeholder: this.placeholder, "aria-describedby": this.describedBy, "aria-invalid": this.error_message ? 'true' : undefined }), h("div", { key: 'd0064ab0d27ad86ef26d048a604de6d93f290c60', class: "dda-search-btngroup" }, h("button", { key: 'a6e9f7288c8ff9123553e80f74e36467bc6f5b43', name: this.close_button_name, "aria-label": this.button_aria_label || this.clear_button_label, id: this.button_id, type: "button", class: "icon-close", onClick: () => this.clearInput() }, h("i", { key: '2676bd651dd8fffd3f6ebf76dc812bfb0272e003', class: "material-icons material-symbols-outlined", "aria-hidden": "true" }, "close")), this.show_button && (h("button", { key: '455e7da64da6df0b345ad44559a8a403b44d07f8', name: this.search_button_name, type: "button", class: "dda-btn btn-color-default-primary dda-btn-sm" }, "Search")))), this.helper_text && h("span", { key: 'fe5fbeb25377cf89d4d1fa3520d4c11fd44eb55c', id: this.helperId, class: "dda-helper-text" }, this.helper_text), this.error_message && h("span", { key: '8538814d841caf3e75b0f4edb33c5d53d442b792', id: this.errorId, class: "dda-error-message" }, this.error_message))));
|
|
50
50
|
}
|
|
51
51
|
static get is() { return "dda-search-input"; }
|
|
52
52
|
static get originalStyleUrls() {
|
|
@@ -15,6 +15,19 @@ export class Ddaselect {
|
|
|
15
15
|
// Fallback id so the label, list and messages are wired when no button_id
|
|
16
16
|
// is passed (otherwise ids became "undefined-listbox" and the label had for="").
|
|
17
17
|
this.fallbackId = uniqueId('dda-select');
|
|
18
|
+
this.onTriggerBlur = (event) => {
|
|
19
|
+
var _a;
|
|
20
|
+
// A keyboard ArrowDown/Up on the trigger opens the list and moves focus into it — that is
|
|
21
|
+
// not the user leaving the field, so skip the event when focus lands back inside this.el.
|
|
22
|
+
const related = event.relatedTarget;
|
|
23
|
+
if (related && this.el.contains(related)) {
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
this.selectBlurred.emit({
|
|
27
|
+
name: this.input_name || this.button_id || this.triggerId,
|
|
28
|
+
value: ((_a = this.selectedOption) === null || _a === void 0 ? void 0 : _a.text) || '',
|
|
29
|
+
});
|
|
30
|
+
};
|
|
18
31
|
this.onTriggerKeyDown = (event) => {
|
|
19
32
|
if (this.disabled) {
|
|
20
33
|
return;
|
|
@@ -98,12 +111,51 @@ export class Ddaselect {
|
|
|
98
111
|
return ids.length ? ids.join(' ') : undefined;
|
|
99
112
|
}
|
|
100
113
|
get parsedOptions() {
|
|
101
|
-
|
|
102
|
-
|
|
114
|
+
let raw = this.options;
|
|
115
|
+
if (typeof raw === 'string') {
|
|
116
|
+
try {
|
|
117
|
+
raw = JSON.parse(raw);
|
|
118
|
+
}
|
|
119
|
+
catch (_a) {
|
|
120
|
+
return [];
|
|
121
|
+
}
|
|
103
122
|
}
|
|
104
|
-
|
|
123
|
+
if (!Array.isArray(raw))
|
|
105
124
|
return [];
|
|
106
|
-
|
|
125
|
+
return raw
|
|
126
|
+
.map((entry) => {
|
|
127
|
+
var _a;
|
|
128
|
+
if (typeof entry === 'string')
|
|
129
|
+
return { id: entry, text: entry };
|
|
130
|
+
if (entry && typeof entry === 'object' && typeof entry.text === 'string') {
|
|
131
|
+
const option = entry;
|
|
132
|
+
// Keep the original entry as `source` so selectChanged can emit it with any extra
|
|
133
|
+
// fields (e.g. `code`) the page passed in, as 3.x did.
|
|
134
|
+
return { id: (_a = option.id) !== null && _a !== void 0 ? _a : option.text, text: option.text, source: option };
|
|
135
|
+
}
|
|
136
|
+
return null;
|
|
137
|
+
})
|
|
138
|
+
.filter((option) => option !== null);
|
|
139
|
+
}
|
|
140
|
+
// 3.x matched `selected` against the id (as a string) or the text. An id match wins over a
|
|
141
|
+
// text match, so two options with the same text but different ids stay apart.
|
|
142
|
+
findSelected(options) {
|
|
143
|
+
var _a;
|
|
144
|
+
if (this.selected === undefined || this.selected === null)
|
|
145
|
+
return undefined;
|
|
146
|
+
const value = String(this.selected);
|
|
147
|
+
return (_a = options.find(option => String(option.id) === value)) !== null && _a !== void 0 ? _a : options.find(option => option.text === value);
|
|
148
|
+
}
|
|
149
|
+
get selectedOption() {
|
|
150
|
+
return this.findSelected(this.parsedOptions);
|
|
151
|
+
}
|
|
152
|
+
get triggerLabel() {
|
|
153
|
+
if (this.aria_label)
|
|
154
|
+
return this.aria_label;
|
|
155
|
+
// main_aria_label sets aria-label, which replaces aria-labelledby. Only use it when there is
|
|
156
|
+
// no label to keep aria-labelledby for; otherwise the label and the selected value would stop
|
|
157
|
+
// being announced.
|
|
158
|
+
return this.label ? undefined : this.main_aria_label || undefined;
|
|
107
159
|
}
|
|
108
160
|
focusOption(index) {
|
|
109
161
|
const options = Array.from(this.el.querySelectorAll('.dda-input-dropdown-item[role="option"]'));
|
|
@@ -119,8 +171,9 @@ export class Ddaselect {
|
|
|
119
171
|
}
|
|
120
172
|
initialOptionIndex() {
|
|
121
173
|
const options = this.parsedOptions;
|
|
122
|
-
const
|
|
123
|
-
|
|
174
|
+
const selected = this.findSelected(options);
|
|
175
|
+
const index = selected ? options.indexOf(selected) : -1;
|
|
176
|
+
return index >= 0 ? index : 0;
|
|
124
177
|
}
|
|
125
178
|
toggleSelect() {
|
|
126
179
|
if (!this.disabled) {
|
|
@@ -149,12 +202,19 @@ export class Ddaselect {
|
|
|
149
202
|
this.toggleSelect();
|
|
150
203
|
}
|
|
151
204
|
selectOption(option) {
|
|
205
|
+
var _a;
|
|
152
206
|
if (!this.disabled) {
|
|
153
|
-
const
|
|
154
|
-
|
|
207
|
+
const value = String(option.id);
|
|
208
|
+
// Compare against the currently *matched* option's id, not the raw `selected` prop: when
|
|
209
|
+
// `selected` holds text or a differently-typed id (e.g. a number), comparing it to
|
|
210
|
+
// `value` directly reported a change that had not happened.
|
|
211
|
+
const currentSelected = this.findSelected(this.parsedOptions);
|
|
212
|
+
const changed = String(currentSelected === null || currentSelected === void 0 ? void 0 : currentSelected.id) !== value;
|
|
213
|
+
this.selected = value;
|
|
155
214
|
this.closeAndReturnFocus();
|
|
215
|
+
this.selectChanged.emit((_a = option.source) !== null && _a !== void 0 ? _a : { id: option.id, text: option.text });
|
|
156
216
|
if (changed) {
|
|
157
|
-
this.selectionChange.emit({ value: option });
|
|
217
|
+
this.selectionChange.emit({ value, id: option.id, text: option.text });
|
|
158
218
|
}
|
|
159
219
|
}
|
|
160
220
|
}
|
|
@@ -166,8 +226,17 @@ export class Ddaselect {
|
|
|
166
226
|
}
|
|
167
227
|
}
|
|
168
228
|
render() {
|
|
229
|
+
var _a;
|
|
169
230
|
const id = this.triggerId;
|
|
170
|
-
|
|
231
|
+
const options = this.parsedOptions;
|
|
232
|
+
const current = this.findSelected(options);
|
|
233
|
+
// Computed once here (not per option below) to keep the list render O(n) instead of O(n^2).
|
|
234
|
+
const activeIndex = current ? options.indexOf(current) : 0;
|
|
235
|
+
const validation = this.error || this.validation_type;
|
|
236
|
+
return (h(Host, { key: '79b4f368bdab0911dde6303d33ab79c8ea093399' }, h("div", { key: '8f9d7984043832d14d72ed6770b5ea384b3e4015', class: `dda-input-container ${this.custom_class} ${this.component_mode} ${this.disabled ? 'dda-input-disabled' : ''} ${this.is_open ? 'show' : 'hide'} dda-input-size-${this.size} dda-validation-${validation} ` }, this.label && h("label", { key: 'c3e73bc801980fe409dde6078b5763edbc249292', id: this.labelId, class: "dda-input-label" }, this.label), h("div", { key: '2572ef664b2aafcefd62c7361337d2aa9a649438', class: "dda-dropdown-container" }, h("button", { key: 'cda07037871e133d06a54c4da37abee49db11f59', name: this.toggle_button_name, "aria-label": this.triggerLabel, "aria-labelledby": this.label && !this.triggerLabel ? `${this.labelId} ${id}` : undefined, id: id, type: "button", class: "dda-input-field dda-select-header", "aria-haspopup": "listbox", "aria-expanded": this.is_open ? 'true' : 'false', "aria-controls": this.is_open ? this.listboxId : undefined, "aria-describedby": this.describedBy, "aria-invalid": this.error_message ? 'true' : undefined, onClick: () => { this.toggleSelect(); }, onKeyDown: this.onTriggerKeyDown, onBlur: this.onTriggerBlur }, current ? current.text : ((_a = this.placeholder) !== null && _a !== void 0 ? _a : 'Select an option'), h("i", { key: '3d8f579d35ad0516e78530b548d61858d0721831', class: `material-icons`, "aria-hidden": "true" }, this.is_open ? 'keyboard_arrow_up' : 'keyboard_arrow_down')), this.is_open && (h("div", { key: '66eb4b2edd1f716a95be787e4cfd9185936bc62f', id: this.listboxId, role: "listbox", "aria-label": this.triggerLabel || this.label, class: "dda-input-dropdown-list dda-select-list" }, options.length > 0 ? (options.map((option, index) => {
|
|
237
|
+
const isCurrent = current !== undefined && String(current.id) === String(option.id);
|
|
238
|
+
return (h("button", { name: this.option_select_button_name, type: "button", role: "option", "aria-selected": isCurrent ? 'true' : 'false', tabIndex: index === activeIndex ? 0 : -1, class: `dda-input-dropdown-item ${isCurrent ? 'selected' : ''}`, onClick: () => this.selectOption(option), onKeyDown: (event) => this.onOptionKeyDown(event, option), key: `${index}-${option.id}` }, option.text));
|
|
239
|
+
})) : (h("div", { class: "dda-input-dropdown-item" }, "No options available"))))), this.helper_text && h("span", { key: '31d9c4afb879454e109e7d6fb406b5467ef5c495', id: this.helperId, class: "dda-helper-text" }, this.helper_text), this.error_message && h("span", { key: '2b6ab09e5477120046fbacf530c514c8421a4aaa', id: this.errorId, class: "dda-error-message" }, this.error_message))));
|
|
171
240
|
}
|
|
172
241
|
static get is() { return "dda-select"; }
|
|
173
242
|
static get originalStyleUrls() {
|
|
@@ -205,15 +274,25 @@ export class Ddaselect {
|
|
|
205
274
|
"type": "string",
|
|
206
275
|
"mutable": false,
|
|
207
276
|
"complexType": {
|
|
208
|
-
"original": "string",
|
|
209
|
-
"resolved": "string",
|
|
210
|
-
"references": {
|
|
277
|
+
"original": "string | Array<string | SelectOption>",
|
|
278
|
+
"resolved": "(string | SelectOption)[] | string",
|
|
279
|
+
"references": {
|
|
280
|
+
"Array": {
|
|
281
|
+
"location": "global",
|
|
282
|
+
"id": "global::Array"
|
|
283
|
+
},
|
|
284
|
+
"SelectOption": {
|
|
285
|
+
"location": "local",
|
|
286
|
+
"path": "/root/Coding/dubai-design-system/packages/stencil/src/components/dda-select/dda-select.tsx",
|
|
287
|
+
"id": "src/components/dda-select/dda-select.tsx::SelectOption"
|
|
288
|
+
}
|
|
289
|
+
}
|
|
211
290
|
},
|
|
212
291
|
"required": false,
|
|
213
292
|
"optional": false,
|
|
214
293
|
"docs": {
|
|
215
294
|
"tags": [],
|
|
216
|
-
"text": "Options
|
|
295
|
+
"text": "Options: a JSON array, or an array property, of strings (`[\"Dubai\",\"Sharjah\"]`) or 3.x `{ id, text }` objects (`[{\"id\":1,\"text\":\"Dubai\"}]`). Other entries are ignored. Invalid JSON shows \"No options available\"."
|
|
217
296
|
},
|
|
218
297
|
"getter": false,
|
|
219
298
|
"setter": false,
|
|
@@ -232,7 +311,7 @@ export class Ddaselect {
|
|
|
232
311
|
"optional": false,
|
|
233
312
|
"docs": {
|
|
234
313
|
"tags": [],
|
|
235
|
-
"text": "The selected option
|
|
314
|
+
"text": "The selected option: its id, or its text. For string options the id is the text. Updated to the picked option's id (as a string) when the user picks one. Mutable: the component assigns it."
|
|
236
315
|
},
|
|
237
316
|
"getter": false,
|
|
238
317
|
"setter": false,
|
|
@@ -449,6 +528,82 @@ export class Ddaselect {
|
|
|
449
528
|
"setter": false,
|
|
450
529
|
"reflect": false,
|
|
451
530
|
"attribute": "option_select_button_name"
|
|
531
|
+
},
|
|
532
|
+
"placeholder": {
|
|
533
|
+
"type": "string",
|
|
534
|
+
"mutable": false,
|
|
535
|
+
"complexType": {
|
|
536
|
+
"original": "string",
|
|
537
|
+
"resolved": "string",
|
|
538
|
+
"references": {}
|
|
539
|
+
},
|
|
540
|
+
"required": false,
|
|
541
|
+
"optional": false,
|
|
542
|
+
"docs": {
|
|
543
|
+
"tags": [],
|
|
544
|
+
"text": "Text in the trigger when nothing is selected. Default: `Select an option`."
|
|
545
|
+
},
|
|
546
|
+
"getter": false,
|
|
547
|
+
"setter": false,
|
|
548
|
+
"reflect": false,
|
|
549
|
+
"attribute": "placeholder"
|
|
550
|
+
},
|
|
551
|
+
"input_name": {
|
|
552
|
+
"type": "string",
|
|
553
|
+
"mutable": false,
|
|
554
|
+
"complexType": {
|
|
555
|
+
"original": "string",
|
|
556
|
+
"resolved": "string",
|
|
557
|
+
"references": {}
|
|
558
|
+
},
|
|
559
|
+
"required": false,
|
|
560
|
+
"optional": false,
|
|
561
|
+
"docs": {
|
|
562
|
+
"tags": [],
|
|
563
|
+
"text": "`name` sent in `selectBlurred`. Falls back to `button_id`."
|
|
564
|
+
},
|
|
565
|
+
"getter": false,
|
|
566
|
+
"setter": false,
|
|
567
|
+
"reflect": false,
|
|
568
|
+
"attribute": "input_name"
|
|
569
|
+
},
|
|
570
|
+
"main_aria_label": {
|
|
571
|
+
"type": "string",
|
|
572
|
+
"mutable": false,
|
|
573
|
+
"complexType": {
|
|
574
|
+
"original": "string",
|
|
575
|
+
"resolved": "string",
|
|
576
|
+
"references": {}
|
|
577
|
+
},
|
|
578
|
+
"required": false,
|
|
579
|
+
"optional": false,
|
|
580
|
+
"docs": {
|
|
581
|
+
"tags": [],
|
|
582
|
+
"text": "3.x name of `aria_label`, used as the trigger's aria-label only when `label` is not set. `aria_label` wins when both are set; when `label` is set, `main_aria_label` is ignored and the trigger keeps its `aria-labelledby`."
|
|
583
|
+
},
|
|
584
|
+
"getter": false,
|
|
585
|
+
"setter": false,
|
|
586
|
+
"reflect": false,
|
|
587
|
+
"attribute": "main_aria_label"
|
|
588
|
+
},
|
|
589
|
+
"validation_type": {
|
|
590
|
+
"type": "string",
|
|
591
|
+
"mutable": false,
|
|
592
|
+
"complexType": {
|
|
593
|
+
"original": "string",
|
|
594
|
+
"resolved": "string",
|
|
595
|
+
"references": {}
|
|
596
|
+
},
|
|
597
|
+
"required": false,
|
|
598
|
+
"optional": false,
|
|
599
|
+
"docs": {
|
|
600
|
+
"tags": [],
|
|
601
|
+
"text": "3.x name of `error` (the validation state class). `error` wins when both are set."
|
|
602
|
+
},
|
|
603
|
+
"getter": false,
|
|
604
|
+
"setter": false,
|
|
605
|
+
"reflect": false,
|
|
606
|
+
"attribute": "validation_type"
|
|
452
607
|
}
|
|
453
608
|
};
|
|
454
609
|
}
|
|
@@ -466,11 +621,47 @@ export class Ddaselect {
|
|
|
466
621
|
"composed": true,
|
|
467
622
|
"docs": {
|
|
468
623
|
"tags": [],
|
|
469
|
-
"text": "Emitted when the user picks an option other than the selected one, by mouse or keyboard. `detail.value` is the new option."
|
|
624
|
+
"text": "Emitted when the user picks an option other than the selected one, by mouse or keyboard. `detail.value` is the new `selected` value (the option id as a string); `detail.id` and `detail.text` are the option."
|
|
625
|
+
},
|
|
626
|
+
"complexType": {
|
|
627
|
+
"original": "{ value: string; id: string | number; text: string }",
|
|
628
|
+
"resolved": "{ value: string; id: string | number; text: string; }",
|
|
629
|
+
"references": {}
|
|
630
|
+
}
|
|
631
|
+
}, {
|
|
632
|
+
"method": "selectChanged",
|
|
633
|
+
"name": "selectChanged",
|
|
634
|
+
"bubbles": true,
|
|
635
|
+
"cancelable": true,
|
|
636
|
+
"composed": true,
|
|
637
|
+
"docs": {
|
|
638
|
+
"tags": [],
|
|
639
|
+
"text": "3.x event: emitted each time the user picks one, even if it is already selected. For a string\noption this is `{ id, text }`; for an object option this is the original option object, extra\nfields included, as 3.x did."
|
|
640
|
+
},
|
|
641
|
+
"complexType": {
|
|
642
|
+
"original": "SelectOption",
|
|
643
|
+
"resolved": "SelectOption",
|
|
644
|
+
"references": {
|
|
645
|
+
"SelectOption": {
|
|
646
|
+
"location": "local",
|
|
647
|
+
"path": "/root/Coding/dubai-design-system/packages/stencil/src/components/dda-select/dda-select.tsx",
|
|
648
|
+
"id": "src/components/dda-select/dda-select.tsx::SelectOption"
|
|
649
|
+
}
|
|
650
|
+
}
|
|
651
|
+
}
|
|
652
|
+
}, {
|
|
653
|
+
"method": "selectBlurred",
|
|
654
|
+
"name": "selectBlurred",
|
|
655
|
+
"bubbles": true,
|
|
656
|
+
"cancelable": true,
|
|
657
|
+
"composed": true,
|
|
658
|
+
"docs": {
|
|
659
|
+
"tags": [],
|
|
660
|
+
"text": "3.x event: emitted when the trigger loses focus, with `{ name, value }` \u2014 `input_name` (or `button_id`) and the selected text."
|
|
470
661
|
},
|
|
471
662
|
"complexType": {
|
|
472
|
-
"original": "{ value: string }",
|
|
473
|
-
"resolved": "{ value: string; }",
|
|
663
|
+
"original": "{ name: string; value: string }",
|
|
664
|
+
"resolved": "{ name: string; value: string; }",
|
|
474
665
|
"references": {}
|
|
475
666
|
}
|
|
476
667
|
}];
|