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