@salesql/sql_components_vue3 3.0.0 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +46 -0
- package/dist/composables/useViewportClamp.d.ts +23 -0
- package/dist/constants/events.d.ts +8 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +6 -0
- package/dist/index.es.js +1414 -1087
- package/dist/index.es.js.map +1 -1
- package/dist/sql_components_vue3.css +1 -1
- package/dist/ui/DsDrawer/DsDrawer.types.d.ts +34 -0
- package/dist/ui/DsDrawer/DsDrawer.vue.d.ts +138 -0
- package/dist/ui/DsDrawer/index.d.ts +2 -0
- package/dist/ui/DsItemSelectorButton/DsItemSelectorButton.types.d.ts +1 -1
- package/dist/ui/DsPill/DsPill.types.d.ts +1 -1
- package/dist/ui/DsPopover/DsPopover.types.d.ts +39 -0
- package/dist/ui/DsPopover/DsPopover.vue.d.ts +71 -0
- package/dist/ui/DsPopover/index.d.ts +2 -0
- package/dist/ui/DsSelect/DsSelect.types.d.ts +1 -1
- package/dist/ui/DsTextarea/DsTextarea.vue.d.ts +1 -1
- package/llms-full.txt +220 -5
- package/llms.txt +2 -0
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const
|
|
1
|
+
import { defineComponent as B, computed as k, openBlock as a, createElementBlock as l, normalizeStyle as U, normalizeClass as L, createBlock as K, unref as D, createCommentVNode as g, createElementVNode as s, renderSlot as C, toDisplayString as w, withModifiers as ue, useModel as ve, ref as V, onMounted as nt, watch as Z, withDirectives as Me, vModelCheckbox as bt, createTextVNode as q, mergeModels as ae, onBeforeUnmount as de, nextTick as se, createVNode as Y, Fragment as H, renderList as Q, useSlots as he, vModelDynamic as yt, useAttrs as mt, mergeProps as ke, vModelText as ht, Transition as me, withCtx as ie, Teleport as Pe, useId as ge, withKeys as st, reactive as gt, resolveDynamicComponent as pt } from "vue";
|
|
2
|
+
const $e = {
|
|
3
3
|
DARK: "dark",
|
|
4
4
|
// slate ring — for light surfaces (default)
|
|
5
5
|
LIGHT: "light",
|
|
6
6
|
// white ring — for dark surfaces / solid buttons
|
|
7
7
|
ACCENT: "accent"
|
|
8
8
|
// accent ring
|
|
9
|
-
},
|
|
9
|
+
}, De = {
|
|
10
10
|
SMALL: "small",
|
|
11
11
|
// 20px
|
|
12
12
|
MEDIUM: "medium",
|
|
13
13
|
// 32px
|
|
14
14
|
LARGE: "large"
|
|
15
15
|
// 48px
|
|
16
|
-
},
|
|
16
|
+
}, St = ["aria-label"], kt = /* @__PURE__ */ B({
|
|
17
17
|
__name: "DsSpinner",
|
|
18
18
|
props: {
|
|
19
19
|
// Diameter in px, or a named size ("small" 20 / "medium" 32 / "large" 48).
|
|
@@ -21,7 +21,7 @@ const ge = {
|
|
|
21
21
|
size: { type: [Number, String], default: 24 },
|
|
22
22
|
tone: {
|
|
23
23
|
type: String,
|
|
24
|
-
default:
|
|
24
|
+
default: $e.DARK
|
|
25
25
|
},
|
|
26
26
|
// Accessible name (DS default "Loading"); the consuming app can override for
|
|
27
27
|
// i18n. role="status" + aria-label are always present, never opt-in.
|
|
@@ -29,28 +29,28 @@ const ge = {
|
|
|
29
29
|
},
|
|
30
30
|
setup(e) {
|
|
31
31
|
const n = {
|
|
32
|
-
[
|
|
33
|
-
[
|
|
34
|
-
[
|
|
35
|
-
}, t = e, o =
|
|
32
|
+
[De.SMALL]: 20,
|
|
33
|
+
[De.MEDIUM]: 32,
|
|
34
|
+
[De.LARGE]: 48
|
|
35
|
+
}, t = e, o = k(
|
|
36
36
|
() => {
|
|
37
37
|
var i;
|
|
38
38
|
return typeof t.size == "string" ? (i = n[t.size]) != null ? i : 24 : t.size;
|
|
39
39
|
}
|
|
40
40
|
);
|
|
41
|
-
return (i,
|
|
42
|
-
class:
|
|
41
|
+
return (i, d) => (a(), l("span", {
|
|
42
|
+
class: L(["ds-spinner", `ds-spinner--${e.tone}`]),
|
|
43
43
|
role: "status",
|
|
44
|
-
style:
|
|
44
|
+
style: U({ width: `${o.value}px`, height: `${o.value}px` }),
|
|
45
45
|
"aria-label": e.label || void 0
|
|
46
|
-
}, null, 14,
|
|
46
|
+
}, null, 14, St));
|
|
47
47
|
}
|
|
48
|
-
}),
|
|
48
|
+
}), O = (e, n) => {
|
|
49
49
|
const t = e.__vccOpts || e;
|
|
50
50
|
for (const [o, i] of n)
|
|
51
51
|
t[o] = i;
|
|
52
52
|
return t;
|
|
53
|
-
},
|
|
53
|
+
}, ye = /* @__PURE__ */ O(kt, [["__scopeId", "data-v-aaf2f048"]]), te = "click", J = "close", Te = "focus", Ee = "blur", ze = "change", Fe = "field-blur", we = "copy", Le = "correct", _e = "incorrect", Ve = "sort", Ue = "edit", Ge = "select-all", He = "page-change", We = "page-size-change", Re = "search", Ke = "select", Ae = "step", Ye = "final-step", qe = "navigate", je = "resize-start", Xe = "resize", Ze = "resize-end", Ne = "update:open", Be = {
|
|
54
54
|
DEFAULT: "default",
|
|
55
55
|
// white surface, dark text (the default value; == tertiary)
|
|
56
56
|
PRIMARY: "primary",
|
|
@@ -73,7 +73,7 @@ const ge = {
|
|
|
73
73
|
// `warning` as a deprecated alias of `danger` (tint), but app consumers already
|
|
74
74
|
// ship this solid look — kept unchanged to avoid a visual regression. Prefer `danger`.
|
|
75
75
|
WARNING: "warning"
|
|
76
|
-
},
|
|
76
|
+
}, Qe = {
|
|
77
77
|
SMALL: "small",
|
|
78
78
|
// 24px
|
|
79
79
|
MEDIUM: "medium",
|
|
@@ -82,35 +82,35 @@ const ge = {
|
|
|
82
82
|
// 36px
|
|
83
83
|
XLARGE: "xlarge"
|
|
84
84
|
// 48px
|
|
85
|
-
},
|
|
85
|
+
}, $t = {
|
|
86
86
|
BUTTON: "button",
|
|
87
87
|
SUBMIT: "submit",
|
|
88
88
|
RESET: "reset"
|
|
89
|
-
},
|
|
89
|
+
}, Tt = ["type", "disabled", "autofocus", "aria-busy", "aria-disabled", "aria-pressed", "aria-label"], Et = ["aria-hidden"], wt = {
|
|
90
90
|
key: 0,
|
|
91
91
|
class: "ds-button__icon ds-button__icon--leading"
|
|
92
|
-
},
|
|
93
|
-
class: "material-
|
|
92
|
+
}, Lt = {
|
|
93
|
+
class: "material-symbols-filled",
|
|
94
94
|
"aria-hidden": "true"
|
|
95
|
-
},
|
|
95
|
+
}, _t = {
|
|
96
96
|
key: 1,
|
|
97
97
|
class: "ds-button__label"
|
|
98
|
-
},
|
|
98
|
+
}, Ct = {
|
|
99
99
|
key: 2,
|
|
100
100
|
class: "ds-button__icon ds-button__icon--trailing"
|
|
101
|
-
},
|
|
102
|
-
class: "material-
|
|
101
|
+
}, It = {
|
|
102
|
+
class: "material-symbols-filled",
|
|
103
103
|
"aria-hidden": "true"
|
|
104
|
-
},
|
|
104
|
+
}, Dt = /* @__PURE__ */ B({
|
|
105
105
|
__name: "DsButton",
|
|
106
106
|
props: {
|
|
107
|
-
variant: { type: String, default:
|
|
108
|
-
size: { type: String, default:
|
|
107
|
+
variant: { type: String, default: Be.DEFAULT },
|
|
108
|
+
size: { type: String, default: Qe.MEDIUM },
|
|
109
109
|
nativeType: {
|
|
110
110
|
type: String,
|
|
111
|
-
default:
|
|
111
|
+
default: $t.BUTTON
|
|
112
112
|
},
|
|
113
|
-
// Material Icon names (rendered via <i class="material-
|
|
113
|
+
// Material Icon names (rendered via <i class="material-symbols-filled">); a leading/
|
|
114
114
|
// trailing slot overrides. Icon-only buttons (circle/square) need ariaLabel.
|
|
115
115
|
leftIcon: { type: String, default: "" },
|
|
116
116
|
rightIcon: { type: String, default: "" },
|
|
@@ -129,16 +129,16 @@ const ge = {
|
|
|
129
129
|
selected: Boolean,
|
|
130
130
|
autofocus: Boolean
|
|
131
131
|
},
|
|
132
|
-
emits: [
|
|
132
|
+
emits: [te],
|
|
133
133
|
setup(e, { emit: n }) {
|
|
134
|
-
const t = e, o = n, i =
|
|
135
|
-
() => t.variant ===
|
|
134
|
+
const t = e, o = n, i = k(() => t.size === Qe.SMALL ? 14 : 20), d = k(
|
|
135
|
+
() => t.variant === Be.PRIMARY || t.variant === Be.WARNING ? $e.LIGHT : $e.DARK
|
|
136
136
|
);
|
|
137
|
-
function
|
|
138
|
-
t.disabled || t.loading || o(
|
|
137
|
+
function E(v) {
|
|
138
|
+
t.disabled || t.loading || o(te, v);
|
|
139
139
|
}
|
|
140
|
-
return (
|
|
141
|
-
class:
|
|
140
|
+
return (v, y) => (a(), l("button", {
|
|
141
|
+
class: L(["ds-button", [
|
|
142
142
|
`ds-button--${e.variant}`,
|
|
143
143
|
`ds-button--${e.size}`,
|
|
144
144
|
{
|
|
@@ -157,35 +157,35 @@ const ge = {
|
|
|
157
157
|
"aria-disabled": e.disabled || e.loading || void 0,
|
|
158
158
|
"aria-pressed": e.selected || void 0,
|
|
159
159
|
"aria-label": e.ariaLabel || void 0,
|
|
160
|
-
onClick:
|
|
160
|
+
onClick: E
|
|
161
161
|
}, [
|
|
162
|
-
e.loading ? (a(),
|
|
162
|
+
e.loading ? (a(), K(D(ye), {
|
|
163
163
|
key: 0,
|
|
164
164
|
class: "ds-button__spinner",
|
|
165
165
|
size: i.value,
|
|
166
|
-
tone:
|
|
167
|
-
}, null, 8, ["size", "tone"])) :
|
|
166
|
+
tone: d.value
|
|
167
|
+
}, null, 8, ["size", "tone"])) : g("", !0),
|
|
168
168
|
s("span", {
|
|
169
169
|
class: "ds-button__content",
|
|
170
170
|
"aria-hidden": e.loading || void 0
|
|
171
171
|
}, [
|
|
172
|
-
e.leftIcon ||
|
|
173
|
-
|
|
174
|
-
s("i",
|
|
172
|
+
e.leftIcon || v.$slots.leading ? (a(), l("span", wt, [
|
|
173
|
+
C(v.$slots, "leading", {}, () => [
|
|
174
|
+
s("i", Lt, w(e.leftIcon), 1)
|
|
175
175
|
], !0)
|
|
176
|
-
])) :
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
])) :
|
|
180
|
-
e.rightIcon ||
|
|
181
|
-
|
|
182
|
-
s("i",
|
|
176
|
+
])) : g("", !0),
|
|
177
|
+
v.$slots.default && !e.circle && !e.square ? (a(), l("span", _t, [
|
|
178
|
+
C(v.$slots, "default", {}, void 0, !0)
|
|
179
|
+
])) : g("", !0),
|
|
180
|
+
e.rightIcon || v.$slots.trailing ? (a(), l("span", Ct, [
|
|
181
|
+
C(v.$slots, "trailing", {}, () => [
|
|
182
|
+
s("i", It, w(e.rightIcon), 1)
|
|
183
183
|
], !0)
|
|
184
|
-
])) :
|
|
185
|
-
], 8,
|
|
186
|
-
], 10,
|
|
184
|
+
])) : g("", !0)
|
|
185
|
+
], 8, Et)
|
|
186
|
+
], 10, Tt));
|
|
187
187
|
}
|
|
188
|
-
}),
|
|
188
|
+
}), fe = /* @__PURE__ */ O(Dt, [["__scopeId", "data-v-4df2f2ae"]]), Rt = {
|
|
189
189
|
DEFAULT: "default",
|
|
190
190
|
// white bg, slate-tint border, muted text
|
|
191
191
|
GREY: "grey",
|
|
@@ -198,12 +198,12 @@ const ge = {
|
|
|
198
198
|
// e.g. Pending
|
|
199
199
|
ERROR: "error"
|
|
200
200
|
// e.g. Bounced
|
|
201
|
-
},
|
|
201
|
+
}, At = { class: "ds-tag__label" }, Nt = ["aria-label"], Bt = /* @__PURE__ */ B({
|
|
202
202
|
__name: "DsTag",
|
|
203
203
|
props: {
|
|
204
204
|
tone: {
|
|
205
205
|
type: String,
|
|
206
|
-
default:
|
|
206
|
+
default: Rt.DEFAULT
|
|
207
207
|
},
|
|
208
208
|
// Semicircular sides (DS `rounded`): radius-round vs the default radius-control.
|
|
209
209
|
rounded: Boolean,
|
|
@@ -227,29 +227,29 @@ const ge = {
|
|
|
227
227
|
setup(e, { emit: n }) {
|
|
228
228
|
const t = n;
|
|
229
229
|
return (o, i) => (a(), l("span", {
|
|
230
|
-
class:
|
|
230
|
+
class: L(["ds-tag", [
|
|
231
231
|
`ds-tag--${e.tone}`,
|
|
232
232
|
{ "is-rounded": e.rounded, "is-clickable": e.clickable, "is-truncate": e.truncate }
|
|
233
233
|
]])
|
|
234
234
|
}, [
|
|
235
|
-
s("span",
|
|
236
|
-
|
|
235
|
+
s("span", At, [
|
|
236
|
+
C(o.$slots, "default", {}, void 0, !0)
|
|
237
237
|
]),
|
|
238
238
|
e.closable ? (a(), l("button", {
|
|
239
239
|
key: 0,
|
|
240
240
|
type: "button",
|
|
241
241
|
class: "ds-tag__close",
|
|
242
242
|
"aria-label": e.closeLabel || void 0,
|
|
243
|
-
onClick: i[0] || (i[0] =
|
|
243
|
+
onClick: i[0] || (i[0] = ue((d) => t(D(J)), ["stop"]))
|
|
244
244
|
}, [...i[1] || (i[1] = [
|
|
245
245
|
s("i", {
|
|
246
|
-
class: "material-
|
|
246
|
+
class: "material-symbols-filled",
|
|
247
247
|
"aria-hidden": "true"
|
|
248
248
|
}, "close", -1)
|
|
249
|
-
])], 8,
|
|
249
|
+
])], 8, Nt)) : g("", !0)
|
|
250
250
|
], 2));
|
|
251
251
|
}
|
|
252
|
-
}),
|
|
252
|
+
}), tn = /* @__PURE__ */ O(Bt, [["__scopeId", "data-v-23118dd1"]]), xe = {
|
|
253
253
|
ACCENT: "accent",
|
|
254
254
|
// e.g. Work (purple)
|
|
255
255
|
GREY: "grey",
|
|
@@ -262,22 +262,22 @@ const ge = {
|
|
|
262
262
|
// coral
|
|
263
263
|
WARNING: "warning"
|
|
264
264
|
// orange
|
|
265
|
-
},
|
|
265
|
+
}, Ot = /* @__PURE__ */ B({
|
|
266
266
|
__name: "DsBadge",
|
|
267
267
|
props: {
|
|
268
268
|
tone: {
|
|
269
269
|
type: String,
|
|
270
|
-
default:
|
|
270
|
+
default: xe.ACCENT
|
|
271
271
|
}
|
|
272
272
|
},
|
|
273
273
|
setup(e) {
|
|
274
274
|
return (n, t) => (a(), l("span", {
|
|
275
|
-
class:
|
|
275
|
+
class: L(["ds-badge", `ds-badge--${e.tone}`])
|
|
276
276
|
}, [
|
|
277
|
-
|
|
277
|
+
C(n.$slots, "default", {}, void 0, !0)
|
|
278
278
|
], 2));
|
|
279
279
|
}
|
|
280
|
-
}),
|
|
280
|
+
}), xt = /* @__PURE__ */ O(Ot, [["__scopeId", "data-v-f10a17a0"]]), Mt = ["src", "alt"], Pt = ["aria-label"], zt = /* @__PURE__ */ B({
|
|
281
281
|
__name: "DsAvatar",
|
|
282
282
|
props: {
|
|
283
283
|
image: { type: String, default: "" },
|
|
@@ -303,77 +303,77 @@ const ge = {
|
|
|
303
303
|
alt: { type: String, default: void 0 }
|
|
304
304
|
},
|
|
305
305
|
setup(e) {
|
|
306
|
-
const n = e, t =
|
|
307
|
-
var
|
|
308
|
-
return (
|
|
309
|
-
}),
|
|
310
|
-
var
|
|
311
|
-
return (
|
|
312
|
-
}),
|
|
313
|
-
var
|
|
314
|
-
return (
|
|
315
|
-
}),
|
|
306
|
+
const n = e, t = k(() => n.letters ? n.letters : n.firstName && n.lastName ? (n.firstName.charAt(0) + n.lastName.charAt(0)).toUpperCase() : ""), o = k(() => `${n.firstName} ${n.lastName}`.trim() || n.letters), i = k(() => {
|
|
307
|
+
var r;
|
|
308
|
+
return (r = n.alt) != null ? r : o.value;
|
|
309
|
+
}), d = k(() => {
|
|
310
|
+
var r;
|
|
311
|
+
return (r = n.width) != null ? r : n.size;
|
|
312
|
+
}), E = k(() => {
|
|
313
|
+
var r;
|
|
314
|
+
return (r = n.height) != null ? r : n.size;
|
|
315
|
+
}), v = k(() => ({ width: `${d.value}px`, height: `${E.value}px` })), y = k(
|
|
316
316
|
() => {
|
|
317
|
-
var
|
|
318
|
-
return (
|
|
317
|
+
var r;
|
|
318
|
+
return (r = n.textSize) != null ? r : Math.round(Math.min(d.value, E.value) * 0.4);
|
|
319
319
|
}
|
|
320
|
-
),
|
|
321
|
-
const
|
|
322
|
-
let
|
|
323
|
-
for (let
|
|
324
|
-
|
|
325
|
-
const
|
|
326
|
-
for (let
|
|
327
|
-
const
|
|
328
|
-
return { bg: `rgb(${
|
|
320
|
+
), f = k(() => {
|
|
321
|
+
const r = n.uid || n.firstName + n.lastName || n.letters;
|
|
322
|
+
let c = 0;
|
|
323
|
+
for (let T = 0; T < r.length; T++)
|
|
324
|
+
c = r.charCodeAt(T) + ((c << 5) - c), c = c & c;
|
|
325
|
+
const m = [0, 0, 0];
|
|
326
|
+
for (let T = 0; T < 3; T++) m[T] = c >> T * 8 & 255;
|
|
327
|
+
const p = m[0] >= 200 && m[1] >= 200 && m[2] >= 200;
|
|
328
|
+
return { bg: `rgb(${m[0]}, ${m[1]}, ${m[2]})`, fg: p ? "#323f4b" : "#fff" };
|
|
329
329
|
});
|
|
330
|
-
return (
|
|
330
|
+
return (r, c) => e.image ? (a(), l("img", {
|
|
331
331
|
key: 0,
|
|
332
|
-
class:
|
|
332
|
+
class: L(["ds-avatar", { "is-circular": e.circular }]),
|
|
333
333
|
src: e.image,
|
|
334
334
|
alt: i.value,
|
|
335
|
-
style:
|
|
336
|
-
}, null, 14,
|
|
335
|
+
style: U(v.value)
|
|
336
|
+
}, null, 14, Mt)) : t.value ? (a(), l("div", {
|
|
337
337
|
key: 1,
|
|
338
|
-
class:
|
|
338
|
+
class: L(["ds-avatar ds-avatar--initials", { "is-circular": e.circular }]),
|
|
339
339
|
role: "img",
|
|
340
340
|
"aria-label": i.value || void 0,
|
|
341
|
-
style:
|
|
342
|
-
|
|
341
|
+
style: U([
|
|
342
|
+
v.value,
|
|
343
343
|
{
|
|
344
|
-
background:
|
|
345
|
-
color:
|
|
344
|
+
background: f.value.bg,
|
|
345
|
+
color: f.value.fg,
|
|
346
346
|
fontSize: `${y.value}px`,
|
|
347
347
|
fontWeight: e.fontWeight
|
|
348
348
|
}
|
|
349
349
|
])
|
|
350
|
-
},
|
|
350
|
+
}, w(t.value), 15, Pt)) : (a(), l("div", {
|
|
351
351
|
key: 2,
|
|
352
|
-
class:
|
|
353
|
-
style:
|
|
352
|
+
class: L(["ds-avatar ds-avatar--placeholder", { "is-circular": e.circular }]),
|
|
353
|
+
style: U(v.value),
|
|
354
354
|
"aria-hidden": "true"
|
|
355
355
|
}, null, 6));
|
|
356
356
|
}
|
|
357
|
-
}),
|
|
357
|
+
}), an = /* @__PURE__ */ O(zt, [["__scopeId", "data-v-4faae4da"]]), Ft = ["disabled", "name", "aria-label"], Vt = {
|
|
358
358
|
key: 0,
|
|
359
359
|
class: "ds-checkbox__mark",
|
|
360
360
|
viewBox: "0 0 16 16",
|
|
361
361
|
fill: "none",
|
|
362
362
|
stroke: "currentColor",
|
|
363
363
|
"stroke-width": "2.5"
|
|
364
|
-
},
|
|
364
|
+
}, Ut = {
|
|
365
365
|
key: 1,
|
|
366
366
|
class: "ds-checkbox__mark",
|
|
367
367
|
viewBox: "0 0 16 16",
|
|
368
368
|
fill: "none",
|
|
369
369
|
stroke: "currentColor",
|
|
370
370
|
"stroke-width": "2.5"
|
|
371
|
-
},
|
|
371
|
+
}, Gt = {
|
|
372
372
|
key: 0,
|
|
373
373
|
class: "ds-checkbox__label"
|
|
374
|
-
},
|
|
374
|
+
}, Ht = /* @__PURE__ */ B({
|
|
375
375
|
__name: "DsCheckbox",
|
|
376
|
-
props: /* @__PURE__ */
|
|
376
|
+
props: /* @__PURE__ */ ae({
|
|
377
377
|
indeterminate: Boolean,
|
|
378
378
|
disabled: Boolean,
|
|
379
379
|
name: { type: String, default: "" },
|
|
@@ -387,58 +387,58 @@ const ge = {
|
|
|
387
387
|
}),
|
|
388
388
|
emits: ["update:modelValue"],
|
|
389
389
|
setup(e) {
|
|
390
|
-
const n =
|
|
390
|
+
const n = ve(e, "modelValue"), t = e, o = V(null);
|
|
391
391
|
function i() {
|
|
392
392
|
o.value && (o.value.indeterminate = t.indeterminate);
|
|
393
393
|
}
|
|
394
|
-
return
|
|
395
|
-
class:
|
|
394
|
+
return nt(i), Z(() => t.indeterminate, i), (d, E) => (a(), l("label", {
|
|
395
|
+
class: L(["ds-checkbox", { "is-disabled": e.disabled }])
|
|
396
396
|
}, [
|
|
397
|
-
|
|
397
|
+
Me(s("input", {
|
|
398
398
|
ref_key: "inputRef",
|
|
399
399
|
ref: o,
|
|
400
|
-
"onUpdate:modelValue":
|
|
400
|
+
"onUpdate:modelValue": E[0] || (E[0] = (v) => n.value = v),
|
|
401
401
|
type: "checkbox",
|
|
402
402
|
class: "ds-checkbox__native",
|
|
403
403
|
disabled: e.disabled,
|
|
404
404
|
name: e.name || void 0,
|
|
405
405
|
"aria-label": e.ariaLabel || void 0
|
|
406
|
-
}, null, 8,
|
|
407
|
-
[
|
|
406
|
+
}, null, 8, Ft), [
|
|
407
|
+
[bt, n.value]
|
|
408
408
|
]),
|
|
409
409
|
s("span", {
|
|
410
|
-
class:
|
|
410
|
+
class: L(["ds-checkbox__box", { "is-active": n.value || e.indeterminate }]),
|
|
411
411
|
"aria-hidden": "true"
|
|
412
412
|
}, [
|
|
413
|
-
e.indeterminate ? (a(), l("svg",
|
|
413
|
+
e.indeterminate ? (a(), l("svg", Vt, [...E[1] || (E[1] = [
|
|
414
414
|
s("line", {
|
|
415
415
|
x1: "4",
|
|
416
416
|
y1: "8",
|
|
417
417
|
x2: "12",
|
|
418
418
|
y2: "8"
|
|
419
419
|
}, null, -1)
|
|
420
|
-
])])) : n.value ? (a(), l("svg",
|
|
420
|
+
])])) : n.value ? (a(), l("svg", Ut, [...E[2] || (E[2] = [
|
|
421
421
|
s("path", { d: "M3.5 8.5l3 3 6-6" }, null, -1)
|
|
422
|
-
])])) :
|
|
422
|
+
])])) : g("", !0)
|
|
423
423
|
], 2),
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
424
|
+
d.$slots.default || e.label ? (a(), l("span", Gt, [
|
|
425
|
+
C(d.$slots, "default", {}, () => [
|
|
426
|
+
q(w(e.label), 1)
|
|
427
427
|
], !0)
|
|
428
|
-
])) :
|
|
428
|
+
])) : g("", !0)
|
|
429
429
|
], 2));
|
|
430
430
|
}
|
|
431
|
-
}),
|
|
431
|
+
}), ot = /* @__PURE__ */ O(Ht, [["__scopeId", "data-v-2da3772e"]]), Je = {
|
|
432
432
|
LEFT: "left",
|
|
433
433
|
CENTER: "center",
|
|
434
434
|
RIGHT: "right"
|
|
435
|
-
},
|
|
435
|
+
}, ne = {
|
|
436
436
|
LEFT: "left",
|
|
437
437
|
RIGHT: "right"
|
|
438
|
-
},
|
|
438
|
+
}, Wt = ["aria-busy"], Kt = { class: "ds-table__table" }, Yt = { class: "ds-table__head" }, qt = {
|
|
439
439
|
key: 0,
|
|
440
440
|
class: "ds-table__select-all"
|
|
441
|
-
},
|
|
441
|
+
}, jt = { key: 0 }, Xt = ["colspan"], Zt = ["aria-busy"], Qt = { key: 0 }, Jt = ["colspan"], ea = { key: 1 }, ta = ["colspan"], aa = ["title"], la = /* @__PURE__ */ B({
|
|
442
442
|
__name: "DsTable",
|
|
443
443
|
props: {
|
|
444
444
|
// --- Declarative API (default): the table builds itself from columns + rows. ---
|
|
@@ -493,231 +493,231 @@ const ge = {
|
|
|
493
493
|
// falls back to DsSpinner's own default. Overridable per row via the #loading slot.
|
|
494
494
|
loadingLabel: { type: String, default: "" }
|
|
495
495
|
},
|
|
496
|
-
emits: [
|
|
496
|
+
emits: [Ge],
|
|
497
497
|
setup(e, { emit: n }) {
|
|
498
|
-
const t = e, o = n, i =
|
|
498
|
+
const t = e, o = n, i = k(
|
|
499
499
|
() => Math.max(1, t.headers.length + (t.selectable ? 1 : 0))
|
|
500
|
-
),
|
|
500
|
+
), d = k(
|
|
501
501
|
() => t.rowHeight == null ? void 0 : {
|
|
502
502
|
"--ds-table-row-height": typeof t.rowHeight == "number" ? `${t.rowHeight}px` : t.rowHeight
|
|
503
503
|
}
|
|
504
|
-
),
|
|
504
|
+
), E = k(
|
|
505
505
|
() => t.height == null ? void 0 : { height: typeof t.height == "number" ? `${t.height}px` : t.height }
|
|
506
506
|
);
|
|
507
|
-
function
|
|
508
|
-
o(
|
|
509
|
-
}
|
|
510
|
-
function y(
|
|
511
|
-
if (!
|
|
512
|
-
const
|
|
513
|
-
return
|
|
514
|
-
}
|
|
515
|
-
const
|
|
516
|
-
const
|
|
517
|
-
let
|
|
518
|
-
for (const
|
|
519
|
-
|
|
520
|
-
let
|
|
521
|
-
for (let
|
|
522
|
-
const
|
|
523
|
-
|
|
507
|
+
function v(b) {
|
|
508
|
+
o(Ge, b);
|
|
509
|
+
}
|
|
510
|
+
function y(b) {
|
|
511
|
+
if (!b) return 0;
|
|
512
|
+
const R = /^(\d+(?:\.\d+)?)px$/.exec(b.trim());
|
|
513
|
+
return R ? parseFloat(R[1]) : 0;
|
|
514
|
+
}
|
|
515
|
+
const f = k(() => {
|
|
516
|
+
const b = {};
|
|
517
|
+
let R = 0;
|
|
518
|
+
for (const S of t.columns)
|
|
519
|
+
S.pinned === ne.LEFT && (b[S.key] = { position: "sticky", left: `${R}px` }, R += y(S.width));
|
|
520
|
+
let u = 0;
|
|
521
|
+
for (let S = t.columns.length - 1; S >= 0; S--) {
|
|
522
|
+
const x = t.columns[S];
|
|
523
|
+
x.pinned === ne.RIGHT && (b[x.key] = { position: "sticky", right: `${u}px` }, u += y(x.width));
|
|
524
524
|
}
|
|
525
|
-
return
|
|
526
|
-
}),
|
|
527
|
-
const
|
|
528
|
-
return
|
|
525
|
+
return b;
|
|
526
|
+
}), r = k(() => {
|
|
527
|
+
const b = t.columns.filter((S) => S.pinned === ne.LEFT), R = t.columns.filter((S) => S.pinned === ne.RIGHT), u = /* @__PURE__ */ new Set();
|
|
528
|
+
return b.length && u.add(b[b.length - 1].key), R.length && u.add(R[0].key), u;
|
|
529
529
|
});
|
|
530
|
-
function b
|
|
531
|
-
if (
|
|
530
|
+
function c(b) {
|
|
531
|
+
if (b.pinned)
|
|
532
532
|
return {
|
|
533
533
|
"ds-table__pin": !0,
|
|
534
|
-
[`ds-table__pin--${
|
|
535
|
-
"ds-table__pin--edge":
|
|
534
|
+
[`ds-table__pin--${b.pinned}`]: !0,
|
|
535
|
+
"ds-table__pin--edge": r.value.has(b.key)
|
|
536
536
|
};
|
|
537
537
|
}
|
|
538
|
-
function
|
|
539
|
-
const
|
|
540
|
-
if (!(!
|
|
541
|
-
return { ...
|
|
542
|
-
}
|
|
543
|
-
function
|
|
544
|
-
const
|
|
545
|
-
if (
|
|
546
|
-
return
|
|
547
|
-
}
|
|
548
|
-
const
|
|
549
|
-
() => t.headers.map((
|
|
550
|
-
),
|
|
551
|
-
const
|
|
552
|
-
let
|
|
553
|
-
|
|
554
|
-
|
|
538
|
+
function m(b) {
|
|
539
|
+
const R = f.value[b.key], u = b.width ? { width: b.width } : void 0;
|
|
540
|
+
if (!(!R && !u))
|
|
541
|
+
return { ...u, ...R };
|
|
542
|
+
}
|
|
543
|
+
function p(b) {
|
|
544
|
+
const R = f.value[b.key];
|
|
545
|
+
if (R)
|
|
546
|
+
return b.width ? { ...R, width: b.width } : R;
|
|
547
|
+
}
|
|
548
|
+
const T = k(
|
|
549
|
+
() => t.headers.map((b) => typeof b == "string" ? { label: b } : b)
|
|
550
|
+
), N = k(() => {
|
|
551
|
+
const b = {}, R = T.value;
|
|
552
|
+
let u = 0;
|
|
553
|
+
R.forEach((x, le) => {
|
|
554
|
+
x.pinned === ne.LEFT && (b[le] = { position: "sticky", left: `${u}px` }, u += y(x.width));
|
|
555
555
|
});
|
|
556
|
-
let
|
|
557
|
-
for (let
|
|
558
|
-
|
|
559
|
-
return
|
|
560
|
-
}),
|
|
561
|
-
const
|
|
562
|
-
return
|
|
556
|
+
let S = 0;
|
|
557
|
+
for (let x = R.length - 1; x >= 0; x--)
|
|
558
|
+
R[x].pinned === ne.RIGHT && (b[x] = { position: "sticky", right: `${S}px` }, S += y(R[x].width));
|
|
559
|
+
return b;
|
|
560
|
+
}), _ = k(() => {
|
|
561
|
+
const b = T.value, R = b.map((x, le) => ({ h: x, i: le })).filter(({ h: x }) => x.pinned === ne.LEFT), u = b.map((x, le) => ({ h: x, i: le })).filter(({ h: x }) => x.pinned === ne.RIGHT), S = /* @__PURE__ */ new Set();
|
|
562
|
+
return R.length && S.add(R[R.length - 1].i), u.length && S.add(u[0].i), S;
|
|
563
563
|
});
|
|
564
|
-
function
|
|
565
|
-
if (
|
|
564
|
+
function $(b, R) {
|
|
565
|
+
if (b.pinned)
|
|
566
566
|
return {
|
|
567
567
|
"ds-table__pin": !0,
|
|
568
|
-
[`ds-table__pin--${
|
|
569
|
-
"ds-table__pin--edge":
|
|
568
|
+
[`ds-table__pin--${b.pinned}`]: !0,
|
|
569
|
+
"ds-table__pin--edge": _.value.has(R)
|
|
570
570
|
};
|
|
571
571
|
}
|
|
572
|
-
function
|
|
573
|
-
const
|
|
574
|
-
if (!(!
|
|
575
|
-
return { ...
|
|
572
|
+
function A(b, R) {
|
|
573
|
+
const u = N.value[R], S = b.width ? { width: b.width } : void 0;
|
|
574
|
+
if (!(!u && !S))
|
|
575
|
+
return { ...S, ...u };
|
|
576
576
|
}
|
|
577
|
-
const
|
|
578
|
-
let
|
|
579
|
-
function
|
|
580
|
-
const
|
|
581
|
-
|
|
577
|
+
const F = V(null), W = V(!1), ee = V(!1);
|
|
578
|
+
let G = null;
|
|
579
|
+
function M() {
|
|
580
|
+
const b = F.value;
|
|
581
|
+
b && (W.value = b.scrollLeft > 0, ee.value = b.scrollLeft + b.clientWidth < b.scrollWidth - 1);
|
|
582
582
|
}
|
|
583
|
-
function
|
|
584
|
-
|
|
583
|
+
function j(b) {
|
|
584
|
+
b == null || b.removeEventListener("scroll", M), G == null || G.disconnect(), G = null;
|
|
585
585
|
}
|
|
586
|
-
return
|
|
587
|
-
|
|
588
|
-
(
|
|
589
|
-
|
|
586
|
+
return Z(
|
|
587
|
+
F,
|
|
588
|
+
(b, R) => {
|
|
589
|
+
j(R != null ? R : null), b && (b.addEventListener("scroll", M, { passive: !0 }), typeof ResizeObserver != "undefined" && (G = new ResizeObserver(M), G.observe(b)), M());
|
|
590
590
|
},
|
|
591
591
|
{ immediate: !0 }
|
|
592
|
-
),
|
|
592
|
+
), de(() => j(F.value)), Z(
|
|
593
593
|
() => [t.columns.length, t.rows.length, t.headers.length, t.compound],
|
|
594
|
-
() =>
|
|
595
|
-
), (
|
|
594
|
+
() => se(M)
|
|
595
|
+
), (b, R) => e.compound ? (a(), l("div", {
|
|
596
596
|
key: 0,
|
|
597
597
|
class: "ds-table ds-table--compound",
|
|
598
598
|
"aria-busy": e.loading ? "true" : void 0
|
|
599
599
|
}, [
|
|
600
600
|
s("div", {
|
|
601
601
|
ref_key: "wrapperRef",
|
|
602
|
-
ref:
|
|
603
|
-
class:
|
|
604
|
-
style:
|
|
602
|
+
ref: F,
|
|
603
|
+
class: L(["ds-table__wrapper", { "is-scrolled-start": W.value, "is-scrolled-end": ee.value }]),
|
|
604
|
+
style: U(E.value)
|
|
605
605
|
}, [
|
|
606
|
-
s("table",
|
|
607
|
-
s("thead",
|
|
606
|
+
s("table", Kt, [
|
|
607
|
+
s("thead", Yt, [
|
|
608
608
|
s("tr", null, [
|
|
609
|
-
e.selectable ? (a(), l("th",
|
|
610
|
-
|
|
609
|
+
e.selectable ? (a(), l("th", qt, [
|
|
610
|
+
Y(D(ot), {
|
|
611
611
|
"model-value": e.allSelected,
|
|
612
612
|
indeterminate: !e.allSelected && e.someSelected,
|
|
613
613
|
"aria-label": e.selectAllLabel || void 0,
|
|
614
|
-
"onUpdate:modelValue":
|
|
614
|
+
"onUpdate:modelValue": v
|
|
615
615
|
}, null, 8, ["model-value", "indeterminate", "aria-label"])
|
|
616
|
-
])) :
|
|
617
|
-
(a(!0), l(
|
|
618
|
-
key:
|
|
619
|
-
class: $(
|
|
620
|
-
style:
|
|
621
|
-
},
|
|
616
|
+
])) : g("", !0),
|
|
617
|
+
(a(!0), l(H, null, Q(T.value, (u, S) => (a(), l("th", {
|
|
618
|
+
key: u.label,
|
|
619
|
+
class: L($(u, S)),
|
|
620
|
+
style: U(A(u, S))
|
|
621
|
+
}, w(u.label), 7))), 128))
|
|
622
622
|
])
|
|
623
623
|
]),
|
|
624
624
|
s("tbody", null, [
|
|
625
|
-
e.loading ? (a(), l("tr",
|
|
625
|
+
e.loading ? (a(), l("tr", jt, [
|
|
626
626
|
s("td", {
|
|
627
627
|
class: "ds-table__loading",
|
|
628
628
|
colspan: i.value,
|
|
629
629
|
"data-testid": "ds-table-loading"
|
|
630
630
|
}, [
|
|
631
|
-
|
|
632
|
-
|
|
631
|
+
C(b.$slots, "loading", {}, () => [
|
|
632
|
+
Y(D(ye), {
|
|
633
633
|
label: e.loadingLabel || void 0
|
|
634
634
|
}, null, 8, ["label"])
|
|
635
635
|
], !0)
|
|
636
|
-
], 8,
|
|
637
|
-
])) :
|
|
636
|
+
], 8, Xt)
|
|
637
|
+
])) : C(b.$slots, "default", { key: 1 }, void 0, !0)
|
|
638
638
|
])
|
|
639
639
|
])
|
|
640
640
|
], 6)
|
|
641
|
-
], 8,
|
|
641
|
+
], 8, Wt)) : (a(), l("div", {
|
|
642
642
|
key: 1,
|
|
643
643
|
class: "ds-table",
|
|
644
644
|
"aria-busy": e.loading ? "true" : void 0
|
|
645
645
|
}, [
|
|
646
646
|
s("div", {
|
|
647
647
|
ref_key: "wrapperRef",
|
|
648
|
-
ref:
|
|
649
|
-
class:
|
|
648
|
+
ref: F,
|
|
649
|
+
class: L(["ds-table__wrapper", { "is-scrolled-start": W.value, "is-scrolled-end": ee.value }])
|
|
650
650
|
}, [
|
|
651
651
|
s("table", {
|
|
652
|
-
class:
|
|
653
|
-
style:
|
|
652
|
+
class: L(["ds-table__table", { "has-row-height": e.rowHeight != null }]),
|
|
653
|
+
style: U(d.value)
|
|
654
654
|
}, [
|
|
655
655
|
s("thead", null, [
|
|
656
656
|
s("tr", null, [
|
|
657
|
-
(a(!0), l(
|
|
658
|
-
var
|
|
657
|
+
(a(!0), l(H, null, Q(e.columns, (u) => {
|
|
658
|
+
var S;
|
|
659
659
|
return a(), l("th", {
|
|
660
|
-
key:
|
|
661
|
-
class:
|
|
662
|
-
`ds-table__th--${(
|
|
663
|
-
|
|
660
|
+
key: u.key,
|
|
661
|
+
class: L([
|
|
662
|
+
`ds-table__th--${(S = u.align) != null ? S : D(Je).LEFT}`,
|
|
663
|
+
c(u)
|
|
664
664
|
]),
|
|
665
|
-
style:
|
|
666
|
-
},
|
|
665
|
+
style: U(m(u))
|
|
666
|
+
}, w(u.label), 7);
|
|
667
667
|
}), 128))
|
|
668
668
|
])
|
|
669
669
|
]),
|
|
670
670
|
s("tbody", null, [
|
|
671
|
-
e.loading ? (a(), l("tr",
|
|
671
|
+
e.loading ? (a(), l("tr", Qt, [
|
|
672
672
|
s("td", {
|
|
673
673
|
class: "ds-table__loading",
|
|
674
674
|
colspan: Math.max(1, e.columns.length),
|
|
675
675
|
"data-testid": "ds-table-loading"
|
|
676
676
|
}, [
|
|
677
|
-
|
|
678
|
-
|
|
677
|
+
C(b.$slots, "loading", {}, () => [
|
|
678
|
+
Y(D(ye), {
|
|
679
679
|
label: e.loadingLabel || void 0
|
|
680
680
|
}, null, 8, ["label"])
|
|
681
681
|
], !0)
|
|
682
|
-
], 8,
|
|
683
|
-
])) : e.rows.length === 0 ? (a(), l("tr",
|
|
682
|
+
], 8, Jt)
|
|
683
|
+
])) : e.rows.length === 0 ? (a(), l("tr", ea, [
|
|
684
684
|
s("td", {
|
|
685
685
|
class: "ds-table__empty",
|
|
686
686
|
colspan: Math.max(1, e.columns.length),
|
|
687
687
|
"data-testid": "ds-table-empty"
|
|
688
688
|
}, [
|
|
689
|
-
|
|
690
|
-
|
|
689
|
+
C(b.$slots, "empty", {}, () => [
|
|
690
|
+
q(w(e.emptyMessage), 1)
|
|
691
691
|
], !0)
|
|
692
|
-
], 8,
|
|
693
|
-
])) : (a(!0), l(
|
|
694
|
-
key:
|
|
695
|
-
class:
|
|
692
|
+
], 8, ta)
|
|
693
|
+
])) : (a(!0), l(H, { key: 2 }, Q(e.rows, (u) => (a(), l("tr", {
|
|
694
|
+
key: u.id,
|
|
695
|
+
class: L({ "is-highlighted": u.id === e.highlightRowId }),
|
|
696
696
|
"data-testid": "ds-table-row"
|
|
697
697
|
}, [
|
|
698
|
-
(a(!0), l(
|
|
699
|
-
var
|
|
698
|
+
(a(!0), l(H, null, Q(e.columns, (S) => {
|
|
699
|
+
var x;
|
|
700
700
|
return a(), l("td", {
|
|
701
|
-
key:
|
|
702
|
-
class:
|
|
703
|
-
`ds-table__td--${(
|
|
704
|
-
|
|
701
|
+
key: S.key,
|
|
702
|
+
class: L([
|
|
703
|
+
`ds-table__td--${(x = S.align) != null ? x : D(Je).LEFT}`,
|
|
704
|
+
c(S)
|
|
705
705
|
]),
|
|
706
|
-
style:
|
|
707
|
-
title: e.rowHeight != null && !
|
|
706
|
+
style: U(p(S)),
|
|
707
|
+
title: e.rowHeight != null && !b.$slots[`cell-${S.key}`] && u[S.key] != null ? String(u[S.key]) : void 0
|
|
708
708
|
}, [
|
|
709
|
-
|
|
710
|
-
|
|
709
|
+
C(b.$slots, `cell-${S.key}`, { row: u }, () => [
|
|
710
|
+
q(w(u[S.key]), 1)
|
|
711
711
|
], !0)
|
|
712
|
-
], 14,
|
|
712
|
+
], 14, aa);
|
|
713
713
|
}), 128))
|
|
714
714
|
], 2))), 128))
|
|
715
715
|
])
|
|
716
716
|
], 6)
|
|
717
717
|
], 2)
|
|
718
|
-
], 8,
|
|
718
|
+
], 8, Zt));
|
|
719
719
|
}
|
|
720
|
-
}),
|
|
720
|
+
}), ln = /* @__PURE__ */ O(la, [["__scopeId", "data-v-7a5bb12f"]]), be = {
|
|
721
721
|
TEXT: "text",
|
|
722
722
|
EMAIL: "email",
|
|
723
723
|
PASSWORD: "password",
|
|
@@ -725,30 +725,30 @@ const ge = {
|
|
|
725
725
|
NUMBER: "number",
|
|
726
726
|
SEARCH: "search",
|
|
727
727
|
URL: "url"
|
|
728
|
-
},
|
|
728
|
+
}, ia = {
|
|
729
729
|
SM: "sm",
|
|
730
730
|
// 36px
|
|
731
731
|
MD: "md"
|
|
732
732
|
// 48px
|
|
733
|
-
},
|
|
733
|
+
}, na = { class: "ds-input__wrap" }, sa = {
|
|
734
734
|
key: 0,
|
|
735
|
-
class: "material-
|
|
735
|
+
class: "material-symbols-filled ds-input__search-icon",
|
|
736
736
|
"aria-hidden": "true"
|
|
737
|
-
},
|
|
737
|
+
}, oa = ["id", "type", "placeholder", "min", "max", "step", "disabled", "name", "autocomplete", "aria-invalid", "aria-describedby"], da = {
|
|
738
738
|
key: 1,
|
|
739
739
|
class: "ds-input__suffix"
|
|
740
|
-
},
|
|
740
|
+
}, ra = {
|
|
741
741
|
key: 0,
|
|
742
|
-
class: "material-
|
|
742
|
+
class: "material-symbols-filled ds-input__error-icon",
|
|
743
743
|
"aria-hidden": "true"
|
|
744
|
-
},
|
|
745
|
-
class: "material-
|
|
744
|
+
}, ca = ["disabled", "aria-label", "aria-pressed"], ua = {
|
|
745
|
+
class: "material-symbols-filled",
|
|
746
746
|
"aria-hidden": "true"
|
|
747
|
-
},
|
|
747
|
+
}, fa = ["id"], va = /* @__PURE__ */ B({
|
|
748
748
|
__name: "DsInput",
|
|
749
|
-
props: /* @__PURE__ */
|
|
750
|
-
type: { type: String, default:
|
|
751
|
-
size: { type: String, default:
|
|
749
|
+
props: /* @__PURE__ */ ae({
|
|
750
|
+
type: { type: String, default: be.TEXT },
|
|
751
|
+
size: { type: String, default: ia.SM },
|
|
752
752
|
placeholder: { type: String, default: "" },
|
|
753
753
|
disabled: Boolean,
|
|
754
754
|
error: Boolean,
|
|
@@ -768,52 +768,52 @@ const ge = {
|
|
|
768
768
|
modelValue: { default: "" },
|
|
769
769
|
modelModifiers: {}
|
|
770
770
|
}),
|
|
771
|
-
emits: /* @__PURE__ */
|
|
771
|
+
emits: /* @__PURE__ */ ae([Te, Ee, ze, Fe], ["update:modelValue"]),
|
|
772
772
|
setup(e, { expose: n, emit: t }) {
|
|
773
|
-
const o =
|
|
774
|
-
function
|
|
775
|
-
const
|
|
776
|
-
|
|
773
|
+
const o = ve(e, "modelValue"), i = e, d = t, E = V();
|
|
774
|
+
function v(_) {
|
|
775
|
+
const $ = _.relatedTarget, A = _.currentTarget;
|
|
776
|
+
$ && (A != null && A.contains($)) || d(Fe, _);
|
|
777
777
|
}
|
|
778
|
-
const y =
|
|
779
|
-
function
|
|
780
|
-
i.disabled || (
|
|
778
|
+
const y = he(), f = V(!1);
|
|
779
|
+
function r() {
|
|
780
|
+
i.disabled || (f.value = !f.value);
|
|
781
781
|
}
|
|
782
|
-
const
|
|
783
|
-
() => !!y.suffix || i.error && i.showErrorIcon ||
|
|
782
|
+
const c = k(() => i.type === be.PASSWORD), m = k(() => i.type === be.SEARCH), p = k(() => c.value ? f.value ? be.TEXT : be.PASSWORD : m.value ? be.TEXT : i.type), T = k(() => c.value && !!i.toggleLabel), N = k(
|
|
783
|
+
() => !!y.suffix || i.error && i.showErrorIcon || T.value
|
|
784
784
|
);
|
|
785
785
|
return n({
|
|
786
786
|
focus: () => {
|
|
787
|
-
var
|
|
788
|
-
return (
|
|
787
|
+
var _;
|
|
788
|
+
return (_ = E.value) == null ? void 0 : _.focus();
|
|
789
789
|
},
|
|
790
790
|
focusAtEnd: async () => {
|
|
791
|
-
await
|
|
792
|
-
const
|
|
793
|
-
if (!
|
|
794
|
-
|
|
795
|
-
const
|
|
791
|
+
await se();
|
|
792
|
+
const _ = E.value;
|
|
793
|
+
if (!_) return;
|
|
794
|
+
_.focus();
|
|
795
|
+
const $ = _.value.length;
|
|
796
796
|
try {
|
|
797
|
-
|
|
797
|
+
_.setSelectionRange($, $);
|
|
798
798
|
} catch {
|
|
799
799
|
}
|
|
800
800
|
}
|
|
801
|
-
}), (
|
|
802
|
-
class:
|
|
801
|
+
}), (_, $) => (a(), l("div", {
|
|
802
|
+
class: L(["ds-input", [
|
|
803
803
|
`ds-input--${e.size}`,
|
|
804
|
-
{ "is-error": e.error, "is-disabled": e.disabled, "is-search":
|
|
804
|
+
{ "is-error": e.error, "is-disabled": e.disabled, "is-search": m.value }
|
|
805
805
|
]]),
|
|
806
|
-
onFocusout:
|
|
806
|
+
onFocusout: v
|
|
807
807
|
}, [
|
|
808
|
-
s("div",
|
|
809
|
-
|
|
810
|
-
|
|
808
|
+
s("div", na, [
|
|
809
|
+
m.value ? (a(), l("i", sa, "search")) : g("", !0),
|
|
810
|
+
Me(s("input", {
|
|
811
811
|
id: e.id || void 0,
|
|
812
812
|
ref_key: "inputEl",
|
|
813
|
-
ref:
|
|
814
|
-
"onUpdate:modelValue":
|
|
815
|
-
class:
|
|
816
|
-
type:
|
|
813
|
+
ref: E,
|
|
814
|
+
"onUpdate:modelValue": $[0] || ($[0] = (A) => o.value = A),
|
|
815
|
+
class: L(["ds-input__control", { "has-suffix": N.value }]),
|
|
816
|
+
type: p.value,
|
|
817
817
|
placeholder: e.placeholder,
|
|
818
818
|
min: e.min,
|
|
819
819
|
max: e.max,
|
|
@@ -823,40 +823,40 @@ const ge = {
|
|
|
823
823
|
autocomplete: e.autocomplete || void 0,
|
|
824
824
|
"aria-invalid": e.error || void 0,
|
|
825
825
|
"aria-describedby": e.error && e.errorMessage && e.id ? `${e.id}-error` : void 0,
|
|
826
|
-
onFocus:
|
|
827
|
-
onBlur:
|
|
828
|
-
onChange:
|
|
829
|
-
}, null, 42,
|
|
830
|
-
[
|
|
826
|
+
onFocus: $[1] || ($[1] = (A) => d(D(Te), A)),
|
|
827
|
+
onBlur: $[2] || ($[2] = (A) => d(D(Ee), A)),
|
|
828
|
+
onChange: $[3] || ($[3] = (A) => d(D(ze), A))
|
|
829
|
+
}, null, 42, oa), [
|
|
830
|
+
[yt, o.value]
|
|
831
831
|
]),
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
e.error && e.showErrorIcon ? (a(), l("i",
|
|
832
|
+
N.value ? (a(), l("div", da, [
|
|
833
|
+
C(_.$slots, "suffix", {}, void 0, !0),
|
|
834
|
+
e.error && e.showErrorIcon ? (a(), l("i", ra, "warning")) : T.value ? (a(), l("button", {
|
|
835
835
|
key: 1,
|
|
836
836
|
type: "button",
|
|
837
837
|
class: "ds-input__toggle",
|
|
838
838
|
disabled: e.disabled,
|
|
839
839
|
"aria-label": e.toggleLabel || void 0,
|
|
840
|
-
"aria-pressed":
|
|
841
|
-
onClick:
|
|
840
|
+
"aria-pressed": f.value,
|
|
841
|
+
onClick: r
|
|
842
842
|
}, [
|
|
843
|
-
s("i",
|
|
844
|
-
], 8,
|
|
845
|
-
])) :
|
|
843
|
+
s("i", ua, w(f.value ? "visibility" : "visibility_off"), 1)
|
|
844
|
+
], 8, ca)) : g("", !0)
|
|
845
|
+
])) : g("", !0)
|
|
846
846
|
]),
|
|
847
847
|
e.error && e.errorMessage ? (a(), l("p", {
|
|
848
848
|
key: 0,
|
|
849
849
|
id: e.id ? `${e.id}-error` : void 0,
|
|
850
850
|
class: "ds-input__error"
|
|
851
|
-
},
|
|
851
|
+
}, w(e.errorMessage), 9, fa)) : g("", !0)
|
|
852
852
|
], 34));
|
|
853
853
|
}
|
|
854
|
-
}),
|
|
854
|
+
}), nn = /* @__PURE__ */ O(va, [["__scopeId", "data-v-d6eb193a"]]), ba = {
|
|
855
855
|
VERTICAL: "vertical"
|
|
856
|
-
},
|
|
856
|
+
}, ya = ["id", "placeholder", "rows", "disabled", "name", "aria-invalid", "aria-describedby"], ma = ["id"], ha = /* @__PURE__ */ B({
|
|
857
857
|
inheritAttrs: !1,
|
|
858
858
|
__name: "DsTextarea",
|
|
859
|
-
props: /* @__PURE__ */
|
|
859
|
+
props: /* @__PURE__ */ ae({
|
|
860
860
|
placeholder: { type: String, default: "" },
|
|
861
861
|
rows: { type: Number, default: 4 },
|
|
862
862
|
disabled: Boolean,
|
|
@@ -867,25 +867,25 @@ const ge = {
|
|
|
867
867
|
// CSS resize behavior of the control (default vertical, mirrors the DS).
|
|
868
868
|
resize: {
|
|
869
869
|
type: String,
|
|
870
|
-
default:
|
|
870
|
+
default: ba.VERTICAL
|
|
871
871
|
}
|
|
872
872
|
}, {
|
|
873
873
|
modelValue: { default: "" },
|
|
874
874
|
modelModifiers: {}
|
|
875
875
|
}),
|
|
876
|
-
emits: /* @__PURE__ */
|
|
876
|
+
emits: /* @__PURE__ */ ae([Te, Ee], ["update:modelValue"]),
|
|
877
877
|
setup(e, { emit: n }) {
|
|
878
|
-
const t =
|
|
879
|
-
() => Object.fromEntries(Object.entries(i).filter(([y]) =>
|
|
880
|
-
),
|
|
881
|
-
() => Object.fromEntries(Object.entries(i).filter(([y]) => !
|
|
878
|
+
const t = ve(e, "modelValue"), o = n, i = mt(), d = (y) => y === "class" || y === "style" || y.startsWith("data-"), E = k(
|
|
879
|
+
() => Object.fromEntries(Object.entries(i).filter(([y]) => d(y)))
|
|
880
|
+
), v = k(
|
|
881
|
+
() => Object.fromEntries(Object.entries(i).filter(([y]) => !d(y)))
|
|
882
882
|
);
|
|
883
|
-
return (y,
|
|
883
|
+
return (y, f) => (a(), l("div", ke({
|
|
884
884
|
class: ["ds-textarea", [`ds-textarea--resize-${e.resize}`, { "is-error": e.error, "is-disabled": e.disabled }]]
|
|
885
|
-
},
|
|
886
|
-
|
|
885
|
+
}, E.value), [
|
|
886
|
+
Me(s("textarea", ke(v.value, {
|
|
887
887
|
id: e.id || void 0,
|
|
888
|
-
"onUpdate:modelValue":
|
|
888
|
+
"onUpdate:modelValue": f[0] || (f[0] = (r) => t.value = r),
|
|
889
889
|
class: "ds-textarea__control",
|
|
890
890
|
placeholder: e.placeholder,
|
|
891
891
|
rows: e.rows,
|
|
@@ -893,45 +893,45 @@ const ge = {
|
|
|
893
893
|
name: e.name || void 0,
|
|
894
894
|
"aria-invalid": e.error || void 0,
|
|
895
895
|
"aria-describedby": e.error && e.errorMessage && e.id ? `${e.id}-error` : void 0,
|
|
896
|
-
onFocus:
|
|
897
|
-
onBlur:
|
|
898
|
-
}), null, 16,
|
|
899
|
-
[
|
|
896
|
+
onFocus: f[1] || (f[1] = (r) => o(D(Te), r)),
|
|
897
|
+
onBlur: f[2] || (f[2] = (r) => o(D(Ee), r))
|
|
898
|
+
}), null, 16, ya), [
|
|
899
|
+
[ht, t.value]
|
|
900
900
|
]),
|
|
901
901
|
e.error && e.errorMessage ? (a(), l("p", {
|
|
902
902
|
key: 0,
|
|
903
903
|
id: e.id ? `${e.id}-error` : void 0,
|
|
904
904
|
class: "ds-textarea__error"
|
|
905
|
-
},
|
|
905
|
+
}, w(e.errorMessage), 9, ma)) : g("", !0)
|
|
906
906
|
], 16));
|
|
907
907
|
}
|
|
908
|
-
}),
|
|
908
|
+
}), sn = /* @__PURE__ */ O(ha, [["__scopeId", "data-v-745c01de"]]), ga = {
|
|
909
909
|
SUCCESS: "success",
|
|
910
910
|
INFO: "info",
|
|
911
911
|
WARNING: "warning",
|
|
912
912
|
ERROR: "error"
|
|
913
|
-
},
|
|
913
|
+
}, pa = {
|
|
914
914
|
LIGHT: "light",
|
|
915
915
|
// tinted: family tint bg + mid border + shadow text
|
|
916
916
|
DARK: "dark"
|
|
917
917
|
// solid: family shadow bg + white text
|
|
918
|
-
},
|
|
918
|
+
}, Sa = {
|
|
919
919
|
success: "check_circle",
|
|
920
920
|
info: "info",
|
|
921
921
|
warning: "warning",
|
|
922
922
|
error: "error"
|
|
923
|
-
},
|
|
923
|
+
}, ka = {
|
|
924
924
|
key: 0,
|
|
925
|
-
class: "material-
|
|
925
|
+
class: "material-symbols-filled ds-alert__icon",
|
|
926
926
|
"aria-hidden": "true"
|
|
927
|
-
},
|
|
927
|
+
}, $a = { class: "ds-alert__content" }, Ta = {
|
|
928
928
|
key: 1,
|
|
929
929
|
class: "ds-alert__body"
|
|
930
|
-
},
|
|
930
|
+
}, Ea = ["aria-label"], wa = /* @__PURE__ */ B({
|
|
931
931
|
__name: "DsAlert",
|
|
932
|
-
props: /* @__PURE__ */
|
|
933
|
-
type: { type: String, default:
|
|
934
|
-
effect: { type: String, default:
|
|
932
|
+
props: /* @__PURE__ */ ae({
|
|
933
|
+
type: { type: String, default: ga.INFO },
|
|
934
|
+
effect: { type: String, default: pa.LIGHT },
|
|
935
935
|
title: { type: String, default: "" },
|
|
936
936
|
description: { type: String, default: "" },
|
|
937
937
|
showIcon: Boolean,
|
|
@@ -944,88 +944,88 @@ const ge = {
|
|
|
944
944
|
visible: { type: Boolean, default: !0 },
|
|
945
945
|
visibleModifiers: {}
|
|
946
946
|
}),
|
|
947
|
-
emits: /* @__PURE__ */
|
|
947
|
+
emits: /* @__PURE__ */ ae([J], ["update:visible"]),
|
|
948
948
|
setup(e, { emit: n }) {
|
|
949
|
-
const t = e, o = n, i =
|
|
950
|
-
function
|
|
951
|
-
i.value = !1, o(
|
|
949
|
+
const t = e, o = n, i = ve(e, "visible"), d = he(), E = k(() => Sa[t.type]), v = k(() => !!d.default || t.description.length > 0), y = k(() => !!d.title || t.title.length > 0);
|
|
950
|
+
function f() {
|
|
951
|
+
i.value = !1, o(J);
|
|
952
952
|
}
|
|
953
|
-
return (
|
|
953
|
+
return (r, c) => (a(), K(me, { name: "ds-alert-fade" }, {
|
|
954
954
|
default: ie(() => [
|
|
955
955
|
i.value ? (a(), l("div", {
|
|
956
956
|
key: 0,
|
|
957
|
-
class:
|
|
957
|
+
class: L(["ds-alert", [`ds-alert--${e.type}`, `ds-alert--${e.effect}`, { "is-center": e.center }]]),
|
|
958
958
|
role: "alert"
|
|
959
959
|
}, [
|
|
960
|
-
e.showIcon ? (a(), l("i",
|
|
961
|
-
s("div",
|
|
960
|
+
e.showIcon ? (a(), l("i", ka, w(E.value), 1)) : g("", !0),
|
|
961
|
+
s("div", $a, [
|
|
962
962
|
y.value ? (a(), l("div", {
|
|
963
963
|
key: 0,
|
|
964
|
-
class:
|
|
964
|
+
class: L(["ds-alert__title", { "has-body": v.value, "is-bold": v.value || e.boldTitle }])
|
|
965
965
|
}, [
|
|
966
|
-
|
|
967
|
-
|
|
966
|
+
C(r.$slots, "title", {}, () => [
|
|
967
|
+
q(w(e.title), 1)
|
|
968
968
|
], !0)
|
|
969
|
-
], 2)) :
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
969
|
+
], 2)) : g("", !0),
|
|
970
|
+
v.value ? (a(), l("div", Ta, [
|
|
971
|
+
C(r.$slots, "default", {}, () => [
|
|
972
|
+
q(w(e.description), 1)
|
|
973
973
|
], !0)
|
|
974
|
-
])) :
|
|
974
|
+
])) : g("", !0)
|
|
975
975
|
]),
|
|
976
976
|
e.closable ? (a(), l("button", {
|
|
977
977
|
key: 1,
|
|
978
978
|
type: "button",
|
|
979
979
|
class: "ds-alert__close",
|
|
980
980
|
"aria-label": e.closeLabel || void 0,
|
|
981
|
-
onClick:
|
|
982
|
-
}, [...
|
|
981
|
+
onClick: f
|
|
982
|
+
}, [...c[0] || (c[0] = [
|
|
983
983
|
s("i", {
|
|
984
|
-
class: "material-
|
|
984
|
+
class: "material-symbols-filled",
|
|
985
985
|
"aria-hidden": "true"
|
|
986
986
|
}, "close", -1)
|
|
987
|
-
])], 8,
|
|
988
|
-
], 2)) :
|
|
987
|
+
])], 8, Ea)) : g("", !0)
|
|
988
|
+
], 2)) : g("", !0)
|
|
989
989
|
]),
|
|
990
990
|
_: 3
|
|
991
991
|
}));
|
|
992
992
|
}
|
|
993
|
-
}),
|
|
993
|
+
}), on = /* @__PURE__ */ O(wa, [["__scopeId", "data-v-82377cbc"]]), La = {
|
|
994
994
|
SUCCESS: "success",
|
|
995
995
|
INFO: "info",
|
|
996
996
|
WARNING: "warning",
|
|
997
997
|
ERROR: "error"
|
|
998
|
-
},
|
|
998
|
+
}, _a = {
|
|
999
999
|
TOP_LEFT: "top-left",
|
|
1000
1000
|
TOP_RIGHT: "top-right",
|
|
1001
1001
|
BOTTOM_LEFT: "bottom-left",
|
|
1002
1002
|
BOTTOM_RIGHT: "bottom-right"
|
|
1003
|
-
},
|
|
1003
|
+
}, Ca = {
|
|
1004
1004
|
success: "check_circle",
|
|
1005
1005
|
info: "mode_edit",
|
|
1006
1006
|
warning: "warning",
|
|
1007
1007
|
error: "error"
|
|
1008
|
-
},
|
|
1008
|
+
}, et = {
|
|
1009
1009
|
BLANK: "_blank",
|
|
1010
1010
|
SELF: "_self",
|
|
1011
1011
|
PARENT: "_parent",
|
|
1012
1012
|
TOP: "_top"
|
|
1013
|
-
},
|
|
1014
|
-
class: "material-
|
|
1013
|
+
}, Ia = {
|
|
1014
|
+
class: "material-symbols-filled ds-notification__icon",
|
|
1015
1015
|
"aria-hidden": "true"
|
|
1016
|
-
},
|
|
1016
|
+
}, Da = { class: "ds-notification__content" }, Ra = {
|
|
1017
1017
|
key: 0,
|
|
1018
1018
|
class: "ds-notification__title"
|
|
1019
|
-
},
|
|
1019
|
+
}, Aa = {
|
|
1020
1020
|
key: 1,
|
|
1021
1021
|
class: "ds-notification__desc"
|
|
1022
|
-
},
|
|
1022
|
+
}, Na = ["href", "target", "rel"], Ba = ["aria-label"], Oa = /* @__PURE__ */ B({
|
|
1023
1023
|
__name: "DsNotification",
|
|
1024
1024
|
props: {
|
|
1025
|
-
type: { type: String, default:
|
|
1025
|
+
type: { type: String, default: La.INFO },
|
|
1026
1026
|
position: {
|
|
1027
1027
|
type: String,
|
|
1028
|
-
default:
|
|
1028
|
+
default: _a.BOTTOM_LEFT
|
|
1029
1029
|
},
|
|
1030
1030
|
title: { type: String, default: "" },
|
|
1031
1031
|
description: { type: String, default: "" },
|
|
@@ -1036,7 +1036,7 @@ const ge = {
|
|
|
1036
1036
|
// navegación in-app (SPA) escuchá `navigate` y enrutá con el router de la app.
|
|
1037
1037
|
linkTarget: {
|
|
1038
1038
|
type: String,
|
|
1039
|
-
default:
|
|
1039
|
+
default: et.BLANK
|
|
1040
1040
|
},
|
|
1041
1041
|
showClose: { type: Boolean, default: !0 },
|
|
1042
1042
|
// Accessible name for the icon-only close button — provide it whenever
|
|
@@ -1048,85 +1048,85 @@ const ge = {
|
|
|
1048
1048
|
// while the pointer is over the card and resumes with the remaining time.
|
|
1049
1049
|
duration: { type: Number, default: 3500 }
|
|
1050
1050
|
},
|
|
1051
|
-
emits: [
|
|
1051
|
+
emits: [J, qe],
|
|
1052
1052
|
setup(e, { emit: n }) {
|
|
1053
|
-
const t = e, o = n, i =
|
|
1054
|
-
() => t.linkTarget ===
|
|
1053
|
+
const t = e, o = n, i = V(!0), d = k(() => Ca[t.type]), E = k(
|
|
1054
|
+
() => t.linkTarget === et.BLANK ? "noopener noreferrer" : void 0
|
|
1055
1055
|
);
|
|
1056
|
-
let
|
|
1057
|
-
function
|
|
1058
|
-
|
|
1059
|
-
}
|
|
1060
|
-
function b(C) {
|
|
1061
|
-
d(), !(t.duration <= 0 || !i.value) && (y = Date.now(), f = setTimeout(p, C));
|
|
1056
|
+
let v, y = 0, f = t.duration;
|
|
1057
|
+
function r() {
|
|
1058
|
+
v && (clearTimeout(v), v = void 0);
|
|
1062
1059
|
}
|
|
1063
|
-
function
|
|
1064
|
-
|
|
1060
|
+
function c(_) {
|
|
1061
|
+
r(), !(t.duration <= 0 || !i.value) && (y = Date.now(), v = setTimeout(T, _));
|
|
1065
1062
|
}
|
|
1066
|
-
function
|
|
1067
|
-
|
|
1063
|
+
function m() {
|
|
1064
|
+
v && (f -= Date.now() - y, r());
|
|
1068
1065
|
}
|
|
1069
1066
|
function p() {
|
|
1070
|
-
|
|
1067
|
+
c(f > 0 ? f : t.duration);
|
|
1068
|
+
}
|
|
1069
|
+
function T() {
|
|
1070
|
+
r(), i.value = !1, o(J);
|
|
1071
1071
|
}
|
|
1072
|
-
function
|
|
1073
|
-
o(
|
|
1072
|
+
function N(_) {
|
|
1073
|
+
o(qe, _);
|
|
1074
1074
|
}
|
|
1075
|
-
return
|
|
1076
|
-
|
|
1075
|
+
return nt(() => c(t.duration)), de(r), (_, $) => (a(), K(Pe, { to: "body" }, [
|
|
1076
|
+
Y(me, {
|
|
1077
1077
|
name: "ds-notification",
|
|
1078
1078
|
appear: ""
|
|
1079
1079
|
}, {
|
|
1080
1080
|
default: ie(() => [
|
|
1081
1081
|
i.value ? (a(), l("div", {
|
|
1082
1082
|
key: 0,
|
|
1083
|
-
class:
|
|
1083
|
+
class: L(["ds-notification", `ds-notification--${e.position}`])
|
|
1084
1084
|
}, [
|
|
1085
1085
|
s("div", {
|
|
1086
|
-
class:
|
|
1086
|
+
class: L(["ds-notification__card", `ds-notification__card--${e.type}`]),
|
|
1087
1087
|
role: "alert",
|
|
1088
|
-
onMouseenter:
|
|
1089
|
-
onMouseleave:
|
|
1088
|
+
onMouseenter: m,
|
|
1089
|
+
onMouseleave: p
|
|
1090
1090
|
}, [
|
|
1091
|
-
s("i",
|
|
1092
|
-
s("div",
|
|
1093
|
-
e.title ? (a(), l("span",
|
|
1094
|
-
e.description ? (a(), l("p",
|
|
1091
|
+
s("i", Ia, w(d.value), 1),
|
|
1092
|
+
s("div", Da, [
|
|
1093
|
+
e.title ? (a(), l("span", Ra, w(e.title), 1)) : g("", !0),
|
|
1094
|
+
e.description ? (a(), l("p", Aa, w(e.description), 1)) : g("", !0),
|
|
1095
1095
|
e.linkTitle ? (a(), l("a", {
|
|
1096
1096
|
key: 2,
|
|
1097
1097
|
class: "ds-notification__link",
|
|
1098
1098
|
href: e.link || void 0,
|
|
1099
1099
|
target: e.linkTarget,
|
|
1100
|
-
rel:
|
|
1101
|
-
onClick:
|
|
1102
|
-
},
|
|
1100
|
+
rel: E.value,
|
|
1101
|
+
onClick: N
|
|
1102
|
+
}, w(e.linkTitle), 9, Na)) : g("", !0)
|
|
1103
1103
|
]),
|
|
1104
1104
|
e.showClose ? (a(), l("button", {
|
|
1105
1105
|
key: 0,
|
|
1106
1106
|
type: "button",
|
|
1107
1107
|
class: "ds-notification__close",
|
|
1108
1108
|
"aria-label": e.closeLabel || void 0,
|
|
1109
|
-
onClick:
|
|
1110
|
-
}, [
|
|
1109
|
+
onClick: T
|
|
1110
|
+
}, [...$[0] || ($[0] = [
|
|
1111
1111
|
s("i", {
|
|
1112
|
-
class: "material-
|
|
1112
|
+
class: "material-symbols-filled",
|
|
1113
1113
|
"aria-hidden": "true"
|
|
1114
1114
|
}, "close", -1)
|
|
1115
|
-
])], 8,
|
|
1115
|
+
])], 8, Ba)) : g("", !0)
|
|
1116
1116
|
], 34)
|
|
1117
|
-
], 2)) :
|
|
1117
|
+
], 2)) : g("", !0)
|
|
1118
1118
|
]),
|
|
1119
1119
|
_: 1
|
|
1120
1120
|
})
|
|
1121
1121
|
]));
|
|
1122
1122
|
}
|
|
1123
|
-
}),
|
|
1123
|
+
}), dn = /* @__PURE__ */ O(Oa, [["__scopeId", "data-v-4ae56e64"]]), xa = ["aria-modal", "aria-labelledby", "aria-label"], Ma = {
|
|
1124
1124
|
key: 0,
|
|
1125
1125
|
class: "ds-modal__header"
|
|
1126
|
-
},
|
|
1126
|
+
}, Pa = ["id"], za = { class: "ds-modal__body" }, Fa = {
|
|
1127
1127
|
key: 1,
|
|
1128
1128
|
class: "ds-modal__footer"
|
|
1129
|
-
},
|
|
1129
|
+
}, Va = /* @__PURE__ */ B({
|
|
1130
1130
|
__name: "DsModal",
|
|
1131
1131
|
props: {
|
|
1132
1132
|
open: Boolean,
|
|
@@ -1149,120 +1149,141 @@ const ge = {
|
|
|
1149
1149
|
// matching DsDataCard so the control is never unnamed.
|
|
1150
1150
|
closeLabel: { type: String, default: "Close" }
|
|
1151
1151
|
},
|
|
1152
|
-
emits: [
|
|
1152
|
+
emits: [J],
|
|
1153
1153
|
setup(e, { emit: n }) {
|
|
1154
|
-
const t = e, o = n, i =
|
|
1155
|
-
let
|
|
1156
|
-
const
|
|
1154
|
+
const t = e, o = n, i = V(null);
|
|
1155
|
+
let d = null;
|
|
1156
|
+
const E = ge(), v = k(() => ({
|
|
1157
1157
|
width: t.width,
|
|
1158
1158
|
...t.height ? { height: t.height } : {}
|
|
1159
1159
|
}));
|
|
1160
1160
|
function y() {
|
|
1161
|
-
t.fixed && t.closeOnBackdrop && o(
|
|
1161
|
+
t.fixed && t.closeOnBackdrop && o(J);
|
|
1162
1162
|
}
|
|
1163
|
-
function
|
|
1163
|
+
function f() {
|
|
1164
1164
|
return i.value ? Array.from(i.value.querySelectorAll('a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])')).filter(
|
|
1165
|
-
(
|
|
1165
|
+
(T) => T.offsetParent !== null
|
|
1166
1166
|
) : [];
|
|
1167
1167
|
}
|
|
1168
|
-
function
|
|
1169
|
-
var
|
|
1170
|
-
if (
|
|
1171
|
-
t.closeOnEscape && o(
|
|
1168
|
+
function r(p) {
|
|
1169
|
+
var $;
|
|
1170
|
+
if (p.key === "Escape") {
|
|
1171
|
+
t.closeOnEscape && o(J);
|
|
1172
1172
|
return;
|
|
1173
1173
|
}
|
|
1174
|
-
if (
|
|
1175
|
-
const
|
|
1176
|
-
if (
|
|
1177
|
-
|
|
1174
|
+
if (p.key !== "Tab") return;
|
|
1175
|
+
const T = f();
|
|
1176
|
+
if (T.length === 0) {
|
|
1177
|
+
p.preventDefault(), ($ = i.value) == null || $.focus();
|
|
1178
1178
|
return;
|
|
1179
1179
|
}
|
|
1180
|
-
const
|
|
1181
|
-
|
|
1180
|
+
const N = T[0], _ = T[T.length - 1];
|
|
1181
|
+
p.shiftKey && document.activeElement === N ? (p.preventDefault(), _.focus()) : !p.shiftKey && document.activeElement === _ && (p.preventDefault(), N.focus());
|
|
1182
1182
|
}
|
|
1183
|
-
function
|
|
1184
|
-
|
|
1185
|
-
var
|
|
1186
|
-
return (
|
|
1183
|
+
function c() {
|
|
1184
|
+
d = document.activeElement, document.addEventListener("keydown", r), document.body.style.overflow = "hidden", se(() => {
|
|
1185
|
+
var p, T;
|
|
1186
|
+
return (T = (p = f()[0]) != null ? p : i.value) == null ? void 0 : T.focus();
|
|
1187
1187
|
});
|
|
1188
1188
|
}
|
|
1189
|
-
function
|
|
1190
|
-
var
|
|
1191
|
-
document.removeEventListener("keydown",
|
|
1189
|
+
function m(p = !0) {
|
|
1190
|
+
var T;
|
|
1191
|
+
document.removeEventListener("keydown", r), document.body.style.overflow = "", p && ((T = d == null ? void 0 : d.focus) == null || T.call(d));
|
|
1192
1192
|
}
|
|
1193
|
-
return
|
|
1193
|
+
return Z(
|
|
1194
1194
|
() => t.open && t.fixed,
|
|
1195
|
-
(
|
|
1196
|
-
typeof document != "undefined" && (
|
|
1195
|
+
(p, T) => {
|
|
1196
|
+
typeof document != "undefined" && (p ? c() : T && m());
|
|
1197
1197
|
},
|
|
1198
1198
|
{ immediate: !0 }
|
|
1199
|
-
),
|
|
1200
|
-
typeof document != "undefined" &&
|
|
1201
|
-
}), (
|
|
1199
|
+
), de(() => {
|
|
1200
|
+
typeof document != "undefined" && m(!1);
|
|
1201
|
+
}), (p, T) => (a(), K(Pe, {
|
|
1202
1202
|
to: "body",
|
|
1203
1203
|
disabled: !e.fixed
|
|
1204
1204
|
}, [
|
|
1205
|
-
|
|
1205
|
+
Y(me, { name: "ds-modal" }, {
|
|
1206
1206
|
default: ie(() => [
|
|
1207
1207
|
e.open ? (a(), l("div", {
|
|
1208
1208
|
key: 0,
|
|
1209
|
-
class:
|
|
1210
|
-
style:
|
|
1209
|
+
class: L(["ds-modal", { "is-fixed": e.fixed }]),
|
|
1210
|
+
style: U(e.fixed ? { paddingTop: e.top } : void 0),
|
|
1211
1211
|
onClick: y
|
|
1212
1212
|
}, [
|
|
1213
1213
|
s("div", {
|
|
1214
1214
|
ref_key: "dialogRef",
|
|
1215
1215
|
ref: i,
|
|
1216
|
-
class:
|
|
1216
|
+
class: L(["ds-modal__dialog", { "is-center": e.center }]),
|
|
1217
1217
|
role: "dialog",
|
|
1218
1218
|
"aria-modal": e.fixed ? "true" : "false",
|
|
1219
|
-
"aria-labelledby": e.title ?
|
|
1219
|
+
"aria-labelledby": e.title ? D(E) : void 0,
|
|
1220
1220
|
"aria-label": e.title ? void 0 : "dialog",
|
|
1221
1221
|
tabindex: "-1",
|
|
1222
|
-
style:
|
|
1223
|
-
onClick:
|
|
1222
|
+
style: U(v.value),
|
|
1223
|
+
onClick: T[1] || (T[1] = ue(() => {
|
|
1224
1224
|
}, ["stop"]))
|
|
1225
1225
|
}, [
|
|
1226
|
-
e.title || e.showClose ? (a(), l("div",
|
|
1226
|
+
e.title || e.showClose ? (a(), l("div", Ma, [
|
|
1227
1227
|
s("span", {
|
|
1228
|
-
id:
|
|
1228
|
+
id: D(E),
|
|
1229
1229
|
class: "ds-modal__title"
|
|
1230
|
-
},
|
|
1231
|
-
e.showClose ? (a(),
|
|
1230
|
+
}, w(e.title), 9, Pa),
|
|
1231
|
+
e.showClose ? (a(), K(D(fe), {
|
|
1232
1232
|
key: 0,
|
|
1233
1233
|
variant: "tertiary",
|
|
1234
1234
|
circle: "",
|
|
1235
1235
|
"left-icon": "close",
|
|
1236
1236
|
"aria-label": e.closeLabel || void 0,
|
|
1237
|
-
onClick:
|
|
1238
|
-
}, null, 8, ["aria-label"])) :
|
|
1239
|
-
])) :
|
|
1240
|
-
s("div",
|
|
1241
|
-
|
|
1237
|
+
onClick: T[0] || (T[0] = (N) => o(D(J)))
|
|
1238
|
+
}, null, 8, ["aria-label"])) : g("", !0)
|
|
1239
|
+
])) : g("", !0),
|
|
1240
|
+
s("div", za, [
|
|
1241
|
+
C(p.$slots, "default", {}, void 0, !0)
|
|
1242
1242
|
]),
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
])) :
|
|
1246
|
-
], 14,
|
|
1247
|
-
], 6)) :
|
|
1243
|
+
p.$slots.footer ? (a(), l("div", Fa, [
|
|
1244
|
+
C(p.$slots, "footer", {}, void 0, !0)
|
|
1245
|
+
])) : g("", !0)
|
|
1246
|
+
], 14, xa)
|
|
1247
|
+
], 6)) : g("", !0)
|
|
1248
1248
|
]),
|
|
1249
1249
|
_: 3
|
|
1250
1250
|
})
|
|
1251
1251
|
], 8, ["disabled"]));
|
|
1252
1252
|
}
|
|
1253
|
-
}),
|
|
1253
|
+
}), rn = /* @__PURE__ */ O(Va, [["__scopeId", "data-v-a759ae72"]]), Ua = "--ds-overlay-shift", Se = 8;
|
|
1254
|
+
function dt(e, n) {
|
|
1255
|
+
const t = V(0), o = k(
|
|
1256
|
+
() => t.value ? { [Ua]: `${Math.round(t.value)}px` } : null
|
|
1257
|
+
);
|
|
1258
|
+
async function i() {
|
|
1259
|
+
if (typeof window == "undefined") return;
|
|
1260
|
+
t.value = 0, await se();
|
|
1261
|
+
const v = e.value;
|
|
1262
|
+
if (!v) return;
|
|
1263
|
+
const y = v.getBoundingClientRect(), f = n().split("-")[0], r = f === "top" || f === "bottom", [c, m, p] = r ? [y.left, y.right, window.innerWidth] : [y.top, y.bottom, window.innerHeight];
|
|
1264
|
+
c < Se ? t.value = Se - c : m > p - Se && (t.value = p - Se - m);
|
|
1265
|
+
}
|
|
1266
|
+
function d() {
|
|
1267
|
+
typeof window != "undefined" && (window.addEventListener("resize", i), window.addEventListener("scroll", i, { capture: !0, passive: !0 }), i());
|
|
1268
|
+
}
|
|
1269
|
+
function E() {
|
|
1270
|
+
typeof window != "undefined" && (window.removeEventListener("resize", i), window.removeEventListener("scroll", i, { capture: !0 }), t.value = 0);
|
|
1271
|
+
}
|
|
1272
|
+
return { shift: t, shiftStyle: o, measure: i, activate: d, deactivate: E };
|
|
1273
|
+
}
|
|
1274
|
+
const Ga = {
|
|
1254
1275
|
TOP: "top",
|
|
1255
1276
|
BOTTOM: "bottom",
|
|
1256
1277
|
LEFT: "left",
|
|
1257
1278
|
RIGHT: "right"
|
|
1258
|
-
},
|
|
1279
|
+
}, Ha = ["id"], Wa = /* @__PURE__ */ B({
|
|
1259
1280
|
__name: "DsTooltip",
|
|
1260
1281
|
props: {
|
|
1261
1282
|
// Bubble text. Rich content can be provided via the #content slot instead.
|
|
1262
1283
|
content: { type: String, default: "" },
|
|
1263
1284
|
placement: {
|
|
1264
1285
|
type: String,
|
|
1265
|
-
default:
|
|
1286
|
+
default: Ga.TOP
|
|
1266
1287
|
},
|
|
1267
1288
|
// Hover delay before showing, ms. Focus always shows immediately (no delay).
|
|
1268
1289
|
delay: { type: Number, default: 300 },
|
|
@@ -1275,77 +1296,88 @@ const ge = {
|
|
|
1275
1296
|
disabled: { type: Boolean, default: !1 }
|
|
1276
1297
|
},
|
|
1277
1298
|
setup(e) {
|
|
1278
|
-
const n = e, t =
|
|
1279
|
-
|
|
1299
|
+
const n = e, t = he(), o = ge(), i = V(!1), d = V(null), {
|
|
1300
|
+
shiftStyle: E,
|
|
1301
|
+
activate: v,
|
|
1302
|
+
deactivate: y
|
|
1303
|
+
} = dt(d, () => n.placement);
|
|
1304
|
+
Z(i, (M) => {
|
|
1305
|
+
M ? v() : y();
|
|
1306
|
+
});
|
|
1307
|
+
const f = k(() => !n.disabled && (n.content.length > 0 || !!t.content));
|
|
1308
|
+
Z(
|
|
1280
1309
|
() => n.disabled,
|
|
1281
|
-
(
|
|
1282
|
-
|
|
1310
|
+
(M) => {
|
|
1311
|
+
M && G();
|
|
1283
1312
|
}
|
|
1284
1313
|
);
|
|
1285
|
-
let
|
|
1286
|
-
function
|
|
1287
|
-
|
|
1314
|
+
let r = !1, c = !1, m = null, p = null, T = null;
|
|
1315
|
+
function N() {
|
|
1316
|
+
m !== null && (clearTimeout(m), m = null);
|
|
1288
1317
|
}
|
|
1289
|
-
function
|
|
1290
|
-
|
|
1318
|
+
function _(M) {
|
|
1319
|
+
M && (p && p !== M && $(), p !== M && (p = M, T = M.getAttribute("aria-describedby"), M.setAttribute(
|
|
1291
1320
|
"aria-describedby",
|
|
1292
|
-
|
|
1321
|
+
T ? `${T} ${o}` : o
|
|
1293
1322
|
)));
|
|
1294
1323
|
}
|
|
1295
|
-
function
|
|
1296
|
-
|
|
1324
|
+
function $() {
|
|
1325
|
+
p && (T !== null ? p.setAttribute("aria-describedby", T) : p.removeAttribute("aria-describedby"), p = null, T = null);
|
|
1297
1326
|
}
|
|
1298
|
-
function
|
|
1299
|
-
|
|
1327
|
+
function A() {
|
|
1328
|
+
f.value && (r = !0, N(), m = setTimeout(() => {
|
|
1300
1329
|
i.value = !0;
|
|
1301
1330
|
}, n.delay));
|
|
1302
1331
|
}
|
|
1303
|
-
function
|
|
1304
|
-
|
|
1332
|
+
function F() {
|
|
1333
|
+
r = !1, N(), c || G();
|
|
1305
1334
|
}
|
|
1306
|
-
function
|
|
1307
|
-
|
|
1335
|
+
function W(M) {
|
|
1336
|
+
f.value && (c = !0, N(), i.value = !0, _(M.target));
|
|
1308
1337
|
}
|
|
1309
|
-
function
|
|
1310
|
-
const
|
|
1311
|
-
|
|
1338
|
+
function ee(M) {
|
|
1339
|
+
const j = M.relatedTarget, b = M.currentTarget;
|
|
1340
|
+
j && (b != null && b.contains(j)) || (c = !1, r || G());
|
|
1312
1341
|
}
|
|
1313
|
-
function
|
|
1314
|
-
|
|
1315
|
-
}
|
|
1316
|
-
return
|
|
1317
|
-
|
|
1318
|
-
}), (
|
|
1319
|
-
class:
|
|
1320
|
-
onMouseenter:
|
|
1321
|
-
onMouseleave:
|
|
1322
|
-
onFocusin:
|
|
1323
|
-
onFocusout:
|
|
1324
|
-
onKeydown:
|
|
1342
|
+
function G() {
|
|
1343
|
+
N(), i.value = !1, $();
|
|
1344
|
+
}
|
|
1345
|
+
return de(() => {
|
|
1346
|
+
N(), $(), y();
|
|
1347
|
+
}), (M, j) => (a(), l("div", {
|
|
1348
|
+
class: L(["ds-tooltip", { "ds-tooltip--block": e.block }]),
|
|
1349
|
+
onMouseenter: A,
|
|
1350
|
+
onMouseleave: F,
|
|
1351
|
+
onFocusin: W,
|
|
1352
|
+
onFocusout: ee,
|
|
1353
|
+
onKeydown: st(G, ["esc"])
|
|
1325
1354
|
}, [
|
|
1326
|
-
|
|
1327
|
-
|
|
1355
|
+
C(M.$slots, "default", {}, void 0, !0),
|
|
1356
|
+
Y(me, { name: "ds-tooltip-fade" }, {
|
|
1328
1357
|
default: ie(() => [
|
|
1329
1358
|
i.value ? (a(), l("div", {
|
|
1330
1359
|
key: 0,
|
|
1331
|
-
id:
|
|
1332
|
-
|
|
1333
|
-
|
|
1360
|
+
id: D(o),
|
|
1361
|
+
ref_key: "bubbleRef",
|
|
1362
|
+
ref: d,
|
|
1363
|
+
class: L(["ds-tooltip__bubble", `ds-tooltip__bubble--${e.placement}`]),
|
|
1364
|
+
role: "tooltip",
|
|
1365
|
+
style: U(D(E))
|
|
1334
1366
|
}, [
|
|
1335
|
-
|
|
1336
|
-
|
|
1367
|
+
C(M.$slots, "content", {}, () => [
|
|
1368
|
+
q(w(e.content), 1)
|
|
1337
1369
|
], !0)
|
|
1338
|
-
],
|
|
1370
|
+
], 14, Ha)) : g("", !0)
|
|
1339
1371
|
]),
|
|
1340
1372
|
_: 3
|
|
1341
1373
|
})
|
|
1342
1374
|
], 34));
|
|
1343
1375
|
}
|
|
1344
|
-
}),
|
|
1376
|
+
}), cn = /* @__PURE__ */ O(Wa, [["__scopeId", "data-v-ca1ba028"]]), Oe = {
|
|
1345
1377
|
VERIFIED: "verified",
|
|
1346
1378
|
UNVERIFIED: "unverified",
|
|
1347
1379
|
NEW: "new"
|
|
1348
|
-
},
|
|
1380
|
+
}, Ka = ["aria-label", "title"], Ya = /* @__PURE__ */ B({
|
|
1349
1381
|
__name: "DsVerificationIcon",
|
|
1350
1382
|
props: {
|
|
1351
1383
|
// true = verified · false = not verified · null/undefined = newly found.
|
|
@@ -1370,38 +1402,38 @@ const ge = {
|
|
|
1370
1402
|
}
|
|
1371
1403
|
},
|
|
1372
1404
|
setup(e) {
|
|
1373
|
-
const n = e, t =
|
|
1374
|
-
state:
|
|
1405
|
+
const n = e, t = k(() => n.verified === null || n.verified === void 0 ? {
|
|
1406
|
+
state: Oe.NEW,
|
|
1375
1407
|
icon: "new_releases",
|
|
1376
1408
|
label: "Newly found"
|
|
1377
1409
|
} : n.verified ? {
|
|
1378
|
-
state:
|
|
1410
|
+
state: Oe.VERIFIED,
|
|
1379
1411
|
icon: "verified",
|
|
1380
1412
|
label: "Verified"
|
|
1381
1413
|
} : {
|
|
1382
|
-
state:
|
|
1414
|
+
state: Oe.UNVERIFIED,
|
|
1383
1415
|
icon: n.isContactData ? "dangerous" : "error",
|
|
1384
1416
|
label: "Not verified"
|
|
1385
1417
|
});
|
|
1386
1418
|
return (o, i) => (a(), l("i", {
|
|
1387
|
-
class:
|
|
1419
|
+
class: L(["material-symbols-filled ds-verification-icon", [
|
|
1388
1420
|
`ds-verification-icon--${t.value.state}`,
|
|
1389
1421
|
{ "ds-verification-icon--email": e.isContactData }
|
|
1390
1422
|
]]),
|
|
1391
|
-
style:
|
|
1423
|
+
style: U({ fontSize: `${e.size}px` }),
|
|
1392
1424
|
role: "img",
|
|
1393
1425
|
"aria-label": e.label || t.value.label,
|
|
1394
1426
|
title: e.label || t.value.label
|
|
1395
1427
|
}, [
|
|
1396
|
-
|
|
1397
|
-
|
|
1428
|
+
C(o.$slots, "default", {}, () => [
|
|
1429
|
+
q(w(t.value.icon), 1)
|
|
1398
1430
|
], !0)
|
|
1399
|
-
], 14,
|
|
1431
|
+
], 14, Ka));
|
|
1400
1432
|
}
|
|
1401
|
-
}),
|
|
1402
|
-
class: "material-
|
|
1433
|
+
}), qa = /* @__PURE__ */ O(Ya, [["__scopeId", "data-v-c84b2196"]]), ja = ["title"], Xa = { class: "ds-contact-value__marquee" }, Za = { class: "ds-contact-value__actions" }, Qa = ["role", "aria-label", "aria-hidden"], Ja = ["aria-label", "title"], el = {
|
|
1434
|
+
class: "material-symbols-filled",
|
|
1403
1435
|
"aria-hidden": "true"
|
|
1404
|
-
},
|
|
1436
|
+
}, tl = ["aria-label", "aria-pressed", "title"], al = ["aria-label", "aria-pressed", "title"], ll = /* @__PURE__ */ B({
|
|
1405
1437
|
__name: "DsContactValue",
|
|
1406
1438
|
props: {
|
|
1407
1439
|
value: { type: String, required: !0 },
|
|
@@ -1421,76 +1453,78 @@ const ge = {
|
|
|
1421
1453
|
// Accessible name for the lock glyph (empty → decorative/aria-hidden).
|
|
1422
1454
|
hideValueLabel: { type: String, default: "" }
|
|
1423
1455
|
},
|
|
1424
|
-
emits: [
|
|
1456
|
+
emits: [we, Le, _e],
|
|
1425
1457
|
setup(e, { emit: n }) {
|
|
1426
|
-
const t = e, o = n, i =
|
|
1427
|
-
let
|
|
1428
|
-
function
|
|
1458
|
+
const t = e, o = n, i = V(!1);
|
|
1459
|
+
let d;
|
|
1460
|
+
function E() {
|
|
1429
1461
|
typeof navigator != "undefined" && navigator.clipboard && navigator.clipboard.writeText(t.value).catch(() => {
|
|
1430
|
-
}), i.value = !0, clearTimeout(
|
|
1462
|
+
}), i.value = !0, clearTimeout(d), d = setTimeout(() => {
|
|
1431
1463
|
i.value = !1;
|
|
1432
|
-
}, 1200), o(
|
|
1464
|
+
}, 1200), o(we, t.value);
|
|
1433
1465
|
}
|
|
1434
|
-
function
|
|
1435
|
-
o(
|
|
1466
|
+
function v() {
|
|
1467
|
+
o(Le);
|
|
1436
1468
|
}
|
|
1437
1469
|
function y() {
|
|
1438
|
-
o(
|
|
1470
|
+
o(_e);
|
|
1439
1471
|
}
|
|
1440
|
-
return
|
|
1441
|
-
class:
|
|
1472
|
+
return de(() => clearTimeout(d)), (f, r) => (a(), l("div", {
|
|
1473
|
+
class: L(["ds-contact-value", { "ds-contact-value--main": e.main }])
|
|
1442
1474
|
}, [
|
|
1443
|
-
|
|
1475
|
+
Y(D(qa), {
|
|
1444
1476
|
verified: e.verified,
|
|
1445
1477
|
"is-contact-data": e.isContactData
|
|
1446
1478
|
}, null, 8, ["verified", "is-contact-data"]),
|
|
1447
1479
|
s("span", {
|
|
1448
1480
|
class: "ds-contact-value__value",
|
|
1449
1481
|
title: e.value
|
|
1450
|
-
},
|
|
1451
|
-
s("span",
|
|
1452
|
-
e.valueType ? (a(),
|
|
1482
|
+
}, w(e.value), 9, ja),
|
|
1483
|
+
s("span", Xa, [
|
|
1484
|
+
e.valueType ? (a(), K(D(xt), {
|
|
1453
1485
|
key: 0,
|
|
1454
1486
|
class: "ds-contact-value__badge",
|
|
1455
|
-
tone: e.main ?
|
|
1487
|
+
tone: e.main ? D(xe).ACCENT : D(xe).GREY,
|
|
1456
1488
|
title: e.valueType
|
|
1457
1489
|
}, {
|
|
1458
1490
|
default: ie(() => [
|
|
1459
|
-
|
|
1491
|
+
q(w(e.valueType), 1)
|
|
1460
1492
|
]),
|
|
1461
1493
|
_: 1
|
|
1462
|
-
}, 8, ["tone", "title"])) :
|
|
1463
|
-
s("span",
|
|
1494
|
+
}, 8, ["tone", "title"])) : g("", !0),
|
|
1495
|
+
s("span", Za, [
|
|
1464
1496
|
e.hideValue ? (a(), l("i", {
|
|
1465
1497
|
key: 0,
|
|
1466
|
-
class: "material-
|
|
1498
|
+
class: "material-symbols-filled ds-contact-value__lock",
|
|
1467
1499
|
role: e.hideValueLabel ? "img" : void 0,
|
|
1468
1500
|
"aria-label": e.hideValueLabel || void 0,
|
|
1469
1501
|
"aria-hidden": e.hideValueLabel ? void 0 : "true"
|
|
1470
|
-
}, "lock", 8,
|
|
1502
|
+
}, "lock", 8, Qa)) : (a(), l(H, { key: 1 }, [
|
|
1471
1503
|
s("button", {
|
|
1472
1504
|
type: "button",
|
|
1473
|
-
class:
|
|
1505
|
+
class: L(["ds-contact-value__action", { "is-copied": i.value }]),
|
|
1474
1506
|
"aria-label": i.value ? e.copiedLabel : e.copyLabel,
|
|
1475
1507
|
title: i.value ? e.copiedLabel : e.copyLabel,
|
|
1476
|
-
onClick:
|
|
1508
|
+
onClick: E
|
|
1477
1509
|
}, [
|
|
1478
|
-
s("i",
|
|
1479
|
-
], 10,
|
|
1480
|
-
e.showRate ? (a(), l(
|
|
1510
|
+
s("i", el, w(i.value ? "check" : "content_copy"), 1)
|
|
1511
|
+
], 10, Ja),
|
|
1512
|
+
e.showRate ? (a(), l(H, { key: 0 }, [
|
|
1481
1513
|
s("button", {
|
|
1482
1514
|
type: "button",
|
|
1483
1515
|
class: "ds-contact-value__action",
|
|
1484
1516
|
"aria-label": e.correctLabel,
|
|
1485
1517
|
"aria-pressed": e.correct === !0,
|
|
1486
1518
|
title: e.correctLabel,
|
|
1487
|
-
onClick:
|
|
1519
|
+
onClick: v
|
|
1488
1520
|
}, [
|
|
1489
1521
|
s("i", {
|
|
1490
|
-
class:
|
|
1522
|
+
class: L(
|
|
1523
|
+
e.correct === !0 ? "material-symbols-filled" : "material-symbols-filled-outlined"
|
|
1524
|
+
),
|
|
1491
1525
|
"aria-hidden": "true"
|
|
1492
1526
|
}, "thumb_up", 2)
|
|
1493
|
-
], 8,
|
|
1527
|
+
], 8, tl),
|
|
1494
1528
|
s("button", {
|
|
1495
1529
|
type: "button",
|
|
1496
1530
|
class: "ds-contact-value__action",
|
|
@@ -1500,44 +1534,46 @@ const ge = {
|
|
|
1500
1534
|
onClick: y
|
|
1501
1535
|
}, [
|
|
1502
1536
|
s("i", {
|
|
1503
|
-
class:
|
|
1537
|
+
class: L(
|
|
1538
|
+
e.correct === !1 ? "material-symbols-filled" : "material-symbols-filled-outlined"
|
|
1539
|
+
),
|
|
1504
1540
|
"aria-hidden": "true"
|
|
1505
1541
|
}, "thumb_down", 2)
|
|
1506
|
-
], 8,
|
|
1507
|
-
], 64)) :
|
|
1542
|
+
], 8, al)
|
|
1543
|
+
], 64)) : g("", !0)
|
|
1508
1544
|
], 64))
|
|
1509
1545
|
])
|
|
1510
1546
|
])
|
|
1511
1547
|
], 2));
|
|
1512
1548
|
}
|
|
1513
|
-
}),
|
|
1514
|
-
class: "material-
|
|
1549
|
+
}), tt = /* @__PURE__ */ O(ll, [["__scopeId", "data-v-8daaf278"]]), il = ["aria-label", "aria-busy"], nl = { class: "ds-data-card__heading" }, sl = {
|
|
1550
|
+
class: "material-symbols-filled ds-data-card__icon",
|
|
1515
1551
|
"aria-hidden": "true"
|
|
1516
|
-
},
|
|
1552
|
+
}, ol = { class: "ds-data-card__title" }, dl = ["aria-label"], rl = {
|
|
1517
1553
|
key: 0,
|
|
1518
1554
|
class: "ds-data-card__body"
|
|
1519
|
-
},
|
|
1555
|
+
}, cl = {
|
|
1520
1556
|
key: 0,
|
|
1521
1557
|
class: "ds-data-card__loading"
|
|
1522
|
-
},
|
|
1558
|
+
}, ul = {
|
|
1523
1559
|
key: 1,
|
|
1524
1560
|
class: "ds-data-card__locked"
|
|
1525
|
-
},
|
|
1561
|
+
}, fl = { class: "ds-data-card__state-text" }, vl = { class: "ds-data-card__state-title" }, bl = {
|
|
1526
1562
|
key: 2,
|
|
1527
1563
|
class: "ds-data-card__empty"
|
|
1528
|
-
},
|
|
1529
|
-
class: "material-
|
|
1564
|
+
}, yl = { class: "ds-data-card__state-badge" }, ml = {
|
|
1565
|
+
class: "material-symbols-filled ds-data-card__state-icon",
|
|
1530
1566
|
"aria-hidden": "true"
|
|
1531
|
-
},
|
|
1567
|
+
}, hl = { class: "ds-data-card__state-text" }, gl = { class: "ds-data-card__state-title" }, pl = {
|
|
1532
1568
|
key: 0,
|
|
1533
1569
|
class: "ds-data-card__state-subtitle"
|
|
1534
|
-
},
|
|
1570
|
+
}, Sl = { key: 0 }, kl = {
|
|
1535
1571
|
key: 0,
|
|
1536
1572
|
class: "ds-data-card__section"
|
|
1537
|
-
},
|
|
1573
|
+
}, $l = { key: 1 }, Tl = {
|
|
1538
1574
|
key: 0,
|
|
1539
1575
|
class: "ds-data-card__section"
|
|
1540
|
-
},
|
|
1576
|
+
}, El = { class: "ds-data-card__more" }, wl = /* @__PURE__ */ B({
|
|
1541
1577
|
__name: "DsDataCard",
|
|
1542
1578
|
props: {
|
|
1543
1579
|
title: { type: String, required: !0 },
|
|
@@ -1577,117 +1613,117 @@ const ge = {
|
|
|
1577
1613
|
toggleLabel: { type: String, default: "Toggle" },
|
|
1578
1614
|
closeLabel: { type: String, default: "Close" }
|
|
1579
1615
|
},
|
|
1580
|
-
emits: [
|
|
1616
|
+
emits: [we, Ve, Ue, J, Le, _e],
|
|
1581
1617
|
setup(e, { emit: n }) {
|
|
1582
|
-
const t = e, o = n, i =
|
|
1583
|
-
function
|
|
1618
|
+
const t = e, o = n, i = V(!1), d = k(() => t.more.length + (t.mostLikely ? 1 : 0)), E = k(() => d.value > 3), v = k(() => d.value === 0), y = k(() => t.collapsible && i.value);
|
|
1619
|
+
function f() {
|
|
1584
1620
|
i.value = !i.value;
|
|
1585
1621
|
}
|
|
1586
|
-
function
|
|
1587
|
-
o(
|
|
1622
|
+
function r(_) {
|
|
1623
|
+
o(we, _);
|
|
1588
1624
|
}
|
|
1589
|
-
function
|
|
1590
|
-
o(
|
|
1625
|
+
function c() {
|
|
1626
|
+
o(Ve);
|
|
1591
1627
|
}
|
|
1592
|
-
function
|
|
1593
|
-
o(
|
|
1628
|
+
function m() {
|
|
1629
|
+
o(Ue);
|
|
1594
1630
|
}
|
|
1595
|
-
function
|
|
1596
|
-
o(
|
|
1631
|
+
function p() {
|
|
1632
|
+
o(J);
|
|
1597
1633
|
}
|
|
1598
|
-
function
|
|
1599
|
-
o(
|
|
1634
|
+
function T(_) {
|
|
1635
|
+
o(Le, _);
|
|
1600
1636
|
}
|
|
1601
|
-
function
|
|
1602
|
-
o(
|
|
1637
|
+
function N(_) {
|
|
1638
|
+
o(_e, _);
|
|
1603
1639
|
}
|
|
1604
|
-
return (
|
|
1640
|
+
return (_, $) => (a(), l("section", {
|
|
1605
1641
|
class: "ds-data-card",
|
|
1606
1642
|
"aria-label": e.title,
|
|
1607
1643
|
"aria-busy": e.loading ? "true" : void 0
|
|
1608
1644
|
}, [
|
|
1609
1645
|
s("div", {
|
|
1610
|
-
class:
|
|
1611
|
-
onClick:
|
|
1646
|
+
class: L(["ds-data-card__header", { "is-collapsed": y.value, "is-collapsible": e.collapsible }]),
|
|
1647
|
+
onClick: $[1] || ($[1] = (A) => e.collapsible && f())
|
|
1612
1648
|
}, [
|
|
1613
|
-
s("div",
|
|
1614
|
-
s("i",
|
|
1615
|
-
s("span",
|
|
1649
|
+
s("div", nl, [
|
|
1650
|
+
s("i", sl, w(e.icon), 1),
|
|
1651
|
+
s("span", ol, w(e.title), 1)
|
|
1616
1652
|
]),
|
|
1617
1653
|
s("div", {
|
|
1618
1654
|
class: "ds-data-card__actions",
|
|
1619
|
-
onClick:
|
|
1655
|
+
onClick: $[0] || ($[0] = ue(() => {
|
|
1620
1656
|
}, ["stop"]))
|
|
1621
1657
|
}, [
|
|
1622
1658
|
!y.value && e.showEdit ? (a(), l("button", {
|
|
1623
1659
|
key: 0,
|
|
1624
1660
|
type: "button",
|
|
1625
1661
|
class: "ds-data-card__edit",
|
|
1626
|
-
onClick:
|
|
1627
|
-
},
|
|
1628
|
-
!y.value && e.showSort ? (a(),
|
|
1662
|
+
onClick: m
|
|
1663
|
+
}, w(e.editLabel), 1)) : g("", !0),
|
|
1664
|
+
!y.value && e.showSort ? (a(), K(D(fe), {
|
|
1629
1665
|
key: 1,
|
|
1630
1666
|
variant: "tertiary",
|
|
1631
1667
|
size: "medium",
|
|
1632
1668
|
circle: "",
|
|
1633
1669
|
"left-icon": "swap_vert",
|
|
1634
1670
|
"aria-label": e.sortLabel,
|
|
1635
|
-
onClick:
|
|
1636
|
-
}, null, 8, ["aria-label"])) :
|
|
1637
|
-
e.collapsible ? (a(),
|
|
1671
|
+
onClick: c
|
|
1672
|
+
}, null, 8, ["aria-label"])) : g("", !0),
|
|
1673
|
+
e.collapsible ? (a(), K(D(fe), {
|
|
1638
1674
|
key: 2,
|
|
1639
1675
|
variant: "tertiary",
|
|
1640
1676
|
size: "medium",
|
|
1641
1677
|
circle: "",
|
|
1642
1678
|
"left-icon": i.value ? "keyboard_arrow_down" : "keyboard_arrow_up",
|
|
1643
1679
|
"aria-label": e.toggleLabel,
|
|
1644
|
-
onClick:
|
|
1645
|
-
}, null, 8, ["left-icon", "aria-label"])) :
|
|
1680
|
+
onClick: f
|
|
1681
|
+
}, null, 8, ["left-icon", "aria-label"])) : g("", !0),
|
|
1646
1682
|
e.showClose ? (a(), l("button", {
|
|
1647
1683
|
key: 3,
|
|
1648
1684
|
type: "button",
|
|
1649
1685
|
class: "ds-data-card__close",
|
|
1650
1686
|
"aria-label": e.closeLabel,
|
|
1651
|
-
onClick:
|
|
1652
|
-
}, [
|
|
1687
|
+
onClick: p
|
|
1688
|
+
}, [...$[4] || ($[4] = [
|
|
1653
1689
|
s("i", {
|
|
1654
|
-
class: "material-
|
|
1690
|
+
class: "material-symbols-filled",
|
|
1655
1691
|
"aria-hidden": "true"
|
|
1656
1692
|
}, "close", -1)
|
|
1657
|
-
])], 8,
|
|
1693
|
+
])], 8, dl)) : g("", !0)
|
|
1658
1694
|
])
|
|
1659
1695
|
], 2),
|
|
1660
|
-
y.value ?
|
|
1661
|
-
e.loading ? (a(), l("div",
|
|
1662
|
-
|
|
1663
|
-
|
|
1696
|
+
y.value ? g("", !0) : (a(), l("div", rl, [
|
|
1697
|
+
e.loading ? (a(), l("div", cl, [
|
|
1698
|
+
C(_.$slots, "loading", {}, () => [
|
|
1699
|
+
Y(D(ye), {
|
|
1664
1700
|
label: e.loadingLabel || void 0
|
|
1665
1701
|
}, null, 8, ["label"])
|
|
1666
1702
|
], !0)
|
|
1667
|
-
])) : e.locked ? (a(), l("div",
|
|
1668
|
-
|
|
1669
|
-
|
|
1703
|
+
])) : e.locked ? (a(), l("div", ul, [
|
|
1704
|
+
C(_.$slots, "locked", {}, () => [
|
|
1705
|
+
$[5] || ($[5] = s("span", { class: "ds-data-card__state-badge ds-data-card__state-badge--accent" }, [
|
|
1670
1706
|
s("i", {
|
|
1671
|
-
class: "material-
|
|
1707
|
+
class: "material-symbols-filled ds-data-card__state-icon",
|
|
1672
1708
|
"aria-hidden": "true"
|
|
1673
1709
|
}, "lock")
|
|
1674
1710
|
], -1)),
|
|
1675
|
-
s("div",
|
|
1676
|
-
s("span",
|
|
1711
|
+
s("div", fl, [
|
|
1712
|
+
s("span", vl, w(e.lockedLabel), 1)
|
|
1677
1713
|
])
|
|
1678
1714
|
], !0)
|
|
1679
|
-
])) :
|
|
1680
|
-
s("span",
|
|
1681
|
-
s("i",
|
|
1715
|
+
])) : v.value ? (a(), l("div", bl, [
|
|
1716
|
+
s("span", yl, [
|
|
1717
|
+
s("i", ml, w(e.icon), 1)
|
|
1682
1718
|
]),
|
|
1683
|
-
s("div",
|
|
1684
|
-
s("span",
|
|
1685
|
-
e.emptySubtitle ? (a(), l("span",
|
|
1719
|
+
s("div", hl, [
|
|
1720
|
+
s("span", gl, w(e.emptyLabel), 1),
|
|
1721
|
+
e.emptySubtitle ? (a(), l("span", pl, w(e.emptySubtitle), 1)) : g("", !0)
|
|
1686
1722
|
])
|
|
1687
|
-
])) : (a(), l(
|
|
1688
|
-
e.mostLikely ? (a(), l("div",
|
|
1689
|
-
|
|
1690
|
-
|
|
1723
|
+
])) : (a(), l(H, { key: 3 }, [
|
|
1724
|
+
e.mostLikely ? (a(), l("div", Sl, [
|
|
1725
|
+
E.value ? (a(), l("div", kl, w(e.mostLikelyLabel), 1)) : g("", !0),
|
|
1726
|
+
Y(D(tt), {
|
|
1691
1727
|
value: e.mostLikely.value,
|
|
1692
1728
|
"value-type": e.mostLikely.type,
|
|
1693
1729
|
verified: e.mostLikely.verified,
|
|
@@ -1696,39 +1732,39 @@ const ge = {
|
|
|
1696
1732
|
main: "",
|
|
1697
1733
|
"is-contact-data": e.isContactData,
|
|
1698
1734
|
"show-rate": e.showRate,
|
|
1699
|
-
onCopy:
|
|
1700
|
-
onCorrect:
|
|
1701
|
-
onIncorrect:
|
|
1735
|
+
onCopy: r,
|
|
1736
|
+
onCorrect: $[2] || ($[2] = (A) => T(e.mostLikely)),
|
|
1737
|
+
onIncorrect: $[3] || ($[3] = (A) => N(e.mostLikely))
|
|
1702
1738
|
}, null, 8, ["value", "value-type", "verified", "correct", "hide-value", "is-contact-data", "show-rate"])
|
|
1703
|
-
])) :
|
|
1704
|
-
e.more.length > 0 ? (a(), l("div",
|
|
1705
|
-
|
|
1706
|
-
s("div",
|
|
1707
|
-
(a(!0), l(
|
|
1708
|
-
key:
|
|
1709
|
-
value:
|
|
1710
|
-
"value-type":
|
|
1711
|
-
verified:
|
|
1712
|
-
correct:
|
|
1713
|
-
"hide-value":
|
|
1739
|
+
])) : g("", !0),
|
|
1740
|
+
e.more.length > 0 ? (a(), l("div", $l, [
|
|
1741
|
+
E.value ? (a(), l("div", Tl, w(e.moreLabel), 1)) : g("", !0),
|
|
1742
|
+
s("div", El, [
|
|
1743
|
+
(a(!0), l(H, null, Q(e.more, (A) => (a(), K(D(tt), {
|
|
1744
|
+
key: A.value,
|
|
1745
|
+
value: A.value,
|
|
1746
|
+
"value-type": A.type,
|
|
1747
|
+
verified: A.verified,
|
|
1748
|
+
correct: A.correct,
|
|
1749
|
+
"hide-value": A.hideValue,
|
|
1714
1750
|
"is-contact-data": e.isContactData,
|
|
1715
1751
|
"show-rate": e.showRate,
|
|
1716
|
-
onCopy:
|
|
1717
|
-
onCorrect: (
|
|
1718
|
-
onIncorrect: (
|
|
1752
|
+
onCopy: r,
|
|
1753
|
+
onCorrect: (F) => T(A),
|
|
1754
|
+
onIncorrect: (F) => N(A)
|
|
1719
1755
|
}, null, 8, ["value", "value-type", "verified", "correct", "hide-value", "is-contact-data", "show-rate", "onCorrect", "onIncorrect"]))), 128))
|
|
1720
1756
|
])
|
|
1721
|
-
])) :
|
|
1757
|
+
])) : g("", !0)
|
|
1722
1758
|
], 64))
|
|
1723
1759
|
]))
|
|
1724
|
-
], 8,
|
|
1760
|
+
], 8, il));
|
|
1725
1761
|
}
|
|
1726
|
-
}),
|
|
1762
|
+
}), un = /* @__PURE__ */ O(wl, [["__scopeId", "data-v-e4f6e090"]]), Ll = ["name", "value", "checked", "disabled"], _l = {
|
|
1727
1763
|
key: 0,
|
|
1728
1764
|
class: "ds-radio__label"
|
|
1729
|
-
},
|
|
1765
|
+
}, Cl = /* @__PURE__ */ B({
|
|
1730
1766
|
__name: "DsRadio",
|
|
1731
|
-
props: /* @__PURE__ */
|
|
1767
|
+
props: /* @__PURE__ */ ae({
|
|
1732
1768
|
disabled: Boolean,
|
|
1733
1769
|
// Label text (DS `label` prop); a default slot overrides it.
|
|
1734
1770
|
label: { type: String, default: "" },
|
|
@@ -1740,12 +1776,12 @@ const ge = {
|
|
|
1740
1776
|
}),
|
|
1741
1777
|
emits: ["update:modelValue"],
|
|
1742
1778
|
setup(e) {
|
|
1743
|
-
const n =
|
|
1779
|
+
const n = ve(e, "modelValue"), t = e;
|
|
1744
1780
|
function o() {
|
|
1745
1781
|
t.disabled || (n.value = !0);
|
|
1746
1782
|
}
|
|
1747
|
-
return (i,
|
|
1748
|
-
class:
|
|
1783
|
+
return (i, d) => (a(), l("label", {
|
|
1784
|
+
class: L(["ds-radio", { "is-disabled": e.disabled }])
|
|
1749
1785
|
}, [
|
|
1750
1786
|
s("input", {
|
|
1751
1787
|
type: "radio",
|
|
@@ -1755,24 +1791,24 @@ const ge = {
|
|
|
1755
1791
|
checked: n.value,
|
|
1756
1792
|
disabled: e.disabled,
|
|
1757
1793
|
onChange: o
|
|
1758
|
-
}, null, 40,
|
|
1794
|
+
}, null, 40, Ll),
|
|
1759
1795
|
s("span", {
|
|
1760
|
-
class:
|
|
1796
|
+
class: L(["ds-radio__dot", { "is-active": n.value }]),
|
|
1761
1797
|
"aria-hidden": "true"
|
|
1762
1798
|
}, null, 2),
|
|
1763
|
-
i.$slots.default || e.label ? (a(), l("span",
|
|
1764
|
-
|
|
1765
|
-
|
|
1799
|
+
i.$slots.default || e.label ? (a(), l("span", _l, [
|
|
1800
|
+
C(i.$slots, "default", {}, () => [
|
|
1801
|
+
q(w(e.label), 1)
|
|
1766
1802
|
], !0)
|
|
1767
|
-
])) :
|
|
1803
|
+
])) : g("", !0)
|
|
1768
1804
|
], 2));
|
|
1769
1805
|
}
|
|
1770
|
-
}),
|
|
1806
|
+
}), fn = /* @__PURE__ */ O(Cl, [["__scopeId", "data-v-96b70404"]]), Il = ["aria-checked", "aria-busy", "aria-disabled", "aria-label", "disabled"], Dl = {
|
|
1771
1807
|
class: "ds-switch__thumb",
|
|
1772
1808
|
"aria-hidden": "true"
|
|
1773
|
-
},
|
|
1809
|
+
}, Rl = /* @__PURE__ */ B({
|
|
1774
1810
|
__name: "DsSwitch",
|
|
1775
|
-
props: /* @__PURE__ */
|
|
1811
|
+
props: /* @__PURE__ */ ae({
|
|
1776
1812
|
disabled: Boolean,
|
|
1777
1813
|
// Async busy state for a toggle whose commit is pending (e.g. a server round-trip
|
|
1778
1814
|
// that may revert). Blocks interaction and shows a spinner in the thumb while it
|
|
@@ -1788,14 +1824,14 @@ const ge = {
|
|
|
1788
1824
|
}),
|
|
1789
1825
|
emits: ["update:modelValue"],
|
|
1790
1826
|
setup(e) {
|
|
1791
|
-
const n =
|
|
1827
|
+
const n = ve(e, "modelValue"), t = e;
|
|
1792
1828
|
function o() {
|
|
1793
1829
|
t.disabled || t.loading || (n.value = !n.value);
|
|
1794
1830
|
}
|
|
1795
|
-
return (i,
|
|
1831
|
+
return (i, d) => (a(), l("button", {
|
|
1796
1832
|
type: "button",
|
|
1797
1833
|
role: "switch",
|
|
1798
|
-
class:
|
|
1834
|
+
class: L(["ds-switch", { "is-disabled": e.disabled, "is-loading": e.loading }]),
|
|
1799
1835
|
"aria-checked": n.value,
|
|
1800
1836
|
"aria-busy": e.loading || void 0,
|
|
1801
1837
|
"aria-disabled": e.disabled || e.loading || void 0,
|
|
@@ -1803,22 +1839,22 @@ const ge = {
|
|
|
1803
1839
|
disabled: e.disabled || e.loading,
|
|
1804
1840
|
onClick: o
|
|
1805
1841
|
}, [
|
|
1806
|
-
s("span",
|
|
1807
|
-
e.loading ? (a(),
|
|
1842
|
+
s("span", Dl, [
|
|
1843
|
+
e.loading ? (a(), K(D(ye), {
|
|
1808
1844
|
key: 0,
|
|
1809
1845
|
class: "ds-switch__spinner",
|
|
1810
1846
|
size: 12,
|
|
1811
|
-
tone:
|
|
1847
|
+
tone: D($e).DARK,
|
|
1812
1848
|
label: ""
|
|
1813
|
-
}, null, 8, ["tone"])) :
|
|
1849
|
+
}, null, 8, ["tone"])) : g("", !0)
|
|
1814
1850
|
])
|
|
1815
|
-
], 10,
|
|
1851
|
+
], 10, Il));
|
|
1816
1852
|
}
|
|
1817
|
-
}),
|
|
1853
|
+
}), vn = /* @__PURE__ */ O(Rl, [["__scopeId", "data-v-f8073b3b"]]), Al = ["aria-label", "disabled"], Nl = { class: "ds-item-selector-button__label" }, Bl = /* @__PURE__ */ B({
|
|
1818
1854
|
__name: "DsItemSelectorButton",
|
|
1819
1855
|
props: {
|
|
1820
1856
|
item: { type: Object, default: null },
|
|
1821
|
-
// Material
|
|
1857
|
+
// Material Symbols ligature (e.g. `folder`); omitted entirely when unset.
|
|
1822
1858
|
icon: { type: String, default: "" },
|
|
1823
1859
|
emptyTitle: { type: String, default: "" },
|
|
1824
1860
|
// Accessible name (see .types.ts). Required in the empty state when there's no
|
|
@@ -1826,36 +1862,36 @@ const ge = {
|
|
|
1826
1862
|
ariaLabel: { type: String, default: "" },
|
|
1827
1863
|
disabled: Boolean
|
|
1828
1864
|
},
|
|
1829
|
-
emits: [
|
|
1865
|
+
emits: [te],
|
|
1830
1866
|
setup(e, { emit: n }) {
|
|
1831
1867
|
const t = e, o = n;
|
|
1832
|
-
function i(
|
|
1833
|
-
t.disabled || o(
|
|
1868
|
+
function i(d) {
|
|
1869
|
+
t.disabled || o(te, d);
|
|
1834
1870
|
}
|
|
1835
|
-
return (
|
|
1836
|
-
var
|
|
1871
|
+
return (d, E) => {
|
|
1872
|
+
var v;
|
|
1837
1873
|
return a(), l("button", {
|
|
1838
1874
|
type: "button",
|
|
1839
|
-
class:
|
|
1875
|
+
class: L(["ds-item-selector-button", { "is-empty": !e.item, "is-disabled": e.disabled }]),
|
|
1840
1876
|
"aria-haspopup": "listbox",
|
|
1841
1877
|
"aria-label": e.ariaLabel || void 0,
|
|
1842
1878
|
disabled: e.disabled,
|
|
1843
1879
|
onClick: i
|
|
1844
1880
|
}, [
|
|
1845
|
-
s("span",
|
|
1881
|
+
s("span", Nl, w(e.item ? e.item.name : e.emptyTitle), 1),
|
|
1846
1882
|
e.icon ? (a(), l("i", {
|
|
1847
1883
|
key: 0,
|
|
1848
|
-
class:
|
|
1849
|
-
style:
|
|
1884
|
+
class: L(["ds-item-selector-button__icon", e.item ? "material-symbols-filled" : "material-symbols-filled-outlined"]),
|
|
1885
|
+
style: U((v = e.item) != null && v.color ? { color: e.item.color } : void 0),
|
|
1850
1886
|
"aria-hidden": "true"
|
|
1851
|
-
},
|
|
1852
|
-
], 10,
|
|
1887
|
+
}, w(e.icon), 7)) : g("", !0)
|
|
1888
|
+
], 10, Al);
|
|
1853
1889
|
};
|
|
1854
1890
|
}
|
|
1855
|
-
}),
|
|
1891
|
+
}), bn = /* @__PURE__ */ O(Bl, [["__scopeId", "data-v-265ef033"]]), at = {
|
|
1856
1892
|
DEFAULT: "default",
|
|
1857
1893
|
FILTER_SUMMARY: "filterSummary"
|
|
1858
|
-
},
|
|
1894
|
+
}, lt = {
|
|
1859
1895
|
AUTO: "auto",
|
|
1860
1896
|
// shrink to content — resizes with the selected label (default)
|
|
1861
1897
|
SMALL: "small",
|
|
@@ -1866,34 +1902,34 @@ const ge = {
|
|
|
1866
1902
|
// 280px
|
|
1867
1903
|
FULL: "full"
|
|
1868
1904
|
// 100% of the container
|
|
1869
|
-
},
|
|
1905
|
+
}, Ol = ["disabled", "aria-expanded", "aria-controls", "aria-activedescendant"], xl = ["title"], Ml = ["disabled", "aria-label"], Pl = {
|
|
1870
1906
|
key: 1,
|
|
1871
|
-
class: "material-
|
|
1907
|
+
class: "material-symbols-filled ds-select__chevron",
|
|
1872
1908
|
"aria-hidden": "true"
|
|
1873
|
-
},
|
|
1909
|
+
}, zl = {
|
|
1874
1910
|
key: 0,
|
|
1875
1911
|
class: "ds-select__popup"
|
|
1876
|
-
},
|
|
1912
|
+
}, Fl = {
|
|
1877
1913
|
key: 0,
|
|
1878
1914
|
class: "ds-select__search"
|
|
1879
|
-
},
|
|
1915
|
+
}, Vl = ["aria-activedescendant", "aria-label", "placeholder", "value"], Ul = ["aria-multiselectable", "aria-busy"], Gl = {
|
|
1880
1916
|
key: 0,
|
|
1881
1917
|
class: "ds-select__loading",
|
|
1882
1918
|
role: "presentation"
|
|
1883
|
-
},
|
|
1919
|
+
}, Hl = ["role", "aria-labelledby"], Wl = ["id"], Kl = ["id", "aria-selected", "onClick", "onMouseenter"], Yl = { class: "ds-select__option-label" }, ql = {
|
|
1884
1920
|
key: 0,
|
|
1885
1921
|
class: "ds-select__option-sublabel"
|
|
1886
|
-
},
|
|
1922
|
+
}, jl = {
|
|
1887
1923
|
key: 0,
|
|
1888
1924
|
class: "ds-select__empty",
|
|
1889
1925
|
role: "presentation"
|
|
1890
|
-
},
|
|
1926
|
+
}, Xl = /* @__PURE__ */ B({
|
|
1891
1927
|
__name: "DsSelect",
|
|
1892
|
-
props: /* @__PURE__ */
|
|
1928
|
+
props: /* @__PURE__ */ ae({
|
|
1893
1929
|
options: { type: Array, required: !0 },
|
|
1894
1930
|
placeholder: { type: String, default: "Select an option" },
|
|
1895
1931
|
multiple: Boolean,
|
|
1896
|
-
selectType: { type: String, default:
|
|
1932
|
+
selectType: { type: String, default: at.DEFAULT },
|
|
1897
1933
|
showCheckbox: Boolean,
|
|
1898
1934
|
// Named step ('small'|'medium'|'large'|'full'|'auto') for a STABLE width, or a
|
|
1899
1935
|
// custom width (number → px, or any CSS string). Defaults to 'auto'
|
|
@@ -1902,7 +1938,7 @@ const ge = {
|
|
|
1902
1938
|
// resize with the selected label. See DsSelect.types.ts `DS_SELECT_WIDTHS`.
|
|
1903
1939
|
width: {
|
|
1904
1940
|
type: [Number, String],
|
|
1905
|
-
default:
|
|
1941
|
+
default: lt.AUTO
|
|
1906
1942
|
},
|
|
1907
1943
|
disabled: Boolean,
|
|
1908
1944
|
// Opt-in type-to-filter: renders a search input inside the open dropdown.
|
|
@@ -1932,327 +1968,327 @@ const ge = {
|
|
|
1932
1968
|
modelValue: { default: null },
|
|
1933
1969
|
modelModifiers: {}
|
|
1934
1970
|
}),
|
|
1935
|
-
emits: /* @__PURE__ */
|
|
1971
|
+
emits: /* @__PURE__ */ ae([Re], ["update:modelValue"]),
|
|
1936
1972
|
setup(e, { emit: n }) {
|
|
1937
|
-
const t = e, o = n, i =
|
|
1938
|
-
if (!
|
|
1939
|
-
const
|
|
1940
|
-
return
|
|
1941
|
-
(
|
|
1973
|
+
const t = e, o = n, i = ve(e, "modelValue"), d = `ds-select-${ge()}`, E = `${d}-listbox`, v = (h) => `${d}-option-${h}`, y = V(null), f = V(null), r = V(null), c = V(!1), m = V(-1), p = V(""), T = k(() => t.selectType === at.FILTER_SUMMARY), N = k(() => t.filterable && !t.remote), _ = k(() => {
|
|
1974
|
+
if (!N.value) return t.options;
|
|
1975
|
+
const h = p.value.trim().toLowerCase();
|
|
1976
|
+
return h ? t.options.filter(
|
|
1977
|
+
(I) => I.label.toLowerCase().includes(h) || (I.subLabel ? I.subLabel.toLowerCase().includes(h) : !1)
|
|
1942
1978
|
) : t.options;
|
|
1943
|
-
}),
|
|
1944
|
-
() => t.loading ? [] :
|
|
1945
|
-
),
|
|
1946
|
-
const
|
|
1947
|
-
return
|
|
1948
|
-
const
|
|
1949
|
-
|
|
1979
|
+
}), $ = k(
|
|
1980
|
+
() => t.loading ? [] : _.value
|
|
1981
|
+
), A = k(() => {
|
|
1982
|
+
const h = [];
|
|
1983
|
+
return $.value.forEach((I, z) => {
|
|
1984
|
+
const P = I.group, X = h[h.length - 1];
|
|
1985
|
+
P ? (X == null ? void 0 : X.kind) === "group" && X.label === P ? X.items.push({ option: I, index: z }) : h.push({
|
|
1950
1986
|
kind: "group",
|
|
1951
|
-
label:
|
|
1952
|
-
headerId: `${
|
|
1953
|
-
key: `g-${
|
|
1954
|
-
items: [{ option:
|
|
1955
|
-
}) : (
|
|
1956
|
-
}),
|
|
1957
|
-
}),
|
|
1958
|
-
function
|
|
1959
|
-
return
|
|
1960
|
-
}
|
|
1961
|
-
const
|
|
1962
|
-
|
|
1987
|
+
label: P,
|
|
1988
|
+
headerId: `${d}-group-${z}`,
|
|
1989
|
+
key: `g-${z}`,
|
|
1990
|
+
items: [{ option: I, index: z }]
|
|
1991
|
+
}) : (X == null ? void 0 : X.kind) === "plain" ? X.items.push({ option: I, index: z }) : h.push({ kind: "plain", key: `p-${z}`, items: [{ option: I, index: z }] });
|
|
1992
|
+
}), h;
|
|
1993
|
+
}), F = k(() => t.multiple ? Array.isArray(i.value) ? i.value : [] : i.value !== null && i.value !== void 0 ? [i.value] : []), W = k(() => F.value.length > 0), ee = k(() => T.value && W.value);
|
|
1994
|
+
function G(h) {
|
|
1995
|
+
return F.value.includes(h);
|
|
1996
|
+
}
|
|
1997
|
+
const M = gt(/* @__PURE__ */ new Map());
|
|
1998
|
+
Z(
|
|
1963
1999
|
() => t.options,
|
|
1964
|
-
(
|
|
2000
|
+
(h) => h.forEach((I) => M.set(I.value, I.label)),
|
|
1965
2001
|
{ immediate: !0, deep: !0 }
|
|
1966
2002
|
);
|
|
1967
|
-
function
|
|
1968
|
-
var
|
|
1969
|
-
return (
|
|
1970
|
-
}
|
|
1971
|
-
const
|
|
1972
|
-
() => typeof t.width == "string" &&
|
|
1973
|
-
),
|
|
1974
|
-
if (!
|
|
2003
|
+
function j(h) {
|
|
2004
|
+
var I, z, P;
|
|
2005
|
+
return (P = (z = (I = t.options.find((X) => X.value === h)) == null ? void 0 : I.label) != null ? z : M.get(h)) != null ? P : String(h);
|
|
2006
|
+
}
|
|
2007
|
+
const b = k(() => T.value ? W.value ? t.multiple ? `${t.placeholder} (${F.value.length})` : j(F.value[0]) : t.placeholder : W.value ? t.multiple ? F.value.map(j).join(", ") : j(F.value[0]) : t.placeholder), R = Object.values(lt), u = k(
|
|
2008
|
+
() => typeof t.width == "string" && R.includes(t.width) ? `ds-select--w-${t.width}` : null
|
|
2009
|
+
), S = k(() => {
|
|
2010
|
+
if (!u.value)
|
|
1975
2011
|
return { width: typeof t.width == "number" ? `${t.width}px` : t.width };
|
|
1976
|
-
}),
|
|
1977
|
-
() =>
|
|
2012
|
+
}), x = k(
|
|
2013
|
+
() => c.value && m.value >= 0 ? v(m.value) : void 0
|
|
1978
2014
|
);
|
|
1979
|
-
function
|
|
1980
|
-
if (
|
|
1981
|
-
const
|
|
1982
|
-
return
|
|
1983
|
-
}
|
|
1984
|
-
function
|
|
1985
|
-
t.disabled || (
|
|
1986
|
-
var
|
|
1987
|
-
return (
|
|
2015
|
+
function le() {
|
|
2016
|
+
if ($.value.length === 0) return -1;
|
|
2017
|
+
const h = $.value.findIndex((I) => G(I.value));
|
|
2018
|
+
return h >= 0 ? h : 0;
|
|
2019
|
+
}
|
|
2020
|
+
function re() {
|
|
2021
|
+
t.disabled || (c.value = !0, m.value = le(), t.filterable && se(() => {
|
|
2022
|
+
var h;
|
|
2023
|
+
return (h = r.value) == null ? void 0 : h.focus();
|
|
1988
2024
|
}));
|
|
1989
2025
|
}
|
|
1990
|
-
function
|
|
1991
|
-
|
|
1992
|
-
var
|
|
1993
|
-
return (
|
|
2026
|
+
function oe(h = !0) {
|
|
2027
|
+
c.value = !1, m.value = -1, p.value && (p.value = "", o(Re, "")), h && se(() => {
|
|
2028
|
+
var I;
|
|
2029
|
+
return (I = f.value) == null ? void 0 : I.focus();
|
|
1994
2030
|
});
|
|
1995
2031
|
}
|
|
1996
|
-
function
|
|
1997
|
-
t.disabled || (
|
|
2032
|
+
function rt() {
|
|
2033
|
+
t.disabled || (c.value ? oe() : re());
|
|
1998
2034
|
}
|
|
1999
|
-
function
|
|
2035
|
+
function Ce(h) {
|
|
2000
2036
|
if (t.disabled) return;
|
|
2001
2037
|
if (t.multiple) {
|
|
2002
|
-
const
|
|
2003
|
-
i.value =
|
|
2038
|
+
const z = F.value;
|
|
2039
|
+
i.value = z.includes(h) ? z.filter((P) => P !== h) : [...z, h];
|
|
2004
2040
|
return;
|
|
2005
2041
|
}
|
|
2006
|
-
const
|
|
2007
|
-
i.value =
|
|
2042
|
+
const I = G(h);
|
|
2043
|
+
i.value = I && t.showCheckbox ? null : h, oe();
|
|
2008
2044
|
}
|
|
2009
|
-
function
|
|
2045
|
+
function ct() {
|
|
2010
2046
|
t.disabled || (i.value = t.multiple ? [] : null);
|
|
2011
2047
|
}
|
|
2012
|
-
function
|
|
2013
|
-
const
|
|
2014
|
-
|
|
2015
|
-
var
|
|
2016
|
-
(
|
|
2048
|
+
function pe(h) {
|
|
2049
|
+
const I = $.value.length;
|
|
2050
|
+
I !== 0 && (m.value < 0 ? m.value = h > 0 ? 0 : I - 1 : m.value = (m.value + h + I) % I, se(() => {
|
|
2051
|
+
var z, P;
|
|
2052
|
+
(P = (z = document.getElementById(v(m.value))) == null ? void 0 : z.scrollIntoView) == null || P.call(z, { block: "nearest" });
|
|
2017
2053
|
}));
|
|
2018
2054
|
}
|
|
2019
|
-
function
|
|
2055
|
+
function ut(h) {
|
|
2020
2056
|
if (!t.disabled)
|
|
2021
|
-
switch (
|
|
2057
|
+
switch (h.key) {
|
|
2022
2058
|
case "ArrowDown":
|
|
2023
|
-
|
|
2059
|
+
h.preventDefault(), c.value ? pe(1) : re();
|
|
2024
2060
|
break;
|
|
2025
2061
|
case "ArrowUp":
|
|
2026
|
-
|
|
2062
|
+
h.preventDefault(), c.value ? pe(-1) : re();
|
|
2027
2063
|
break;
|
|
2028
2064
|
case "Home":
|
|
2029
|
-
|
|
2065
|
+
c.value && (h.preventDefault(), m.value = 0);
|
|
2030
2066
|
break;
|
|
2031
2067
|
case "End":
|
|
2032
|
-
|
|
2068
|
+
c.value && (h.preventDefault(), m.value = $.value.length - 1);
|
|
2033
2069
|
break;
|
|
2034
2070
|
case "Enter":
|
|
2035
2071
|
case " ":
|
|
2036
2072
|
case "Spacebar":
|
|
2037
|
-
if (
|
|
2038
|
-
|
|
2039
|
-
else if (
|
|
2040
|
-
const
|
|
2041
|
-
|
|
2073
|
+
if (h.preventDefault(), !c.value)
|
|
2074
|
+
re();
|
|
2075
|
+
else if (m.value >= 0) {
|
|
2076
|
+
const I = $.value[m.value];
|
|
2077
|
+
I && Ce(I.value);
|
|
2042
2078
|
}
|
|
2043
2079
|
break;
|
|
2044
2080
|
case "Escape":
|
|
2045
|
-
|
|
2081
|
+
c.value && (h.preventDefault(), h.stopPropagation(), oe());
|
|
2046
2082
|
break;
|
|
2047
2083
|
case "Tab":
|
|
2048
|
-
|
|
2084
|
+
c.value && oe(!1);
|
|
2049
2085
|
break;
|
|
2050
2086
|
}
|
|
2051
2087
|
}
|
|
2052
|
-
function
|
|
2088
|
+
function ft(h) {
|
|
2053
2089
|
if (!t.disabled)
|
|
2054
|
-
switch (
|
|
2090
|
+
switch (h.key) {
|
|
2055
2091
|
case "ArrowDown":
|
|
2056
|
-
|
|
2092
|
+
h.preventDefault(), pe(1);
|
|
2057
2093
|
break;
|
|
2058
2094
|
case "ArrowUp":
|
|
2059
|
-
|
|
2095
|
+
h.preventDefault(), pe(-1);
|
|
2060
2096
|
break;
|
|
2061
2097
|
case "Enter":
|
|
2062
|
-
if (
|
|
2063
|
-
const
|
|
2064
|
-
|
|
2098
|
+
if (h.preventDefault(), m.value >= 0) {
|
|
2099
|
+
const I = $.value[m.value];
|
|
2100
|
+
I && Ce(I.value);
|
|
2065
2101
|
}
|
|
2066
2102
|
break;
|
|
2067
2103
|
case "Escape":
|
|
2068
|
-
|
|
2104
|
+
h.preventDefault(), h.stopPropagation(), oe();
|
|
2069
2105
|
break;
|
|
2070
2106
|
case "Tab":
|
|
2071
|
-
|
|
2107
|
+
c.value && oe(!1);
|
|
2072
2108
|
break;
|
|
2073
2109
|
}
|
|
2074
2110
|
}
|
|
2075
|
-
function
|
|
2076
|
-
|
|
2111
|
+
function vt(h) {
|
|
2112
|
+
p.value = h.target.value, o(Re, p.value);
|
|
2077
2113
|
}
|
|
2078
|
-
|
|
2079
|
-
|
|
2114
|
+
Z($, (h) => {
|
|
2115
|
+
c.value && (h.length === 0 ? m.value = -1 : (m.value < 0 || m.value >= h.length) && (m.value = 0));
|
|
2080
2116
|
});
|
|
2081
|
-
function Ie(
|
|
2082
|
-
y.value && !y.value.contains(
|
|
2117
|
+
function Ie(h) {
|
|
2118
|
+
y.value && !y.value.contains(h.target) && oe(!1);
|
|
2083
2119
|
}
|
|
2084
|
-
return
|
|
2085
|
-
typeof document != "undefined" && (
|
|
2086
|
-
}),
|
|
2120
|
+
return Z(c, (h) => {
|
|
2121
|
+
typeof document != "undefined" && (h ? document.addEventListener("mousedown", Ie) : document.removeEventListener("mousedown", Ie));
|
|
2122
|
+
}), Z(
|
|
2087
2123
|
() => t.disabled,
|
|
2088
|
-
(
|
|
2089
|
-
|
|
2124
|
+
(h) => {
|
|
2125
|
+
h && c.value && oe(!1);
|
|
2090
2126
|
}
|
|
2091
|
-
),
|
|
2127
|
+
), de(() => {
|
|
2092
2128
|
typeof document != "undefined" && document.removeEventListener("mousedown", Ie);
|
|
2093
|
-
}), (
|
|
2129
|
+
}), (h, I) => (a(), l("div", {
|
|
2094
2130
|
ref_key: "rootRef",
|
|
2095
2131
|
ref: y,
|
|
2096
|
-
class:
|
|
2097
|
-
style:
|
|
2132
|
+
class: L(["ds-select", [`ds-select--${e.selectType}`, u.value, { "is-open": c.value }]]),
|
|
2133
|
+
style: U(S.value)
|
|
2098
2134
|
}, [
|
|
2099
2135
|
s("div", {
|
|
2100
|
-
class:
|
|
2136
|
+
class: L(["ds-select__control", { "is-disabled": e.disabled, "is-filter-selected": ee.value }])
|
|
2101
2137
|
}, [
|
|
2102
2138
|
s("button", {
|
|
2103
2139
|
ref_key: "triggerRef",
|
|
2104
|
-
ref:
|
|
2140
|
+
ref: f,
|
|
2105
2141
|
type: "button",
|
|
2106
2142
|
class: "ds-select__trigger",
|
|
2107
2143
|
disabled: e.disabled,
|
|
2108
2144
|
"aria-haspopup": "listbox",
|
|
2109
|
-
"aria-expanded":
|
|
2110
|
-
"aria-controls":
|
|
2111
|
-
"aria-activedescendant": e.filterable ? void 0 :
|
|
2112
|
-
onClick:
|
|
2113
|
-
onKeydown:
|
|
2145
|
+
"aria-expanded": c.value,
|
|
2146
|
+
"aria-controls": c.value ? E : void 0,
|
|
2147
|
+
"aria-activedescendant": e.filterable ? void 0 : x.value,
|
|
2148
|
+
onClick: rt,
|
|
2149
|
+
onKeydown: ut
|
|
2114
2150
|
}, [
|
|
2115
2151
|
s("span", {
|
|
2116
2152
|
class: "ds-select__summary",
|
|
2117
|
-
title:
|
|
2118
|
-
},
|
|
2119
|
-
], 40,
|
|
2120
|
-
|
|
2153
|
+
title: b.value
|
|
2154
|
+
}, w(b.value), 9, xl)
|
|
2155
|
+
], 40, Ol),
|
|
2156
|
+
T.value && W.value ? (a(), l("button", {
|
|
2121
2157
|
key: 0,
|
|
2122
2158
|
type: "button",
|
|
2123
2159
|
class: "ds-select__clear",
|
|
2124
2160
|
disabled: e.disabled,
|
|
2125
2161
|
"aria-label": e.clearLabel || void 0,
|
|
2126
|
-
onClick:
|
|
2127
|
-
}, [...
|
|
2162
|
+
onClick: ct
|
|
2163
|
+
}, [...I[1] || (I[1] = [
|
|
2128
2164
|
s("i", {
|
|
2129
|
-
class: "material-
|
|
2165
|
+
class: "material-symbols-filled",
|
|
2130
2166
|
"aria-hidden": "true"
|
|
2131
2167
|
}, "close", -1)
|
|
2132
|
-
])], 8,
|
|
2168
|
+
])], 8, Ml)) : (a(), l("i", Pl, "keyboard_arrow_down"))
|
|
2133
2169
|
], 2),
|
|
2134
|
-
|
|
2135
|
-
e.filterable ? (a(), l("div",
|
|
2136
|
-
|
|
2137
|
-
class: "material-
|
|
2170
|
+
c.value ? (a(), l("div", zl, [
|
|
2171
|
+
e.filterable ? (a(), l("div", Fl, [
|
|
2172
|
+
I[2] || (I[2] = s("i", {
|
|
2173
|
+
class: "material-symbols-filled ds-select__search-icon",
|
|
2138
2174
|
"aria-hidden": "true"
|
|
2139
2175
|
}, "search", -1)),
|
|
2140
2176
|
s("input", {
|
|
2141
2177
|
ref_key: "searchRef",
|
|
2142
|
-
ref:
|
|
2178
|
+
ref: r,
|
|
2143
2179
|
type: "text",
|
|
2144
2180
|
class: "ds-select__search-input",
|
|
2145
2181
|
role: "combobox",
|
|
2146
2182
|
"aria-expanded": "true",
|
|
2147
|
-
"aria-controls":
|
|
2148
|
-
"aria-activedescendant":
|
|
2183
|
+
"aria-controls": E,
|
|
2184
|
+
"aria-activedescendant": x.value,
|
|
2149
2185
|
"aria-autocomplete": "list",
|
|
2150
2186
|
autocomplete: "off",
|
|
2151
2187
|
"aria-label": e.searchLabel,
|
|
2152
2188
|
placeholder: e.searchPlaceholder,
|
|
2153
|
-
value:
|
|
2154
|
-
onInput:
|
|
2155
|
-
onKeydown:
|
|
2156
|
-
}, null, 40,
|
|
2157
|
-
])) :
|
|
2189
|
+
value: p.value,
|
|
2190
|
+
onInput: vt,
|
|
2191
|
+
onKeydown: ft
|
|
2192
|
+
}, null, 40, Vl)
|
|
2193
|
+
])) : g("", !0),
|
|
2158
2194
|
s("ul", {
|
|
2159
|
-
id:
|
|
2195
|
+
id: E,
|
|
2160
2196
|
class: "ds-select__listbox",
|
|
2161
2197
|
role: "listbox",
|
|
2162
2198
|
"aria-multiselectable": e.multiple || void 0,
|
|
2163
2199
|
"aria-busy": e.loading || void 0,
|
|
2164
|
-
onMousedown:
|
|
2200
|
+
onMousedown: I[0] || (I[0] = ue(() => {
|
|
2165
2201
|
}, ["prevent"]))
|
|
2166
2202
|
}, [
|
|
2167
|
-
e.loading ? (a(), l("li",
|
|
2168
|
-
|
|
2169
|
-
|
|
2203
|
+
e.loading ? (a(), l("li", Gl, [
|
|
2204
|
+
C(h.$slots, "loading", {}, () => [
|
|
2205
|
+
Y(D(ye), { size: "small" })
|
|
2170
2206
|
], !0)
|
|
2171
|
-
])) : (a(), l(
|
|
2172
|
-
(a(!0), l(
|
|
2173
|
-
key:
|
|
2174
|
-
role:
|
|
2175
|
-
"aria-labelledby":
|
|
2176
|
-
class:
|
|
2207
|
+
])) : (a(), l(H, { key: 1 }, [
|
|
2208
|
+
(a(!0), l(H, null, Q(A.value, (z) => (a(), l("li", {
|
|
2209
|
+
key: z.key,
|
|
2210
|
+
role: z.kind === "group" ? "group" : "presentation",
|
|
2211
|
+
"aria-labelledby": z.kind === "group" ? z.headerId : void 0,
|
|
2212
|
+
class: L(z.kind === "group" ? "ds-select__group" : "ds-select__run")
|
|
2177
2213
|
}, [
|
|
2178
|
-
|
|
2214
|
+
z.kind === "group" ? (a(), l("span", {
|
|
2179
2215
|
key: 0,
|
|
2180
|
-
id:
|
|
2216
|
+
id: z.headerId,
|
|
2181
2217
|
class: "ds-select__group-header"
|
|
2182
|
-
},
|
|
2183
|
-
(a(!0), l(
|
|
2184
|
-
id:
|
|
2185
|
-
key:
|
|
2186
|
-
class:
|
|
2187
|
-
"is-selected":
|
|
2188
|
-
"is-active":
|
|
2218
|
+
}, w(z.label), 9, Wl)) : g("", !0),
|
|
2219
|
+
(a(!0), l(H, null, Q(z.items, (P) => (a(), l("div", {
|
|
2220
|
+
id: v(P.index),
|
|
2221
|
+
key: P.option.value,
|
|
2222
|
+
class: L(["ds-select__option", {
|
|
2223
|
+
"is-selected": G(P.option.value),
|
|
2224
|
+
"is-active": P.index === m.value,
|
|
2189
2225
|
"ds-select__option--checkbox": e.showCheckbox
|
|
2190
2226
|
}]),
|
|
2191
2227
|
role: "option",
|
|
2192
|
-
"aria-selected":
|
|
2193
|
-
onClick:
|
|
2194
|
-
onMouseenter: (
|
|
2228
|
+
"aria-selected": G(P.option.value),
|
|
2229
|
+
onClick: ue((X) => Ce(P.option.value), ["prevent"]),
|
|
2230
|
+
onMouseenter: (X) => m.value = P.index
|
|
2195
2231
|
}, [
|
|
2196
|
-
e.showCheckbox ? (a(),
|
|
2232
|
+
e.showCheckbox ? (a(), K(D(ot), {
|
|
2197
2233
|
key: 0,
|
|
2198
2234
|
class: "ds-select__option-check",
|
|
2199
|
-
"model-value":
|
|
2235
|
+
"model-value": G(P.option.value),
|
|
2200
2236
|
disabled: "",
|
|
2201
2237
|
"aria-hidden": "true"
|
|
2202
|
-
}, null, 8, ["model-value"])) :
|
|
2203
|
-
|
|
2204
|
-
option:
|
|
2205
|
-
selected:
|
|
2206
|
-
active:
|
|
2238
|
+
}, null, 8, ["model-value"])) : g("", !0),
|
|
2239
|
+
C(h.$slots, "option", {
|
|
2240
|
+
option: P.option,
|
|
2241
|
+
selected: G(P.option.value),
|
|
2242
|
+
active: P.index === m.value
|
|
2207
2243
|
}, () => [
|
|
2208
|
-
|
|
2244
|
+
P.option.icon ? (a(), l("i", {
|
|
2209
2245
|
key: 0,
|
|
2210
|
-
class: "material-
|
|
2211
|
-
style:
|
|
2246
|
+
class: "material-symbols-filled ds-select__option-icon",
|
|
2247
|
+
style: U(P.option.color ? { color: P.option.color } : void 0),
|
|
2212
2248
|
"aria-hidden": "true"
|
|
2213
|
-
},
|
|
2214
|
-
s("span",
|
|
2215
|
-
|
|
2216
|
-
|
|
2249
|
+
}, w(P.option.icon), 5)) : g("", !0),
|
|
2250
|
+
s("span", Yl, [
|
|
2251
|
+
q(w(P.option.label), 1),
|
|
2252
|
+
P.option.subLabel ? (a(), l("span", ql, ", " + w(P.option.subLabel), 1)) : g("", !0)
|
|
2217
2253
|
])
|
|
2218
2254
|
], !0)
|
|
2219
|
-
], 42,
|
|
2220
|
-
], 10,
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2255
|
+
], 42, Kl))), 128))
|
|
2256
|
+
], 10, Hl))), 128)),
|
|
2257
|
+
$.value.length === 0 ? (a(), l("li", jl, [
|
|
2258
|
+
C(h.$slots, "empty", {}, () => [
|
|
2259
|
+
q(w(e.emptyText), 1)
|
|
2224
2260
|
], !0)
|
|
2225
|
-
])) :
|
|
2261
|
+
])) : g("", !0)
|
|
2226
2262
|
], 64))
|
|
2227
|
-
], 40,
|
|
2228
|
-
])) :
|
|
2263
|
+
], 40, Ul)
|
|
2264
|
+
])) : g("", !0)
|
|
2229
2265
|
], 6));
|
|
2230
2266
|
}
|
|
2231
|
-
}),
|
|
2267
|
+
}), yn = /* @__PURE__ */ O(Xl, [["__scopeId", "data-v-936974a2"]]), Zl = ["tabindex"], Ql = /* @__PURE__ */ B({
|
|
2232
2268
|
__name: "DsRow",
|
|
2233
2269
|
props: {
|
|
2234
2270
|
selected: { type: Boolean, default: !1 },
|
|
2235
2271
|
clickable: { type: Boolean, default: !1 }
|
|
2236
2272
|
},
|
|
2237
|
-
emits: [
|
|
2273
|
+
emits: [te],
|
|
2238
2274
|
setup(e, { emit: n }) {
|
|
2239
2275
|
const t = e, o = n;
|
|
2240
2276
|
function i() {
|
|
2241
|
-
t.clickable && o(
|
|
2277
|
+
t.clickable && o(te);
|
|
2242
2278
|
}
|
|
2243
|
-
function
|
|
2244
|
-
t.clickable && (
|
|
2279
|
+
function d(E) {
|
|
2280
|
+
t.clickable && (E.key === "Enter" || E.key === " ") && (E.preventDefault(), o(te));
|
|
2245
2281
|
}
|
|
2246
|
-
return (
|
|
2247
|
-
class:
|
|
2282
|
+
return (E, v) => (a(), l("tr", {
|
|
2283
|
+
class: L(["ds-row", { "is-selected": e.selected, "is-clickable": e.clickable }]),
|
|
2248
2284
|
tabindex: e.clickable ? 0 : void 0,
|
|
2249
2285
|
onClick: i,
|
|
2250
|
-
onKeydown:
|
|
2286
|
+
onKeydown: d
|
|
2251
2287
|
}, [
|
|
2252
|
-
|
|
2253
|
-
], 42,
|
|
2288
|
+
C(E.$slots, "default", {}, void 0, !0)
|
|
2289
|
+
], 42, Zl));
|
|
2254
2290
|
}
|
|
2255
|
-
}),
|
|
2291
|
+
}), mn = /* @__PURE__ */ O(Ql, [["__scopeId", "data-v-c2d6c50b"]]), Jl = /* @__PURE__ */ B({
|
|
2256
2292
|
__name: "DsCell",
|
|
2257
2293
|
props: {
|
|
2258
2294
|
first: { type: Boolean, default: !1 },
|
|
@@ -2270,29 +2306,29 @@ const ge = {
|
|
|
2270
2306
|
}
|
|
2271
2307
|
},
|
|
2272
2308
|
setup(e) {
|
|
2273
|
-
const n = e, t = (i) => typeof i == "number" ? `${i}px` : i, o =
|
|
2309
|
+
const n = e, t = (i) => typeof i == "number" ? `${i}px` : i, o = k(() => {
|
|
2274
2310
|
const i = {};
|
|
2275
2311
|
if (n.width != null && (i.width = t(n.width)), n.pinned) {
|
|
2276
2312
|
i.position = "sticky";
|
|
2277
|
-
const
|
|
2278
|
-
i[n.pinned ===
|
|
2313
|
+
const d = n.pinnedOffset == null ? "0px" : t(n.pinnedOffset);
|
|
2314
|
+
i[n.pinned === ne.LEFT ? "left" : "right"] = d;
|
|
2279
2315
|
}
|
|
2280
2316
|
return Object.keys(i).length ? i : void 0;
|
|
2281
2317
|
});
|
|
2282
|
-
return (i,
|
|
2283
|
-
class:
|
|
2318
|
+
return (i, d) => (a(), l("td", {
|
|
2319
|
+
class: L(["ds-cell", {
|
|
2284
2320
|
"is-accent": e.first && e.selected,
|
|
2285
2321
|
"is-truncated": e.truncate,
|
|
2286
2322
|
"is-selected": e.selected,
|
|
2287
2323
|
"is-pinned": !!e.pinned,
|
|
2288
2324
|
[`is-pinned--${e.pinned}`]: !!e.pinned
|
|
2289
2325
|
}]),
|
|
2290
|
-
style:
|
|
2326
|
+
style: U(o.value)
|
|
2291
2327
|
}, [
|
|
2292
|
-
|
|
2328
|
+
C(i.$slots, "default", {}, void 0, !0)
|
|
2293
2329
|
], 6));
|
|
2294
2330
|
}
|
|
2295
|
-
}),
|
|
2331
|
+
}), hn = /* @__PURE__ */ O(Jl, [["__scopeId", "data-v-727b775d"]]), ei = {
|
|
2296
2332
|
SUCCESS: "success",
|
|
2297
2333
|
WARNING: "warning",
|
|
2298
2334
|
DANGER: "danger",
|
|
@@ -2302,30 +2338,30 @@ const ge = {
|
|
|
2302
2338
|
// the only solid-fill variant
|
|
2303
2339
|
ACCENT: "accent"
|
|
2304
2340
|
// maps to $info-* tokens, not $accent-*
|
|
2305
|
-
},
|
|
2341
|
+
}, ti = /* @__PURE__ */ B({
|
|
2306
2342
|
__name: "DsCustomTag",
|
|
2307
2343
|
props: {
|
|
2308
2344
|
type: {
|
|
2309
2345
|
type: String,
|
|
2310
|
-
default:
|
|
2346
|
+
default: ei.INFO
|
|
2311
2347
|
},
|
|
2312
2348
|
// Fully rounded (radius-full) sides vs the default radius-control.
|
|
2313
2349
|
round: Boolean
|
|
2314
2350
|
},
|
|
2315
2351
|
setup(e) {
|
|
2316
2352
|
return (n, t) => (a(), l("span", {
|
|
2317
|
-
class:
|
|
2353
|
+
class: L(["ds-custom-tag", [`ds-custom-tag--${e.type}`, { "is-round": e.round }]])
|
|
2318
2354
|
}, [
|
|
2319
|
-
|
|
2355
|
+
C(n.$slots, "default", {}, void 0, !0)
|
|
2320
2356
|
], 2));
|
|
2321
2357
|
}
|
|
2322
|
-
}),
|
|
2323
|
-
class: "material-
|
|
2358
|
+
}), gn = /* @__PURE__ */ O(ti, [["__scopeId", "data-v-c0220631"]]), ai = { class: "ds-pill__text" }, li = ["aria-label"], ii = {
|
|
2359
|
+
class: "material-symbols-filled",
|
|
2324
2360
|
"aria-hidden": "true"
|
|
2325
|
-
},
|
|
2361
|
+
}, ni = /* @__PURE__ */ B({
|
|
2326
2362
|
__name: "DsPill",
|
|
2327
2363
|
props: {
|
|
2328
|
-
// Material
|
|
2364
|
+
// Material Symbols ligature name; when set, renders a trailing icon button.
|
|
2329
2365
|
icon: {
|
|
2330
2366
|
type: String,
|
|
2331
2367
|
default: ""
|
|
@@ -2342,55 +2378,55 @@ const ge = {
|
|
|
2342
2378
|
default: ""
|
|
2343
2379
|
}
|
|
2344
2380
|
},
|
|
2345
|
-
emits: [
|
|
2381
|
+
emits: [te],
|
|
2346
2382
|
setup(e, { emit: n }) {
|
|
2347
2383
|
const t = n;
|
|
2348
2384
|
return (o, i) => (a(), l("span", {
|
|
2349
|
-
class:
|
|
2350
|
-
style:
|
|
2385
|
+
class: L(["ds-pill", { "ds-pill--has-icon": e.icon }]),
|
|
2386
|
+
style: U(e.background ? { background: e.background } : void 0)
|
|
2351
2387
|
}, [
|
|
2352
|
-
s("span",
|
|
2353
|
-
|
|
2388
|
+
s("span", ai, [
|
|
2389
|
+
C(o.$slots, "default", {}, void 0, !0)
|
|
2354
2390
|
]),
|
|
2355
2391
|
e.icon ? (a(), l("button", {
|
|
2356
2392
|
key: 0,
|
|
2357
2393
|
type: "button",
|
|
2358
2394
|
class: "ds-pill__icon",
|
|
2359
2395
|
"aria-label": e.iconLabel || void 0,
|
|
2360
|
-
onClick: i[0] || (i[0] = (
|
|
2396
|
+
onClick: i[0] || (i[0] = (d) => t(D(te)))
|
|
2361
2397
|
}, [
|
|
2362
|
-
s("i",
|
|
2363
|
-
], 8,
|
|
2398
|
+
s("i", ii, w(e.icon), 1)
|
|
2399
|
+
], 8, li)) : g("", !0)
|
|
2364
2400
|
], 6));
|
|
2365
2401
|
}
|
|
2366
|
-
}),
|
|
2402
|
+
}), pn = /* @__PURE__ */ O(ni, [["__scopeId", "data-v-59af98d0"]]), si = {
|
|
2367
2403
|
key: 0,
|
|
2368
2404
|
class: "ds-pill-with-border__icon"
|
|
2369
|
-
},
|
|
2405
|
+
}, oi = { class: "ds-pill-with-border__label" }, di = /* @__PURE__ */ B({
|
|
2370
2406
|
__name: "DsPillWithBorder",
|
|
2371
|
-
emits: [
|
|
2407
|
+
emits: [te],
|
|
2372
2408
|
setup(e, { emit: n }) {
|
|
2373
2409
|
const t = n;
|
|
2374
2410
|
return (o, i) => (a(), l("button", {
|
|
2375
2411
|
type: "button",
|
|
2376
2412
|
class: "ds-pill-with-border",
|
|
2377
|
-
onClick: i[0] || (i[0] = (
|
|
2413
|
+
onClick: i[0] || (i[0] = (d) => t(D(te)))
|
|
2378
2414
|
}, [
|
|
2379
|
-
o.$slots.icon ? (a(), l("span",
|
|
2380
|
-
|
|
2381
|
-
])) :
|
|
2382
|
-
s("span",
|
|
2383
|
-
|
|
2415
|
+
o.$slots.icon ? (a(), l("span", si, [
|
|
2416
|
+
C(o.$slots, "icon", {}, void 0, !0)
|
|
2417
|
+
])) : g("", !0),
|
|
2418
|
+
s("span", oi, [
|
|
2419
|
+
C(o.$slots, "default", {}, void 0, !0)
|
|
2384
2420
|
])
|
|
2385
2421
|
]));
|
|
2386
2422
|
}
|
|
2387
|
-
}),
|
|
2423
|
+
}), Sn = /* @__PURE__ */ O(di, [["__scopeId", "data-v-8db4dcaf"]]), ri = ["aria-label"], ci = ["title"], ui = {
|
|
2388
2424
|
key: 1,
|
|
2389
2425
|
class: "ds-segmented-progress-bar-wrapper"
|
|
2390
|
-
},
|
|
2426
|
+
}, fi = ["aria-label"], vi = ["title"], bi = {
|
|
2391
2427
|
class: "ds-segmented-progress-bar__legend",
|
|
2392
2428
|
"aria-hidden": "true"
|
|
2393
|
-
},
|
|
2429
|
+
}, yi = { class: "ds-segmented-progress-bar__legend-label" }, mi = /* @__PURE__ */ B({
|
|
2394
2430
|
inheritAttrs: !1,
|
|
2395
2431
|
__name: "DsSegmentedProgressBar",
|
|
2396
2432
|
props: {
|
|
@@ -2411,70 +2447,70 @@ const ge = {
|
|
|
2411
2447
|
showLegend: { type: Boolean, default: !1 }
|
|
2412
2448
|
},
|
|
2413
2449
|
setup(e) {
|
|
2414
|
-
const n = e, t =
|
|
2450
|
+
const n = e, t = he(), o = k(() => n.segments.filter((d) => !!d.name)), i = k(
|
|
2415
2451
|
() => !!t.legend || n.showLegend && o.value.length > 0
|
|
2416
2452
|
);
|
|
2417
|
-
return (
|
|
2418
|
-
s("div",
|
|
2453
|
+
return (d, E) => i.value ? (a(), l("div", ui, [
|
|
2454
|
+
s("div", ke(d.$attrs, {
|
|
2419
2455
|
class: "ds-segmented-progress-bar",
|
|
2420
2456
|
role: "img",
|
|
2421
2457
|
"aria-label": e.label || void 0,
|
|
2422
2458
|
style: { height: `${e.height}px` }
|
|
2423
2459
|
}), [
|
|
2424
|
-
(a(!0), l(
|
|
2425
|
-
var
|
|
2460
|
+
(a(!0), l(H, null, Q(e.segments, (v, y) => {
|
|
2461
|
+
var f;
|
|
2426
2462
|
return a(), l("div", {
|
|
2427
|
-
key: `${(
|
|
2463
|
+
key: `${(f = v.name) != null ? f : ""}-${y}`,
|
|
2428
2464
|
class: "ds-segmented-progress-bar__segment",
|
|
2429
|
-
style:
|
|
2430
|
-
width: `${e.total > 0 ?
|
|
2431
|
-
backgroundColor:
|
|
2465
|
+
style: U({
|
|
2466
|
+
width: `${e.total > 0 ? v.amount * 100 / e.total : 0}%`,
|
|
2467
|
+
backgroundColor: v.color
|
|
2432
2468
|
}),
|
|
2433
|
-
title:
|
|
2434
|
-
}, null, 12,
|
|
2469
|
+
title: v.name || void 0
|
|
2470
|
+
}, null, 12, vi);
|
|
2435
2471
|
}), 128))
|
|
2436
|
-
], 16,
|
|
2437
|
-
|
|
2438
|
-
s("ul",
|
|
2439
|
-
(a(!0), l(
|
|
2440
|
-
key: `${
|
|
2472
|
+
], 16, fi),
|
|
2473
|
+
C(d.$slots, "legend", {}, () => [
|
|
2474
|
+
s("ul", bi, [
|
|
2475
|
+
(a(!0), l(H, null, Q(o.value, (v, y) => (a(), l("li", {
|
|
2476
|
+
key: `${v.name}-${y}`,
|
|
2441
2477
|
class: "ds-segmented-progress-bar__legend-item"
|
|
2442
2478
|
}, [
|
|
2443
2479
|
s("span", {
|
|
2444
2480
|
class: "ds-segmented-progress-bar__legend-swatch",
|
|
2445
|
-
style:
|
|
2481
|
+
style: U({ backgroundColor: v.color })
|
|
2446
2482
|
}, null, 4),
|
|
2447
|
-
s("span",
|
|
2483
|
+
s("span", yi, w(v.name), 1)
|
|
2448
2484
|
]))), 128))
|
|
2449
2485
|
])
|
|
2450
2486
|
], !0)
|
|
2451
|
-
])) : (a(), l("div",
|
|
2487
|
+
])) : (a(), l("div", ke({ key: 0 }, d.$attrs, {
|
|
2452
2488
|
class: "ds-segmented-progress-bar",
|
|
2453
2489
|
role: "img",
|
|
2454
2490
|
"aria-label": e.label || void 0,
|
|
2455
2491
|
style: { height: `${e.height}px` }
|
|
2456
2492
|
}), [
|
|
2457
|
-
(a(!0), l(
|
|
2458
|
-
var
|
|
2493
|
+
(a(!0), l(H, null, Q(e.segments, (v, y) => {
|
|
2494
|
+
var f;
|
|
2459
2495
|
return a(), l("div", {
|
|
2460
|
-
key: `${(
|
|
2496
|
+
key: `${(f = v.name) != null ? f : ""}-${y}`,
|
|
2461
2497
|
class: "ds-segmented-progress-bar__segment",
|
|
2462
|
-
style:
|
|
2463
|
-
width: `${e.total > 0 ?
|
|
2464
|
-
backgroundColor:
|
|
2498
|
+
style: U({
|
|
2499
|
+
width: `${e.total > 0 ? v.amount * 100 / e.total : 0}%`,
|
|
2500
|
+
backgroundColor: v.color
|
|
2465
2501
|
}),
|
|
2466
|
-
title:
|
|
2467
|
-
}, null, 12,
|
|
2502
|
+
title: v.name || void 0
|
|
2503
|
+
}, null, 12, ci);
|
|
2468
2504
|
}), 128))
|
|
2469
|
-
], 16,
|
|
2505
|
+
], 16, ri));
|
|
2470
2506
|
}
|
|
2471
|
-
}),
|
|
2507
|
+
}), kn = /* @__PURE__ */ O(mi, [["__scopeId", "data-v-89dc768c"]]), hi = {
|
|
2472
2508
|
key: 0,
|
|
2473
2509
|
class: "ds-empty-state__header"
|
|
2474
|
-
},
|
|
2510
|
+
}, gi = { class: "ds-empty-state__body" }, pi = ["src"], Si = { class: "ds-empty-state__title" }, ki = {
|
|
2475
2511
|
key: 1,
|
|
2476
2512
|
class: "ds-empty-state__subtitle"
|
|
2477
|
-
},
|
|
2513
|
+
}, $i = /* @__PURE__ */ B({
|
|
2478
2514
|
__name: "DsEmptyState",
|
|
2479
2515
|
props: {
|
|
2480
2516
|
// Illustration URL; decorative (rendered with alt="").
|
|
@@ -2486,32 +2522,32 @@ const ge = {
|
|
|
2486
2522
|
},
|
|
2487
2523
|
setup(e) {
|
|
2488
2524
|
return (n, t) => (a(), l("div", {
|
|
2489
|
-
class:
|
|
2525
|
+
class: L(["ds-empty-state", { "is-rounded": e.roundedBorder }])
|
|
2490
2526
|
}, [
|
|
2491
|
-
n.$slots["table-header"] ? (a(), l("div",
|
|
2492
|
-
|
|
2493
|
-
])) :
|
|
2494
|
-
s("div",
|
|
2527
|
+
n.$slots["table-header"] ? (a(), l("div", hi, [
|
|
2528
|
+
C(n.$slots, "table-header", {}, void 0, !0)
|
|
2529
|
+
])) : g("", !0),
|
|
2530
|
+
s("div", gi, [
|
|
2495
2531
|
e.image ? (a(), l("img", {
|
|
2496
2532
|
key: 0,
|
|
2497
2533
|
src: e.image,
|
|
2498
2534
|
alt: "",
|
|
2499
2535
|
class: "ds-empty-state__image"
|
|
2500
|
-
}, null, 8,
|
|
2501
|
-
s("p",
|
|
2502
|
-
e.subtitle ? (a(), l("p",
|
|
2503
|
-
|
|
2536
|
+
}, null, 8, pi)) : g("", !0),
|
|
2537
|
+
s("p", Si, w(e.title), 1),
|
|
2538
|
+
e.subtitle ? (a(), l("p", ki, w(e.subtitle), 1)) : g("", !0),
|
|
2539
|
+
C(n.$slots, "button", {}, void 0, !0)
|
|
2504
2540
|
])
|
|
2505
2541
|
], 2));
|
|
2506
2542
|
}
|
|
2507
|
-
}),
|
|
2543
|
+
}), $n = /* @__PURE__ */ O($i, [["__scopeId", "data-v-159c48f9"]]), Ti = ["aria-label"], Ei = {
|
|
2508
2544
|
key: 0,
|
|
2509
2545
|
class: "ds-paginator__limit-message"
|
|
2510
|
-
},
|
|
2546
|
+
}, wi = { class: "ds-paginator__pager" }, Li = {
|
|
2511
2547
|
key: 0,
|
|
2512
2548
|
class: "ds-paginator__ellipsis",
|
|
2513
2549
|
"aria-hidden": "true"
|
|
2514
|
-
},
|
|
2550
|
+
}, _i = ["aria-current", "onClick"], Ci = ["aria-label", "value"], Ii = ["value"], Di = "…l", Ri = "…r", Ai = /* @__PURE__ */ B({
|
|
2515
2551
|
__name: "DsPaginator",
|
|
2516
2552
|
props: {
|
|
2517
2553
|
total: { type: Number, required: !0 },
|
|
@@ -2528,83 +2564,83 @@ const ge = {
|
|
|
2528
2564
|
paginationLabel: { type: String, default: "" },
|
|
2529
2565
|
pageSizeLabel: { type: String, default: "" }
|
|
2530
2566
|
},
|
|
2531
|
-
emits: [
|
|
2567
|
+
emits: [He, We],
|
|
2532
2568
|
setup(e, { emit: n }) {
|
|
2533
|
-
const t = e, o = n, i =
|
|
2569
|
+
const t = e, o = n, i = k(() => Math.max(1, Math.ceil(t.total / t.pageSize))), d = k(() => {
|
|
2534
2570
|
const y = i.value;
|
|
2535
2571
|
if (y <= 7)
|
|
2536
|
-
return Array.from({ length: y }, (
|
|
2537
|
-
const
|
|
2538
|
-
|
|
2539
|
-
const
|
|
2540
|
-
for (let
|
|
2541
|
-
|
|
2542
|
-
return
|
|
2572
|
+
return Array.from({ length: y }, (p, T) => T + 1);
|
|
2573
|
+
const f = t.currentPage, r = [1];
|
|
2574
|
+
f > 4 && r.push(Di);
|
|
2575
|
+
const c = Math.max(2, f - 2), m = Math.min(y - 1, f + 2);
|
|
2576
|
+
for (let p = c; p <= m; p++)
|
|
2577
|
+
r.push(p);
|
|
2578
|
+
return f < y - 3 && r.push(Ri), r.push(y), r;
|
|
2543
2579
|
});
|
|
2544
|
-
function
|
|
2545
|
-
y < 1 || y > i.value || o(
|
|
2580
|
+
function E(y) {
|
|
2581
|
+
y < 1 || y > i.value || o(He, y);
|
|
2546
2582
|
}
|
|
2547
|
-
function
|
|
2548
|
-
const
|
|
2549
|
-
o(
|
|
2583
|
+
function v(y) {
|
|
2584
|
+
const f = y.target;
|
|
2585
|
+
o(We, Number(f.value));
|
|
2550
2586
|
}
|
|
2551
|
-
return (y,
|
|
2587
|
+
return (y, f) => (a(), l("nav", {
|
|
2552
2588
|
class: "ds-paginator",
|
|
2553
2589
|
"aria-label": e.paginationLabel || void 0
|
|
2554
2590
|
}, [
|
|
2555
|
-
e.limitMessage ? (a(), l("span",
|
|
2556
|
-
s("div",
|
|
2557
|
-
|
|
2591
|
+
e.limitMessage ? (a(), l("span", Ei, w(e.limitMessage), 1)) : g("", !0),
|
|
2592
|
+
s("div", wi, [
|
|
2593
|
+
Y(D(fe), {
|
|
2558
2594
|
variant: "tertiary",
|
|
2559
2595
|
circle: "",
|
|
2560
2596
|
size: "medium",
|
|
2561
2597
|
"left-icon": "chevron_left",
|
|
2562
2598
|
"aria-label": e.prevLabel || void 0,
|
|
2563
2599
|
disabled: e.currentPage <= 1,
|
|
2564
|
-
onClick:
|
|
2600
|
+
onClick: f[0] || (f[0] = (r) => E(e.currentPage - 1))
|
|
2565
2601
|
}, null, 8, ["aria-label", "disabled"]),
|
|
2566
|
-
(a(!0), l(
|
|
2567
|
-
typeof
|
|
2602
|
+
(a(!0), l(H, null, Q(d.value, (r) => (a(), l(H, { key: r }, [
|
|
2603
|
+
typeof r == "string" ? (a(), l("span", Li, "…")) : (a(), l("button", {
|
|
2568
2604
|
key: 1,
|
|
2569
2605
|
type: "button",
|
|
2570
|
-
class:
|
|
2571
|
-
"aria-current":
|
|
2572
|
-
onClick: (
|
|
2573
|
-
},
|
|
2606
|
+
class: L(["ds-paginator__page", { "is-active": r === e.currentPage }]),
|
|
2607
|
+
"aria-current": r === e.currentPage ? "page" : void 0,
|
|
2608
|
+
onClick: (c) => E(r)
|
|
2609
|
+
}, w(r), 11, _i))
|
|
2574
2610
|
], 64))), 128)),
|
|
2575
|
-
|
|
2611
|
+
Y(D(fe), {
|
|
2576
2612
|
variant: "tertiary",
|
|
2577
2613
|
circle: "",
|
|
2578
2614
|
size: "medium",
|
|
2579
2615
|
"left-icon": "chevron_right",
|
|
2580
2616
|
"aria-label": e.nextLabel || void 0,
|
|
2581
2617
|
disabled: e.currentPage >= i.value,
|
|
2582
|
-
onClick:
|
|
2618
|
+
onClick: f[1] || (f[1] = (r) => E(e.currentPage + 1))
|
|
2583
2619
|
}, null, 8, ["aria-label", "disabled"])
|
|
2584
2620
|
]),
|
|
2585
2621
|
s("select", {
|
|
2586
2622
|
class: "ds-paginator__page-size",
|
|
2587
2623
|
"aria-label": e.pageSizeLabel || void 0,
|
|
2588
2624
|
value: e.pageSize,
|
|
2589
|
-
onChange:
|
|
2625
|
+
onChange: v
|
|
2590
2626
|
}, [
|
|
2591
|
-
(a(!0), l(
|
|
2592
|
-
key:
|
|
2593
|
-
value:
|
|
2594
|
-
},
|
|
2595
|
-
], 40,
|
|
2596
|
-
], 8,
|
|
2627
|
+
(a(!0), l(H, null, Q(e.pageSizes, (r) => (a(), l("option", {
|
|
2628
|
+
key: r,
|
|
2629
|
+
value: r
|
|
2630
|
+
}, w(r) + w(e.pageSizeSuffix), 9, Ii))), 128))
|
|
2631
|
+
], 40, Ci)
|
|
2632
|
+
], 8, Ti));
|
|
2597
2633
|
}
|
|
2598
|
-
}),
|
|
2599
|
-
class: "ds-menu-item__icon material-
|
|
2634
|
+
}), Tn = /* @__PURE__ */ O(Ai, [["__scopeId", "data-v-a42e7bb4"]]), Ni = ["aria-current", "title"], Bi = {
|
|
2635
|
+
class: "ds-menu-item__icon material-symbols-filled",
|
|
2600
2636
|
"aria-hidden": "true"
|
|
2601
|
-
},
|
|
2637
|
+
}, Oi = {
|
|
2602
2638
|
key: 0,
|
|
2603
2639
|
class: "ds-menu-item__label"
|
|
2604
|
-
},
|
|
2640
|
+
}, xi = /* @__PURE__ */ B({
|
|
2605
2641
|
__name: "DsMenuItem",
|
|
2606
2642
|
props: {
|
|
2607
|
-
// Material
|
|
2643
|
+
// Material Symbols ligature name (rendered via <i class="material-symbols-filled">).
|
|
2608
2644
|
icon: { type: String, required: !0 },
|
|
2609
2645
|
// Row label; a default slot overrides it. Hidden (not removed) when collapsed.
|
|
2610
2646
|
text: { type: String, default: "" },
|
|
@@ -2613,28 +2649,28 @@ const ge = {
|
|
|
2613
2649
|
// Icon-only collapsed rail.
|
|
2614
2650
|
collapsed: Boolean
|
|
2615
2651
|
},
|
|
2616
|
-
emits: [
|
|
2652
|
+
emits: [Ke],
|
|
2617
2653
|
setup(e, { emit: n }) {
|
|
2618
2654
|
const t = n;
|
|
2619
2655
|
function o(i) {
|
|
2620
|
-
t(
|
|
2656
|
+
t(Ke, i);
|
|
2621
2657
|
}
|
|
2622
|
-
return (i,
|
|
2658
|
+
return (i, d) => (a(), l("button", {
|
|
2623
2659
|
type: "button",
|
|
2624
|
-
class:
|
|
2660
|
+
class: L(["ds-menu-item", { "is-active": e.active, "is-collapsed": e.collapsed }]),
|
|
2625
2661
|
"aria-current": e.active ? "page" : void 0,
|
|
2626
2662
|
title: e.text || void 0,
|
|
2627
2663
|
onClick: o
|
|
2628
2664
|
}, [
|
|
2629
|
-
s("i",
|
|
2630
|
-
e.text || i.$slots.default ? (a(), l("span",
|
|
2631
|
-
|
|
2632
|
-
|
|
2665
|
+
s("i", Bi, w(e.icon), 1),
|
|
2666
|
+
e.text || i.$slots.default ? (a(), l("span", Oi, [
|
|
2667
|
+
C(i.$slots, "default", {}, () => [
|
|
2668
|
+
q(w(e.text), 1)
|
|
2633
2669
|
], !0)
|
|
2634
|
-
])) :
|
|
2635
|
-
], 10,
|
|
2670
|
+
])) : g("", !0)
|
|
2671
|
+
], 10, Ni));
|
|
2636
2672
|
}
|
|
2637
|
-
}),
|
|
2673
|
+
}), En = /* @__PURE__ */ O(xi, [["__scopeId", "data-v-374c4426"]]), ce = {
|
|
2638
2674
|
ACTIVE: "active",
|
|
2639
2675
|
// current step — accent-tint chip, filled marker
|
|
2640
2676
|
COMPLETED: "completed",
|
|
@@ -2643,10 +2679,10 @@ const ge = {
|
|
|
2643
2679
|
// visited but unfinished — red "!" chip
|
|
2644
2680
|
NEUTRAL: "neutral"
|
|
2645
2681
|
// upcoming — outlined marker
|
|
2646
|
-
},
|
|
2682
|
+
}, Mi = { class: "ds-wizard-stepper" }, Pi = { class: "ds-wizard-stepper__steps" }, zi = {
|
|
2647
2683
|
class: "ds-wizard-step__marker",
|
|
2648
2684
|
"aria-hidden": "true"
|
|
2649
|
-
},
|
|
2685
|
+
}, Fi = { class: "ds-wizard-step__label" }, Vi = /* @__PURE__ */ B({
|
|
2650
2686
|
__name: "DsWizardStepper",
|
|
2651
2687
|
props: {
|
|
2652
2688
|
steps: { type: Array, default: () => [] },
|
|
@@ -2658,132 +2694,423 @@ const ge = {
|
|
|
2658
2694
|
// Whether the step chips are interactive (advance buttons are always active).
|
|
2659
2695
|
clickable: { type: Boolean, default: !0 }
|
|
2660
2696
|
},
|
|
2661
|
-
emits: [
|
|
2697
|
+
emits: [Ae, Ye],
|
|
2662
2698
|
setup(e, { emit: n }) {
|
|
2663
|
-
const t = e, o = n, i =
|
|
2664
|
-
() => t.steps.map((
|
|
2665
|
-
var
|
|
2666
|
-
const
|
|
2667
|
-
let
|
|
2668
|
-
return
|
|
2669
|
-
key: (
|
|
2670
|
-
index:
|
|
2671
|
-
label:
|
|
2672
|
-
state:
|
|
2673
|
-
current:
|
|
2674
|
-
marker:
|
|
2699
|
+
const t = e, o = n, i = k(() => t.value === t.steps.length), d = k(
|
|
2700
|
+
() => t.steps.map((f, r) => {
|
|
2701
|
+
var p;
|
|
2702
|
+
const c = r + 1;
|
|
2703
|
+
let m;
|
|
2704
|
+
return c === t.value ? m = ce.ACTIVE : f.completed ? m = ce.COMPLETED : f.visited ? m = ce.INCOMPLETE : c < t.value ? m = ce.COMPLETED : m = ce.NEUTRAL, {
|
|
2705
|
+
key: (p = f.key) != null ? p : c,
|
|
2706
|
+
index: c,
|
|
2707
|
+
label: f.label,
|
|
2708
|
+
state: m,
|
|
2709
|
+
current: m === ce.ACTIVE,
|
|
2710
|
+
marker: m === ce.INCOMPLETE ? "!" : String(c)
|
|
2675
2711
|
};
|
|
2676
2712
|
})
|
|
2677
2713
|
);
|
|
2678
|
-
function
|
|
2679
|
-
t.clickable && o(
|
|
2714
|
+
function E(f) {
|
|
2715
|
+
t.clickable && o(Ae, f);
|
|
2680
2716
|
}
|
|
2681
|
-
function
|
|
2682
|
-
t.value < t.steps.length && o(
|
|
2717
|
+
function v() {
|
|
2718
|
+
t.value < t.steps.length && o(Ae, t.value + 1);
|
|
2683
2719
|
}
|
|
2684
2720
|
function y() {
|
|
2685
|
-
o(
|
|
2721
|
+
o(Ye);
|
|
2686
2722
|
}
|
|
2687
|
-
return (
|
|
2688
|
-
s("ol",
|
|
2689
|
-
(a(!0), l(
|
|
2690
|
-
key:
|
|
2723
|
+
return (f, r) => (a(), l("div", Mi, [
|
|
2724
|
+
s("ol", Pi, [
|
|
2725
|
+
(a(!0), l(H, null, Q(d.value, (c) => (a(), l("li", {
|
|
2726
|
+
key: c.key,
|
|
2691
2727
|
class: "ds-wizard-stepper__item"
|
|
2692
2728
|
}, [
|
|
2693
|
-
(a(),
|
|
2729
|
+
(a(), K(pt(e.clickable ? "button" : "div"), {
|
|
2694
2730
|
type: e.clickable ? "button" : void 0,
|
|
2695
|
-
class:
|
|
2696
|
-
"aria-current":
|
|
2697
|
-
onClick: (
|
|
2731
|
+
class: L(["ds-wizard-step", [`ds-wizard-step--${c.state}`, { "is-clickable": e.clickable }]]),
|
|
2732
|
+
"aria-current": c.current ? "step" : void 0,
|
|
2733
|
+
onClick: (m) => E(c.index)
|
|
2698
2734
|
}, {
|
|
2699
2735
|
default: ie(() => [
|
|
2700
|
-
s("span",
|
|
2701
|
-
s("span",
|
|
2736
|
+
s("span", zi, w(c.marker), 1),
|
|
2737
|
+
s("span", Fi, w(c.label), 1)
|
|
2702
2738
|
]),
|
|
2703
2739
|
_: 2
|
|
2704
2740
|
}, 1032, ["type", "class", "aria-current", "onClick"]))
|
|
2705
2741
|
]))), 128))
|
|
2706
2742
|
]),
|
|
2707
|
-
!i.value && e.nextLabel ? (a(),
|
|
2743
|
+
!i.value && e.nextLabel ? (a(), K(D(fe), {
|
|
2708
2744
|
key: 0,
|
|
2709
2745
|
variant: "primary",
|
|
2710
2746
|
size: "large",
|
|
2711
2747
|
"right-icon": "keyboard_arrow_right",
|
|
2712
|
-
onClick:
|
|
2748
|
+
onClick: v
|
|
2713
2749
|
}, {
|
|
2714
2750
|
default: ie(() => [
|
|
2715
|
-
|
|
2751
|
+
q(w(e.nextLabel), 1)
|
|
2716
2752
|
]),
|
|
2717
2753
|
_: 1
|
|
2718
|
-
})) :
|
|
2719
|
-
i.value && e.finalStepLabel ? (a(),
|
|
2754
|
+
})) : g("", !0),
|
|
2755
|
+
i.value && e.finalStepLabel ? (a(), K(D(fe), {
|
|
2720
2756
|
key: 1,
|
|
2721
2757
|
variant: "primary",
|
|
2722
2758
|
size: "large",
|
|
2723
2759
|
onClick: y
|
|
2724
2760
|
}, {
|
|
2725
2761
|
default: ie(() => [
|
|
2726
|
-
|
|
2762
|
+
q(w(e.finalStepLabel), 1)
|
|
2727
2763
|
]),
|
|
2728
2764
|
_: 1
|
|
2729
|
-
})) :
|
|
2765
|
+
})) : g("", !0)
|
|
2730
2766
|
]));
|
|
2731
2767
|
}
|
|
2732
|
-
}),
|
|
2768
|
+
}), wn = /* @__PURE__ */ O(Vi, [["__scopeId", "data-v-d6f1e6d7"]]), it = {
|
|
2769
|
+
/** Right-to-left: panel pinned to the right edge, ring on its left border. */
|
|
2770
|
+
RTL: "rtl",
|
|
2771
|
+
/** Left-to-right: panel pinned to the left edge, ring on its right border. */
|
|
2772
|
+
LTR: "ltr"
|
|
2773
|
+
}, Ui = ["aria-modal", "aria-labelledby", "aria-label"], Gi = {
|
|
2774
|
+
key: 1,
|
|
2775
|
+
class: "ds-drawer__header"
|
|
2776
|
+
}, Hi = ["id"], Wi = {
|
|
2777
|
+
key: 0,
|
|
2778
|
+
class: "ds-drawer__controls"
|
|
2779
|
+
}, Ki = {
|
|
2780
|
+
key: 0,
|
|
2781
|
+
class: "ds-drawer__actions"
|
|
2782
|
+
}, Yi = ["aria-label"], qi = { class: "ds-drawer__body" }, ji = {
|
|
2783
|
+
key: 2,
|
|
2784
|
+
class: "ds-drawer__footer"
|
|
2785
|
+
}, Xi = /* @__PURE__ */ B({
|
|
2786
|
+
__name: "DsDrawer",
|
|
2787
|
+
props: {
|
|
2788
|
+
open: Boolean,
|
|
2789
|
+
title: { type: String, default: "" },
|
|
2790
|
+
showClose: { type: Boolean, default: !0 },
|
|
2791
|
+
// Accessible name for the icon-only close button; English default (app owns i18n),
|
|
2792
|
+
// matching DsModal so the control is never unnamed.
|
|
2793
|
+
closeLabel: { type: String, default: "Close" },
|
|
2794
|
+
direction: {
|
|
2795
|
+
type: String,
|
|
2796
|
+
default: it.RTL
|
|
2797
|
+
},
|
|
2798
|
+
// Width in px (a number, not a CSS length): the drag math and the min/max bounds
|
|
2799
|
+
// are numeric, and the consumer's stored width is a number too.
|
|
2800
|
+
width: { type: Number, default: 440 },
|
|
2801
|
+
resizable: Boolean,
|
|
2802
|
+
minWidth: { type: Number, default: 360 },
|
|
2803
|
+
maxWidth: { type: Number, default: 720 },
|
|
2804
|
+
closeOnOverlay: { type: Boolean, default: !0 },
|
|
2805
|
+
closeOnEscape: { type: Boolean, default: !0 },
|
|
2806
|
+
// Cancelable close guard: return false to keep the drawer open. Gates Escape,
|
|
2807
|
+
// the overlay click and the × button alike.
|
|
2808
|
+
beforeClose: { type: Function, default: null },
|
|
2809
|
+
// false = render in-flow (no portal / backdrop / scroll-lock) for specimen cards.
|
|
2810
|
+
fixed: { type: Boolean, default: !0 }
|
|
2811
|
+
},
|
|
2812
|
+
emits: [J, je, Xe, Ze],
|
|
2813
|
+
setup(e, { emit: n }) {
|
|
2814
|
+
const t = e, o = n, i = V(null);
|
|
2815
|
+
let d = null;
|
|
2816
|
+
const E = he(), v = ge(), y = k(() => t.title && !E.header ? v : void 0), f = (u) => Math.min(Math.max(u, t.minWidth), Math.max(t.minWidth, t.maxWidth)), r = V(f(t.width));
|
|
2817
|
+
Z(
|
|
2818
|
+
() => [t.width, t.minWidth, t.maxWidth],
|
|
2819
|
+
() => {
|
|
2820
|
+
N.value || (r.value = f(t.width));
|
|
2821
|
+
}
|
|
2822
|
+
);
|
|
2823
|
+
const c = k(() => ({ width: `${r.value}px` }));
|
|
2824
|
+
async function m() {
|
|
2825
|
+
t.beforeClose && await t.beforeClose() === !1 || o(J);
|
|
2826
|
+
}
|
|
2827
|
+
let p = !1;
|
|
2828
|
+
function T() {
|
|
2829
|
+
if (p) {
|
|
2830
|
+
p = !1;
|
|
2831
|
+
return;
|
|
2832
|
+
}
|
|
2833
|
+
t.fixed && t.closeOnOverlay && m();
|
|
2834
|
+
}
|
|
2835
|
+
const N = V(!1);
|
|
2836
|
+
let _ = 0, $ = 0;
|
|
2837
|
+
function A(u) {
|
|
2838
|
+
const S = u.clientX - _, x = t.direction === it.RTL ? $ - S : $ + S;
|
|
2839
|
+
return f(x);
|
|
2840
|
+
}
|
|
2841
|
+
function F(u) {
|
|
2842
|
+
t.resizable && (N.value = !0, _ = u.clientX, $ = r.value, document.addEventListener("pointermove", W), document.addEventListener("pointerup", ee), document.addEventListener("pointercancel", ee), o(je, r.value));
|
|
2843
|
+
}
|
|
2844
|
+
function W(u) {
|
|
2845
|
+
N.value && (r.value = A(u), o(Xe, r.value));
|
|
2846
|
+
}
|
|
2847
|
+
function ee() {
|
|
2848
|
+
N.value && (G(), N.value = !1, p = !0, setTimeout(() => p = !1, 0), o(Ze, r.value));
|
|
2849
|
+
}
|
|
2850
|
+
function G() {
|
|
2851
|
+
document.removeEventListener("pointermove", W), document.removeEventListener("pointerup", ee), document.removeEventListener("pointercancel", ee);
|
|
2852
|
+
}
|
|
2853
|
+
function M() {
|
|
2854
|
+
return i.value ? Array.from(i.value.querySelectorAll('a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])')).filter(
|
|
2855
|
+
(S) => !S.closest("[hidden]") && S.getAttribute("aria-hidden") !== "true"
|
|
2856
|
+
) : [];
|
|
2857
|
+
}
|
|
2858
|
+
function j(u) {
|
|
2859
|
+
var re;
|
|
2860
|
+
if (u.key === "Escape") {
|
|
2861
|
+
t.closeOnEscape && m();
|
|
2862
|
+
return;
|
|
2863
|
+
}
|
|
2864
|
+
if (u.key !== "Tab") return;
|
|
2865
|
+
const S = M();
|
|
2866
|
+
if (S.length === 0) {
|
|
2867
|
+
u.preventDefault(), (re = i.value) == null || re.focus();
|
|
2868
|
+
return;
|
|
2869
|
+
}
|
|
2870
|
+
const x = S[0], le = S[S.length - 1];
|
|
2871
|
+
u.shiftKey && document.activeElement === x ? (u.preventDefault(), le.focus()) : !u.shiftKey && document.activeElement === le && (u.preventDefault(), x.focus());
|
|
2872
|
+
}
|
|
2873
|
+
function b() {
|
|
2874
|
+
d = document.activeElement, document.addEventListener("keydown", j), document.body.style.overflow = "hidden", se(() => {
|
|
2875
|
+
var u, S;
|
|
2876
|
+
return (S = (u = M()[0]) != null ? u : i.value) == null ? void 0 : S.focus();
|
|
2877
|
+
});
|
|
2878
|
+
}
|
|
2879
|
+
function R(u = !0) {
|
|
2880
|
+
var S;
|
|
2881
|
+
document.removeEventListener("keydown", j), document.body.style.overflow = "", u && ((S = d == null ? void 0 : d.focus) == null || S.call(d));
|
|
2882
|
+
}
|
|
2883
|
+
return Z(
|
|
2884
|
+
() => t.open && t.fixed,
|
|
2885
|
+
(u, S) => {
|
|
2886
|
+
typeof document != "undefined" && (u ? b() : S && R());
|
|
2887
|
+
},
|
|
2888
|
+
{ immediate: !0 }
|
|
2889
|
+
), de(() => {
|
|
2890
|
+
typeof document != "undefined" && (G(), R(!1));
|
|
2891
|
+
}), (u, S) => (a(), K(Pe, {
|
|
2892
|
+
to: "body",
|
|
2893
|
+
disabled: !e.fixed
|
|
2894
|
+
}, [
|
|
2895
|
+
Y(me, {
|
|
2896
|
+
name: `ds-drawer-${e.direction}`
|
|
2897
|
+
}, {
|
|
2898
|
+
default: ie(() => [
|
|
2899
|
+
e.open ? (a(), l("div", {
|
|
2900
|
+
key: 0,
|
|
2901
|
+
class: L(["ds-drawer", [`ds-drawer--${e.direction}`, { "is-fixed": e.fixed, "is-resizing": N.value }]]),
|
|
2902
|
+
onClick: ue(T, ["self"])
|
|
2903
|
+
}, [
|
|
2904
|
+
s("aside", {
|
|
2905
|
+
ref_key: "panelRef",
|
|
2906
|
+
ref: i,
|
|
2907
|
+
class: "ds-drawer__panel",
|
|
2908
|
+
role: "dialog",
|
|
2909
|
+
"aria-modal": e.fixed ? "true" : "false",
|
|
2910
|
+
"aria-labelledby": y.value,
|
|
2911
|
+
"aria-label": y.value ? void 0 : "drawer",
|
|
2912
|
+
tabindex: "-1",
|
|
2913
|
+
style: U(c.value)
|
|
2914
|
+
}, [
|
|
2915
|
+
e.resizable ? (a(), l("div", {
|
|
2916
|
+
key: 0,
|
|
2917
|
+
class: "ds-drawer__dragger",
|
|
2918
|
+
"aria-hidden": "true",
|
|
2919
|
+
onPointerdown: ue(F, ["stop", "prevent"])
|
|
2920
|
+
}, null, 32)) : g("", !0),
|
|
2921
|
+
e.title || e.showClose || u.$slots.header || u.$slots.actions ? (a(), l("header", Gi, [
|
|
2922
|
+
C(u.$slots, "header", {}, () => [
|
|
2923
|
+
s("h4", {
|
|
2924
|
+
id: D(v),
|
|
2925
|
+
class: "ds-drawer__title"
|
|
2926
|
+
}, w(e.title), 9, Hi)
|
|
2927
|
+
], !0),
|
|
2928
|
+
e.showClose || u.$slots.actions ? (a(), l("div", Wi, [
|
|
2929
|
+
u.$slots.actions ? (a(), l("div", Ki, [
|
|
2930
|
+
C(u.$slots, "actions", {}, void 0, !0)
|
|
2931
|
+
])) : g("", !0),
|
|
2932
|
+
e.showClose ? (a(), l("button", {
|
|
2933
|
+
key: 1,
|
|
2934
|
+
type: "button",
|
|
2935
|
+
class: "ds-drawer__close",
|
|
2936
|
+
"aria-label": e.closeLabel || void 0,
|
|
2937
|
+
onClick: m
|
|
2938
|
+
}, [...S[0] || (S[0] = [
|
|
2939
|
+
s("i", {
|
|
2940
|
+
class: "material-symbols-filled",
|
|
2941
|
+
"aria-hidden": "true"
|
|
2942
|
+
}, "close", -1)
|
|
2943
|
+
])], 8, Yi)) : g("", !0)
|
|
2944
|
+
])) : g("", !0)
|
|
2945
|
+
])) : g("", !0),
|
|
2946
|
+
s("div", qi, [
|
|
2947
|
+
C(u.$slots, "default", {}, void 0, !0)
|
|
2948
|
+
]),
|
|
2949
|
+
u.$slots.footer ? (a(), l("footer", ji, [
|
|
2950
|
+
C(u.$slots, "footer", {}, void 0, !0)
|
|
2951
|
+
])) : g("", !0)
|
|
2952
|
+
], 12, Ui)
|
|
2953
|
+
], 2)) : g("", !0)
|
|
2954
|
+
]),
|
|
2955
|
+
_: 3
|
|
2956
|
+
}, 8, ["name"])
|
|
2957
|
+
], 8, ["disabled"]));
|
|
2958
|
+
}
|
|
2959
|
+
}), Ln = /* @__PURE__ */ O(Xi, [["__scopeId", "data-v-b912d1e5"]]), Zi = {
|
|
2960
|
+
TOP: "top",
|
|
2961
|
+
TOP_START: "top-start",
|
|
2962
|
+
TOP_END: "top-end",
|
|
2963
|
+
BOTTOM: "bottom",
|
|
2964
|
+
BOTTOM_START: "bottom-start",
|
|
2965
|
+
BOTTOM_END: "bottom-end",
|
|
2966
|
+
LEFT: "left",
|
|
2967
|
+
LEFT_START: "left-start",
|
|
2968
|
+
LEFT_END: "left-end",
|
|
2969
|
+
RIGHT: "right",
|
|
2970
|
+
RIGHT_START: "right-start",
|
|
2971
|
+
RIGHT_END: "right-end"
|
|
2972
|
+
}, Qi = ["id"], Ji = /* @__PURE__ */ B({
|
|
2973
|
+
__name: "DsPopover",
|
|
2974
|
+
props: {
|
|
2975
|
+
open: Boolean,
|
|
2976
|
+
placement: {
|
|
2977
|
+
type: String,
|
|
2978
|
+
default: Zi.BOTTOM
|
|
2979
|
+
},
|
|
2980
|
+
// Panel width (any CSS length). Empty = fit content.
|
|
2981
|
+
width: { type: String, default: "" },
|
|
2982
|
+
closeOnEscape: { type: Boolean, default: !0 },
|
|
2983
|
+
closeOnOutside: { type: Boolean, default: !0 },
|
|
2984
|
+
// Let the trigger slot toggle the panel. Off when the consumer drives `open` itself.
|
|
2985
|
+
triggerOnClick: { type: Boolean, default: !0 }
|
|
2986
|
+
},
|
|
2987
|
+
emits: [Ne],
|
|
2988
|
+
setup(e, { emit: n }) {
|
|
2989
|
+
const t = e, o = n, i = V(null), d = V(null), E = ge(), {
|
|
2990
|
+
shiftStyle: v,
|
|
2991
|
+
activate: y,
|
|
2992
|
+
deactivate: f
|
|
2993
|
+
} = dt(d, () => t.placement), r = k(() => {
|
|
2994
|
+
const _ = { ...t.width ? { width: t.width } : {}, ...v.value };
|
|
2995
|
+
return Object.keys(_).length > 0 ? _ : void 0;
|
|
2996
|
+
});
|
|
2997
|
+
let c = null;
|
|
2998
|
+
function m() {
|
|
2999
|
+
o(Ne, !1);
|
|
3000
|
+
}
|
|
3001
|
+
function p() {
|
|
3002
|
+
t.triggerOnClick && o(Ne, !t.open);
|
|
3003
|
+
}
|
|
3004
|
+
function T() {
|
|
3005
|
+
t.closeOnEscape && t.open && m();
|
|
3006
|
+
}
|
|
3007
|
+
function N(_) {
|
|
3008
|
+
var A;
|
|
3009
|
+
const $ = _.target;
|
|
3010
|
+
!$ || (A = i.value) != null && A.contains($) || m();
|
|
3011
|
+
}
|
|
3012
|
+
return Z(
|
|
3013
|
+
() => t.open,
|
|
3014
|
+
(_, $) => {
|
|
3015
|
+
var A;
|
|
3016
|
+
typeof document != "undefined" && (_ ? (c = document.activeElement, t.closeOnOutside && document.addEventListener("mousedown", N), se(() => {
|
|
3017
|
+
var F, W;
|
|
3018
|
+
(W = (F = d.value) == null ? void 0 : F.focus) == null || W.call(F, { preventScroll: !0 }), y();
|
|
3019
|
+
})) : $ && (document.removeEventListener("mousedown", N), f(), (A = c == null ? void 0 : c.focus) == null || A.call(c, { preventScroll: !0 })));
|
|
3020
|
+
},
|
|
3021
|
+
{ immediate: !0 }
|
|
3022
|
+
), de(() => {
|
|
3023
|
+
typeof document != "undefined" && (document.removeEventListener("mousedown", N), f());
|
|
3024
|
+
}), (_, $) => (a(), l("div", {
|
|
3025
|
+
ref_key: "rootRef",
|
|
3026
|
+
ref: i,
|
|
3027
|
+
class: "ds-popover",
|
|
3028
|
+
onKeydown: st(T, ["esc"])
|
|
3029
|
+
}, [
|
|
3030
|
+
s("div", {
|
|
3031
|
+
class: "ds-popover__trigger",
|
|
3032
|
+
onClick: p
|
|
3033
|
+
}, [
|
|
3034
|
+
C(_.$slots, "trigger", {}, void 0, !0)
|
|
3035
|
+
]),
|
|
3036
|
+
Y(me, { name: "ds-popover-fade" }, {
|
|
3037
|
+
default: ie(() => [
|
|
3038
|
+
e.open ? (a(), l("div", {
|
|
3039
|
+
key: 0,
|
|
3040
|
+
id: D(E),
|
|
3041
|
+
ref_key: "panelRef",
|
|
3042
|
+
ref: d,
|
|
3043
|
+
class: L(["ds-popover__panel", `ds-popover__panel--${e.placement}`]),
|
|
3044
|
+
role: "dialog",
|
|
3045
|
+
tabindex: "-1",
|
|
3046
|
+
style: U(r.value)
|
|
3047
|
+
}, [
|
|
3048
|
+
C(_.$slots, "default", {}, void 0, !0)
|
|
3049
|
+
], 14, Qi)) : g("", !0)
|
|
3050
|
+
]),
|
|
3051
|
+
_: 3
|
|
3052
|
+
})
|
|
3053
|
+
], 544));
|
|
3054
|
+
}
|
|
3055
|
+
}), _n = /* @__PURE__ */ O(Ji, [["__scopeId", "data-v-ec70dca4"]]);
|
|
2733
3056
|
export {
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
3057
|
+
pa as DS_ALERT_EFFECTS,
|
|
3058
|
+
Sa as DS_ALERT_ICONS,
|
|
3059
|
+
ga as DS_ALERT_TYPES,
|
|
3060
|
+
xe as DS_BADGE_TONES,
|
|
3061
|
+
$t as DS_BUTTON_NATIVE_TYPES,
|
|
3062
|
+
Qe as DS_BUTTON_SIZES,
|
|
3063
|
+
Be as DS_BUTTON_VARIANTS,
|
|
3064
|
+
ei as DS_CUSTOM_TAG_TYPES,
|
|
3065
|
+
it as DS_DRAWER_DIRECTIONS,
|
|
3066
|
+
ia as DS_INPUT_SIZES,
|
|
3067
|
+
be as DS_INPUT_TYPES,
|
|
3068
|
+
Ca as DS_NOTIFICATION_ICONS,
|
|
3069
|
+
et as DS_NOTIFICATION_LINK_TARGETS,
|
|
3070
|
+
_a as DS_NOTIFICATION_POSITIONS,
|
|
3071
|
+
La as DS_NOTIFICATION_TYPES,
|
|
3072
|
+
Zi as DS_POPOVER_PLACEMENTS,
|
|
3073
|
+
at as DS_SELECT_TYPES,
|
|
3074
|
+
lt as DS_SELECT_WIDTHS,
|
|
3075
|
+
De as DS_SPINNER_SIZES,
|
|
3076
|
+
$e as DS_SPINNER_TONES,
|
|
3077
|
+
Je as DS_TABLE_ALIGN,
|
|
3078
|
+
ne as DS_TABLE_PIN,
|
|
3079
|
+
Rt as DS_TAG_TONES,
|
|
3080
|
+
Ga as DS_TOOLTIP_PLACEMENTS,
|
|
3081
|
+
Oe as DS_VERIFICATION_STATES,
|
|
3082
|
+
ce as DS_WIZARD_STEP_STATES,
|
|
3083
|
+
on as DsAlert,
|
|
3084
|
+
an as DsAvatar,
|
|
3085
|
+
xt as DsBadge,
|
|
3086
|
+
fe as DsButton,
|
|
3087
|
+
hn as DsCell,
|
|
3088
|
+
ot as DsCheckbox,
|
|
3089
|
+
tt as DsContactValue,
|
|
3090
|
+
gn as DsCustomTag,
|
|
3091
|
+
un as DsDataCard,
|
|
3092
|
+
Ln as DsDrawer,
|
|
3093
|
+
$n as DsEmptyState,
|
|
3094
|
+
nn as DsInput,
|
|
3095
|
+
bn as DsItemSelectorButton,
|
|
3096
|
+
En as DsMenuItem,
|
|
3097
|
+
rn as DsModal,
|
|
3098
|
+
dn as DsNotification,
|
|
3099
|
+
Tn as DsPaginator,
|
|
3100
|
+
pn as DsPill,
|
|
3101
|
+
Sn as DsPillWithBorder,
|
|
3102
|
+
_n as DsPopover,
|
|
3103
|
+
fn as DsRadio,
|
|
3104
|
+
mn as DsRow,
|
|
3105
|
+
kn as DsSegmentedProgressBar,
|
|
3106
|
+
yn as DsSelect,
|
|
3107
|
+
ye as DsSpinner,
|
|
3108
|
+
vn as DsSwitch,
|
|
3109
|
+
ln as DsTable,
|
|
3110
|
+
tn as DsTag,
|
|
3111
|
+
sn as DsTextarea,
|
|
3112
|
+
cn as DsTooltip,
|
|
3113
|
+
qa as DsVerificationIcon,
|
|
3114
|
+
wn as DsWizardStepper
|
|
2788
3115
|
};
|
|
2789
3116
|
//# sourceMappingURL=index.es.js.map
|