@salesql/sql_components_vue3 0.3.1 → 2.0.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.
Files changed (60) hide show
  1. package/dist/constants/events.d.ts +16 -0
  2. package/dist/index.cjs +1 -1
  3. package/dist/index.cjs.map +1 -1
  4. package/dist/index.d.ts +39 -8
  5. package/dist/index.es.js +1119 -144
  6. package/dist/index.es.js.map +1 -1
  7. package/dist/sql_components_vue3.css +1 -1
  8. package/dist/ui/DsAlert/DsAlert.types.d.ts +13 -0
  9. package/dist/ui/DsAlert/DsAlert.vue.d.ts +75 -0
  10. package/dist/ui/DsAlert/index.d.ts +2 -0
  11. package/dist/ui/DsAvatar/DsAvatar.types.d.ts +8 -0
  12. package/dist/ui/DsAvatar/DsAvatar.vue.d.ts +62 -0
  13. package/dist/ui/DsAvatar/index.d.ts +2 -0
  14. package/dist/ui/DsBadge/DsBadge.types.d.ts +9 -0
  15. package/dist/ui/DsBadge/DsBadge.vue.d.ts +26 -0
  16. package/dist/ui/DsBadge/index.d.ts +2 -0
  17. package/dist/ui/DsButton/DsButton.types.d.ts +24 -0
  18. package/dist/ui/DsButton/DsButton.vue.d.ts +97 -0
  19. package/dist/ui/DsButton/index.d.ts +2 -0
  20. package/dist/ui/DsCheckbox/DsCheckbox.types.d.ts +7 -0
  21. package/dist/ui/DsCheckbox/DsCheckbox.vue.d.ts +49 -0
  22. package/dist/ui/DsCheckbox/index.d.ts +2 -0
  23. package/dist/ui/DsContactValue/DsContactValue.types.d.ts +16 -0
  24. package/dist/ui/DsContactValue/DsContactValue.vue.d.ts +112 -0
  25. package/dist/ui/DsContactValue/index.d.ts +2 -0
  26. package/dist/ui/DsDataCard/DsDataCard.types.d.ts +9 -0
  27. package/dist/ui/DsDataCard/DsDataCard.vue.d.ts +173 -0
  28. package/dist/ui/DsDataCard/index.d.ts +2 -0
  29. package/dist/ui/DsInput/DsInput.types.d.ts +15 -0
  30. package/dist/ui/DsInput/DsInput.vue.d.ts +112 -0
  31. package/dist/ui/DsInput/index.d.ts +2 -0
  32. package/dist/ui/DsModal/DsModal.types.d.ts +8 -0
  33. package/dist/ui/DsModal/DsModal.vue.d.ts +69 -0
  34. package/dist/ui/DsModal/index.d.ts +2 -0
  35. package/dist/ui/DsNotification/DsNotification.types.d.ts +15 -0
  36. package/dist/ui/DsNotification/DsNotification.vue.d.ts +92 -0
  37. package/dist/ui/DsNotification/index.d.ts +2 -0
  38. package/dist/ui/DsSpinner/DsSpinner.types.d.ts +6 -0
  39. package/dist/ui/{SqlSpinner/SqlSpinner.vue.d.ts → DsSpinner/DsSpinner.vue.d.ts} +15 -15
  40. package/dist/ui/DsSpinner/index.d.ts +2 -0
  41. package/dist/ui/DsTable/DsTable.types.d.ts +16 -0
  42. package/dist/ui/{BasicTable/BasicTable.vue.d.ts → DsTable/DsTable.vue.d.ts} +24 -6
  43. package/dist/ui/DsTable/index.d.ts +2 -0
  44. package/dist/ui/DsTag/DsTag.types.d.ts +9 -0
  45. package/dist/ui/DsTag/DsTag.vue.d.ts +45 -0
  46. package/dist/ui/DsTag/index.d.ts +2 -0
  47. package/dist/ui/DsTextarea/DsTextarea.types.d.ts +8 -0
  48. package/dist/ui/DsTextarea/DsTextarea.vue.d.ts +70 -0
  49. package/dist/ui/DsTextarea/index.d.ts +2 -0
  50. package/dist/ui/DsVerificationIcon/DsVerificationIcon.types.d.ts +6 -0
  51. package/dist/ui/DsVerificationIcon/DsVerificationIcon.vue.d.ts +52 -0
  52. package/dist/ui/DsVerificationIcon/index.d.ts +2 -0
  53. package/package.json +6 -6
  54. package/dist/ui/BasicTable/BasicTable.types.d.ts +0 -16
  55. package/dist/ui/BasicTable/index.d.ts +0 -2
  56. package/dist/ui/SqlButton/SqlButton.types.d.ts +0 -31
  57. package/dist/ui/SqlButton/SqlButton.vue.d.ts +0 -75
  58. package/dist/ui/SqlButton/index.d.ts +0 -2
  59. package/dist/ui/SqlSpinner/SqlSpinner.types.d.ts +0 -11
  60. package/dist/ui/SqlSpinner/index.d.ts +0 -2
