@salesql/sql_components_vue3 2.1.1 → 3.1.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 +7 -3
- package/dist/composables/useViewportClamp.d.ts +16 -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 -1
- package/dist/index.es.js +1331 -1016
- package/dist/index.es.js.map +1 -1
- package/dist/reset.css +1 -0
- 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/DsPopover/DsPopover.types.d.ts +20 -0
- package/dist/ui/DsPopover/DsPopover.vue.d.ts +71 -0
- package/dist/ui/DsPopover/index.d.ts +2 -0
- package/dist/ui/DsTextarea/DsTextarea.vue.d.ts +1 -1
- package/llms-full.txt +167 -2
- package/llms.txt +2 -0
- package/package.json +3 -2
package/dist/index.es.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const
|
|
1
|
+
import { defineComponent as B, computed as S, 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 _, toDisplayString as T, withModifiers as ue, useModel as ve, ref as F, onMounted as nt, watch as Z, withDirectives as Me, vModelCheckbox as bt, createTextVNode as q, mergeModels as te, onBeforeUnmount as de, nextTick as se, createVNode as Y, Fragment as W, 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 = S(
|
|
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, r) => (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"]]), ee = "click", J = "close", we = "focus", Ee = "blur", ze = "change", Ve = "field-blur", Te = "copy", Le = "correct", Ce = "incorrect", Fe = "sort", Ue = "edit", Ge = "select-all", We = "page-change", He = "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,33 +82,33 @@ 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
|
+
}, wt = ["type", "disabled", "autofocus", "aria-busy", "aria-disabled", "aria-pressed", "aria-label"], Et = ["aria-hidden"], Tt = {
|
|
90
90
|
key: 0,
|
|
91
91
|
class: "ds-button__icon ds-button__icon--leading"
|
|
92
|
-
},
|
|
92
|
+
}, Lt = {
|
|
93
93
|
class: "material-icons",
|
|
94
94
|
"aria-hidden": "true"
|
|
95
|
-
},
|
|
95
|
+
}, Ct = {
|
|
96
96
|
key: 1,
|
|
97
97
|
class: "ds-button__label"
|
|
98
|
-
},
|
|
98
|
+
}, _t = {
|
|
99
99
|
key: 2,
|
|
100
100
|
class: "ds-button__icon ds-button__icon--trailing"
|
|
101
|
-
},
|
|
101
|
+
}, It = {
|
|
102
102
|
class: "material-icons",
|
|
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
113
|
// Material Icon names (rendered via <i class="material-icons">); a leading/
|
|
114
114
|
// trailing slot overrides. Icon-only buttons (circle/square) need ariaLabel.
|
|
@@ -129,16 +129,16 @@ const ge = {
|
|
|
129
129
|
selected: Boolean,
|
|
130
130
|
autofocus: Boolean
|
|
131
131
|
},
|
|
132
|
-
emits: [
|
|
132
|
+
emits: [ee],
|
|
133
133
|
setup(e, { emit: n }) {
|
|
134
|
-
const t = e, o = n, i =
|
|
135
|
-
() => t.variant ===
|
|
134
|
+
const t = e, o = n, i = S(() => t.size === Qe.SMALL ? 14 : 20), r = S(
|
|
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(f) {
|
|
138
|
+
t.disabled || t.loading || o(ee, f);
|
|
139
139
|
}
|
|
140
140
|
return (f, y) => (a(), l("button", {
|
|
141
|
-
class:
|
|
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: r.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 || f.$slots.leading ? (a(), l("span",
|
|
173
|
-
|
|
174
|
-
s("i",
|
|
172
|
+
e.leftIcon || f.$slots.leading ? (a(), l("span", Tt, [
|
|
173
|
+
_(f.$slots, "leading", {}, () => [
|
|
174
|
+
s("i", Lt, T(e.leftIcon), 1)
|
|
175
175
|
], !0)
|
|
176
|
-
])) :
|
|
177
|
-
f.$slots.default && !e.circle && !e.square ? (a(), l("span",
|
|
178
|
-
|
|
179
|
-
])) :
|
|
180
|
-
e.rightIcon || f.$slots.trailing ? (a(), l("span",
|
|
181
|
-
|
|
182
|
-
s("i",
|
|
176
|
+
])) : g("", !0),
|
|
177
|
+
f.$slots.default && !e.circle && !e.square ? (a(), l("span", Ct, [
|
|
178
|
+
_(f.$slots, "default", {}, void 0, !0)
|
|
179
|
+
])) : g("", !0),
|
|
180
|
+
e.rightIcon || f.$slots.trailing ? (a(), l("span", _t, [
|
|
181
|
+
_(f.$slots, "trailing", {}, () => [
|
|
182
|
+
s("i", It, T(e.rightIcon), 1)
|
|
183
183
|
], !0)
|
|
184
|
-
])) :
|
|
185
|
-
], 8,
|
|
186
|
-
], 10,
|
|
184
|
+
])) : g("", !0)
|
|
185
|
+
], 8, Et)
|
|
186
|
+
], 10, wt));
|
|
187
187
|
}
|
|
188
|
-
}),
|
|
188
|
+
}), fe = /* @__PURE__ */ O(Dt, [["__scopeId", "data-v-61354b19"]]), 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
|
+
_(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((r) => t(D(J)), ["stop"]))
|
|
244
244
|
}, [...i[1] || (i[1] = [
|
|
245
245
|
s("i", {
|
|
246
246
|
class: "material-icons",
|
|
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-0540d9b3"]]), 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
|
+
_(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 =
|
|
306
|
+
const n = e, t = S(() => n.letters ? n.letters : n.firstName && n.lastName ? (n.firstName.charAt(0) + n.lastName.charAt(0)).toUpperCase() : ""), o = S(() => `${n.firstName} ${n.lastName}`.trim() || n.letters), i = S(() => {
|
|
307
307
|
var d;
|
|
308
308
|
return (d = n.alt) != null ? d : o.value;
|
|
309
|
-
}),
|
|
309
|
+
}), r = S(() => {
|
|
310
310
|
var d;
|
|
311
311
|
return (d = n.width) != null ? d : n.size;
|
|
312
|
-
}),
|
|
312
|
+
}), E = S(() => {
|
|
313
313
|
var d;
|
|
314
314
|
return (d = n.height) != null ? d : n.size;
|
|
315
|
-
}), f =
|
|
315
|
+
}), f = S(() => ({ width: `${r.value}px`, height: `${E.value}px` })), y = S(
|
|
316
316
|
() => {
|
|
317
317
|
var d;
|
|
318
|
-
return (d = n.textSize) != null ? d : Math.round(Math.min(
|
|
318
|
+
return (d = n.textSize) != null ? d : Math.round(Math.min(r.value, E.value) * 0.4);
|
|
319
319
|
}
|
|
320
|
-
),
|
|
320
|
+
), v = S(() => {
|
|
321
321
|
const d = n.uid || n.firstName + n.lastName || n.letters;
|
|
322
|
-
let
|
|
323
|
-
for (let
|
|
324
|
-
|
|
325
|
-
const
|
|
326
|
-
for (let
|
|
327
|
-
const
|
|
328
|
-
return { bg: `rgb(${
|
|
322
|
+
let c = 0;
|
|
323
|
+
for (let w = 0; w < d.length; w++)
|
|
324
|
+
c = d.charCodeAt(w) + ((c << 5) - c), c = c & c;
|
|
325
|
+
const m = [0, 0, 0];
|
|
326
|
+
for (let w = 0; w < 3; w++) m[w] = c >> w * 8 & 255;
|
|
327
|
+
const k = m[0] >= 200 && m[1] >= 200 && m[2] >= 200;
|
|
328
|
+
return { bg: `rgb(${m[0]}, ${m[1]}, ${m[2]})`, fg: k ? "#323f4b" : "#fff" };
|
|
329
329
|
});
|
|
330
|
-
return (d,
|
|
330
|
+
return (d, 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(f.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:
|
|
341
|
+
style: U([
|
|
342
342
|
f.value,
|
|
343
343
|
{
|
|
344
|
-
background:
|
|
345
|
-
color:
|
|
344
|
+
background: v.value.bg,
|
|
345
|
+
color: v.value.fg,
|
|
346
346
|
fontSize: `${y.value}px`,
|
|
347
347
|
fontWeight: e.fontWeight
|
|
348
348
|
}
|
|
349
349
|
])
|
|
350
|
-
},
|
|
350
|
+
}, T(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(f.value),
|
|
354
354
|
"aria-hidden": "true"
|
|
355
355
|
}, null, 6));
|
|
356
356
|
}
|
|
357
|
-
}),
|
|
357
|
+
}), an = /* @__PURE__ */ O(zt, [["__scopeId", "data-v-4faae4da"]]), Vt = ["disabled", "name", "aria-label"], Ft = {
|
|
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
|
+
}, Wt = /* @__PURE__ */ B({
|
|
375
375
|
__name: "DsCheckbox",
|
|
376
|
-
props: /* @__PURE__ */
|
|
376
|
+
props: /* @__PURE__ */ te({
|
|
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 = F(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), (r, 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] = (f) => n.value = f),
|
|
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, Vt), [
|
|
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", Ft, [...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
|
+
r.$slots.default || e.label ? (a(), l("span", Gt, [
|
|
425
|
+
_(r.$slots, "default", {}, () => [
|
|
426
|
+
q(T(e.label), 1)
|
|
427
427
|
], !0)
|
|
428
|
-
])) :
|
|
428
|
+
])) : g("", !0)
|
|
429
429
|
], 2));
|
|
430
430
|
}
|
|
431
|
-
}),
|
|
431
|
+
}), ot = /* @__PURE__ */ O(Wt, [["__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
|
+
}, Ht = ["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 = S(
|
|
499
499
|
() => Math.max(1, t.headers.length + (t.selectable ? 1 : 0))
|
|
500
|
-
),
|
|
500
|
+
), r = S(
|
|
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 = S(
|
|
505
505
|
() => t.height == null ? void 0 : { height: typeof t.height == "number" ? `${t.height}px` : t.height }
|
|
506
506
|
);
|
|
507
|
-
function f(
|
|
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 f(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 v = S(() => {
|
|
516
|
+
const b = {};
|
|
517
|
+
let R = 0;
|
|
518
|
+
for (const p of t.columns)
|
|
519
|
+
p.pinned === ne.LEFT && (b[p.key] = { position: "sticky", left: `${R}px` }, R += y(p.width));
|
|
520
|
+
let u = 0;
|
|
521
|
+
for (let p = t.columns.length - 1; p >= 0; p--) {
|
|
522
|
+
const x = t.columns[p];
|
|
523
|
+
x.pinned === ne.RIGHT && (b[x.key] = { position: "sticky", right: `${u}px` }, u += y(x.width));
|
|
524
524
|
}
|
|
525
|
-
return
|
|
526
|
-
}), d =
|
|
527
|
-
const
|
|
528
|
-
return
|
|
525
|
+
return b;
|
|
526
|
+
}), d = S(() => {
|
|
527
|
+
const b = t.columns.filter((p) => p.pinned === ne.LEFT), R = t.columns.filter((p) => p.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": d.value.has(
|
|
534
|
+
[`ds-table__pin--${b.pinned}`]: !0,
|
|
535
|
+
"ds-table__pin--edge": d.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 = v.value[b.key], u = b.width ? { width: b.width } : void 0;
|
|
540
|
+
if (!(!R && !u))
|
|
541
|
+
return { ...u, ...R };
|
|
542
|
+
}
|
|
543
|
+
function k(b) {
|
|
544
|
+
const R = v.value[b.key];
|
|
545
|
+
if (R)
|
|
546
|
+
return b.width ? { ...R, width: b.width } : R;
|
|
547
|
+
}
|
|
548
|
+
const w = S(
|
|
549
|
+
() => t.headers.map((b) => typeof b == "string" ? { label: b } : b)
|
|
550
|
+
), N = S(() => {
|
|
551
|
+
const b = {}, R = w.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
|
-
}), C =
|
|
561
|
-
const
|
|
562
|
-
return
|
|
556
|
+
let p = 0;
|
|
557
|
+
for (let x = R.length - 1; x >= 0; x--)
|
|
558
|
+
R[x].pinned === ne.RIGHT && (b[x] = { position: "sticky", right: `${p}px` }, p += y(R[x].width));
|
|
559
|
+
return b;
|
|
560
|
+
}), C = S(() => {
|
|
561
|
+
const b = w.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), p = /* @__PURE__ */ new Set();
|
|
562
|
+
return R.length && p.add(R[R.length - 1].i), u.length && p.add(u[0].i), p;
|
|
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": C.value.has(
|
|
568
|
+
[`ds-table__pin--${b.pinned}`]: !0,
|
|
569
|
+
"ds-table__pin--edge": C.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], p = b.width ? { width: b.width } : void 0;
|
|
574
|
+
if (!(!u && !p))
|
|
575
|
+
return { ...p, ...u };
|
|
576
576
|
}
|
|
577
|
-
const
|
|
578
|
-
let
|
|
579
|
-
function
|
|
580
|
-
const
|
|
581
|
-
|
|
577
|
+
const V = F(null), H = F(!1), ae = F(!1);
|
|
578
|
+
let G = null;
|
|
579
|
+
function M() {
|
|
580
|
+
const b = V.value;
|
|
581
|
+
b && (H.value = b.scrollLeft > 0, ae.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
|
+
V,
|
|
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(V.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: V,
|
|
603
|
+
class: L(["ds-table__wrapper", { "is-scrolled-start": H.value, "is-scrolled-end": ae.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
614
|
"onUpdate:modelValue": f
|
|
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(W, null, Q(w.value, (u, p) => (a(), l("th", {
|
|
618
|
+
key: u.label,
|
|
619
|
+
class: L($(u, p)),
|
|
620
|
+
style: U(A(u, p))
|
|
621
|
+
}, T(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
|
+
_(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
|
+
])) : _(b.$slots, "default", { key: 1 }, void 0, !0)
|
|
638
638
|
])
|
|
639
639
|
])
|
|
640
640
|
], 6)
|
|
641
|
-
], 8,
|
|
641
|
+
], 8, Ht)) : (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: V,
|
|
649
|
+
class: L(["ds-table__wrapper", { "is-scrolled-start": H.value, "is-scrolled-end": ae.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(r.value)
|
|
654
654
|
}, [
|
|
655
655
|
s("thead", null, [
|
|
656
656
|
s("tr", null, [
|
|
657
|
-
(a(!0), l(
|
|
658
|
-
var
|
|
657
|
+
(a(!0), l(W, null, Q(e.columns, (u) => {
|
|
658
|
+
var p;
|
|
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--${(p = u.align) != null ? p : D(Je).LEFT}`,
|
|
663
|
+
c(u)
|
|
664
664
|
]),
|
|
665
|
-
style:
|
|
666
|
-
},
|
|
665
|
+
style: U(m(u))
|
|
666
|
+
}, T(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
|
+
_(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
|
+
_(b.$slots, "empty", {}, () => [
|
|
690
|
+
q(T(e.emptyMessage), 1)
|
|
691
691
|
], !0)
|
|
692
|
-
], 8,
|
|
693
|
-
])) : (a(!0), l(
|
|
694
|
-
key:
|
|
695
|
-
class:
|
|
692
|
+
], 8, ta)
|
|
693
|
+
])) : (a(!0), l(W, { 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(W, null, Q(e.columns, (p) => {
|
|
699
|
+
var x;
|
|
700
700
|
return a(), l("td", {
|
|
701
|
-
key:
|
|
702
|
-
class:
|
|
703
|
-
`ds-table__td--${(
|
|
704
|
-
|
|
701
|
+
key: p.key,
|
|
702
|
+
class: L([
|
|
703
|
+
`ds-table__td--${(x = p.align) != null ? x : D(Je).LEFT}`,
|
|
704
|
+
c(p)
|
|
705
705
|
]),
|
|
706
|
-
style:
|
|
707
|
-
title: e.rowHeight != null && !
|
|
706
|
+
style: U(k(p)),
|
|
707
|
+
title: e.rowHeight != null && !b.$slots[`cell-${p.key}`] && u[p.key] != null ? String(u[p.key]) : void 0
|
|
708
708
|
}, [
|
|
709
|
-
|
|
710
|
-
|
|
709
|
+
_(b.$slots, `cell-${p.key}`, { row: u }, () => [
|
|
710
|
+
q(T(u[p.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
735
|
class: "material-icons 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
742
|
class: "material-icons ds-input__error-icon",
|
|
743
743
|
"aria-hidden": "true"
|
|
744
|
-
},
|
|
744
|
+
}, ca = ["disabled", "aria-label", "aria-pressed"], ua = {
|
|
745
745
|
class: "material-icons",
|
|
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__ */ te({
|
|
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__ */ te([we, Ee, ze, Ve], ["update:modelValue"]),
|
|
772
772
|
setup(e, { expose: n, emit: t }) {
|
|
773
|
-
const o =
|
|
773
|
+
const o = ve(e, "modelValue"), i = e, r = t, E = F();
|
|
774
774
|
function f(C) {
|
|
775
|
-
const
|
|
776
|
-
|
|
775
|
+
const $ = C.relatedTarget, A = C.currentTarget;
|
|
776
|
+
$ && (A != null && A.contains($)) || r(Ve, C);
|
|
777
777
|
}
|
|
778
|
-
const y =
|
|
778
|
+
const y = he(), v = F(!1);
|
|
779
779
|
function d() {
|
|
780
|
-
i.disabled || (
|
|
780
|
+
i.disabled || (v.value = !v.value);
|
|
781
781
|
}
|
|
782
|
-
const
|
|
783
|
-
() => !!y.suffix || i.error && i.showErrorIcon ||
|
|
782
|
+
const c = S(() => i.type === be.PASSWORD), m = S(() => i.type === be.SEARCH), k = S(() => c.value ? v.value ? be.TEXT : be.PASSWORD : m.value ? be.TEXT : i.type), w = S(() => c.value && !!i.toggleLabel), N = S(
|
|
783
|
+
() => !!y.suffix || i.error && i.showErrorIcon || w.value
|
|
784
784
|
);
|
|
785
785
|
return n({
|
|
786
786
|
focus: () => {
|
|
787
787
|
var C;
|
|
788
|
-
return (C =
|
|
788
|
+
return (C = E.value) == null ? void 0 : C.focus();
|
|
789
789
|
},
|
|
790
790
|
focusAtEnd: async () => {
|
|
791
|
-
await
|
|
792
|
-
const C =
|
|
791
|
+
await se();
|
|
792
|
+
const C = E.value;
|
|
793
793
|
if (!C) return;
|
|
794
794
|
C.focus();
|
|
795
|
-
const
|
|
795
|
+
const $ = C.value.length;
|
|
796
796
|
try {
|
|
797
|
-
C.setSelectionRange(
|
|
797
|
+
C.setSelectionRange($, $);
|
|
798
798
|
} catch {
|
|
799
799
|
}
|
|
800
800
|
}
|
|
801
|
-
}), (C,
|
|
802
|
-
class:
|
|
801
|
+
}), (C, $) => (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
806
|
onFocusout: f
|
|
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: k.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) => r(D(we), A)),
|
|
827
|
+
onBlur: $[2] || ($[2] = (A) => r(D(Ee), A)),
|
|
828
|
+
onChange: $[3] || ($[3] = (A) => r(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")) : w.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":
|
|
840
|
+
"aria-pressed": v.value,
|
|
841
841
|
onClick: d
|
|
842
842
|
}, [
|
|
843
|
-
s("i",
|
|
844
|
-
], 8,
|
|
845
|
-
])) :
|
|
843
|
+
s("i", ua, T(v.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
|
+
}, T(e.errorMessage), 9, fa)) : g("", !0)
|
|
852
852
|
], 34));
|
|
853
853
|
}
|
|
854
|
-
}),
|
|
854
|
+
}), nn = /* @__PURE__ */ O(va, [["__scopeId", "data-v-a7832472"]]), 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__ */ te({
|
|
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__ */ te([we, Ee], ["update:modelValue"]),
|
|
877
877
|
setup(e, { emit: n }) {
|
|
878
|
-
const t =
|
|
879
|
-
() => Object.fromEntries(Object.entries(i).filter(([y]) =>
|
|
880
|
-
), f =
|
|
881
|
-
() => Object.fromEntries(Object.entries(i).filter(([y]) => !
|
|
878
|
+
const t = ve(e, "modelValue"), o = n, i = mt(), r = (y) => y === "class" || y === "style" || y.startsWith("data-"), E = S(
|
|
879
|
+
() => Object.fromEntries(Object.entries(i).filter(([y]) => r(y)))
|
|
880
|
+
), f = S(
|
|
881
|
+
() => Object.fromEntries(Object.entries(i).filter(([y]) => !r(y)))
|
|
882
882
|
);
|
|
883
|
-
return (y,
|
|
883
|
+
return (y, v) => (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(f.value, {
|
|
887
887
|
id: e.id || void 0,
|
|
888
|
-
"onUpdate:modelValue":
|
|
888
|
+
"onUpdate:modelValue": v[0] || (v[0] = (d) => t.value = d),
|
|
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: v[1] || (v[1] = (d) => o(D(we), d)),
|
|
897
|
+
onBlur: v[2] || (v[2] = (d) => o(D(Ee), d))
|
|
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
|
+
}, T(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
925
|
class: "material-icons ds-alert__icon",
|
|
926
926
|
"aria-hidden": "true"
|
|
927
|
-
},
|
|
927
|
+
}, $a = { class: "ds-alert__content" }, wa = {
|
|
928
928
|
key: 1,
|
|
929
929
|
class: "ds-alert__body"
|
|
930
|
-
},
|
|
930
|
+
}, Ea = ["aria-label"], Ta = /* @__PURE__ */ B({
|
|
931
931
|
__name: "DsAlert",
|
|
932
|
-
props: /* @__PURE__ */
|
|
933
|
-
type: { type: String, default:
|
|
934
|
-
effect: { type: String, default:
|
|
932
|
+
props: /* @__PURE__ */ te({
|
|
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__ */ te([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"), r = he(), E = S(() => Sa[t.type]), f = S(() => !!r.default || t.description.length > 0), y = S(() => !!r.title || t.title.length > 0);
|
|
950
|
+
function v() {
|
|
951
|
+
i.value = !1, o(J);
|
|
952
952
|
}
|
|
953
|
-
return (d,
|
|
953
|
+
return (d, 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, T(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": f.value, "is-bold": f.value || e.boldTitle }])
|
|
965
965
|
}, [
|
|
966
|
-
|
|
967
|
-
|
|
966
|
+
_(d.$slots, "title", {}, () => [
|
|
967
|
+
q(T(e.title), 1)
|
|
968
968
|
], !0)
|
|
969
|
-
], 2)) :
|
|
970
|
-
f.value ? (a(), l("div",
|
|
971
|
-
|
|
972
|
-
|
|
969
|
+
], 2)) : g("", !0),
|
|
970
|
+
f.value ? (a(), l("div", wa, [
|
|
971
|
+
_(d.$slots, "default", {}, () => [
|
|
972
|
+
q(T(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: v
|
|
982
|
+
}, [...c[0] || (c[0] = [
|
|
983
983
|
s("i", {
|
|
984
984
|
class: "material-icons",
|
|
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(Ta, [["__scopeId", "data-v-9ced26d6"]]), La = {
|
|
994
994
|
SUCCESS: "success",
|
|
995
995
|
INFO: "info",
|
|
996
996
|
WARNING: "warning",
|
|
997
997
|
ERROR: "error"
|
|
998
|
-
},
|
|
998
|
+
}, Ca = {
|
|
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
|
+
}, _a = {
|
|
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
|
-
},
|
|
1013
|
+
}, Ia = {
|
|
1014
1014
|
class: "material-icons 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: Ca.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 = F(!0), r = S(() => _a[t.type]), E = S(
|
|
1054
|
+
() => t.linkTarget === et.BLANK ? "noopener noreferrer" : void 0
|
|
1055
1055
|
);
|
|
1056
|
-
let f, y = 0,
|
|
1056
|
+
let f, y = 0, v = t.duration;
|
|
1057
1057
|
function d() {
|
|
1058
1058
|
f && (clearTimeout(f), f = void 0);
|
|
1059
1059
|
}
|
|
1060
|
-
function
|
|
1061
|
-
d(), !(t.duration <= 0 || !i.value) && (y = Date.now(), f = setTimeout(
|
|
1060
|
+
function c(C) {
|
|
1061
|
+
d(), !(t.duration <= 0 || !i.value) && (y = Date.now(), f = setTimeout(w, C));
|
|
1062
1062
|
}
|
|
1063
|
-
function
|
|
1064
|
-
f && (
|
|
1063
|
+
function m() {
|
|
1064
|
+
f && (v -= Date.now() - y, d());
|
|
1065
1065
|
}
|
|
1066
|
-
function
|
|
1067
|
-
|
|
1066
|
+
function k() {
|
|
1067
|
+
c(v > 0 ? v : t.duration);
|
|
1068
1068
|
}
|
|
1069
|
-
function
|
|
1070
|
-
d(), i.value = !1, o(
|
|
1069
|
+
function w() {
|
|
1070
|
+
d(), i.value = !1, o(J);
|
|
1071
1071
|
}
|
|
1072
|
-
function
|
|
1073
|
-
o(
|
|
1072
|
+
function N(C) {
|
|
1073
|
+
o(qe, C);
|
|
1074
1074
|
}
|
|
1075
|
-
return
|
|
1076
|
-
|
|
1075
|
+
return nt(() => c(t.duration)), de(d), (C, $) => (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: k
|
|
1090
1090
|
}, [
|
|
1091
|
-
s("i",
|
|
1092
|
-
s("div",
|
|
1093
|
-
e.title ? (a(), l("span",
|
|
1094
|
-
e.description ? (a(), l("p",
|
|
1091
|
+
s("i", Ia, T(r.value), 1),
|
|
1092
|
+
s("div", Da, [
|
|
1093
|
+
e.title ? (a(), l("span", Ra, T(e.title), 1)) : g("", !0),
|
|
1094
|
+
e.description ? (a(), l("p", Aa, T(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
|
+
}, T(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: w
|
|
1110
|
+
}, [...$[0] || ($[0] = [
|
|
1111
1111
|
s("i", {
|
|
1112
1112
|
class: "material-icons",
|
|
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-f1d76da5"]]), 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" }, Va = {
|
|
1127
1127
|
key: 1,
|
|
1128
1128
|
class: "ds-modal__footer"
|
|
1129
|
-
},
|
|
1129
|
+
}, Fa = /* @__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 = F(null);
|
|
1155
|
+
let r = null;
|
|
1156
|
+
const E = ge(), f = S(() => ({
|
|
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 v() {
|
|
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
|
+
(w) => w.offsetParent !== null
|
|
1166
1166
|
) : [];
|
|
1167
1167
|
}
|
|
1168
|
-
function d(
|
|
1169
|
-
var
|
|
1170
|
-
if (
|
|
1171
|
-
t.closeOnEscape && o(
|
|
1168
|
+
function d(k) {
|
|
1169
|
+
var $;
|
|
1170
|
+
if (k.key === "Escape") {
|
|
1171
|
+
t.closeOnEscape && o(J);
|
|
1172
1172
|
return;
|
|
1173
1173
|
}
|
|
1174
|
-
if (
|
|
1175
|
-
const
|
|
1176
|
-
if (
|
|
1177
|
-
|
|
1174
|
+
if (k.key !== "Tab") return;
|
|
1175
|
+
const w = v();
|
|
1176
|
+
if (w.length === 0) {
|
|
1177
|
+
k.preventDefault(), ($ = i.value) == null || $.focus();
|
|
1178
1178
|
return;
|
|
1179
1179
|
}
|
|
1180
|
-
const
|
|
1181
|
-
|
|
1180
|
+
const N = w[0], C = w[w.length - 1];
|
|
1181
|
+
k.shiftKey && document.activeElement === N ? (k.preventDefault(), C.focus()) : !k.shiftKey && document.activeElement === C && (k.preventDefault(), N.focus());
|
|
1182
1182
|
}
|
|
1183
|
-
function
|
|
1184
|
-
|
|
1185
|
-
var
|
|
1186
|
-
return (
|
|
1183
|
+
function c() {
|
|
1184
|
+
r = document.activeElement, document.addEventListener("keydown", d), document.body.style.overflow = "hidden", se(() => {
|
|
1185
|
+
var k, w;
|
|
1186
|
+
return (w = (k = v()[0]) != null ? k : i.value) == null ? void 0 : w.focus();
|
|
1187
1187
|
});
|
|
1188
1188
|
}
|
|
1189
|
-
function
|
|
1190
|
-
var
|
|
1191
|
-
document.removeEventListener("keydown", d), document.body.style.overflow = "",
|
|
1189
|
+
function m(k = !0) {
|
|
1190
|
+
var w;
|
|
1191
|
+
document.removeEventListener("keydown", d), document.body.style.overflow = "", k && ((w = r == null ? void 0 : r.focus) == null || w.call(r));
|
|
1192
1192
|
}
|
|
1193
|
-
return
|
|
1193
|
+
return Z(
|
|
1194
1194
|
() => t.open && t.fixed,
|
|
1195
|
-
(
|
|
1196
|
-
typeof document != "undefined" && (
|
|
1195
|
+
(k, w) => {
|
|
1196
|
+
typeof document != "undefined" && (k ? c() : w && m());
|
|
1197
1197
|
},
|
|
1198
1198
|
{ immediate: !0 }
|
|
1199
|
-
),
|
|
1200
|
-
typeof document != "undefined" &&
|
|
1201
|
-
}), (
|
|
1199
|
+
), de(() => {
|
|
1200
|
+
typeof document != "undefined" && m(!1);
|
|
1201
|
+
}), (k, w) => (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(f.value),
|
|
1223
|
+
onClick: w[1] || (w[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
|
+
}, T(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: w[0] || (w[0] = (N) => o(D(J)))
|
|
1238
|
+
}, null, 8, ["aria-label"])) : g("", !0)
|
|
1239
|
+
])) : g("", !0),
|
|
1240
|
+
s("div", za, [
|
|
1241
|
+
_(k.$slots, "default", {}, void 0, !0)
|
|
1242
1242
|
]),
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
])) :
|
|
1246
|
-
], 14,
|
|
1247
|
-
], 6)) :
|
|
1243
|
+
k.$slots.footer ? (a(), l("div", Va, [
|
|
1244
|
+
_(k.$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(Fa, [["__scopeId", "data-v-a759ae72"]]), Ua = "--ds-overlay-shift", Se = 8;
|
|
1254
|
+
function dt(e, n) {
|
|
1255
|
+
const t = F(0), o = S(
|
|
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 f = e.value;
|
|
1262
|
+
if (!f) return;
|
|
1263
|
+
const y = f.getBoundingClientRect(), v = n() === "top" || n() === "bottom", [d, c, m] = v ? [y.left, y.right, window.innerWidth] : [y.top, y.bottom, window.innerHeight];
|
|
1264
|
+
d < Se ? t.value = Se - d : c > m - Se && (t.value = m - Se - c);
|
|
1265
|
+
}
|
|
1266
|
+
function r() {
|
|
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: r, deactivate: E };
|
|
1273
|
+
}
|
|
1274
|
+
const Ga = {
|
|
1254
1275
|
TOP: "top",
|
|
1255
1276
|
BOTTOM: "bottom",
|
|
1256
1277
|
LEFT: "left",
|
|
1257
1278
|
RIGHT: "right"
|
|
1258
|
-
},
|
|
1279
|
+
}, Wa = ["id"], Ha = /* @__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 = F(!1), r = F(null), {
|
|
1300
|
+
shiftStyle: E,
|
|
1301
|
+
activate: f,
|
|
1302
|
+
deactivate: y
|
|
1303
|
+
} = dt(r, () => n.placement);
|
|
1304
|
+
Z(i, (M) => {
|
|
1305
|
+
M ? f() : y();
|
|
1306
|
+
});
|
|
1307
|
+
const v = S(() => !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 d = !1, c = !1, m = null, k = null, w = null;
|
|
1315
|
+
function N() {
|
|
1316
|
+
m !== null && (clearTimeout(m), m = null);
|
|
1288
1317
|
}
|
|
1289
|
-
function
|
|
1290
|
-
|
|
1318
|
+
function C(M) {
|
|
1319
|
+
M && (k && k !== M && $(), k !== M && (k = M, w = M.getAttribute("aria-describedby"), M.setAttribute(
|
|
1291
1320
|
"aria-describedby",
|
|
1292
|
-
|
|
1321
|
+
w ? `${w} ${o}` : o
|
|
1293
1322
|
)));
|
|
1294
1323
|
}
|
|
1295
|
-
function
|
|
1296
|
-
|
|
1324
|
+
function $() {
|
|
1325
|
+
k && (w !== null ? k.setAttribute("aria-describedby", w) : k.removeAttribute("aria-describedby"), k = null, w = null);
|
|
1297
1326
|
}
|
|
1298
|
-
function
|
|
1299
|
-
|
|
1327
|
+
function A() {
|
|
1328
|
+
v.value && (d = !0, N(), m = setTimeout(() => {
|
|
1300
1329
|
i.value = !0;
|
|
1301
1330
|
}, n.delay));
|
|
1302
1331
|
}
|
|
1303
1332
|
function V() {
|
|
1304
|
-
|
|
1333
|
+
d = !1, N(), c || G();
|
|
1305
1334
|
}
|
|
1306
|
-
function
|
|
1307
|
-
|
|
1335
|
+
function H(M) {
|
|
1336
|
+
v.value && (c = !0, N(), i.value = !0, C(M.target));
|
|
1308
1337
|
}
|
|
1309
|
-
function
|
|
1310
|
-
const
|
|
1311
|
-
|
|
1338
|
+
function ae(M) {
|
|
1339
|
+
const j = M.relatedTarget, b = M.currentTarget;
|
|
1340
|
+
j && (b != null && b.contains(j)) || (c = !1, d || G());
|
|
1312
1341
|
}
|
|
1313
|
-
function
|
|
1314
|
-
|
|
1342
|
+
function G() {
|
|
1343
|
+
N(), i.value = !1, $();
|
|
1315
1344
|
}
|
|
1316
|
-
return
|
|
1317
|
-
|
|
1318
|
-
}), (
|
|
1319
|
-
class:
|
|
1320
|
-
onMouseenter:
|
|
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,
|
|
1321
1350
|
onMouseleave: V,
|
|
1322
|
-
onFocusin:
|
|
1323
|
-
onFocusout:
|
|
1324
|
-
onKeydown:
|
|
1351
|
+
onFocusin: H,
|
|
1352
|
+
onFocusout: ae,
|
|
1353
|
+
onKeydown: st(G, ["esc"])
|
|
1325
1354
|
}, [
|
|
1326
|
-
|
|
1327
|
-
|
|
1355
|
+
_(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: r,
|
|
1363
|
+
class: L(["ds-tooltip__bubble", `ds-tooltip__bubble--${e.placement}`]),
|
|
1364
|
+
role: "tooltip",
|
|
1365
|
+
style: U(D(E))
|
|
1334
1366
|
}, [
|
|
1335
|
-
|
|
1336
|
-
|
|
1367
|
+
_(M.$slots, "content", {}, () => [
|
|
1368
|
+
q(T(e.content), 1)
|
|
1337
1369
|
], !0)
|
|
1338
|
-
],
|
|
1370
|
+
], 14, Wa)) : g("", !0)
|
|
1339
1371
|
]),
|
|
1340
1372
|
_: 3
|
|
1341
1373
|
})
|
|
1342
1374
|
], 34));
|
|
1343
1375
|
}
|
|
1344
|
-
}),
|
|
1376
|
+
}), cn = /* @__PURE__ */ O(Ha, [["__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 = S(() => 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-icons 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
|
+
_(o.$slots, "default", {}, () => [
|
|
1429
|
+
q(T(t.value.icon), 1)
|
|
1398
1430
|
], !0)
|
|
1399
|
-
], 14,
|
|
1431
|
+
], 14, Ka));
|
|
1400
1432
|
}
|
|
1401
|
-
}),
|
|
1433
|
+
}), qa = /* @__PURE__ */ O(Ya, [["__scopeId", "data-v-0fd84040"]]), 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 = {
|
|
1402
1434
|
class: "material-icons",
|
|
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,63 +1453,63 @@ 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: [Te, Le, Ce],
|
|
1425
1457
|
setup(e, { emit: n }) {
|
|
1426
|
-
const t = e, o = n, i =
|
|
1427
|
-
let
|
|
1428
|
-
function
|
|
1458
|
+
const t = e, o = n, i = F(!1);
|
|
1459
|
+
let r;
|
|
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(r), r = setTimeout(() => {
|
|
1431
1463
|
i.value = !1;
|
|
1432
|
-
}, 1200), o(
|
|
1464
|
+
}, 1200), o(Te, t.value);
|
|
1433
1465
|
}
|
|
1434
1466
|
function f() {
|
|
1435
|
-
o(
|
|
1467
|
+
o(Le);
|
|
1436
1468
|
}
|
|
1437
1469
|
function y() {
|
|
1438
|
-
o(
|
|
1470
|
+
o(Ce);
|
|
1439
1471
|
}
|
|
1440
|
-
return
|
|
1441
|
-
class:
|
|
1472
|
+
return de(() => clearTimeout(r)), (v, d) => (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
|
+
}, T(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(T(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
1498
|
class: "material-icons 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(W, { 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, T(i.value ? "check" : "content_copy"), 1)
|
|
1511
|
+
], 10, Ja),
|
|
1512
|
+
e.showRate ? (a(), l(W, { key: 0 }, [
|
|
1481
1513
|
s("button", {
|
|
1482
1514
|
type: "button",
|
|
1483
1515
|
class: "ds-contact-value__action",
|
|
@@ -1487,10 +1519,10 @@ const ge = {
|
|
|
1487
1519
|
onClick: f
|
|
1488
1520
|
}, [
|
|
1489
1521
|
s("i", {
|
|
1490
|
-
class:
|
|
1522
|
+
class: L(e.correct === !0 ? "material-icons" : "material-icons-outlined"),
|
|
1491
1523
|
"aria-hidden": "true"
|
|
1492
1524
|
}, "thumb_up", 2)
|
|
1493
|
-
], 8,
|
|
1525
|
+
], 8, tl),
|
|
1494
1526
|
s("button", {
|
|
1495
1527
|
type: "button",
|
|
1496
1528
|
class: "ds-contact-value__action",
|
|
@@ -1500,44 +1532,44 @@ const ge = {
|
|
|
1500
1532
|
onClick: y
|
|
1501
1533
|
}, [
|
|
1502
1534
|
s("i", {
|
|
1503
|
-
class:
|
|
1535
|
+
class: L(e.correct === !1 ? "material-icons" : "material-icons-outlined"),
|
|
1504
1536
|
"aria-hidden": "true"
|
|
1505
1537
|
}, "thumb_down", 2)
|
|
1506
|
-
], 8,
|
|
1507
|
-
], 64)) :
|
|
1538
|
+
], 8, al)
|
|
1539
|
+
], 64)) : g("", !0)
|
|
1508
1540
|
], 64))
|
|
1509
1541
|
])
|
|
1510
1542
|
])
|
|
1511
1543
|
], 2));
|
|
1512
1544
|
}
|
|
1513
|
-
}),
|
|
1545
|
+
}), tt = /* @__PURE__ */ O(ll, [["__scopeId", "data-v-4f2d5d85"]]), il = ["aria-label", "aria-busy"], nl = { class: "ds-data-card__heading" }, sl = {
|
|
1514
1546
|
class: "material-icons ds-data-card__icon",
|
|
1515
1547
|
"aria-hidden": "true"
|
|
1516
|
-
},
|
|
1548
|
+
}, ol = { class: "ds-data-card__title" }, dl = ["aria-label"], rl = {
|
|
1517
1549
|
key: 0,
|
|
1518
1550
|
class: "ds-data-card__body"
|
|
1519
|
-
},
|
|
1551
|
+
}, cl = {
|
|
1520
1552
|
key: 0,
|
|
1521
1553
|
class: "ds-data-card__loading"
|
|
1522
|
-
},
|
|
1554
|
+
}, ul = {
|
|
1523
1555
|
key: 1,
|
|
1524
1556
|
class: "ds-data-card__locked"
|
|
1525
|
-
},
|
|
1557
|
+
}, fl = { class: "ds-data-card__state-text" }, vl = { class: "ds-data-card__state-title" }, bl = {
|
|
1526
1558
|
key: 2,
|
|
1527
1559
|
class: "ds-data-card__empty"
|
|
1528
|
-
},
|
|
1560
|
+
}, yl = { class: "ds-data-card__state-badge" }, ml = {
|
|
1529
1561
|
class: "material-icons ds-data-card__state-icon",
|
|
1530
1562
|
"aria-hidden": "true"
|
|
1531
|
-
},
|
|
1563
|
+
}, hl = { class: "ds-data-card__state-text" }, gl = { class: "ds-data-card__state-title" }, pl = {
|
|
1532
1564
|
key: 0,
|
|
1533
1565
|
class: "ds-data-card__state-subtitle"
|
|
1534
|
-
},
|
|
1566
|
+
}, Sl = { key: 0 }, kl = {
|
|
1535
1567
|
key: 0,
|
|
1536
1568
|
class: "ds-data-card__section"
|
|
1537
|
-
},
|
|
1569
|
+
}, $l = { key: 1 }, wl = {
|
|
1538
1570
|
key: 0,
|
|
1539
1571
|
class: "ds-data-card__section"
|
|
1540
|
-
},
|
|
1572
|
+
}, El = { class: "ds-data-card__more" }, Tl = /* @__PURE__ */ B({
|
|
1541
1573
|
__name: "DsDataCard",
|
|
1542
1574
|
props: {
|
|
1543
1575
|
title: { type: String, required: !0 },
|
|
@@ -1577,117 +1609,117 @@ const ge = {
|
|
|
1577
1609
|
toggleLabel: { type: String, default: "Toggle" },
|
|
1578
1610
|
closeLabel: { type: String, default: "Close" }
|
|
1579
1611
|
},
|
|
1580
|
-
emits: [
|
|
1612
|
+
emits: [Te, Fe, Ue, J, Le, Ce],
|
|
1581
1613
|
setup(e, { emit: n }) {
|
|
1582
|
-
const t = e, o = n, i =
|
|
1583
|
-
function
|
|
1614
|
+
const t = e, o = n, i = F(!1), r = S(() => t.more.length + (t.mostLikely ? 1 : 0)), E = S(() => r.value > 3), f = S(() => r.value === 0), y = S(() => t.collapsible && i.value);
|
|
1615
|
+
function v() {
|
|
1584
1616
|
i.value = !i.value;
|
|
1585
1617
|
}
|
|
1586
1618
|
function d(C) {
|
|
1587
|
-
o(
|
|
1588
|
-
}
|
|
1589
|
-
function b() {
|
|
1590
|
-
o(Pe);
|
|
1619
|
+
o(Te, C);
|
|
1591
1620
|
}
|
|
1592
|
-
function
|
|
1621
|
+
function c() {
|
|
1593
1622
|
o(Fe);
|
|
1594
1623
|
}
|
|
1595
|
-
function
|
|
1596
|
-
o(
|
|
1624
|
+
function m() {
|
|
1625
|
+
o(Ue);
|
|
1597
1626
|
}
|
|
1598
|
-
function
|
|
1599
|
-
o(
|
|
1627
|
+
function k() {
|
|
1628
|
+
o(J);
|
|
1600
1629
|
}
|
|
1601
|
-
function
|
|
1602
|
-
o(
|
|
1630
|
+
function w(C) {
|
|
1631
|
+
o(Le, C);
|
|
1603
1632
|
}
|
|
1604
|
-
|
|
1633
|
+
function N(C) {
|
|
1634
|
+
o(Ce, C);
|
|
1635
|
+
}
|
|
1636
|
+
return (C, $) => (a(), l("section", {
|
|
1605
1637
|
class: "ds-data-card",
|
|
1606
1638
|
"aria-label": e.title,
|
|
1607
1639
|
"aria-busy": e.loading ? "true" : void 0
|
|
1608
1640
|
}, [
|
|
1609
1641
|
s("div", {
|
|
1610
|
-
class:
|
|
1611
|
-
onClick:
|
|
1642
|
+
class: L(["ds-data-card__header", { "is-collapsed": y.value, "is-collapsible": e.collapsible }]),
|
|
1643
|
+
onClick: $[1] || ($[1] = (A) => e.collapsible && v())
|
|
1612
1644
|
}, [
|
|
1613
|
-
s("div",
|
|
1614
|
-
s("i",
|
|
1615
|
-
s("span",
|
|
1645
|
+
s("div", nl, [
|
|
1646
|
+
s("i", sl, T(e.icon), 1),
|
|
1647
|
+
s("span", ol, T(e.title), 1)
|
|
1616
1648
|
]),
|
|
1617
1649
|
s("div", {
|
|
1618
1650
|
class: "ds-data-card__actions",
|
|
1619
|
-
onClick:
|
|
1651
|
+
onClick: $[0] || ($[0] = ue(() => {
|
|
1620
1652
|
}, ["stop"]))
|
|
1621
1653
|
}, [
|
|
1622
1654
|
!y.value && e.showEdit ? (a(), l("button", {
|
|
1623
1655
|
key: 0,
|
|
1624
1656
|
type: "button",
|
|
1625
1657
|
class: "ds-data-card__edit",
|
|
1626
|
-
onClick:
|
|
1627
|
-
},
|
|
1628
|
-
!y.value && e.showSort ? (a(),
|
|
1658
|
+
onClick: m
|
|
1659
|
+
}, T(e.editLabel), 1)) : g("", !0),
|
|
1660
|
+
!y.value && e.showSort ? (a(), K(D(fe), {
|
|
1629
1661
|
key: 1,
|
|
1630
1662
|
variant: "tertiary",
|
|
1631
1663
|
size: "medium",
|
|
1632
1664
|
circle: "",
|
|
1633
1665
|
"left-icon": "swap_vert",
|
|
1634
1666
|
"aria-label": e.sortLabel,
|
|
1635
|
-
onClick:
|
|
1636
|
-
}, null, 8, ["aria-label"])) :
|
|
1637
|
-
e.collapsible ? (a(),
|
|
1667
|
+
onClick: c
|
|
1668
|
+
}, null, 8, ["aria-label"])) : g("", !0),
|
|
1669
|
+
e.collapsible ? (a(), K(D(fe), {
|
|
1638
1670
|
key: 2,
|
|
1639
1671
|
variant: "tertiary",
|
|
1640
1672
|
size: "medium",
|
|
1641
1673
|
circle: "",
|
|
1642
1674
|
"left-icon": i.value ? "keyboard_arrow_down" : "keyboard_arrow_up",
|
|
1643
1675
|
"aria-label": e.toggleLabel,
|
|
1644
|
-
onClick:
|
|
1645
|
-
}, null, 8, ["left-icon", "aria-label"])) :
|
|
1676
|
+
onClick: v
|
|
1677
|
+
}, null, 8, ["left-icon", "aria-label"])) : g("", !0),
|
|
1646
1678
|
e.showClose ? (a(), l("button", {
|
|
1647
1679
|
key: 3,
|
|
1648
1680
|
type: "button",
|
|
1649
1681
|
class: "ds-data-card__close",
|
|
1650
1682
|
"aria-label": e.closeLabel,
|
|
1651
|
-
onClick:
|
|
1652
|
-
}, [
|
|
1683
|
+
onClick: k
|
|
1684
|
+
}, [...$[4] || ($[4] = [
|
|
1653
1685
|
s("i", {
|
|
1654
1686
|
class: "material-icons",
|
|
1655
1687
|
"aria-hidden": "true"
|
|
1656
1688
|
}, "close", -1)
|
|
1657
|
-
])], 8,
|
|
1689
|
+
])], 8, dl)) : g("", !0)
|
|
1658
1690
|
])
|
|
1659
1691
|
], 2),
|
|
1660
|
-
y.value ?
|
|
1661
|
-
e.loading ? (a(), l("div",
|
|
1662
|
-
|
|
1663
|
-
|
|
1692
|
+
y.value ? g("", !0) : (a(), l("div", rl, [
|
|
1693
|
+
e.loading ? (a(), l("div", cl, [
|
|
1694
|
+
_(C.$slots, "loading", {}, () => [
|
|
1695
|
+
Y(D(ye), {
|
|
1664
1696
|
label: e.loadingLabel || void 0
|
|
1665
1697
|
}, null, 8, ["label"])
|
|
1666
1698
|
], !0)
|
|
1667
|
-
])) : e.locked ? (a(), l("div",
|
|
1668
|
-
|
|
1669
|
-
|
|
1699
|
+
])) : e.locked ? (a(), l("div", ul, [
|
|
1700
|
+
_(C.$slots, "locked", {}, () => [
|
|
1701
|
+
$[5] || ($[5] = s("span", { class: "ds-data-card__state-badge ds-data-card__state-badge--accent" }, [
|
|
1670
1702
|
s("i", {
|
|
1671
1703
|
class: "material-icons ds-data-card__state-icon",
|
|
1672
1704
|
"aria-hidden": "true"
|
|
1673
1705
|
}, "lock")
|
|
1674
1706
|
], -1)),
|
|
1675
|
-
s("div",
|
|
1676
|
-
s("span",
|
|
1707
|
+
s("div", fl, [
|
|
1708
|
+
s("span", vl, T(e.lockedLabel), 1)
|
|
1677
1709
|
])
|
|
1678
1710
|
], !0)
|
|
1679
|
-
])) : f.value ? (a(), l("div",
|
|
1680
|
-
s("span",
|
|
1681
|
-
s("i",
|
|
1711
|
+
])) : f.value ? (a(), l("div", bl, [
|
|
1712
|
+
s("span", yl, [
|
|
1713
|
+
s("i", ml, T(e.icon), 1)
|
|
1682
1714
|
]),
|
|
1683
|
-
s("div",
|
|
1684
|
-
s("span",
|
|
1685
|
-
e.emptySubtitle ? (a(), l("span",
|
|
1715
|
+
s("div", hl, [
|
|
1716
|
+
s("span", gl, T(e.emptyLabel), 1),
|
|
1717
|
+
e.emptySubtitle ? (a(), l("span", pl, T(e.emptySubtitle), 1)) : g("", !0)
|
|
1686
1718
|
])
|
|
1687
|
-
])) : (a(), l(
|
|
1688
|
-
e.mostLikely ? (a(), l("div",
|
|
1689
|
-
|
|
1690
|
-
|
|
1719
|
+
])) : (a(), l(W, { key: 3 }, [
|
|
1720
|
+
e.mostLikely ? (a(), l("div", Sl, [
|
|
1721
|
+
E.value ? (a(), l("div", kl, T(e.mostLikelyLabel), 1)) : g("", !0),
|
|
1722
|
+
Y(D(tt), {
|
|
1691
1723
|
value: e.mostLikely.value,
|
|
1692
1724
|
"value-type": e.mostLikely.type,
|
|
1693
1725
|
verified: e.mostLikely.verified,
|
|
@@ -1697,38 +1729,38 @@ const ge = {
|
|
|
1697
1729
|
"is-contact-data": e.isContactData,
|
|
1698
1730
|
"show-rate": e.showRate,
|
|
1699
1731
|
onCopy: d,
|
|
1700
|
-
onCorrect:
|
|
1701
|
-
onIncorrect:
|
|
1732
|
+
onCorrect: $[2] || ($[2] = (A) => w(e.mostLikely)),
|
|
1733
|
+
onIncorrect: $[3] || ($[3] = (A) => N(e.mostLikely))
|
|
1702
1734
|
}, 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":
|
|
1735
|
+
])) : g("", !0),
|
|
1736
|
+
e.more.length > 0 ? (a(), l("div", $l, [
|
|
1737
|
+
E.value ? (a(), l("div", wl, T(e.moreLabel), 1)) : g("", !0),
|
|
1738
|
+
s("div", El, [
|
|
1739
|
+
(a(!0), l(W, null, Q(e.more, (A) => (a(), K(D(tt), {
|
|
1740
|
+
key: A.value,
|
|
1741
|
+
value: A.value,
|
|
1742
|
+
"value-type": A.type,
|
|
1743
|
+
verified: A.verified,
|
|
1744
|
+
correct: A.correct,
|
|
1745
|
+
"hide-value": A.hideValue,
|
|
1714
1746
|
"is-contact-data": e.isContactData,
|
|
1715
1747
|
"show-rate": e.showRate,
|
|
1716
1748
|
onCopy: d,
|
|
1717
|
-
onCorrect: (
|
|
1718
|
-
onIncorrect: (
|
|
1749
|
+
onCorrect: (V) => w(A),
|
|
1750
|
+
onIncorrect: (V) => N(A)
|
|
1719
1751
|
}, null, 8, ["value", "value-type", "verified", "correct", "hide-value", "is-contact-data", "show-rate", "onCorrect", "onIncorrect"]))), 128))
|
|
1720
1752
|
])
|
|
1721
|
-
])) :
|
|
1753
|
+
])) : g("", !0)
|
|
1722
1754
|
], 64))
|
|
1723
1755
|
]))
|
|
1724
|
-
], 8,
|
|
1756
|
+
], 8, il));
|
|
1725
1757
|
}
|
|
1726
|
-
}),
|
|
1758
|
+
}), un = /* @__PURE__ */ O(Tl, [["__scopeId", "data-v-a062c3ae"]]), Ll = ["name", "value", "checked", "disabled"], Cl = {
|
|
1727
1759
|
key: 0,
|
|
1728
1760
|
class: "ds-radio__label"
|
|
1729
|
-
},
|
|
1761
|
+
}, _l = /* @__PURE__ */ B({
|
|
1730
1762
|
__name: "DsRadio",
|
|
1731
|
-
props: /* @__PURE__ */
|
|
1763
|
+
props: /* @__PURE__ */ te({
|
|
1732
1764
|
disabled: Boolean,
|
|
1733
1765
|
// Label text (DS `label` prop); a default slot overrides it.
|
|
1734
1766
|
label: { type: String, default: "" },
|
|
@@ -1740,12 +1772,12 @@ const ge = {
|
|
|
1740
1772
|
}),
|
|
1741
1773
|
emits: ["update:modelValue"],
|
|
1742
1774
|
setup(e) {
|
|
1743
|
-
const n =
|
|
1775
|
+
const n = ve(e, "modelValue"), t = e;
|
|
1744
1776
|
function o() {
|
|
1745
1777
|
t.disabled || (n.value = !0);
|
|
1746
1778
|
}
|
|
1747
|
-
return (i,
|
|
1748
|
-
class:
|
|
1779
|
+
return (i, r) => (a(), l("label", {
|
|
1780
|
+
class: L(["ds-radio", { "is-disabled": e.disabled }])
|
|
1749
1781
|
}, [
|
|
1750
1782
|
s("input", {
|
|
1751
1783
|
type: "radio",
|
|
@@ -1755,24 +1787,24 @@ const ge = {
|
|
|
1755
1787
|
checked: n.value,
|
|
1756
1788
|
disabled: e.disabled,
|
|
1757
1789
|
onChange: o
|
|
1758
|
-
}, null, 40,
|
|
1790
|
+
}, null, 40, Ll),
|
|
1759
1791
|
s("span", {
|
|
1760
|
-
class:
|
|
1792
|
+
class: L(["ds-radio__dot", { "is-active": n.value }]),
|
|
1761
1793
|
"aria-hidden": "true"
|
|
1762
1794
|
}, null, 2),
|
|
1763
|
-
i.$slots.default || e.label ? (a(), l("span",
|
|
1764
|
-
|
|
1765
|
-
|
|
1795
|
+
i.$slots.default || e.label ? (a(), l("span", Cl, [
|
|
1796
|
+
_(i.$slots, "default", {}, () => [
|
|
1797
|
+
q(T(e.label), 1)
|
|
1766
1798
|
], !0)
|
|
1767
|
-
])) :
|
|
1799
|
+
])) : g("", !0)
|
|
1768
1800
|
], 2));
|
|
1769
1801
|
}
|
|
1770
|
-
}),
|
|
1802
|
+
}), fn = /* @__PURE__ */ O(_l, [["__scopeId", "data-v-96b70404"]]), Il = ["aria-checked", "aria-busy", "aria-disabled", "aria-label", "disabled"], Dl = {
|
|
1771
1803
|
class: "ds-switch__thumb",
|
|
1772
1804
|
"aria-hidden": "true"
|
|
1773
|
-
},
|
|
1805
|
+
}, Rl = /* @__PURE__ */ B({
|
|
1774
1806
|
__name: "DsSwitch",
|
|
1775
|
-
props: /* @__PURE__ */
|
|
1807
|
+
props: /* @__PURE__ */ te({
|
|
1776
1808
|
disabled: Boolean,
|
|
1777
1809
|
// Async busy state for a toggle whose commit is pending (e.g. a server round-trip
|
|
1778
1810
|
// that may revert). Blocks interaction and shows a spinner in the thumb while it
|
|
@@ -1788,14 +1820,14 @@ const ge = {
|
|
|
1788
1820
|
}),
|
|
1789
1821
|
emits: ["update:modelValue"],
|
|
1790
1822
|
setup(e) {
|
|
1791
|
-
const n =
|
|
1823
|
+
const n = ve(e, "modelValue"), t = e;
|
|
1792
1824
|
function o() {
|
|
1793
1825
|
t.disabled || t.loading || (n.value = !n.value);
|
|
1794
1826
|
}
|
|
1795
|
-
return (i,
|
|
1827
|
+
return (i, r) => (a(), l("button", {
|
|
1796
1828
|
type: "button",
|
|
1797
1829
|
role: "switch",
|
|
1798
|
-
class:
|
|
1830
|
+
class: L(["ds-switch", { "is-disabled": e.disabled, "is-loading": e.loading }]),
|
|
1799
1831
|
"aria-checked": n.value,
|
|
1800
1832
|
"aria-busy": e.loading || void 0,
|
|
1801
1833
|
"aria-disabled": e.disabled || e.loading || void 0,
|
|
@@ -1803,18 +1835,18 @@ const ge = {
|
|
|
1803
1835
|
disabled: e.disabled || e.loading,
|
|
1804
1836
|
onClick: o
|
|
1805
1837
|
}, [
|
|
1806
|
-
s("span",
|
|
1807
|
-
e.loading ? (a(),
|
|
1838
|
+
s("span", Dl, [
|
|
1839
|
+
e.loading ? (a(), K(D(ye), {
|
|
1808
1840
|
key: 0,
|
|
1809
1841
|
class: "ds-switch__spinner",
|
|
1810
1842
|
size: 12,
|
|
1811
|
-
tone:
|
|
1843
|
+
tone: D($e).DARK,
|
|
1812
1844
|
label: ""
|
|
1813
|
-
}, null, 8, ["tone"])) :
|
|
1845
|
+
}, null, 8, ["tone"])) : g("", !0)
|
|
1814
1846
|
])
|
|
1815
|
-
], 10,
|
|
1847
|
+
], 10, Il));
|
|
1816
1848
|
}
|
|
1817
|
-
}),
|
|
1849
|
+
}), vn = /* @__PURE__ */ O(Rl, [["__scopeId", "data-v-f8073b3b"]]), Al = ["aria-label", "disabled"], Nl = { class: "ds-item-selector-button__label" }, Bl = /* @__PURE__ */ B({
|
|
1818
1850
|
__name: "DsItemSelectorButton",
|
|
1819
1851
|
props: {
|
|
1820
1852
|
item: { type: Object, default: null },
|
|
@@ -1826,36 +1858,36 @@ const ge = {
|
|
|
1826
1858
|
ariaLabel: { type: String, default: "" },
|
|
1827
1859
|
disabled: Boolean
|
|
1828
1860
|
},
|
|
1829
|
-
emits: [
|
|
1861
|
+
emits: [ee],
|
|
1830
1862
|
setup(e, { emit: n }) {
|
|
1831
1863
|
const t = e, o = n;
|
|
1832
|
-
function i(
|
|
1833
|
-
t.disabled || o(
|
|
1864
|
+
function i(r) {
|
|
1865
|
+
t.disabled || o(ee, r);
|
|
1834
1866
|
}
|
|
1835
|
-
return (
|
|
1867
|
+
return (r, E) => {
|
|
1836
1868
|
var f;
|
|
1837
1869
|
return a(), l("button", {
|
|
1838
1870
|
type: "button",
|
|
1839
|
-
class:
|
|
1871
|
+
class: L(["ds-item-selector-button", { "is-empty": !e.item, "is-disabled": e.disabled }]),
|
|
1840
1872
|
"aria-haspopup": "listbox",
|
|
1841
1873
|
"aria-label": e.ariaLabel || void 0,
|
|
1842
1874
|
disabled: e.disabled,
|
|
1843
1875
|
onClick: i
|
|
1844
1876
|
}, [
|
|
1845
|
-
s("span",
|
|
1877
|
+
s("span", Nl, T(e.item ? e.item.name : e.emptyTitle), 1),
|
|
1846
1878
|
e.icon ? (a(), l("i", {
|
|
1847
1879
|
key: 0,
|
|
1848
|
-
class:
|
|
1849
|
-
style:
|
|
1880
|
+
class: L(["ds-item-selector-button__icon", e.item ? "material-icons" : "material-icons-outlined"]),
|
|
1881
|
+
style: U((f = e.item) != null && f.color ? { color: e.item.color } : void 0),
|
|
1850
1882
|
"aria-hidden": "true"
|
|
1851
|
-
},
|
|
1852
|
-
], 10,
|
|
1883
|
+
}, T(e.icon), 7)) : g("", !0)
|
|
1884
|
+
], 10, Al);
|
|
1853
1885
|
};
|
|
1854
1886
|
}
|
|
1855
|
-
}),
|
|
1887
|
+
}), bn = /* @__PURE__ */ O(Bl, [["__scopeId", "data-v-92d8d822"]]), at = {
|
|
1856
1888
|
DEFAULT: "default",
|
|
1857
1889
|
FILTER_SUMMARY: "filterSummary"
|
|
1858
|
-
},
|
|
1890
|
+
}, lt = {
|
|
1859
1891
|
AUTO: "auto",
|
|
1860
1892
|
// shrink to content — resizes with the selected label (default)
|
|
1861
1893
|
SMALL: "small",
|
|
@@ -1866,34 +1898,34 @@ const ge = {
|
|
|
1866
1898
|
// 280px
|
|
1867
1899
|
FULL: "full"
|
|
1868
1900
|
// 100% of the container
|
|
1869
|
-
},
|
|
1901
|
+
}, Ol = ["disabled", "aria-expanded", "aria-controls", "aria-activedescendant"], xl = ["title"], Ml = ["disabled", "aria-label"], Pl = {
|
|
1870
1902
|
key: 1,
|
|
1871
1903
|
class: "material-icons ds-select__chevron",
|
|
1872
1904
|
"aria-hidden": "true"
|
|
1873
|
-
},
|
|
1905
|
+
}, zl = {
|
|
1874
1906
|
key: 0,
|
|
1875
1907
|
class: "ds-select__popup"
|
|
1876
|
-
},
|
|
1908
|
+
}, Vl = {
|
|
1877
1909
|
key: 0,
|
|
1878
1910
|
class: "ds-select__search"
|
|
1879
|
-
},
|
|
1911
|
+
}, Fl = ["aria-activedescendant", "aria-label", "placeholder", "value"], Ul = ["aria-multiselectable", "aria-busy"], Gl = {
|
|
1880
1912
|
key: 0,
|
|
1881
1913
|
class: "ds-select__loading",
|
|
1882
1914
|
role: "presentation"
|
|
1883
|
-
},
|
|
1915
|
+
}, Wl = ["role", "aria-labelledby"], Hl = ["id"], Kl = ["id", "aria-selected", "onClick", "onMouseenter"], Yl = { class: "ds-select__option-label" }, ql = {
|
|
1884
1916
|
key: 0,
|
|
1885
1917
|
class: "ds-select__option-sublabel"
|
|
1886
|
-
},
|
|
1918
|
+
}, jl = {
|
|
1887
1919
|
key: 0,
|
|
1888
1920
|
class: "ds-select__empty",
|
|
1889
1921
|
role: "presentation"
|
|
1890
|
-
},
|
|
1922
|
+
}, Xl = /* @__PURE__ */ B({
|
|
1891
1923
|
__name: "DsSelect",
|
|
1892
|
-
props: /* @__PURE__ */
|
|
1924
|
+
props: /* @__PURE__ */ te({
|
|
1893
1925
|
options: { type: Array, required: !0 },
|
|
1894
1926
|
placeholder: { type: String, default: "Select an option" },
|
|
1895
1927
|
multiple: Boolean,
|
|
1896
|
-
selectType: { type: String, default:
|
|
1928
|
+
selectType: { type: String, default: at.DEFAULT },
|
|
1897
1929
|
showCheckbox: Boolean,
|
|
1898
1930
|
// Named step ('small'|'medium'|'large'|'full'|'auto') for a STABLE width, or a
|
|
1899
1931
|
// custom width (number → px, or any CSS string). Defaults to 'auto'
|
|
@@ -1902,7 +1934,7 @@ const ge = {
|
|
|
1902
1934
|
// resize with the selected label. See DsSelect.types.ts `DS_SELECT_WIDTHS`.
|
|
1903
1935
|
width: {
|
|
1904
1936
|
type: [Number, String],
|
|
1905
|
-
default:
|
|
1937
|
+
default: lt.AUTO
|
|
1906
1938
|
},
|
|
1907
1939
|
disabled: Boolean,
|
|
1908
1940
|
// Opt-in type-to-filter: renders a search input inside the open dropdown.
|
|
@@ -1932,208 +1964,208 @@ const ge = {
|
|
|
1932
1964
|
modelValue: { default: null },
|
|
1933
1965
|
modelModifiers: {}
|
|
1934
1966
|
}),
|
|
1935
|
-
emits: /* @__PURE__ */
|
|
1967
|
+
emits: /* @__PURE__ */ te([Re], ["update:modelValue"]),
|
|
1936
1968
|
setup(e, { emit: n }) {
|
|
1937
|
-
const t = e, o = n, i =
|
|
1938
|
-
if (!
|
|
1939
|
-
const
|
|
1940
|
-
return
|
|
1941
|
-
(
|
|
1969
|
+
const t = e, o = n, i = ve(e, "modelValue"), r = `ds-select-${ge()}`, E = `${r}-listbox`, f = (h) => `${r}-option-${h}`, y = F(null), v = F(null), d = F(null), c = F(!1), m = F(-1), k = F(""), w = S(() => t.selectType === at.FILTER_SUMMARY), N = S(() => t.filterable && !t.remote), C = S(() => {
|
|
1970
|
+
if (!N.value) return t.options;
|
|
1971
|
+
const h = k.value.trim().toLowerCase();
|
|
1972
|
+
return h ? t.options.filter(
|
|
1973
|
+
(I) => I.label.toLowerCase().includes(h) || (I.subLabel ? I.subLabel.toLowerCase().includes(h) : !1)
|
|
1942
1974
|
) : t.options;
|
|
1943
|
-
}),
|
|
1975
|
+
}), $ = S(
|
|
1944
1976
|
() => t.loading ? [] : C.value
|
|
1945
|
-
),
|
|
1946
|
-
const
|
|
1947
|
-
return
|
|
1948
|
-
const
|
|
1949
|
-
|
|
1977
|
+
), A = S(() => {
|
|
1978
|
+
const h = [];
|
|
1979
|
+
return $.value.forEach((I, z) => {
|
|
1980
|
+
const P = I.group, X = h[h.length - 1];
|
|
1981
|
+
P ? (X == null ? void 0 : X.kind) === "group" && X.label === P ? X.items.push({ option: I, index: z }) : h.push({
|
|
1950
1982
|
kind: "group",
|
|
1951
|
-
label:
|
|
1952
|
-
headerId: `${
|
|
1953
|
-
key: `g-${
|
|
1954
|
-
items: [{ option:
|
|
1955
|
-
}) : (
|
|
1956
|
-
}),
|
|
1957
|
-
}),
|
|
1958
|
-
function
|
|
1959
|
-
return
|
|
1960
|
-
}
|
|
1961
|
-
const
|
|
1962
|
-
|
|
1983
|
+
label: P,
|
|
1984
|
+
headerId: `${r}-group-${z}`,
|
|
1985
|
+
key: `g-${z}`,
|
|
1986
|
+
items: [{ option: I, index: z }]
|
|
1987
|
+
}) : (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 }] });
|
|
1988
|
+
}), h;
|
|
1989
|
+
}), V = S(() => t.multiple ? Array.isArray(i.value) ? i.value : [] : i.value !== null && i.value !== void 0 ? [i.value] : []), H = S(() => V.value.length > 0), ae = S(() => w.value && H.value);
|
|
1990
|
+
function G(h) {
|
|
1991
|
+
return V.value.includes(h);
|
|
1992
|
+
}
|
|
1993
|
+
const M = gt(/* @__PURE__ */ new Map());
|
|
1994
|
+
Z(
|
|
1963
1995
|
() => t.options,
|
|
1964
|
-
(
|
|
1996
|
+
(h) => h.forEach((I) => M.set(I.value, I.label)),
|
|
1965
1997
|
{ immediate: !0, deep: !0 }
|
|
1966
1998
|
);
|
|
1967
|
-
function
|
|
1968
|
-
var
|
|
1969
|
-
return (
|
|
1970
|
-
}
|
|
1971
|
-
const
|
|
1972
|
-
() => typeof t.width == "string" &&
|
|
1973
|
-
),
|
|
1974
|
-
if (!
|
|
1999
|
+
function j(h) {
|
|
2000
|
+
var I, z, P;
|
|
2001
|
+
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);
|
|
2002
|
+
}
|
|
2003
|
+
const b = S(() => w.value ? H.value ? t.multiple ? `${t.placeholder} (${V.value.length})` : j(V.value[0]) : t.placeholder : H.value ? t.multiple ? V.value.map(j).join(", ") : j(V.value[0]) : t.placeholder), R = Object.values(lt), u = S(
|
|
2004
|
+
() => typeof t.width == "string" && R.includes(t.width) ? `ds-select--w-${t.width}` : null
|
|
2005
|
+
), p = S(() => {
|
|
2006
|
+
if (!u.value)
|
|
1975
2007
|
return { width: typeof t.width == "number" ? `${t.width}px` : t.width };
|
|
1976
|
-
}),
|
|
1977
|
-
() =>
|
|
2008
|
+
}), x = S(
|
|
2009
|
+
() => c.value && m.value >= 0 ? f(m.value) : void 0
|
|
1978
2010
|
);
|
|
1979
|
-
function
|
|
1980
|
-
if (
|
|
1981
|
-
const
|
|
1982
|
-
return
|
|
1983
|
-
}
|
|
1984
|
-
function
|
|
1985
|
-
t.disabled || (
|
|
1986
|
-
var
|
|
1987
|
-
return (
|
|
2011
|
+
function le() {
|
|
2012
|
+
if ($.value.length === 0) return -1;
|
|
2013
|
+
const h = $.value.findIndex((I) => G(I.value));
|
|
2014
|
+
return h >= 0 ? h : 0;
|
|
2015
|
+
}
|
|
2016
|
+
function re() {
|
|
2017
|
+
t.disabled || (c.value = !0, m.value = le(), t.filterable && se(() => {
|
|
2018
|
+
var h;
|
|
2019
|
+
return (h = d.value) == null ? void 0 : h.focus();
|
|
1988
2020
|
}));
|
|
1989
2021
|
}
|
|
1990
|
-
function
|
|
1991
|
-
|
|
1992
|
-
var
|
|
1993
|
-
return (
|
|
2022
|
+
function oe(h = !0) {
|
|
2023
|
+
c.value = !1, m.value = -1, k.value && (k.value = "", o(Re, "")), h && se(() => {
|
|
2024
|
+
var I;
|
|
2025
|
+
return (I = v.value) == null ? void 0 : I.focus();
|
|
1994
2026
|
});
|
|
1995
2027
|
}
|
|
1996
|
-
function
|
|
1997
|
-
t.disabled || (
|
|
2028
|
+
function rt() {
|
|
2029
|
+
t.disabled || (c.value ? oe() : re());
|
|
1998
2030
|
}
|
|
1999
|
-
function
|
|
2031
|
+
function _e(h) {
|
|
2000
2032
|
if (t.disabled) return;
|
|
2001
2033
|
if (t.multiple) {
|
|
2002
|
-
const
|
|
2003
|
-
i.value =
|
|
2034
|
+
const z = V.value;
|
|
2035
|
+
i.value = z.includes(h) ? z.filter((P) => P !== h) : [...z, h];
|
|
2004
2036
|
return;
|
|
2005
2037
|
}
|
|
2006
|
-
const
|
|
2007
|
-
i.value =
|
|
2038
|
+
const I = G(h);
|
|
2039
|
+
i.value = I && t.showCheckbox ? null : h, oe();
|
|
2008
2040
|
}
|
|
2009
|
-
function
|
|
2041
|
+
function ct() {
|
|
2010
2042
|
t.disabled || (i.value = t.multiple ? [] : null);
|
|
2011
2043
|
}
|
|
2012
|
-
function
|
|
2013
|
-
const
|
|
2014
|
-
|
|
2015
|
-
var
|
|
2016
|
-
(
|
|
2044
|
+
function pe(h) {
|
|
2045
|
+
const I = $.value.length;
|
|
2046
|
+
I !== 0 && (m.value < 0 ? m.value = h > 0 ? 0 : I - 1 : m.value = (m.value + h + I) % I, se(() => {
|
|
2047
|
+
var z, P;
|
|
2048
|
+
(P = (z = document.getElementById(f(m.value))) == null ? void 0 : z.scrollIntoView) == null || P.call(z, { block: "nearest" });
|
|
2017
2049
|
}));
|
|
2018
2050
|
}
|
|
2019
|
-
function
|
|
2051
|
+
function ut(h) {
|
|
2020
2052
|
if (!t.disabled)
|
|
2021
|
-
switch (
|
|
2053
|
+
switch (h.key) {
|
|
2022
2054
|
case "ArrowDown":
|
|
2023
|
-
|
|
2055
|
+
h.preventDefault(), c.value ? pe(1) : re();
|
|
2024
2056
|
break;
|
|
2025
2057
|
case "ArrowUp":
|
|
2026
|
-
|
|
2058
|
+
h.preventDefault(), c.value ? pe(-1) : re();
|
|
2027
2059
|
break;
|
|
2028
2060
|
case "Home":
|
|
2029
|
-
|
|
2061
|
+
c.value && (h.preventDefault(), m.value = 0);
|
|
2030
2062
|
break;
|
|
2031
2063
|
case "End":
|
|
2032
|
-
|
|
2064
|
+
c.value && (h.preventDefault(), m.value = $.value.length - 1);
|
|
2033
2065
|
break;
|
|
2034
2066
|
case "Enter":
|
|
2035
2067
|
case " ":
|
|
2036
2068
|
case "Spacebar":
|
|
2037
|
-
if (
|
|
2038
|
-
|
|
2039
|
-
else if (
|
|
2040
|
-
const
|
|
2041
|
-
|
|
2069
|
+
if (h.preventDefault(), !c.value)
|
|
2070
|
+
re();
|
|
2071
|
+
else if (m.value >= 0) {
|
|
2072
|
+
const I = $.value[m.value];
|
|
2073
|
+
I && _e(I.value);
|
|
2042
2074
|
}
|
|
2043
2075
|
break;
|
|
2044
2076
|
case "Escape":
|
|
2045
|
-
|
|
2077
|
+
c.value && (h.preventDefault(), h.stopPropagation(), oe());
|
|
2046
2078
|
break;
|
|
2047
2079
|
case "Tab":
|
|
2048
|
-
|
|
2080
|
+
c.value && oe(!1);
|
|
2049
2081
|
break;
|
|
2050
2082
|
}
|
|
2051
2083
|
}
|
|
2052
|
-
function
|
|
2084
|
+
function ft(h) {
|
|
2053
2085
|
if (!t.disabled)
|
|
2054
|
-
switch (
|
|
2086
|
+
switch (h.key) {
|
|
2055
2087
|
case "ArrowDown":
|
|
2056
|
-
|
|
2088
|
+
h.preventDefault(), pe(1);
|
|
2057
2089
|
break;
|
|
2058
2090
|
case "ArrowUp":
|
|
2059
|
-
|
|
2091
|
+
h.preventDefault(), pe(-1);
|
|
2060
2092
|
break;
|
|
2061
2093
|
case "Enter":
|
|
2062
|
-
if (
|
|
2063
|
-
const
|
|
2064
|
-
|
|
2094
|
+
if (h.preventDefault(), m.value >= 0) {
|
|
2095
|
+
const I = $.value[m.value];
|
|
2096
|
+
I && _e(I.value);
|
|
2065
2097
|
}
|
|
2066
2098
|
break;
|
|
2067
2099
|
case "Escape":
|
|
2068
|
-
|
|
2100
|
+
h.preventDefault(), h.stopPropagation(), oe();
|
|
2069
2101
|
break;
|
|
2070
2102
|
case "Tab":
|
|
2071
|
-
|
|
2103
|
+
c.value && oe(!1);
|
|
2072
2104
|
break;
|
|
2073
2105
|
}
|
|
2074
2106
|
}
|
|
2075
|
-
function
|
|
2076
|
-
|
|
2107
|
+
function vt(h) {
|
|
2108
|
+
k.value = h.target.value, o(Re, k.value);
|
|
2077
2109
|
}
|
|
2078
|
-
|
|
2079
|
-
|
|
2110
|
+
Z($, (h) => {
|
|
2111
|
+
c.value && (h.length === 0 ? m.value = -1 : (m.value < 0 || m.value >= h.length) && (m.value = 0));
|
|
2080
2112
|
});
|
|
2081
|
-
function Ie(
|
|
2082
|
-
y.value && !y.value.contains(
|
|
2113
|
+
function Ie(h) {
|
|
2114
|
+
y.value && !y.value.contains(h.target) && oe(!1);
|
|
2083
2115
|
}
|
|
2084
|
-
return
|
|
2085
|
-
typeof document != "undefined" && (
|
|
2086
|
-
}),
|
|
2116
|
+
return Z(c, (h) => {
|
|
2117
|
+
typeof document != "undefined" && (h ? document.addEventListener("mousedown", Ie) : document.removeEventListener("mousedown", Ie));
|
|
2118
|
+
}), Z(
|
|
2087
2119
|
() => t.disabled,
|
|
2088
|
-
(
|
|
2089
|
-
|
|
2120
|
+
(h) => {
|
|
2121
|
+
h && c.value && oe(!1);
|
|
2090
2122
|
}
|
|
2091
|
-
),
|
|
2123
|
+
), de(() => {
|
|
2092
2124
|
typeof document != "undefined" && document.removeEventListener("mousedown", Ie);
|
|
2093
|
-
}), (
|
|
2125
|
+
}), (h, I) => (a(), l("div", {
|
|
2094
2126
|
ref_key: "rootRef",
|
|
2095
2127
|
ref: y,
|
|
2096
|
-
class:
|
|
2097
|
-
style:
|
|
2128
|
+
class: L(["ds-select", [`ds-select--${e.selectType}`, u.value, { "is-open": c.value }]]),
|
|
2129
|
+
style: U(p.value)
|
|
2098
2130
|
}, [
|
|
2099
2131
|
s("div", {
|
|
2100
|
-
class:
|
|
2132
|
+
class: L(["ds-select__control", { "is-disabled": e.disabled, "is-filter-selected": ae.value }])
|
|
2101
2133
|
}, [
|
|
2102
2134
|
s("button", {
|
|
2103
2135
|
ref_key: "triggerRef",
|
|
2104
|
-
ref:
|
|
2136
|
+
ref: v,
|
|
2105
2137
|
type: "button",
|
|
2106
2138
|
class: "ds-select__trigger",
|
|
2107
2139
|
disabled: e.disabled,
|
|
2108
2140
|
"aria-haspopup": "listbox",
|
|
2109
|
-
"aria-expanded":
|
|
2110
|
-
"aria-controls":
|
|
2111
|
-
"aria-activedescendant": e.filterable ? void 0 :
|
|
2112
|
-
onClick:
|
|
2113
|
-
onKeydown:
|
|
2141
|
+
"aria-expanded": c.value,
|
|
2142
|
+
"aria-controls": c.value ? E : void 0,
|
|
2143
|
+
"aria-activedescendant": e.filterable ? void 0 : x.value,
|
|
2144
|
+
onClick: rt,
|
|
2145
|
+
onKeydown: ut
|
|
2114
2146
|
}, [
|
|
2115
2147
|
s("span", {
|
|
2116
2148
|
class: "ds-select__summary",
|
|
2117
|
-
title:
|
|
2118
|
-
},
|
|
2119
|
-
], 40,
|
|
2120
|
-
|
|
2149
|
+
title: b.value
|
|
2150
|
+
}, T(b.value), 9, xl)
|
|
2151
|
+
], 40, Ol),
|
|
2152
|
+
w.value && H.value ? (a(), l("button", {
|
|
2121
2153
|
key: 0,
|
|
2122
2154
|
type: "button",
|
|
2123
2155
|
class: "ds-select__clear",
|
|
2124
2156
|
disabled: e.disabled,
|
|
2125
2157
|
"aria-label": e.clearLabel || void 0,
|
|
2126
|
-
onClick:
|
|
2127
|
-
}, [...
|
|
2158
|
+
onClick: ct
|
|
2159
|
+
}, [...I[1] || (I[1] = [
|
|
2128
2160
|
s("i", {
|
|
2129
2161
|
class: "material-icons",
|
|
2130
2162
|
"aria-hidden": "true"
|
|
2131
2163
|
}, "close", -1)
|
|
2132
|
-
])], 8,
|
|
2164
|
+
])], 8, Ml)) : (a(), l("i", Pl, "keyboard_arrow_down"))
|
|
2133
2165
|
], 2),
|
|
2134
|
-
|
|
2135
|
-
e.filterable ? (a(), l("div",
|
|
2136
|
-
|
|
2166
|
+
c.value ? (a(), l("div", zl, [
|
|
2167
|
+
e.filterable ? (a(), l("div", Vl, [
|
|
2168
|
+
I[2] || (I[2] = s("i", {
|
|
2137
2169
|
class: "material-icons ds-select__search-icon",
|
|
2138
2170
|
"aria-hidden": "true"
|
|
2139
2171
|
}, "search", -1)),
|
|
@@ -2144,115 +2176,115 @@ const ge = {
|
|
|
2144
2176
|
class: "ds-select__search-input",
|
|
2145
2177
|
role: "combobox",
|
|
2146
2178
|
"aria-expanded": "true",
|
|
2147
|
-
"aria-controls":
|
|
2148
|
-
"aria-activedescendant":
|
|
2179
|
+
"aria-controls": E,
|
|
2180
|
+
"aria-activedescendant": x.value,
|
|
2149
2181
|
"aria-autocomplete": "list",
|
|
2150
2182
|
autocomplete: "off",
|
|
2151
2183
|
"aria-label": e.searchLabel,
|
|
2152
2184
|
placeholder: e.searchPlaceholder,
|
|
2153
|
-
value:
|
|
2154
|
-
onInput:
|
|
2155
|
-
onKeydown:
|
|
2156
|
-
}, null, 40,
|
|
2157
|
-
])) :
|
|
2185
|
+
value: k.value,
|
|
2186
|
+
onInput: vt,
|
|
2187
|
+
onKeydown: ft
|
|
2188
|
+
}, null, 40, Fl)
|
|
2189
|
+
])) : g("", !0),
|
|
2158
2190
|
s("ul", {
|
|
2159
|
-
id:
|
|
2191
|
+
id: E,
|
|
2160
2192
|
class: "ds-select__listbox",
|
|
2161
2193
|
role: "listbox",
|
|
2162
2194
|
"aria-multiselectable": e.multiple || void 0,
|
|
2163
2195
|
"aria-busy": e.loading || void 0,
|
|
2164
|
-
onMousedown:
|
|
2196
|
+
onMousedown: I[0] || (I[0] = ue(() => {
|
|
2165
2197
|
}, ["prevent"]))
|
|
2166
2198
|
}, [
|
|
2167
|
-
e.loading ? (a(), l("li",
|
|
2168
|
-
|
|
2169
|
-
|
|
2199
|
+
e.loading ? (a(), l("li", Gl, [
|
|
2200
|
+
_(h.$slots, "loading", {}, () => [
|
|
2201
|
+
Y(D(ye), { size: "small" })
|
|
2170
2202
|
], !0)
|
|
2171
|
-
])) : (a(), l(
|
|
2172
|
-
(a(!0), l(
|
|
2173
|
-
key:
|
|
2174
|
-
role:
|
|
2175
|
-
"aria-labelledby":
|
|
2176
|
-
class:
|
|
2203
|
+
])) : (a(), l(W, { key: 1 }, [
|
|
2204
|
+
(a(!0), l(W, null, Q(A.value, (z) => (a(), l("li", {
|
|
2205
|
+
key: z.key,
|
|
2206
|
+
role: z.kind === "group" ? "group" : "presentation",
|
|
2207
|
+
"aria-labelledby": z.kind === "group" ? z.headerId : void 0,
|
|
2208
|
+
class: L(z.kind === "group" ? "ds-select__group" : "ds-select__run")
|
|
2177
2209
|
}, [
|
|
2178
|
-
|
|
2210
|
+
z.kind === "group" ? (a(), l("span", {
|
|
2179
2211
|
key: 0,
|
|
2180
|
-
id:
|
|
2212
|
+
id: z.headerId,
|
|
2181
2213
|
class: "ds-select__group-header"
|
|
2182
|
-
},
|
|
2183
|
-
(a(!0), l(
|
|
2184
|
-
id: f(
|
|
2185
|
-
key:
|
|
2186
|
-
class:
|
|
2187
|
-
"is-selected":
|
|
2188
|
-
"is-active":
|
|
2214
|
+
}, T(z.label), 9, Hl)) : g("", !0),
|
|
2215
|
+
(a(!0), l(W, null, Q(z.items, (P) => (a(), l("div", {
|
|
2216
|
+
id: f(P.index),
|
|
2217
|
+
key: P.option.value,
|
|
2218
|
+
class: L(["ds-select__option", {
|
|
2219
|
+
"is-selected": G(P.option.value),
|
|
2220
|
+
"is-active": P.index === m.value,
|
|
2189
2221
|
"ds-select__option--checkbox": e.showCheckbox
|
|
2190
2222
|
}]),
|
|
2191
2223
|
role: "option",
|
|
2192
|
-
"aria-selected":
|
|
2193
|
-
onClick:
|
|
2194
|
-
onMouseenter: (
|
|
2224
|
+
"aria-selected": G(P.option.value),
|
|
2225
|
+
onClick: ue((X) => _e(P.option.value), ["prevent"]),
|
|
2226
|
+
onMouseenter: (X) => m.value = P.index
|
|
2195
2227
|
}, [
|
|
2196
|
-
e.showCheckbox ? (a(),
|
|
2228
|
+
e.showCheckbox ? (a(), K(D(ot), {
|
|
2197
2229
|
key: 0,
|
|
2198
2230
|
class: "ds-select__option-check",
|
|
2199
|
-
"model-value":
|
|
2231
|
+
"model-value": G(P.option.value),
|
|
2200
2232
|
disabled: "",
|
|
2201
2233
|
"aria-hidden": "true"
|
|
2202
|
-
}, null, 8, ["model-value"])) :
|
|
2203
|
-
|
|
2204
|
-
option:
|
|
2205
|
-
selected:
|
|
2206
|
-
active:
|
|
2234
|
+
}, null, 8, ["model-value"])) : g("", !0),
|
|
2235
|
+
_(h.$slots, "option", {
|
|
2236
|
+
option: P.option,
|
|
2237
|
+
selected: G(P.option.value),
|
|
2238
|
+
active: P.index === m.value
|
|
2207
2239
|
}, () => [
|
|
2208
|
-
|
|
2240
|
+
P.option.icon ? (a(), l("i", {
|
|
2209
2241
|
key: 0,
|
|
2210
2242
|
class: "material-icons ds-select__option-icon",
|
|
2211
|
-
style:
|
|
2243
|
+
style: U(P.option.color ? { color: P.option.color } : void 0),
|
|
2212
2244
|
"aria-hidden": "true"
|
|
2213
|
-
},
|
|
2214
|
-
s("span",
|
|
2215
|
-
|
|
2216
|
-
|
|
2245
|
+
}, T(P.option.icon), 5)) : g("", !0),
|
|
2246
|
+
s("span", Yl, [
|
|
2247
|
+
q(T(P.option.label), 1),
|
|
2248
|
+
P.option.subLabel ? (a(), l("span", ql, ", " + T(P.option.subLabel), 1)) : g("", !0)
|
|
2217
2249
|
])
|
|
2218
2250
|
], !0)
|
|
2219
|
-
], 42,
|
|
2220
|
-
], 10,
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2251
|
+
], 42, Kl))), 128))
|
|
2252
|
+
], 10, Wl))), 128)),
|
|
2253
|
+
$.value.length === 0 ? (a(), l("li", jl, [
|
|
2254
|
+
_(h.$slots, "empty", {}, () => [
|
|
2255
|
+
q(T(e.emptyText), 1)
|
|
2224
2256
|
], !0)
|
|
2225
|
-
])) :
|
|
2257
|
+
])) : g("", !0)
|
|
2226
2258
|
], 64))
|
|
2227
|
-
], 40,
|
|
2228
|
-
])) :
|
|
2259
|
+
], 40, Ul)
|
|
2260
|
+
])) : g("", !0)
|
|
2229
2261
|
], 6));
|
|
2230
2262
|
}
|
|
2231
|
-
}),
|
|
2263
|
+
}), yn = /* @__PURE__ */ O(Xl, [["__scopeId", "data-v-47964929"]]), Zl = ["tabindex"], Ql = /* @__PURE__ */ B({
|
|
2232
2264
|
__name: "DsRow",
|
|
2233
2265
|
props: {
|
|
2234
2266
|
selected: { type: Boolean, default: !1 },
|
|
2235
2267
|
clickable: { type: Boolean, default: !1 }
|
|
2236
2268
|
},
|
|
2237
|
-
emits: [
|
|
2269
|
+
emits: [ee],
|
|
2238
2270
|
setup(e, { emit: n }) {
|
|
2239
2271
|
const t = e, o = n;
|
|
2240
2272
|
function i() {
|
|
2241
|
-
t.clickable && o(
|
|
2273
|
+
t.clickable && o(ee);
|
|
2242
2274
|
}
|
|
2243
|
-
function
|
|
2244
|
-
t.clickable && (
|
|
2275
|
+
function r(E) {
|
|
2276
|
+
t.clickable && (E.key === "Enter" || E.key === " ") && (E.preventDefault(), o(ee));
|
|
2245
2277
|
}
|
|
2246
|
-
return (
|
|
2247
|
-
class:
|
|
2278
|
+
return (E, f) => (a(), l("tr", {
|
|
2279
|
+
class: L(["ds-row", { "is-selected": e.selected, "is-clickable": e.clickable }]),
|
|
2248
2280
|
tabindex: e.clickable ? 0 : void 0,
|
|
2249
2281
|
onClick: i,
|
|
2250
|
-
onKeydown:
|
|
2282
|
+
onKeydown: r
|
|
2251
2283
|
}, [
|
|
2252
|
-
|
|
2253
|
-
], 42,
|
|
2284
|
+
_(E.$slots, "default", {}, void 0, !0)
|
|
2285
|
+
], 42, Zl));
|
|
2254
2286
|
}
|
|
2255
|
-
}),
|
|
2287
|
+
}), mn = /* @__PURE__ */ O(Ql, [["__scopeId", "data-v-c2d6c50b"]]), Jl = /* @__PURE__ */ B({
|
|
2256
2288
|
__name: "DsCell",
|
|
2257
2289
|
props: {
|
|
2258
2290
|
first: { type: Boolean, default: !1 },
|
|
@@ -2270,29 +2302,29 @@ const ge = {
|
|
|
2270
2302
|
}
|
|
2271
2303
|
},
|
|
2272
2304
|
setup(e) {
|
|
2273
|
-
const n = e, t = (i) => typeof i == "number" ? `${i}px` : i, o =
|
|
2305
|
+
const n = e, t = (i) => typeof i == "number" ? `${i}px` : i, o = S(() => {
|
|
2274
2306
|
const i = {};
|
|
2275
2307
|
if (n.width != null && (i.width = t(n.width)), n.pinned) {
|
|
2276
2308
|
i.position = "sticky";
|
|
2277
|
-
const
|
|
2278
|
-
i[n.pinned ===
|
|
2309
|
+
const r = n.pinnedOffset == null ? "0px" : t(n.pinnedOffset);
|
|
2310
|
+
i[n.pinned === ne.LEFT ? "left" : "right"] = r;
|
|
2279
2311
|
}
|
|
2280
2312
|
return Object.keys(i).length ? i : void 0;
|
|
2281
2313
|
});
|
|
2282
|
-
return (i,
|
|
2283
|
-
class:
|
|
2314
|
+
return (i, r) => (a(), l("td", {
|
|
2315
|
+
class: L(["ds-cell", {
|
|
2284
2316
|
"is-accent": e.first && e.selected,
|
|
2285
2317
|
"is-truncated": e.truncate,
|
|
2286
2318
|
"is-selected": e.selected,
|
|
2287
2319
|
"is-pinned": !!e.pinned,
|
|
2288
2320
|
[`is-pinned--${e.pinned}`]: !!e.pinned
|
|
2289
2321
|
}]),
|
|
2290
|
-
style:
|
|
2322
|
+
style: U(o.value)
|
|
2291
2323
|
}, [
|
|
2292
|
-
|
|
2324
|
+
_(i.$slots, "default", {}, void 0, !0)
|
|
2293
2325
|
], 6));
|
|
2294
2326
|
}
|
|
2295
|
-
}),
|
|
2327
|
+
}), hn = /* @__PURE__ */ O(Jl, [["__scopeId", "data-v-727b775d"]]), ei = {
|
|
2296
2328
|
SUCCESS: "success",
|
|
2297
2329
|
WARNING: "warning",
|
|
2298
2330
|
DANGER: "danger",
|
|
@@ -2302,27 +2334,27 @@ const ge = {
|
|
|
2302
2334
|
// the only solid-fill variant
|
|
2303
2335
|
ACCENT: "accent"
|
|
2304
2336
|
// maps to $info-* tokens, not $accent-*
|
|
2305
|
-
},
|
|
2337
|
+
}, ti = /* @__PURE__ */ B({
|
|
2306
2338
|
__name: "DsCustomTag",
|
|
2307
2339
|
props: {
|
|
2308
2340
|
type: {
|
|
2309
2341
|
type: String,
|
|
2310
|
-
default:
|
|
2342
|
+
default: ei.INFO
|
|
2311
2343
|
},
|
|
2312
2344
|
// Fully rounded (radius-full) sides vs the default radius-control.
|
|
2313
2345
|
round: Boolean
|
|
2314
2346
|
},
|
|
2315
2347
|
setup(e) {
|
|
2316
2348
|
return (n, t) => (a(), l("span", {
|
|
2317
|
-
class:
|
|
2349
|
+
class: L(["ds-custom-tag", [`ds-custom-tag--${e.type}`, { "is-round": e.round }]])
|
|
2318
2350
|
}, [
|
|
2319
|
-
|
|
2351
|
+
_(n.$slots, "default", {}, void 0, !0)
|
|
2320
2352
|
], 2));
|
|
2321
2353
|
}
|
|
2322
|
-
}),
|
|
2354
|
+
}), gn = /* @__PURE__ */ O(ti, [["__scopeId", "data-v-c0220631"]]), ai = { class: "ds-pill__text" }, li = ["aria-label"], ii = {
|
|
2323
2355
|
class: "material-icons",
|
|
2324
2356
|
"aria-hidden": "true"
|
|
2325
|
-
},
|
|
2357
|
+
}, ni = /* @__PURE__ */ B({
|
|
2326
2358
|
__name: "DsPill",
|
|
2327
2359
|
props: {
|
|
2328
2360
|
// Material Icons ligature name; when set, renders a trailing icon button.
|
|
@@ -2342,55 +2374,55 @@ const ge = {
|
|
|
2342
2374
|
default: ""
|
|
2343
2375
|
}
|
|
2344
2376
|
},
|
|
2345
|
-
emits: [
|
|
2377
|
+
emits: [ee],
|
|
2346
2378
|
setup(e, { emit: n }) {
|
|
2347
2379
|
const t = n;
|
|
2348
2380
|
return (o, i) => (a(), l("span", {
|
|
2349
|
-
class:
|
|
2350
|
-
style:
|
|
2381
|
+
class: L(["ds-pill", { "ds-pill--has-icon": e.icon }]),
|
|
2382
|
+
style: U(e.background ? { background: e.background } : void 0)
|
|
2351
2383
|
}, [
|
|
2352
|
-
s("span",
|
|
2353
|
-
|
|
2384
|
+
s("span", ai, [
|
|
2385
|
+
_(o.$slots, "default", {}, void 0, !0)
|
|
2354
2386
|
]),
|
|
2355
2387
|
e.icon ? (a(), l("button", {
|
|
2356
2388
|
key: 0,
|
|
2357
2389
|
type: "button",
|
|
2358
2390
|
class: "ds-pill__icon",
|
|
2359
2391
|
"aria-label": e.iconLabel || void 0,
|
|
2360
|
-
onClick: i[0] || (i[0] = (
|
|
2392
|
+
onClick: i[0] || (i[0] = (r) => t(D(ee)))
|
|
2361
2393
|
}, [
|
|
2362
|
-
s("i",
|
|
2363
|
-
], 8,
|
|
2394
|
+
s("i", ii, T(e.icon), 1)
|
|
2395
|
+
], 8, li)) : g("", !0)
|
|
2364
2396
|
], 6));
|
|
2365
2397
|
}
|
|
2366
|
-
}),
|
|
2398
|
+
}), pn = /* @__PURE__ */ O(ni, [["__scopeId", "data-v-a8d4ddbb"]]), si = {
|
|
2367
2399
|
key: 0,
|
|
2368
2400
|
class: "ds-pill-with-border__icon"
|
|
2369
|
-
},
|
|
2401
|
+
}, oi = { class: "ds-pill-with-border__label" }, di = /* @__PURE__ */ B({
|
|
2370
2402
|
__name: "DsPillWithBorder",
|
|
2371
|
-
emits: [
|
|
2403
|
+
emits: [ee],
|
|
2372
2404
|
setup(e, { emit: n }) {
|
|
2373
2405
|
const t = n;
|
|
2374
2406
|
return (o, i) => (a(), l("button", {
|
|
2375
2407
|
type: "button",
|
|
2376
2408
|
class: "ds-pill-with-border",
|
|
2377
|
-
onClick: i[0] || (i[0] = (
|
|
2409
|
+
onClick: i[0] || (i[0] = (r) => t(D(ee)))
|
|
2378
2410
|
}, [
|
|
2379
|
-
o.$slots.icon ? (a(), l("span",
|
|
2380
|
-
|
|
2381
|
-
])) :
|
|
2382
|
-
s("span",
|
|
2383
|
-
|
|
2411
|
+
o.$slots.icon ? (a(), l("span", si, [
|
|
2412
|
+
_(o.$slots, "icon", {}, void 0, !0)
|
|
2413
|
+
])) : g("", !0),
|
|
2414
|
+
s("span", oi, [
|
|
2415
|
+
_(o.$slots, "default", {}, void 0, !0)
|
|
2384
2416
|
])
|
|
2385
2417
|
]));
|
|
2386
2418
|
}
|
|
2387
|
-
}),
|
|
2419
|
+
}), Sn = /* @__PURE__ */ O(di, [["__scopeId", "data-v-8db4dcaf"]]), ri = ["aria-label"], ci = ["title"], ui = {
|
|
2388
2420
|
key: 1,
|
|
2389
2421
|
class: "ds-segmented-progress-bar-wrapper"
|
|
2390
|
-
},
|
|
2422
|
+
}, fi = ["aria-label"], vi = ["title"], bi = {
|
|
2391
2423
|
class: "ds-segmented-progress-bar__legend",
|
|
2392
2424
|
"aria-hidden": "true"
|
|
2393
|
-
},
|
|
2425
|
+
}, yi = { class: "ds-segmented-progress-bar__legend-label" }, mi = /* @__PURE__ */ B({
|
|
2394
2426
|
inheritAttrs: !1,
|
|
2395
2427
|
__name: "DsSegmentedProgressBar",
|
|
2396
2428
|
props: {
|
|
@@ -2411,70 +2443,70 @@ const ge = {
|
|
|
2411
2443
|
showLegend: { type: Boolean, default: !1 }
|
|
2412
2444
|
},
|
|
2413
2445
|
setup(e) {
|
|
2414
|
-
const n = e, t =
|
|
2446
|
+
const n = e, t = he(), o = S(() => n.segments.filter((r) => !!r.name)), i = S(
|
|
2415
2447
|
() => !!t.legend || n.showLegend && o.value.length > 0
|
|
2416
2448
|
);
|
|
2417
|
-
return (
|
|
2418
|
-
s("div",
|
|
2449
|
+
return (r, E) => i.value ? (a(), l("div", ui, [
|
|
2450
|
+
s("div", ke(r.$attrs, {
|
|
2419
2451
|
class: "ds-segmented-progress-bar",
|
|
2420
2452
|
role: "img",
|
|
2421
2453
|
"aria-label": e.label || void 0,
|
|
2422
2454
|
style: { height: `${e.height}px` }
|
|
2423
2455
|
}), [
|
|
2424
|
-
(a(!0), l(
|
|
2425
|
-
var
|
|
2456
|
+
(a(!0), l(W, null, Q(e.segments, (f, y) => {
|
|
2457
|
+
var v;
|
|
2426
2458
|
return a(), l("div", {
|
|
2427
|
-
key: `${(
|
|
2459
|
+
key: `${(v = f.name) != null ? v : ""}-${y}`,
|
|
2428
2460
|
class: "ds-segmented-progress-bar__segment",
|
|
2429
|
-
style:
|
|
2461
|
+
style: U({
|
|
2430
2462
|
width: `${e.total > 0 ? f.amount * 100 / e.total : 0}%`,
|
|
2431
2463
|
backgroundColor: f.color
|
|
2432
2464
|
}),
|
|
2433
2465
|
title: f.name || void 0
|
|
2434
|
-
}, null, 12,
|
|
2466
|
+
}, null, 12, vi);
|
|
2435
2467
|
}), 128))
|
|
2436
|
-
], 16,
|
|
2437
|
-
|
|
2438
|
-
s("ul",
|
|
2439
|
-
(a(!0), l(
|
|
2468
|
+
], 16, fi),
|
|
2469
|
+
_(r.$slots, "legend", {}, () => [
|
|
2470
|
+
s("ul", bi, [
|
|
2471
|
+
(a(!0), l(W, null, Q(o.value, (f, y) => (a(), l("li", {
|
|
2440
2472
|
key: `${f.name}-${y}`,
|
|
2441
2473
|
class: "ds-segmented-progress-bar__legend-item"
|
|
2442
2474
|
}, [
|
|
2443
2475
|
s("span", {
|
|
2444
2476
|
class: "ds-segmented-progress-bar__legend-swatch",
|
|
2445
|
-
style:
|
|
2477
|
+
style: U({ backgroundColor: f.color })
|
|
2446
2478
|
}, null, 4),
|
|
2447
|
-
s("span",
|
|
2479
|
+
s("span", yi, T(f.name), 1)
|
|
2448
2480
|
]))), 128))
|
|
2449
2481
|
])
|
|
2450
2482
|
], !0)
|
|
2451
|
-
])) : (a(), l("div",
|
|
2483
|
+
])) : (a(), l("div", ke({ key: 0 }, r.$attrs, {
|
|
2452
2484
|
class: "ds-segmented-progress-bar",
|
|
2453
2485
|
role: "img",
|
|
2454
2486
|
"aria-label": e.label || void 0,
|
|
2455
2487
|
style: { height: `${e.height}px` }
|
|
2456
2488
|
}), [
|
|
2457
|
-
(a(!0), l(
|
|
2458
|
-
var
|
|
2489
|
+
(a(!0), l(W, null, Q(e.segments, (f, y) => {
|
|
2490
|
+
var v;
|
|
2459
2491
|
return a(), l("div", {
|
|
2460
|
-
key: `${(
|
|
2492
|
+
key: `${(v = f.name) != null ? v : ""}-${y}`,
|
|
2461
2493
|
class: "ds-segmented-progress-bar__segment",
|
|
2462
|
-
style:
|
|
2494
|
+
style: U({
|
|
2463
2495
|
width: `${e.total > 0 ? f.amount * 100 / e.total : 0}%`,
|
|
2464
2496
|
backgroundColor: f.color
|
|
2465
2497
|
}),
|
|
2466
2498
|
title: f.name || void 0
|
|
2467
|
-
}, null, 12,
|
|
2499
|
+
}, null, 12, ci);
|
|
2468
2500
|
}), 128))
|
|
2469
|
-
], 16,
|
|
2501
|
+
], 16, ri));
|
|
2470
2502
|
}
|
|
2471
|
-
}),
|
|
2503
|
+
}), kn = /* @__PURE__ */ O(mi, [["__scopeId", "data-v-89dc768c"]]), hi = {
|
|
2472
2504
|
key: 0,
|
|
2473
2505
|
class: "ds-empty-state__header"
|
|
2474
|
-
},
|
|
2506
|
+
}, gi = { class: "ds-empty-state__body" }, pi = ["src"], Si = { class: "ds-empty-state__title" }, ki = {
|
|
2475
2507
|
key: 1,
|
|
2476
2508
|
class: "ds-empty-state__subtitle"
|
|
2477
|
-
},
|
|
2509
|
+
}, $i = /* @__PURE__ */ B({
|
|
2478
2510
|
__name: "DsEmptyState",
|
|
2479
2511
|
props: {
|
|
2480
2512
|
// Illustration URL; decorative (rendered with alt="").
|
|
@@ -2486,32 +2518,32 @@ const ge = {
|
|
|
2486
2518
|
},
|
|
2487
2519
|
setup(e) {
|
|
2488
2520
|
return (n, t) => (a(), l("div", {
|
|
2489
|
-
class:
|
|
2521
|
+
class: L(["ds-empty-state", { "is-rounded": e.roundedBorder }])
|
|
2490
2522
|
}, [
|
|
2491
|
-
n.$slots["table-header"] ? (a(), l("div",
|
|
2492
|
-
|
|
2493
|
-
])) :
|
|
2494
|
-
s("div",
|
|
2523
|
+
n.$slots["table-header"] ? (a(), l("div", hi, [
|
|
2524
|
+
_(n.$slots, "table-header", {}, void 0, !0)
|
|
2525
|
+
])) : g("", !0),
|
|
2526
|
+
s("div", gi, [
|
|
2495
2527
|
e.image ? (a(), l("img", {
|
|
2496
2528
|
key: 0,
|
|
2497
2529
|
src: e.image,
|
|
2498
2530
|
alt: "",
|
|
2499
2531
|
class: "ds-empty-state__image"
|
|
2500
|
-
}, null, 8,
|
|
2501
|
-
s("p",
|
|
2502
|
-
e.subtitle ? (a(), l("p",
|
|
2503
|
-
|
|
2532
|
+
}, null, 8, pi)) : g("", !0),
|
|
2533
|
+
s("p", Si, T(e.title), 1),
|
|
2534
|
+
e.subtitle ? (a(), l("p", ki, T(e.subtitle), 1)) : g("", !0),
|
|
2535
|
+
_(n.$slots, "button", {}, void 0, !0)
|
|
2504
2536
|
])
|
|
2505
2537
|
], 2));
|
|
2506
2538
|
}
|
|
2507
|
-
}),
|
|
2539
|
+
}), $n = /* @__PURE__ */ O($i, [["__scopeId", "data-v-159c48f9"]]), wi = ["aria-label"], Ei = {
|
|
2508
2540
|
key: 0,
|
|
2509
2541
|
class: "ds-paginator__limit-message"
|
|
2510
|
-
},
|
|
2542
|
+
}, Ti = { class: "ds-paginator__pager" }, Li = {
|
|
2511
2543
|
key: 0,
|
|
2512
2544
|
class: "ds-paginator__ellipsis",
|
|
2513
2545
|
"aria-hidden": "true"
|
|
2514
|
-
},
|
|
2546
|
+
}, Ci = ["aria-current", "onClick"], _i = ["aria-label", "value"], Ii = ["value"], Di = "…l", Ri = "…r", Ai = /* @__PURE__ */ B({
|
|
2515
2547
|
__name: "DsPaginator",
|
|
2516
2548
|
props: {
|
|
2517
2549
|
total: { type: Number, required: !0 },
|
|
@@ -2528,58 +2560,58 @@ const ge = {
|
|
|
2528
2560
|
paginationLabel: { type: String, default: "" },
|
|
2529
2561
|
pageSizeLabel: { type: String, default: "" }
|
|
2530
2562
|
},
|
|
2531
|
-
emits: [
|
|
2563
|
+
emits: [We, He],
|
|
2532
2564
|
setup(e, { emit: n }) {
|
|
2533
|
-
const t = e, o = n, i =
|
|
2565
|
+
const t = e, o = n, i = S(() => Math.max(1, Math.ceil(t.total / t.pageSize))), r = S(() => {
|
|
2534
2566
|
const y = i.value;
|
|
2535
2567
|
if (y <= 7)
|
|
2536
|
-
return Array.from({ length: y }, (
|
|
2537
|
-
const
|
|
2538
|
-
|
|
2539
|
-
const
|
|
2540
|
-
for (let
|
|
2541
|
-
d.push(
|
|
2542
|
-
return
|
|
2568
|
+
return Array.from({ length: y }, (k, w) => w + 1);
|
|
2569
|
+
const v = t.currentPage, d = [1];
|
|
2570
|
+
v > 4 && d.push(Di);
|
|
2571
|
+
const c = Math.max(2, v - 2), m = Math.min(y - 1, v + 2);
|
|
2572
|
+
for (let k = c; k <= m; k++)
|
|
2573
|
+
d.push(k);
|
|
2574
|
+
return v < y - 3 && d.push(Ri), d.push(y), d;
|
|
2543
2575
|
});
|
|
2544
|
-
function
|
|
2545
|
-
y < 1 || y > i.value || o(
|
|
2576
|
+
function E(y) {
|
|
2577
|
+
y < 1 || y > i.value || o(We, y);
|
|
2546
2578
|
}
|
|
2547
2579
|
function f(y) {
|
|
2548
|
-
const
|
|
2549
|
-
o(
|
|
2580
|
+
const v = y.target;
|
|
2581
|
+
o(He, Number(v.value));
|
|
2550
2582
|
}
|
|
2551
|
-
return (y,
|
|
2583
|
+
return (y, v) => (a(), l("nav", {
|
|
2552
2584
|
class: "ds-paginator",
|
|
2553
2585
|
"aria-label": e.paginationLabel || void 0
|
|
2554
2586
|
}, [
|
|
2555
|
-
e.limitMessage ? (a(), l("span",
|
|
2556
|
-
s("div",
|
|
2557
|
-
|
|
2587
|
+
e.limitMessage ? (a(), l("span", Ei, T(e.limitMessage), 1)) : g("", !0),
|
|
2588
|
+
s("div", Ti, [
|
|
2589
|
+
Y(D(fe), {
|
|
2558
2590
|
variant: "tertiary",
|
|
2559
2591
|
circle: "",
|
|
2560
2592
|
size: "medium",
|
|
2561
2593
|
"left-icon": "chevron_left",
|
|
2562
2594
|
"aria-label": e.prevLabel || void 0,
|
|
2563
2595
|
disabled: e.currentPage <= 1,
|
|
2564
|
-
onClick:
|
|
2596
|
+
onClick: v[0] || (v[0] = (d) => E(e.currentPage - 1))
|
|
2565
2597
|
}, null, 8, ["aria-label", "disabled"]),
|
|
2566
|
-
(a(!0), l(
|
|
2567
|
-
typeof d == "string" ? (a(), l("span",
|
|
2598
|
+
(a(!0), l(W, null, Q(r.value, (d) => (a(), l(W, { key: d }, [
|
|
2599
|
+
typeof d == "string" ? (a(), l("span", Li, "…")) : (a(), l("button", {
|
|
2568
2600
|
key: 1,
|
|
2569
2601
|
type: "button",
|
|
2570
|
-
class:
|
|
2602
|
+
class: L(["ds-paginator__page", { "is-active": d === e.currentPage }]),
|
|
2571
2603
|
"aria-current": d === e.currentPage ? "page" : void 0,
|
|
2572
|
-
onClick: (
|
|
2573
|
-
},
|
|
2604
|
+
onClick: (c) => E(d)
|
|
2605
|
+
}, T(d), 11, Ci))
|
|
2574
2606
|
], 64))), 128)),
|
|
2575
|
-
|
|
2607
|
+
Y(D(fe), {
|
|
2576
2608
|
variant: "tertiary",
|
|
2577
2609
|
circle: "",
|
|
2578
2610
|
size: "medium",
|
|
2579
2611
|
"left-icon": "chevron_right",
|
|
2580
2612
|
"aria-label": e.nextLabel || void 0,
|
|
2581
2613
|
disabled: e.currentPage >= i.value,
|
|
2582
|
-
onClick:
|
|
2614
|
+
onClick: v[1] || (v[1] = (d) => E(e.currentPage + 1))
|
|
2583
2615
|
}, null, 8, ["aria-label", "disabled"])
|
|
2584
2616
|
]),
|
|
2585
2617
|
s("select", {
|
|
@@ -2588,20 +2620,20 @@ const ge = {
|
|
|
2588
2620
|
value: e.pageSize,
|
|
2589
2621
|
onChange: f
|
|
2590
2622
|
}, [
|
|
2591
|
-
(a(!0), l(
|
|
2623
|
+
(a(!0), l(W, null, Q(e.pageSizes, (d) => (a(), l("option", {
|
|
2592
2624
|
key: d,
|
|
2593
2625
|
value: d
|
|
2594
|
-
},
|
|
2595
|
-
], 40,
|
|
2596
|
-
], 8,
|
|
2626
|
+
}, T(d) + T(e.pageSizeSuffix), 9, Ii))), 128))
|
|
2627
|
+
], 40, _i)
|
|
2628
|
+
], 8, wi));
|
|
2597
2629
|
}
|
|
2598
|
-
}),
|
|
2630
|
+
}), wn = /* @__PURE__ */ O(Ai, [["__scopeId", "data-v-a42e7bb4"]]), Ni = ["aria-current", "title"], Bi = {
|
|
2599
2631
|
class: "ds-menu-item__icon material-icons",
|
|
2600
2632
|
"aria-hidden": "true"
|
|
2601
|
-
},
|
|
2633
|
+
}, Oi = {
|
|
2602
2634
|
key: 0,
|
|
2603
2635
|
class: "ds-menu-item__label"
|
|
2604
|
-
},
|
|
2636
|
+
}, xi = /* @__PURE__ */ B({
|
|
2605
2637
|
__name: "DsMenuItem",
|
|
2606
2638
|
props: {
|
|
2607
2639
|
// Material Icons ligature name (rendered via <i class="material-icons">).
|
|
@@ -2613,28 +2645,28 @@ const ge = {
|
|
|
2613
2645
|
// Icon-only collapsed rail.
|
|
2614
2646
|
collapsed: Boolean
|
|
2615
2647
|
},
|
|
2616
|
-
emits: [
|
|
2648
|
+
emits: [Ke],
|
|
2617
2649
|
setup(e, { emit: n }) {
|
|
2618
2650
|
const t = n;
|
|
2619
2651
|
function o(i) {
|
|
2620
|
-
t(
|
|
2652
|
+
t(Ke, i);
|
|
2621
2653
|
}
|
|
2622
|
-
return (i,
|
|
2654
|
+
return (i, r) => (a(), l("button", {
|
|
2623
2655
|
type: "button",
|
|
2624
|
-
class:
|
|
2656
|
+
class: L(["ds-menu-item", { "is-active": e.active, "is-collapsed": e.collapsed }]),
|
|
2625
2657
|
"aria-current": e.active ? "page" : void 0,
|
|
2626
2658
|
title: e.text || void 0,
|
|
2627
2659
|
onClick: o
|
|
2628
2660
|
}, [
|
|
2629
|
-
s("i",
|
|
2630
|
-
e.text || i.$slots.default ? (a(), l("span",
|
|
2631
|
-
|
|
2632
|
-
|
|
2661
|
+
s("i", Bi, T(e.icon), 1),
|
|
2662
|
+
e.text || i.$slots.default ? (a(), l("span", Oi, [
|
|
2663
|
+
_(i.$slots, "default", {}, () => [
|
|
2664
|
+
q(T(e.text), 1)
|
|
2633
2665
|
], !0)
|
|
2634
|
-
])) :
|
|
2635
|
-
], 10,
|
|
2666
|
+
])) : g("", !0)
|
|
2667
|
+
], 10, Ni));
|
|
2636
2668
|
}
|
|
2637
|
-
}),
|
|
2669
|
+
}), En = /* @__PURE__ */ O(xi, [["__scopeId", "data-v-0fe17e63"]]), ce = {
|
|
2638
2670
|
ACTIVE: "active",
|
|
2639
2671
|
// current step — accent-tint chip, filled marker
|
|
2640
2672
|
COMPLETED: "completed",
|
|
@@ -2643,10 +2675,10 @@ const ge = {
|
|
|
2643
2675
|
// visited but unfinished — red "!" chip
|
|
2644
2676
|
NEUTRAL: "neutral"
|
|
2645
2677
|
// upcoming — outlined marker
|
|
2646
|
-
},
|
|
2678
|
+
}, Mi = { class: "ds-wizard-stepper" }, Pi = { class: "ds-wizard-stepper__steps" }, zi = {
|
|
2647
2679
|
class: "ds-wizard-step__marker",
|
|
2648
2680
|
"aria-hidden": "true"
|
|
2649
|
-
},
|
|
2681
|
+
}, Vi = { class: "ds-wizard-step__label" }, Fi = /* @__PURE__ */ B({
|
|
2650
2682
|
__name: "DsWizardStepper",
|
|
2651
2683
|
props: {
|
|
2652
2684
|
steps: { type: Array, default: () => [] },
|
|
@@ -2658,53 +2690,53 @@ const ge = {
|
|
|
2658
2690
|
// Whether the step chips are interactive (advance buttons are always active).
|
|
2659
2691
|
clickable: { type: Boolean, default: !0 }
|
|
2660
2692
|
},
|
|
2661
|
-
emits: [
|
|
2693
|
+
emits: [Ae, Ye],
|
|
2662
2694
|
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:
|
|
2695
|
+
const t = e, o = n, i = S(() => t.value === t.steps.length), r = S(
|
|
2696
|
+
() => t.steps.map((v, d) => {
|
|
2697
|
+
var k;
|
|
2698
|
+
const c = d + 1;
|
|
2699
|
+
let m;
|
|
2700
|
+
return c === t.value ? m = ce.ACTIVE : v.completed ? m = ce.COMPLETED : v.visited ? m = ce.INCOMPLETE : c < t.value ? m = ce.COMPLETED : m = ce.NEUTRAL, {
|
|
2701
|
+
key: (k = v.key) != null ? k : c,
|
|
2702
|
+
index: c,
|
|
2703
|
+
label: v.label,
|
|
2704
|
+
state: m,
|
|
2705
|
+
current: m === ce.ACTIVE,
|
|
2706
|
+
marker: m === ce.INCOMPLETE ? "!" : String(c)
|
|
2675
2707
|
};
|
|
2676
2708
|
})
|
|
2677
2709
|
);
|
|
2678
|
-
function
|
|
2679
|
-
t.clickable && o(
|
|
2710
|
+
function E(v) {
|
|
2711
|
+
t.clickable && o(Ae, v);
|
|
2680
2712
|
}
|
|
2681
2713
|
function f() {
|
|
2682
|
-
t.value < t.steps.length && o(
|
|
2714
|
+
t.value < t.steps.length && o(Ae, t.value + 1);
|
|
2683
2715
|
}
|
|
2684
2716
|
function y() {
|
|
2685
|
-
o(
|
|
2717
|
+
o(Ye);
|
|
2686
2718
|
}
|
|
2687
|
-
return (
|
|
2688
|
-
s("ol",
|
|
2689
|
-
(a(!0), l(
|
|
2690
|
-
key:
|
|
2719
|
+
return (v, d) => (a(), l("div", Mi, [
|
|
2720
|
+
s("ol", Pi, [
|
|
2721
|
+
(a(!0), l(W, null, Q(r.value, (c) => (a(), l("li", {
|
|
2722
|
+
key: c.key,
|
|
2691
2723
|
class: "ds-wizard-stepper__item"
|
|
2692
2724
|
}, [
|
|
2693
|
-
(a(),
|
|
2725
|
+
(a(), K(pt(e.clickable ? "button" : "div"), {
|
|
2694
2726
|
type: e.clickable ? "button" : void 0,
|
|
2695
|
-
class:
|
|
2696
|
-
"aria-current":
|
|
2697
|
-
onClick: (
|
|
2727
|
+
class: L(["ds-wizard-step", [`ds-wizard-step--${c.state}`, { "is-clickable": e.clickable }]]),
|
|
2728
|
+
"aria-current": c.current ? "step" : void 0,
|
|
2729
|
+
onClick: (m) => E(c.index)
|
|
2698
2730
|
}, {
|
|
2699
2731
|
default: ie(() => [
|
|
2700
|
-
s("span",
|
|
2701
|
-
s("span",
|
|
2732
|
+
s("span", zi, T(c.marker), 1),
|
|
2733
|
+
s("span", Vi, T(c.label), 1)
|
|
2702
2734
|
]),
|
|
2703
2735
|
_: 2
|
|
2704
2736
|
}, 1032, ["type", "class", "aria-current", "onClick"]))
|
|
2705
2737
|
]))), 128))
|
|
2706
2738
|
]),
|
|
2707
|
-
!i.value && e.nextLabel ? (a(),
|
|
2739
|
+
!i.value && e.nextLabel ? (a(), K(D(fe), {
|
|
2708
2740
|
key: 0,
|
|
2709
2741
|
variant: "primary",
|
|
2710
2742
|
size: "large",
|
|
@@ -2712,78 +2744,361 @@ const ge = {
|
|
|
2712
2744
|
onClick: f
|
|
2713
2745
|
}, {
|
|
2714
2746
|
default: ie(() => [
|
|
2715
|
-
|
|
2747
|
+
q(T(e.nextLabel), 1)
|
|
2716
2748
|
]),
|
|
2717
2749
|
_: 1
|
|
2718
|
-
})) :
|
|
2719
|
-
i.value && e.finalStepLabel ? (a(),
|
|
2750
|
+
})) : g("", !0),
|
|
2751
|
+
i.value && e.finalStepLabel ? (a(), K(D(fe), {
|
|
2720
2752
|
key: 1,
|
|
2721
2753
|
variant: "primary",
|
|
2722
2754
|
size: "large",
|
|
2723
2755
|
onClick: y
|
|
2724
2756
|
}, {
|
|
2725
2757
|
default: ie(() => [
|
|
2726
|
-
|
|
2758
|
+
q(T(e.finalStepLabel), 1)
|
|
2727
2759
|
]),
|
|
2728
2760
|
_: 1
|
|
2729
|
-
})) :
|
|
2761
|
+
})) : g("", !0)
|
|
2730
2762
|
]));
|
|
2731
2763
|
}
|
|
2732
|
-
}),
|
|
2764
|
+
}), Tn = /* @__PURE__ */ O(Fi, [["__scopeId", "data-v-d6f1e6d7"]]), it = {
|
|
2765
|
+
/** Right-to-left: panel pinned to the right edge, ring on its left border. */
|
|
2766
|
+
RTL: "rtl",
|
|
2767
|
+
/** Left-to-right: panel pinned to the left edge, ring on its right border. */
|
|
2768
|
+
LTR: "ltr"
|
|
2769
|
+
}, Ui = ["aria-modal", "aria-labelledby", "aria-label"], Gi = {
|
|
2770
|
+
key: 1,
|
|
2771
|
+
class: "ds-drawer__header"
|
|
2772
|
+
}, Wi = ["id"], Hi = {
|
|
2773
|
+
key: 0,
|
|
2774
|
+
class: "ds-drawer__controls"
|
|
2775
|
+
}, Ki = {
|
|
2776
|
+
key: 0,
|
|
2777
|
+
class: "ds-drawer__actions"
|
|
2778
|
+
}, Yi = ["aria-label"], qi = { class: "ds-drawer__body" }, ji = {
|
|
2779
|
+
key: 2,
|
|
2780
|
+
class: "ds-drawer__footer"
|
|
2781
|
+
}, Xi = /* @__PURE__ */ B({
|
|
2782
|
+
__name: "DsDrawer",
|
|
2783
|
+
props: {
|
|
2784
|
+
open: Boolean,
|
|
2785
|
+
title: { type: String, default: "" },
|
|
2786
|
+
showClose: { type: Boolean, default: !0 },
|
|
2787
|
+
// Accessible name for the icon-only close button; English default (app owns i18n),
|
|
2788
|
+
// matching DsModal so the control is never unnamed.
|
|
2789
|
+
closeLabel: { type: String, default: "Close" },
|
|
2790
|
+
direction: {
|
|
2791
|
+
type: String,
|
|
2792
|
+
default: it.RTL
|
|
2793
|
+
},
|
|
2794
|
+
// Width in px (a number, not a CSS length): the drag math and the min/max bounds
|
|
2795
|
+
// are numeric, and the consumer's stored width is a number too.
|
|
2796
|
+
width: { type: Number, default: 440 },
|
|
2797
|
+
resizable: Boolean,
|
|
2798
|
+
minWidth: { type: Number, default: 360 },
|
|
2799
|
+
maxWidth: { type: Number, default: 720 },
|
|
2800
|
+
closeOnOverlay: { type: Boolean, default: !0 },
|
|
2801
|
+
closeOnEscape: { type: Boolean, default: !0 },
|
|
2802
|
+
// Cancelable close guard: return false to keep the drawer open. Gates Escape,
|
|
2803
|
+
// the overlay click and the × button alike.
|
|
2804
|
+
beforeClose: { type: Function, default: null },
|
|
2805
|
+
// false = render in-flow (no portal / backdrop / scroll-lock) for specimen cards.
|
|
2806
|
+
fixed: { type: Boolean, default: !0 }
|
|
2807
|
+
},
|
|
2808
|
+
emits: [J, je, Xe, Ze],
|
|
2809
|
+
setup(e, { emit: n }) {
|
|
2810
|
+
const t = e, o = n, i = F(null);
|
|
2811
|
+
let r = null;
|
|
2812
|
+
const E = he(), f = ge(), y = S(() => t.title && !E.header ? f : void 0), v = (u) => Math.min(Math.max(u, t.minWidth), Math.max(t.minWidth, t.maxWidth)), d = F(v(t.width));
|
|
2813
|
+
Z(
|
|
2814
|
+
() => [t.width, t.minWidth, t.maxWidth],
|
|
2815
|
+
() => {
|
|
2816
|
+
N.value || (d.value = v(t.width));
|
|
2817
|
+
}
|
|
2818
|
+
);
|
|
2819
|
+
const c = S(() => ({ width: `${d.value}px` }));
|
|
2820
|
+
async function m() {
|
|
2821
|
+
t.beforeClose && await t.beforeClose() === !1 || o(J);
|
|
2822
|
+
}
|
|
2823
|
+
let k = !1;
|
|
2824
|
+
function w() {
|
|
2825
|
+
if (k) {
|
|
2826
|
+
k = !1;
|
|
2827
|
+
return;
|
|
2828
|
+
}
|
|
2829
|
+
t.fixed && t.closeOnOverlay && m();
|
|
2830
|
+
}
|
|
2831
|
+
const N = F(!1);
|
|
2832
|
+
let C = 0, $ = 0;
|
|
2833
|
+
function A(u) {
|
|
2834
|
+
const p = u.clientX - C, x = t.direction === it.RTL ? $ - p : $ + p;
|
|
2835
|
+
return v(x);
|
|
2836
|
+
}
|
|
2837
|
+
function V(u) {
|
|
2838
|
+
t.resizable && (N.value = !0, C = u.clientX, $ = d.value, document.addEventListener("mousemove", H), document.addEventListener("mouseup", ae), o(je, d.value));
|
|
2839
|
+
}
|
|
2840
|
+
function H(u) {
|
|
2841
|
+
N.value && (d.value = A(u), o(Xe, d.value));
|
|
2842
|
+
}
|
|
2843
|
+
function ae() {
|
|
2844
|
+
N.value && (G(), N.value = !1, k = !0, setTimeout(() => k = !1, 0), o(Ze, d.value));
|
|
2845
|
+
}
|
|
2846
|
+
function G() {
|
|
2847
|
+
document.removeEventListener("mousemove", H), document.removeEventListener("mouseup", ae);
|
|
2848
|
+
}
|
|
2849
|
+
function M() {
|
|
2850
|
+
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(
|
|
2851
|
+
(p) => !p.closest("[hidden]") && p.getAttribute("aria-hidden") !== "true"
|
|
2852
|
+
) : [];
|
|
2853
|
+
}
|
|
2854
|
+
function j(u) {
|
|
2855
|
+
var re;
|
|
2856
|
+
if (u.key === "Escape") {
|
|
2857
|
+
t.closeOnEscape && m();
|
|
2858
|
+
return;
|
|
2859
|
+
}
|
|
2860
|
+
if (u.key !== "Tab") return;
|
|
2861
|
+
const p = M();
|
|
2862
|
+
if (p.length === 0) {
|
|
2863
|
+
u.preventDefault(), (re = i.value) == null || re.focus();
|
|
2864
|
+
return;
|
|
2865
|
+
}
|
|
2866
|
+
const x = p[0], le = p[p.length - 1];
|
|
2867
|
+
u.shiftKey && document.activeElement === x ? (u.preventDefault(), le.focus()) : !u.shiftKey && document.activeElement === le && (u.preventDefault(), x.focus());
|
|
2868
|
+
}
|
|
2869
|
+
function b() {
|
|
2870
|
+
r = document.activeElement, document.addEventListener("keydown", j), document.body.style.overflow = "hidden", se(() => {
|
|
2871
|
+
var u, p;
|
|
2872
|
+
return (p = (u = M()[0]) != null ? u : i.value) == null ? void 0 : p.focus();
|
|
2873
|
+
});
|
|
2874
|
+
}
|
|
2875
|
+
function R(u = !0) {
|
|
2876
|
+
var p;
|
|
2877
|
+
document.removeEventListener("keydown", j), document.body.style.overflow = "", u && ((p = r == null ? void 0 : r.focus) == null || p.call(r));
|
|
2878
|
+
}
|
|
2879
|
+
return Z(
|
|
2880
|
+
() => t.open && t.fixed,
|
|
2881
|
+
(u, p) => {
|
|
2882
|
+
typeof document != "undefined" && (u ? b() : p && R());
|
|
2883
|
+
},
|
|
2884
|
+
{ immediate: !0 }
|
|
2885
|
+
), de(() => {
|
|
2886
|
+
typeof document != "undefined" && (G(), R(!1));
|
|
2887
|
+
}), (u, p) => (a(), K(Pe, {
|
|
2888
|
+
to: "body",
|
|
2889
|
+
disabled: !e.fixed
|
|
2890
|
+
}, [
|
|
2891
|
+
Y(me, {
|
|
2892
|
+
name: `ds-drawer-${e.direction}`
|
|
2893
|
+
}, {
|
|
2894
|
+
default: ie(() => [
|
|
2895
|
+
e.open ? (a(), l("div", {
|
|
2896
|
+
key: 0,
|
|
2897
|
+
class: L(["ds-drawer", [`ds-drawer--${e.direction}`, { "is-fixed": e.fixed, "is-resizing": N.value }]]),
|
|
2898
|
+
onClick: ue(w, ["self"])
|
|
2899
|
+
}, [
|
|
2900
|
+
s("aside", {
|
|
2901
|
+
ref_key: "panelRef",
|
|
2902
|
+
ref: i,
|
|
2903
|
+
class: "ds-drawer__panel",
|
|
2904
|
+
role: "dialog",
|
|
2905
|
+
"aria-modal": e.fixed ? "true" : "false",
|
|
2906
|
+
"aria-labelledby": y.value,
|
|
2907
|
+
"aria-label": y.value ? void 0 : "drawer",
|
|
2908
|
+
tabindex: "-1",
|
|
2909
|
+
style: U(c.value)
|
|
2910
|
+
}, [
|
|
2911
|
+
e.resizable ? (a(), l("div", {
|
|
2912
|
+
key: 0,
|
|
2913
|
+
class: "ds-drawer__dragger",
|
|
2914
|
+
"aria-hidden": "true",
|
|
2915
|
+
onMousedown: ue(V, ["stop", "prevent"])
|
|
2916
|
+
}, null, 32)) : g("", !0),
|
|
2917
|
+
e.title || e.showClose || u.$slots.header || u.$slots.actions ? (a(), l("header", Gi, [
|
|
2918
|
+
_(u.$slots, "header", {}, () => [
|
|
2919
|
+
s("h4", {
|
|
2920
|
+
id: D(f),
|
|
2921
|
+
class: "ds-drawer__title"
|
|
2922
|
+
}, T(e.title), 9, Wi)
|
|
2923
|
+
], !0),
|
|
2924
|
+
e.showClose || u.$slots.actions ? (a(), l("div", Hi, [
|
|
2925
|
+
u.$slots.actions ? (a(), l("div", Ki, [
|
|
2926
|
+
_(u.$slots, "actions", {}, void 0, !0)
|
|
2927
|
+
])) : g("", !0),
|
|
2928
|
+
e.showClose ? (a(), l("button", {
|
|
2929
|
+
key: 1,
|
|
2930
|
+
type: "button",
|
|
2931
|
+
class: "ds-drawer__close",
|
|
2932
|
+
"aria-label": e.closeLabel || void 0,
|
|
2933
|
+
onClick: m
|
|
2934
|
+
}, [...p[0] || (p[0] = [
|
|
2935
|
+
s("i", {
|
|
2936
|
+
class: "material-icons",
|
|
2937
|
+
"aria-hidden": "true"
|
|
2938
|
+
}, "close", -1)
|
|
2939
|
+
])], 8, Yi)) : g("", !0)
|
|
2940
|
+
])) : g("", !0)
|
|
2941
|
+
])) : g("", !0),
|
|
2942
|
+
s("div", qi, [
|
|
2943
|
+
_(u.$slots, "default", {}, void 0, !0)
|
|
2944
|
+
]),
|
|
2945
|
+
u.$slots.footer ? (a(), l("footer", ji, [
|
|
2946
|
+
_(u.$slots, "footer", {}, void 0, !0)
|
|
2947
|
+
])) : g("", !0)
|
|
2948
|
+
], 12, Ui)
|
|
2949
|
+
], 2)) : g("", !0)
|
|
2950
|
+
]),
|
|
2951
|
+
_: 3
|
|
2952
|
+
}, 8, ["name"])
|
|
2953
|
+
], 8, ["disabled"]));
|
|
2954
|
+
}
|
|
2955
|
+
}), Ln = /* @__PURE__ */ O(Xi, [["__scopeId", "data-v-ff99c607"]]), Zi = {
|
|
2956
|
+
TOP: "top",
|
|
2957
|
+
BOTTOM: "bottom",
|
|
2958
|
+
LEFT: "left",
|
|
2959
|
+
RIGHT: "right"
|
|
2960
|
+
}, Qi = ["id"], Ji = /* @__PURE__ */ B({
|
|
2961
|
+
__name: "DsPopover",
|
|
2962
|
+
props: {
|
|
2963
|
+
open: Boolean,
|
|
2964
|
+
placement: {
|
|
2965
|
+
type: String,
|
|
2966
|
+
default: Zi.BOTTOM
|
|
2967
|
+
},
|
|
2968
|
+
// Panel width (any CSS length). Empty = fit content.
|
|
2969
|
+
width: { type: String, default: "" },
|
|
2970
|
+
closeOnEscape: { type: Boolean, default: !0 },
|
|
2971
|
+
closeOnOutside: { type: Boolean, default: !0 },
|
|
2972
|
+
// Let the trigger slot toggle the panel. Off when the consumer drives `open` itself.
|
|
2973
|
+
triggerOnClick: { type: Boolean, default: !0 }
|
|
2974
|
+
},
|
|
2975
|
+
emits: [Ne],
|
|
2976
|
+
setup(e, { emit: n }) {
|
|
2977
|
+
const t = e, o = n, i = F(null), r = F(null), E = ge(), {
|
|
2978
|
+
shiftStyle: f,
|
|
2979
|
+
activate: y,
|
|
2980
|
+
deactivate: v
|
|
2981
|
+
} = dt(r, () => t.placement), d = S(() => {
|
|
2982
|
+
const C = { ...t.width ? { width: t.width } : {}, ...f.value };
|
|
2983
|
+
return Object.keys(C).length > 0 ? C : void 0;
|
|
2984
|
+
});
|
|
2985
|
+
let c = null;
|
|
2986
|
+
function m() {
|
|
2987
|
+
o(Ne, !1);
|
|
2988
|
+
}
|
|
2989
|
+
function k() {
|
|
2990
|
+
t.triggerOnClick && o(Ne, !t.open);
|
|
2991
|
+
}
|
|
2992
|
+
function w() {
|
|
2993
|
+
t.closeOnEscape && t.open && m();
|
|
2994
|
+
}
|
|
2995
|
+
function N(C) {
|
|
2996
|
+
var A;
|
|
2997
|
+
const $ = C.target;
|
|
2998
|
+
!$ || (A = i.value) != null && A.contains($) || m();
|
|
2999
|
+
}
|
|
3000
|
+
return Z(
|
|
3001
|
+
() => t.open,
|
|
3002
|
+
(C, $) => {
|
|
3003
|
+
var A;
|
|
3004
|
+
typeof document != "undefined" && (C ? (c = document.activeElement, t.closeOnOutside && document.addEventListener("mousedown", N), se(() => {
|
|
3005
|
+
var V, H;
|
|
3006
|
+
(H = (V = r.value) == null ? void 0 : V.focus) == null || H.call(V, { preventScroll: !0 }), y();
|
|
3007
|
+
})) : $ && (document.removeEventListener("mousedown", N), v(), (A = c == null ? void 0 : c.focus) == null || A.call(c, { preventScroll: !0 })));
|
|
3008
|
+
},
|
|
3009
|
+
{ immediate: !0 }
|
|
3010
|
+
), de(() => {
|
|
3011
|
+
typeof document != "undefined" && (document.removeEventListener("mousedown", N), v());
|
|
3012
|
+
}), (C, $) => (a(), l("div", {
|
|
3013
|
+
ref_key: "rootRef",
|
|
3014
|
+
ref: i,
|
|
3015
|
+
class: "ds-popover",
|
|
3016
|
+
onKeydown: st(w, ["esc"])
|
|
3017
|
+
}, [
|
|
3018
|
+
s("div", {
|
|
3019
|
+
class: "ds-popover__trigger",
|
|
3020
|
+
onClick: k
|
|
3021
|
+
}, [
|
|
3022
|
+
_(C.$slots, "trigger", {}, void 0, !0)
|
|
3023
|
+
]),
|
|
3024
|
+
Y(me, { name: "ds-popover-fade" }, {
|
|
3025
|
+
default: ie(() => [
|
|
3026
|
+
e.open ? (a(), l("div", {
|
|
3027
|
+
key: 0,
|
|
3028
|
+
id: D(E),
|
|
3029
|
+
ref_key: "panelRef",
|
|
3030
|
+
ref: r,
|
|
3031
|
+
class: L(["ds-popover__panel", `ds-popover__panel--${e.placement}`]),
|
|
3032
|
+
role: "dialog",
|
|
3033
|
+
tabindex: "-1",
|
|
3034
|
+
style: U(d.value)
|
|
3035
|
+
}, [
|
|
3036
|
+
_(C.$slots, "default", {}, void 0, !0)
|
|
3037
|
+
], 14, Qi)) : g("", !0)
|
|
3038
|
+
]),
|
|
3039
|
+
_: 3
|
|
3040
|
+
})
|
|
3041
|
+
], 544));
|
|
3042
|
+
}
|
|
3043
|
+
}), Cn = /* @__PURE__ */ O(Ji, [["__scopeId", "data-v-d016aa25"]]);
|
|
2733
3044
|
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
|
-
|
|
3045
|
+
pa as DS_ALERT_EFFECTS,
|
|
3046
|
+
Sa as DS_ALERT_ICONS,
|
|
3047
|
+
ga as DS_ALERT_TYPES,
|
|
3048
|
+
xe as DS_BADGE_TONES,
|
|
3049
|
+
$t as DS_BUTTON_NATIVE_TYPES,
|
|
3050
|
+
Qe as DS_BUTTON_SIZES,
|
|
3051
|
+
Be as DS_BUTTON_VARIANTS,
|
|
3052
|
+
ei as DS_CUSTOM_TAG_TYPES,
|
|
3053
|
+
it as DS_DRAWER_DIRECTIONS,
|
|
3054
|
+
ia as DS_INPUT_SIZES,
|
|
3055
|
+
be as DS_INPUT_TYPES,
|
|
3056
|
+
_a as DS_NOTIFICATION_ICONS,
|
|
3057
|
+
et as DS_NOTIFICATION_LINK_TARGETS,
|
|
3058
|
+
Ca as DS_NOTIFICATION_POSITIONS,
|
|
3059
|
+
La as DS_NOTIFICATION_TYPES,
|
|
3060
|
+
Zi as DS_POPOVER_PLACEMENTS,
|
|
3061
|
+
at as DS_SELECT_TYPES,
|
|
3062
|
+
lt as DS_SELECT_WIDTHS,
|
|
3063
|
+
De as DS_SPINNER_SIZES,
|
|
3064
|
+
$e as DS_SPINNER_TONES,
|
|
3065
|
+
Je as DS_TABLE_ALIGN,
|
|
3066
|
+
ne as DS_TABLE_PIN,
|
|
3067
|
+
Rt as DS_TAG_TONES,
|
|
3068
|
+
Ga as DS_TOOLTIP_PLACEMENTS,
|
|
3069
|
+
Oe as DS_VERIFICATION_STATES,
|
|
3070
|
+
ce as DS_WIZARD_STEP_STATES,
|
|
3071
|
+
on as DsAlert,
|
|
3072
|
+
an as DsAvatar,
|
|
3073
|
+
xt as DsBadge,
|
|
3074
|
+
fe as DsButton,
|
|
3075
|
+
hn as DsCell,
|
|
3076
|
+
ot as DsCheckbox,
|
|
3077
|
+
tt as DsContactValue,
|
|
3078
|
+
gn as DsCustomTag,
|
|
3079
|
+
un as DsDataCard,
|
|
3080
|
+
Ln as DsDrawer,
|
|
3081
|
+
$n as DsEmptyState,
|
|
3082
|
+
nn as DsInput,
|
|
3083
|
+
bn as DsItemSelectorButton,
|
|
3084
|
+
En as DsMenuItem,
|
|
3085
|
+
rn as DsModal,
|
|
3086
|
+
dn as DsNotification,
|
|
3087
|
+
wn as DsPaginator,
|
|
3088
|
+
pn as DsPill,
|
|
3089
|
+
Sn as DsPillWithBorder,
|
|
3090
|
+
Cn as DsPopover,
|
|
3091
|
+
fn as DsRadio,
|
|
3092
|
+
mn as DsRow,
|
|
3093
|
+
kn as DsSegmentedProgressBar,
|
|
3094
|
+
yn as DsSelect,
|
|
3095
|
+
ye as DsSpinner,
|
|
3096
|
+
vn as DsSwitch,
|
|
3097
|
+
ln as DsTable,
|
|
3098
|
+
tn as DsTag,
|
|
3099
|
+
sn as DsTextarea,
|
|
3100
|
+
cn as DsTooltip,
|
|
3101
|
+
qa as DsVerificationIcon,
|
|
3102
|
+
Tn as DsWizardStepper
|
|
2788
3103
|
};
|
|
2789
3104
|
//# sourceMappingURL=index.es.js.map
|