dap-design-system 0.62.0 → 0.62.2
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/dist/components/combobox/comboboxBase.d.ts +6 -0
- package/dist/components/combobox/comboboxBase.js +79 -61
- package/dist/components/combobox/comboboxBase.js.map +1 -1
- package/dist/components/command/command-item.scss.js +1 -1
- package/dist/components/command/command.component.js +12 -12
- package/dist/components/command/command.component.js.map +1 -1
- package/dist/components/datatable/datatable.component.d.ts +2 -0
- package/dist/components/datatable/datatable.component.js +131 -112
- package/dist/components/datatable/datatable.component.js.map +1 -1
- package/dist/components/datatable/datatable.scss.js +1 -1
- package/dist/components/icon-button/icon-button.component.js +15 -12
- package/dist/components/icon-button/icon-button.component.js.map +1 -1
- package/dist/components/input/input-base-element.js +42 -38
- package/dist/components/input/input-base-element.js.map +1 -1
- package/dist/components/input/input.component.d.ts +1 -0
- package/dist/components/input/input.component.js.map +1 -1
- package/dist/components/option-list/option-list.component.js +16 -12
- package/dist/components/option-list/option-list.component.js.map +1 -1
- package/dist/components/select/select.component.js +71 -66
- package/dist/components/select/select.component.js.map +1 -1
- package/dist/components/snackbar/snackbar-message.component.js +16 -18
- package/dist/components/snackbar/snackbar-message.component.js.map +1 -1
- package/dist/components/snackbar/snackbar.component.js +48 -35
- package/dist/components/snackbar/snackbar.component.js.map +1 -1
- package/dist/components/table/table.component.d.ts +3 -0
- package/dist/components/table/table.component.js +30 -27
- package/dist/components/table/table.component.js.map +1 -1
- package/dist/components/textarea/textarea.component.d.ts +6 -1
- package/dist/components/textarea/textarea.component.js +43 -36
- package/dist/components/textarea/textarea.component.js.map +1 -1
- package/dist/components/tooltip/tooltip.component.d.ts +2 -0
- package/dist/components/tooltip/tooltip.component.js +51 -53
- package/dist/components/tooltip/tooltip.component.js.map +1 -1
- package/dist/internal/mixin/labelableMixin.d.ts +3 -0
- package/dist/internal/mixin/labelableMixin.js +15 -12
- package/dist/internal/mixin/labelableMixin.js.map +1 -1
- package/dist/manifest/types/vue/index.d.ts +87 -84
- package/dist/manifest/vscode.html-custom-data.json +64 -60
- package/dist/manifest/web-types.json +83 -73
- package/dist/react/dap-ds-input/index.d.ts +1 -0
- package/dist/react/dap-ds-input/index.js.map +1 -1
- package/dist/react/index.d.ts +4 -4
- package/dist/react-types.ts +4 -4
- package/dist/react.js +22 -22
- package/package.json +1 -1
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
var f = (u, e, t) => new Promise((
|
|
1
|
+
var f = (u, e, t) => new Promise((s, l) => {
|
|
2
2
|
var p = (r) => {
|
|
3
3
|
try {
|
|
4
4
|
b(t.next(r));
|
|
5
5
|
} catch (y) {
|
|
6
|
-
|
|
6
|
+
l(y);
|
|
7
7
|
}
|
|
8
8
|
}, m = (r) => {
|
|
9
9
|
try {
|
|
10
10
|
b(t.throw(r));
|
|
11
11
|
} catch (y) {
|
|
12
|
-
|
|
12
|
+
l(y);
|
|
13
13
|
}
|
|
14
|
-
}, b = (r) => r.done ?
|
|
14
|
+
}, b = (r) => r.done ? s(r.value) : Promise.resolve(r.value).then(p, m);
|
|
15
15
|
b((t = t.apply(u, e)).next());
|
|
16
16
|
});
|
|
17
17
|
import { clsx as h } from "../../node_modules/clsx/dist/clsx.js";
|
|
@@ -21,7 +21,7 @@ import "../../node_modules/lit-element/lit-element.js";
|
|
|
21
21
|
import { property as d } from "../../node_modules/@lit/reactive-element/decorators/property.js";
|
|
22
22
|
import { state as $ } from "../../node_modules/@lit/reactive-element/decorators/state.js";
|
|
23
23
|
import { query as v } from "../../node_modules/@lit/reactive-element/decorators/query.js";
|
|
24
|
-
import { ifDefined as
|
|
24
|
+
import { ifDefined as o } from "../../node_modules/lit-html/directives/if-defined.js";
|
|
25
25
|
import { html as i } from "../../node_modules/lit-html/static.js";
|
|
26
26
|
import { getValidityStateObject as D } from "../../common/utils.js";
|
|
27
27
|
import { GenericFormElement as w } from "../../internal/mixin/genericFormElement.js";
|
|
@@ -35,15 +35,15 @@ import I from "../icons/system/system-loading-spinner/system-loading-spinner.com
|
|
|
35
35
|
import x from "../option-list/option-list.component.js";
|
|
36
36
|
import V from "../popup/popup.component.js";
|
|
37
37
|
import O from "../tooltip/tooltip.component.js";
|
|
38
|
-
import
|
|
39
|
-
import
|
|
38
|
+
import T from "../tray/tray.component.js";
|
|
39
|
+
import B from "../typography/typography.component.js";
|
|
40
40
|
import q from "./select.scss.js";
|
|
41
41
|
import g, { t as N } from "../../node_modules/i18next/dist/esm/i18next.js";
|
|
42
42
|
import { unsafeCSS as z } from "../../node_modules/@lit/reactive-element/css-tag.js";
|
|
43
|
-
var M = Object.defineProperty,
|
|
44
|
-
for (var
|
|
45
|
-
(m = u[p]) && (
|
|
46
|
-
return
|
|
43
|
+
var M = Object.defineProperty, n = (u, e, t, s) => {
|
|
44
|
+
for (var l = void 0, p = u.length - 1, m; p >= 0; p--)
|
|
45
|
+
(m = u[p]) && (l = m(e, t, l) || l);
|
|
46
|
+
return l && M(e, t, l), l;
|
|
47
47
|
};
|
|
48
48
|
const c = class c extends w {
|
|
49
49
|
constructor() {
|
|
@@ -62,7 +62,12 @@ const c = class c extends w {
|
|
|
62
62
|
this.emit("dds-keydown", e), this.showDropDown(e.key);
|
|
63
63
|
}
|
|
64
64
|
}), this.handleListKeyDown = (e) => {
|
|
65
|
-
|
|
65
|
+
var t, s;
|
|
66
|
+
if (((t = e.detail) == null ? void 0 : t.key) === "Tab") {
|
|
67
|
+
this.hideDropDown({ skipFocus: !0 }), this.focus();
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
((s = e.detail) == null ? void 0 : s.key) === "Escape" && this.hideDropDown();
|
|
66
71
|
}, this.handleDocumentMouseDown = (e) => {
|
|
67
72
|
const t = e.composedPath();
|
|
68
73
|
this && !t.includes(this) && this.hideDropDown();
|
|
@@ -73,15 +78,15 @@ const c = class c extends w {
|
|
|
73
78
|
}, this.handleBlur = () => {
|
|
74
79
|
this.emit("dds-blur");
|
|
75
80
|
}, this.handleSelectedChange = (e) => {
|
|
76
|
-
const t = Object.keys(e.detail).length ? e.detail : null,
|
|
77
|
-
this.selectedItem = t, this.hideDropDown(), this.value =
|
|
81
|
+
const t = Object.keys(e.detail).length ? e.detail : null, s = t == null ? void 0 : t.value, l = s !== this.value;
|
|
82
|
+
this.selectedItem = t, this.hideDropDown(), this.value = s, l && this.emit("dds-change", this.selectedItem), this.setValidity();
|
|
78
83
|
}, this.handleOptionDeselect = () => {
|
|
79
84
|
this.selectedItem = null, this.value = void 0, this.emit("dds-change", null), this.setValidity();
|
|
80
85
|
}, this.handleNativeChange = (e) => {
|
|
81
|
-
const
|
|
82
|
-
`dap-ds-option-item[value="${
|
|
86
|
+
const s = e.target.value, l = this.querySelector(
|
|
87
|
+
`dap-ds-option-item[value="${s}"]`
|
|
83
88
|
);
|
|
84
|
-
this.value =
|
|
89
|
+
this.value = s, this.selectedItem = l ? { value: s, text: l.optionText } : { value: s, text: s }, this.emit("dds-change", this.selectedItem), this.setValidity();
|
|
85
90
|
};
|
|
86
91
|
}
|
|
87
92
|
connectedCallback() {
|
|
@@ -186,7 +191,7 @@ const c = class c extends w {
|
|
|
186
191
|
);
|
|
187
192
|
return i`
|
|
188
193
|
<optgroup label=${e.label || ""} ?disabled=${e.disabled}>
|
|
189
|
-
${t.map((
|
|
194
|
+
${t.map((s) => this.renderNativeOption(s))}
|
|
190
195
|
</optgroup>
|
|
191
196
|
`;
|
|
192
197
|
}
|
|
@@ -205,8 +210,8 @@ const c = class c extends w {
|
|
|
205
210
|
"select--loading": this.loading
|
|
206
211
|
})}"
|
|
207
212
|
part="trigger"
|
|
208
|
-
aria-labelledby=${
|
|
209
|
-
aria-describedby=${
|
|
213
|
+
aria-labelledby=${o(this.label ? "label" : void 0)}
|
|
214
|
+
aria-describedby=${o(this.getAriaDescribedBy())}
|
|
210
215
|
?disabled=${this.disabled}
|
|
211
216
|
?required=${this.required}
|
|
212
217
|
@change=${this.handleNativeChange}
|
|
@@ -242,17 +247,17 @@ const c = class c extends w {
|
|
|
242
247
|
"select--optional": this.optional
|
|
243
248
|
})}"
|
|
244
249
|
aria-expanded=${this.readonly || this.disabled ? "false" : this.opened ? "true" : "false"}
|
|
245
|
-
aria-haspopup=${
|
|
250
|
+
aria-haspopup=${o(
|
|
246
251
|
this.readonly || this.disabled ? void 0 : "listbox"
|
|
247
252
|
)}
|
|
248
|
-
aria-labelledby=${
|
|
249
|
-
aria-label=${
|
|
253
|
+
aria-labelledby=${o(this.label ? "label" : void 0)}
|
|
254
|
+
aria-label=${o(
|
|
250
255
|
this.label ? void 0 : this.ariaLabel || this.selectedDisplayText || this.placeholder || void 0
|
|
251
256
|
)}
|
|
252
|
-
aria-describedby=${
|
|
257
|
+
aria-describedby=${o(this.getAriaDescribedBy())}
|
|
253
258
|
aria-disabled=${this.disabled}
|
|
254
259
|
aria-controls="option-list"
|
|
255
|
-
aria-activedescendant=${
|
|
260
|
+
aria-activedescendant=${o((e = this.getActiveDescendant()) == null ? void 0 : e.id)}
|
|
256
261
|
?required=${this.required}
|
|
257
262
|
?readonly=${this.readonly}
|
|
258
263
|
?autofocus=${this.autofocus}
|
|
@@ -281,9 +286,9 @@ const c = class c extends w {
|
|
|
281
286
|
part="option-list"
|
|
282
287
|
exportparts="option-item, option-item-base, option-item-label, option-item-prefix, option-item-suffix"
|
|
283
288
|
id="option-list"
|
|
284
|
-
aria-labelledby=${
|
|
289
|
+
aria-labelledby=${o(this.label ? "label" : void 0)}
|
|
285
290
|
searchMode="typehead"
|
|
286
|
-
size=${
|
|
291
|
+
size=${o(this.effectiveSize)}
|
|
287
292
|
value=${this.value}
|
|
288
293
|
disableDelaySet
|
|
289
294
|
@dds-option-change=${this.handleSelectedChange}
|
|
@@ -308,7 +313,7 @@ const c = class c extends w {
|
|
|
308
313
|
.noMargin=${!!this.description}
|
|
309
314
|
for="input"
|
|
310
315
|
.hideLabel=${this.hideLabel}
|
|
311
|
-
label=${
|
|
316
|
+
label=${o(this.label)}>
|
|
312
317
|
</dap-ds-form-label>`}
|
|
313
318
|
${this.tooltip && i` <dap-ds-tooltip
|
|
314
319
|
part="tooltip"
|
|
@@ -333,7 +338,7 @@ const c = class c extends w {
|
|
|
333
338
|
part="description"
|
|
334
339
|
variant="description"
|
|
335
340
|
class=${h("input-description")}
|
|
336
|
-
size=${
|
|
341
|
+
size=${o(this.effectiveSize)}
|
|
337
342
|
id="description">
|
|
338
343
|
${this.description}
|
|
339
344
|
</dap-ds-typography>
|
|
@@ -350,7 +355,7 @@ const c = class c extends w {
|
|
|
350
355
|
>${this.renderOptionList()}</dap-ds-tray
|
|
351
356
|
>
|
|
352
357
|
` : i`<dap-ds-popup
|
|
353
|
-
floatingStrategy=${
|
|
358
|
+
floatingStrategy=${o(this.floatingStrategy)}
|
|
354
359
|
part="base"
|
|
355
360
|
exportparts="popup:popup-base"
|
|
356
361
|
class="select-popup"
|
|
@@ -358,17 +363,17 @@ const c = class c extends w {
|
|
|
358
363
|
?hasArrow=${!1}
|
|
359
364
|
overflow
|
|
360
365
|
placement=${this.placement}
|
|
361
|
-
maxHeight=${
|
|
366
|
+
maxHeight=${o(this.maxHeight)}
|
|
362
367
|
?sync=${this.sync}
|
|
363
368
|
?disableViewportAutoClose=${this.disableViewportAutoClose}
|
|
364
369
|
@dds-close=${this.handlePopupAutoClose}
|
|
365
|
-
size=${
|
|
370
|
+
size=${o(this.effectiveSize)}>
|
|
366
371
|
${this.renderTriggerElement()} ${this.renderOptionList()}
|
|
367
372
|
</dap-ds-popup>`}
|
|
368
373
|
${this.feedback && i`<dap-ds-feedback
|
|
369
374
|
part="feedback"
|
|
370
|
-
feedbackType=${
|
|
371
|
-
feedbackSize="${
|
|
375
|
+
feedbackType=${o(this.feedbackType)}
|
|
376
|
+
feedbackSize="${o(this.effectiveSize)}"
|
|
372
377
|
id="feedback"
|
|
373
378
|
.subtle=${this.subtle}>
|
|
374
379
|
${this.feedback}
|
|
@@ -384,55 +389,55 @@ c.tagName = "dap-ds-select", c.dependencies = {
|
|
|
384
389
|
"dap-ds-tooltip": O,
|
|
385
390
|
"dap-ds-icon-button": L,
|
|
386
391
|
"dap-ds-icon": A,
|
|
387
|
-
"dap-ds-typography":
|
|
392
|
+
"dap-ds-typography": B,
|
|
388
393
|
"dap-ds-popup": V,
|
|
389
|
-
"dap-ds-tray":
|
|
394
|
+
"dap-ds-tray": T,
|
|
390
395
|
"dap-ds-feedback": k
|
|
391
396
|
}, c.styles = z(q);
|
|
392
|
-
let
|
|
393
|
-
|
|
397
|
+
let a = c;
|
|
398
|
+
n([
|
|
394
399
|
v("button")
|
|
395
|
-
],
|
|
396
|
-
|
|
400
|
+
], a.prototype, "triggerButton");
|
|
401
|
+
n([
|
|
397
402
|
v("dap-ds-option-list")
|
|
398
|
-
],
|
|
399
|
-
|
|
403
|
+
], a.prototype, "optionList");
|
|
404
|
+
n([
|
|
400
405
|
d({ reflect: !0 })
|
|
401
|
-
],
|
|
402
|
-
|
|
406
|
+
], a.prototype, "placement");
|
|
407
|
+
n([
|
|
403
408
|
d({ type: Boolean, reflect: !0 })
|
|
404
|
-
],
|
|
405
|
-
|
|
409
|
+
], a.prototype, "opened");
|
|
410
|
+
n([
|
|
406
411
|
d()
|
|
407
|
-
],
|
|
408
|
-
|
|
412
|
+
], a.prototype, "placeholder");
|
|
413
|
+
n([
|
|
409
414
|
d({ type: Boolean })
|
|
410
|
-
],
|
|
411
|
-
|
|
415
|
+
], a.prototype, "sync");
|
|
416
|
+
n([
|
|
412
417
|
d({ type: Boolean })
|
|
413
|
-
],
|
|
414
|
-
|
|
418
|
+
], a.prototype, "isMobile");
|
|
419
|
+
n([
|
|
415
420
|
d({ type: Boolean })
|
|
416
|
-
],
|
|
417
|
-
|
|
421
|
+
], a.prototype, "native");
|
|
422
|
+
n([
|
|
418
423
|
d({ type: Boolean })
|
|
419
|
-
],
|
|
420
|
-
|
|
424
|
+
], a.prototype, "loading");
|
|
425
|
+
n([
|
|
421
426
|
d({ type: Number })
|
|
422
|
-
],
|
|
423
|
-
|
|
427
|
+
], a.prototype, "maxHeight");
|
|
428
|
+
n([
|
|
424
429
|
d({ type: Boolean })
|
|
425
|
-
],
|
|
426
|
-
|
|
430
|
+
], a.prototype, "noAnimation");
|
|
431
|
+
n([
|
|
427
432
|
d({ reflect: !0 })
|
|
428
|
-
],
|
|
429
|
-
|
|
433
|
+
], a.prototype, "floatingStrategy");
|
|
434
|
+
n([
|
|
430
435
|
d({ type: Boolean })
|
|
431
|
-
],
|
|
432
|
-
|
|
436
|
+
], a.prototype, "disableViewportAutoClose");
|
|
437
|
+
n([
|
|
433
438
|
$()
|
|
434
|
-
],
|
|
439
|
+
], a.prototype, "selectedItem");
|
|
435
440
|
export {
|
|
436
|
-
|
|
441
|
+
a as default
|
|
437
442
|
};
|
|
438
443
|
//# sourceMappingURL=select.component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select.component.js","sources":["../../../src/components/select/select.component.ts"],"sourcesContent":["import clsx from 'clsx'\nimport { unsafeCSS } from 'lit'\nimport { property, query, state } from 'lit/decorators.js'\nimport { ifDefined } from 'lit/directives/if-defined.js'\nimport { html } from 'lit/static-html.js'\n\nimport {\n CommonFormElementSize,\n FloatingStrategy,\n PopupPlacement,\n} from '@/common/types'\nimport { getValidityStateObject } from '@/common/utils'\nimport { GenericFormElement } from '@/internal/mixin/genericFormElement'\nimport { i18next, t } from '@/localization/localization'\n\nimport DapDSFeedback from '../feedback/feedback.component'\nimport DapDSFormLabel from '../form/form-label/form-label.component'\nimport DapDSIcon from '../icon/icon.component'\nimport DapDSIconButton from '../icon-button/icon-button.component'\nimport ArrowsArrowDownSLine from '../icons/arrows/arrows-arrow-down-s-line/arrows-arrow-down-s-line.component'\nimport SystemLoadingSpinner from '../icons/system/system-loading-spinner/system-loading-spinner.component'\nimport DapDSOptionGroup from '../option-group/option-group.component'\nimport DapDSOptionItem from '../option-item/option-item.component'\nimport DapDSOptionList from '../option-list/option-list.component'\nimport DapDSPopup from '../popup/popup.component'\nimport DapDSTooltip from '../tooltip/tooltip.component'\nimport DapDSTray from '../tray/tray.component'\nimport DapDSTypography from '../typography/typography.component'\nimport styles from './select.scss?inline'\n\n/**\n * `dap-ds-select`\n * @summary A select is a form element that allows the user to select one option from a set.\n * @element dap-ds-select\n * @title - Select\n *\n * @event {{ value: string }} dds-change - Fired when the select value changes.\n * @event {{ void }} dds-blur - Emitted when the select loses focus.\n * @event {{ void }} dds-focus - Emitted when the select gains focus.\n * @event {{ void }} dds-opened - Emitted when the select dropdown is opened.\n * @event {{ void }} dds-closed - Emitted when the select dropdown is closed.\n *\n * @property {string} value - The value of the select.\n * @property {string} label - The label of the select.\n * @property {boolean} hideLabel - Visually hides the label while keeping it available to assistive technology. (default: false)\n * @property {string} description - The description of the select.\n * @property {string} tooltip - The tooltip of the select.\n * @property {'top' | 'right' | 'bottom' | 'left'} tooltipPlacement - The tooltip placement of the select.\n * @property {'xs' | 'sm' | 'lg'} size - The size of the select. Default is `sm`.\n * @property {boolean} disabled - Whether the select is disabled.\n * @property {boolean} required - Whether the select is required.\n * @property {boolean} readonly - Whether the select is readonly.\n * @property {boolean} autofocus - Whether the select is autofocus.\n * @property {string} feedback - The feedback of the select.\n * @property {negative | positive | warning} feedbackType - The feedback type of the select. Can be `negative`, `positive`, or `warning`.\n * @property {string} status - The status of the select. Can be `success` or `error`.\n * @property {boolean} optional - The optional state of the select.\n * @property {string} optionalLabel - The optional label of the select.\n * @property {string} requiredLabel - The required indicator of the select. (default: '*')\n * @property {boolean} subtle - The weight of the label. Default is `false`\n *\n * @csspart base - The main select container.\n * @csspart trigger - The trigger button of the select.\n * @csspart label - The label of the select.\n * @csspart description - The description of the select.\n * @csspart feedback - The feedback of the select.\n * @csspart tooltip - The tooltip of the select.\n * @csspart popup-base - The base of the popup.\n * @csspart option-list - The option list of the select.\n * @csspart option-item - The option item of the select.\n * @csspart option-item-base - The base of the option item.\n * @csspart option-item-label - The label of the option item.\n * @csspart option-item-prefix - The prefix of the option item.\n * @csspart option-item-suffix - The suffix of the option item.\n * @csspart indicator-icon - The indicator icon of the select.\n * @csspart mobile-tray - The mobile tray of the select.\n * @csspart mobile-content - The mobile content of the select.\n * @csspart mobile-body - The mobile body of the select.\n * @csspart mobile-header - The mobile header of the select.\n * @csspart mobile-footer - The mobile footer of the select.\n *\n * @cssproperty --dds-select-min-height - Minimum height of the select component (default: var(--dds-spacing-1000))\n * @cssproperty --dds-select-padding - Padding of the select component (default: var(--dds-spacing-300))\n * @cssproperty --dds-select-column-gap - Column gap of the select component (default: var(--dds-spacing-100))\n * @cssproperty --dds-select-border-color - Border color of the select component (default: var(--dds-border-neutral-base))\n * @cssproperty --dds-select-border-radius - Border radius of the select component (default: var(--dds-radius-base))\n * @cssproperty --dds-select-bg-color - Background color of the select component (default: var(--dds-background-neutral-subtle))\n * @cssproperty --dds-select-text-color - Text color of the select component (default: var(--dds-text-neutral-base))\n * @cssproperty --dds-select-icon-right - Right position of the icon (default: var(--dds-spacing-200))\n * @cssproperty --dds-select-icon-color - Color of the icon (default: var(--dds-icon-neutral-subtle))\n * @cssproperty --dds-select-text-margin-right - Right margin of the text (default: var(--dds-spacing-600))\n * @cssproperty --dds-select-disabled-border-color - Border color when disabled (default: var(--dds-background-neutral-stronger))\n * @cssproperty --dds-select-disabled-bg-color - Background color when disabled (default: var(--dds-background-neutral-stronger))\n * @cssproperty --dds-select-disabled-text-color - Text color when disabled (default: var(--dds-text-neutral-disabled))\n * @cssproperty --dds-select-error-border-color - Border color in error state (default: var(--dds-border-negative-base))\n * @cssproperty --dds-select-success-border-color - Border color in success state (default: var(--dds-border-positive-base))\n * @cssproperty --dds-select-xs-min-height - Minimum height for extra small size (default: var(--dds-spacing-800))\n * @cssproperty --dds-select-xs-padding - Padding for extra small size (default: var(--dds-spacing-200))\n * @cssproperty --dds-select-xs-font-size - Font size for extra small size (default: var(--dds-font-sm))\n * @cssproperty --dds-select-lg-min-height - Minimum height for large size (default: var(--dds-spacing-1200))\n * @cssproperty --dds-select-lg-padding - Padding for large size (default: var(--dds-spacing-400))\n * @cssproperty --dds-select-lg-font-size - Font size for large size (default: var(--dds-font-lg))\n * @cssproperty --dds-select-lg-icon-right - Right position of the icon for large size (default: var(--dds-spacing-300))\n * @cssproperty --dds-select-lg-icon-color - Color of the icon for large size (default: var(--dds-text-icon-neutral-subtle))\n * @cssproperty --dds-select-popup-bg-color - Background color of the popup (default: var(--dds-background-neutral-subtle))\n * @cssproperty --dds-select-icon-opened-transform - Transform of the icon when the select is opened (default: rotate(90deg))\n *\n * @slot - The option list of the select.\n * @slot indicator-icon - The indicator icon of the select.\n */\nexport default class DapDSSelect extends GenericFormElement {\n static tagName = 'dap-ds-select'\n\n static dependencies = {\n 'dap-ds-icon-loading-spinner': SystemLoadingSpinner,\n 'dap-ds-icon-arrow-down-s-line': ArrowsArrowDownSLine,\n 'dap-ds-option-list': DapDSOptionList,\n 'dap-ds-form-label': DapDSFormLabel,\n 'dap-ds-tooltip': DapDSTooltip,\n 'dap-ds-icon-button': DapDSIconButton,\n 'dap-ds-icon': DapDSIcon,\n 'dap-ds-typography': DapDSTypography,\n 'dap-ds-popup': DapDSPopup,\n 'dap-ds-tray': DapDSTray,\n 'dap-ds-feedback': DapDSFeedback,\n }\n\n /**\n * @ignore\n */\n @query('button') triggerButton!: HTMLButtonElement\n\n /**\n * @ignore\n */\n @query('dap-ds-option-list') optionList!: DapDSOptionList\n\n /** The popup placement of the select\n * @type {'top' | 'top-start' | 'top-end' | 'right' | 'right-start'| 'right-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end'}\n */\n @property({ reflect: true }) placement: PopupPlacement = 'bottom-start'\n\n /** Whether the select dropdown is opened.*/\n @property({ type: Boolean, reflect: true }) opened? = false\n\n /** The placeholder of the select. */\n @property() placeholder: string | null\n\n /** The sync size of the select dropdown */\n @property({ type: Boolean }) sync?: boolean\n\n /** Whether the select is in mobile mode. */\n @property({ type: Boolean }) isMobile?: boolean = false\n\n /** Whether to render a native HTML select element for mobile-friendly option selection. */\n @property({ type: Boolean }) native?: boolean = false\n\n /** The loading state of the select. */\n @property({ type: Boolean }) loading?: boolean = false\n\n /** The max heigth of the select dropdown. */\n @property({ type: Number }) maxHeight?: number\n\n /** Whether the select dropdown indicator is animated or not */\n @property({ type: Boolean }) noAnimation?: boolean = false\n\n /** The floating strategy of the select dropdown\n * @type {'absolute' | 'fixed'}\n */\n @property({ reflect: true }) floatingStrategy: FloatingStrategy = 'absolute'\n\n /** Whether to keep popup open when trigger leaves viewport. */\n @property({ type: Boolean }) disableViewportAutoClose: boolean = false\n\n /**\n * @ignore\n */\n @state() selectedItem: any\n\n static readonly styles = unsafeCSS(styles)\n\n private languageChangeHandler = () => {\n // Force re-render when language changes to update selectedDisplayText\n this.requestUpdate()\n }\n\n connectedCallback() {\n super.connectedCallback()\n\n // Listen for language changes to update the displayed text\n i18next.on('languageChanged', this.languageChangeHandler)\n\n // Ensure native browser validation UI is suppressed by default,\n // similar to other form components (inputs, combobox, etc.)\n this.addEventListener('invalid', this.handleInvalid)\n }\n\n disconnectedCallback() {\n super.disconnectedCallback()\n // Clean up language change listener\n i18next.off('languageChanged', this.languageChangeHandler)\n\n this.removeEventListener('invalid', this.handleInvalid)\n }\n\n /**\n * Lifecycle method to handle property changes\n */\n updated(changedProperties: Map<string, unknown>) {\n super.updated(changedProperties)\n\n // Handle when value is set to undefined or null externally\n if (changedProperties.has('value')) {\n const newValue = this.value\n if (newValue === undefined || newValue === null) {\n if (this.selectedItem !== null) {\n this.selectedItem = null\n this.setValidity()\n }\n }\n }\n }\n\n private readonly handleClick = () => {\n if (this.readonly || this.disabled) {\n return\n }\n\n this.opened ? this.hideDropDown() : this.showDropDown()\n }\n\n private readonly handleKeyDown = async (event: KeyboardEvent) => {\n if (event.key === 'Tab' || event.key === 'Shift') {\n return\n }\n\n if (this.readonly) {\n return\n }\n\n event.preventDefault()\n\n if (event.key === 'Enter' || event.key === ' ') {\n return this.opened ? this.hideDropDown() : this.showDropDown()\n }\n\n if (event.key === 'Escape') {\n this.hideDropDown()\n return this.focus()\n }\n\n if (\n event.key === 'ArrowDown' ||\n event.key === 'ArrowUp' ||\n event.key === 'ArrowLeft' ||\n event.key === 'ArrowRight'\n ) {\n if (!this.opened) {\n return this.showDropDown()\n }\n\n return\n }\n\n this.emit('dds-keydown', event)\n\n // typing\n this.showDropDown(event.key)\n }\n\n private readonly handleListKeyDown = (event: CustomEvent) => {\n if (event.detail.key === 'Escape') {\n this.hideDropDown()\n }\n }\n\n private readonly handleDocumentMouseDown = (event: MouseEvent) => {\n const path = event.composedPath()\n if (this && !path.includes(this)) {\n this.hideDropDown()\n }\n }\n\n private readonly handlePopupAutoClose = () => {\n this.hideDropDown({ skipFocus: true })\n }\n\n private readonly handleFocus = () => {\n this.emit('dds-focus')\n }\n\n private readonly handleBlur = () => {\n this.emit('dds-blur')\n }\n\n formResetCallback() {\n this.internals.setValidity({})\n this.internals.setFormValue(this.defaultValue)\n this.value = this.defaultValue\n this.selectedItem = this.defaultValue\n }\n\n async showDropDown(key?: string) {\n if (this.opened) {\n return\n }\n\n this.opened = true\n\n document.addEventListener('mousedown', this.handleDocumentMouseDown)\n\n await this.updateComplete\n this.optionList.captureFocus(key)\n\n // Force update to ensure aria-activedescendant is set correctly\n await this.updateComplete\n\n this.emit('dds-opened')\n }\n\n async hideDropDown(options?: { skipFocus?: boolean }) {\n if (!this.opened) {\n return\n }\n\n this.opened = false\n\n document.removeEventListener('mousedown', this.handleDocumentMouseDown)\n\n await this.updateComplete\n this.optionList.removeFocus()\n\n if (!options?.skipFocus) {\n this.focus()\n }\n\n this.emit('dds-closed')\n }\n\n get focusElement() {\n return this.triggerButton\n }\n\n /**\n * Get the active descendant element for aria-activedescendant\n * Returns the currently focused option when dropdown is open, otherwise null\n */\n getActiveDescendant() {\n if (!this.opened) {\n return null\n }\n\n const activeOption = this.optionList?.getActiveOption()\n return activeOption\n }\n\n /**\n * Get the aria-describedby value, combining description and feedback IDs\n */\n private getAriaDescribedBy(): string | undefined {\n const ids: string[] = []\n if (this.description) {\n ids.push('description')\n }\n if (this.feedback) {\n ids.push('feedback')\n }\n return ids.length > 0 ? ids.join(' ') : undefined\n }\n\n // custom validation\n get validity(): ValidityState {\n if (this.internals.validity) {\n return this.internals.validity\n } else {\n return getValidityStateObject({\n valueMissing:\n this.required &&\n (!this.selectedItem ||\n this.selectedItem.value === '' ||\n this.value === '' ||\n this.value === undefined ||\n this.value === null),\n })\n }\n }\n\n get validationMessage(): string {\n return t('form.validationMessage.select')\n }\n\n /** Get the current display text for the selected item, dynamically fetching from the option */\n get selectedDisplayText(): string | null {\n if (!this.selectedItem) return null\n\n // Try to get the current text from the actual option element (reactive to language changes)\n if (this.optionList) {\n const currentOption = Array.from(\n this.optionList.querySelectorAll('dap-ds-option-item'),\n ).find((opt: any) => opt.value === this.selectedItem.value)\n\n if (currentOption) {\n return (currentOption as any).optionText\n }\n }\n\n // Fallback to cached text if option not found\n return this.selectedItem.text\n }\n\n checkValidity() {\n const hasValue =\n !!this.selectedItem &&\n this.selectedItem.value !== '' &&\n this.value !== '' &&\n this.value !== undefined &&\n this.value !== null\n\n return this.required ? hasValue : true\n }\n\n reportValidity() {\n return this.required ? this.checkValidity() : true\n }\n\n setValidity() {\n const isValid = this.checkValidity()\n\n if (!isValid) {\n this.internals.setValidity(\n {\n valueMissing:\n this.required &&\n (!this.selectedItem ||\n this.selectedItem.value === '' ||\n this.value === '' ||\n this.value === undefined ||\n this.value === null),\n },\n this.validationMessage,\n this.triggerButton,\n )\n } else {\n this.internals.setValidity({})\n }\n }\n\n handleInvalid(event: Event) {\n event.preventDefault()\n this.focus()\n }\n\n private readonly handleSelectedChange = (event: CustomEvent) => {\n const val = Object.keys(event.detail).length ? event.detail : null\n const newValue = val?.value\n // The option-list echoes dds-option-change whenever its value is synced from\n // ours (searchOnValueSet), so a programmatic `value` assignment would surface\n // as a user change. A genuine selection changes the value here; a programmatic\n // one has already set it before the echo arrives. Emit only on a real change.\n const changed = newValue !== this.value\n this.selectedItem = val\n this.hideDropDown()\n this.value = newValue\n if (changed) {\n this.emit('dds-change', this.selectedItem)\n }\n\n this.setValidity()\n }\n\n private readonly handleOptionDeselect = () => {\n this.selectedItem = null\n this.value = undefined\n this.emit('dds-change', null)\n\n this.setValidity()\n }\n\n private readonly handleNativeChange = (event: Event) => {\n const select = event.target as HTMLSelectElement\n const value = select.value\n\n // Find matching option-item to get full item data\n const optionItem = this.querySelector(\n `dap-ds-option-item[value=\"${value}\"]`,\n ) as DapDSOptionItem | null\n\n this.value = value\n this.selectedItem = optionItem\n ? { value, text: optionItem.optionText }\n : { value, text: value }\n\n this.emit('dds-change', this.selectedItem)\n this.setValidity()\n }\n\n private renderNativeOption(item: DapDSOptionItem) {\n return html`\n <option\n value=${item.value || ''}\n ?disabled=${item.disabled}\n ?selected=${item.value === this.value}>\n ${item.optionText}\n </option>\n `\n }\n\n private renderNativeOptgroup(group: DapDSOptionGroup) {\n const options = Array.from(\n group.querySelectorAll('dap-ds-option-item'),\n ) as DapDSOptionItem[]\n return html`\n <optgroup label=${group.label || ''} ?disabled=${group.disabled}>\n ${options.map(opt => this.renderNativeOption(opt))}\n </optgroup>\n `\n }\n\n private renderNativeOptions() {\n const children = Array.from(this.children)\n return children.map(child => {\n if (child.tagName === 'DAP-DS-OPTION-GROUP') {\n return this.renderNativeOptgroup(child as DapDSOptionGroup)\n } else if (child.tagName === 'DAP-DS-OPTION-ITEM') {\n return this.renderNativeOption(child as DapDSOptionItem)\n }\n return ''\n })\n }\n\n private renderNativeSelect() {\n return html`\n <div class=\"select-wrapper--native\">\n <select\n class=\"${clsx('select', `select--${this.effectiveSize}`, {\n 'select--disabled': this.disabled,\n 'select--readonly': this.readonly,\n 'select--success': this.status === 'success',\n 'select--error': this.status === 'error',\n 'select--loading': this.loading,\n })}\"\n part=\"trigger\"\n aria-labelledby=${ifDefined(this.label ? 'label' : undefined)}\n aria-describedby=${ifDefined(this.getAriaDescribedBy())}\n ?disabled=${this.disabled}\n ?required=${this.required}\n @change=${this.handleNativeChange}\n @focus=${this.handleFocus}\n @blur=${this.handleBlur}>\n ${this.placeholder\n ? html`<option value=\"\" disabled ?selected=${!this.value}>\n ${this.placeholder}\n </option>`\n : ''}\n ${this.renderNativeOptions()}\n </select>\n <div class=\"icon\" part=\"indicator-icon\">\n ${this.loading\n ? html`<dap-ds-icon-loading-spinner></dap-ds-icon-loading-spinner>`\n : html`<slot name=\"indicator-icon\"\n ><dap-ds-icon-arrow-down-s-line></dap-ds-icon-arrow-down-s-line\n ></slot>`}\n </div>\n </div>\n `\n }\n\n renderTriggerElement() {\n return html` <button\n slot=\"trigger\"\n part=\"trigger\"\n role=\"combobox\"\n class=\"${clsx('select', `select--${this.effectiveSize}`, {\n 'select--disabled': this.disabled,\n 'select--readonly': this.readonly,\n 'select--opened': this.opened,\n 'select--loading': this.loading,\n 'select--success': this.status === 'success',\n 'select--error': this.status === 'error',\n 'select--no-animation': this.noAnimation,\n 'select--optional': this.optional,\n })}\"\n aria-expanded=${this.readonly || this.disabled\n ? 'false'\n : this.opened\n ? 'true'\n : 'false'}\n aria-haspopup=${ifDefined(\n this.readonly || this.disabled ? undefined : 'listbox',\n )}\n aria-labelledby=${ifDefined(this.label ? 'label' : undefined)}\n aria-label=${ifDefined(\n this.label\n ? undefined\n : this.ariaLabel ||\n this.selectedDisplayText ||\n this.placeholder ||\n undefined,\n )}\n aria-describedby=${ifDefined(this.getAriaDescribedBy())}\n aria-disabled=${this.disabled}\n aria-controls=\"option-list\"\n aria-activedescendant=${ifDefined(this.getActiveDescendant()?.id)}\n ?required=${this.required}\n ?readonly=${this.readonly}\n ?autofocus=${this.autofocus}\n ?disabled=${this.disabled}\n tabindex=${this.readonly || this.disabled ? -1 : 0}\n @blur=${this.handleBlur}\n @focus=${this.handleFocus}\n @keydown=${this.handleKeyDown}\n @click=${this.handleClick}>\n <span class=\"text\">${this.selectedDisplayText || this.placeholder}</span>\n <div\n class=\"${clsx('icon', {\n 'icon--opened': this.opened,\n 'icon--no-animation': this.noAnimation,\n })}\"\n part=\"indicator-icon\">\n ${this.loading\n ? html`<dap-ds-icon-loading-spinner></dap-ds-icon-loading-spinner>`\n : html`<slot name=\"indicator-icon\"\n ><dap-ds-icon-arrow-down-s-line></dap-ds-icon-arrow-down-s-line\n ></slot>`}\n </div>\n </button>`\n }\n\n renderOptionList() {\n return html` <dap-ds-option-list\n class=\"option-list\"\n part=\"option-list\"\n exportparts=\"option-item, option-item-base, option-item-label, option-item-prefix, option-item-suffix\"\n id=\"option-list\"\n aria-labelledby=${ifDefined(this.label ? 'label' : undefined)}\n searchMode=\"typehead\"\n size=${ifDefined(this.effectiveSize)}\n value=${this.value}\n disableDelaySet\n @dds-option-change=${this.handleSelectedChange}\n @dds-keydown=${this.handleListKeyDown}\n @dds-option-deselect=${this.handleOptionDeselect}>\n <slot></slot>\n </dap-ds-option-list>`\n }\n\n render() {\n return html` <div class=\"label-container\">\n ${this.label &&\n html`<dap-ds-form-label\n part=\"label\"\n id=\"label\"\n .size=${this.effectiveSize}\n .required=${this.required}\n .requiredLabel=${this.requiredLabel}\n .optional=${this.optional}\n .optionalLabel=${this.optionalLabel}\n .subtle=${this.subtle}\n .disabled=${this.disabled}\n class=${clsx('label')}\n .noMargin=${!!this.description}\n for=\"input\"\n .hideLabel=${this.hideLabel}\n label=${ifDefined(this.label)}>\n </dap-ds-form-label>`}\n ${this.tooltip &&\n html` <dap-ds-tooltip\n part=\"tooltip\"\n content=${this.tooltip}\n mode=\"toggle\"\n placement=${this.tooltipPlacement}>\n <dap-ds-icon-button\n clean\n slot=\"trigger\"\n size=${this.effectiveSize as 'xs' | 'sm' | 'md' | 'lg'}\n iconSize=${this.effectiveSize === 'xs' ? '16' : '22'}\n aria-label=${this.tooltipAriaLabel}\n class=\"input-group__toggle-button\">\n <dap-ds-icon\n name=\"information-line\"\n class=\"info-button\"></dap-ds-icon>\n </dap-ds-icon-button>\n </dap-ds-tooltip>`}\n </div>\n ${this.description &&\n html`\n <dap-ds-typography\n part=\"description\"\n variant=\"description\"\n class=${clsx('input-description')}\n size=${ifDefined(this.effectiveSize as CommonFormElementSize)}\n id=\"description\">\n ${this.description}\n </dap-ds-typography>\n `}\n <div>\n ${this.native\n ? this.renderNativeSelect()\n : !this.isMobile\n ? html`<dap-ds-popup\n floatingStrategy=${ifDefined(this.floatingStrategy)}\n part=\"base\"\n exportparts=\"popup:popup-base\"\n class=\"select-popup\"\n ?opened=${this.opened}\n ?hasArrow=${false}\n overflow\n placement=${this.placement}\n maxHeight=${ifDefined(this.maxHeight)}\n ?sync=${this.sync}\n ?disableViewportAutoClose=${this.disableViewportAutoClose}\n @dds-close=${this.handlePopupAutoClose}\n size=${ifDefined(this.effectiveSize) as 'lg' | 'sm' | 'xs'}>\n ${this.renderTriggerElement()} ${this.renderOptionList()}\n </dap-ds-popup>`\n : html`\n ${this.renderTriggerElement()}\n <dap-ds-tray\n part=\"mobile-tray\"\n exportparts=\"content: mobile-content, body: mobile-body, header: mobile-header, footer: mobile-footer\"\n ?open=${this.opened}\n closeButton=\"false\"\n header=\"false\"\n >${this.renderOptionList()}</dap-ds-tray\n >\n `}\n ${this.feedback &&\n html`<dap-ds-feedback\n part=\"feedback\"\n feedbackType=${ifDefined(this.feedbackType)}\n feedbackSize=\"${ifDefined(this.effectiveSize as 'lg' | 'sm' | 'xs')}\"\n id=\"feedback\"\n .subtle=${this.subtle}>\n ${this.feedback}\n </dap-ds-feedback>`}\n </div>`\n }\n}\n"],"names":["_DapDSSelect","GenericFormElement","event","__async","path","val","newValue","changed","value","optionItem","i18next","changedProperties","key","options","_a","ids","getValidityStateObject","t","currentOption","opt","hasValue","item","html","group","child","clsx","ifDefined","SystemLoadingSpinner","ArrowsArrowDownSLine","DapDSOptionList","DapDSFormLabel","DapDSTooltip","DapDSIconButton","DapDSIcon","DapDSTypography","DapDSPopup","DapDSTray","DapDSFeedback","unsafeCSS","styles","DapDSSelect","__decorateClass","query","property","state"],"mappings":";;;;;;;;;;;;;;;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|
1
|
+
{"version":3,"file":"select.component.js","sources":["../../../src/components/select/select.component.ts"],"sourcesContent":["import clsx from 'clsx'\nimport { unsafeCSS } from 'lit'\nimport { property, query, state } from 'lit/decorators.js'\nimport { ifDefined } from 'lit/directives/if-defined.js'\nimport { html } from 'lit/static-html.js'\n\nimport {\n CommonFormElementSize,\n FloatingStrategy,\n PopupPlacement,\n} from '@/common/types'\nimport { getValidityStateObject } from '@/common/utils'\nimport { GenericFormElement } from '@/internal/mixin/genericFormElement'\nimport { i18next, t } from '@/localization/localization'\n\nimport DapDSFeedback from '../feedback/feedback.component'\nimport DapDSFormLabel from '../form/form-label/form-label.component'\nimport DapDSIcon from '../icon/icon.component'\nimport DapDSIconButton from '../icon-button/icon-button.component'\nimport ArrowsArrowDownSLine from '../icons/arrows/arrows-arrow-down-s-line/arrows-arrow-down-s-line.component'\nimport SystemLoadingSpinner from '../icons/system/system-loading-spinner/system-loading-spinner.component'\nimport DapDSOptionGroup from '../option-group/option-group.component'\nimport DapDSOptionItem from '../option-item/option-item.component'\nimport DapDSOptionList from '../option-list/option-list.component'\nimport DapDSPopup from '../popup/popup.component'\nimport DapDSTooltip from '../tooltip/tooltip.component'\nimport DapDSTray from '../tray/tray.component'\nimport DapDSTypography from '../typography/typography.component'\nimport styles from './select.scss?inline'\n\n/**\n * `dap-ds-select`\n * @summary A select is a form element that allows the user to select one option from a set.\n * @element dap-ds-select\n * @title - Select\n *\n * @event {{ value: string }} dds-change - Fired when the select value changes.\n * @event {{ void }} dds-blur - Emitted when the select loses focus.\n * @event {{ void }} dds-focus - Emitted when the select gains focus.\n * @event {{ void }} dds-opened - Emitted when the select dropdown is opened.\n * @event {{ void }} dds-closed - Emitted when the select dropdown is closed.\n *\n * @property {string} value - The value of the select.\n * @property {string} label - The label of the select.\n * @property {boolean} hideLabel - Visually hides the label while keeping it available to assistive technology. (default: false)\n * @property {string} description - The description of the select.\n * @property {string} tooltip - The tooltip of the select.\n * @property {'top' | 'right' | 'bottom' | 'left'} tooltipPlacement - The tooltip placement of the select.\n * @property {'xs' | 'sm' | 'lg'} size - The size of the select. Default is `sm`.\n * @property {boolean} disabled - Whether the select is disabled.\n * @property {boolean} required - Whether the select is required.\n * @property {boolean} readonly - Whether the select is readonly.\n * @property {boolean} autofocus - Whether the select is autofocus.\n * @property {string} feedback - The feedback of the select.\n * @property {negative | positive | warning} feedbackType - The feedback type of the select. Can be `negative`, `positive`, or `warning`.\n * @property {string} status - The status of the select. Can be `success` or `error`.\n * @property {boolean} optional - The optional state of the select.\n * @property {string} optionalLabel - The optional label of the select.\n * @property {string} requiredLabel - The required indicator of the select. (default: '*')\n * @property {boolean} subtle - The weight of the label. Default is `false`\n *\n * @csspart base - The main select container.\n * @csspart trigger - The trigger button of the select.\n * @csspart label - The label of the select.\n * @csspart description - The description of the select.\n * @csspart feedback - The feedback of the select.\n * @csspart tooltip - The tooltip of the select.\n * @csspart popup-base - The base of the popup.\n * @csspart option-list - The option list of the select.\n * @csspart option-item - The option item of the select.\n * @csspart option-item-base - The base of the option item.\n * @csspart option-item-label - The label of the option item.\n * @csspart option-item-prefix - The prefix of the option item.\n * @csspart option-item-suffix - The suffix of the option item.\n * @csspart indicator-icon - The indicator icon of the select.\n * @csspart mobile-tray - The mobile tray of the select.\n * @csspart mobile-content - The mobile content of the select.\n * @csspart mobile-body - The mobile body of the select.\n * @csspart mobile-header - The mobile header of the select.\n * @csspart mobile-footer - The mobile footer of the select.\n *\n * @cssproperty --dds-select-min-height - Minimum height of the select component (default: var(--dds-spacing-1000))\n * @cssproperty --dds-select-padding - Padding of the select component (default: var(--dds-spacing-300))\n * @cssproperty --dds-select-column-gap - Column gap of the select component (default: var(--dds-spacing-100))\n * @cssproperty --dds-select-border-color - Border color of the select component (default: var(--dds-border-neutral-base))\n * @cssproperty --dds-select-border-radius - Border radius of the select component (default: var(--dds-radius-base))\n * @cssproperty --dds-select-bg-color - Background color of the select component (default: var(--dds-background-neutral-subtle))\n * @cssproperty --dds-select-text-color - Text color of the select component (default: var(--dds-text-neutral-base))\n * @cssproperty --dds-select-icon-right - Right position of the icon (default: var(--dds-spacing-200))\n * @cssproperty --dds-select-icon-color - Color of the icon (default: var(--dds-icon-neutral-subtle))\n * @cssproperty --dds-select-text-margin-right - Right margin of the text (default: var(--dds-spacing-600))\n * @cssproperty --dds-select-disabled-border-color - Border color when disabled (default: var(--dds-background-neutral-stronger))\n * @cssproperty --dds-select-disabled-bg-color - Background color when disabled (default: var(--dds-background-neutral-stronger))\n * @cssproperty --dds-select-disabled-text-color - Text color when disabled (default: var(--dds-text-neutral-disabled))\n * @cssproperty --dds-select-error-border-color - Border color in error state (default: var(--dds-border-negative-base))\n * @cssproperty --dds-select-success-border-color - Border color in success state (default: var(--dds-border-positive-base))\n * @cssproperty --dds-select-xs-min-height - Minimum height for extra small size (default: var(--dds-spacing-800))\n * @cssproperty --dds-select-xs-padding - Padding for extra small size (default: var(--dds-spacing-200))\n * @cssproperty --dds-select-xs-font-size - Font size for extra small size (default: var(--dds-font-sm))\n * @cssproperty --dds-select-lg-min-height - Minimum height for large size (default: var(--dds-spacing-1200))\n * @cssproperty --dds-select-lg-padding - Padding for large size (default: var(--dds-spacing-400))\n * @cssproperty --dds-select-lg-font-size - Font size for large size (default: var(--dds-font-lg))\n * @cssproperty --dds-select-lg-icon-right - Right position of the icon for large size (default: var(--dds-spacing-300))\n * @cssproperty --dds-select-lg-icon-color - Color of the icon for large size (default: var(--dds-text-icon-neutral-subtle))\n * @cssproperty --dds-select-popup-bg-color - Background color of the popup (default: var(--dds-background-neutral-subtle))\n * @cssproperty --dds-select-icon-opened-transform - Transform of the icon when the select is opened (default: rotate(90deg))\n *\n * @slot - The option list of the select.\n * @slot indicator-icon - The indicator icon of the select.\n */\nexport default class DapDSSelect extends GenericFormElement {\n static tagName = 'dap-ds-select'\n\n static dependencies = {\n 'dap-ds-icon-loading-spinner': SystemLoadingSpinner,\n 'dap-ds-icon-arrow-down-s-line': ArrowsArrowDownSLine,\n 'dap-ds-option-list': DapDSOptionList,\n 'dap-ds-form-label': DapDSFormLabel,\n 'dap-ds-tooltip': DapDSTooltip,\n 'dap-ds-icon-button': DapDSIconButton,\n 'dap-ds-icon': DapDSIcon,\n 'dap-ds-typography': DapDSTypography,\n 'dap-ds-popup': DapDSPopup,\n 'dap-ds-tray': DapDSTray,\n 'dap-ds-feedback': DapDSFeedback,\n }\n\n /**\n * @ignore\n */\n @query('button') triggerButton!: HTMLButtonElement\n\n /**\n * @ignore\n */\n @query('dap-ds-option-list') optionList!: DapDSOptionList\n\n /** The popup placement of the select\n * @type {'top' | 'top-start' | 'top-end' | 'right' | 'right-start'| 'right-end' | 'bottom' | 'bottom-start' | 'bottom-end' | 'left' | 'left-start' | 'left-end'}\n */\n @property({ reflect: true }) placement: PopupPlacement = 'bottom-start'\n\n /** Whether the select dropdown is opened.*/\n @property({ type: Boolean, reflect: true }) opened? = false\n\n /** The placeholder of the select. */\n @property() placeholder: string | null\n\n /** The sync size of the select dropdown */\n @property({ type: Boolean }) sync?: boolean\n\n /** Whether the select is in mobile mode. */\n @property({ type: Boolean }) isMobile?: boolean = false\n\n /** Whether to render a native HTML select element for mobile-friendly option selection. */\n @property({ type: Boolean }) native?: boolean = false\n\n /** The loading state of the select. */\n @property({ type: Boolean }) loading?: boolean = false\n\n /** The max heigth of the select dropdown. */\n @property({ type: Number }) maxHeight?: number\n\n /** Whether the select dropdown indicator is animated or not */\n @property({ type: Boolean }) noAnimation?: boolean = false\n\n /** The floating strategy of the select dropdown\n * @type {'absolute' | 'fixed'}\n */\n @property({ reflect: true }) floatingStrategy: FloatingStrategy = 'absolute'\n\n /** Whether to keep popup open when trigger leaves viewport. */\n @property({ type: Boolean }) disableViewportAutoClose: boolean = false\n\n /**\n * @ignore\n */\n @state() selectedItem: any\n\n static readonly styles = unsafeCSS(styles)\n\n private languageChangeHandler = () => {\n // Force re-render when language changes to update selectedDisplayText\n this.requestUpdate()\n }\n\n connectedCallback() {\n super.connectedCallback()\n\n // Listen for language changes to update the displayed text\n i18next.on('languageChanged', this.languageChangeHandler)\n\n // Ensure native browser validation UI is suppressed by default,\n // similar to other form components (inputs, combobox, etc.)\n this.addEventListener('invalid', this.handleInvalid)\n }\n\n disconnectedCallback() {\n super.disconnectedCallback()\n // Clean up language change listener\n i18next.off('languageChanged', this.languageChangeHandler)\n\n this.removeEventListener('invalid', this.handleInvalid)\n }\n\n /**\n * Lifecycle method to handle property changes\n */\n updated(changedProperties: Map<string, unknown>) {\n super.updated(changedProperties)\n\n // Handle when value is set to undefined or null externally\n if (changedProperties.has('value')) {\n const newValue = this.value\n if (newValue === undefined || newValue === null) {\n if (this.selectedItem !== null) {\n this.selectedItem = null\n this.setValidity()\n }\n }\n }\n }\n\n private readonly handleClick = () => {\n if (this.readonly || this.disabled) {\n return\n }\n\n this.opened ? this.hideDropDown() : this.showDropDown()\n }\n\n private readonly handleKeyDown = async (event: KeyboardEvent) => {\n if (event.key === 'Tab' || event.key === 'Shift') {\n return\n }\n\n if (this.readonly) {\n return\n }\n\n event.preventDefault()\n\n if (event.key === 'Enter' || event.key === ' ') {\n return this.opened ? this.hideDropDown() : this.showDropDown()\n }\n\n if (event.key === 'Escape') {\n this.hideDropDown()\n return this.focus()\n }\n\n if (\n event.key === 'ArrowDown' ||\n event.key === 'ArrowUp' ||\n event.key === 'ArrowLeft' ||\n event.key === 'ArrowRight'\n ) {\n if (!this.opened) {\n return this.showDropDown()\n }\n\n return\n }\n\n this.emit('dds-keydown', event)\n\n // typing\n this.showDropDown(event.key)\n }\n\n private readonly handleListKeyDown = (event: CustomEvent) => {\n if (event.detail?.key === 'Tab') {\n // Return focus to the trigger synchronously so the native Tab continues\n // from there and leaves the select instead of cycling inside the list.\n this.hideDropDown({ skipFocus: true })\n this.focus()\n return\n }\n\n if (event.detail?.key === 'Escape') {\n this.hideDropDown()\n }\n }\n\n private readonly handleDocumentMouseDown = (event: MouseEvent) => {\n const path = event.composedPath()\n if (this && !path.includes(this)) {\n this.hideDropDown()\n }\n }\n\n private readonly handlePopupAutoClose = () => {\n this.hideDropDown({ skipFocus: true })\n }\n\n private readonly handleFocus = () => {\n this.emit('dds-focus')\n }\n\n private readonly handleBlur = () => {\n this.emit('dds-blur')\n }\n\n formResetCallback() {\n this.internals.setValidity({})\n this.internals.setFormValue(this.defaultValue)\n this.value = this.defaultValue\n this.selectedItem = this.defaultValue\n }\n\n async showDropDown(key?: string) {\n if (this.opened) {\n return\n }\n\n this.opened = true\n\n document.addEventListener('mousedown', this.handleDocumentMouseDown)\n\n await this.updateComplete\n this.optionList.captureFocus(key)\n\n // Force update to ensure aria-activedescendant is set correctly\n await this.updateComplete\n\n this.emit('dds-opened')\n }\n\n async hideDropDown(options?: { skipFocus?: boolean }) {\n if (!this.opened) {\n return\n }\n\n this.opened = false\n\n document.removeEventListener('mousedown', this.handleDocumentMouseDown)\n\n await this.updateComplete\n this.optionList.removeFocus()\n\n if (!options?.skipFocus) {\n this.focus()\n }\n\n this.emit('dds-closed')\n }\n\n get focusElement() {\n return this.triggerButton\n }\n\n /**\n * Get the active descendant element for aria-activedescendant\n * Returns the currently focused option when dropdown is open, otherwise null\n */\n getActiveDescendant() {\n if (!this.opened) {\n return null\n }\n\n const activeOption = this.optionList?.getActiveOption()\n return activeOption\n }\n\n /**\n * Get the aria-describedby value, combining description and feedback IDs\n */\n private getAriaDescribedBy(): string | undefined {\n const ids: string[] = []\n if (this.description) {\n ids.push('description')\n }\n if (this.feedback) {\n ids.push('feedback')\n }\n return ids.length > 0 ? ids.join(' ') : undefined\n }\n\n // custom validation\n get validity(): ValidityState {\n if (this.internals.validity) {\n return this.internals.validity\n } else {\n return getValidityStateObject({\n valueMissing:\n this.required &&\n (!this.selectedItem ||\n this.selectedItem.value === '' ||\n this.value === '' ||\n this.value === undefined ||\n this.value === null),\n })\n }\n }\n\n get validationMessage(): string {\n return t('form.validationMessage.select')\n }\n\n /** Get the current display text for the selected item, dynamically fetching from the option */\n get selectedDisplayText(): string | null {\n if (!this.selectedItem) return null\n\n // Try to get the current text from the actual option element (reactive to language changes)\n if (this.optionList) {\n const currentOption = Array.from(\n this.optionList.querySelectorAll('dap-ds-option-item'),\n ).find((opt: any) => opt.value === this.selectedItem.value)\n\n if (currentOption) {\n return (currentOption as any).optionText\n }\n }\n\n // Fallback to cached text if option not found\n return this.selectedItem.text\n }\n\n checkValidity() {\n const hasValue =\n !!this.selectedItem &&\n this.selectedItem.value !== '' &&\n this.value !== '' &&\n this.value !== undefined &&\n this.value !== null\n\n return this.required ? hasValue : true\n }\n\n reportValidity() {\n return this.required ? this.checkValidity() : true\n }\n\n setValidity() {\n const isValid = this.checkValidity()\n\n if (!isValid) {\n this.internals.setValidity(\n {\n valueMissing:\n this.required &&\n (!this.selectedItem ||\n this.selectedItem.value === '' ||\n this.value === '' ||\n this.value === undefined ||\n this.value === null),\n },\n this.validationMessage,\n this.triggerButton,\n )\n } else {\n this.internals.setValidity({})\n }\n }\n\n handleInvalid(event: Event) {\n event.preventDefault()\n this.focus()\n }\n\n private readonly handleSelectedChange = (event: CustomEvent) => {\n const val = Object.keys(event.detail).length ? event.detail : null\n const newValue = val?.value\n // The option-list echoes dds-option-change whenever its value is synced from\n // ours (searchOnValueSet), so a programmatic `value` assignment would surface\n // as a user change. A genuine selection changes the value here; a programmatic\n // one has already set it before the echo arrives. Emit only on a real change.\n const changed = newValue !== this.value\n this.selectedItem = val\n this.hideDropDown()\n this.value = newValue\n if (changed) {\n this.emit('dds-change', this.selectedItem)\n }\n\n this.setValidity()\n }\n\n private readonly handleOptionDeselect = () => {\n this.selectedItem = null\n this.value = undefined\n this.emit('dds-change', null)\n\n this.setValidity()\n }\n\n private readonly handleNativeChange = (event: Event) => {\n const select = event.target as HTMLSelectElement\n const value = select.value\n\n // Find matching option-item to get full item data\n const optionItem = this.querySelector(\n `dap-ds-option-item[value=\"${value}\"]`,\n ) as DapDSOptionItem | null\n\n this.value = value\n this.selectedItem = optionItem\n ? { value, text: optionItem.optionText }\n : { value, text: value }\n\n this.emit('dds-change', this.selectedItem)\n this.setValidity()\n }\n\n private renderNativeOption(item: DapDSOptionItem) {\n return html`\n <option\n value=${item.value || ''}\n ?disabled=${item.disabled}\n ?selected=${item.value === this.value}>\n ${item.optionText}\n </option>\n `\n }\n\n private renderNativeOptgroup(group: DapDSOptionGroup) {\n const options = Array.from(\n group.querySelectorAll('dap-ds-option-item'),\n ) as DapDSOptionItem[]\n return html`\n <optgroup label=${group.label || ''} ?disabled=${group.disabled}>\n ${options.map(opt => this.renderNativeOption(opt))}\n </optgroup>\n `\n }\n\n private renderNativeOptions() {\n const children = Array.from(this.children)\n return children.map(child => {\n if (child.tagName === 'DAP-DS-OPTION-GROUP') {\n return this.renderNativeOptgroup(child as DapDSOptionGroup)\n } else if (child.tagName === 'DAP-DS-OPTION-ITEM') {\n return this.renderNativeOption(child as DapDSOptionItem)\n }\n return ''\n })\n }\n\n private renderNativeSelect() {\n return html`\n <div class=\"select-wrapper--native\">\n <select\n class=\"${clsx('select', `select--${this.effectiveSize}`, {\n 'select--disabled': this.disabled,\n 'select--readonly': this.readonly,\n 'select--success': this.status === 'success',\n 'select--error': this.status === 'error',\n 'select--loading': this.loading,\n })}\"\n part=\"trigger\"\n aria-labelledby=${ifDefined(this.label ? 'label' : undefined)}\n aria-describedby=${ifDefined(this.getAriaDescribedBy())}\n ?disabled=${this.disabled}\n ?required=${this.required}\n @change=${this.handleNativeChange}\n @focus=${this.handleFocus}\n @blur=${this.handleBlur}>\n ${this.placeholder\n ? html`<option value=\"\" disabled ?selected=${!this.value}>\n ${this.placeholder}\n </option>`\n : ''}\n ${this.renderNativeOptions()}\n </select>\n <div class=\"icon\" part=\"indicator-icon\">\n ${this.loading\n ? html`<dap-ds-icon-loading-spinner></dap-ds-icon-loading-spinner>`\n : html`<slot name=\"indicator-icon\"\n ><dap-ds-icon-arrow-down-s-line></dap-ds-icon-arrow-down-s-line\n ></slot>`}\n </div>\n </div>\n `\n }\n\n renderTriggerElement() {\n return html` <button\n slot=\"trigger\"\n part=\"trigger\"\n role=\"combobox\"\n class=\"${clsx('select', `select--${this.effectiveSize}`, {\n 'select--disabled': this.disabled,\n 'select--readonly': this.readonly,\n 'select--opened': this.opened,\n 'select--loading': this.loading,\n 'select--success': this.status === 'success',\n 'select--error': this.status === 'error',\n 'select--no-animation': this.noAnimation,\n 'select--optional': this.optional,\n })}\"\n aria-expanded=${this.readonly || this.disabled\n ? 'false'\n : this.opened\n ? 'true'\n : 'false'}\n aria-haspopup=${ifDefined(\n this.readonly || this.disabled ? undefined : 'listbox',\n )}\n aria-labelledby=${ifDefined(this.label ? 'label' : undefined)}\n aria-label=${ifDefined(\n this.label\n ? undefined\n : this.ariaLabel ||\n this.selectedDisplayText ||\n this.placeholder ||\n undefined,\n )}\n aria-describedby=${ifDefined(this.getAriaDescribedBy())}\n aria-disabled=${this.disabled}\n aria-controls=\"option-list\"\n aria-activedescendant=${ifDefined(this.getActiveDescendant()?.id)}\n ?required=${this.required}\n ?readonly=${this.readonly}\n ?autofocus=${this.autofocus}\n ?disabled=${this.disabled}\n tabindex=${this.readonly || this.disabled ? -1 : 0}\n @blur=${this.handleBlur}\n @focus=${this.handleFocus}\n @keydown=${this.handleKeyDown}\n @click=${this.handleClick}>\n <span class=\"text\">${this.selectedDisplayText || this.placeholder}</span>\n <div\n class=\"${clsx('icon', {\n 'icon--opened': this.opened,\n 'icon--no-animation': this.noAnimation,\n })}\"\n part=\"indicator-icon\">\n ${this.loading\n ? html`<dap-ds-icon-loading-spinner></dap-ds-icon-loading-spinner>`\n : html`<slot name=\"indicator-icon\"\n ><dap-ds-icon-arrow-down-s-line></dap-ds-icon-arrow-down-s-line\n ></slot>`}\n </div>\n </button>`\n }\n\n renderOptionList() {\n return html` <dap-ds-option-list\n class=\"option-list\"\n part=\"option-list\"\n exportparts=\"option-item, option-item-base, option-item-label, option-item-prefix, option-item-suffix\"\n id=\"option-list\"\n aria-labelledby=${ifDefined(this.label ? 'label' : undefined)}\n searchMode=\"typehead\"\n size=${ifDefined(this.effectiveSize)}\n value=${this.value}\n disableDelaySet\n @dds-option-change=${this.handleSelectedChange}\n @dds-keydown=${this.handleListKeyDown}\n @dds-option-deselect=${this.handleOptionDeselect}>\n <slot></slot>\n </dap-ds-option-list>`\n }\n\n render() {\n return html` <div class=\"label-container\">\n ${this.label &&\n html`<dap-ds-form-label\n part=\"label\"\n id=\"label\"\n .size=${this.effectiveSize}\n .required=${this.required}\n .requiredLabel=${this.requiredLabel}\n .optional=${this.optional}\n .optionalLabel=${this.optionalLabel}\n .subtle=${this.subtle}\n .disabled=${this.disabled}\n class=${clsx('label')}\n .noMargin=${!!this.description}\n for=\"input\"\n .hideLabel=${this.hideLabel}\n label=${ifDefined(this.label)}>\n </dap-ds-form-label>`}\n ${this.tooltip &&\n html` <dap-ds-tooltip\n part=\"tooltip\"\n content=${this.tooltip}\n mode=\"toggle\"\n placement=${this.tooltipPlacement}>\n <dap-ds-icon-button\n clean\n slot=\"trigger\"\n size=${this.effectiveSize as 'xs' | 'sm' | 'md' | 'lg'}\n iconSize=${this.effectiveSize === 'xs' ? '16' : '22'}\n aria-label=${this.tooltipAriaLabel}\n class=\"input-group__toggle-button\">\n <dap-ds-icon\n name=\"information-line\"\n class=\"info-button\"></dap-ds-icon>\n </dap-ds-icon-button>\n </dap-ds-tooltip>`}\n </div>\n ${this.description &&\n html`\n <dap-ds-typography\n part=\"description\"\n variant=\"description\"\n class=${clsx('input-description')}\n size=${ifDefined(this.effectiveSize as CommonFormElementSize)}\n id=\"description\">\n ${this.description}\n </dap-ds-typography>\n `}\n <div>\n ${this.native\n ? this.renderNativeSelect()\n : !this.isMobile\n ? html`<dap-ds-popup\n floatingStrategy=${ifDefined(this.floatingStrategy)}\n part=\"base\"\n exportparts=\"popup:popup-base\"\n class=\"select-popup\"\n ?opened=${this.opened}\n ?hasArrow=${false}\n overflow\n placement=${this.placement}\n maxHeight=${ifDefined(this.maxHeight)}\n ?sync=${this.sync}\n ?disableViewportAutoClose=${this.disableViewportAutoClose}\n @dds-close=${this.handlePopupAutoClose}\n size=${ifDefined(this.effectiveSize) as 'lg' | 'sm' | 'xs'}>\n ${this.renderTriggerElement()} ${this.renderOptionList()}\n </dap-ds-popup>`\n : html`\n ${this.renderTriggerElement()}\n <dap-ds-tray\n part=\"mobile-tray\"\n exportparts=\"content: mobile-content, body: mobile-body, header: mobile-header, footer: mobile-footer\"\n ?open=${this.opened}\n closeButton=\"false\"\n header=\"false\"\n >${this.renderOptionList()}</dap-ds-tray\n >\n `}\n ${this.feedback &&\n html`<dap-ds-feedback\n part=\"feedback\"\n feedbackType=${ifDefined(this.feedbackType)}\n feedbackSize=\"${ifDefined(this.effectiveSize as 'lg' | 'sm' | 'xs')}\"\n id=\"feedback\"\n .subtle=${this.subtle}>\n ${this.feedback}\n </dap-ds-feedback>`}\n </div>`\n }\n}\n"],"names":["_DapDSSelect","GenericFormElement","event","__async","_a","_b","path","val","newValue","changed","value","optionItem","i18next","changedProperties","key","options","ids","getValidityStateObject","t","currentOption","opt","hasValue","item","html","group","child","clsx","ifDefined","SystemLoadingSpinner","ArrowsArrowDownSLine","DapDSOptionList","DapDSFormLabel","DapDSTooltip","DapDSIconButton","DapDSIcon","DapDSTypography","DapDSPopup","DapDSTray","DapDSFeedback","unsafeCSS","styles","DapDSSelect","__decorateClass","query","property","state"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8GA,MAAqBA,IAArB,MAAqBA,UAAoBC,EAAmB;AAAA,EAA5D,cAAA;AAAA,UAAA,GAAA,SAAA,GA8B2D,KAAA,YAAA,gBAGH,KAAA,SAAA,IASJ,KAAA,WAAA,IAGF,KAAA,SAAA,IAGC,KAAA,UAAA,IAMI,KAAA,cAAA,IAKa,KAAA,mBAAA,YAGD,KAAA,2BAAA,IASjE,KAAQ,wBAAwB,MAAM;AAEpC,WAAK,cAAc;AAAA,IACrB,GAuCA,KAAiB,cAAc,MAAM;AAC/B,MAAA,KAAK,YAAY,KAAK,aAI1B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,EA8BU,WAAA,WAAA;AAGeC,EAAA;AAAA,EAA3CE,EAAS,EAAE,MAAM,SAAS,SAAS,GAAM,CAAA;AAAA,GAjCvBH,EAiCyB,WAAA,QAAA;AAGhCC,EAAA;AAAA,EAAXE,EAAS;AAAA,GApCSH,EAoCP,WAAA,aAAA;AAGiBC,EAAA;AAAA,EAA5BE,EAAS,EAAE,MAAM,QAAS,CAAA;AAAA,GAvCRH,EAuCU,WAAA,MAAA;AAGAC,EAAA;AAAA,EAA5BE,EAAS,EAAE,MAAM,QAAS,CAAA;AAAA,GA1CRH,EA0CU,WAAA,UAAA;AAGAC,EAAA;AAAA,EAA5BE,EAAS,EAAE,MAAM,QAAS,CAAA;AAAA,GA7CRH,EA6CU,WAAA,QAAA;AAGAC,EAAA;AAAA,EAA5BE,EAAS,EAAE,MAAM,QAAS,CAAA;AAAA,GAhDRH,EAgDU,WAAA,SAAA;AAGDC,EAAA;AAAA,EAA3BE,EAAS,EAAE,MAAM,OAAQ,CAAA;AAAA,GAnDPH,EAmDS,WAAA,WAAA;AAGCC,EAAA;AAAA,EAA5BE,EAAS,EAAE,MAAM,QAAS,CAAA;AAAA,GAtDRH,EAsDU,WAAA,aAAA;AAKAC,EAAA;AAAA,EAA5BE,EAAS,EAAE,SAAS,GAAM,CAAA;AAAA,GA3DRH,EA2DU,WAAA,kBAAA;AAGAC,EAAA;AAAA,EAA5BE,EAAS,EAAE,MAAM,QAAS,CAAA;AAAA,GA9DRH,EA8DU,WAAA,0BAAA;AAKpBC,EAAA;AAAA,EAARG,EAAM;AAAA,GAnEYJ,EAmEV,WAAA,cAAA;"}
|
|
@@ -2,26 +2,26 @@ import { clsx as u } from "../../node_modules/clsx/dist/clsx.js";
|
|
|
2
2
|
import "../../node_modules/@lit/reactive-element/reactive-element.js";
|
|
3
3
|
import { nothing as p } from "../../node_modules/lit-html/lit-html.js";
|
|
4
4
|
import "../../node_modules/lit-element/lit-element.js";
|
|
5
|
-
import { property as
|
|
5
|
+
import { property as i } from "../../node_modules/@lit/reactive-element/decorators/property.js";
|
|
6
6
|
import { state as h } from "../../node_modules/@lit/reactive-element/decorators/state.js";
|
|
7
7
|
import { ifDefined as a } from "../../node_modules/lit-html/directives/if-defined.js";
|
|
8
8
|
import { styleMap as b } from "../../node_modules/lit-html/directives/style-map.js";
|
|
9
9
|
import { html as o } from "../../node_modules/lit-html/static.js";
|
|
10
10
|
import { translate as y } from "../../node_modules/lit-i18n/src/lit-i18n.js";
|
|
11
|
-
import { DdsElement as
|
|
12
|
-
import
|
|
11
|
+
import { DdsElement as k } from "../../internal/dds-hu-element.js";
|
|
12
|
+
import g from "../button/button.component.js";
|
|
13
13
|
import $ from "../icon/icon.component.js";
|
|
14
14
|
import _ from "../icon-button/icon-button.component.js";
|
|
15
15
|
import v from "../link/link.component.js";
|
|
16
16
|
import T from "../stack/stack.component.js";
|
|
17
17
|
import x from "./snackbar-message.scss.js";
|
|
18
18
|
import { unsafeCSS as B } from "../../node_modules/@lit/reactive-element/css-tag.js";
|
|
19
|
-
var C = Object.defineProperty, r = (
|
|
20
|
-
for (var
|
|
21
|
-
(
|
|
22
|
-
return
|
|
19
|
+
var C = Object.defineProperty, r = (f, t, c, l) => {
|
|
20
|
+
for (var e = void 0, d = f.length - 1, m; d >= 0; d--)
|
|
21
|
+
(m = f[d]) && (e = m(t, c, e) || e);
|
|
22
|
+
return e && C(t, c, e), e;
|
|
23
23
|
};
|
|
24
|
-
const n = class n extends
|
|
24
|
+
const n = class n extends k {
|
|
25
25
|
constructor() {
|
|
26
26
|
super(...arguments), this.actions = [], this.message = "", this.closeButton = "true", this.alertType = "default", this.position = "bottom-right", this.closeButtonTestId = "snackbar-close-button", this.isClosing = !1;
|
|
27
27
|
}
|
|
@@ -76,8 +76,6 @@ const n = class n extends g {
|
|
|
76
76
|
render() {
|
|
77
77
|
var t;
|
|
78
78
|
return o`<div
|
|
79
|
-
role="alert"
|
|
80
|
-
aria-label=${this.message}
|
|
81
79
|
part="base"
|
|
82
80
|
class=${u(
|
|
83
81
|
"snackbar",
|
|
@@ -113,32 +111,32 @@ const n = class n extends g {
|
|
|
113
111
|
};
|
|
114
112
|
n.tagName = "dap-ds-snackbar-message", n.dependencies = {
|
|
115
113
|
"dap-ds-stack": T,
|
|
116
|
-
"dap-ds-button":
|
|
114
|
+
"dap-ds-button": g,
|
|
117
115
|
"dap-ds-link": v,
|
|
118
116
|
"dap-ds-icon": $,
|
|
119
117
|
"dap-ds-icon-button": _
|
|
120
118
|
}, n.styles = B(x);
|
|
121
119
|
let s = n;
|
|
122
120
|
r([
|
|
123
|
-
|
|
121
|
+
i({ type: Array })
|
|
124
122
|
], s.prototype, "actions");
|
|
125
123
|
r([
|
|
126
|
-
|
|
124
|
+
i({ type: String })
|
|
127
125
|
], s.prototype, "message");
|
|
128
126
|
r([
|
|
129
|
-
|
|
127
|
+
i({ type: String, reflect: !0 })
|
|
130
128
|
], s.prototype, "closeButton");
|
|
131
129
|
r([
|
|
132
|
-
|
|
130
|
+
i({ type: String })
|
|
133
131
|
], s.prototype, "alertType");
|
|
134
132
|
r([
|
|
135
|
-
|
|
133
|
+
i({ type: Object })
|
|
136
134
|
], s.prototype, "customStyle");
|
|
137
135
|
r([
|
|
138
|
-
|
|
136
|
+
i({ type: String })
|
|
139
137
|
], s.prototype, "position");
|
|
140
138
|
r([
|
|
141
|
-
|
|
139
|
+
i()
|
|
142
140
|
], s.prototype, "closeButtonTestId");
|
|
143
141
|
r([
|
|
144
142
|
h()
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"snackbar-message.component.js","sources":["../../../src/components/snackbar/snackbar-message.component.ts"],"sourcesContent":["import clsx from 'clsx'\nimport { nothing, TemplateResult, unsafeCSS } from 'lit'\nimport { property, state } from 'lit/decorators.js'\nimport { ifDefined } from 'lit/directives/if-defined.js'\nimport { styleMap } from 'lit/directives/style-map.js'\nimport { html } from 'lit/static-html.js'\nimport { translate } from 'lit-i18n'\n\nimport { ActionType, AlertType, SnackbarPosition } from '@/common/types'\n\nimport { DdsElement } from '../../internal/dds-hu-element'\nimport DapDSButton from '../button/button.component'\nimport DapDSIcon from '../icon/icon.component'\nimport DapDSIconButton from '../icon-button/icon-button.component'\nimport DapDSLink from '../link/link.component'\nimport DapDSStack from '../stack/stack.component'\nimport styles from './snackbar-message.scss?inline'\n\n/**\n * `dap-ds-snackbar-message`\n * @summary The Snackbar component shows a sliding message to the user.\n * @element dap-ds-snackbar-message\n * @title - Snackbar message\n * @group snackbar\n *\n * @event {{ id: string }} dds-close - Fires when the snackbar closes.\n *\n * @slot default - The content of the snackbar.\n *\n * @csspart base - Main snackbar container.\n * @csspart text - The text part of the snackbar.\n * @csspart closebutton - The close button part of the component.\n * @csspart icon - The icon part of the close button.\n *\n * @cssproperty --dds-snackbar-width - Width of the snackbar (default: clamp(var(--dds-spacing-6000), 20vw, var(--dds-containers-xsmall)))\n * @cssproperty --dds-snackbar-gap - Gap between snackbar elements (default: var(--dds-spacing-400))\n * @cssproperty --dds-snackbar-padding - Padding inside the snackbar (default: var(--dds-spacing-400))\n * @cssproperty --dds-snackbar-margin-bottom - Bottom margin of the snackbar (default: var(--dds-spacing-400))\n * @cssproperty --dds-snackbar-transition - Transition property for the snackbar (default: transform var(--dds-transition-slow) var(--dds-easing-ease-out)allow-discrete, opacity var(--dds-transition-slow) var(--dds-easing-ease-out) allow-discrete, margin var(--dds-transition-slow) var(--dds-easing-ease-out) allow-discrete, box-shadow var(--dds-transition-slow) var(--dds-easing-ease-out) allow-discrete)\n * @cssproperty --dds-snackbar-border-radius - Border radius of the snackbar (default: var(--dds-radius-base))\n * @cssproperty --dds-snackbar-font-size - Font size used in the snackbar (default: var(--dds-font-sm))\n * @cssproperty --dds-snackbar-background - Background color of the snackbar (default: var(--dds-snackbar-error-background))\n * @cssproperty --dds-snackbar-border - Border color of the snackbar (default: var(--dds-snackbar-error-border))\n * @cssproperty --dds-snackbar-text - Text color of the snackbar (default: var(--dds-snackbar-variant-text))\n * @cssproperty --dds-snackbar-icon - Icon color of the snackbar (default: var(--dds-snackbar-variant-icon))\n * @cssproperty --dds-snackbar-link - Link color of the snackbar (default: var(--dds-snackbar-variant-link))\n * @cssproperty --dds-snackbar-information-background - Background color for information variant (default: var(--dds-background-informative-medium))\n * @cssproperty --dds-snackbar-information-border - Border color for information variant (default: var(--dds-border-width-base) solidvar(--dds-border-informative-subtle))\n * @cssproperty --dds-snackbar-information-icon - Icon color for information variant (default: var(--dds-icon-informative-subtle))\n * @cssproperty --dds-snackbar-success-background - Background color for success variant (default: var(--dds-background-positive-medium))\n * @cssproperty --dds-snackbar-success-border - Border color for success variant (default: var(--dds-border-width-base) solidvar(--dds-border-positive-subtle))\n * @cssproperty --dds-snackbar-success-icon - Icon color for success variant (default: var(--dds-icon-positive-subtle))\n * @cssproperty --dds-snackbar-error-background - Background color for error variant (default: var(--dds-background-negative-medium))\n * @cssproperty --dds-snackbar-error-border - Border color for error variant (default: var(--dds-border-width-base) solidvar(--dds-border-negative-subtle))\n * @cssproperty --dds-snackbar-error-icon - Icon color for error variant (default: var(--dds-icon-negative-subtle))\n * @cssproperty --dds-snackbar-variant-text - Text color for information, success, and error variants (default: var(--dds-text-neutral-base))\n * @cssproperty --dds-snackbar-variant-icon - Icon color for information, success, and error variants (default: var(--dds-text-neutral-base))\n * @cssproperty --dds-snackbar-variant-link - Link color for information, success, and error variants (default: var(--dds-text-neutral-base))\n * @cssproperty --dds-snackbar-animation-duration - Duration of entrance animations (default: 0.3s)\n * @cssproperty --dds-snackbar-animation-timing - Timing function for animations (default: ease-out)\n */\nexport default class DapDSSnackbarMessage extends DdsElement {\n static tagName = 'dap-ds-snackbar-message'\n\n static dependencies = {\n 'dap-ds-stack': DapDSStack,\n 'dap-ds-button': DapDSButton,\n 'dap-ds-link': DapDSLink,\n 'dap-ds-icon': DapDSIcon,\n 'dap-ds-icon-button': DapDSIconButton,\n }\n\n /** The actions of the snackbar item. */\n @property({ type: Array }) actions?: ActionType[] = []\n /** The message of the snackbar item. */\n @property({ type: String }) message = ''\n /** Whether the snackbar has a close button. */\n @property({ type: String, reflect: true }) closeButton = 'true'\n /** The message type of the snackbar item. */\n @property({ type: String }) alertType: AlertType = 'default'\n /** The custom style of the snackbar item. */\n @property({ type: Object }) customStyle?: Record<string, string>\n /** The position of the snackbar container for directional animations. */\n @property({ type: String }) position: SnackbarPosition = 'bottom-right'\n /** `data-testid` for the snackbar close button. */\n @property() closeButtonTestId = 'snackbar-close-button'\n\n @state() private isClosing = false\n\n static readonly styles = unsafeCSS(styles)\n\n private getActions(): TemplateResult | typeof nothing {\n if (this.actions && this.actions.length > 0) {\n return html`<dap-ds-stack\n part=\"actions\"\n exportparts=\"base:actions-base\"\n class=\"snackbar__actions\"\n direction=\"row\">\n ${this.actions.map((actionItem: ActionType, index: number) => {\n if (actionItem && typeof actionItem.func === 'function') {\n return html`<dap-ds-button\n variant=${actionItem.variant ?? 'primary'}\n data-testid=${`snackbar-action-${index}`}\n @click=${() => {\n if (actionItem.func) {\n actionItem.func()\n }\n }}\n >${ifDefined(actionItem.text)}</dap-ds-button\n >`\n } else {\n return html`<dap-ds-link\n class=\"snackbar__link\"\n href=${ifDefined(actionItem.href)}\n target=\"${ifDefined(actionItem.target)}\"\n rel=${ifDefined(actionItem.target ? actionItem.rel : undefined)}\n >${ifDefined(actionItem.text)}</dap-ds-link\n >`\n }\n })}\n </dap-ds-stack>`\n }\n return nothing\n }\n\n private getAlertTypeIcon(): TemplateResult | typeof nothing {\n let iconName = ''\n switch (this.alertType) {\n case 'information':\n iconName = 'information-2-fill'\n break\n case 'successful':\n iconName = 'checkbox-circle-fill'\n break\n case 'error':\n iconName = 'error-warning-fill'\n break\n default:\n }\n return iconName.length > 0\n ? html`<dap-ds-icon\n name=${iconName}\n size=\"lg\"\n class=\"snackbar__alert-icon\"></dap-ds-icon>`\n : nothing\n }\n\n private _close(id: string) {\n if (id) {\n this.isClosing = true\n // Wait for the closing animation to complete before emitting the close event\n setTimeout(() => {\n this.emit('dds-close', { id })\n }, 300) // Match the animation duration\n }\n }\n\n render() {\n return html`<div\n role=\"alert\"\n aria-label=${this.message}\n part=\"base\"\n class=${clsx(\n 'snackbar',\n `snackbar--${this.alertType}`,\n `snackbar--position-${this.position}`,\n { 'snackbar--closing': this.isClosing },\n )}\n style=${styleMap(this.customStyle ?? {})}>\n <div class=\"snackbar__main\">\n <div class=\"snackbar__left-group\">\n ${this.getAlertTypeIcon()}\n <div class=\"snackbar__content\">\n ${this.message\n ? html`<span part=\"text\" class=\"snackbar__text\"\n >${this.message}</span\n >`\n : html`<slot></slot>`}\n ${this.actions ? html` ${this.getActions()}` : nothing}\n </div>\n </div>\n ${this.closeButton === 'true'\n ? html`<dap-ds-icon-button\n @click=${() => this._close(this.id)}\n part=\"closebutton\"\n data-testid=${this.closeButtonTestId}\n class=\"snackbar__close\"\n aria-label=${translate('close')}>\n <dap-ds-icon\n part=\"close-icon\"\n class=\"snackbar__close-icon\"\n name=\"close-line\"></dap-ds-icon>\n </dap-ds-icon-button>`\n : nothing}\n </div>\n </div>`\n }\n}\n"],"names":["_DapDSSnackbarMessage","DdsElement","html","actionItem","index","_a","ifDefined","nothing","iconName","id","clsx","styleMap","translate","DapDSStack","DapDSButton","DapDSLink","DapDSIcon","DapDSIconButton","unsafeCSS","styles","DapDSSnackbarMessage","__decorateClass","property","state"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AA6DA,MAAqBA,IAArB,MAAqBA,UAA6BC,EAAW;AAAA,EAA7D,cAAA;AAAA,UAAA,GAAA,SAAA,GAY6B,KAAA,UAAyB,CAAC,GAEf,KAAA,UAAA,IAEmB,KAAA,cAAA,QAEN,KAAA,YAAA,WAIM,KAAA,WAAA,gBAEzB,KAAA,oBAAA,yBAEvB,KAAQ,YAAY;AAAA,EAAA;AAAA,EAIrB,aAA8C;AACpD,WAAI,KAAK,WAAW,KAAK,QAAQ,SAAS,IACjCC;AAAAA;AAAAA;AAAAA;AAAAA;AAAAA,UAKH,KAAK,QAAQ,IAAI,C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A,UAAA;AAEhBC,EAAA;AAAA,EAAXC,EAAS;AAAA,GAxBSF,EAwBP,WAAA,mBAAA;AAEKC,EAAA;AAAA,EAAhBE,EAAM;AAAA,GA1BYH,EA0BF,WAAA,WAAA;"}
|
|
1
|
+
{"version":3,"file":"snackbar-message.component.js","sources":["../../../src/components/snackbar/snackbar-message.component.ts"],"sourcesContent":["import clsx from 'clsx'\nimport { nothing, TemplateResult, unsafeCSS } from 'lit'\nimport { property, state } from 'lit/decorators.js'\nimport { ifDefined } from 'lit/directives/if-defined.js'\nimport { styleMap } from 'lit/directives/style-map.js'\nimport { html } from 'lit/static-html.js'\nimport { translate } from 'lit-i18n'\n\nimport { ActionType, AlertType, SnackbarPosition } from '@/common/types'\n\nimport { DdsElement } from '../../internal/dds-hu-element'\nimport DapDSButton from '../button/button.component'\nimport DapDSIcon from '../icon/icon.component'\nimport DapDSIconButton from '../icon-button/icon-button.component'\nimport DapDSLink from '../link/link.component'\nimport DapDSStack from '../stack/stack.component'\nimport styles from './snackbar-message.scss?inline'\n\n/**\n * `dap-ds-snackbar-message`\n * @summary The Snackbar component shows a sliding message to the user.\n * @element dap-ds-snackbar-message\n * @title - Snackbar message\n * @group snackbar\n *\n * @event {{ id: string }} dds-close - Fires when the snackbar closes.\n *\n * @slot default - The content of the snackbar.\n *\n * @csspart base - Main snackbar container.\n * @csspart text - The text part of the snackbar.\n * @csspart closebutton - The close button part of the component.\n * @csspart icon - The icon part of the close button.\n *\n * @cssproperty --dds-snackbar-width - Width of the snackbar (default: clamp(var(--dds-spacing-6000), 20vw, var(--dds-containers-xsmall)))\n * @cssproperty --dds-snackbar-gap - Gap between snackbar elements (default: var(--dds-spacing-400))\n * @cssproperty --dds-snackbar-padding - Padding inside the snackbar (default: var(--dds-spacing-400))\n * @cssproperty --dds-snackbar-margin-bottom - Bottom margin of the snackbar (default: var(--dds-spacing-400))\n * @cssproperty --dds-snackbar-transition - Transition property for the snackbar (default: transform var(--dds-transition-slow) var(--dds-easing-ease-out)allow-discrete, opacity var(--dds-transition-slow) var(--dds-easing-ease-out) allow-discrete, margin var(--dds-transition-slow) var(--dds-easing-ease-out) allow-discrete, box-shadow var(--dds-transition-slow) var(--dds-easing-ease-out) allow-discrete)\n * @cssproperty --dds-snackbar-border-radius - Border radius of the snackbar (default: var(--dds-radius-base))\n * @cssproperty --dds-snackbar-font-size - Font size used in the snackbar (default: var(--dds-font-sm))\n * @cssproperty --dds-snackbar-background - Background color of the snackbar (default: var(--dds-snackbar-error-background))\n * @cssproperty --dds-snackbar-border - Border color of the snackbar (default: var(--dds-snackbar-error-border))\n * @cssproperty --dds-snackbar-text - Text color of the snackbar (default: var(--dds-snackbar-variant-text))\n * @cssproperty --dds-snackbar-icon - Icon color of the snackbar (default: var(--dds-snackbar-variant-icon))\n * @cssproperty --dds-snackbar-link - Link color of the snackbar (default: var(--dds-snackbar-variant-link))\n * @cssproperty --dds-snackbar-information-background - Background color for information variant (default: var(--dds-background-informative-medium))\n * @cssproperty --dds-snackbar-information-border - Border color for information variant (default: var(--dds-border-width-base) solidvar(--dds-border-informative-subtle))\n * @cssproperty --dds-snackbar-information-icon - Icon color for information variant (default: var(--dds-icon-informative-subtle))\n * @cssproperty --dds-snackbar-success-background - Background color for success variant (default: var(--dds-background-positive-medium))\n * @cssproperty --dds-snackbar-success-border - Border color for success variant (default: var(--dds-border-width-base) solidvar(--dds-border-positive-subtle))\n * @cssproperty --dds-snackbar-success-icon - Icon color for success variant (default: var(--dds-icon-positive-subtle))\n * @cssproperty --dds-snackbar-error-background - Background color for error variant (default: var(--dds-background-negative-medium))\n * @cssproperty --dds-snackbar-error-border - Border color for error variant (default: var(--dds-border-width-base) solidvar(--dds-border-negative-subtle))\n * @cssproperty --dds-snackbar-error-icon - Icon color for error variant (default: var(--dds-icon-negative-subtle))\n * @cssproperty --dds-snackbar-variant-text - Text color for information, success, and error variants (default: var(--dds-text-neutral-base))\n * @cssproperty --dds-snackbar-variant-icon - Icon color for information, success, and error variants (default: var(--dds-text-neutral-base))\n * @cssproperty --dds-snackbar-variant-link - Link color for information, success, and error variants (default: var(--dds-text-neutral-base))\n * @cssproperty --dds-snackbar-animation-duration - Duration of entrance animations (default: 0.3s)\n * @cssproperty --dds-snackbar-animation-timing - Timing function for animations (default: ease-out)\n */\nexport default class DapDSSnackbarMessage extends DdsElement {\n static tagName = 'dap-ds-snackbar-message'\n\n static dependencies = {\n 'dap-ds-stack': DapDSStack,\n 'dap-ds-button': DapDSButton,\n 'dap-ds-link': DapDSLink,\n 'dap-ds-icon': DapDSIcon,\n 'dap-ds-icon-button': DapDSIconButton,\n }\n\n /** The actions of the snackbar item. */\n @property({ type: Array }) actions?: ActionType[] = []\n /** The message of the snackbar item. */\n @property({ type: String }) message = ''\n /** Whether the snackbar has a close button. */\n @property({ type: String, reflect: true }) closeButton = 'true'\n /** The message type of the snackbar item. */\n @property({ type: String }) alertType: AlertType = 'default'\n /** The custom style of the snackbar item. */\n @property({ type: Object }) customStyle?: Record<string, string>\n /** The position of the snackbar container for directional animations. */\n @property({ type: String }) position: SnackbarPosition = 'bottom-right'\n /** `data-testid` for the snackbar close button. */\n @property() closeButtonTestId = 'snackbar-close-button'\n\n @state() private isClosing = false\n\n static readonly styles = unsafeCSS(styles)\n\n private getActions(): TemplateResult | typeof nothing {\n if (this.actions && this.actions.length > 0) {\n return html`<dap-ds-stack\n part=\"actions\"\n exportparts=\"base:actions-base\"\n class=\"snackbar__actions\"\n direction=\"row\">\n ${this.actions.map((actionItem: ActionType, index: number) => {\n if (actionItem && typeof actionItem.func === 'function') {\n return html`<dap-ds-button\n variant=${actionItem.variant ?? 'primary'}\n data-testid=${`snackbar-action-${index}`}\n @click=${() => {\n if (actionItem.func) {\n actionItem.func()\n }\n }}\n >${ifDefined(actionItem.text)}</dap-ds-button\n >`\n } else {\n return html`<dap-ds-link\n class=\"snackbar__link\"\n href=${ifDefined(actionItem.href)}\n target=\"${ifDefined(actionItem.target)}\"\n rel=${ifDefined(actionItem.target ? actionItem.rel : undefined)}\n >${ifDefined(actionItem.text)}</dap-ds-link\n >`\n }\n })}\n </dap-ds-stack>`\n }\n return nothing\n }\n\n private getAlertTypeIcon(): TemplateResult | typeof nothing {\n let iconName = ''\n switch (this.alertType) {\n case 'information':\n iconName = 'information-2-fill'\n break\n case 'successful':\n iconName = 'checkbox-circle-fill'\n break\n case 'error':\n iconName = 'error-warning-fill'\n break\n default:\n }\n return iconName.length > 0\n ? html`<dap-ds-icon\n name=${iconName}\n size=\"lg\"\n class=\"snackbar__alert-icon\"></dap-ds-icon>`\n : nothing\n }\n\n private _close(id: string) {\n if (id) {\n this.isClosing = true\n // Wait for the closing animation to complete before emitting the close event\n setTimeout(() => {\n this.emit('dds-close', { id })\n }, 300) // Match the animation duration\n }\n }\n\n render() {\n return html`<div\n part=\"base\"\n class=${clsx(\n 'snackbar',\n `snackbar--${this.alertType}`,\n `snackbar--position-${this.position}`,\n { 'snackbar--closing': this.isClosing },\n )}\n style=${styleMap(this.customStyle ?? {})}>\n <div class=\"snackbar__main\">\n <div class=\"snackbar__left-group\">\n ${this.getAlertTypeIcon()}\n <div class=\"snackbar__content\">\n ${this.message\n ? html`<span part=\"text\" class=\"snackbar__text\"\n >${this.message}</span\n >`\n : html`<slot></slot>`}\n ${this.actions ? html` ${this.getActions()}` : nothing}\n </div>\n </div>\n ${this.closeButton === 'true'\n ? html`<dap-ds-icon-button\n @click=${() => this._close(this.id)}\n part=\"closebutton\"\n data-testid=${this.closeButtonTestId}\n class=\"snackbar__close\"\n aria-label=${translate('close')}>\n <dap-ds-icon\n part=\"close-icon\"\n class=\"snackbar__close-icon\"\n name=\"close-line\"></dap-ds-icon>\n </dap-ds-icon-button>`\n : nothing}\n </div>\n </div>`\n }\n}\n"],"names":["_DapDSSnackbarMessage","DdsElement","html","actionItem","index","_a","ifDefined","nothing","iconName","id","clsx","styleMap","translate","DapDSStack","DapDSButton","DapDSLink","DapDSIcon","DapDSIconButton","unsafeCSS","styles","DapDSSnackbarMessage","__decorateClass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