package/dist/index.es.js CHANGED
@@ -1,123 +1,123 @@
1
- import { defineComponent as L, computed as h, openBlock as s, createElementBlock as n, normalizeClass as o, createElementVNode as d, toDisplayString as u, createCommentVNode as y, createBlock as I, unref as g, renderSlot as A, Fragment as b, renderList as S, normalizeStyle as v, createTextVNode as R } from "vue";
2
- const T = {
1
+ import { defineComponent as $, openBlock as t, createElementBlock as a, normalizeStyle as L, normalizeClass as m, computed as h, createBlock as D, unref as S, createCommentVNode as u, renderSlot as I, createElementVNode as d, toDisplayString as v, Fragment as A, renderList as V, createTextVNode as O, useModel as Q, useSlots as oe, ref as R, withDirectives as Z, vModelDynamic as ye, mergeModels as U, vModelText as ve, onMounted as se, watch as de, vModelCheckbox as be, onBeforeUnmount as j, Teleport as re, createVNode as p, Transition as ce, withCtx as J, nextTick as me, withModifiers as ue } from "vue";
2
+ const W = {
3
+ DARK: "dark",
4
+ // slate ring — for light surfaces (default)
3
5
  LIGHT: "light",
4
- // para fondos oscuros: spinner claro
5
- DARK: "dark"
6
- // para fondos claros: spinner oscuro
7
- }, B = {
8
- SMALL: "small",
9
- MEDIUM: "medium",
10
- LARGE: "large"
11
- }, N = ["aria-label", "aria-live", "aria-hidden"], k = {
12
- key: 0,
13
- class: "sr-only"
14
- }, D = /* @__PURE__ */ L({
15
- __name: "SqlSpinner",
6
+ // white ring for dark surfaces / solid buttons
7
+ ACCENT: "accent"
8
+ // accent ring
9
+ }, ge = ["aria-label"], he = /* @__PURE__ */ $({
10
+ __name: "DsSpinner",
16
11
  props: {
17
- type: {
12
+ size: { type: Number, default: 24 },
13
+ tone: {
18
14
  type: String,
19
- default: T.DARK
15
+ default: W.DARK
20
16
  },
21
- size: {
22
- type: String,
23
- default: B.SMALL
24
- },
25
- // Opcional: texto accesible (si no hay, marcamos aria-hidden)
26
- label: {
27
- type: String,
28
- default: ""
29
- }
17
+ // Accessible name (DS default "Loading"); the consuming app can override for
18
+ // i18n. role="status" + aria-label are always present, never opt-in.
19
+ label: { type: String, default: "Loading" }
30
20
  },
31
21
  setup(e) {
32
- const i = e, l = h(() => i.label && i.label.length > 0);
33
- return (t, a) => (s(), n("span", {
34
- class: o(["sql-spinner", [`theme-${e.type}`, `sql-spinner--${e.size}`]]),
22
+ return (i, l) => (t(), a("span", {
23
+ class: m(["ds-spinner", `ds-spinner--${e.tone}`]),
35
24
  role: "status",
36
- "aria-label": l.value ? e.label : void 0,
37
- "aria-live": l.value ? "polite" : void 0,
38
- "aria-hidden": l.value ? void 0 : "true"
39
- }, [
40
- a[0] || (a[0] = d("span", { class: "ring" }, null, -1)),
41
- l.value ? (s(), n("span", k, u(e.label), 1)) : y("", !0)
42
- ], 10, N));
25
+ style: L({ width: `${e.size}px`, height: `${e.size}px` }),
26
+ "aria-label": e.label || void 0
27
+ }, null, 14, ge));
43
28
  }
44
- }), m = (e, i) => {
29
+ }), T = (e, i) => {
45
30
  const l = e.__vccOpts || e;
46
- for (const [t, a] of i)
47
- l[t] = a;
31
+ for (const [r, s] of i)
32
+ l[r] = s;
48
33
  return l;
49
- }, M = /* @__PURE__ */ m(D, [["__scopeId", "data-v-9694500e"]]), E = {
34
+ }, Se = /* @__PURE__ */ T(he, [["__scopeId", "data-v-4d32b0a5"]]), ee = "click", C = "close", F = "focus", z = "blur", G = "copy", _ = "correct", P = "incorrect", te = "sort", ae = "edit", H = {
50
35
  DEFAULT: "default",
36
+ // white surface, dark text (the default value; == tertiary)
51
37
  PRIMARY: "primary",
38
+ // solid accent fill, white text — the main CTA
52
39
  SECONDARY: "secondary",
40
+ // slate surface fill, dark text
53
41
  TERTIARY: "tertiary",
54
- SPECIAL: "special",
55
- SPECIAL2: "special2",
56
- SPECIAL3: "special3",
57
- DOTTED: "dotted",
58
- DANGER: "danger",
59
- GRADIENT: "gradient"
60
- }, q = {
42
+ // white surface, dark text (low-emphasis row action)
43
+ QUATERNARY: "quaternary",
44
+ // accent text + accent-mid border on white
45
+ QUINARY: "quinary",
46
+ // accent text on white, no border (link-style)
47
+ WARNING: "warning",
48
+ // solid red fill, white text — destructive / delete
49
+ DOTTED: "dotted"
50
+ // transparent, dashed border, 24px radius — "add" affordance
51
+ }, ie = {
61
52
  SMALL: "small",
62
- SMALL_SQUARE: "small-square",
63
- SMALL_SQUARE_NO_PADDING: "small-square-no-padding",
53
+ // 24px
64
54
  MEDIUM: "medium",
65
- MEDIUM_SQUARE: "medium-square",
55
+ // 32px
66
56
  LARGE: "large",
67
- LARGE_SQUARE: "large-square",
68
- XLARGE: "xlarge",
69
- XLARGE_SQUARE: "xlarge-square"
70
- }, $ = {
57
+ // 36px
58
+ XLARGE: "xlarge"
59
+ // 48px
60
+ }, ke = {
71
61
  BUTTON: "button",
72
62
  SUBMIT: "submit",
73
63
  RESET: "reset"
74
- }, p = "click", U = ["type", "disabled", "autofocus", "aria-busy", "aria-disabled", "aria-pressed"], G = {
64
+ }, $e = ["type", "disabled", "autofocus", "aria-busy", "aria-disabled", "aria-pressed", "aria-label"], Te = {
75
65
  key: 1,
76
- class: "slotted-content"
77
- }, C = /* @__PURE__ */ L({
78
- __name: "SqlButton",
66
+ class: "ds-button__icon ds-button__icon--leading"
67
+ }, Ie = {
68
+ class: "material-icons",
69
+ "aria-hidden": "true"
70
+ }, Ce = {
71
+ key: 2,
72
+ class: "ds-button__label"
73
+ }, Ee = {
74
+ key: 3,
75
+ class: "ds-button__icon ds-button__icon--trailing"
76
+ }, we = {
77
+ class: "material-icons",
78
+ "aria-hidden": "true"
79
+ }, Le = /* @__PURE__ */ $({
80
+ __name: "DsButton",
79
81
  props: {
80
- type: {
81
- type: String,
82
- default: E.DEFAULT
83
- },
84
- size: {
85
- type: String,
86
- default: q.LARGE
87
- },
82
+ variant: { type: String, default: H.DEFAULT },
83
+ size: { type: String, default: ie.MEDIUM },
88
84
  nativeType: {
89
85
  type: String,
90
- default: $.BUTTON
86
+ default: ke.BUTTON
91
87
  },
92
- selected: {
93
- type: Boolean,
94
- default: null
95
- },
96
- loading: Boolean,
88
+ // Material Icon names (rendered via <i class="material-icons">); a leading/
89
+ // trailing slot overrides. Icon-only buttons (circle/square) need ariaLabel.
90
+ leftIcon: { type: String, default: "" },
91
+ rightIcon: { type: String, default: "" },
92
+ ariaLabel: { type: String, default: "" },
97
93
  disabled: Boolean,
98
- plain: Boolean,
99
- autofocus: Boolean,
100
- round: Boolean,
101
- circle: Boolean
94
+ loading: Boolean,
95
+ // Round icon-only button (width === height, fully circular).
96
+ circle: Boolean,
97
+ // Flat 4px-radius icon-only button (the DS `*-square` sizes): symmetric padding
98
+ // per size, height === width.
99
+ square: Boolean,
100
+ // Toggle state: accent outline + fill; sets aria-pressed (DS `selected`).
101
+ selected: Boolean,
102
+ autofocus: Boolean
102
103
  },
104
+ emits: [ee],
103
105
  setup(e, { emit: i }) {
104
- const l = e, t = i, a = h(
105
- () => l.type === E.PRIMARY || l.type === E.DANGER ? T.LIGHT : T.DARK
106
+ const l = e, r = i, s = h(() => l.size === ie.SMALL ? 14 : 20), n = h(
107
+ () => l.variant === H.PRIMARY || l.variant === H.WARNING ? W.LIGHT : W.DARK
106
108
  );
107
- function r(c) {
108
- l.disabled || l.loading || t(p, c);
109
+ function o(c) {
110
+ l.disabled || l.loading || r(ee, c);
109
111
  }
110
- return (c, F) => (s(), n("button", {
111
- class: o(["sql-button", [
112
- e.type ? `sql-button--${e.type}` : "",
113
- e.size ? `sql-button--${e.size}` : "",
112
+ return (c, b) => (t(), a("button", {
113
+ class: m(["ds-button", [
114
+ `ds-button--${e.variant}`,
115
+ `ds-button--${e.size}`,
114
116
  {
115
- "is-disabled": e.disabled,
117
+ "is-disabled": e.disabled || e.loading,
116
118
  "is-loading": e.loading,
117
119
  "is-circle": e.circle,
118
- "is-plain": e.plain,
119
- "is-round": e.round,
120
- "selectable-button": e.selected !== null,
120
+ "is-square": e.square,
121
121
  "is-selected": e.selected
122
122
  }
123
123
  ]]),
@@ -126,29 +126,162 @@ const T = {
126
126
  autofocus: e.autofocus,
127
127
  "aria-busy": e.loading || void 0,
128
128
  "aria-disabled": e.disabled || e.loading || void 0,
129
- "aria-pressed": e.selected !== null ? !!e.selected : void 0,
130
- onClick: r
129
+ "aria-pressed": e.selected || void 0,
130
+ "aria-label": e.ariaLabel || void 0,
131
+ onClick: o
131
132
  }, [
132
- d("span", {
133
- class: o(["slot-container", { "is-loading": e.loading }])
134
- }, [
135
- e.loading ? (s(), I(g(M), {
136
- key: 0,
137
- class: "sql-spinner",
138
- type: a.value
139
- }, null, 8, ["type"])) : y("", !0),
140
- c.$slots.default ? (s(), n("div", G, [
141
- A(c.$slots, "default", {}, void 0, !0)
142
- ])) : y("", !0)
143
- ], 2)
144
- ], 10, U));
133
+ e.loading ? (t(), D(S(Se), {
134
+ key: 0,
135
+ class: "ds-button__spinner",
136
+ size: s.value,
137
+ tone: n.value
138
+ }, null, 8, ["size", "tone"])) : u("", !0),
139
+ !e.loading && (e.leftIcon || c.$slots.leading) ? (t(), a("span", Te, [
140
+ I(c.$slots, "leading", {}, () => [
141
+ d("i", Ie, v(e.leftIcon), 1)
142
+ ], !0)
143
+ ])) : u("", !0),
144
+ !e.loading && c.$slots.default ? (t(), a("span", Ce, [
145
+ I(c.$slots, "default", {}, void 0, !0)
146
+ ])) : u("", !0),
147
+ !e.loading && (e.rightIcon || c.$slots.trailing) ? (t(), a("span", Ee, [
148
+ I(c.$slots, "trailing", {}, () => [
149
+ d("i", we, v(e.rightIcon), 1)
150
+ ], !0)
151
+ ])) : u("", !0)
152
+ ], 10, $e));
153
+ }
154
+ }), K = /* @__PURE__ */ T(Le, [["__scopeId", "data-v-2d17382d"]]), De = {
155
+ DEFAULT: "default",
156
+ // white bg, slate-tint border, muted text
157
+ GREY: "grey",
158
+ // alias of `default` — the DS app passes tone="grey" (ApiApp.jsx)
159
+ SUCCESS: "success",
160
+ // e.g. Verified
161
+ INFO: "info",
162
+ // e.g. Work
163
+ WARNING: "warning",
164
+ // e.g. Pending
165
+ ERROR: "error"
166
+ // e.g. Bounced
167
+ }, Ne = ["aria-label"], Re = /* @__PURE__ */ $({
168
+ __name: "DsTag",
169
+ props: {
170
+ tone: {
171
+ type: String,
172
+ default: De.DEFAULT
173
+ },
174
+ // Semicircular sides (DS `rounded`): radius-round vs the default radius-control.
175
+ rounded: Boolean,
176
+ // Show a × close control that emits `close`.
177
+ closable: Boolean,
178
+ // Accessible name for the × control (the app owns the wording / i18n).
179
+ closeLabel: {
180
+ type: String,
181
+ default: ""
182
+ }
183
+ },
184
+ setup(e, { emit: i }) {
185
+ const l = i;
186
+ return (r, s) => (t(), a("span", {
187
+ class: m(["ds-tag", [`ds-tag--${e.tone}`, { "is-rounded": e.rounded }]])
188
+ }, [
189
+ I(r.$slots, "default", {}, void 0, !0),
190
+ e.closable ? (t(), a("button", {
191
+ key: 0,
192
+ type: "button",
193
+ class: "ds-tag__close",
194
+ "aria-label": e.closeLabel || void 0,
195
+ onClick: s[0] || (s[0] = (n) => l(S(C)))
196
+ }, [...s[1] || (s[1] = [
197
+ d("i", {
198
+ class: "material-icons",
199
+ "aria-hidden": "true"
200
+ }, "close", -1)
201
+ ])], 8, Ne)) : u("", !0)
202
+ ], 2));
203
+ }
204
+ }), ea = /* @__PURE__ */ T(Re, [["__scopeId", "data-v-fc383bb9"]]), X = {
205
+ ACCENT: "accent",
206
+ // e.g. Work (purple)
207
+ GREY: "grey",
208
+ // e.g. Direct (slate-soft)
209
+ INFO: "info",
210
+ // e.g. Mobile (blue)
211
+ SUCCESS: "success",
212
+ // e.g. New (green)
213
+ ERROR: "error",
214
+ // coral
215
+ WARNING: "warning"
216
+ // orange
217
+ }, Be = /* @__PURE__ */ $({
218
+ __name: "DsBadge",
219
+ props: {
220
+ tone: {
221
+ type: String,
222
+ default: X.ACCENT
223
+ }
224
+ },
225
+ setup(e) {
226
+ return (i, l) => (t(), a("span", {
227
+ class: m(["ds-badge", `ds-badge--${e.tone}`])
228
+ }, [
229
+ I(i.$slots, "default", {}, void 0, !0)
230
+ ], 2));
145
231
  }
146
- }), x = /* @__PURE__ */ m(C, [["__scopeId", "data-v-9eeb1a72"]]), f = {
232
+ }), Ae = /* @__PURE__ */ T(Be, [["__scopeId", "data-v-f10a17a0"]]), Oe = ["src", "alt"], xe = ["aria-label"], Me = /* @__PURE__ */ $({
233
+ __name: "DsAvatar",
234
+ props: {
235
+ image: { type: String, default: "" },
236
+ firstName: { type: String, default: "" },
237
+ lastName: { type: String, default: "" },
238
+ uid: { type: String, default: "" },
239
+ size: { type: Number, default: 40 },
240
+ circular: Boolean,
241
+ // Accessible label (defaults to "firstName lastName").
242
+ alt: { type: String, default: "" }
243
+ },
244
+ setup(e) {
245
+ const i = e, l = h(
246
+ () => i.firstName && i.lastName ? (i.firstName.charAt(0) + i.lastName.charAt(0)).toUpperCase() : ""
247
+ ), r = h(() => i.alt || `${i.firstName} ${i.lastName}`.trim()), s = h(() => ({ width: `${i.size}px`, height: `${i.size}px` })), n = h(() => {
248
+ const o = i.uid || i.firstName + i.lastName;
249
+ let c = 0;
250
+ for (let f = 0; f < o.length; f++)
251
+ c = o.charCodeAt(f) + ((c << 5) - c), c = c & c;
252
+ const b = [0, 0, 0];
253
+ for (let f = 0; f < 3; f++) b[f] = c >> f * 8 & 255;
254
+ const y = b[0] >= 200 && b[1] >= 200 && b[2] >= 200;
255
+ return { bg: `rgb(${b[0]}, ${b[1]}, ${b[2]})`, fg: y ? "#323f4b" : "#fff" };
256
+ });
257
+ return (o, c) => e.image ? (t(), a("img", {
258
+ key: 0,
259
+ class: m(["ds-avatar", { "is-circular": e.circular }]),
260
+ src: e.image,
261
+ alt: e.alt,
262
+ style: L(s.value)
263
+ }, null, 14, Oe)) : l.value ? (t(), a("div", {
264
+ key: 1,
265
+ class: m(["ds-avatar ds-avatar--initials", { "is-circular": e.circular }]),
266
+ role: "img",
267
+ "aria-label": r.value || void 0,
268
+ style: L([
269
+ s.value,
270
+ { background: n.value.bg, color: n.value.fg, fontSize: `${Math.round(e.size * 0.4)}px` }
271
+ ])
272
+ }, v(l.value), 15, xe)) : (t(), a("div", {
273
+ key: 2,
274
+ class: m(["ds-avatar ds-avatar--placeholder", { "is-circular": e.circular }]),
275
+ style: L(s.value),
276
+ "aria-hidden": "true"
277
+ }, null, 6));
278
+ }
279
+ }), ta = /* @__PURE__ */ T(Me, [["__scopeId", "data-v-e965ed47"]]), le = {
147
280
  LEFT: "left",
148
281
  CENTER: "center",
149
282
  RIGHT: "right"
150
- }, O = { class: "basic-table" }, P = { class: "basic-table__wrapper" }, Q = { class: "basic-table__table" }, _ = { key: 0 }, z = ["colspan"], w = /* @__PURE__ */ L({
151
- __name: "BasicTable",
283
+ }, Ue = { class: "ds-table" }, Ve = { class: "ds-table__wrapper" }, Fe = { key: 0 }, ze = ["colspan"], Ge = /* @__PURE__ */ $({
284
+ __name: "DsTable",
152
285
  props: {
153
286
  columns: {
154
287
  type: Array,
@@ -161,67 +294,909 @@ const T = {
161
294
  emptyMessage: {
162
295
  type: String,
163
296
  default: ""
297
+ },
298
+ // id of the row to highlight (the DS "most likely" row → accent surface).
299
+ highlightRowId: {
300
+ type: [String, Number],
301
+ default: null
302
+ },
303
+ // Optional fixed row height (number → px, or any CSS length). Rows are
304
+ // content-driven by default; when set, this pins the height AND truncates
305
+ // overflowing cell text with an ellipsis.
306
+ rowHeight: {
307
+ type: [String, Number],
308
+ default: null
164
309
  }
165
310
  },
166
311
  setup(e) {
167
- return (i, l) => (s(), n("div", O, [
168
- d("div", P, [
169
- d("table", Q, [
312
+ const i = e, l = h(
313
+ () => i.rowHeight == null ? void 0 : {
314
+ "--ds-table-row-height": typeof i.rowHeight == "number" ? `${i.rowHeight}px` : i.rowHeight
315
+ }
316
+ );
317
+ return (r, s) => (t(), a("div", Ue, [
318
+ d("div", Ve, [
319
+ d("table", {
320
+ class: m(["ds-table__table", { "has-row-height": e.rowHeight != null }]),
321
+ style: L(l.value)
322
+ }, [
170
323
  d("thead", null, [
171
324
  d("tr", null, [
172
- (s(!0), n(b, null, S(e.columns, (t) => {
173
- var a;
174
- return s(), n("th", {
175
- key: t.key,
176
- class: o(`basic-table__th--${(a = t.align) != null ? a : g(f).LEFT}`),
177
- style: v(t.width ? { width: t.width } : void 0)
178
- }, u(t.label), 7);
325
+ (t(!0), a(A, null, V(e.columns, (n) => {
326
+ var o;
327
+ return t(), a("th", {
328
+ key: n.key,
329
+ class: m(`ds-table__th--${(o = n.align) != null ? o : S(le).LEFT}`),
330
+ style: L(n.width ? { width: n.width } : void 0)
331
+ }, v(n.label), 7);
179
332
  }), 128))
180
333
  ])
181
334
  ]),
182
335
  d("tbody", null, [
183
- e.rows.length === 0 ? (s(), n("tr", _, [
336
+ e.rows.length === 0 ? (t(), a("tr", Fe, [
184
337
  d("td", {
185
- class: "basic-table__empty",
338
+ class: "ds-table__empty",
186
339
  colspan: e.columns.length,
187
- "data-testid": "basic-table-empty"
340
+ "data-testid": "ds-table-empty"
188
341
  }, [
189
- A(i.$slots, "empty", {}, () => [
190
- R(u(e.emptyMessage), 1)
342
+ I(r.$slots, "empty", {}, () => [
343
+ O(v(e.emptyMessage), 1)
191
344
  ], !0)
192
- ], 8, z)
193
- ])) : y("", !0),
194
- (s(!0), n(b, null, S(e.rows, (t) => (s(), n("tr", {
195
- key: t.id,
196
- "data-testid": "basic-table-row"
345
+ ], 8, ze)
346
+ ])) : u("", !0),
347
+ (t(!0), a(A, null, V(e.rows, (n) => (t(), a("tr", {
348
+ key: n.id,
349
+ class: m({ "is-highlighted": n.id === e.highlightRowId }),
350
+ "data-testid": "ds-table-row"
197
351
  }, [
198
- (s(!0), n(b, null, S(e.columns, (a) => {
199
- var r;
200
- return s(), n("td", {
201
- key: a.key,
202
- class: o(`basic-table__td--${(r = a.align) != null ? r : g(f).LEFT}`)
352
+ (t(!0), a(A, null, V(e.columns, (o) => {
353
+ var c;
354
+ return t(), a("td", {
355
+ key: o.key,
356
+ class: m(`ds-table__td--${(c = o.align) != null ? c : S(le).LEFT}`)
203
357
  }, [
204
- A(i.$slots, `cell-${a.key}`, { row: t }, () => [
205
- R(u(t[a.key]), 1)
358
+ I(r.$slots, `cell-${o.key}`, { row: n }, () => [
359
+ O(v(n[o.key]), 1)
206
360
  ], !0)
207
361
  ], 2);
208
362
  }), 128))
209
- ]))), 128))
363
+ ], 2))), 128))
210
364
  ])
211
- ])
365
+ ], 6)
212
366
  ])
213
367
  ]));
214
368
  }
215
- }), H = /* @__PURE__ */ m(w, [["__scopeId", "data-v-8f713759"]]);
369
+ }), aa = /* @__PURE__ */ T(Ge, [["__scopeId", "data-v-45342363"]]), Y = {
370
+ TEXT: "text",
371
+ EMAIL: "email",
372
+ PASSWORD: "password",
373
+ TEL: "tel",
374
+ NUMBER: "number",
375
+ SEARCH: "search",
376
+ URL: "url"
377
+ }, _e = {
378
+ SM: "sm",
379
+ // 36px
380
+ MD: "md"
381
+ // 48px
382
+ }, Pe = { class: "ds-input__wrap" }, pe = ["id", "type", "placeholder", "disabled", "name", "autocomplete", "aria-invalid", "aria-describedby"], He = {
383
+ key: 0,
384
+ class: "ds-input__suffix"
385
+ }, Ye = {
386
+ key: 0,
387
+ class: "material-icons ds-input__error-icon",
388
+ "aria-hidden": "true"
389
+ }, qe = ["aria-label", "aria-pressed"], We = {
390
+ class: "material-icons",
391
+ "aria-hidden": "true"
392
+ }, Ke = ["id"], Xe = /* @__PURE__ */ $({
393
+ __name: "DsInput",
394
+ props: /* @__PURE__ */ U({
395
+ type: { type: String, default: Y.TEXT },
396
+ size: { type: String, default: _e.SM },
397
+ placeholder: { type: String, default: "" },
398
+ disabled: Boolean,
399
+ error: Boolean,
400
+ errorMessage: { type: String, default: "" },
401
+ showErrorIcon: Boolean,
402
+ name: { type: String, default: "" },
403
+ id: { type: String, default: "" },
404
+ autocomplete: { type: String, default: "" },
405
+ // Accessible name for the password visibility toggle.
406
+ toggleLabel: { type: String, default: "" }
407
+ }, {
408
+ modelValue: { default: "" },
409
+ modelModifiers: {}
410
+ }),
411
+ emits: /* @__PURE__ */ U([F, z], ["update:modelValue"]),
412
+ setup(e, { emit: i }) {
413
+ const l = Q(e, "modelValue"), r = e, s = i, n = oe(), o = R(!1), c = h(() => r.type === Y.PASSWORD), b = h(
414
+ () => c.value && o.value ? Y.TEXT : r.type
415
+ ), y = h(
416
+ () => !!n.suffix || r.error && r.showErrorIcon || c.value
417
+ );
418
+ return (f, g) => (t(), a("div", {
419
+ class: m(["ds-input", [`ds-input--${e.size}`, { "is-error": e.error, "is-disabled": e.disabled }]])
420
+ }, [
421
+ d("div", Pe, [
422
+ Z(d("input", {
423
+ id: e.id || void 0,
424
+ "onUpdate:modelValue": g[0] || (g[0] = (k) => l.value = k),
425
+ class: m(["ds-input__control", { "has-suffix": y.value }]),
426
+ type: b.value,
427
+ placeholder: e.placeholder,
428
+ disabled: e.disabled,
429
+ name: e.name || void 0,
430
+ autocomplete: e.autocomplete || void 0,
431
+ "aria-invalid": e.error || void 0,
432
+ "aria-describedby": e.error && e.errorMessage && e.id ? `${e.id}-error` : void 0,
433
+ onFocus: g[1] || (g[1] = (k) => s(S(F), k)),
434
+ onBlur: g[2] || (g[2] = (k) => s(S(z), k))
435
+ }, null, 42, pe), [
436
+ [ye, l.value]
437
+ ]),
438
+ y.value ? (t(), a("div", He, [
439
+ I(f.$slots, "suffix", {}, void 0, !0),
440
+ e.error && e.showErrorIcon ? (t(), a("i", Ye, "warning")) : c.value ? (t(), a("button", {
441
+ key: 1,
442
+ type: "button",
443
+ class: "ds-input__toggle",
444
+ "aria-label": e.toggleLabel || void 0,
445
+ "aria-pressed": o.value,
446
+ onClick: g[3] || (g[3] = (k) => o.value = !o.value)
447
+ }, [
448
+ d("i", We, v(o.value ? "visibility" : "visibility_off"), 1)
449
+ ], 8, qe)) : u("", !0)
450
+ ])) : u("", !0)
451
+ ]),
452
+ e.error && e.errorMessage ? (t(), a("p", {
453
+ key: 0,
454
+ id: e.id ? `${e.id}-error` : void 0,
455
+ class: "ds-input__error"
456
+ }, v(e.errorMessage), 9, Ke)) : u("", !0)
457
+ ], 2));
458
+ }
459
+ }), ia = /* @__PURE__ */ T(Xe, [["__scopeId", "data-v-fb36e573"]]), Qe = ["id", "placeholder", "rows", "disabled", "name", "aria-invalid", "aria-describedby"], Ze = ["id"], je = /* @__PURE__ */ $({
460
+ __name: "DsTextarea",
461
+ props: /* @__PURE__ */ U({
462
+ placeholder: { type: String, default: "" },
463
+ rows: { type: Number, default: 4 },
464
+ disabled: Boolean,
465
+ error: Boolean,
466
+ errorMessage: { type: String, default: "" },
467
+ name: { type: String, default: "" },
468
+ id: { type: String, default: "" }
469
+ }, {
470
+ modelValue: { default: "" },
471
+ modelModifiers: {}
472
+ }),
473
+ emits: /* @__PURE__ */ U([F, z], ["update:modelValue"]),
474
+ setup(e, { emit: i }) {
475
+ const l = Q(e, "modelValue"), r = i;
476
+ return (s, n) => (t(), a("div", {
477
+ class: m(["ds-textarea", { "is-error": e.error, "is-disabled": e.disabled }])
478
+ }, [
479
+ Z(d("textarea", {
480
+ id: e.id || void 0,
481
+ "onUpdate:modelValue": n[0] || (n[0] = (o) => l.value = o),
482
+ class: "ds-textarea__control",
483
+ placeholder: e.placeholder,
484
+ rows: e.rows,
485
+ disabled: e.disabled,
486
+ name: e.name || void 0,
487
+ "aria-invalid": e.error || void 0,
488
+ "aria-describedby": e.error && e.errorMessage && e.id ? `${e.id}-error` : void 0,
489
+ onFocus: n[1] || (n[1] = (o) => r(S(F), o)),
490
+ onBlur: n[2] || (n[2] = (o) => r(S(z), o))
491
+ }, null, 40, Qe), [
492
+ [ve, l.value]
493
+ ]),
494
+ e.error && e.errorMessage ? (t(), a("p", {
495
+ key: 0,
496
+ id: e.id ? `${e.id}-error` : void 0,
497
+ class: "ds-textarea__error"
498
+ }, v(e.errorMessage), 9, Ze)) : u("", !0)
499
+ ], 2));
500
+ }
501
+ }), la = /* @__PURE__ */ T(je, [["__scopeId", "data-v-54fc312a"]]), Je = ["disabled", "name"], et = {
502
+ key: 0,
503
+ class: "ds-checkbox__mark",
504
+ viewBox: "0 0 16 16",
505
+ fill: "none",
506
+ stroke: "currentColor",
507
+ "stroke-width": "2.5"
508
+ }, tt = {
509
+ key: 1,
510
+ class: "ds-checkbox__mark",
511
+ viewBox: "0 0 16 16",
512
+ fill: "none",
513
+ stroke: "currentColor",
514
+ "stroke-width": "2.5"
515
+ }, at = {
516
+ key: 0,
517
+ class: "ds-checkbox__label"
518
+ }, it = /* @__PURE__ */ $({
519
+ __name: "DsCheckbox",
520
+ props: /* @__PURE__ */ U({
521
+ indeterminate: Boolean,
522
+ disabled: Boolean,
523
+ name: { type: String, default: "" },
524
+ // Label text (DS `label` prop); a default slot overrides it.
525
+ label: { type: String, default: "" }
526
+ }, {
527
+ modelValue: { type: Boolean, default: !1 },
528
+ modelModifiers: {}
529
+ }),
530
+ emits: ["update:modelValue"],
531
+ setup(e) {
532
+ const i = Q(e, "modelValue"), l = e, r = R(null);
533
+ function s() {
534
+ r.value && (r.value.indeterminate = l.indeterminate);
535
+ }
536
+ return se(s), de(() => l.indeterminate, s), (n, o) => (t(), a("label", {
537
+ class: m(["ds-checkbox", { "is-disabled": e.disabled }])
538
+ }, [
539
+ Z(d("input", {
540
+ ref_key: "inputRef",
541
+ ref: r,
542
+ "onUpdate:modelValue": o[0] || (o[0] = (c) => i.value = c),
543
+ type: "checkbox",
544
+ class: "ds-checkbox__native",
545
+ disabled: e.disabled,
546
+ name: e.name || void 0
547
+ }, null, 8, Je), [
548
+ [be, i.value]
549
+ ]),
550
+ d("span", {
551
+ class: m(["ds-checkbox__box", { "is-active": i.value || e.indeterminate }]),
552
+ "aria-hidden": "true"
553
+ }, [
554
+ e.indeterminate ? (t(), a("svg", et, [...o[1] || (o[1] = [
555
+ d("line", {
556
+ x1: "4",
557
+ y1: "8",
558
+ x2: "12",
559
+ y2: "8"
560
+ }, null, -1)
561
+ ])])) : i.value ? (t(), a("svg", tt, [...o[2] || (o[2] = [
562
+ d("path", { d: "M3.5 8.5l3 3 6-6" }, null, -1)
563
+ ])])) : u("", !0)
564
+ ], 2),
565
+ n.$slots.default || e.label ? (t(), a("span", at, [
566
+ I(n.$slots, "default", {}, () => [
567
+ O(v(e.label), 1)
568
+ ], !0)
569
+ ])) : u("", !0)
570
+ ], 2));
571
+ }
572
+ }), na = /* @__PURE__ */ T(it, [["__scopeId", "data-v-8ccdf847"]]), lt = {
573
+ SUCCESS: "success",
574
+ INFO: "info",
575
+ WARNING: "warning",
576
+ ERROR: "error"
577
+ }, nt = {
578
+ LIGHT: "light",
579
+ // tinted: family tint bg + mid border + shadow text
580
+ DARK: "dark"
581
+ // solid: family shadow bg + white text
582
+ }, ot = {
583
+ success: "check_circle",
584
+ info: "info",
585
+ warning: "warning",
586
+ error: "error"
587
+ }, st = {
588
+ key: 0,
589
+ class: "material-icons ds-alert__icon",
590
+ "aria-hidden": "true"
591
+ }, dt = { class: "ds-alert__content" }, rt = {
592
+ key: 1,
593
+ class: "ds-alert__body"
594
+ }, ct = ["aria-label"], ut = /* @__PURE__ */ $({
595
+ __name: "DsAlert",
596
+ props: {
597
+ type: { type: String, default: lt.INFO },
598
+ effect: { type: String, default: nt.LIGHT },
599
+ title: { type: String, default: "" },
600
+ description: { type: String, default: "" },
601
+ showIcon: Boolean,
602
+ closable: Boolean,
603
+ center: Boolean,
604
+ closeLabel: { type: String, default: "" }
605
+ },
606
+ emits: [C],
607
+ setup(e, { emit: i }) {
608
+ const l = e, r = i, s = oe(), n = R(!0), o = h(() => ot[l.type]), c = h(() => !!s.default || l.description.length > 0);
609
+ function b() {
610
+ n.value = !1, r(C);
611
+ }
612
+ return (y, f) => n.value ? (t(), a("div", {
613
+ key: 0,
614
+ class: m(["ds-alert", [`ds-alert--${e.type}`, `ds-alert--${e.effect}`, { "is-center": e.center }]]),
615
+ role: "alert"
616
+ }, [
617
+ e.showIcon ? (t(), a("i", st, v(o.value), 1)) : u("", !0),
618
+ d("div", dt, [
619
+ e.title ? (t(), a("div", {
620
+ key: 0,
621
+ class: m(["ds-alert__title", { "has-body": c.value }])
622
+ }, v(e.title), 3)) : u("", !0),
623
+ c.value ? (t(), a("div", rt, [
624
+ I(y.$slots, "default", {}, () => [
625
+ O(v(e.description), 1)
626
+ ], !0)
627
+ ])) : u("", !0)
628
+ ]),
629
+ e.closable ? (t(), a("button", {
630
+ key: 1,
631
+ type: "button",
632
+ class: "ds-alert__close",
633
+ "aria-label": e.closeLabel || void 0,
634
+ onClick: b
635
+ }, [...f[0] || (f[0] = [
636
+ d("i", {
637
+ class: "material-icons",
638
+ "aria-hidden": "true"
639
+ }, "close", -1)
640
+ ])], 8, ct)) : u("", !0)
641
+ ], 2)) : u("", !0);
642
+ }
643
+ }), oa = /* @__PURE__ */ T(ut, [["__scopeId", "data-v-03bbe700"]]), ft = {
644
+ SUCCESS: "success",
645
+ INFO: "info",
646
+ WARNING: "warning",
647
+ ERROR: "error"
648
+ }, yt = {
649
+ TOP_LEFT: "top-left",
650
+ TOP_RIGHT: "top-right",
651
+ BOTTOM_LEFT: "bottom-left",
652
+ BOTTOM_RIGHT: "bottom-right"
653
+ }, vt = {
654
+ success: "check_circle",
655
+ info: "mode_edit",
656
+ warning: "warning",
657
+ error: "error"
658
+ }, bt = {
659
+ class: "material-icons ds-notification__icon",
660
+ "aria-hidden": "true"
661
+ }, mt = { class: "ds-notification__content" }, gt = {
662
+ key: 0,
663
+ class: "ds-notification__title"
664
+ }, ht = {
665
+ key: 1,
666
+ class: "ds-notification__desc"
667
+ }, St = ["href"], kt = ["aria-label"], $t = /* @__PURE__ */ $({
668
+ __name: "DsNotification",
669
+ props: {
670
+ type: { type: String, default: ft.INFO },
671
+ position: {
672
+ type: String,
673
+ default: yt.BOTTOM_LEFT
674
+ },
675
+ title: { type: String, default: "" },
676
+ description: { type: String, default: "" },
677
+ linkTitle: { type: String, default: "" },
678
+ link: { type: String, default: "" },
679
+ showClose: { type: Boolean, default: !0 },
680
+ closeLabel: { type: String, default: "" },
681
+ // Auto-dismiss delay in ms (DS default 3500). 0 disables it. The timer pauses
682
+ // while the pointer is over the card and resumes with the remaining time.
683
+ duration: { type: Number, default: 3500 }
684
+ },
685
+ emits: [C],
686
+ setup(e, { emit: i }) {
687
+ const l = e, r = i, s = R(!0), n = h(() => vt[l.type]);
688
+ let o, c = 0, b = l.duration;
689
+ function y() {
690
+ o && (clearTimeout(o), o = void 0);
691
+ }
692
+ function f(x) {
693
+ y(), !(l.duration <= 0 || !s.value) && (c = Date.now(), o = setTimeout(N, x));
694
+ }
695
+ function g() {
696
+ o && (b -= Date.now() - c, y());
697
+ }
698
+ function k() {
699
+ f(b > 0 ? b : l.duration);
700
+ }
701
+ function N() {
702
+ y(), s.value = !1, r(C);
703
+ }
704
+ return se(() => f(l.duration)), j(y), (x, M) => (t(), D(re, { to: "body" }, [
705
+ p(ce, {
706
+ name: "ds-notification",
707
+ appear: ""
708
+ }, {
709
+ default: J(() => [
710
+ s.value ? (t(), a("div", {
711
+ key: 0,
712
+ class: m(["ds-notification", `ds-notification--${e.position}`])
713
+ }, [
714
+ d("div", {
715
+ class: m(["ds-notification__card", `ds-notification__card--${e.type}`]),
716
+ role: "alert",
717
+ onMouseenter: g,
718
+ onMouseleave: k
719
+ }, [
720
+ d("i", bt, v(n.value), 1),
721
+ d("div", mt, [
722
+ e.title ? (t(), a("span", gt, v(e.title), 1)) : u("", !0),
723
+ e.description ? (t(), a("p", ht, v(e.description), 1)) : u("", !0),
724
+ e.linkTitle ? (t(), a("a", {
725
+ key: 2,
726
+ class: "ds-notification__link",
727
+ href: e.link || void 0,
728
+ target: "_blank",
729
+ rel: "noreferrer"
730
+ }, v(e.linkTitle), 9, St)) : u("", !0)
731
+ ]),
732
+ e.showClose ? (t(), a("button", {
733
+ key: 0,
734
+ type: "button",
735
+ class: "ds-notification__close",
736
+ "aria-label": e.closeLabel || void 0,
737
+ onClick: N
738
+ }, [...M[0] || (M[0] = [
739
+ d("i", {
740
+ class: "material-icons",
741
+ "aria-hidden": "true"
742
+ }, "close", -1)
743
+ ])], 8, kt)) : u("", !0)
744
+ ], 34)
745
+ ], 2)) : u("", !0)
746
+ ]),
747
+ _: 1
748
+ })
749
+ ]));
750
+ }
751
+ }), sa = /* @__PURE__ */ T($t, [["__scopeId", "data-v-dff620c6"]]), Tt = ["aria-label"], It = {
752
+ key: 0,
753
+ class: "ds-modal__header"
754
+ }, Ct = { class: "ds-modal__title" }, Et = { class: "ds-modal__body" }, wt = {
755
+ key: 1,
756
+ class: "ds-modal__footer"
757
+ }, Lt = /* @__PURE__ */ $({
758
+ __name: "DsModal",
759
+ props: {
760
+ open: Boolean,
761
+ title: { type: String, default: "" },
762
+ showClose: { type: Boolean, default: !0 },
763
+ width: { type: String, default: "440px" },
764
+ closeOnBackdrop: { type: Boolean, default: !0 },
765
+ closeLabel: { type: String, default: "" }
766
+ },
767
+ emits: [C],
768
+ setup(e, { emit: i }) {
769
+ const l = e, r = i, s = R(null);
770
+ let n = null;
771
+ function o() {
772
+ l.closeOnBackdrop && r(C);
773
+ }
774
+ function c() {
775
+ return s.value ? Array.from(s.value.querySelectorAll('a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])')).filter(
776
+ (f) => f.offsetParent !== null
777
+ ) : [];
778
+ }
779
+ function b(y) {
780
+ var N;
781
+ if (y.key === "Escape") {
782
+ r(C);
783
+ return;
784
+ }
785
+ if (y.key !== "Tab") return;
786
+ const f = c();
787
+ if (f.length === 0) {
788
+ y.preventDefault(), (N = s.value) == null || N.focus();
789
+ return;
790
+ }
791
+ const g = f[0], k = f[f.length - 1];
792
+ y.shiftKey && document.activeElement === g ? (y.preventDefault(), k.focus()) : !y.shiftKey && document.activeElement === k && (y.preventDefault(), g.focus());
793
+ }
794
+ return de(
795
+ () => l.open,
796
+ (y) => {
797
+ var f;
798
+ typeof document != "undefined" && (y ? (n = document.activeElement, document.addEventListener("keydown", b), document.body.style.overflow = "hidden", me(() => {
799
+ var g, k;
800
+ return (k = (g = c()[0]) != null ? g : s.value) == null ? void 0 : k.focus();
801
+ })) : (document.removeEventListener("keydown", b), document.body.style.overflow = "", (f = n == null ? void 0 : n.focus) == null || f.call(n)));
802
+ },
803
+ { immediate: !0 }
804
+ ), j(() => {
805
+ typeof document != "undefined" && (document.removeEventListener("keydown", b), document.body.style.overflow = "");
806
+ }), (y, f) => (t(), D(re, { to: "body" }, [
807
+ p(ce, { name: "ds-modal" }, {
808
+ default: J(() => [
809
+ e.open ? (t(), a("div", {
810
+ key: 0,
811
+ class: "ds-modal",
812
+ onClick: o
813
+ }, [
814
+ d("div", {
815
+ ref_key: "dialogRef",
816
+ ref: s,
817
+ class: "ds-modal__dialog",
818
+ role: "dialog",
819
+ "aria-modal": "true",
820
+ "aria-label": e.title || "dialog",
821
+ tabindex: "-1",
822
+ style: L({ width: e.width }),
823
+ onClick: f[1] || (f[1] = ue(() => {
824
+ }, ["stop"]))
825
+ }, [
826
+ e.title || e.showClose ? (t(), a("div", It, [
827
+ d("span", Ct, v(e.title), 1),
828
+ e.showClose ? (t(), D(S(K), {
829
+ key: 0,
830
+ variant: "tertiary",
831
+ circle: "",
832
+ "left-icon": "close",
833
+ "aria-label": e.closeLabel || void 0,
834
+ onClick: f[0] || (f[0] = (g) => r(S(C)))
835
+ }, null, 8, ["aria-label"])) : u("", !0)
836
+ ])) : u("", !0),
837
+ d("div", Et, [
838
+ I(y.$slots, "default", {}, void 0, !0)
839
+ ]),
840
+ y.$slots.footer ? (t(), a("div", wt, [
841
+ I(y.$slots, "footer", {}, void 0, !0)
842
+ ])) : u("", !0)
843
+ ], 12, Tt)
844
+ ])) : u("", !0)
845
+ ]),
846
+ _: 3
847
+ })
848
+ ]));
849
+ }
850
+ }), da = /* @__PURE__ */ T(Lt, [["__scopeId", "data-v-19866588"]]), q = {
851
+ VERIFIED: "verified",
852
+ UNVERIFIED: "unverified",
853
+ NEW: "new"
854
+ }, Dt = ["aria-label", "title"], Nt = /* @__PURE__ */ $({
855
+ __name: "DsVerificationIcon",
856
+ props: {
857
+ // true = verified · false = not verified · null/undefined = newly found.
858
+ verified: {
859
+ type: Boolean,
860
+ default: null
861
+ },
862
+ // Emails (true) use the coral "dangerous" glyph when unverified; phones use orange.
863
+ isContactData: {
864
+ type: Boolean,
865
+ default: !1
866
+ },
867
+ size: {
868
+ type: Number,
869
+ default: 20
870
+ },
871
+ // Optional override for the accessible label / tooltip (the app owns i18n).
872
+ // Empty → the English default derived from the verification state.
873
+ label: {
874
+ type: String,
875
+ default: ""
876
+ }
877
+ },
878
+ setup(e) {
879
+ const i = e, l = h(() => i.verified === null || i.verified === void 0 ? {
880
+ state: q.NEW,
881
+ icon: "new_releases",
882
+ label: "Newly found"
883
+ } : i.verified ? {
884
+ state: q.VERIFIED,
885
+ icon: "verified",
886
+ label: "Verified"
887
+ } : {
888
+ state: q.UNVERIFIED,
889
+ icon: i.isContactData ? "dangerous" : "error",
890
+ label: "Not verified"
891
+ });
892
+ return (r, s) => (t(), a("i", {
893
+ class: m(["material-icons ds-verification-icon", [
894
+ `ds-verification-icon--${l.value.state}`,
895
+ { "ds-verification-icon--email": e.isContactData }
896
+ ]]),
897
+ style: L({ fontSize: `${e.size}px` }),
898
+ role: "img",
899
+ "aria-label": e.label || l.value.label,
900
+ title: e.label || l.value.label
901
+ }, [
902
+ I(r.$slots, "default", {}, () => [
903
+ O(v(l.value.icon), 1)
904
+ ], !0)
905
+ ], 14, Dt));
906
+ }
907
+ }), Rt = /* @__PURE__ */ T(Nt, [["__scopeId", "data-v-0fd84040"]]), Bt = ["title"], At = { class: "ds-contact-value__marquee" }, Ot = { class: "ds-contact-value__actions" }, xt = ["aria-label", "title"], Mt = {
908
+ class: "material-icons",
909
+ "aria-hidden": "true"
910
+ }, Ut = ["aria-label", "aria-pressed", "title"], Vt = ["aria-label", "aria-pressed", "title"], Ft = /* @__PURE__ */ $({
911
+ __name: "DsContactValue",
912
+ props: {
913
+ value: { type: String, required: !0 },
914
+ valueType: { type: String, default: "" },
915
+ verified: { type: Boolean, default: null },
916
+ main: { type: Boolean, default: !1 },
917
+ isContactData: { type: Boolean, default: !1 },
918
+ showRate: { type: Boolean, default: !1 },
919
+ correct: { type: Boolean, default: null },
920
+ // User-facing labels (the app owns i18n); English DS defaults.
921
+ copyLabel: { type: String, default: "Copy" },
922
+ copiedLabel: { type: String, default: "Copied!" },
923
+ correctLabel: { type: String, default: "Correct" },
924
+ incorrectLabel: { type: String, default: "Incorrect" }
925
+ },
926
+ emits: [G, _, P],
927
+ setup(e, { emit: i }) {
928
+ const l = e, r = i, s = R(!1);
929
+ let n;
930
+ function o() {
931
+ typeof navigator != "undefined" && navigator.clipboard && navigator.clipboard.writeText(l.value).catch(() => {
932
+ }), s.value = !0, clearTimeout(n), n = setTimeout(() => {
933
+ s.value = !1;
934
+ }, 1200), r(G, l.value);
935
+ }
936
+ function c() {
937
+ r(_);
938
+ }
939
+ function b() {
940
+ r(P);
941
+ }
942
+ return j(() => clearTimeout(n)), (y, f) => (t(), a("div", {
943
+ class: m(["ds-contact-value", { "ds-contact-value--main": e.main }])
944
+ }, [
945
+ p(S(Rt), {
946
+ verified: e.verified,
947
+ "is-contact-data": e.isContactData
948
+ }, null, 8, ["verified", "is-contact-data"]),
949
+ d("span", {
950
+ class: "ds-contact-value__value",
951
+ title: e.value
952
+ }, v(e.value), 9, Bt),
953
+ d("span", At, [
954
+ e.valueType ? (t(), D(S(Ae), {
955
+ key: 0,
956
+ class: "ds-contact-value__badge",
957
+ tone: e.main ? S(X).ACCENT : S(X).GREY,
958
+ "aria-hidden": "true"
959
+ }, {
960
+ default: J(() => [
961
+ O(v(e.valueType), 1)
962
+ ]),
963
+ _: 1
964
+ }, 8, ["tone"])) : u("", !0),
965
+ d("span", Ot, [
966
+ d("button", {
967
+ type: "button",
968
+ class: m(["ds-contact-value__action", { "is-copied": s.value }]),
969
+ "aria-label": s.value ? e.copiedLabel : e.copyLabel,
970
+ title: s.value ? e.copiedLabel : e.copyLabel,
971
+ onClick: o
972
+ }, [
973
+ d("i", Mt, v(s.value ? "check" : "content_copy"), 1)
974
+ ], 10, xt),
975
+ e.showRate ? (t(), a(A, { key: 0 }, [
976
+ d("button", {
977
+ type: "button",
978
+ class: "ds-contact-value__action",
979
+ "aria-label": e.correctLabel,
980
+ "aria-pressed": e.correct === !0,
981
+ title: e.correctLabel,
982
+ onClick: c
983
+ }, [
984
+ d("i", {
985
+ class: m(e.correct === !0 ? "material-icons" : "material-icons-outlined"),
986
+ "aria-hidden": "true"
987
+ }, "thumb_up", 2)
988
+ ], 8, Ut),
989
+ d("button", {
990
+ type: "button",
991
+ class: "ds-contact-value__action",
992
+ "aria-label": e.incorrectLabel,
993
+ "aria-pressed": e.correct === !1,
994
+ title: e.incorrectLabel,
995
+ onClick: b
996
+ }, [
997
+ d("i", {
998
+ class: m(e.correct === !1 ? "material-icons" : "material-icons-outlined"),
999
+ "aria-hidden": "true"
1000
+ }, "thumb_down", 2)
1001
+ ], 8, Vt)
1002
+ ], 64)) : u("", !0)
1003
+ ])
1004
+ ])
1005
+ ], 2));
1006
+ }
1007
+ }), ne = /* @__PURE__ */ T(Ft, [["__scopeId", "data-v-75a78ae2"]]), zt = ["aria-label"], Gt = { class: "ds-data-card__heading" }, _t = {
1008
+ class: "material-icons ds-data-card__icon",
1009
+ "aria-hidden": "true"
1010
+ }, Pt = { class: "ds-data-card__title" }, pt = ["aria-label"], Ht = {
1011
+ key: 0,
1012
+ class: "ds-data-card__body"
1013
+ }, Yt = {
1014
+ key: 0,
1015
+ class: "ds-data-card__empty"
1016
+ }, qt = {
1017
+ class: "material-icons-outlined ds-data-card__empty-icon",
1018
+ "aria-hidden": "true"
1019
+ }, Wt = { key: 0 }, Kt = {
1020
+ key: 0,
1021
+ class: "ds-data-card__section"
1022
+ }, Xt = { key: 1 }, Qt = {
1023
+ key: 0,
1024
+ class: "ds-data-card__section"
1025
+ }, Zt = { class: "ds-data-card__more" }, jt = /* @__PURE__ */ $({
1026
+ __name: "DsDataCard",
1027
+ props: {
1028
+ title: { type: String, required: !0 },
1029
+ // Material Icon name for the header (e.g. "email", "call").
1030
+ icon: { type: String, default: "email" },
1031
+ mostLikely: { type: Object, default: null },
1032
+ more: { type: Array, default: () => [] },
1033
+ collapsible: { type: Boolean, default: !1 },
1034
+ showSort: { type: Boolean, default: !0 },
1035
+ showEdit: { type: Boolean, default: !1 },
1036
+ showClose: { type: Boolean, default: !1 },
1037
+ isContactData: { type: Boolean, default: !1 },
1038
+ showRate: { type: Boolean, default: !1 },
1039
+ // User-facing labels (the app owns i18n); English DS defaults.
1040
+ editLabel: { type: String, default: "Edit" },
1041
+ emptyLabel: { type: String, default: "No data found" },
1042
+ mostLikelyLabel: { type: String, default: "MOST LIKELY" },
1043
+ moreLabel: { type: String, default: "MORE" },
1044
+ sortLabel: { type: String, default: "Sort" },
1045
+ toggleLabel: { type: String, default: "Toggle" },
1046
+ closeLabel: { type: String, default: "Close" }
1047
+ },
1048
+ emits: [G, te, ae, C, _, P],
1049
+ setup(e, { emit: i }) {
1050
+ const l = e, r = i, s = R(!1), n = h(() => l.more.length + (l.mostLikely ? 1 : 0)), o = h(() => n.value > 3), c = h(() => n.value === 0), b = h(() => l.collapsible && s.value);
1051
+ function y() {
1052
+ s.value = !s.value;
1053
+ }
1054
+ function f(B) {
1055
+ r(G, B);
1056
+ }
1057
+ function g() {
1058
+ r(te);
1059
+ }
1060
+ function k() {
1061
+ r(ae);
1062
+ }
1063
+ function N() {
1064
+ r(C);
1065
+ }
1066
+ function x(B) {
1067
+ r(_, B);
1068
+ }
1069
+ function M(B) {
1070
+ r(P, B);
1071
+ }
1072
+ return (B, E) => (t(), a("section", {
1073
+ class: "ds-data-card",
1074
+ "aria-label": e.title
1075
+ }, [
1076
+ d("div", {
1077
+ class: m(["ds-data-card__header", { "is-collapsed": b.value, "is-collapsible": e.collapsible }]),
1078
+ onClick: E[1] || (E[1] = (w) => e.collapsible && y())
1079
+ }, [
1080
+ d("div", Gt, [
1081
+ d("i", _t, v(e.icon), 1),
1082
+ d("span", Pt, v(e.title), 1)
1083
+ ]),
1084
+ d("div", {
1085
+ class: "ds-data-card__actions",
1086
+ onClick: E[0] || (E[0] = ue(() => {
1087
+ }, ["stop"]))
1088
+ }, [
1089
+ !b.value && e.showEdit ? (t(), a("button", {
1090
+ key: 0,
1091
+ type: "button",
1092
+ class: "ds-data-card__edit",
1093
+ onClick: k
1094
+ }, v(e.editLabel), 1)) : u("", !0),
1095
+ !b.value && e.showSort ? (t(), D(S(K), {
1096
+ key: 1,
1097
+ variant: "tertiary",
1098
+ size: "medium",
1099
+ circle: "",
1100
+ "left-icon": "swap_vert",
1101
+ "aria-label": e.sortLabel,
1102
+ onClick: g
1103
+ }, null, 8, ["aria-label"])) : u("", !0),
1104
+ e.collapsible ? (t(), D(S(K), {
1105
+ key: 2,
1106
+ variant: "tertiary",
1107
+ size: "medium",
1108
+ circle: "",
1109
+ "left-icon": s.value ? "keyboard_arrow_down" : "keyboard_arrow_up",
1110
+ "aria-label": e.toggleLabel,
1111
+ onClick: y
1112
+ }, null, 8, ["left-icon", "aria-label"])) : u("", !0),
1113
+ e.showClose ? (t(), a("button", {
1114
+ key: 3,
1115
+ type: "button",
1116
+ class: "ds-data-card__close",
1117
+ "aria-label": e.closeLabel,
1118
+ onClick: N
1119
+ }, [...E[4] || (E[4] = [
1120
+ d("i", {
1121
+ class: "material-icons",
1122
+ "aria-hidden": "true"
1123
+ }, "close", -1)
1124
+ ])], 8, pt)) : u("", !0)
1125
+ ])
1126
+ ], 2),
1127
+ b.value ? u("", !0) : (t(), a("div", Ht, [
1128
+ c.value ? (t(), a("div", Yt, [
1129
+ d("i", qt, v(e.icon), 1),
1130
+ d("span", null, v(e.emptyLabel), 1)
1131
+ ])) : (t(), a(A, { key: 1 }, [
1132
+ e.mostLikely ? (t(), a("div", Wt, [
1133
+ o.value ? (t(), a("div", Kt, v(e.mostLikelyLabel), 1)) : u("", !0),
1134
+ p(S(ne), {
1135
+ value: e.mostLikely.value,
1136
+ "value-type": e.mostLikely.type,
1137
+ verified: e.mostLikely.verified,
1138
+ correct: e.mostLikely.correct,
1139
+ main: "",
1140
+ "is-contact-data": e.isContactData,
1141
+ "show-rate": e.showRate,
1142
+ onCopy: f,
1143
+ onCorrect: E[2] || (E[2] = (w) => x(e.mostLikely)),
1144
+ onIncorrect: E[3] || (E[3] = (w) => M(e.mostLikely))
1145
+ }, null, 8, ["value", "value-type", "verified", "correct", "is-contact-data", "show-rate"])
1146
+ ])) : u("", !0),
1147
+ e.more.length > 0 ? (t(), a("div", Xt, [
1148
+ o.value ? (t(), a("div", Qt, v(e.moreLabel), 1)) : u("", !0),
1149
+ d("div", Zt, [
1150
+ (t(!0), a(A, null, V(e.more, (w) => (t(), D(S(ne), {
1151
+ key: w.value,
1152
+ value: w.value,
1153
+ "value-type": w.type,
1154
+ verified: w.verified,
1155
+ correct: w.correct,
1156
+ "is-contact-data": e.isContactData,
1157
+ "show-rate": e.showRate,
1158
+ onCopy: f,
1159
+ onCorrect: (fe) => x(w),
1160
+ onIncorrect: (fe) => M(w)
1161
+ }, null, 8, ["value", "value-type", "verified", "correct", "is-contact-data", "show-rate", "onCorrect", "onIncorrect"]))), 128))
1162
+ ])
1163
+ ])) : u("", !0)
1164
+ ], 64))
1165
+ ]))
1166
+ ], 8, zt));
1167
+ }
1168
+ }), ra = /* @__PURE__ */ T(jt, [["__scopeId", "data-v-86467226"]]);
216
1169
  export {
217
- f as BASIC_TABLE_ALIGN,
218
- H as BasicTable,
219
- $ as SQL_BUTTON_NATIVE_TYPES,
220
- q as SQL_BUTTON_SIZES,
221
- E as SQL_BUTTON_TYPES,
222
- B as SQL_SPINNER_SIZES,
223
- T as SQL_SPINNER_THEME_MODES,
224
- x as SqlButton,
225
- M as SqlSpinner
1170
+ nt as DS_ALERT_EFFECTS,
1171
+ ot as DS_ALERT_ICONS,
1172
+ lt as DS_ALERT_TYPES,
1173
+ X as DS_BADGE_TONES,
1174
+ ke as DS_BUTTON_NATIVE_TYPES,
1175
+ ie as DS_BUTTON_SIZES,
1176
+ H as DS_BUTTON_VARIANTS,
1177
+ _e as DS_INPUT_SIZES,
1178
+ Y as DS_INPUT_TYPES,
1179
+ vt as DS_NOTIFICATION_ICONS,
1180
+ yt as DS_NOTIFICATION_POSITIONS,
1181
+ ft as DS_NOTIFICATION_TYPES,
1182
+ W as DS_SPINNER_TONES,
1183
+ le as DS_TABLE_ALIGN,
1184
+ De as DS_TAG_TONES,
1185
+ q as DS_VERIFICATION_STATES,
1186
+ oa as DsAlert,
1187
+ ta as DsAvatar,
1188
+ Ae as DsBadge,
1189
+ K as DsButton,
1190
+ na as DsCheckbox,
1191
+ ne as DsContactValue,
1192
+ ra as DsDataCard,
1193
+ ia as DsInput,
1194
+ da as DsModal,
1195
+ sa as DsNotification,
1196
+ Se as DsSpinner,
1197
+ aa as DsTable,
1198
+ ea as DsTag,
1199
+ la as DsTextarea,
1200
+ Rt as DsVerificationIcon
226
1201
  };
227
1202
  //# sourceMappingURL=index.es.js.map