@ds-autonomie/web-components 2.5.0 → 2.5.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 +12 -0
- package/cdn/chunks/{chunk.J5KWVZHL.js → chunk.2BQQJKFU.js} +19 -111
- package/cdn/chunks/{chunk.A5QRPK4Q.js → chunk.3XJTVFZ2.js} +1 -1
- package/cdn/chunks/{chunk.3OSWL542.js → chunk.53DHJKYL.js} +0 -6
- package/cdn/chunks/{chunk.5BQ2BGS6.js → chunk.6KSC4CRL.js} +1 -0
- package/cdn/chunks/{chunk.HG4TPK7J.js → chunk.7CBNLWGC.js} +15 -153
- package/cdn/chunks/{chunk.5UVKMYSG.js → chunk.BQX4GGIU.js} +18 -12
- package/cdn/chunks/{chunk.H2OEFMQC.js → chunk.BWYI3OOJ.js} +0 -6
- package/cdn/chunks/chunk.CAWNJ57J.js +291 -0
- package/cdn/chunks/{chunk.URME4YZI.js → chunk.E2ERJT5L.js} +4 -121
- package/cdn/chunks/{chunk.CMRQV2SO.js → chunk.EVV7CPIX.js} +3 -3
- package/cdn/chunks/{chunk.2N65UIM6.js → chunk.IPKU2NK6.js} +23 -1
- package/cdn/chunks/{chunk.UM64ZD3C.js → chunk.JUCW3BPM.js} +1 -1
- package/cdn/chunks/{chunk.EF2VOGBL.js → chunk.LYIECKOK.js} +1 -1
- package/cdn/chunks/{chunk.WLND36JK.js → chunk.MMT7DZQU.js} +19 -10
- package/cdn/chunks/{chunk.BKVL3A5I.js → chunk.MRBMS4RB.js} +6 -2
- package/cdn/chunks/{chunk.VRC57YIG.js → chunk.NNXRECFT.js} +1 -1
- package/cdn/chunks/chunk.NON7TU3E.js +15 -0
- package/cdn/chunks/{chunk.L3ZYNSI3.js → chunk.OCDDQJHV.js} +3 -3
- package/cdn/chunks/{chunk.BNLQUWBO.js → chunk.OQUR5UM4.js} +1 -1
- package/cdn/chunks/{chunk.LZCR7P7U.js → chunk.PQ4KTIXS.js} +3 -129
- package/cdn/chunks/chunk.PT3QFRYN.js +336 -0
- package/cdn/chunks/{chunk.AJFNFADL.js → chunk.QUA6RD7E.js} +1 -1
- package/cdn/chunks/{chunk.TY7NQYTC.js → chunk.T6APUNAB.js} +21 -113
- package/cdn/chunks/{chunk.2YVHHVLG.js → chunk.UORXHDBJ.js} +3 -2
- package/cdn/chunks/{chunk.2FF44G4Y.js → chunk.WWI5IYQY.js} +3 -3
- package/cdn/chunks/{chunk.JVTWZUNG.js → chunk.XODAGFNB.js} +1 -1
- package/cdn/chunks/chunk.YGJ3KERC.js +290 -0
- package/cdn/chunks/{chunk.3KJHZGAI.js → chunk.ZHNP2Z3B.js} +1 -1
- package/cdn/components/checkbox/checkbox.js +3 -3
- package/cdn/components/checkbox-button/checkbox-button.js +2 -2
- package/cdn/components/checkbox-card/checkbox-card.js +2 -2
- package/cdn/components/checkbox-group/checkbox-group.js +1 -1
- package/cdn/components/filter-counter/filter-counter.js +11 -8
- package/cdn/components/filter-date/filter-date.js +1 -1
- package/cdn/components/filter-range/filter-range.js +11 -8
- package/cdn/components/filter-select/filter-select.js +12 -9
- package/cdn/components/input/input.d.ts +13 -77
- package/cdn/components/input/input.js +11 -8
- package/cdn/components/input-date/input-date.d.ts +4 -42
- package/cdn/components/input-date/input-date.js +5 -4
- package/cdn/components/input-date/input-date.styles.js +2 -2
- package/cdn/components/input-mask/input-mask.d.ts +3 -50
- package/cdn/components/input-mask/input-mask.js +2 -1
- package/cdn/components/input-native/input-native.d.ts +57 -0
- package/cdn/components/input-native/input-native.js +43 -0
- package/cdn/components/{input/input.styles.js → input-native/input-native.styles.js} +4 -3
- package/cdn/components/{input/input.utils.d.ts → input-native/input-native.utils.d.ts} +1 -1
- package/cdn/components/{input/input.utils.js → input-native/input-native.utils.js} +1 -1
- package/cdn/components/input-otp/input-otp.d.ts +6 -50
- package/cdn/components/input-otp/input-otp.js +2 -1
- package/cdn/components/input-phone/input-phone.d.ts +5 -36
- package/cdn/components/input-phone/input-phone.js +2 -1
- package/cdn/components/input-time/input-time.d.ts +5 -54
- package/cdn/components/input-time/input-time.js +4 -3
- package/cdn/components/input-time/input-time.styles.js +2 -2
- package/cdn/components/pagination/pagination.js +11 -8
- package/cdn/components/radio/radio.js +1 -1
- package/cdn/components/radio-card/radio-card.js +2 -2
- package/cdn/components/tab-group/tab-group.d.ts +2 -0
- package/cdn/components/tab-group/tab-group.js +1 -1
- package/cdn/components/table/table.js +2 -2
- package/cdn/components/table/table.styles.js +1 -1
- package/cdn/components/table-body/table-body.js +3 -3
- package/cdn/components/table-head/table-head.js +3 -3
- package/cdn/components/table-header-cell/table-header-cell.js +2 -2
- package/cdn/components/table-header-cell/table-header-cell.styles.js +1 -1
- package/cdn/components/table-header-row/table-header-row.js +5 -5
- package/cdn/components/table-row/table-row.js +3 -3
- package/cdn/components/tree/tree.js +5 -5
- package/cdn/components/tree-item/tree-item.js +3 -3
- package/cdn/custom-elements.json +750 -2288
- package/cdn/design-system.js +70 -67
- package/cdn/internal/components/checkbox-box/checkbox-box.styles.js +0 -6
- package/cdn/internal/components/date-field/date-field.d.ts +11 -0
- package/cdn/internal/components/date-field/date-field.js +23 -1
- package/cdn/internal/components/input-base/input-base.d.ts +118 -0
- package/cdn/internal/components/input-base/input-base.js +313 -0
- package/cdn/internal/components/input-base/input-base.styles.js +302 -0
- package/cdn/internal/components/input-base/input-base.utils.d.ts +1 -0
- package/cdn/internal/components/input-base/input-base.utils.js +1 -0
- package/cdn/internal/components/radio-icon/radio-icon.styles.js +0 -6
- package/cdn/vscode.html-custom-data.json +15 -320
- package/cdn/web-types.json +200 -1244
- package/dist/chunks/chunk.3CWUZQRT.js +325 -0
- package/dist/chunks/{chunk.OKUA77L4.js → chunk.4S7APMGY.js} +18 -12
- package/dist/chunks/{chunk.PWVYG6XN.js → chunk.4ZAABSYS.js} +0 -6
- package/dist/chunks/{chunk.IE7IGJZB.js → chunk.63BQQE4G.js} +23 -1
- package/dist/chunks/{chunk.OWV6XZFR.js → chunk.7QLR3F26.js} +1 -1
- package/dist/chunks/{chunk.XVFPRM26.js → chunk.AHHKOQL3.js} +1 -1
- package/dist/chunks/{chunk.P2LEUT2Q.js → chunk.BYB2ODNQ.js} +4 -121
- package/dist/chunks/{chunk.3ZF3W6DC.js → chunk.DHCXNXX3.js} +1 -1
- package/dist/chunks/chunk.DJNQIAYV.js +283 -0
- package/dist/chunks/{chunk.DRFXWCPL.js → chunk.DKIEKIV4.js} +3 -129
- package/dist/chunks/{chunk.OHDR6G6J.js → chunk.DMIXIORN.js} +3 -3
- package/dist/chunks/{chunk.IICLN6L3.js → chunk.DUPWIWDC.js} +15 -153
- package/dist/chunks/{chunk.Z2A5AEMU.js → chunk.DXRDCCL4.js} +1 -1
- package/dist/chunks/{chunk.54CFE45F.js → chunk.L2B7WMWE.js} +3 -3
- package/dist/chunks/{chunk.62WXVS5Q.js → chunk.NKOMMJMK.js} +6 -2
- package/dist/chunks/{chunk.7XUPS5FG.js → chunk.PHSUFADX.js} +1 -0
- package/dist/chunks/chunk.QFO2VDJ3.js +286 -0
- package/dist/chunks/{chunk.DFBKUH2U.js → chunk.RGHMS6RU.js} +1 -1
- package/dist/chunks/{chunk.ORLKMJIV.js → chunk.SFD6GJDA.js} +19 -10
- package/dist/chunks/{chunk.ZRW5L2NC.js → chunk.SGKW2DOH.js} +3 -2
- package/dist/chunks/{chunk.H7ZLX7SO.js → chunk.TODRUEYV.js} +3 -3
- package/dist/chunks/chunk.ULPMZDTP.js +13 -0
- package/dist/chunks/{chunk.2BZBH3CX.js → chunk.URDP5HQR.js} +0 -6
- package/dist/chunks/{chunk.EY2LRNGD.js → chunk.X6M22EYD.js} +21 -113
- package/dist/chunks/{chunk.OMUELARQ.js → chunk.Y4CDJYQO.js} +19 -111
- package/dist/chunks/{chunk.RS4S7SAD.js → chunk.Y6XPKQ25.js} +1 -1
- package/dist/chunks/{chunk.Y3I7GUNB.js → chunk.Z42XBNIN.js} +1 -1
- package/dist/chunks/{chunk.DISFQ7ZU.js → chunk.ZMMQOF24.js} +1 -1
- package/dist/components/checkbox/checkbox.js +3 -3
- package/dist/components/checkbox-button/checkbox-button.js +2 -2
- package/dist/components/checkbox-card/checkbox-card.js +2 -2
- package/dist/components/checkbox-group/checkbox-group.js +1 -1
- package/dist/components/filter-counter/filter-counter.js +11 -8
- package/dist/components/filter-date/filter-date.js +1 -1
- package/dist/components/filter-range/filter-range.js +11 -8
- package/dist/components/filter-select/filter-select.js +12 -9
- package/dist/components/input/input.d.ts +13 -77
- package/dist/components/input/input.js +11 -8
- package/dist/components/input-date/input-date.d.ts +4 -42
- package/dist/components/input-date/input-date.js +5 -4
- package/dist/components/input-date/input-date.styles.js +2 -2
- package/dist/components/input-mask/input-mask.d.ts +3 -50
- package/dist/components/input-mask/input-mask.js +2 -1
- package/dist/components/input-native/input-native.d.ts +57 -0
- package/dist/components/input-native/input-native.js +35 -0
- package/dist/components/input-native/input-native.styles.d.ts +2 -0
- package/dist/components/input-native/input-native.styles.js +10 -0
- package/dist/components/{input/input.utils.d.ts → input-native/input-native.utils.d.ts} +1 -1
- package/dist/components/{input/input.utils.js → input-native/input-native.utils.js} +1 -1
- package/dist/components/input-otp/input-otp.d.ts +6 -50
- package/dist/components/input-otp/input-otp.js +2 -1
- package/dist/components/input-phone/input-phone.d.ts +5 -36
- package/dist/components/input-phone/input-phone.js +2 -1
- package/dist/components/input-time/input-time.d.ts +5 -54
- package/dist/components/input-time/input-time.js +4 -3
- package/dist/components/input-time/input-time.styles.js +2 -2
- package/dist/components/pagination/pagination.js +11 -8
- package/dist/components/radio/radio.js +1 -1
- package/dist/components/radio-card/radio-card.js +2 -2
- package/dist/components/tab-group/tab-group.d.ts +2 -0
- package/dist/components/tab-group/tab-group.js +1 -1
- package/dist/components/table/table.js +2 -2
- package/dist/components/table/table.styles.js +1 -1
- package/dist/components/table-body/table-body.js +3 -3
- package/dist/components/table-head/table-head.js +3 -3
- package/dist/components/table-header-cell/table-header-cell.js +2 -2
- package/dist/components/table-header-cell/table-header-cell.styles.js +1 -1
- package/dist/components/table-header-row/table-header-row.js +5 -5
- package/dist/components/table-row/table-row.js +3 -3
- package/dist/components/tree/tree.js +5 -5
- package/dist/components/tree-item/tree-item.js +3 -3
- package/dist/custom-elements.json +750 -2288
- package/dist/design-system.js +70 -67
- package/dist/internal/components/checkbox-box/checkbox-box.styles.js +0 -6
- package/dist/internal/components/date-field/date-field.d.ts +11 -0
- package/dist/internal/components/date-field/date-field.js +23 -1
- package/dist/internal/components/input-base/input-base.d.ts +118 -0
- package/dist/internal/components/input-base/input-base.js +313 -0
- package/dist/internal/components/input-base/input-base.styles.d.ts +2 -0
- package/dist/internal/components/input-base/input-base.styles.js +302 -0
- package/dist/internal/components/input-base/input-base.utils.d.ts +1 -0
- package/dist/internal/components/input-base/input-base.utils.js +1 -0
- package/dist/internal/components/radio-icon/radio-icon.styles.js +0 -6
- package/dist/vscode.html-custom-data.json +15 -320
- package/dist/web-types.json +200 -1244
- package/package.json +17 -17
- package/cdn/chunks/chunk.5F7AUS4F.js +0 -703
- package/dist/chunks/chunk.JJT6FP7U.js +0 -690
- package/dist/components/input/input.styles.js +0 -9
- /package/cdn/components/{input/input.styles.d.ts → input-native/input-native.styles.d.ts} +0 -0
- /package/{dist/components/input/input.styles.d.ts → cdn/internal/components/input-base/input-base.styles.d.ts} +0 -0
|
@@ -0,0 +1,291 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DSAInputTime
|
|
3
|
+
} from "./chunk.7CBNLWGC.js";
|
|
4
|
+
import {
|
|
5
|
+
DSAInputDate
|
|
6
|
+
} from "./chunk.T6APUNAB.js";
|
|
7
|
+
import {
|
|
8
|
+
InputBase
|
|
9
|
+
} from "./chunk.YGJ3KERC.js";
|
|
10
|
+
import {
|
|
11
|
+
watch
|
|
12
|
+
} from "./chunk.4FQJ3QJK.js";
|
|
13
|
+
import {
|
|
14
|
+
o
|
|
15
|
+
} from "./chunk.YQLIIKLI.js";
|
|
16
|
+
import {
|
|
17
|
+
e,
|
|
18
|
+
n,
|
|
19
|
+
t
|
|
20
|
+
} from "./chunk.DZB6XUZ7.js";
|
|
21
|
+
import {
|
|
22
|
+
x
|
|
23
|
+
} from "./chunk.7HUC6BF3.js";
|
|
24
|
+
import {
|
|
25
|
+
__decorateClass
|
|
26
|
+
} from "./chunk.4ZGVANML.js";
|
|
27
|
+
|
|
28
|
+
// src/components/input/input.ts
|
|
29
|
+
var DSAInput = class extends InputBase {
|
|
30
|
+
/**
|
|
31
|
+
* Connect methods to underlying input element
|
|
32
|
+
*/
|
|
33
|
+
/** Gets or sets the current value as a `Date` object. Returns `null` if the value can't be converted. */
|
|
34
|
+
get valueAsDate() {
|
|
35
|
+
return this.inputElement.valueAsDate;
|
|
36
|
+
}
|
|
37
|
+
set valueAsDate(newValue) {
|
|
38
|
+
this.inputElement.valueAsDate = newValue;
|
|
39
|
+
this.value = this.inputElement.value;
|
|
40
|
+
}
|
|
41
|
+
/** Gets or sets the current value as a number. Returns `NaN` if the value can't be converted. */
|
|
42
|
+
get valueAsNumber() {
|
|
43
|
+
return this.inputElement.valueAsNumber;
|
|
44
|
+
}
|
|
45
|
+
set valueAsNumber(newValue) {
|
|
46
|
+
this.inputElement.valueAsNumber = newValue;
|
|
47
|
+
this.value = this.inputElement.value;
|
|
48
|
+
}
|
|
49
|
+
/** Gets the validity state object */
|
|
50
|
+
get validity() {
|
|
51
|
+
return this.inputElement.validity;
|
|
52
|
+
}
|
|
53
|
+
/** Gets the validation message */
|
|
54
|
+
get validationMessage() {
|
|
55
|
+
return this.inputElement.validationMessage;
|
|
56
|
+
}
|
|
57
|
+
handleChange() {
|
|
58
|
+
this.value = this.inputElement.value;
|
|
59
|
+
}
|
|
60
|
+
handleInput() {
|
|
61
|
+
this.value = this.inputElement.value;
|
|
62
|
+
}
|
|
63
|
+
handleStepChange() {
|
|
64
|
+
this.inputElement.step = this.step;
|
|
65
|
+
this.formControlController.updateValidity();
|
|
66
|
+
}
|
|
67
|
+
/** Sets focus on the input. */
|
|
68
|
+
focus(options) {
|
|
69
|
+
this.inputElement.focus(options);
|
|
70
|
+
}
|
|
71
|
+
/** Removes focus from the input. */
|
|
72
|
+
blur() {
|
|
73
|
+
this.inputElement.blur();
|
|
74
|
+
}
|
|
75
|
+
/** Selects all the text in the input. */
|
|
76
|
+
select() {
|
|
77
|
+
this.inputElement.select();
|
|
78
|
+
}
|
|
79
|
+
/** Sets the start and end positions of the text selection (0-based). */
|
|
80
|
+
setSelectionRange(selectionStart, selectionEnd, selectionDirection = "none") {
|
|
81
|
+
this.inputElement.setSelectionRange(
|
|
82
|
+
selectionStart,
|
|
83
|
+
selectionEnd,
|
|
84
|
+
selectionDirection
|
|
85
|
+
);
|
|
86
|
+
}
|
|
87
|
+
/** Replaces a range of text with a new string. */
|
|
88
|
+
setRangeText(replacement, start, end, selectMode) {
|
|
89
|
+
this.inputElement.setRangeText(replacement, start, end, selectMode);
|
|
90
|
+
if (this.value !== this.inputElement.value) {
|
|
91
|
+
this.value = this.inputElement.value;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
async showTimePicker() {
|
|
95
|
+
if (this.inputElement instanceof DSAInputTime) {
|
|
96
|
+
await this.inputElement.showTimePicker();
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
async hideTimePicker() {
|
|
100
|
+
if (this.inputElement instanceof DSAInputTime) {
|
|
101
|
+
await this.inputElement.hideTimePicker();
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
async showDatepicker() {
|
|
105
|
+
if (this.inputElement instanceof DSAInputDate) {
|
|
106
|
+
await this.inputElement.showDatepicker();
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
async hideDatepicker() {
|
|
110
|
+
if (this.inputElement instanceof DSAInputDate) {
|
|
111
|
+
await this.inputElement.hideDatepicker();
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
/** Increments the value of a numeric or time input type by the value of the step attribute, multiplied by an optional number parameter. */
|
|
115
|
+
stepUp(stepNumber) {
|
|
116
|
+
this.inputElement.stepUp(stepNumber);
|
|
117
|
+
if (this.value !== this.inputElement.value) {
|
|
118
|
+
this.value = this.inputElement.value;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
/** Decrements the value of a numeric or time input type by the value of the step attribute, multiplied by an optional number parameter. */
|
|
122
|
+
stepDown(stepNumber) {
|
|
123
|
+
this.inputElement.stepDown(stepNumber);
|
|
124
|
+
if (this.value !== this.inputElement.value) {
|
|
125
|
+
this.value = this.inputElement.value;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
/** Checks for validity but does not show a validation message. Returns `true` when valid and `false` when invalid. */
|
|
129
|
+
checkValidity() {
|
|
130
|
+
return this.inputElement.checkValidity();
|
|
131
|
+
}
|
|
132
|
+
/** Gets the associated form, if one exists. */
|
|
133
|
+
getForm() {
|
|
134
|
+
return this.formControlController.getForm();
|
|
135
|
+
}
|
|
136
|
+
/** Checks for validity and shows the browser's validation message if the control is invalid. */
|
|
137
|
+
reportValidity() {
|
|
138
|
+
return this.inputElement.reportValidity();
|
|
139
|
+
}
|
|
140
|
+
/** Sets a custom validation message. Pass an empty string to restore validity. */
|
|
141
|
+
setCustomValidity(message) {
|
|
142
|
+
this.inputElement.setCustomValidity(message);
|
|
143
|
+
}
|
|
144
|
+
async getUpdateComplete() {
|
|
145
|
+
if (!this.inputElement) return false;
|
|
146
|
+
return await this.inputElement.updateComplete;
|
|
147
|
+
}
|
|
148
|
+
render() {
|
|
149
|
+
if (this.type === "date") {
|
|
150
|
+
return x`
|
|
151
|
+
<dsa-input-date
|
|
152
|
+
class="input-element"
|
|
153
|
+
name=${o(this.name)}
|
|
154
|
+
title=${o(this.title)}
|
|
155
|
+
value=${this.value}
|
|
156
|
+
.defaultValue=${o(this.defaultValue)}
|
|
157
|
+
size=${o(this.size)}
|
|
158
|
+
variant=${o(this.variant)}
|
|
159
|
+
label=${o(this.label)}
|
|
160
|
+
help-text=${o(this.helpText)}
|
|
161
|
+
?clearable=${this.clearable}
|
|
162
|
+
?disabled=${this.disabled}
|
|
163
|
+
lang=${o(this.lang)}
|
|
164
|
+
placeholder=${o(this.placeholder)}
|
|
165
|
+
?readonly=${this.readonly}
|
|
166
|
+
?error=${this.error}
|
|
167
|
+
.errorMessage=${o(this.errorMessage)}
|
|
168
|
+
form=${o(this.form)}
|
|
169
|
+
.formControlController=${this.formControlController}
|
|
170
|
+
?required=${this.required}
|
|
171
|
+
min=${o(this.min)}
|
|
172
|
+
max=${o(this.max)}
|
|
173
|
+
calendar-start-date=${o(this.calendarStartDate)}
|
|
174
|
+
?autofocus=${this.autofocus}
|
|
175
|
+
enterkeyhint=${o(this.enterkeyhint)}
|
|
176
|
+
@dsa-change=${this.handleChange}
|
|
177
|
+
@dsa-input=${this.handleInput}
|
|
178
|
+
description=${o(this.description)}
|
|
179
|
+
>
|
|
180
|
+
${this.hasSlotController.test("label") ? x` <slot name="label" slot="label"></slot> ` : ""}
|
|
181
|
+
${this.hasSlotController.test("prefix") ? x` <slot name="prefix" slot="prefix"></slot> ` : ""}
|
|
182
|
+
${this.hasSlotController.test("help-text") ? x` <slot name="help-text" slot="help-text"></slot> ` : ""}
|
|
183
|
+
${this.hasSlotController.test("tooltip") ? x` <slot name="tooltip" slot="tooltip"></slot> ` : ""}
|
|
184
|
+
</dsa-input-date>
|
|
185
|
+
`;
|
|
186
|
+
} else if (this.type === "time") {
|
|
187
|
+
return x`
|
|
188
|
+
<dsa-input-time
|
|
189
|
+
class="input-element"
|
|
190
|
+
name=${o(this.name)}
|
|
191
|
+
title=${o(this.title)}
|
|
192
|
+
value=${this.value}
|
|
193
|
+
.defaultValue=${o(this.defaultValue)}
|
|
194
|
+
size=${o(this.size)}
|
|
195
|
+
variant=${o(this.variant)}
|
|
196
|
+
label=${o(this.label)}
|
|
197
|
+
help-text=${o(this.helpText)}
|
|
198
|
+
?clearable=${this.clearable}
|
|
199
|
+
?disabled=${this.disabled}
|
|
200
|
+
?readonly=${this.readonly}
|
|
201
|
+
?error=${this.error}
|
|
202
|
+
.errorMessage=${o(this.errorMessage)}
|
|
203
|
+
form=${o(this.form)}
|
|
204
|
+
.formControlController=${this.formControlController}
|
|
205
|
+
?required=${this.required}
|
|
206
|
+
min=${o(this.min)}
|
|
207
|
+
max=${o(this.max)}
|
|
208
|
+
step=${o(this.step)}
|
|
209
|
+
?autofocus=${this.autofocus}
|
|
210
|
+
enterkeyhint=${o(this.enterkeyhint)}
|
|
211
|
+
@dsa-change=${this.handleChange}
|
|
212
|
+
@dsa-input=${this.handleInput}
|
|
213
|
+
description=${o(this.description)}
|
|
214
|
+
>
|
|
215
|
+
${this.hasSlotController.test("label") ? x` <slot name="label" slot="label"></slot> ` : ""}
|
|
216
|
+
${this.hasSlotController.test("prefix") ? x` <slot name="prefix" slot="prefix"></slot> ` : ""}
|
|
217
|
+
${this.hasSlotController.test("suffix") ? x` <slot name="suffix" slot="suffix"></slot> ` : ""}
|
|
218
|
+
${this.hasSlotController.test("help-text") ? x` <slot name="help-text" slot="help-text"></slot> ` : ""}
|
|
219
|
+
${this.hasSlotController.test("tooltip") ? x` <slot name="tooltip" slot="tooltip"></slot> ` : ""}
|
|
220
|
+
</dsa-input-time>
|
|
221
|
+
`;
|
|
222
|
+
} else {
|
|
223
|
+
return x`
|
|
224
|
+
<dsa-input-native
|
|
225
|
+
class="input-element"
|
|
226
|
+
title=${o(this.title)}
|
|
227
|
+
name=${o(this.name)}
|
|
228
|
+
size=${o(this.size)}
|
|
229
|
+
variant=${o(this.variant)}
|
|
230
|
+
label=${o(this.label)}
|
|
231
|
+
help-text=${o(this.helpText)}
|
|
232
|
+
?disabled=${this.disabled}
|
|
233
|
+
placeholder=${o(this.placeholder)}
|
|
234
|
+
?readonly=${this.readonly}
|
|
235
|
+
?error=${this.error}
|
|
236
|
+
.errorMessage=${o(this.errorMessage)}
|
|
237
|
+
form=${o(this.form)}
|
|
238
|
+
.formControlController=${this.formControlController}
|
|
239
|
+
?required=${this.required}
|
|
240
|
+
description=${o(this.description)}
|
|
241
|
+
type=${this.type}
|
|
242
|
+
value=${this.value}
|
|
243
|
+
.defaultValue=${o(this.defaultValue)}
|
|
244
|
+
?clearable=${this.clearable}
|
|
245
|
+
?passwordVisible=${this.passwordVisible}
|
|
246
|
+
pattern=${o(this.pattern)}
|
|
247
|
+
minlength=${o(this.minlength)}
|
|
248
|
+
maxlength=${o(this.maxlength)}
|
|
249
|
+
?counter=${this.counter}
|
|
250
|
+
min=${o(this.min)}
|
|
251
|
+
max=${o(this.max)}
|
|
252
|
+
step=${o(this.step)}
|
|
253
|
+
autocapitalize=${o(this.autocapitalize)}
|
|
254
|
+
autocorrect=${o(this.autocorrect)}
|
|
255
|
+
autocomplete=${o(this.autocomplete)}
|
|
256
|
+
?autofocus=${this.autofocus}
|
|
257
|
+
enterkeyhint=${o(this.enterkeyhint)}
|
|
258
|
+
spellcheck=${this.spellcheck}
|
|
259
|
+
inputmode=${o(this.inputmode)}
|
|
260
|
+
@dsa-change=${this.handleChange}
|
|
261
|
+
@dsa-input=${this.handleInput}
|
|
262
|
+
>
|
|
263
|
+
${this.hasSlotController.test("label") ? x` <slot name="label" slot="label"></slot> ` : ""}
|
|
264
|
+
${this.hasSlotController.test("prefix") ? x` <slot name="prefix" slot="prefix"></slot> ` : ""}
|
|
265
|
+
${this.hasSlotController.test("suffix") ? x` <slot name="suffix" slot="suffix"></slot> ` : ""}
|
|
266
|
+
${this.hasSlotController.test("help-text") ? x` <slot name="help-text" slot="help-text"></slot> ` : ""}
|
|
267
|
+
${this.hasSlotController.test("tooltip") ? x` <slot name="tooltip" slot="tooltip"></slot> ` : ""}
|
|
268
|
+
</dsa-input-native>
|
|
269
|
+
`;
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
};
|
|
273
|
+
__decorateClass([
|
|
274
|
+
e(".input-element")
|
|
275
|
+
], DSAInput.prototype, "inputElement", 2);
|
|
276
|
+
__decorateClass([
|
|
277
|
+
n()
|
|
278
|
+
], DSAInput.prototype, "lang", 2);
|
|
279
|
+
__decorateClass([
|
|
280
|
+
n({ attribute: "calendar-start-date" })
|
|
281
|
+
], DSAInput.prototype, "calendarStartDate", 2);
|
|
282
|
+
__decorateClass([
|
|
283
|
+
watch("step", { waitUntilFirstUpdate: true })
|
|
284
|
+
], DSAInput.prototype, "handleStepChange", 1);
|
|
285
|
+
DSAInput = __decorateClass([
|
|
286
|
+
t("dsa-input")
|
|
287
|
+
], DSAInput);
|
|
288
|
+
|
|
289
|
+
export {
|
|
290
|
+
DSAInput
|
|
291
|
+
};
|
|
@@ -2,17 +2,11 @@ import {
|
|
|
2
2
|
input_otp_styles_default
|
|
3
3
|
} from "./chunk.W6JXBJWF.js";
|
|
4
4
|
import {
|
|
5
|
-
|
|
6
|
-
} from "./chunk.
|
|
5
|
+
InputBase
|
|
6
|
+
} from "./chunk.YGJ3KERC.js";
|
|
7
7
|
import {
|
|
8
8
|
l
|
|
9
9
|
} from "./chunk.7PPSHHT2.js";
|
|
10
|
-
import {
|
|
11
|
-
defaultValue
|
|
12
|
-
} from "./chunk.YY5FKN3H.js";
|
|
13
|
-
import {
|
|
14
|
-
FormControlController
|
|
15
|
-
} from "./chunk.3NWILHZZ.js";
|
|
16
10
|
import {
|
|
17
11
|
watch
|
|
18
12
|
} from "./chunk.4FQJ3QJK.js";
|
|
@@ -39,38 +33,12 @@ import {
|
|
|
39
33
|
} from "./chunk.4ZGVANML.js";
|
|
40
34
|
|
|
41
35
|
// src/components/input-otp/input-otp.ts
|
|
42
|
-
var DSAInputOTP = class extends
|
|
36
|
+
var DSAInputOTP = class extends InputBase {
|
|
43
37
|
constructor() {
|
|
44
38
|
super(...arguments);
|
|
45
|
-
this.formControlController = new FormControlController(this, {
|
|
46
|
-
assumeInteractionOn: ["dsa-blur", "dsa-input"]
|
|
47
|
-
});
|
|
48
|
-
this.hasFocus = false;
|
|
49
39
|
this.currentIndex = 0;
|
|
50
|
-
this.value = "";
|
|
51
|
-
this.defaultValue = "";
|
|
52
40
|
this.length = 6;
|
|
53
41
|
}
|
|
54
|
-
/** Gets the validity state object */
|
|
55
|
-
get validity() {
|
|
56
|
-
return this.input.validity;
|
|
57
|
-
}
|
|
58
|
-
/** Gets the validation message */
|
|
59
|
-
get validationMessage() {
|
|
60
|
-
return this.input.validationMessage;
|
|
61
|
-
}
|
|
62
|
-
async firstUpdated() {
|
|
63
|
-
await this.updateComplete;
|
|
64
|
-
this.formControlController.updateValidity();
|
|
65
|
-
}
|
|
66
|
-
handleBlur() {
|
|
67
|
-
this.hasFocus = false;
|
|
68
|
-
this.emit("dsa-blur");
|
|
69
|
-
}
|
|
70
|
-
handleChange() {
|
|
71
|
-
this.value = this.input.value;
|
|
72
|
-
this.emit("dsa-change");
|
|
73
|
-
}
|
|
74
42
|
handleFocus() {
|
|
75
43
|
this.currentIndex = this.value ? -1 : 0;
|
|
76
44
|
this.hasFocus = true;
|
|
@@ -111,19 +79,8 @@ var DSAInputOTP = class extends FormControlLayout {
|
|
|
111
79
|
this.currentIndex = -1;
|
|
112
80
|
}
|
|
113
81
|
}
|
|
114
|
-
handleInvalid(event) {
|
|
115
|
-
this.formControlController.setValidity(false);
|
|
116
|
-
this.formControlController.emitInvalidEvent(event);
|
|
117
|
-
}
|
|
118
82
|
handleKeyDown(event) {
|
|
119
|
-
|
|
120
|
-
if (event.key === "Enter" && !hasModifier) {
|
|
121
|
-
setTimeout(() => {
|
|
122
|
-
if (!event.defaultPrevented && !event.isComposing) {
|
|
123
|
-
this.formControlController.submit();
|
|
124
|
-
}
|
|
125
|
-
});
|
|
126
|
-
}
|
|
83
|
+
super.handleKeyDown(event);
|
|
127
84
|
if (["ArrowLeft", "ArrowRight", "ArrowUp", "ArrowDown"].includes(event.key)) {
|
|
128
85
|
event.preventDefault();
|
|
129
86
|
switch (event.key) {
|
|
@@ -156,12 +113,6 @@ var DSAInputOTP = class extends FormControlLayout {
|
|
|
156
113
|
getLastIndex() {
|
|
157
114
|
return this.value.length > 0 ? Math.min(this.value.length, this.length - 1) : 0;
|
|
158
115
|
}
|
|
159
|
-
getDescriptionIds() {
|
|
160
|
-
let ids = [];
|
|
161
|
-
if (this.error) ids = ["error-text"];
|
|
162
|
-
ids = [...ids, "help-text", "description"];
|
|
163
|
-
return ids.join(" ");
|
|
164
|
-
}
|
|
165
116
|
handleCurrentIndexChange() {
|
|
166
117
|
if (this.currentIndex === -1) {
|
|
167
118
|
this.input.setSelectionRange(0, this.input.value.length);
|
|
@@ -169,47 +120,9 @@ var DSAInputOTP = class extends FormControlLayout {
|
|
|
169
120
|
this.input.setSelectionRange(this.currentIndex, this.currentIndex + 1);
|
|
170
121
|
}
|
|
171
122
|
}
|
|
172
|
-
handleDisabledChange() {
|
|
173
|
-
this.formControlController.setValidity(this.disabled);
|
|
174
|
-
}
|
|
175
|
-
async handleValueChange() {
|
|
176
|
-
await this.updateComplete;
|
|
177
|
-
this.formControlController.updateValidity();
|
|
178
|
-
}
|
|
179
123
|
handlePatterChange() {
|
|
180
124
|
this.patternRegexp = new RegExp(this.pattern);
|
|
181
125
|
}
|
|
182
|
-
/** Removes focus from the input. */
|
|
183
|
-
blur() {
|
|
184
|
-
this.input.blur();
|
|
185
|
-
}
|
|
186
|
-
/** Checks for validity but does not show a validation message. Returns `true` when valid and `false` when invalid. */
|
|
187
|
-
checkValidity() {
|
|
188
|
-
return this.input.checkValidity();
|
|
189
|
-
}
|
|
190
|
-
/** Sets focus on the input. */
|
|
191
|
-
focus(options) {
|
|
192
|
-
this.input.focus(options);
|
|
193
|
-
}
|
|
194
|
-
/** Gets the associated form, if one exists. */
|
|
195
|
-
getForm() {
|
|
196
|
-
return this.formControlController.getForm();
|
|
197
|
-
}
|
|
198
|
-
/** Checks for validity and shows the browser's validation message if the control is invalid. */
|
|
199
|
-
reportValidity() {
|
|
200
|
-
return this.input.reportValidity();
|
|
201
|
-
}
|
|
202
|
-
/** Selects all the text in the input. */
|
|
203
|
-
select() {
|
|
204
|
-
if (this.input instanceof HTMLInputElement) {
|
|
205
|
-
this.input.select();
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
/** Sets a custom validation message. Pass an empty string to restore validity. */
|
|
209
|
-
setCustomValidity(message) {
|
|
210
|
-
this.input.setCustomValidity(message);
|
|
211
|
-
this.formControlController.updateValidity();
|
|
212
|
-
}
|
|
213
126
|
async getUpdateComplete() {
|
|
214
127
|
const result = await super.getUpdateComplete();
|
|
215
128
|
return result;
|
|
@@ -296,48 +209,18 @@ DSAInputOTP.styles = input_otp_styles_default;
|
|
|
296
209
|
__decorateClass([
|
|
297
210
|
e("input")
|
|
298
211
|
], DSAInputOTP.prototype, "input", 2);
|
|
299
|
-
__decorateClass([
|
|
300
|
-
r()
|
|
301
|
-
], DSAInputOTP.prototype, "hasFocus", 2);
|
|
302
212
|
__decorateClass([
|
|
303
213
|
r()
|
|
304
214
|
], DSAInputOTP.prototype, "currentIndex", 2);
|
|
305
215
|
__decorateClass([
|
|
306
216
|
r()
|
|
307
217
|
], DSAInputOTP.prototype, "patternRegexp", 2);
|
|
308
|
-
__decorateClass([
|
|
309
|
-
n()
|
|
310
|
-
], DSAInputOTP.prototype, "value", 2);
|
|
311
|
-
__decorateClass([
|
|
312
|
-
defaultValue()
|
|
313
|
-
], DSAInputOTP.prototype, "defaultValue", 2);
|
|
314
|
-
__decorateClass([
|
|
315
|
-
n()
|
|
316
|
-
], DSAInputOTP.prototype, "pattern", 2);
|
|
317
218
|
__decorateClass([
|
|
318
219
|
n({ type: Number })
|
|
319
220
|
], DSAInputOTP.prototype, "length", 2);
|
|
320
|
-
__decorateClass([
|
|
321
|
-
n()
|
|
322
|
-
], DSAInputOTP.prototype, "autocapitalize", 2);
|
|
323
|
-
__decorateClass([
|
|
324
|
-
n({ type: Boolean })
|
|
325
|
-
], DSAInputOTP.prototype, "autofocus", 2);
|
|
326
|
-
__decorateClass([
|
|
327
|
-
n()
|
|
328
|
-
], DSAInputOTP.prototype, "enterkeyhint", 2);
|
|
329
|
-
__decorateClass([
|
|
330
|
-
n()
|
|
331
|
-
], DSAInputOTP.prototype, "inputmode", 2);
|
|
332
221
|
__decorateClass([
|
|
333
222
|
watch("currentIndex", { waitUntilFirstUpdate: true })
|
|
334
223
|
], DSAInputOTP.prototype, "handleCurrentIndexChange", 1);
|
|
335
|
-
__decorateClass([
|
|
336
|
-
watch("disabled", { waitUntilFirstUpdate: true })
|
|
337
|
-
], DSAInputOTP.prototype, "handleDisabledChange", 1);
|
|
338
|
-
__decorateClass([
|
|
339
|
-
watch("value", { waitUntilFirstUpdate: true })
|
|
340
|
-
], DSAInputOTP.prototype, "handleValueChange", 1);
|
|
341
224
|
__decorateClass([
|
|
342
225
|
watch("pattern")
|
|
343
226
|
], DSAInputOTP.prototype, "handlePatterChange", 1);
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
} from "./chunk.
|
|
2
|
+
input_base_styles_default
|
|
3
|
+
} from "./chunk.OCDDQJHV.js";
|
|
4
4
|
import {
|
|
5
5
|
i
|
|
6
6
|
} from "./chunk.4KHZQZ3M.js";
|
|
7
7
|
|
|
8
8
|
// src/components/input-date/input-date.styles.ts
|
|
9
9
|
var input_date_styles_default = i`
|
|
10
|
-
${
|
|
10
|
+
${input_base_styles_default}
|
|
11
11
|
|
|
12
12
|
.input--date {
|
|
13
13
|
overflow: visible;
|
|
@@ -178,6 +178,11 @@ var DSAInternalDateField = class extends ShoelaceElement {
|
|
|
178
178
|
input.valueAsDate = newValue;
|
|
179
179
|
this.value = input.value;
|
|
180
180
|
}
|
|
181
|
+
/** Gets or sets the current value as a number. Returns `NaN` if the value can't be converted. */
|
|
182
|
+
get valueAsNumber() {
|
|
183
|
+
var _a;
|
|
184
|
+
return (_a = this.hiddenInput.valueAsNumber) != null ? _a : parseFloat(this.value);
|
|
185
|
+
}
|
|
181
186
|
/** Gets the validity state object */
|
|
182
187
|
get validity() {
|
|
183
188
|
return this.hiddenInput.validity;
|
|
@@ -284,7 +289,6 @@ var DSAInternalDateField = class extends ShoelaceElement {
|
|
|
284
289
|
this.focusNextSpinbutton(currentInput);
|
|
285
290
|
}
|
|
286
291
|
if (event.key === "Enter") {
|
|
287
|
-
event.preventDefault();
|
|
288
292
|
this.handleChange();
|
|
289
293
|
}
|
|
290
294
|
}
|
|
@@ -396,6 +400,20 @@ var DSAInternalDateField = class extends ShoelaceElement {
|
|
|
396
400
|
var _a;
|
|
397
401
|
(_a = this.focusedInput[0]) == null ? void 0 : _a.blur();
|
|
398
402
|
}
|
|
403
|
+
/** Increments the value of a numeric or time input type by the value of the step attribute, multiplied by an optional number parameter. */
|
|
404
|
+
stepUp(stepNumber) {
|
|
405
|
+
this.hiddenInput.stepUp(stepNumber);
|
|
406
|
+
if (this.value !== this.hiddenInput.value) {
|
|
407
|
+
this.value = this.hiddenInput.value;
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
/** Decrements the value of a numeric or time input type by the value of the step attribute, multiplied by an optional number parameter. */
|
|
411
|
+
stepDown(stepNumber) {
|
|
412
|
+
this.hiddenInput.stepDown(stepNumber);
|
|
413
|
+
if (this.value !== this.hiddenInput.value) {
|
|
414
|
+
this.value = this.hiddenInput.value;
|
|
415
|
+
}
|
|
416
|
+
}
|
|
399
417
|
/** Checks for validity but does not show a validation message. Returns `true` when valid and `false` when invalid. */
|
|
400
418
|
checkValidity() {
|
|
401
419
|
return this.hiddenInput.checkValidity();
|
|
@@ -507,6 +525,7 @@ var DSAInternalDateField = class extends ShoelaceElement {
|
|
|
507
525
|
?required=${this.required}
|
|
508
526
|
min=${o(this.min)}
|
|
509
527
|
max=${o(this.max)}
|
|
528
|
+
step=${o(this.step)}
|
|
510
529
|
.value=${l(this.value)}
|
|
511
530
|
tabindex="-1"
|
|
512
531
|
aria-hidden="true"
|
|
@@ -593,6 +612,9 @@ __decorateClass([
|
|
|
593
612
|
__decorateClass([
|
|
594
613
|
n()
|
|
595
614
|
], DSAInternalDateField.prototype, "max", 2);
|
|
615
|
+
__decorateClass([
|
|
616
|
+
n()
|
|
617
|
+
], DSAInternalDateField.prototype, "step", 2);
|
|
596
618
|
__decorateClass([
|
|
597
619
|
n({ type: Boolean })
|
|
598
620
|
], DSAInternalDateField.prototype, "autofocus", 2);
|
|
@@ -481,7 +481,7 @@ P.valueOf = function() {
|
|
|
481
481
|
var Big = _Big_();
|
|
482
482
|
var big_default = Big;
|
|
483
483
|
|
|
484
|
-
// src/components/input/input.utils.ts
|
|
484
|
+
// src/components/input-native/input-native.utils.ts
|
|
485
485
|
function isPrefixIconOverriden(type) {
|
|
486
486
|
return ["email", "password", "search"].includes(type);
|
|
487
487
|
}
|
|
@@ -41,10 +41,6 @@ var DSATabGroup = class extends ShoelaceElement {
|
|
|
41
41
|
this.belowPageHeader = false;
|
|
42
42
|
}
|
|
43
43
|
connectedCallback() {
|
|
44
|
-
const whenAllDefined = Promise.all([
|
|
45
|
-
customElements.whenDefined("dsa-tab"),
|
|
46
|
-
customElements.whenDefined("dsa-tab-panel")
|
|
47
|
-
]);
|
|
48
44
|
super.connectedCallback();
|
|
49
45
|
this.resizeObserver = new ResizeObserver(() => {
|
|
50
46
|
this.repositionIndicator();
|
|
@@ -79,14 +75,14 @@ var DSATabGroup = class extends ShoelaceElement {
|
|
|
79
75
|
}
|
|
80
76
|
});
|
|
81
77
|
this.updateComplete.then(() => {
|
|
82
|
-
this.syncTabsAndPanels();
|
|
83
78
|
this.mutationObserver.observe(this, {
|
|
84
79
|
attributes: true,
|
|
85
80
|
childList: true,
|
|
86
81
|
subtree: true
|
|
87
82
|
});
|
|
88
83
|
this.resizeObserver.observe(this.nav);
|
|
89
|
-
|
|
84
|
+
this.awaitAllElementsDefined().then(() => {
|
|
85
|
+
this.syncTabsAndPanels();
|
|
90
86
|
const intersectionObserver = new IntersectionObserver(
|
|
91
87
|
(entries, observer) => {
|
|
92
88
|
var _a;
|
|
@@ -107,6 +103,12 @@ var DSATabGroup = class extends ShoelaceElement {
|
|
|
107
103
|
this.mutationObserver.disconnect();
|
|
108
104
|
this.resizeObserver.unobserve(this.nav);
|
|
109
105
|
}
|
|
106
|
+
awaitAllElementsDefined() {
|
|
107
|
+
return Promise.all([
|
|
108
|
+
customElements.whenDefined("dsa-tab"),
|
|
109
|
+
customElements.whenDefined("dsa-tab-panel")
|
|
110
|
+
]);
|
|
111
|
+
}
|
|
110
112
|
getAllTabs(options = { includeDisabled: true }) {
|
|
111
113
|
const slot = this.shadowRoot.querySelector('slot[name="nav"]');
|
|
112
114
|
return [...slot.assignedElements()].filter((el) => {
|
|
@@ -284,7 +286,7 @@ var DSATabGroup = class extends ShoelaceElement {
|
|
|
284
286
|
break;
|
|
285
287
|
}
|
|
286
288
|
}
|
|
287
|
-
// This
|
|
289
|
+
// This caches tabs and panels, and synchronizes active states with the interface
|
|
288
290
|
syncTabsAndPanels() {
|
|
289
291
|
this.tabs = this.getAllTabs({ includeDisabled: false });
|
|
290
292
|
this.panels = this.getAllPanels();
|
|
@@ -306,6 +308,11 @@ var DSATabGroup = class extends ShoelaceElement {
|
|
|
306
308
|
this.syncIndicator();
|
|
307
309
|
this.updateComplete.then(() => this.updateScrollControls());
|
|
308
310
|
}
|
|
311
|
+
handleSlotChange() {
|
|
312
|
+
this.awaitAllElementsDefined().then(() => {
|
|
313
|
+
this.syncTabsAndPanels();
|
|
314
|
+
});
|
|
315
|
+
}
|
|
309
316
|
updateScrollControls() {
|
|
310
317
|
this.hasScrollControls = ["top", "bottom"].includes(this.placement) && this.nav.scrollWidth > this.nav.clientWidth;
|
|
311
318
|
}
|
|
@@ -354,16 +361,17 @@ var DSATabGroup = class extends ShoelaceElement {
|
|
|
354
361
|
@click=${this.handleScrollToStart}
|
|
355
362
|
library="system"
|
|
356
363
|
size="xlarge"
|
|
364
|
+
tabindex="-1"
|
|
357
365
|
></dsa-icon-button>
|
|
358
366
|
` : ""}
|
|
359
367
|
|
|
360
|
-
<div class="tab-group__nav">
|
|
368
|
+
<div class="tab-group__nav" tabindex="-1">
|
|
361
369
|
<div part="tabs" class="tab-group__tabs" role="tablist">
|
|
362
370
|
<div
|
|
363
371
|
part="active-tab-indicator"
|
|
364
372
|
class="tab-group__indicator"
|
|
365
373
|
></div>
|
|
366
|
-
<slot name="nav" @slotchange=${this.
|
|
374
|
+
<slot name="nav" @slotchange=${this.handleSlotChange}></slot>
|
|
367
375
|
</div>
|
|
368
376
|
</div>
|
|
369
377
|
|
|
@@ -377,6 +385,7 @@ var DSATabGroup = class extends ShoelaceElement {
|
|
|
377
385
|
@click=${this.handleScrollToEnd}
|
|
378
386
|
library="system"
|
|
379
387
|
size="xlarge"
|
|
388
|
+
tabindex="-1"
|
|
380
389
|
></dsa-icon-button>
|
|
381
390
|
` : ""}
|
|
382
391
|
</div>
|
|
@@ -386,7 +395,7 @@ var DSATabGroup = class extends ShoelaceElement {
|
|
|
386
395
|
<slot
|
|
387
396
|
part="body"
|
|
388
397
|
class="tab-group__body"
|
|
389
|
-
@slotchange=${this.
|
|
398
|
+
@slotchange=${this.handleSlotChange}
|
|
390
399
|
></slot>
|
|
391
400
|
</div>
|
|
392
401
|
</div>
|
|
@@ -270,8 +270,12 @@ var DSATree = class extends ShoelaceElement {
|
|
|
270
270
|
}
|
|
271
271
|
}
|
|
272
272
|
handleSlotChange() {
|
|
273
|
-
|
|
274
|
-
|
|
273
|
+
if (customElements.get("dsa-tree-item")) {
|
|
274
|
+
const items = this.getAllTreeItems();
|
|
275
|
+
items.forEach(this.initTreeItem);
|
|
276
|
+
} else {
|
|
277
|
+
customElements.whenDefined("dsa-tree-item").then(() => this.handleSlotChange());
|
|
278
|
+
}
|
|
275
279
|
}
|
|
276
280
|
async handleSelectionChange() {
|
|
277
281
|
const isSelectionMultiple = this.selection === "multiple";
|