@datametria/vue-components 1.1.1 → 1.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -1,15 +1,15 @@
1
- import { defineComponent as f, computed as C, createElementBlock as t, openBlock as a, normalizeClass as y, createCommentVNode as c, renderSlot as p, createElementVNode as i, createTextVNode as w, toDisplayString as m, Fragment as B, renderList as L, ref as k, watch as T, withDirectives as N, vModelText as R, withModifiers as S, onMounted as P, onUnmounted as X, createBlock as K, Teleport as j, createVNode as G, Transition as H, withCtx as J, normalizeStyle as A, withKeys as U } from "vue";
2
- var W = /* @__PURE__ */ ((e) => (e.PRIMARY = "primary", e.SECONDARY = "secondary", e.OUTLINE = "outline", e.GHOST = "ghost", e))(W || {}), Y = /* @__PURE__ */ ((e) => (e.SM = "sm", e.MD = "md", e.LG = "lg", e))(Y || {});
3
- const Z = ["disabled", "type", "aria-busy", "aria-disabled"], ee = {
1
+ import { defineComponent as S, computed as T, createElementBlock as s, openBlock as t, normalizeClass as L, createCommentVNode as h, renderSlot as R, createElementVNode as v, createTextVNode as N, toDisplayString as g, Fragment as W, renderList as X, ref as V, watch as H, withDirectives as ie, vModelText as ne, nextTick as Y, normalizeStyle as j, withModifiers as Z, onMounted as J, onUnmounted as re, createBlock as ee, Teleport as ae, createVNode as te, Transition as le, withCtx as se, createStaticVNode as ve, withKeys as de, resolveDynamicComponent as he } from "vue";
2
+ var ue = /* @__PURE__ */ ((e) => (e.PRIMARY = "primary", e.SECONDARY = "secondary", e.OUTLINE = "outline", e.GHOST = "ghost", e))(ue || {}), me = /* @__PURE__ */ ((e) => (e.SM = "sm", e.MD = "md", e.LG = "lg", e))(me || {});
3
+ const fe = ["disabled", "type", "aria-busy", "aria-disabled"], be = {
4
4
  key: 0,
5
5
  class: "spinner",
6
6
  role: "status",
7
7
  "aria-label": "Carregando"
8
- }, ae = /* @__PURE__ */ f({
8
+ }, pe = /* @__PURE__ */ S({
9
9
  __name: "DatametriaButton",
10
10
  props: {
11
- variant: { default: W.PRIMARY },
12
- size: { default: Y.MD },
11
+ variant: { default: ue.PRIMARY },
12
+ size: { default: me.MD },
13
13
  disabled: { type: Boolean, default: !1 },
14
14
  loading: { type: Boolean, default: !1 },
15
15
  fullWidth: { type: Boolean, default: !1 },
@@ -17,40 +17,40 @@ const Z = ["disabled", "type", "aria-busy", "aria-disabled"], ee = {
17
17
  },
18
18
  emits: ["click"],
19
19
  setup(e) {
20
- const l = e, s = C(() => [
20
+ const r = e, i = T(() => [
21
21
  "datametria-button",
22
- `datametria-button--${l.variant}`,
23
- `datametria-button--${l.size}`,
22
+ `datametria-button--${r.variant}`,
23
+ `datametria-button--${r.size}`,
24
24
  {
25
- "datametria-button--full-width": l.fullWidth,
26
- "datametria-button--loading": l.loading,
27
- "datametria-button--disabled": l.disabled
25
+ "datametria-button--full-width": r.fullWidth,
26
+ "datametria-button--loading": r.loading,
27
+ "datametria-button--disabled": r.disabled
28
28
  }
29
29
  ]);
30
- return (o, r) => (a(), t("button", {
31
- class: y(s.value),
30
+ return (a, l) => (t(), s("button", {
31
+ class: L(i.value),
32
32
  disabled: e.disabled || e.loading,
33
33
  type: e.type,
34
34
  "aria-busy": e.loading,
35
35
  "aria-disabled": e.disabled,
36
- onClick: r[0] || (r[0] = (d) => o.$emit("click", d))
36
+ onClick: l[0] || (l[0] = (n) => a.$emit("click", n))
37
37
  }, [
38
- e.loading ? (a(), t("span", ee)) : c("", !0),
39
- p(o.$slots, "default", {}, void 0, !0)
40
- ], 10, Z));
38
+ e.loading ? (t(), s("span", be)) : h("", !0),
39
+ R(a.$slots, "default", {}, void 0, !0)
40
+ ], 10, fe));
41
41
  }
42
- }), _ = (e, l) => {
43
- const s = e.__vccOpts || e;
44
- for (const [o, r] of l)
45
- s[o] = r;
46
- return s;
47
- }, Et = /* @__PURE__ */ _(ae, [["__scopeId", "data-v-e9850b65"]]), te = { class: "datametria-input" }, le = ["for"], se = {
42
+ }), E = (e, r) => {
43
+ const i = e.__vccOpts || e;
44
+ for (const [a, l] of r)
45
+ i[a] = l;
46
+ return i;
47
+ }, Xl = /* @__PURE__ */ E(pe, [["__scopeId", "data-v-e9850b65"]]), ge = { class: "datametria-input" }, _e = ["for"], ke = {
48
48
  key: 0,
49
49
  class: "datametria-input__required"
50
- }, re = ["id", "value", "placeholder", "disabled", "required"], de = {
50
+ }, ye = ["id", "value", "placeholder", "disabled", "required"], $e = {
51
51
  key: 1,
52
52
  class: "datametria-input__error"
53
- }, oe = /* @__PURE__ */ f({
53
+ }, we = /* @__PURE__ */ S({
54
54
  __name: "DatametriaInput",
55
55
  props: {
56
56
  modelValue: { default: "" },
@@ -62,45 +62,45 @@ const Z = ["disabled", "type", "aria-busy", "aria-disabled"], ee = {
62
62
  },
63
63
  emits: ["update:modelValue"],
64
64
  setup(e) {
65
- const l = e, s = C(() => `input-${Math.random().toString(36).substr(2, 9)}`), o = C(() => [
65
+ const r = e, i = T(() => `input-${Math.random().toString(36).substr(2, 9)}`), a = T(() => [
66
66
  "datametria-input__field",
67
67
  {
68
- "datametria-input__field--error": l.errorMessage,
69
- "datametria-input__field--disabled": l.disabled
68
+ "datametria-input__field--error": r.errorMessage,
69
+ "datametria-input__field--disabled": r.disabled
70
70
  }
71
71
  ]);
72
- return (r, d) => (a(), t("div", te, [
73
- e.label ? (a(), t("label", {
72
+ return (l, n) => (t(), s("div", ge, [
73
+ e.label ? (t(), s("label", {
74
74
  key: 0,
75
- for: s.value,
75
+ for: i.value,
76
76
  class: "datametria-input__label"
77
77
  }, [
78
- w(m(e.label) + " ", 1),
79
- e.required ? (a(), t("span", se, "*")) : c("", !0)
80
- ], 8, le)) : c("", !0),
81
- i("input", {
82
- id: s.value,
78
+ N(g(e.label) + " ", 1),
79
+ e.required ? (t(), s("span", ke, "*")) : h("", !0)
80
+ ], 8, _e)) : h("", !0),
81
+ v("input", {
82
+ id: i.value,
83
83
  value: e.modelValue,
84
84
  placeholder: e.placeholder,
85
85
  disabled: e.disabled,
86
86
  required: e.required,
87
- class: y(o.value),
88
- onInput: d[0] || (d[0] = (n) => r.$emit("update:modelValue", n.target.value))
89
- }, null, 42, re),
90
- e.errorMessage ? (a(), t("p", de, m(e.errorMessage), 1)) : c("", !0)
87
+ class: L(a.value),
88
+ onInput: n[0] || (n[0] = (d) => l.$emit("update:modelValue", d.target.value))
89
+ }, null, 42, ye),
90
+ e.errorMessage ? (t(), s("p", $e, g(e.errorMessage), 1)) : h("", !0)
91
91
  ]));
92
92
  }
93
- }), At = /* @__PURE__ */ _(oe, [["__scopeId", "data-v-cae54108"]]), ie = { class: "datametria-select" }, ne = ["for"], ce = {
93
+ }), jl = /* @__PURE__ */ E(we, [["__scopeId", "data-v-cae54108"]]), xe = { class: "datametria-select" }, Ve = ["for"], Me = {
94
94
  key: 0,
95
95
  class: "datametria-select__required"
96
- }, ue = ["id", "value", "disabled", "required"], me = {
96
+ }, De = ["id", "value", "disabled", "required"], Ce = {
97
97
  key: 0,
98
98
  value: "",
99
99
  disabled: ""
100
- }, be = ["value"], ve = {
100
+ }, Ie = ["value"], Be = {
101
101
  key: 1,
102
102
  class: "datametria-select__error"
103
- }, he = /* @__PURE__ */ f({
103
+ }, Te = /* @__PURE__ */ S({
104
104
  __name: "DatametriaSelect",
105
105
  props: {
106
106
  modelValue: { default: "" },
@@ -113,43 +113,43 @@ const Z = ["disabled", "type", "aria-busy", "aria-disabled"], ee = {
113
113
  },
114
114
  emits: ["update:modelValue"],
115
115
  setup(e) {
116
- const l = e, s = C(() => `select-${Math.random().toString(36).substr(2, 9)}`), o = C(() => [
116
+ const r = e, i = T(() => `select-${Math.random().toString(36).substr(2, 9)}`), a = T(() => [
117
117
  "datametria-select__field",
118
118
  {
119
- "datametria-select__field--error": l.errorMessage,
120
- "datametria-select__field--disabled": l.disabled
119
+ "datametria-select__field--error": r.errorMessage,
120
+ "datametria-select__field--disabled": r.disabled
121
121
  }
122
122
  ]);
123
- return (r, d) => (a(), t("div", ie, [
124
- e.label ? (a(), t("label", {
123
+ return (l, n) => (t(), s("div", xe, [
124
+ e.label ? (t(), s("label", {
125
125
  key: 0,
126
- for: s.value,
126
+ for: i.value,
127
127
  class: "datametria-select__label"
128
128
  }, [
129
- w(m(e.label) + " ", 1),
130
- e.required ? (a(), t("span", ce, "*")) : c("", !0)
131
- ], 8, ne)) : c("", !0),
132
- i("select", {
133
- id: s.value,
129
+ N(g(e.label) + " ", 1),
130
+ e.required ? (t(), s("span", Me, "*")) : h("", !0)
131
+ ], 8, Ve)) : h("", !0),
132
+ v("select", {
133
+ id: i.value,
134
134
  value: e.modelValue,
135
135
  disabled: e.disabled,
136
136
  required: e.required,
137
- class: y(o.value),
138
- onChange: d[0] || (d[0] = (n) => r.$emit("update:modelValue", n.target.value))
137
+ class: L(a.value),
138
+ onChange: n[0] || (n[0] = (d) => l.$emit("update:modelValue", d.target.value))
139
139
  }, [
140
- e.placeholder ? (a(), t("option", me, m(e.placeholder), 1)) : c("", !0),
141
- (a(!0), t(B, null, L(e.options, (n) => (a(), t("option", {
142
- key: n.value,
143
- value: n.value
144
- }, m(n.label), 9, be))), 128))
145
- ], 42, ue),
146
- e.errorMessage ? (a(), t("p", ve, m(e.errorMessage), 1)) : c("", !0)
140
+ e.placeholder ? (t(), s("option", Ce, g(e.placeholder), 1)) : h("", !0),
141
+ (t(!0), s(W, null, X(e.options, (d) => (t(), s("option", {
142
+ key: d.value,
143
+ value: d.value
144
+ }, g(d.label), 9, Ie))), 128))
145
+ ], 42, De),
146
+ e.errorMessage ? (t(), s("p", Be, g(e.errorMessage), 1)) : h("", !0)
147
147
  ]));
148
148
  }
149
- }), Ot = /* @__PURE__ */ _(he, [["__scopeId", "data-v-96f4e8ce"]]), fe = { class: "datametria-checkbox" }, _e = ["checked", "disabled"], $e = {
149
+ }), Hl = /* @__PURE__ */ E(Te, [["__scopeId", "data-v-96f4e8ce"]]), Le = { class: "datametria-checkbox" }, Se = ["checked", "disabled"], Ee = {
150
150
  key: 0,
151
151
  class: "datametria-checkbox__label"
152
- }, ye = /* @__PURE__ */ f({
152
+ }, qe = /* @__PURE__ */ S({
153
153
  __name: "DatametriaCheckbox",
154
154
  props: {
155
155
  modelValue: { type: Boolean, default: !1 },
@@ -158,22 +158,22 @@ const Z = ["disabled", "type", "aria-busy", "aria-disabled"], ee = {
158
158
  },
159
159
  emits: ["update:modelValue"],
160
160
  setup(e) {
161
- return (l, s) => (a(), t("label", fe, [
162
- i("input", {
161
+ return (r, i) => (t(), s("label", Le, [
162
+ v("input", {
163
163
  type: "checkbox",
164
164
  checked: e.modelValue,
165
165
  disabled: e.disabled,
166
166
  class: "datametria-checkbox__input",
167
- onChange: s[0] || (s[0] = (o) => l.$emit("update:modelValue", o.target.checked))
168
- }, null, 40, _e),
169
- s[1] || (s[1] = i("span", { class: "datametria-checkbox__checkmark" }, null, -1)),
170
- e.label ? (a(), t("span", $e, m(e.label), 1)) : c("", !0)
167
+ onChange: i[0] || (i[0] = (a) => r.$emit("update:modelValue", a.target.checked))
168
+ }, null, 40, Se),
169
+ i[1] || (i[1] = v("span", { class: "datametria-checkbox__checkmark" }, null, -1)),
170
+ e.label ? (t(), s("span", Ee, g(e.label), 1)) : h("", !0)
171
171
  ]));
172
172
  }
173
- }), Nt = /* @__PURE__ */ _(ye, [["__scopeId", "data-v-3226ffd6"]]), ke = { class: "dm-radio" }, pe = { class: "dm-radio__label" }, ge = ["value", "checked", "disabled", "name", "aria-label", "aria-describedby"], De = {
173
+ }), Gl = /* @__PURE__ */ E(qe, [["__scopeId", "data-v-3226ffd6"]]), Re = { class: "dm-radio" }, ze = { class: "dm-radio__label" }, Fe = ["value", "checked", "disabled", "name", "aria-label", "aria-describedby"], Ae = {
174
174
  key: 0,
175
175
  class: "dm-radio__text"
176
- }, Ve = ["id"], we = /* @__PURE__ */ f({
176
+ }, Oe = ["id"], Ne = /* @__PURE__ */ S({
177
177
  __name: "DatametriaRadio",
178
178
  props: {
179
179
  modelValue: { type: [String, Number, Boolean] },
@@ -185,13 +185,13 @@ const Z = ["disabled", "type", "aria-busy", "aria-disabled"], ee = {
185
185
  ariaLabel: {}
186
186
  },
187
187
  emits: ["update:modelValue"],
188
- setup(e, { emit: l }) {
189
- const s = e, o = l, r = () => {
190
- s.disabled || o("update:modelValue", s.value);
188
+ setup(e, { emit: r }) {
189
+ const i = e, a = r, l = () => {
190
+ i.disabled || a("update:modelValue", i.value);
191
191
  };
192
- return (d, n) => (a(), t("div", ke, [
193
- i("label", pe, [
194
- i("input", {
192
+ return (n, d) => (t(), s("div", Re, [
193
+ v("label", ze, [
194
+ v("input", {
195
195
  type: "radio",
196
196
  class: "dm-radio__input",
197
197
  value: e.value,
@@ -200,25 +200,25 @@ const Z = ["disabled", "type", "aria-busy", "aria-disabled"], ee = {
200
200
  name: e.name,
201
201
  "aria-label": e.ariaLabel,
202
202
  "aria-describedby": e.error ? `${e.name}-error` : void 0,
203
- onChange: r
204
- }, null, 40, ge),
205
- n[0] || (n[0] = i("span", { class: "dm-radio__checkmark" }, null, -1)),
206
- e.label ? (a(), t("span", De, m(e.label), 1)) : c("", !0)
203
+ onChange: l
204
+ }, null, 40, Fe),
205
+ d[0] || (d[0] = v("span", { class: "dm-radio__checkmark" }, null, -1)),
206
+ e.label ? (t(), s("span", Ae, g(e.label), 1)) : h("", !0)
207
207
  ]),
208
- e.error ? (a(), t("p", {
208
+ e.error ? (t(), s("p", {
209
209
  key: 0,
210
210
  id: `${e.name}-error`,
211
211
  class: "dm-radio__error"
212
- }, m(e.error), 9, Ve)) : c("", !0)
212
+ }, g(e.error), 9, Oe)) : h("", !0)
213
213
  ]));
214
214
  }
215
- }), Rt = /* @__PURE__ */ _(we, [["__scopeId", "data-v-4fb0fa6f"]]), Ce = { class: "dm-switch" }, Ie = { class: "dm-switch__label" }, Be = ["checked", "disabled", "aria-label", "aria-checked"], Le = {
215
+ }), Yl = /* @__PURE__ */ E(Ne, [["__scopeId", "data-v-4fb0fa6f"]]), Pe = { class: "dm-switch" }, Ue = { class: "dm-switch__label" }, We = ["checked", "disabled", "aria-label", "aria-checked"], Ke = {
216
216
  key: 0,
217
217
  class: "dm-switch__text"
218
- }, Me = {
218
+ }, Xe = {
219
219
  key: 0,
220
220
  class: "dm-switch__error"
221
- }, qe = /* @__PURE__ */ f({
221
+ }, je = /* @__PURE__ */ S({
222
222
  __name: "DatametriaSwitch",
223
223
  props: {
224
224
  modelValue: { type: Boolean, default: !1 },
@@ -228,13 +228,13 @@ const Z = ["disabled", "type", "aria-busy", "aria-disabled"], ee = {
228
228
  ariaLabel: {}
229
229
  },
230
230
  emits: ["update:modelValue"],
231
- setup(e, { emit: l }) {
232
- const s = e, o = l, r = (d) => {
233
- s.disabled || o("update:modelValue", d.target.checked);
231
+ setup(e, { emit: r }) {
232
+ const i = e, a = r, l = (n) => {
233
+ i.disabled || a("update:modelValue", n.target.checked);
234
234
  };
235
- return (d, n) => (a(), t("div", Ce, [
236
- i("label", Ie, [
237
- i("input", {
235
+ return (n, d) => (t(), s("div", Pe, [
236
+ v("label", Ue, [
237
+ v("input", {
238
238
  type: "checkbox",
239
239
  class: "dm-switch__input",
240
240
  checked: e.modelValue,
@@ -242,26 +242,26 @@ const Z = ["disabled", "type", "aria-busy", "aria-disabled"], ee = {
242
242
  "aria-label": e.ariaLabel,
243
243
  "aria-checked": e.modelValue,
244
244
  role: "switch",
245
- onChange: r
246
- }, null, 40, Be),
247
- n[0] || (n[0] = i("span", { class: "dm-switch__track" }, [
248
- i("span", { class: "dm-switch__thumb" })
245
+ onChange: l
246
+ }, null, 40, We),
247
+ d[0] || (d[0] = v("span", { class: "dm-switch__track" }, [
248
+ v("span", { class: "dm-switch__thumb" })
249
249
  ], -1)),
250
- e.label ? (a(), t("span", Le, m(e.label), 1)) : c("", !0)
250
+ e.label ? (t(), s("span", Ke, g(e.label), 1)) : h("", !0)
251
251
  ]),
252
- e.error ? (a(), t("p", Me, m(e.error), 1)) : c("", !0)
252
+ e.error ? (t(), s("p", Xe, g(e.error), 1)) : h("", !0)
253
253
  ]));
254
254
  }
255
- }), Ut = /* @__PURE__ */ _(qe, [["__scopeId", "data-v-f57b4d9a"]]), Te = { class: "dm-textarea" }, xe = {
255
+ }), Jl = /* @__PURE__ */ E(je, [["__scopeId", "data-v-f57b4d9a"]]), He = { class: "dm-textarea" }, Ge = {
256
256
  key: 0,
257
257
  class: "dm-textarea__required"
258
- }, Se = ["placeholder", "disabled", "required", "rows", "maxlength", "aria-label", "aria-describedby", "aria-invalid"], ze = {
258
+ }, Ye = ["placeholder", "disabled", "required", "rows", "maxlength", "aria-label", "aria-describedby", "aria-invalid"], Je = {
259
259
  key: 1,
260
260
  class: "dm-textarea__footer"
261
- }, Ee = ["id"], Ae = {
261
+ }, Qe = ["id"], Ze = {
262
262
  key: 1,
263
263
  class: "dm-textarea__counter"
264
- }, Oe = /* @__PURE__ */ f({
264
+ }, ea = /* @__PURE__ */ S({
265
265
  __name: "DatametriaTextarea",
266
266
  props: {
267
267
  modelValue: { default: "" },
@@ -275,56 +275,56 @@ const Z = ["disabled", "type", "aria-busy", "aria-disabled"], ee = {
275
275
  ariaLabel: {}
276
276
  },
277
277
  emits: ["update:modelValue"],
278
- setup(e, { emit: l }) {
279
- const s = e, o = l, r = `dm-textarea-${Math.random().toString(36).substr(2, 9)}`, d = k(s.modelValue);
280
- T(() => s.modelValue, (u) => {
281
- d.value = u;
278
+ setup(e, { emit: r }) {
279
+ const i = e, a = r, l = `dm-textarea-${Math.random().toString(36).substr(2, 9)}`, n = V(i.modelValue);
280
+ H(() => i.modelValue, (u) => {
281
+ n.value = u;
282
282
  });
283
- const n = () => {
284
- o("update:modelValue", d.value || "");
283
+ const d = () => {
284
+ a("update:modelValue", n.value || "");
285
285
  };
286
- return (u, b) => {
287
- var h;
288
- return a(), t("div", Te, [
289
- e.label ? (a(), t("label", {
286
+ return (u, m) => {
287
+ var b;
288
+ return t(), s("div", He, [
289
+ e.label ? (t(), s("label", {
290
290
  key: 0,
291
- for: r,
291
+ for: l,
292
292
  class: "dm-textarea__label"
293
293
  }, [
294
- w(m(e.label) + " ", 1),
295
- e.required ? (a(), t("span", xe, "*")) : c("", !0)
296
- ])) : c("", !0),
297
- N(i("textarea", {
298
- id: r,
299
- "onUpdate:modelValue": b[0] || (b[0] = (v) => d.value = v),
300
- class: y(["dm-textarea__input", { "dm-textarea__input--error": e.error }]),
294
+ N(g(e.label) + " ", 1),
295
+ e.required ? (t(), s("span", Ge, "*")) : h("", !0)
296
+ ])) : h("", !0),
297
+ ie(v("textarea", {
298
+ id: l,
299
+ "onUpdate:modelValue": m[0] || (m[0] = (k) => n.value = k),
300
+ class: L(["dm-textarea__input", { "dm-textarea__input--error": e.error }]),
301
301
  placeholder: e.placeholder,
302
302
  disabled: e.disabled,
303
303
  required: e.required,
304
304
  rows: e.rows,
305
305
  maxlength: e.maxLength,
306
306
  "aria-label": e.ariaLabel,
307
- "aria-describedby": e.error ? `${r}-error` : void 0,
307
+ "aria-describedby": e.error ? `${l}-error` : void 0,
308
308
  "aria-invalid": !!e.error,
309
- onInput: n
310
- }, null, 42, Se), [
311
- [R, d.value]
309
+ onInput: d
310
+ }, null, 42, Ye), [
311
+ [ne, n.value]
312
312
  ]),
313
- e.maxLength || e.error ? (a(), t("div", ze, [
314
- e.error ? (a(), t("p", {
313
+ e.maxLength || e.error ? (t(), s("div", Je, [
314
+ e.error ? (t(), s("p", {
315
315
  key: 0,
316
- id: `${r}-error`,
316
+ id: `${l}-error`,
317
317
  class: "dm-textarea__error"
318
- }, m(e.error), 9, Ee)) : c("", !0),
319
- e.maxLength ? (a(), t("span", Ae, m(((h = d.value) == null ? void 0 : h.length) || 0) + "/" + m(e.maxLength), 1)) : c("", !0)
320
- ])) : c("", !0)
318
+ }, g(e.error), 9, Qe)) : h("", !0),
319
+ e.maxLength ? (t(), s("span", Ze, g(((b = n.value) == null ? void 0 : b.length) || 0) + "/" + g(e.maxLength), 1)) : h("", !0)
320
+ ])) : h("", !0)
321
321
  ]);
322
322
  };
323
323
  }
324
- }), Ft = /* @__PURE__ */ _(Oe, [["__scopeId", "data-v-e9253798"]]), Ne = { class: "dm-datepicker" }, Re = {
324
+ }), Ql = /* @__PURE__ */ E(ea, [["__scopeId", "data-v-e9253798"]]), aa = { class: "dm-datepicker" }, ta = {
325
325
  key: 0,
326
326
  class: "dm-datepicker__required"
327
- }, Ue = { class: "dm-datepicker__wrapper" }, Fe = ["disabled", "required", "min", "max", "aria-label", "aria-describedby", "aria-invalid"], Pe = ["id"], Ke = /* @__PURE__ */ f({
327
+ }, la = { class: "dm-datepicker__wrapper" }, sa = ["disabled", "required", "min", "max", "aria-label", "aria-describedby", "aria-invalid"], ra = ["id"], ia = /* @__PURE__ */ S({
328
328
  __name: "DatametriaDatePicker",
329
329
  props: {
330
330
  modelValue: { default: "" },
@@ -337,64 +337,367 @@ const Z = ["disabled", "type", "aria-busy", "aria-disabled"], ee = {
337
337
  ariaLabel: {}
338
338
  },
339
339
  emits: ["update:modelValue"],
340
- setup(e, { emit: l }) {
341
- const s = e, o = l, r = `dm-datepicker-${Math.random().toString(36).substr(2, 9)}`, d = k(s.modelValue);
342
- T(() => s.modelValue, (u) => {
343
- d.value = u;
340
+ setup(e, { emit: r }) {
341
+ const i = e, a = r, l = `dm-datepicker-${Math.random().toString(36).substr(2, 9)}`, n = V(i.modelValue);
342
+ H(() => i.modelValue, (u) => {
343
+ n.value = u;
344
344
  });
345
- const n = () => {
346
- o("update:modelValue", d.value);
345
+ const d = () => {
346
+ a("update:modelValue", n.value);
347
347
  };
348
- return (u, b) => (a(), t("div", Ne, [
349
- e.label ? (a(), t("label", {
348
+ return (u, m) => (t(), s("div", aa, [
349
+ e.label ? (t(), s("label", {
350
350
  key: 0,
351
- for: r,
351
+ for: l,
352
352
  class: "dm-datepicker__label"
353
353
  }, [
354
- w(m(e.label) + " ", 1),
355
- e.required ? (a(), t("span", Re, "*")) : c("", !0)
356
- ])) : c("", !0),
357
- i("div", Ue, [
358
- N(i("input", {
359
- id: r,
354
+ N(g(e.label) + " ", 1),
355
+ e.required ? (t(), s("span", ta, "*")) : h("", !0)
356
+ ])) : h("", !0),
357
+ v("div", la, [
358
+ ie(v("input", {
359
+ id: l,
360
360
  type: "date",
361
- "onUpdate:modelValue": b[0] || (b[0] = (h) => d.value = h),
362
- class: y(["dm-datepicker__input", { "dm-datepicker__input--error": e.error }]),
361
+ "onUpdate:modelValue": m[0] || (m[0] = (b) => n.value = b),
362
+ class: L(["dm-datepicker__input", { "dm-datepicker__input--error": e.error }]),
363
363
  disabled: e.disabled,
364
364
  required: e.required,
365
365
  min: e.min,
366
366
  max: e.max,
367
367
  "aria-label": e.ariaLabel,
368
- "aria-describedby": e.error ? `${r}-error` : void 0,
368
+ "aria-describedby": e.error ? `${l}-error` : void 0,
369
369
  "aria-invalid": !!e.error,
370
- onChange: n
371
- }, null, 42, Fe), [
372
- [R, d.value]
370
+ onChange: d
371
+ }, null, 42, sa), [
372
+ [ne, n.value]
373
373
  ])
374
374
  ]),
375
- e.error ? (a(), t("p", {
375
+ e.error ? (t(), s("p", {
376
376
  key: 1,
377
- id: `${r}-error`,
377
+ id: `${l}-error`,
378
378
  class: "dm-datepicker__error"
379
- }, m(e.error), 9, Pe)) : c("", !0)
379
+ }, g(e.error), 9, ra)) : h("", !0)
380
380
  ]));
381
381
  }
382
- }), Pt = /* @__PURE__ */ _(Ke, [["__scopeId", "data-v-8bf1e9ec"]]), je = { class: "dm-file-upload" }, Ge = {
382
+ }), Zl = /* @__PURE__ */ E(ia, [["__scopeId", "data-v-8bf1e9ec"]]), na = ["for"], oa = {
383
+ key: 0,
384
+ class: "dm-time-picker__required",
385
+ "aria-label": "obrigatório"
386
+ }, da = { class: "dm-time-picker__wrapper" }, ca = ["id", "disabled", "required", "min", "max", "step", "aria-describedby", "aria-invalid"], ua = {
387
+ key: 0,
388
+ class: "dm-time-picker__icon"
389
+ }, ma = {
390
+ key: 0,
391
+ class: "dm-time-picker__icon--error",
392
+ viewBox: "0 0 20 20",
393
+ fill: "currentColor"
394
+ }, va = {
395
+ key: 1,
396
+ class: "dm-time-picker__icon--success",
397
+ viewBox: "0 0 20 20",
398
+ fill: "currentColor"
399
+ }, ha = {
400
+ key: 1,
401
+ class: "dm-time-picker__messages"
402
+ }, fa = ["id"], ba = ["id"], pa = ["id"], ga = /* @__PURE__ */ S({
403
+ __name: "DatametriaTimePicker",
404
+ props: {
405
+ modelValue: { default: "" },
406
+ label: {},
407
+ placeholder: {},
408
+ disabled: { type: Boolean },
409
+ required: { type: Boolean },
410
+ errorMessage: {},
411
+ successMessage: {},
412
+ helperText: {},
413
+ min: {},
414
+ max: {},
415
+ step: { default: 60 },
416
+ format24h: { type: Boolean, default: !0 }
417
+ },
418
+ emits: ["update:modelValue", "blur", "focus", "change"],
419
+ setup(e, { expose: r, emit: i }) {
420
+ const a = e, l = i, n = V(), d = T(() => `dm-time-picker-${Math.random().toString(36).substr(2, 9)}`), u = T(() => !!a.errorMessage), m = T(() => !!a.successMessage && !u.value), b = T(() => {
421
+ const p = [];
422
+ return a.errorMessage ? p.push(`${d.value}-error`) : a.successMessage ? p.push(`${d.value}-success`) : a.helperText && p.push(`${d.value}-helper`), p.length > 0 ? p.join(" ") : void 0;
423
+ }), k = T({
424
+ get: () => a.modelValue,
425
+ set: (p) => {
426
+ l("update:modelValue", p), l("change", p);
427
+ }
428
+ }), D = (p) => {
429
+ const w = p.target;
430
+ k.value = w.value;
431
+ }, B = (p) => {
432
+ l("blur", p);
433
+ }, $ = (p) => {
434
+ l("focus", p);
435
+ }, C = () => {
436
+ Y(() => {
437
+ var p;
438
+ (p = n.value) == null || p.focus();
439
+ });
440
+ }, f = () => {
441
+ var p;
442
+ (p = n.value) == null || p.blur();
443
+ };
444
+ return H(() => a.modelValue, (p) => {
445
+ n.value && n.value.value !== p && (n.value.value = p);
446
+ }), r({
447
+ focus: C,
448
+ blur: f,
449
+ inputRef: n
450
+ }), (p, w) => (t(), s("div", {
451
+ class: L(["dm-time-picker", { "dm-time-picker--disabled": e.disabled }])
452
+ }, [
453
+ e.label ? (t(), s("label", {
454
+ key: 0,
455
+ for: d.value,
456
+ class: "dm-time-picker__label"
457
+ }, [
458
+ N(g(e.label) + " ", 1),
459
+ e.required ? (t(), s("span", oa, "*")) : h("", !0)
460
+ ], 8, na)) : h("", !0),
461
+ v("div", da, [
462
+ ie(v("input", {
463
+ id: d.value,
464
+ ref_key: "inputRef",
465
+ ref: n,
466
+ "onUpdate:modelValue": w[0] || (w[0] = (z) => k.value = z),
467
+ type: "time",
468
+ class: L(["dm-time-picker__input", {
469
+ "dm-time-picker__input--error": u.value,
470
+ "dm-time-picker__input--success": m.value
471
+ }]),
472
+ disabled: e.disabled,
473
+ required: e.required,
474
+ min: e.min,
475
+ max: e.max,
476
+ step: e.step,
477
+ "aria-describedby": b.value,
478
+ "aria-invalid": u.value,
479
+ onInput: D,
480
+ onBlur: B,
481
+ onFocus: $
482
+ }, null, 42, ca), [
483
+ [ne, k.value]
484
+ ]),
485
+ u.value || m.value ? (t(), s("div", ua, [
486
+ u.value ? (t(), s("svg", ma, [...w[1] || (w[1] = [
487
+ v("path", {
488
+ "fill-rule": "evenodd",
489
+ d: "M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7 4a1 1 0 11-2 0 1 1 0 012 0zm-1-9a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z",
490
+ "clip-rule": "evenodd"
491
+ }, null, -1)
492
+ ])])) : m.value ? (t(), s("svg", va, [...w[2] || (w[2] = [
493
+ v("path", {
494
+ "fill-rule": "evenodd",
495
+ d: "M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",
496
+ "clip-rule": "evenodd"
497
+ }, null, -1)
498
+ ])])) : h("", !0)
499
+ ])) : h("", !0)
500
+ ]),
501
+ e.errorMessage || e.successMessage || e.helperText ? (t(), s("div", ha, [
502
+ e.errorMessage ? (t(), s("p", {
503
+ key: 0,
504
+ id: `${d.value}-error`,
505
+ class: "dm-time-picker__error",
506
+ role: "alert"
507
+ }, g(e.errorMessage), 9, fa)) : e.successMessage ? (t(), s("p", {
508
+ key: 1,
509
+ id: `${d.value}-success`,
510
+ class: "dm-time-picker__success"
511
+ }, g(e.successMessage), 9, ba)) : e.helperText ? (t(), s("p", {
512
+ key: 2,
513
+ id: `${d.value}-helper`,
514
+ class: "dm-time-picker__helper"
515
+ }, g(e.helperText), 9, pa)) : h("", !0)
516
+ ])) : h("", !0)
517
+ ], 2));
518
+ }
519
+ }), es = /* @__PURE__ */ E(ga, [["__scopeId", "data-v-89e8ad3a"]]), _a = {
520
+ key: 0,
521
+ class: "dm-slider__header"
522
+ }, ka = ["for"], ya = {
523
+ key: 0,
524
+ class: "dm-slider__required",
525
+ "aria-label": "obrigatório"
526
+ }, $a = {
527
+ key: 1,
528
+ class: "dm-slider__value"
529
+ }, wa = { class: "dm-slider__wrapper" }, xa = ["id", "value", "min", "max", "step", "disabled", "required", "aria-label", "aria-describedby", "aria-valuemin", "aria-valuemax", "aria-valuenow", "aria-valuetext"], Va = {
530
+ key: 1,
531
+ class: "dm-slider__range"
532
+ }, Ma = { class: "dm-slider__min" }, Da = { class: "dm-slider__max" }, Ca = {
533
+ key: 2,
534
+ class: "dm-slider__messages"
535
+ }, Ia = ["id"], Ba = ["id"], Ta = /* @__PURE__ */ S({
536
+ __name: "DatametriaSlider",
537
+ props: {
538
+ modelValue: {},
539
+ min: { default: 0 },
540
+ max: { default: 100 },
541
+ step: { default: 1 },
542
+ label: {},
543
+ disabled: { type: Boolean },
544
+ required: { type: Boolean },
545
+ showValue: { type: Boolean, default: !0 },
546
+ showMinMax: { type: Boolean, default: !1 },
547
+ errorMessage: {},
548
+ helperText: {},
549
+ ariaLabel: {},
550
+ formatter: {}
551
+ },
552
+ emits: ["update:modelValue", "change", "input", "focus", "blur"],
553
+ setup(e, { expose: r, emit: i }) {
554
+ const a = e, l = i, n = V(), d = V(!1), u = T(() => `dm-slider-${Math.random().toString(36).substr(2, 9)}`), m = T(() => {
555
+ const x = a.max - a.min;
556
+ return (a.modelValue - a.min) / x * 100;
557
+ }), b = T(() => a.formatter ? a.formatter(a.modelValue) : a.modelValue.toString()), k = T(() => {
558
+ const x = [];
559
+ return a.errorMessage ? x.push(`${u.value}-error`) : a.helperText && x.push(`${u.value}-helper`), x.length > 0 ? x.join(" ") : void 0;
560
+ }), D = T(() => a.formatter ? a.formatter(a.modelValue) : `${a.modelValue}`), B = (x) => a.formatter ? a.formatter(x) : x.toString(), $ = (x) => {
561
+ const q = x.target, M = parseFloat(q.value);
562
+ l("update:modelValue", M), l("input", M);
563
+ }, C = (x) => {
564
+ const q = x.target, M = parseFloat(q.value);
565
+ l("change", M);
566
+ }, f = (x) => {
567
+ l("focus", x);
568
+ }, p = (x) => {
569
+ l("blur", x);
570
+ }, w = (x) => {
571
+ if (a.disabled) return;
572
+ const M = x.currentTarget.getBoundingClientRect(), F = (x.clientX - M.left) / M.width, A = a.max - a.min, o = a.min + F * A, c = Math.round(o / a.step) * a.step, y = Math.max(a.min, Math.min(a.max, c));
573
+ l("update:modelValue", y), l("change", y);
574
+ }, z = (x) => {
575
+ if (a.disabled) return;
576
+ d.value = !0, x.preventDefault();
577
+ const q = (F) => {
578
+ if (!d.value) return;
579
+ const A = x.target.parentElement;
580
+ if (!A) return;
581
+ const o = A.getBoundingClientRect(), c = Math.max(0, Math.min(1, (F.clientX - o.left) / o.width)), y = a.max - a.min, _ = a.min + c * y, I = Math.round(_ / a.step) * a.step, Q = Math.max(a.min, Math.min(a.max, I));
582
+ l("update:modelValue", Q), l("input", Q);
583
+ }, M = () => {
584
+ d.value && (d.value = !1, l("change", a.modelValue)), document.removeEventListener("mousemove", q), document.removeEventListener("mouseup", M);
585
+ };
586
+ document.addEventListener("mousemove", q), document.addEventListener("mouseup", M);
587
+ }, O = (x) => {
588
+ if (a.disabled) return;
589
+ d.value = !0, x.preventDefault();
590
+ const q = (F) => {
591
+ if (!d.value) return;
592
+ const A = x.target.parentElement;
593
+ if (!A) return;
594
+ const o = A.getBoundingClientRect(), c = F.touches[0], y = Math.max(0, Math.min(1, (c.clientX - o.left) / o.width)), _ = a.max - a.min, I = a.min + y * _, Q = Math.round(I / a.step) * a.step, oe = Math.max(a.min, Math.min(a.max, Q));
595
+ l("update:modelValue", oe), l("input", oe);
596
+ }, M = () => {
597
+ d.value && (d.value = !1, l("change", a.modelValue)), document.removeEventListener("touchmove", q), document.removeEventListener("touchend", M);
598
+ };
599
+ document.addEventListener("touchmove", q), document.addEventListener("touchend", M);
600
+ };
601
+ return r({
602
+ focus: () => {
603
+ Y(() => {
604
+ var x;
605
+ (x = n.value) == null || x.focus();
606
+ });
607
+ },
608
+ blur: () => {
609
+ var x;
610
+ (x = n.value) == null || x.blur();
611
+ },
612
+ inputRef: n
613
+ }), (x, q) => (t(), s("div", {
614
+ class: L(["dm-slider", { "dm-slider--disabled": e.disabled }])
615
+ }, [
616
+ e.label || e.showValue ? (t(), s("div", _a, [
617
+ e.label ? (t(), s("label", {
618
+ key: 0,
619
+ for: u.value,
620
+ class: "dm-slider__label"
621
+ }, [
622
+ N(g(e.label) + " ", 1),
623
+ e.required ? (t(), s("span", ya, "*")) : h("", !0)
624
+ ], 8, ka)) : h("", !0),
625
+ e.showValue ? (t(), s("span", $a, g(b.value), 1)) : h("", !0)
626
+ ])) : h("", !0),
627
+ v("div", wa, [
628
+ v("div", {
629
+ class: "dm-slider__track",
630
+ onClick: w
631
+ }, [
632
+ v("div", {
633
+ class: "dm-slider__progress",
634
+ style: j({ width: `${m.value}%` })
635
+ }, null, 4),
636
+ v("div", {
637
+ class: "dm-slider__thumb",
638
+ style: j({ left: `${m.value}%` }),
639
+ onMousedown: z,
640
+ onTouchstart: O
641
+ }, null, 36)
642
+ ]),
643
+ v("input", {
644
+ id: u.value,
645
+ ref_key: "inputRef",
646
+ ref: n,
647
+ type: "range",
648
+ class: "dm-slider__input",
649
+ value: e.modelValue,
650
+ min: e.min,
651
+ max: e.max,
652
+ step: e.step,
653
+ disabled: e.disabled,
654
+ required: e.required,
655
+ "aria-label": e.ariaLabel,
656
+ "aria-describedby": k.value,
657
+ "aria-valuemin": e.min,
658
+ "aria-valuemax": e.max,
659
+ "aria-valuenow": e.modelValue,
660
+ "aria-valuetext": D.value,
661
+ onInput: $,
662
+ onChange: C,
663
+ onFocus: f,
664
+ onBlur: p
665
+ }, null, 40, xa)
666
+ ]),
667
+ e.showMinMax ? (t(), s("div", Va, [
668
+ v("span", Ma, g(B(e.min)), 1),
669
+ v("span", Da, g(B(e.max)), 1)
670
+ ])) : h("", !0),
671
+ e.errorMessage || e.helperText ? (t(), s("div", Ca, [
672
+ e.errorMessage ? (t(), s("p", {
673
+ key: 0,
674
+ id: `${u.value}-error`,
675
+ class: "dm-slider__error",
676
+ role: "alert"
677
+ }, g(e.errorMessage), 9, Ia)) : e.helperText ? (t(), s("p", {
678
+ key: 1,
679
+ id: `${u.value}-helper`,
680
+ class: "dm-slider__helper"
681
+ }, g(e.helperText), 9, Ba)) : h("", !0)
682
+ ])) : h("", !0)
683
+ ], 2));
684
+ }
685
+ }), as = /* @__PURE__ */ E(Ta, [["__scopeId", "data-v-8a957612"]]), La = { class: "dm-file-upload" }, Sa = {
383
686
  key: 0,
384
687
  class: "dm-file-upload__label"
385
- }, He = {
688
+ }, Ea = {
386
689
  key: 0,
387
690
  class: "dm-file-upload__required"
388
- }, Je = ["accept", "multiple", "disabled", "required"], We = { class: "dm-file-upload__content" }, Ye = {
691
+ }, qa = ["accept", "multiple", "disabled", "required"], Ra = { class: "dm-file-upload__content" }, za = {
389
692
  key: 0,
390
693
  class: "dm-file-upload__hint"
391
- }, Qe = {
694
+ }, Fa = {
392
695
  key: 1,
393
696
  class: "dm-file-upload__files"
394
- }, Xe = { class: "dm-file-upload__filename" }, Ze = { class: "dm-file-upload__filesize" }, ea = ["onClick"], aa = {
697
+ }, Aa = { class: "dm-file-upload__filename" }, Oa = { class: "dm-file-upload__filesize" }, Na = ["onClick"], Pa = {
395
698
  key: 2,
396
699
  class: "dm-file-upload__error"
397
- }, ta = /* @__PURE__ */ f({
700
+ }, Ua = /* @__PURE__ */ S({
398
701
  __name: "DatametriaFileUpload",
399
702
  props: {
400
703
  modelValue: { default: () => [] },
@@ -406,104 +709,104 @@ const Z = ["disabled", "type", "aria-busy", "aria-disabled"], ee = {
406
709
  error: {}
407
710
  },
408
711
  emits: ["update:modelValue"],
409
- setup(e, { emit: l }) {
410
- const s = e, o = l, r = k(), d = k(s.modelValue), n = k(!1), u = () => {
411
- var g;
412
- s.disabled || (g = r.value) == null || g.click();
413
- }, b = (g) => {
414
- const V = Array.from(g.target.files || []);
415
- I(V);
416
- }, h = () => {
417
- s.disabled || (n.value = !0);
418
- }, v = () => {
419
- n.value = !1;
420
- }, D = (g) => {
421
- var V;
422
- if (n.value = !1, !s.disabled) {
423
- const $ = Array.from(((V = g.dataTransfer) == null ? void 0 : V.files) || []);
424
- I($);
712
+ setup(e, { emit: r }) {
713
+ const i = e, a = r, l = V(), n = V(i.modelValue), d = V(!1), u = () => {
714
+ var f;
715
+ i.disabled || (f = l.value) == null || f.click();
716
+ }, m = (f) => {
717
+ const p = Array.from(f.target.files || []);
718
+ B(p);
719
+ }, b = () => {
720
+ i.disabled || (d.value = !0);
721
+ }, k = () => {
722
+ d.value = !1;
723
+ }, D = (f) => {
724
+ var p;
725
+ if (d.value = !1, !i.disabled) {
726
+ const w = Array.from(((p = f.dataTransfer) == null ? void 0 : p.files) || []);
727
+ B(w);
425
728
  }
426
- }, I = (g) => {
427
- d.value = s.multiple ? [...d.value, ...g] : g, o("update:modelValue", d.value);
428
- }, x = (g) => {
429
- d.value.splice(g, 1), o("update:modelValue", d.value);
430
- }, O = (g) => {
431
- if (g === 0) return "0 B";
432
- const V = 1024, $ = ["B", "KB", "MB", "GB"], M = Math.floor(Math.log(g) / Math.log(V));
433
- return `${(g / Math.pow(V, M)).toFixed(1)} ${$[M]}`;
729
+ }, B = (f) => {
730
+ n.value = i.multiple ? [...n.value, ...f] : f, a("update:modelValue", n.value);
731
+ }, $ = (f) => {
732
+ n.value.splice(f, 1), a("update:modelValue", n.value);
733
+ }, C = (f) => {
734
+ if (f === 0) return "0 B";
735
+ const p = 1024, w = ["B", "KB", "MB", "GB"], z = Math.floor(Math.log(f) / Math.log(p));
736
+ return `${(f / Math.pow(p, z)).toFixed(1)} ${w[z]}`;
434
737
  };
435
- return (g, V) => (a(), t("div", je, [
436
- e.label ? (a(), t("label", Ge, [
437
- w(m(e.label) + " ", 1),
438
- e.required ? (a(), t("span", He, "*")) : c("", !0)
439
- ])) : c("", !0),
440
- i("div", {
441
- class: y(["dm-file-upload__dropzone", { "dm-file-upload--dragging": n.value, "dm-file-upload__dropzone--dragover": n.value, "dm-file-upload__dropzone--error": e.error }]),
442
- onDragover: S(h, ["prevent"]),
443
- onDragleave: S(v, ["prevent"]),
444
- onDrop: S(D, ["prevent"]),
738
+ return (f, p) => (t(), s("div", La, [
739
+ e.label ? (t(), s("label", Sa, [
740
+ N(g(e.label) + " ", 1),
741
+ e.required ? (t(), s("span", Ea, "*")) : h("", !0)
742
+ ])) : h("", !0),
743
+ v("div", {
744
+ class: L(["dm-file-upload__dropzone", { "dm-file-upload--dragging": d.value, "dm-file-upload__dropzone--dragover": d.value, "dm-file-upload__dropzone--error": e.error }]),
745
+ onDragover: Z(b, ["prevent"]),
746
+ onDragleave: Z(k, ["prevent"]),
747
+ onDrop: Z(D, ["prevent"]),
445
748
  onClick: u
446
749
  }, [
447
- i("input", {
750
+ v("input", {
448
751
  ref_key: "fileInput",
449
- ref: r,
752
+ ref: l,
450
753
  type: "file",
451
754
  class: "dm-file-upload__input",
452
755
  accept: e.accept,
453
756
  multiple: e.multiple,
454
757
  disabled: e.disabled,
455
758
  required: e.required,
456
- onChange: b
457
- }, null, 40, Je),
458
- i("div", We, [
459
- V[0] || (V[0] = i("svg", {
759
+ onChange: m
760
+ }, null, 40, qa),
761
+ v("div", Ra, [
762
+ p[0] || (p[0] = v("svg", {
460
763
  class: "dm-file-upload__icon",
461
764
  viewBox: "0 0 24 24",
462
765
  fill: "none",
463
766
  stroke: "currentColor"
464
767
  }, [
465
- i("path", {
768
+ v("path", {
466
769
  d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4M17 8l-5-5-5 5M12 3v12",
467
770
  "stroke-width": "2",
468
771
  "stroke-linecap": "round",
469
772
  "stroke-linejoin": "round"
470
773
  })
471
774
  ], -1)),
472
- V[1] || (V[1] = i("p", { class: "dm-file-upload__text" }, [
473
- i("span", { class: "dm-file-upload__text--primary" }, "Clique para selecionar"),
474
- w(" ou arraste arquivos aqui ")
775
+ p[1] || (p[1] = v("p", { class: "dm-file-upload__text" }, [
776
+ v("span", { class: "dm-file-upload__text--primary" }, "Clique para selecionar"),
777
+ N(" ou arraste arquivos aqui ")
475
778
  ], -1)),
476
- e.accept ? (a(), t("p", Ye, m(e.accept), 1)) : c("", !0)
779
+ e.accept ? (t(), s("p", za, g(e.accept), 1)) : h("", !0)
477
780
  ])
478
781
  ], 34),
479
- d.value.length ? (a(), t("div", Qe, [
480
- (a(!0), t(B, null, L(d.value, ($, M) => (a(), t("div", {
481
- key: M,
782
+ n.value.length ? (t(), s("div", Fa, [
783
+ (t(!0), s(W, null, X(n.value, (w, z) => (t(), s("div", {
784
+ key: z,
482
785
  class: "dm-file-upload__file"
483
786
  }, [
484
- i("span", Xe, m($.name), 1),
485
- i("span", Ze, m(O($.size)), 1),
486
- i("button", {
787
+ v("span", Aa, g(w.name), 1),
788
+ v("span", Oa, g(C(w.size)), 1),
789
+ v("button", {
487
790
  type: "button",
488
791
  class: "dm-file-upload__remove",
489
- onClick: (z) => x(M),
792
+ onClick: (O) => $(z),
490
793
  "aria-label": "Remover arquivo"
491
- }, "×", 8, ea)
794
+ }, "×", 8, Na)
492
795
  ]))), 128))
493
- ])) : c("", !0),
494
- e.error ? (a(), t("p", aa, m(e.error), 1)) : c("", !0)
796
+ ])) : h("", !0),
797
+ e.error ? (t(), s("p", Pa, g(e.error), 1)) : h("", !0)
495
798
  ]));
496
799
  }
497
- }), Kt = /* @__PURE__ */ _(ta, [["__scopeId", "data-v-da137679"]]), la = {
800
+ }), ts = /* @__PURE__ */ E(Ua, [["__scopeId", "data-v-da137679"]]), Wa = {
498
801
  key: 0,
499
802
  class: "dm-autocomplete__required"
500
- }, sa = { class: "dm-autocomplete__wrapper" }, ra = ["placeholder", "disabled", "required", "aria-label", "aria-expanded", "aria-controls", "aria-activedescendant"], da = ["id"], oa = ["id", "aria-selected", "onClick", "onMouseenter"], ia = {
803
+ }, Ka = { class: "dm-autocomplete__wrapper" }, Xa = ["placeholder", "disabled", "required", "aria-label", "aria-expanded", "aria-controls", "aria-activedescendant"], ja = ["id"], Ha = ["id", "aria-selected", "onClick", "onMouseenter"], Ga = {
501
804
  key: 1,
502
805
  class: "dm-autocomplete__no-results"
503
- }, na = {
806
+ }, Ya = {
504
807
  key: 1,
505
808
  class: "dm-autocomplete__error"
506
- }, ca = /* @__PURE__ */ f({
809
+ }, Ja = /* @__PURE__ */ S({
507
810
  __name: "DatametriaAutocomplete",
508
811
  props: {
509
812
  modelValue: { default: "" },
@@ -516,148 +819,148 @@ const Z = ["disabled", "type", "aria-busy", "aria-disabled"], ee = {
516
819
  ariaLabel: {}
517
820
  },
518
821
  emits: ["update:modelValue"],
519
- setup(e, { emit: l }) {
520
- const s = e, o = l, r = `dm-autocomplete-${Math.random().toString(36).substr(2, 9)}`, d = k(), n = k(s.modelValue), u = k(!1), b = k(-1), h = C(() => n.value ? s.options.filter(
521
- ($) => $.toLowerCase().includes(n.value.toLowerCase())
522
- ) : s.options), v = C(
523
- () => b.value >= 0 ? `${r}-option-${b.value}` : void 0
822
+ setup(e, { emit: r }) {
823
+ const i = e, a = r, l = `dm-autocomplete-${Math.random().toString(36).substr(2, 9)}`, n = V(), d = V(i.modelValue), u = V(!1), m = V(-1), b = T(() => d.value ? i.options.filter(
824
+ (w) => w.toLowerCase().includes(d.value.toLowerCase())
825
+ ) : i.options), k = T(
826
+ () => m.value >= 0 ? `${l}-option-${m.value}` : void 0
524
827
  );
525
- T(() => s.modelValue, ($) => {
526
- n.value = $;
828
+ H(() => i.modelValue, (w) => {
829
+ d.value = w;
527
830
  });
528
831
  const D = () => {
529
- u.value = !0, b.value = -1, o("update:modelValue", n.value);
530
- }, I = () => {
531
- s.disabled || (u.value = !0);
532
- }, x = () => {
832
+ u.value = !0, m.value = -1, a("update:modelValue", d.value);
833
+ }, B = () => {
834
+ i.disabled || (u.value = !0);
835
+ }, $ = () => {
533
836
  setTimeout(() => {
534
837
  u.value = !1;
535
838
  }, 200);
536
- }, O = ($) => {
537
- n.value = $, o("update:modelValue", $), u.value = !1, b.value = -1;
538
- }, g = ($) => {
539
- if (!u.value && $.key !== "Escape") {
839
+ }, C = (w) => {
840
+ d.value = w, a("update:modelValue", w), u.value = !1, m.value = -1;
841
+ }, f = (w) => {
842
+ if (!u.value && w.key !== "Escape") {
540
843
  u.value = !0;
541
844
  return;
542
845
  }
543
- switch ($.key) {
846
+ switch (w.key) {
544
847
  case "ArrowDown":
545
- $.preventDefault(), b.value = Math.min(b.value + 1, h.value.length - 1);
848
+ w.preventDefault(), m.value = Math.min(m.value + 1, b.value.length - 1);
546
849
  break;
547
850
  case "ArrowUp":
548
- $.preventDefault(), b.value = Math.max(b.value - 1, 0);
851
+ w.preventDefault(), m.value = Math.max(m.value - 1, 0);
549
852
  break;
550
853
  case "Enter":
551
- $.preventDefault(), b.value >= 0 && O(h.value[b.value]);
854
+ w.preventDefault(), m.value >= 0 && C(b.value[m.value]);
552
855
  break;
553
856
  case "Escape":
554
- u.value = !1, b.value = -1;
857
+ u.value = !1, m.value = -1;
555
858
  break;
556
859
  }
557
- }, V = ($) => {
558
- d.value && !d.value.contains($.target) && (u.value = !1);
860
+ }, p = (w) => {
861
+ n.value && !n.value.contains(w.target) && (u.value = !1);
559
862
  };
560
- return P(() => {
561
- document.addEventListener("click", V);
562
- }), X(() => {
563
- document.removeEventListener("click", V);
564
- }), ($, M) => (a(), t("div", {
863
+ return J(() => {
864
+ document.addEventListener("click", p);
865
+ }), re(() => {
866
+ document.removeEventListener("click", p);
867
+ }), (w, z) => (t(), s("div", {
565
868
  class: "dm-autocomplete",
566
869
  ref_key: "autocompleteRef",
567
- ref: d
870
+ ref: n
568
871
  }, [
569
- e.label ? (a(), t("label", {
872
+ e.label ? (t(), s("label", {
570
873
  key: 0,
571
- for: r,
874
+ for: l,
572
875
  class: "dm-autocomplete__label"
573
876
  }, [
574
- w(m(e.label) + " ", 1),
575
- e.required ? (a(), t("span", la, "*")) : c("", !0)
576
- ])) : c("", !0),
577
- i("div", sa, [
578
- N(i("input", {
579
- id: r,
580
- "onUpdate:modelValue": M[0] || (M[0] = (z) => n.value = z),
877
+ N(g(e.label) + " ", 1),
878
+ e.required ? (t(), s("span", Wa, "*")) : h("", !0)
879
+ ])) : h("", !0),
880
+ v("div", Ka, [
881
+ ie(v("input", {
882
+ id: l,
883
+ "onUpdate:modelValue": z[0] || (z[0] = (O) => d.value = O),
581
884
  type: "text",
582
- class: y(["dm-autocomplete__input", { "dm-autocomplete__input--error": e.error }]),
885
+ class: L(["dm-autocomplete__input", { "dm-autocomplete__input--error": e.error }]),
583
886
  placeholder: e.placeholder,
584
887
  disabled: e.disabled,
585
888
  required: e.required,
586
889
  "aria-label": e.ariaLabel,
587
890
  "aria-expanded": u.value,
588
- "aria-controls": `${r}-listbox`,
589
- "aria-activedescendant": v.value,
891
+ "aria-controls": `${l}-listbox`,
892
+ "aria-activedescendant": k.value,
590
893
  role: "combobox",
591
894
  autocomplete: "off",
592
895
  onInput: D,
593
- onFocus: I,
594
- onBlur: x,
595
- onKeydown: g
596
- }, null, 42, ra), [
597
- [R, n.value]
896
+ onFocus: B,
897
+ onBlur: $,
898
+ onKeydown: f
899
+ }, null, 42, Xa), [
900
+ [ne, d.value]
598
901
  ]),
599
- u.value && h.value.length ? (a(), t("ul", {
902
+ u.value && b.value.length ? (t(), s("ul", {
600
903
  key: 0,
601
- id: `${r}-listbox`,
904
+ id: `${l}-listbox`,
602
905
  class: "dm-autocomplete__dropdown",
603
906
  role: "listbox"
604
907
  }, [
605
- (a(!0), t(B, null, L(h.value, (z, E) => (a(), t("li", {
606
- key: E,
607
- id: `${r}-option-${E}`,
608
- class: y(["dm-autocomplete__option", { "dm-autocomplete__option--active": E === b.value }]),
908
+ (t(!0), s(W, null, X(b.value, (O, U) => (t(), s("li", {
909
+ key: U,
910
+ id: `${l}-option-${U}`,
911
+ class: L(["dm-autocomplete__option", { "dm-autocomplete__option--active": U === m.value }]),
609
912
  role: "option",
610
- "aria-selected": E === b.value,
611
- onClick: (Q) => O(z),
612
- onMouseenter: (Q) => b.value = E
613
- }, m(z), 43, oa))), 128))
614
- ], 8, da)) : u.value && !h.value.length ? (a(), t("div", ia, " No results ")) : c("", !0)
913
+ "aria-selected": U === m.value,
914
+ onClick: (K) => C(O),
915
+ onMouseenter: (K) => m.value = U
916
+ }, g(O), 43, Ha))), 128))
917
+ ], 8, ja)) : u.value && !b.value.length ? (t(), s("div", Ga, " No results ")) : h("", !0)
615
918
  ]),
616
- e.error ? (a(), t("p", na, m(e.error), 1)) : c("", !0)
919
+ e.error ? (t(), s("p", Ya, g(e.error), 1)) : h("", !0)
617
920
  ], 512));
618
921
  }
619
- }), jt = /* @__PURE__ */ _(ca, [["__scopeId", "data-v-782dacde"]]), ua = {
922
+ }), ls = /* @__PURE__ */ E(Ja, [["__scopeId", "data-v-782dacde"]]), Qa = {
620
923
  key: 0,
621
924
  class: "datametria-card__header"
622
- }, ma = { class: "datametria-card__title" }, ba = { class: "datametria-card__content" }, va = {
925
+ }, Za = { class: "datametria-card__title" }, et = { class: "datametria-card__content" }, at = {
623
926
  key: 1,
624
927
  class: "datametria-card__footer"
625
- }, ha = /* @__PURE__ */ f({
928
+ }, tt = /* @__PURE__ */ S({
626
929
  __name: "DatametriaCard",
627
930
  props: {
628
931
  title: {},
629
932
  padding: { type: Boolean, default: !0 }
630
933
  },
631
934
  setup(e) {
632
- const l = e, s = C(() => [
935
+ const r = e, i = T(() => [
633
936
  "datametria-card",
634
937
  {
635
- "datametria-card--no-padding": !l.padding
938
+ "datametria-card--no-padding": !r.padding
636
939
  }
637
940
  ]);
638
- return (o, r) => (a(), t("div", {
639
- class: y(s.value)
941
+ return (a, l) => (t(), s("div", {
942
+ class: L(i.value)
640
943
  }, [
641
- e.title || o.$slots.header ? (a(), t("div", ua, [
642
- p(o.$slots, "header", {}, () => [
643
- i("h3", ma, m(e.title), 1)
944
+ e.title || a.$slots.header ? (t(), s("div", Qa, [
945
+ R(a.$slots, "header", {}, () => [
946
+ v("h3", Za, g(e.title), 1)
644
947
  ], !0)
645
- ])) : c("", !0),
646
- i("div", ba, [
647
- p(o.$slots, "default", {}, void 0, !0)
948
+ ])) : h("", !0),
949
+ v("div", et, [
950
+ R(a.$slots, "default", {}, void 0, !0)
648
951
  ]),
649
- o.$slots.footer ? (a(), t("div", va, [
650
- p(o.$slots, "footer", {}, void 0, !0)
651
- ])) : c("", !0)
952
+ a.$slots.footer ? (t(), s("div", at, [
953
+ R(a.$slots, "footer", {}, void 0, !0)
954
+ ])) : h("", !0)
652
955
  ], 2));
653
956
  }
654
- }), Gt = /* @__PURE__ */ _(ha, [["__scopeId", "data-v-539a1b0c"]]), fa = {
957
+ }), ss = /* @__PURE__ */ E(tt, [["__scopeId", "data-v-539a1b0c"]]), lt = {
655
958
  key: 0,
656
959
  class: "datametria-modal__header"
657
- }, _a = { class: "datametria-modal__title" }, $a = { class: "datametria-modal__body" }, ya = {
960
+ }, st = { class: "datametria-modal__title" }, rt = { class: "datametria-modal__body" }, it = {
658
961
  key: 1,
659
962
  class: "datametria-modal__footer"
660
- }, ka = /* @__PURE__ */ f({
963
+ }, nt = /* @__PURE__ */ S({
661
964
  __name: "DatametriaModal",
662
965
  props: {
663
966
  modelValue: { type: Boolean },
@@ -666,79 +969,79 @@ const Z = ["disabled", "type", "aria-busy", "aria-disabled"], ee = {
666
969
  closable: { type: Boolean, default: !0 }
667
970
  },
668
971
  emits: ["update:modelValue", "close"],
669
- setup(e, { emit: l }) {
670
- const s = e, o = l, r = () => {
671
- s.closable && (o("update:modelValue", !1), o("close"));
972
+ setup(e, { emit: r }) {
973
+ const i = e, a = r, l = () => {
974
+ i.closable && (a("update:modelValue", !1), a("close"));
672
975
  };
673
- return (d, n) => (a(), K(j, { to: "body" }, [
674
- G(H, { name: "modal" }, {
675
- default: J(() => [
676
- e.modelValue ? (a(), t("div", {
976
+ return (n, d) => (t(), ee(ae, { to: "body" }, [
977
+ te(le, { name: "modal" }, {
978
+ default: se(() => [
979
+ e.modelValue ? (t(), s("div", {
677
980
  key: 0,
678
981
  class: "datametria-modal",
679
- onClick: S(r, ["self"])
982
+ onClick: Z(l, ["self"])
680
983
  }, [
681
- i("div", {
984
+ v("div", {
682
985
  class: "datametria-modal__content",
683
- style: A({ maxWidth: e.size })
986
+ style: j({ maxWidth: e.size })
684
987
  }, [
685
- e.title || d.$slots.header ? (a(), t("div", fa, [
686
- p(d.$slots, "header", {}, () => [
687
- i("h3", _a, m(e.title), 1)
988
+ e.title || n.$slots.header ? (t(), s("div", lt, [
989
+ R(n.$slots, "header", {}, () => [
990
+ v("h3", st, g(e.title), 1)
688
991
  ], !0),
689
- e.closable ? (a(), t("button", {
992
+ e.closable ? (t(), s("button", {
690
993
  key: 0,
691
994
  class: "datametria-modal__close",
692
- onClick: r
693
- }, " × ")) : c("", !0)
694
- ])) : c("", !0),
695
- i("div", $a, [
696
- p(d.$slots, "default", {}, void 0, !0)
995
+ onClick: l
996
+ }, " × ")) : h("", !0)
997
+ ])) : h("", !0),
998
+ v("div", rt, [
999
+ R(n.$slots, "default", {}, void 0, !0)
697
1000
  ]),
698
- d.$slots.footer ? (a(), t("div", ya, [
699
- p(d.$slots, "footer", {}, void 0, !0)
700
- ])) : c("", !0)
1001
+ n.$slots.footer ? (t(), s("div", it, [
1002
+ R(n.$slots, "footer", {}, void 0, !0)
1003
+ ])) : h("", !0)
701
1004
  ], 4)
702
- ])) : c("", !0)
1005
+ ])) : h("", !0)
703
1006
  ]),
704
1007
  _: 3
705
1008
  })
706
1009
  ]));
707
1010
  }
708
- }), Ht = /* @__PURE__ */ _(ka, [["__scopeId", "data-v-8aa80965"]]), pa = /* @__PURE__ */ f({
1011
+ }), rs = /* @__PURE__ */ E(nt, [["__scopeId", "data-v-8aa80965"]]), ot = /* @__PURE__ */ S({
709
1012
  __name: "DatametriaContainer",
710
1013
  props: {
711
1014
  size: { default: "lg" },
712
1015
  fluid: { type: Boolean, default: !1 }
713
1016
  },
714
1017
  setup(e) {
715
- return (l, s) => (a(), t("div", {
716
- class: y(["dm-container", [`dm-container--${e.size}`, { "dm-container--fluid": e.fluid }]])
1018
+ return (r, i) => (t(), s("div", {
1019
+ class: L(["dm-container", [`dm-container--${e.size}`, { "dm-container--fluid": e.fluid }]])
717
1020
  }, [
718
- p(l.$slots, "default", {}, void 0, !0)
1021
+ R(r.$slots, "default", {}, void 0, !0)
719
1022
  ], 2));
720
1023
  }
721
- }), Jt = /* @__PURE__ */ _(pa, [["__scopeId", "data-v-4cc8678e"]]), ga = /* @__PURE__ */ f({
1024
+ }), is = /* @__PURE__ */ E(ot, [["__scopeId", "data-v-4cc8678e"]]), dt = /* @__PURE__ */ S({
722
1025
  __name: "DatametriaGrid",
723
1026
  props: {
724
1027
  cols: { default: 12 },
725
1028
  gap: { default: "var(--dm-space-4)" }
726
1029
  },
727
1030
  setup(e) {
728
- return (l, s) => (a(), t("div", {
1031
+ return (r, i) => (t(), s("div", {
729
1032
  class: "dm-grid",
730
- style: A({
1033
+ style: j({
731
1034
  "--dm-grid-cols": e.cols,
732
1035
  "--dm-grid-gap": e.gap
733
1036
  })
734
1037
  }, [
735
- p(l.$slots, "default", {}, void 0, !0)
1038
+ R(r.$slots, "default", {}, void 0, !0)
736
1039
  ], 4));
737
1040
  }
738
- }), Wt = /* @__PURE__ */ _(ga, [["__scopeId", "data-v-9e2c1279"]]), Da = ["role", "aria-orientation"], Va = {
1041
+ }), ns = /* @__PURE__ */ E(dt, [["__scopeId", "data-v-9e2c1279"]]), ct = ["role", "aria-orientation"], ut = {
739
1042
  key: 0,
740
1043
  class: "dm-divider__label"
741
- }, wa = /* @__PURE__ */ f({
1044
+ }, mt = /* @__PURE__ */ S({
742
1045
  __name: "DatametriaDivider",
743
1046
  props: {
744
1047
  orientation: { default: "horizontal" },
@@ -746,22 +1049,22 @@ const Z = ["disabled", "type", "aria-busy", "aria-disabled"], ee = {
746
1049
  label: {}
747
1050
  },
748
1051
  setup(e) {
749
- return (l, s) => (a(), t("div", {
750
- class: y(["dm-divider", [`dm-divider--${e.orientation}`, { "dm-divider--dashed": e.dashed }]]),
1052
+ return (r, i) => (t(), s("div", {
1053
+ class: L(["dm-divider", [`dm-divider--${e.orientation}`, { "dm-divider--dashed": e.dashed }]]),
751
1054
  role: e.orientation === "horizontal" ? "separator" : void 0,
752
1055
  "aria-orientation": e.orientation
753
1056
  }, [
754
- l.$slots.default || e.label ? (a(), t("span", Va, [
755
- p(l.$slots, "default", {}, () => [
756
- w(m(e.label), 1)
1057
+ r.$slots.default || e.label ? (t(), s("span", ut, [
1058
+ R(r.$slots, "default", {}, () => [
1059
+ N(g(e.label), 1)
757
1060
  ], !0)
758
- ])) : c("", !0)
759
- ], 10, Da));
1061
+ ])) : h("", !0)
1062
+ ], 10, ct));
760
1063
  }
761
- }), Yt = /* @__PURE__ */ _(wa, [["__scopeId", "data-v-b0655e4c"]]), Ca = { class: "datametria-alert__icon" }, Ia = { key: 0 }, Ba = { key: 1 }, La = { key: 2 }, Ma = { key: 3 }, qa = { class: "datametria-alert__content" }, Ta = {
1064
+ }), os = /* @__PURE__ */ E(mt, [["__scopeId", "data-v-b0655e4c"]]), vt = { class: "datametria-alert__icon" }, ht = { key: 0 }, ft = { key: 1 }, bt = { key: 2 }, pt = { key: 3 }, gt = { class: "datametria-alert__content" }, _t = {
762
1065
  key: 0,
763
1066
  class: "datametria-alert__title"
764
- }, xa = { class: "datametria-alert__message" }, Sa = /* @__PURE__ */ f({
1067
+ }, kt = { class: "datametria-alert__message" }, yt = /* @__PURE__ */ S({
765
1068
  __name: "DatametriaAlert",
766
1069
  props: {
767
1070
  modelValue: { type: Boolean, default: !0 },
@@ -772,33 +1075,33 @@ const Z = ["disabled", "type", "aria-busy", "aria-disabled"], ee = {
772
1075
  },
773
1076
  emits: ["update:modelValue"],
774
1077
  setup(e) {
775
- const l = e, s = C(() => [
1078
+ const r = e, i = T(() => [
776
1079
  "datametria-alert",
777
- `datametria-alert--${l.variant}`
1080
+ `datametria-alert--${r.variant}`
778
1081
  ]);
779
- return (o, r) => e.modelValue ? (a(), t("div", {
1082
+ return (a, l) => e.modelValue ? (t(), s("div", {
780
1083
  key: 0,
781
- class: y(s.value)
1084
+ class: L(i.value)
782
1085
  }, [
783
- i("div", Ca, [
784
- e.variant === "success" ? (a(), t("span", Ia, "✓")) : e.variant === "error" ? (a(), t("span", Ba, "✕")) : e.variant === "warning" ? (a(), t("span", La, "⚠")) : (a(), t("span", Ma, "ℹ"))
1086
+ v("div", vt, [
1087
+ e.variant === "success" ? (t(), s("span", ht, "✓")) : e.variant === "error" ? (t(), s("span", ft, "✕")) : e.variant === "warning" ? (t(), s("span", bt, "⚠")) : (t(), s("span", pt, "ℹ"))
785
1088
  ]),
786
- i("div", qa, [
787
- e.title ? (a(), t("h4", Ta, m(e.title), 1)) : c("", !0),
788
- i("p", xa, [
789
- p(o.$slots, "default", {}, () => [
790
- w(m(e.message), 1)
1089
+ v("div", gt, [
1090
+ e.title ? (t(), s("h4", _t, g(e.title), 1)) : h("", !0),
1091
+ v("p", kt, [
1092
+ R(a.$slots, "default", {}, () => [
1093
+ N(g(e.message), 1)
791
1094
  ], !0)
792
1095
  ])
793
1096
  ]),
794
- e.closable ? (a(), t("button", {
1097
+ e.closable ? (t(), s("button", {
795
1098
  key: 0,
796
1099
  class: "datametria-alert__close",
797
- onClick: r[0] || (r[0] = (d) => o.$emit("update:modelValue", !1))
798
- }, " × ")) : c("", !0)
799
- ], 2)) : c("", !0);
1100
+ onClick: l[0] || (l[0] = (n) => a.$emit("update:modelValue", !1))
1101
+ }, " × ")) : h("", !0)
1102
+ ], 2)) : h("", !0);
800
1103
  }
801
- }), Qt = /* @__PURE__ */ _(Sa, [["__scopeId", "data-v-a27dad03"]]), za = ["aria-live"], Ea = { class: "dm-toast__content" }, Aa = { class: "dm-toast__message" }, Oa = /* @__PURE__ */ f({
1104
+ }), ds = /* @__PURE__ */ E(yt, [["__scopeId", "data-v-a27dad03"]]), $t = ["aria-live"], wt = { class: "dm-toast__content" }, xt = { class: "dm-toast__message" }, Vt = /* @__PURE__ */ S({
802
1105
  __name: "DatametriaToast",
803
1106
  props: {
804
1107
  message: {},
@@ -808,52 +1111,254 @@ const Z = ["disabled", "type", "aria-busy", "aria-disabled"], ee = {
808
1111
  modelValue: { type: Boolean, default: !1 }
809
1112
  },
810
1113
  emits: ["update:modelValue", "close"],
811
- setup(e, { emit: l }) {
812
- const s = e, o = l, r = k(s.modelValue);
813
- let d = null;
814
- T(() => s.modelValue, (b) => {
815
- r.value = b, b && s.duration > 0 && n();
1114
+ setup(e, { emit: r }) {
1115
+ const i = e, a = r, l = V(i.modelValue);
1116
+ let n = null;
1117
+ H(() => i.modelValue, (m) => {
1118
+ l.value = m, m && i.duration > 0 && d();
816
1119
  });
817
- const n = () => {
818
- d && clearTimeout(d), d = setTimeout(() => {
1120
+ const d = () => {
1121
+ n && clearTimeout(n), n = setTimeout(() => {
819
1122
  u();
820
- }, s.duration);
1123
+ }, i.duration);
821
1124
  }, u = () => {
822
- r.value = !1, o("update:modelValue", !1), o("close"), d && clearTimeout(d);
1125
+ l.value = !1, a("update:modelValue", !1), a("close"), n && clearTimeout(n);
823
1126
  };
824
- return P(() => {
825
- r.value && s.duration > 0 && n();
826
- }), (b, h) => (a(), K(j, { to: "body" }, [
827
- G(H, { name: "dm-toast" }, {
828
- default: J(() => [
829
- r.value ? (a(), t("div", {
1127
+ return J(() => {
1128
+ l.value && i.duration > 0 && d();
1129
+ }), (m, b) => (t(), ee(ae, { to: "body" }, [
1130
+ te(le, { name: "dm-toast" }, {
1131
+ default: se(() => [
1132
+ l.value ? (t(), s("div", {
830
1133
  key: 0,
831
- class: y(["dm-toast", `dm-toast--${e.variant}`]),
1134
+ class: L(["dm-toast", `dm-toast--${e.variant}`]),
832
1135
  role: "alert",
833
1136
  "aria-live": e.variant === "error" ? "assertive" : "polite"
834
1137
  }, [
835
- i("div", Ea, [
836
- i("span", Aa, m(e.message), 1),
837
- e.closable ? (a(), t("button", {
1138
+ v("div", wt, [
1139
+ v("span", xt, g(e.message), 1),
1140
+ e.closable ? (t(), s("button", {
838
1141
  key: 0,
839
1142
  class: "dm-toast__close",
840
1143
  onClick: u,
841
1144
  "aria-label": "Fechar"
842
- }, "×")) : c("", !0)
1145
+ }, "×")) : h("", !0)
843
1146
  ])
844
- ], 10, za)) : c("", !0)
1147
+ ], 10, $t)) : h("", !0)
845
1148
  ]),
846
1149
  _: 1
847
1150
  })
848
1151
  ]));
849
1152
  }
850
- }), Xt = /* @__PURE__ */ _(Oa, [["__scopeId", "data-v-f6096907"]]), Na = { class: "dm-progress" }, Ra = {
1153
+ }), cs = /* @__PURE__ */ E(Vt, [["__scopeId", "data-v-f6096907"]]), Mt = ["id", "aria-hidden"], Dt = { class: "dm-tooltip__content" }, Ct = {
1154
+ key: 0,
1155
+ class: "dm-tooltip__arrow"
1156
+ }, It = /* @__PURE__ */ S({
1157
+ __name: "DatametriaTooltip",
1158
+ props: {
1159
+ content: {},
1160
+ placement: { default: "top" },
1161
+ variant: { default: "dark" },
1162
+ trigger: { default: "hover" },
1163
+ disabled: { type: Boolean },
1164
+ showArrow: { type: Boolean, default: !0 },
1165
+ delay: { default: 100 },
1166
+ hideDelay: { default: 100 },
1167
+ offset: { default: 8 },
1168
+ maxWidth: { default: "200px" }
1169
+ },
1170
+ emits: ["show", "hide"],
1171
+ setup(e, { expose: r, emit: i }) {
1172
+ const a = e, l = i, n = V(), d = V(), u = V(!1), m = V(), b = V(), k = T(() => `dm-tooltip-${Math.random().toString(36).substr(2, 9)}`), D = V({}), B = async () => {
1173
+ if (!n.value || !d.value) return;
1174
+ await Y();
1175
+ const M = n.value.getBoundingClientRect(), F = d.value.getBoundingClientRect(), A = {
1176
+ width: window.innerWidth,
1177
+ height: window.innerHeight
1178
+ };
1179
+ let o = 0, c = 0;
1180
+ switch (a.placement) {
1181
+ case "top":
1182
+ case "top-start":
1183
+ case "top-end":
1184
+ o = M.top - F.height - a.offset;
1185
+ break;
1186
+ case "bottom":
1187
+ case "bottom-start":
1188
+ case "bottom-end":
1189
+ o = M.bottom + a.offset;
1190
+ break;
1191
+ case "left":
1192
+ o = M.top + (M.height - F.height) / 2, c = M.left - F.width - a.offset;
1193
+ break;
1194
+ case "right":
1195
+ o = M.top + (M.height - F.height) / 2, c = M.right + a.offset;
1196
+ break;
1197
+ }
1198
+ if (a.placement.startsWith("top") || a.placement.startsWith("bottom"))
1199
+ switch (a.placement) {
1200
+ case "top":
1201
+ case "bottom":
1202
+ c = M.left + (M.width - F.width) / 2;
1203
+ break;
1204
+ case "top-start":
1205
+ case "bottom-start":
1206
+ c = M.left;
1207
+ break;
1208
+ case "top-end":
1209
+ case "bottom-end":
1210
+ c = M.right - F.width;
1211
+ break;
1212
+ }
1213
+ c < 0 ? c = 8 : c + F.width > A.width && (c = A.width - F.width - 8), o < 0 ? o = 8 : o + F.height > A.height && (o = A.height - F.height - 8), D.value = {
1214
+ position: "fixed",
1215
+ top: `${o}px`,
1216
+ left: `${c}px`,
1217
+ maxWidth: a.maxWidth,
1218
+ zIndex: "9999"
1219
+ };
1220
+ }, $ = () => {
1221
+ a.disabled || u.value || (clearTimeout(b.value), m.value = window.setTimeout(async () => {
1222
+ u.value = !0, l("show"), await B();
1223
+ }, a.delay));
1224
+ }, C = () => {
1225
+ clearTimeout(m.value), b.value = window.setTimeout(() => {
1226
+ u.value = !1, l("hide");
1227
+ }, a.hideDelay);
1228
+ }, f = () => {
1229
+ a.trigger === "hover" && $();
1230
+ }, p = () => {
1231
+ a.trigger === "hover" && C();
1232
+ }, w = () => {
1233
+ a.trigger === "focus" && $();
1234
+ }, z = () => {
1235
+ a.trigger === "focus" && C();
1236
+ }, O = () => {
1237
+ a.trigger === "click" && (u.value ? C() : $());
1238
+ }, U = () => {
1239
+ B();
1240
+ }, K = () => {
1241
+ D.value = {};
1242
+ }, x = () => {
1243
+ u.value && B();
1244
+ }, q = () => {
1245
+ u.value && B();
1246
+ };
1247
+ return J(() => {
1248
+ window.addEventListener("resize", x), window.addEventListener("scroll", q, !0);
1249
+ }), re(() => {
1250
+ clearTimeout(m.value), clearTimeout(b.value), window.removeEventListener("resize", x), window.removeEventListener("scroll", q, !0);
1251
+ }), r({
1252
+ show: $,
1253
+ hide: C,
1254
+ isVisible: T(() => u.value)
1255
+ }), (M, F) => (t(), s("div", {
1256
+ ref_key: "triggerRef",
1257
+ ref: n,
1258
+ class: "dm-tooltip-trigger",
1259
+ onMouseenter: f,
1260
+ onMouseleave: p,
1261
+ onFocus: w,
1262
+ onBlur: z,
1263
+ onClick: O
1264
+ }, [
1265
+ R(M.$slots, "default", {}, void 0, !0),
1266
+ (t(), ee(ae, { to: "body" }, [
1267
+ te(le, {
1268
+ name: "tooltip",
1269
+ onEnter: U,
1270
+ onLeave: K
1271
+ }, {
1272
+ default: se(() => [
1273
+ u.value ? (t(), s("div", {
1274
+ key: 0,
1275
+ ref_key: "tooltipRef",
1276
+ ref: d,
1277
+ id: k.value,
1278
+ class: L(["dm-tooltip", [
1279
+ `dm-tooltip--${e.placement}`,
1280
+ `dm-tooltip--${e.variant}`,
1281
+ { "dm-tooltip--arrow": e.showArrow }
1282
+ ]]),
1283
+ style: j(D.value),
1284
+ role: "tooltip",
1285
+ "aria-hidden": !u.value
1286
+ }, [
1287
+ v("div", Dt, [
1288
+ R(M.$slots, "content", {}, () => [
1289
+ N(g(e.content), 1)
1290
+ ], !0)
1291
+ ]),
1292
+ e.showArrow ? (t(), s("div", Ct)) : h("", !0)
1293
+ ], 14, Mt)) : h("", !0)
1294
+ ]),
1295
+ _: 3
1296
+ })
1297
+ ]))
1298
+ ], 544));
1299
+ }
1300
+ }), us = /* @__PURE__ */ E(It, [["__scopeId", "data-v-130ed64e"]]), Bt = ["aria-label"], Tt = {
1301
+ key: 0,
1302
+ class: "datametria-skeleton__text"
1303
+ }, Lt = {
1304
+ key: 1,
1305
+ class: "datametria-skeleton__avatar shimmer"
1306
+ }, St = {
1307
+ key: 2,
1308
+ class: "datametria-skeleton__card"
1309
+ }, Et = {
1310
+ key: 3,
1311
+ class: "datametria-skeleton__button shimmer"
1312
+ }, qt = {
1313
+ key: 4,
1314
+ class: "datametria-skeleton__custom shimmer"
1315
+ }, Rt = /* @__PURE__ */ S({
1316
+ __name: "DatametriaSkeleton",
1317
+ props: {
1318
+ variant: { default: "text" },
1319
+ width: {},
1320
+ height: {},
1321
+ lines: { default: 3 },
1322
+ animated: { type: Boolean, default: !0 },
1323
+ ariaLabel: { default: "Carregando conteúdo..." },
1324
+ lastLineWidth: { default: 75 }
1325
+ },
1326
+ setup(e) {
1327
+ const r = e, i = T(() => {
1328
+ const l = {};
1329
+ return r.width && (l.width = typeof r.width == "number" ? `${r.width}px` : r.width), r.height && (l.height = typeof r.height == "number" ? `${r.height}px` : r.height), l;
1330
+ }), a = (l) => ({
1331
+ width: l === r.lines ? `${r.lastLineWidth}%` : "100%",
1332
+ marginBottom: l < r.lines ? "0.5rem" : "0"
1333
+ });
1334
+ return (l, n) => (t(), s("div", {
1335
+ class: L(["datametria-skeleton", [
1336
+ `datametria-skeleton--${e.variant}`,
1337
+ { "datametria-skeleton--animated": e.animated }
1338
+ ]]),
1339
+ style: j(i.value),
1340
+ "aria-label": e.ariaLabel,
1341
+ role: "status",
1342
+ "aria-live": "polite"
1343
+ }, [
1344
+ e.variant === "text" ? (t(), s("div", Tt, [
1345
+ (t(!0), s(W, null, X(e.lines, (d) => (t(), s("div", {
1346
+ key: d,
1347
+ class: "datametria-skeleton__line shimmer",
1348
+ style: j(a(d))
1349
+ }, null, 4))), 128))
1350
+ ])) : e.variant === "avatar" ? (t(), s("div", Lt)) : e.variant === "card" ? (t(), s("div", St, [...n[0] || (n[0] = [
1351
+ ve('<div class="datametria-skeleton__card-header shimmer" data-v-1bc144db></div><div class="datametria-skeleton__card-content" data-v-1bc144db><div class="datametria-skeleton__line shimmer" style="width:100%;" data-v-1bc144db></div><div class="datametria-skeleton__line shimmer" style="width:80%;" data-v-1bc144db></div><div class="datametria-skeleton__line shimmer" style="width:60%;" data-v-1bc144db></div></div>', 2)
1352
+ ])])) : e.variant === "button" ? (t(), s("div", Et)) : (t(), s("div", qt))
1353
+ ], 14, Bt));
1354
+ }
1355
+ }), ms = /* @__PURE__ */ E(Rt, [["__scopeId", "data-v-1bc144db"]]), zt = { class: "dm-progress" }, Ft = {
851
1356
  key: 0,
852
1357
  class: "dm-progress__header"
853
- }, Ua = { class: "dm-progress__label" }, Fa = {
1358
+ }, At = { class: "dm-progress__label" }, Ot = {
854
1359
  key: 0,
855
1360
  class: "dm-progress__value"
856
- }, Pa = ["aria-valuenow", "aria-label"], Ka = /* @__PURE__ */ f({
1361
+ }, Nt = ["aria-valuenow", "aria-label"], Pt = /* @__PURE__ */ S({
857
1362
  __name: "DatametriaProgress",
858
1363
  props: {
859
1364
  value: {},
@@ -863,13 +1368,13 @@ const Z = ["disabled", "type", "aria-busy", "aria-disabled"], ee = {
863
1368
  ariaLabel: {}
864
1369
  },
865
1370
  setup(e) {
866
- const l = e, s = C(() => Math.min(Math.max(l.value, 0), 100));
867
- return (o, r) => (a(), t("div", Na, [
868
- e.label ? (a(), t("div", Ra, [
869
- i("span", Ua, m(e.label), 1),
870
- e.showValue ? (a(), t("span", Fa, m(e.value) + "%", 1)) : c("", !0)
871
- ])) : c("", !0),
872
- i("div", {
1371
+ const r = e, i = T(() => Math.min(Math.max(r.value, 0), 100));
1372
+ return (a, l) => (t(), s("div", zt, [
1373
+ e.label ? (t(), s("div", Ft, [
1374
+ v("span", At, g(e.label), 1),
1375
+ e.showValue ? (t(), s("span", Ot, g(e.value) + "%", 1)) : h("", !0)
1376
+ ])) : h("", !0),
1377
+ v("div", {
873
1378
  class: "dm-progress__track",
874
1379
  role: "progressbar",
875
1380
  "aria-valuenow": e.value,
@@ -877,17 +1382,17 @@ const Z = ["disabled", "type", "aria-busy", "aria-disabled"], ee = {
877
1382
  "aria-valuemax": 100,
878
1383
  "aria-label": e.ariaLabel || e.label
879
1384
  }, [
880
- i("div", {
881
- class: y(["dm-progress__bar", `dm-progress__bar--${e.variant}`]),
882
- style: A({ width: `${s.value}%` })
1385
+ v("div", {
1386
+ class: L(["dm-progress__bar", `dm-progress__bar--${e.variant}`]),
1387
+ style: j({ width: `${i.value}%` })
883
1388
  }, null, 6)
884
- ], 8, Pa)
1389
+ ], 8, Nt)
885
1390
  ]));
886
1391
  }
887
- }), Zt = /* @__PURE__ */ _(Ka, [["__scopeId", "data-v-6c9ef263"]]), ja = ["aria-label"], Ga = {
1392
+ }), vs = /* @__PURE__ */ E(Pt, [["__scopeId", "data-v-6c9ef263"]]), Ut = ["aria-label"], Wt = {
888
1393
  key: 0,
889
1394
  class: "dm-spinner__label"
890
- }, Ha = /* @__PURE__ */ f({
1395
+ }, Kt = /* @__PURE__ */ S({
891
1396
  __name: "DatametriaSpinner",
892
1397
  props: {
893
1398
  size: { default: "md" },
@@ -896,16 +1401,16 @@ const Z = ["disabled", "type", "aria-busy", "aria-disabled"], ee = {
896
1401
  ariaLabel: { default: "Carregando" }
897
1402
  },
898
1403
  setup(e) {
899
- return (l, s) => (a(), t("div", {
900
- class: y(["dm-spinner", [`dm-spinner--${e.size}`, `dm-spinner--${e.variant}`]]),
1404
+ return (r, i) => (t(), s("div", {
1405
+ class: L(["dm-spinner", [`dm-spinner--${e.size}`, `dm-spinner--${e.variant}`]]),
901
1406
  role: "status",
902
1407
  "aria-label": e.ariaLabel
903
1408
  }, [
904
- s[0] || (s[0] = i("svg", {
1409
+ i[0] || (i[0] = v("svg", {
905
1410
  class: "dm-spinner__svg",
906
1411
  viewBox: "0 0 50 50"
907
1412
  }, [
908
- i("circle", {
1413
+ v("circle", {
909
1414
  class: "dm-spinner__circle",
910
1415
  cx: "25",
911
1416
  cy: "25",
@@ -914,60 +1419,60 @@ const Z = ["disabled", "type", "aria-busy", "aria-disabled"], ee = {
914
1419
  "stroke-width": "4"
915
1420
  })
916
1421
  ], -1)),
917
- e.label ? (a(), t("span", Ga, m(e.label), 1)) : c("", !0)
918
- ], 10, ja));
1422
+ e.label ? (t(), s("span", Wt, g(e.label), 1)) : h("", !0)
1423
+ ], 10, Ut));
919
1424
  }
920
- }), el = /* @__PURE__ */ _(Ha, [["__scopeId", "data-v-013214f1"]]), Ja = { class: "datametria-table" }, Wa = { class: "datametria-table__table" }, Ya = { class: "datametria-table__thead" }, Qa = { class: "datametria-table__tbody" }, Xa = {
1425
+ }), hs = /* @__PURE__ */ E(Kt, [["__scopeId", "data-v-013214f1"]]), Xt = { class: "datametria-table" }, jt = { class: "datametria-table__table" }, Ht = { class: "datametria-table__thead" }, Gt = { class: "datametria-table__tbody" }, Yt = {
921
1426
  key: 0,
922
1427
  class: "datametria-table__empty"
923
- }, Za = /* @__PURE__ */ f({
1428
+ }, Jt = /* @__PURE__ */ S({
924
1429
  __name: "DatametriaTable",
925
1430
  props: {
926
1431
  columns: {},
927
1432
  data: {}
928
1433
  },
929
1434
  setup(e) {
930
- return (l, s) => (a(), t("div", Ja, [
931
- i("table", Wa, [
932
- i("thead", Ya, [
933
- i("tr", null, [
934
- (a(!0), t(B, null, L(e.columns, (o) => (a(), t("th", {
935
- key: o.key,
1435
+ return (r, i) => (t(), s("div", Xt, [
1436
+ v("table", jt, [
1437
+ v("thead", Ht, [
1438
+ v("tr", null, [
1439
+ (t(!0), s(W, null, X(e.columns, (a) => (t(), s("th", {
1440
+ key: a.key,
936
1441
  class: "datametria-table__th",
937
- style: A({ width: o.width })
938
- }, m(o.label), 5))), 128))
1442
+ style: j({ width: a.width })
1443
+ }, g(a.label), 5))), 128))
939
1444
  ])
940
1445
  ]),
941
- i("tbody", Qa, [
942
- (a(!0), t(B, null, L(e.data, (o, r) => (a(), t("tr", {
943
- key: r,
1446
+ v("tbody", Gt, [
1447
+ (t(!0), s(W, null, X(e.data, (a, l) => (t(), s("tr", {
1448
+ key: l,
944
1449
  class: "datametria-table__tr"
945
1450
  }, [
946
- (a(!0), t(B, null, L(e.columns, (d) => (a(), t("td", {
947
- key: d.key,
1451
+ (t(!0), s(W, null, X(e.columns, (n) => (t(), s("td", {
1452
+ key: n.key,
948
1453
  class: "datametria-table__td"
949
1454
  }, [
950
- p(l.$slots, `cell-${d.key}`, {
951
- row: o,
952
- value: o[d.key]
1455
+ R(r.$slots, `cell-${n.key}`, {
1456
+ row: a,
1457
+ value: a[n.key]
953
1458
  }, () => [
954
- w(m(o[d.key]), 1)
1459
+ N(g(a[n.key]), 1)
955
1460
  ], !0)
956
1461
  ]))), 128))
957
1462
  ]))), 128))
958
1463
  ])
959
1464
  ]),
960
- e.data.length === 0 ? (a(), t("div", Xa, [
961
- p(l.$slots, "empty", {}, () => [
962
- s[0] || (s[0] = w("Nenhum dado disponível", -1))
1465
+ e.data.length === 0 ? (t(), s("div", Yt, [
1466
+ R(r.$slots, "empty", {}, () => [
1467
+ i[0] || (i[0] = N("Nenhum dado disponível", -1))
963
1468
  ], !0)
964
- ])) : c("", !0)
1469
+ ])) : h("", !0)
965
1470
  ]));
966
1471
  }
967
- }), al = /* @__PURE__ */ _(Za, [["__scopeId", "data-v-7700c903"]]), et = ["aria-label"], at = ["src", "alt"], tt = {
1472
+ }), fs = /* @__PURE__ */ E(Jt, [["__scopeId", "data-v-7700c903"]]), Qt = ["aria-label"], Zt = ["src", "alt"], el = {
968
1473
  key: 1,
969
1474
  class: "dm-avatar__initials"
970
- }, lt = /* @__PURE__ */ f({
1475
+ }, al = /* @__PURE__ */ S({
971
1476
  __name: "DatametriaAvatar",
972
1477
  props: {
973
1478
  src: {},
@@ -978,27 +1483,27 @@ const Z = ["disabled", "type", "aria-busy", "aria-disabled"], ee = {
978
1483
  ariaLabel: {}
979
1484
  },
980
1485
  setup(e) {
981
- const l = e, s = k(!1), o = C(() => {
982
- if (!l.name) return "?";
983
- const d = l.name.trim().split(" ");
984
- return d.length === 1 ? d[0].charAt(0).toUpperCase() : (d[0].charAt(0) + d[d.length - 1].charAt(0)).toUpperCase();
985
- }), r = () => {
986
- s.value = !0;
1486
+ const r = e, i = V(!1), a = T(() => {
1487
+ if (!r.name) return "?";
1488
+ const n = r.name.trim().split(" ");
1489
+ return n.length === 1 ? n[0].charAt(0).toUpperCase() : (n[0].charAt(0) + n[n.length - 1].charAt(0)).toUpperCase();
1490
+ }), l = () => {
1491
+ i.value = !0;
987
1492
  };
988
- return (d, n) => (a(), t("div", {
989
- class: y(["dm-avatar", [`dm-avatar--${e.size}`, { "dm-avatar--rounded": e.rounded }]]),
1493
+ return (n, d) => (t(), s("div", {
1494
+ class: L(["dm-avatar", [`dm-avatar--${e.size}`, { "dm-avatar--rounded": e.rounded }]]),
990
1495
  "aria-label": e.ariaLabel || e.name
991
1496
  }, [
992
- e.src ? (a(), t("img", {
1497
+ e.src ? (t(), s("img", {
993
1498
  key: 0,
994
1499
  src: e.src,
995
1500
  alt: e.alt || e.name,
996
1501
  class: "dm-avatar__image",
997
- onError: r
998
- }, null, 40, at)) : (a(), t("span", tt, m(o.value), 1))
999
- ], 10, et));
1502
+ onError: l
1503
+ }, null, 40, Zt)) : (t(), s("span", el, g(a.value), 1))
1504
+ ], 10, Qt));
1000
1505
  }
1001
- }), tl = /* @__PURE__ */ _(lt, [["__scopeId", "data-v-898cb5d7"]]), st = ["aria-label"], rt = /* @__PURE__ */ f({
1506
+ }), bs = /* @__PURE__ */ E(al, [["__scopeId", "data-v-898cb5d7"]]), tl = ["aria-label"], ll = /* @__PURE__ */ S({
1002
1507
  __name: "DatametriaBadge",
1003
1508
  props: {
1004
1509
  label: {},
@@ -1007,19 +1512,19 @@ const Z = ["disabled", "type", "aria-busy", "aria-disabled"], ee = {
1007
1512
  ariaLabel: {}
1008
1513
  },
1009
1514
  setup(e) {
1010
- return (l, s) => (a(), t("span", {
1011
- class: y(["dm-badge", [`dm-badge--${e.variant}`, `dm-badge--${e.size}`]]),
1515
+ return (r, i) => (t(), s("span", {
1516
+ class: L(["dm-badge", [`dm-badge--${e.variant}`, `dm-badge--${e.size}`]]),
1012
1517
  "aria-label": e.ariaLabel
1013
1518
  }, [
1014
- p(l.$slots, "default", {}, () => [
1015
- w(m(e.label), 1)
1519
+ R(r.$slots, "default", {}, () => [
1520
+ N(g(e.label), 1)
1016
1521
  ], !0)
1017
- ], 10, st));
1522
+ ], 10, tl));
1018
1523
  }
1019
- }), ll = /* @__PURE__ */ _(rt, [["__scopeId", "data-v-843741c5"]]), dt = ["role", "tabindex", "onKeydown"], ot = {
1524
+ }), ps = /* @__PURE__ */ E(ll, [["__scopeId", "data-v-843741c5"]]), sl = ["role", "tabindex", "onKeydown"], rl = {
1020
1525
  key: 0,
1021
1526
  class: "dm-chip__icon"
1022
- }, it = { class: "dm-chip__label" }, nt = /* @__PURE__ */ f({
1527
+ }, il = { class: "dm-chip__label" }, nl = /* @__PURE__ */ S({
1023
1528
  __name: "DatametriaChip",
1024
1529
  props: {
1025
1530
  label: {},
@@ -1028,46 +1533,46 @@ const Z = ["disabled", "type", "aria-busy", "aria-disabled"], ee = {
1028
1533
  clickable: { type: Boolean, default: !1 }
1029
1534
  },
1030
1535
  emits: ["click", "close"],
1031
- setup(e, { emit: l }) {
1032
- const s = l, o = () => {
1033
- s("click");
1034
- }, r = () => {
1035
- s("close");
1536
+ setup(e, { emit: r }) {
1537
+ const i = r, a = () => {
1538
+ i("click");
1539
+ }, l = () => {
1540
+ i("close");
1036
1541
  };
1037
- return (d, n) => (a(), t("div", {
1038
- class: y(["dm-chip", [`dm-chip--${e.variant}`, { "dm-chip--clickable": e.clickable }]]),
1542
+ return (n, d) => (t(), s("div", {
1543
+ class: L(["dm-chip", [`dm-chip--${e.variant}`, { "dm-chip--clickable": e.clickable }]]),
1039
1544
  role: e.clickable ? "button" : void 0,
1040
1545
  tabindex: e.clickable ? 0 : void 0,
1041
- onClick: o,
1546
+ onClick: a,
1042
1547
  onKeydown: [
1043
- U(o, ["enter"]),
1044
- U(S(o, ["prevent"]), ["space"])
1548
+ de(a, ["enter"]),
1549
+ de(Z(a, ["prevent"]), ["space"])
1045
1550
  ]
1046
1551
  }, [
1047
- d.$slots.icon ? (a(), t("span", ot, [
1048
- p(d.$slots, "icon", {}, void 0, !0)
1049
- ])) : c("", !0),
1050
- i("span", it, [
1051
- p(d.$slots, "default", {}, () => [
1052
- w(m(e.label), 1)
1552
+ n.$slots.icon ? (t(), s("span", rl, [
1553
+ R(n.$slots, "icon", {}, void 0, !0)
1554
+ ])) : h("", !0),
1555
+ v("span", il, [
1556
+ R(n.$slots, "default", {}, () => [
1557
+ N(g(e.label), 1)
1053
1558
  ], !0)
1054
1559
  ]),
1055
- e.closable ? (a(), t("button", {
1560
+ e.closable ? (t(), s("button", {
1056
1561
  key: 1,
1057
1562
  class: "dm-chip__close",
1058
- onClick: S(r, ["stop"]),
1563
+ onClick: Z(l, ["stop"]),
1059
1564
  "aria-label": "Remover",
1060
1565
  type: "button"
1061
- }, "×")) : c("", !0)
1062
- ], 42, dt));
1566
+ }, "×")) : h("", !0)
1567
+ ], 42, sl));
1063
1568
  }
1064
- }), sl = /* @__PURE__ */ _(nt, [["__scopeId", "data-v-0d7ae680"]]), ct = ["aria-label"], ut = { class: "dm-navbar__container" }, mt = { class: "dm-navbar__brand" }, bt = {
1569
+ }), gs = /* @__PURE__ */ E(nl, [["__scopeId", "data-v-0d7ae680"]]), ol = ["aria-label"], dl = { class: "dm-navbar__container" }, cl = { class: "dm-navbar__brand" }, ul = {
1065
1570
  href: "/",
1066
1571
  class: "dm-navbar__logo"
1067
- }, vt = ["aria-expanded"], ht = {
1572
+ }, ml = ["aria-expanded"], vl = {
1068
1573
  key: 1,
1069
1574
  class: "dm-navbar__actions"
1070
- }, ft = /* @__PURE__ */ f({
1575
+ }, hl = /* @__PURE__ */ S({
1071
1576
  __name: "DatametriaNavbar",
1072
1577
  props: {
1073
1578
  brand: { default: "" },
@@ -1078,86 +1583,349 @@ const Z = ["disabled", "type", "aria-busy", "aria-disabled"], ee = {
1078
1583
  ariaLabel: { default: "Main navigation" }
1079
1584
  },
1080
1585
  setup(e) {
1081
- const l = e, s = k(!1), o = () => {
1082
- s.value = !s.value;
1586
+ const r = e, i = V(!1), a = () => {
1587
+ i.value = !i.value;
1083
1588
  };
1084
- return (r, d) => (a(), t("nav", {
1085
- class: y(["dm-navbar", [
1086
- `dm-navbar--${l.variant}`,
1087
- { "dm-navbar--sticky": l.sticky },
1088
- { "dm-navbar--transparent": l.transparent },
1089
- { "dm-navbar--bordered": l.bordered }
1589
+ return (l, n) => (t(), s("nav", {
1590
+ class: L(["dm-navbar", [
1591
+ `dm-navbar--${r.variant}`,
1592
+ { "dm-navbar--sticky": r.sticky },
1593
+ { "dm-navbar--transparent": r.transparent },
1594
+ { "dm-navbar--bordered": r.bordered }
1090
1595
  ]]),
1091
1596
  role: "navigation",
1092
- "aria-label": l.ariaLabel
1597
+ "aria-label": r.ariaLabel
1093
1598
  }, [
1094
- i("div", ut, [
1095
- i("div", mt, [
1096
- p(r.$slots, "brand", {}, () => [
1097
- i("a", bt, m(e.brand), 1)
1599
+ v("div", dl, [
1600
+ v("div", cl, [
1601
+ R(l.$slots, "brand", {}, () => [
1602
+ v("a", ul, g(e.brand), 1)
1098
1603
  ], !0)
1099
1604
  ]),
1100
- r.$slots.menu ? (a(), t("button", {
1605
+ l.$slots.menu ? (t(), s("button", {
1101
1606
  key: 0,
1102
1607
  class: "dm-navbar__toggle",
1103
- "aria-expanded": s.value,
1608
+ "aria-expanded": i.value,
1104
1609
  "aria-controls": "navbar-menu",
1105
- onClick: o
1106
- }, [...d[0] || (d[0] = [
1107
- i("span", { class: "dm-navbar__toggle-icon" }, null, -1)
1108
- ])], 8, vt)) : c("", !0),
1109
- i("div", {
1610
+ onClick: a
1611
+ }, [...n[0] || (n[0] = [
1612
+ v("span", { class: "dm-navbar__toggle-icon" }, null, -1)
1613
+ ])], 8, ml)) : h("", !0),
1614
+ v("div", {
1110
1615
  id: "navbar-menu",
1111
- class: y(["dm-navbar__menu", { "dm-navbar__menu--open": s.value }])
1616
+ class: L(["dm-navbar__menu", { "dm-navbar__menu--open": i.value }])
1112
1617
  }, [
1113
- p(r.$slots, "menu", {}, void 0, !0)
1618
+ R(l.$slots, "menu", {}, void 0, !0)
1114
1619
  ], 2),
1115
- r.$slots.actions ? (a(), t("div", ht, [
1116
- p(r.$slots, "actions", {}, void 0, !0)
1117
- ])) : c("", !0)
1620
+ l.$slots.actions ? (t(), s("div", vl, [
1621
+ R(l.$slots, "actions", {}, void 0, !0)
1622
+ ])) : h("", !0)
1118
1623
  ])
1119
- ], 10, ct));
1624
+ ], 10, ol));
1625
+ }
1626
+ }), _s = /* @__PURE__ */ E(hl, [["__scopeId", "data-v-adcb6d0c"]]), fl = ["aria-expanded", "aria-controls"], bl = ["disabled"], pl = ["id", "aria-labelledby"], gl = { class: "dm-menu__content" }, _l = ["tabindex", "aria-disabled", "onClick", "onMouseenter"], kl = {
1627
+ key: 0,
1628
+ class: "dm-menu__divider"
1629
+ }, yl = {
1630
+ key: 0,
1631
+ class: "dm-menu__item-icon"
1632
+ }, $l = { class: "dm-menu__item-content" }, wl = { class: "dm-menu__item-label" }, xl = {
1633
+ key: 0,
1634
+ class: "dm-menu__item-description"
1635
+ }, Vl = {
1636
+ key: 1,
1637
+ class: "dm-menu__item-shortcut"
1638
+ }, Ml = /* @__PURE__ */ S({
1639
+ __name: "DatametriaMenu",
1640
+ props: {
1641
+ items: { default: () => [] },
1642
+ triggerText: { default: "Menu" },
1643
+ placement: { default: "bottom-start" },
1644
+ disabled: { type: Boolean },
1645
+ fullWidth: { type: Boolean },
1646
+ showBackdrop: { type: Boolean, default: !1 },
1647
+ closeOnItemClick: { type: Boolean, default: !0 },
1648
+ offset: { default: 4 }
1649
+ },
1650
+ emits: ["open", "close", "item-click"],
1651
+ setup(e, { expose: r, emit: i }) {
1652
+ const a = e, l = i, n = V(), d = V(), u = V(!1), m = V(-1), b = T(() => `dm-menu-${Math.random().toString(36).substr(2, 9)}`), k = T(() => `dm-menu-trigger-${Math.random().toString(36).substr(2, 9)}`), D = V({}), B = async () => {
1653
+ if (!n.value || !d.value) return;
1654
+ await Y();
1655
+ const o = n.value.getBoundingClientRect(), c = d.value.getBoundingClientRect(), y = {
1656
+ width: window.innerWidth,
1657
+ height: window.innerHeight
1658
+ };
1659
+ let _ = 0, I = 0;
1660
+ switch (a.placement) {
1661
+ case "bottom-start":
1662
+ _ = o.bottom + a.offset, I = o.left;
1663
+ break;
1664
+ case "bottom-end":
1665
+ _ = o.bottom + a.offset, I = o.right - c.width;
1666
+ break;
1667
+ case "top-start":
1668
+ _ = o.top - c.height - a.offset, I = o.left;
1669
+ break;
1670
+ case "top-end":
1671
+ _ = o.top - c.height - a.offset, I = o.right - c.width;
1672
+ break;
1673
+ case "left":
1674
+ _ = o.top, I = o.left - c.width - a.offset;
1675
+ break;
1676
+ case "right":
1677
+ _ = o.top, I = o.right + a.offset;
1678
+ break;
1679
+ }
1680
+ I < 8 ? I = 8 : I + c.width > y.width - 8 && (I = y.width - c.width - 8), _ < 8 ? _ = 8 : _ + c.height > y.height - 8 && (_ = y.height - c.height - 8);
1681
+ const Q = a.fullWidth ? `${o.width}px` : "auto";
1682
+ D.value = {
1683
+ position: "fixed",
1684
+ top: `${_}px`,
1685
+ left: `${I}px`,
1686
+ width: Q,
1687
+ zIndex: "9999"
1688
+ };
1689
+ }, $ = async () => {
1690
+ a.disabled || u.value || (u.value = !0, m.value = -1, l("open"), await B(), Y(() => {
1691
+ const o = a.items.findIndex((c) => !c.disabled && !c.divider);
1692
+ o !== -1 && (m.value = o);
1693
+ }));
1694
+ }, C = () => {
1695
+ u.value && (u.value = !1, m.value = -1, l("close"), Y(() => {
1696
+ var o;
1697
+ (o = n.value) == null || o.focus();
1698
+ }));
1699
+ }, f = () => {
1700
+ u.value ? C() : $();
1701
+ }, p = () => {
1702
+ f();
1703
+ }, w = (o) => {
1704
+ switch (o.key) {
1705
+ case "Enter":
1706
+ case " ":
1707
+ case "ArrowDown":
1708
+ o.preventDefault(), $();
1709
+ break;
1710
+ case "ArrowUp":
1711
+ o.preventDefault(), $(), Y(() => {
1712
+ var y;
1713
+ const c = ((y = a.items.map((_, I) => ({ item: _, index: I })).filter(({ item: _ }) => !_.disabled && !_.divider).pop()) == null ? void 0 : y.index) ?? -1;
1714
+ c !== -1 && (m.value = c);
1715
+ });
1716
+ break;
1717
+ case "Escape":
1718
+ C();
1719
+ break;
1720
+ }
1721
+ }, z = (o) => {
1722
+ switch (o.key) {
1723
+ case "ArrowDown":
1724
+ o.preventDefault(), O();
1725
+ break;
1726
+ case "ArrowUp":
1727
+ o.preventDefault(), U();
1728
+ break;
1729
+ case "Enter":
1730
+ case " ":
1731
+ if (o.preventDefault(), m.value !== -1) {
1732
+ const c = a.items[m.value];
1733
+ K(c, m.value);
1734
+ }
1735
+ break;
1736
+ case "Escape":
1737
+ o.preventDefault(), C();
1738
+ break;
1739
+ case "Tab":
1740
+ C();
1741
+ break;
1742
+ }
1743
+ }, O = () => {
1744
+ const o = a.items.map((_, I) => ({ item: _, index: I })).filter(({ item: _ }) => !_.disabled && !_.divider).map(({ index: _ }) => _);
1745
+ if (o.length === 0) return;
1746
+ const c = o.indexOf(m.value), y = c === -1 ? 0 : (c + 1) % o.length;
1747
+ m.value = o[y];
1748
+ }, U = () => {
1749
+ const o = a.items.map((_, I) => ({ item: _, index: I })).filter(({ item: _ }) => !_.disabled && !_.divider).map(({ index: _ }) => _);
1750
+ if (o.length === 0) return;
1751
+ const c = o.indexOf(m.value), y = c === -1 ? o.length - 1 : (c - 1 + o.length) % o.length;
1752
+ m.value = o[y];
1753
+ }, K = (o, c) => {
1754
+ o.disabled || o.divider || (l("item-click", o, c), o.action && o.action(), a.closeOnItemClick && C());
1755
+ }, x = (o) => {
1756
+ o.stopPropagation();
1757
+ }, q = () => {
1758
+ B();
1759
+ }, M = () => {
1760
+ D.value = {};
1761
+ }, F = (o) => {
1762
+ var y, _;
1763
+ if (!u.value) return;
1764
+ const c = o.target;
1765
+ (y = n.value) != null && y.contains(c) || (_ = d.value) != null && _.contains(c) || C();
1766
+ }, A = () => {
1767
+ u.value && B();
1768
+ };
1769
+ return J(() => {
1770
+ document.addEventListener("click", F), window.addEventListener("resize", A);
1771
+ }), re(() => {
1772
+ document.removeEventListener("click", F), window.removeEventListener("resize", A);
1773
+ }), H(() => a.items, () => {
1774
+ m.value >= a.items.length && (m.value = -1);
1775
+ }), r({
1776
+ open: $,
1777
+ close: C,
1778
+ toggle: f,
1779
+ isOpen: T(() => u.value)
1780
+ }), (o, c) => (t(), s("div", {
1781
+ class: L(["dm-menu", { "dm-menu--disabled": e.disabled }])
1782
+ }, [
1783
+ v("div", {
1784
+ ref_key: "triggerRef",
1785
+ ref: n,
1786
+ class: "dm-menu__trigger",
1787
+ "aria-expanded": u.value,
1788
+ "aria-haspopup": !0,
1789
+ "aria-controls": b.value,
1790
+ onClick: p,
1791
+ onKeydown: w
1792
+ }, [
1793
+ R(o.$slots, "trigger", {
1794
+ isOpen: u.value,
1795
+ toggle: f
1796
+ }, () => [
1797
+ v("button", {
1798
+ type: "button",
1799
+ class: "dm-menu__button",
1800
+ disabled: e.disabled
1801
+ }, [
1802
+ N(g(e.triggerText) + " ", 1),
1803
+ (t(), s("svg", {
1804
+ class: L(["dm-menu__chevron", { "dm-menu__chevron--open": u.value }]),
1805
+ viewBox: "0 0 20 20",
1806
+ fill: "currentColor"
1807
+ }, [...c[0] || (c[0] = [
1808
+ v("path", {
1809
+ "fill-rule": "evenodd",
1810
+ d: "M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z",
1811
+ "clip-rule": "evenodd"
1812
+ }, null, -1)
1813
+ ])], 2))
1814
+ ], 8, bl)
1815
+ ], !0)
1816
+ ], 40, fl),
1817
+ (t(), ee(ae, { to: "body" }, [
1818
+ te(le, {
1819
+ name: "menu",
1820
+ onEnter: q,
1821
+ onLeave: M
1822
+ }, {
1823
+ default: se(() => [
1824
+ u.value ? (t(), s("div", {
1825
+ key: 0,
1826
+ ref_key: "menuRef",
1827
+ ref: d,
1828
+ id: b.value,
1829
+ class: L(["dm-menu__dropdown", [
1830
+ `dm-menu__dropdown--${e.placement}`,
1831
+ { "dm-menu__dropdown--full-width": e.fullWidth }
1832
+ ]]),
1833
+ style: j(D.value),
1834
+ role: "menu",
1835
+ "aria-labelledby": k.value,
1836
+ onKeydown: z,
1837
+ onClick: x
1838
+ }, [
1839
+ v("div", gl, [
1840
+ R(o.$slots, "default", {
1841
+ close: C,
1842
+ focusedIndex: m.value
1843
+ }, () => [
1844
+ (t(!0), s(W, null, X(e.items, (y, _) => (t(), s("div", {
1845
+ key: y.key || _,
1846
+ class: L(["dm-menu__item", {
1847
+ "dm-menu__item--focused": m.value === _,
1848
+ "dm-menu__item--disabled": y.disabled,
1849
+ "dm-menu__item--divider": y.divider
1850
+ }]),
1851
+ role: "menuitem",
1852
+ tabindex: y.disabled ? -1 : 0,
1853
+ "aria-disabled": y.disabled,
1854
+ onClick: (I) => K(y, _),
1855
+ onMouseenter: (I) => m.value = _
1856
+ }, [
1857
+ y.divider ? (t(), s("div", kl)) : (t(), s(W, { key: 1 }, [
1858
+ y.icon ? (t(), s("div", yl, [
1859
+ (t(), ee(he(y.icon)))
1860
+ ])) : h("", !0),
1861
+ v("div", $l, [
1862
+ v("div", wl, g(y.label), 1),
1863
+ y.description ? (t(), s("div", xl, g(y.description), 1)) : h("", !0)
1864
+ ]),
1865
+ y.shortcut ? (t(), s("div", Vl, g(y.shortcut), 1)) : h("", !0)
1866
+ ], 64))
1867
+ ], 42, _l))), 128))
1868
+ ], !0)
1869
+ ])
1870
+ ], 46, pl)) : h("", !0)
1871
+ ]),
1872
+ _: 3
1873
+ })
1874
+ ])),
1875
+ (t(), ee(ae, { to: "body" }, [
1876
+ te(le, { name: "backdrop" }, {
1877
+ default: se(() => [
1878
+ u.value && e.showBackdrop ? (t(), s("div", {
1879
+ key: 0,
1880
+ class: "dm-menu__backdrop",
1881
+ onClick: C
1882
+ })) : h("", !0)
1883
+ ]),
1884
+ _: 1
1885
+ })
1886
+ ]))
1887
+ ], 2));
1120
1888
  }
1121
- }), rl = /* @__PURE__ */ _(ft, [["__scopeId", "data-v-adcb6d0c"]]), _t = {
1889
+ }), ks = /* @__PURE__ */ E(Ml, [["__scopeId", "data-v-62db3fcc"]]), Dl = {
1122
1890
  class: "dm-breadcrumb",
1123
1891
  "aria-label": "Breadcrumb"
1124
- }, $t = { class: "dm-breadcrumb__list" }, yt = ["href", "onClick"], kt = ["aria-current"], pt = {
1892
+ }, Cl = { class: "dm-breadcrumb__list" }, Il = ["href", "onClick"], Bl = ["aria-current"], Tl = {
1125
1893
  key: 2,
1126
1894
  class: "dm-breadcrumb__separator",
1127
1895
  "aria-hidden": "true"
1128
- }, gt = /* @__PURE__ */ f({
1896
+ }, Ll = /* @__PURE__ */ S({
1129
1897
  __name: "DatametriaBreadcrumb",
1130
1898
  props: {
1131
1899
  items: {},
1132
1900
  separator: { default: "/" }
1133
1901
  },
1134
1902
  emits: ["click"],
1135
- setup(e, { emit: l }) {
1136
- const s = l, o = (r, d, n) => {
1137
- s("click", d, n);
1903
+ setup(e, { emit: r }) {
1904
+ const i = r, a = (l, n, d) => {
1905
+ i("click", n, d);
1138
1906
  };
1139
- return (r, d) => (a(), t("nav", _t, [
1140
- i("ol", $t, [
1141
- (a(!0), t(B, null, L(e.items, (n, u) => (a(), t("li", {
1907
+ return (l, n) => (t(), s("nav", Dl, [
1908
+ v("ol", Cl, [
1909
+ (t(!0), s(W, null, X(e.items, (d, u) => (t(), s("li", {
1142
1910
  key: u,
1143
1911
  class: "dm-breadcrumb__item"
1144
1912
  }, [
1145
- n.href && u < e.items.length - 1 ? (a(), t("a", {
1913
+ d.href && u < e.items.length - 1 ? (t(), s("a", {
1146
1914
  key: 0,
1147
- href: n.href,
1915
+ href: d.href,
1148
1916
  class: "dm-breadcrumb__link",
1149
- onClick: (b) => o(b, n, u)
1150
- }, m(n.label), 9, yt)) : (a(), t("span", {
1917
+ onClick: (m) => a(m, d, u)
1918
+ }, g(d.label), 9, Il)) : (t(), s("span", {
1151
1919
  key: 1,
1152
1920
  class: "dm-breadcrumb__current",
1153
1921
  "aria-current": u === e.items.length - 1 ? "page" : void 0
1154
- }, m(n.label), 9, kt)),
1155
- u < e.items.length - 1 ? (a(), t("span", pt, m(e.separator), 1)) : c("", !0)
1922
+ }, g(d.label), 9, Bl)),
1923
+ u < e.items.length - 1 ? (t(), s("span", Tl, g(e.separator), 1)) : h("", !0)
1156
1924
  ]))), 128))
1157
1925
  ])
1158
1926
  ]));
1159
1927
  }
1160
- }), dl = /* @__PURE__ */ _(gt, [["__scopeId", "data-v-17c32ee3"]]), Dt = { class: "dm-tabs" }, Vt = ["aria-label"], wt = ["id", "aria-selected", "aria-controls", "tabindex", "onClick", "onKeydown"], Ct = { class: "dm-tabs__panels" }, It = ["id", "aria-labelledby", "hidden"], Bt = /* @__PURE__ */ f({
1928
+ }), ys = /* @__PURE__ */ E(Ll, [["__scopeId", "data-v-17c32ee3"]]), Sl = { class: "dm-tabs" }, El = ["aria-label"], ql = ["id", "aria-selected", "aria-controls", "tabindex", "onClick", "onKeydown"], Rl = { class: "dm-tabs__panels" }, zl = ["id", "aria-labelledby", "hidden"], Fl = /* @__PURE__ */ S({
1161
1929
  __name: "DatametriaTabs",
1162
1930
  props: {
1163
1931
  tabs: {},
@@ -1165,241 +1933,683 @@ const Z = ["disabled", "type", "aria-busy", "aria-disabled"], ee = {
1165
1933
  ariaLabel: { default: "Tabs" }
1166
1934
  },
1167
1935
  emits: ["update:modelValue"],
1168
- setup(e, { emit: l }) {
1169
- const s = e, o = l, r = k(s.modelValue);
1170
- T(() => s.modelValue, (u) => {
1171
- r.value = u;
1936
+ setup(e, { emit: r }) {
1937
+ const i = e, a = r, l = V(i.modelValue);
1938
+ H(() => i.modelValue, (u) => {
1939
+ l.value = u;
1172
1940
  });
1173
- const d = (u) => {
1174
- r.value = u, o("update:modelValue", u);
1175
- }, n = (u, b) => {
1176
- var v;
1177
- let h = b;
1941
+ const n = (u) => {
1942
+ l.value = u, a("update:modelValue", u);
1943
+ }, d = (u, m) => {
1944
+ var k;
1945
+ let b = m;
1178
1946
  switch (u.key) {
1179
1947
  case "ArrowLeft":
1180
- u.preventDefault(), h = b > 0 ? b - 1 : s.tabs.length - 1;
1948
+ u.preventDefault(), b = m > 0 ? m - 1 : i.tabs.length - 1;
1181
1949
  break;
1182
1950
  case "ArrowRight":
1183
- u.preventDefault(), h = b < s.tabs.length - 1 ? b + 1 : 0;
1951
+ u.preventDefault(), b = m < i.tabs.length - 1 ? m + 1 : 0;
1184
1952
  break;
1185
1953
  case "Home":
1186
- u.preventDefault(), h = 0;
1954
+ u.preventDefault(), b = 0;
1187
1955
  break;
1188
1956
  case "End":
1189
- u.preventDefault(), h = s.tabs.length - 1;
1957
+ u.preventDefault(), b = i.tabs.length - 1;
1190
1958
  break;
1191
1959
  default:
1192
1960
  return;
1193
1961
  }
1194
- d(h), (v = document.getElementById(`tab-${h}`)) == null || v.focus();
1962
+ n(b), (k = document.getElementById(`tab-${b}`)) == null || k.focus();
1195
1963
  };
1196
- return (u, b) => (a(), t("div", Dt, [
1197
- i("div", {
1964
+ return (u, m) => (t(), s("div", Sl, [
1965
+ v("div", {
1198
1966
  class: "dm-tabs__header",
1199
1967
  role: "tablist",
1200
1968
  "aria-label": e.ariaLabel
1201
1969
  }, [
1202
- (a(!0), t(B, null, L(e.tabs, (h, v) => (a(), t("button", {
1203
- key: v,
1204
- id: `tab-${v}`,
1205
- class: y(["dm-tabs__tab", { "dm-tabs__tab--active": r.value === v }]),
1970
+ (t(!0), s(W, null, X(e.tabs, (b, k) => (t(), s("button", {
1971
+ key: k,
1972
+ id: `tab-${k}`,
1973
+ class: L(["dm-tabs__tab", { "dm-tabs__tab--active": l.value === k }]),
1206
1974
  role: "tab",
1207
- "aria-selected": r.value === v,
1208
- "aria-controls": `panel-${v}`,
1209
- tabindex: r.value === v ? 0 : -1,
1210
- onClick: (D) => d(v),
1211
- onKeydown: (D) => n(D, v)
1212
- }, m(h), 43, wt))), 128)),
1213
- i("div", {
1975
+ "aria-selected": l.value === k,
1976
+ "aria-controls": `panel-${k}`,
1977
+ tabindex: l.value === k ? 0 : -1,
1978
+ onClick: (D) => n(k),
1979
+ onKeydown: (D) => d(D, k)
1980
+ }, g(b), 43, ql))), 128)),
1981
+ v("div", {
1214
1982
  class: "dm-tabs__indicator",
1215
- style: A({ transform: `translateX(${r.value * 100}%)` })
1983
+ style: j({ transform: `translateX(${l.value * 100}%)` })
1216
1984
  }, null, 4)
1217
- ], 8, Vt),
1218
- i("div", Ct, [
1219
- (a(!0), t(B, null, L(e.tabs, (h, v) => (a(), t("div", {
1220
- key: v,
1221
- id: `panel-${v}`,
1222
- class: y(["dm-tabs__panel", { "dm-tabs__panel--active": r.value === v }]),
1985
+ ], 8, El),
1986
+ v("div", Rl, [
1987
+ (t(!0), s(W, null, X(e.tabs, (b, k) => (t(), s("div", {
1988
+ key: k,
1989
+ id: `panel-${k}`,
1990
+ class: L(["dm-tabs__panel", { "dm-tabs__panel--active": l.value === k }]),
1223
1991
  role: "tabpanel",
1224
- "aria-labelledby": `tab-${v}`,
1225
- hidden: r.value !== v
1992
+ "aria-labelledby": `tab-${k}`,
1993
+ hidden: l.value !== k
1226
1994
  }, [
1227
- p(u.$slots, `panel-${v}`, {}, void 0, !0)
1228
- ], 10, It))), 128))
1995
+ R(u.$slots, `panel-${k}`, {}, void 0, !0)
1996
+ ], 10, zl))), 128))
1229
1997
  ])
1230
1998
  ]));
1231
1999
  }
1232
- }), ol = /* @__PURE__ */ _(Bt, [["__scopeId", "data-v-6d59d320"]]);
1233
- let q = k(!1), F = !1;
1234
- function il() {
2000
+ }), $s = /* @__PURE__ */ E(Fl, [["__scopeId", "data-v-6d59d320"]]);
2001
+ let G = V(!1), ce = !1;
2002
+ function ws() {
1235
2003
  const e = () => {
1236
- q.value = !q.value, document.documentElement.classList.toggle("dark", q.value), localStorage.setItem("theme", q.value ? "dark" : "light");
1237
- }, l = (n) => {
1238
- q.value = n === "dark", document.documentElement.classList.toggle("dark", q.value), localStorage.setItem("theme", n);
1239
- }, s = () => {
1240
- F = !0;
1241
- const n = localStorage.getItem("theme");
1242
- if (n)
1243
- l(n);
2004
+ G.value = !G.value, document.documentElement.classList.toggle("dark", G.value), localStorage.setItem("theme", G.value ? "dark" : "light");
2005
+ }, r = (d) => {
2006
+ G.value = d === "dark", document.documentElement.classList.toggle("dark", G.value), localStorage.setItem("theme", d);
2007
+ }, i = () => {
2008
+ ce = !0;
2009
+ const d = localStorage.getItem("theme");
2010
+ if (d)
2011
+ r(d);
1244
2012
  else if (typeof window < "u" && window.matchMedia) {
1245
2013
  const u = window.matchMedia("(prefers-color-scheme: dark)").matches;
1246
- l(u ? "dark" : "light");
2014
+ r(u ? "dark" : "light");
1247
2015
  }
1248
2016
  typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change", (u) => {
1249
- localStorage.getItem("theme") || l(u.matches ? "dark" : "light");
2017
+ localStorage.getItem("theme") || r(u.matches ? "dark" : "light");
1250
2018
  });
1251
2019
  };
1252
- F || s();
1253
- const o = C(() => q.value ? "dark" : "light");
2020
+ ce || i();
2021
+ const a = T(() => G.value ? "dark" : "light");
1254
2022
  return {
1255
- isDark: q,
1256
- currentTheme: o,
2023
+ isDark: G,
2024
+ currentTheme: a,
1257
2025
  toggle: e,
1258
- setTheme: l,
1259
- setDark: () => l("dark"),
1260
- setLight: () => l("light"),
1261
- initTheme: s
2026
+ setTheme: r,
2027
+ setDark: () => r("dark"),
2028
+ setLight: () => r("light"),
2029
+ initTheme: i
1262
2030
  };
1263
2031
  }
1264
- const Lt = (e) => !!e, Mt = (e) => e ? /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e) : !0, qt = (e) => (l) => l ? l.length >= e : !0, Tt = (e) => (l) => l ? l.length <= e : !0, xt = (e) => (l) => l ? e.test(l) : !0, St = (e) => (l) => e(l);
1265
- function nl() {
2032
+ const Al = (e) => !!e, Ol = (e) => e ? /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e) : !0, Nl = (e) => (r) => r ? r.length >= e : !0, Pl = (e) => (r) => r ? r.length <= e : !0, Ul = (e) => (r) => r ? e.test(r) : !0, Wl = (e) => (r) => e(r);
2033
+ function xs() {
1266
2034
  return {
1267
- required: Lt,
1268
- email: Mt,
1269
- minLength: qt,
1270
- maxLength: Tt,
1271
- pattern: xt,
1272
- custom: St
2035
+ required: Al,
2036
+ email: Ol,
2037
+ minLength: Nl,
2038
+ maxLength: Pl,
2039
+ pattern: Ul,
2040
+ custom: Wl
1273
2041
  };
1274
2042
  }
1275
- function cl(e = {}) {
1276
- const l = k(!1), s = k(null), o = k(null), r = async (h, v = {}) => {
1277
- l.value = !0, s.value = null;
2043
+ function Vs(e = {}) {
2044
+ const r = V(!1), i = V(null), a = V(null), l = async (b, k = {}) => {
2045
+ r.value = !0, i.value = null;
1278
2046
  try {
1279
- const D = e.baseURL ? `${e.baseURL}${h}` : h, I = await fetch(D, {
1280
- ...v,
2047
+ const D = e.baseURL ? `${e.baseURL}${b}` : b, B = await fetch(D, {
2048
+ ...k,
1281
2049
  headers: {
1282
2050
  "Content-Type": "application/json",
1283
2051
  ...e.headers,
1284
- ...v.headers
2052
+ ...k.headers
1285
2053
  }
1286
2054
  });
1287
- if (!I.ok)
1288
- throw new Error(`HTTP ${I.status}: ${I.statusText}`);
1289
- const x = await I.json();
1290
- return o.value = x, x;
2055
+ if (!B.ok)
2056
+ throw new Error(`HTTP ${B.status}: ${B.statusText}`);
2057
+ const $ = await B.json();
2058
+ return a.value = $, $;
1291
2059
  } catch (D) {
1292
- throw s.value = D.message || "Request failed", D;
2060
+ throw i.value = D.message || "Request failed", D;
1293
2061
  } finally {
1294
- l.value = !1;
2062
+ r.value = !1;
1295
2063
  }
1296
2064
  };
1297
2065
  return {
1298
- loading: l,
1299
- error: s,
1300
- data: o,
1301
- get: (h, v) => r(h, { ...v, method: "GET" }),
1302
- post: (h, v, D) => r(h, {
2066
+ loading: r,
2067
+ error: i,
2068
+ data: a,
2069
+ get: (b, k) => l(b, { ...k, method: "GET" }),
2070
+ post: (b, k, D) => l(b, {
1303
2071
  ...D,
1304
2072
  method: "POST",
1305
- body: JSON.stringify(v)
2073
+ body: JSON.stringify(k)
1306
2074
  }),
1307
- put: (h, v, D) => r(h, {
2075
+ put: (b, k, D) => l(b, {
1308
2076
  ...D,
1309
2077
  method: "PUT",
1310
- body: JSON.stringify(v)
2078
+ body: JSON.stringify(k)
1311
2079
  }),
1312
- delete: (h, v) => r(h, { ...v, method: "DELETE" })
2080
+ delete: (b, k) => l(b, { ...k, method: "DELETE" })
2081
+ };
2082
+ }
2083
+ function Ms() {
2084
+ const e = V(1), r = "datametria-accessibility-scale", i = 0.8, a = 2, l = T(
2085
+ () => Math.max(i, Math.min(a, e.value))
2086
+ ), n = T(() => {
2087
+ const $ = l.value;
2088
+ return $ <= 0.9 ? "scale-small" : $ >= 1.1 ? "scale-large" : "scale-normal";
2089
+ }), d = ($) => {
2090
+ const C = Math.max(i, Math.min(a, $));
2091
+ document.documentElement.style.setProperty("--user-scale", C.toString()), e.value = C;
2092
+ }, u = ($) => {
2093
+ try {
2094
+ localStorage.setItem(r, $.toString());
2095
+ } catch (C) {
2096
+ console.warn("Failed to save accessibility scale:", C);
2097
+ }
2098
+ }, m = () => {
2099
+ try {
2100
+ const $ = localStorage.getItem(r);
2101
+ return $ ? parseFloat($) : 1;
2102
+ } catch ($) {
2103
+ return console.warn("Failed to load accessibility scale:", $), 1;
2104
+ }
2105
+ }, b = ($) => {
2106
+ d($), u(l.value);
2107
+ }, k = () => {
2108
+ b(e.value + 0.1);
2109
+ }, D = () => {
2110
+ b(e.value - 0.1);
2111
+ }, B = () => {
2112
+ b(1);
2113
+ };
2114
+ return H(e, ($) => {
2115
+ d($);
2116
+ }), J(() => {
2117
+ const $ = m();
2118
+ d($);
2119
+ }), {
2120
+ scale: l,
2121
+ scaleClass: n,
2122
+ setScale: b,
2123
+ increaseScale: k,
2124
+ decreaseScale: D,
2125
+ resetScale: B,
2126
+ minScale: i,
2127
+ maxScale: a
2128
+ };
2129
+ }
2130
+ const P = {
2131
+ xs: 475,
2132
+ sm: 640,
2133
+ md: 768,
2134
+ lg: 1024,
2135
+ xl: 1280,
2136
+ "2xl": 1536
2137
+ };
2138
+ function Ds() {
2139
+ const e = V(0), r = () => {
2140
+ e.value = window.innerWidth;
2141
+ }, i = (f) => e.value >= P[f], a = (f) => e.value <= P[f], l = (f, p) => e.value >= P[f] && e.value <= P[p], n = () => {
2142
+ const f = e.value;
2143
+ return f >= P["2xl"] ? "2xl" : f >= P.xl ? "xl" : f >= P.lg ? "lg" : f >= P.md ? "md" : f >= P.sm ? "sm" : "xs";
2144
+ }, d = () => e.value < P.sm, u = () => i("sm") && e.value < P.md, m = () => i("md") && e.value < P.lg, b = () => i("lg") && e.value < P.xl, k = () => i("xl") && e.value < P["2xl"], D = () => i("2xl"), B = () => e.value < P.md, $ = () => l("md", "lg"), C = () => i("lg");
2145
+ return J(() => {
2146
+ r(), window.addEventListener("resize", r);
2147
+ }), re(() => {
2148
+ window.removeEventListener("resize", r);
2149
+ }), {
2150
+ windowWidth: e,
2151
+ breakpoints: P,
2152
+ isGreaterOrEqual: i,
2153
+ isLessOrEqual: a,
2154
+ isBetween: l,
2155
+ getCurrentBreakpoint: n,
2156
+ isXs: d,
2157
+ isSm: u,
2158
+ isMd: m,
2159
+ isLg: b,
2160
+ isXl: k,
2161
+ is2xl: D,
2162
+ isMobile: B,
2163
+ isTablet: $,
2164
+ isDesktop: C
2165
+ };
2166
+ }
2167
+ function Cs(e = {}) {
2168
+ const {
2169
+ color: r = "rgba(255, 255, 255, 0.3)",
2170
+ duration: i = 600,
2171
+ disabled: a = !1
2172
+ } = e, l = V(), n = V([]), d = (f) => {
2173
+ if (a || !l.value) return;
2174
+ const p = l.value, w = p.getBoundingClientRect();
2175
+ let z, O;
2176
+ if (f instanceof MouseEvent)
2177
+ z = f.clientX, O = f.clientY;
2178
+ else {
2179
+ const M = f.touches[0] || f.changedTouches[0];
2180
+ z = M.clientX, O = M.clientY;
2181
+ }
2182
+ const U = z - w.left, K = O - w.top, x = Math.max(w.width, w.height), q = document.createElement("div");
2183
+ q.className = "datametria-ripple", q.style.cssText = `
2184
+ position: absolute;
2185
+ left: ${U - x / 2}px;
2186
+ top: ${K - x / 2}px;
2187
+ width: ${x}px;
2188
+ height: ${x}px;
2189
+ border-radius: 50%;
2190
+ background: ${r};
2191
+ transform: scale(0);
2192
+ animation: ripple-animation ${i / 1e3}s ease-out;
2193
+ pointer-events: none;
2194
+ z-index: 1;
2195
+ `, p.appendChild(q), setTimeout(() => {
2196
+ q.parentNode && q.parentNode.removeChild(q);
2197
+ }, i);
2198
+ }, u = (f) => {
2199
+ d(f);
2200
+ }, m = (f) => f ? (l.value = f, window.getComputedStyle(f).position === "static" && (f.style.position = "relative"), f.style.overflow = "hidden", f.addEventListener("click", u), () => {
2201
+ f.removeEventListener("click", u);
2202
+ }) : void 0, b = (f) => {
2203
+ const p = n.value.findIndex((w) => w.id === f);
2204
+ p > -1 && n.value.splice(p, 1);
2205
+ }, k = () => {
2206
+ n.value = [];
2207
+ };
2208
+ re(() => {
2209
+ k();
2210
+ });
2211
+ const D = (f) => ({
2212
+ position: "absolute",
2213
+ left: `${f.x}px`,
2214
+ top: `${f.y}px`,
2215
+ width: `${f.size}px`,
2216
+ height: `${f.size}px`,
2217
+ borderRadius: "50%",
2218
+ backgroundColor: r,
2219
+ transform: "scale(0)",
2220
+ animation: `ripple-animation ${i}ms ease-out`,
2221
+ pointerEvents: "none",
2222
+ zIndex: 1
2223
+ }), B = () => {
2224
+ const f = "ripple-keyframes";
2225
+ if (document.getElementById(f)) return;
2226
+ const p = document.createElement("style");
2227
+ p.id = f, p.textContent = `
2228
+ @keyframes ripple-animation {
2229
+ 0% {
2230
+ transform: scale(0);
2231
+ opacity: 1;
2232
+ }
2233
+ 100% {
2234
+ transform: scale(2);
2235
+ opacity: 0;
2236
+ }
2237
+ }
2238
+
2239
+ @media (prefers-reduced-motion: reduce) {
2240
+ @keyframes ripple-animation {
2241
+ 0%, 100% {
2242
+ transform: scale(0);
2243
+ opacity: 0;
2244
+ }
2245
+ }
2246
+ }
2247
+ `, document.head.appendChild(p);
2248
+ }, $ = () => {
2249
+ if (l.value)
2250
+ return m(l.value);
2251
+ }, C = () => {
2252
+ l.value && l.value.removeEventListener("click", u);
2253
+ };
2254
+ return J(() => {
2255
+ B(), l.value && $();
2256
+ }), H(l, (f) => {
2257
+ f && $();
2258
+ }), {
2259
+ rippleRef: l,
2260
+ ripples: n,
2261
+ applyRipple: m,
2262
+ removeRipple: b,
2263
+ clearRipples: k,
2264
+ getRippleStyle: D,
2265
+ createRipple: d,
2266
+ addRippleEffect: $,
2267
+ removeRippleEffect: C
2268
+ };
2269
+ }
2270
+ function Is(e = {}) {
2271
+ const {
2272
+ enabled: r = !0,
2273
+ fallbackToVisual: i = !0,
2274
+ visualDuration: a = 150
2275
+ } = e, l = V(!1), n = V(r), d = V(null), u = () => !!("hapticFeedback" in navigator && navigator.hapticFeedback || "vibrate" in navigator && typeof navigator.vibrate == "function"), m = (o) => {
2276
+ if (!("vibrate" in navigator) || typeof navigator.vibrate != "function") return !1;
2277
+ try {
2278
+ return navigator.vibrate(o);
2279
+ } catch (c) {
2280
+ return console.warn("Haptic feedback failed:", c), !1;
2281
+ }
2282
+ }, b = (o, c) => {
2283
+ if (!i) return;
2284
+ const y = `visual-${Date.now()}`;
2285
+ if (d.value = y, c) {
2286
+ const _ = c.style.transform, I = c.style.transition;
2287
+ switch (c.style.transition = "transform 75ms ease-out", o) {
2288
+ case "light":
2289
+ c.style.transform = "scale(0.98)";
2290
+ break;
2291
+ case "medium":
2292
+ c.style.transform = "scale(0.95)";
2293
+ break;
2294
+ case "heavy":
2295
+ c.style.transform = "scale(0.92)";
2296
+ break;
2297
+ case "selection":
2298
+ c.style.transform = "scale(1.02)";
2299
+ break;
2300
+ default:
2301
+ c.style.transform = "scale(0.97)";
2302
+ }
2303
+ setTimeout(() => {
2304
+ c.style.transform = _, setTimeout(() => {
2305
+ c.style.transition = I, d.value === y && (d.value = null);
2306
+ }, 75);
2307
+ }, 75);
2308
+ }
2309
+ setTimeout(() => {
2310
+ d.value === y && (d.value = null);
2311
+ }, a);
2312
+ }, k = (o) => {
2313
+ if (!n.value) return;
2314
+ let c = !1;
2315
+ l.value && (c = m(10)), !c && i && b("light", o);
2316
+ }, D = (o) => {
2317
+ if (!n.value) return;
2318
+ let c = !1;
2319
+ l.value && (c = m(20)), !c && i && b("medium", o);
2320
+ }, B = (o) => {
2321
+ if (!n.value) return;
2322
+ let c = !1;
2323
+ l.value && (c = m(40)), !c && i && b("heavy", o);
2324
+ }, $ = (o) => {
2325
+ if (!n.value) return;
2326
+ let c = !1;
2327
+ l.value && (c = m(5)), !c && i && b("selection", o);
2328
+ }, C = (o = "medium", c) => {
2329
+ switch (o) {
2330
+ case "light":
2331
+ k(c);
2332
+ break;
2333
+ case "medium":
2334
+ D(c);
2335
+ break;
2336
+ case "heavy":
2337
+ B(c);
2338
+ break;
2339
+ }
2340
+ }, f = (o, c) => {
2341
+ if (!n.value) return;
2342
+ let y;
2343
+ switch (o) {
2344
+ case "success":
2345
+ y = [10, 50, 10];
2346
+ break;
2347
+ case "warning":
2348
+ y = [20, 100, 20, 100, 20];
2349
+ break;
2350
+ case "error":
2351
+ y = [50, 100, 50, 100, 50];
2352
+ break;
2353
+ }
2354
+ let _ = !1;
2355
+ l.value && (_ = m(y)), !_ && i && b("notification", c);
2356
+ }, p = (o, c) => {
2357
+ if (!n.value) return;
2358
+ let y = !1;
2359
+ l.value && (y = m(o)), !y && i && b("medium", c);
2360
+ }, w = () => {
2361
+ n.value = !0;
2362
+ }, z = () => {
2363
+ n.value = !1;
2364
+ }, O = () => {
2365
+ n.value = !n.value;
2366
+ }, U = T(() => l.value && n.value), K = T(() => d.value !== null), x = (o = "light") => {
2367
+ if (!n.value) return !1;
2368
+ if ("hapticFeedback" in navigator && navigator.hapticFeedback)
2369
+ try {
2370
+ return navigator.hapticFeedback.impact(o);
2371
+ } catch (c) {
2372
+ console.warn("Haptic feedback failed:", c);
2373
+ }
2374
+ if ("vibrate" in navigator && typeof navigator.vibrate == "function") {
2375
+ let c;
2376
+ switch (o) {
2377
+ case "light":
2378
+ c = 10;
2379
+ break;
2380
+ case "medium":
2381
+ c = 20;
2382
+ break;
2383
+ case "heavy":
2384
+ c = 30;
2385
+ break;
2386
+ case "success":
2387
+ c = [10, 50, 10];
2388
+ break;
2389
+ case "warning":
2390
+ c = [20, 100, 20];
2391
+ break;
2392
+ case "error":
2393
+ c = [50, 100, 50, 100, 50];
2394
+ break;
2395
+ default:
2396
+ c = 10;
2397
+ }
2398
+ try {
2399
+ return navigator.vibrate(c);
2400
+ } catch (y) {
2401
+ return console.warn("Vibration failed:", y), !1;
2402
+ }
2403
+ }
2404
+ return !1;
2405
+ }, q = () => {
2406
+ const o = "haptic-keyframes";
2407
+ if (document.getElementById(o)) return;
2408
+ const c = document.createElement("style");
2409
+ c.id = o, c.textContent = `
2410
+ @keyframes haptic-pulse-light {
2411
+ 0% { transform: scale(1); }
2412
+ 50% { transform: scale(0.98); }
2413
+ 100% { transform: scale(1); }
2414
+ }
2415
+
2416
+ @keyframes haptic-pulse-medium {
2417
+ 0% { transform: scale(1); }
2418
+ 50% { transform: scale(0.95); }
2419
+ 100% { transform: scale(1); }
2420
+ }
2421
+
2422
+ @keyframes haptic-pulse-heavy {
2423
+ 0% { transform: scale(1); }
2424
+ 50% { transform: scale(0.92); }
2425
+ 100% { transform: scale(1); }
2426
+ }
2427
+
2428
+ @keyframes haptic-success {
2429
+ 0% { transform: scale(1); filter: brightness(1); }
2430
+ 50% { transform: scale(1.02); filter: brightness(1.1); }
2431
+ 100% { transform: scale(1); filter: brightness(1); }
2432
+ }
2433
+
2434
+ @keyframes haptic-error {
2435
+ 0% { transform: translateX(0); }
2436
+ 25% { transform: translateX(-2px); }
2437
+ 75% { transform: translateX(2px); }
2438
+ 100% { transform: translateX(0); }
2439
+ }
2440
+
2441
+ @media (prefers-reduced-motion: reduce) {
2442
+ @keyframes haptic-pulse-light,
2443
+ @keyframes haptic-pulse-medium,
2444
+ @keyframes haptic-pulse-heavy,
2445
+ @keyframes haptic-success,
2446
+ @keyframes haptic-error {
2447
+ 0%, 100% { transform: none; filter: none; }
2448
+ }
2449
+ }
2450
+ `, document.head.appendChild(c);
2451
+ }, M = (o, c) => {
2452
+ if (!o) return;
2453
+ q();
2454
+ const y = o.style.animation;
2455
+ let _, I;
2456
+ switch (c) {
2457
+ case "light":
2458
+ _ = "haptic-pulse-light 0.15s ease-out", I = 150;
2459
+ break;
2460
+ case "medium":
2461
+ _ = "haptic-pulse-medium 0.2s ease-out", I = 200;
2462
+ break;
2463
+ case "heavy":
2464
+ _ = "haptic-pulse-heavy 0.25s ease-out", I = 250;
2465
+ break;
2466
+ case "success":
2467
+ _ = "haptic-success 0.3s ease-out", I = 300;
2468
+ break;
2469
+ case "warning":
2470
+ _ = "haptic-pulse-medium 0.2s ease-out", I = 200;
2471
+ break;
2472
+ case "error":
2473
+ _ = "haptic-error 0.4s ease-out", I = 400;
2474
+ break;
2475
+ default:
2476
+ _ = "haptic-pulse-light 0.15s ease-out", I = 150;
2477
+ }
2478
+ o.style.animation = _, setTimeout(() => {
2479
+ o.style.animation = y;
2480
+ }, I);
2481
+ }, F = (o, c) => {
2482
+ const y = x(c);
2483
+ return M(o, c), y;
2484
+ }, A = () => {
2485
+ const o = u();
2486
+ return l.value = o, o;
2487
+ };
2488
+ return A(), {
2489
+ // Estado
2490
+ isSupported: l,
2491
+ isEnabled: n,
2492
+ canVibrate: U,
2493
+ hasVisualFeedback: K,
2494
+ activeVisualFeedback: d,
2495
+ // Métodos principais (compatíveis com testes)
2496
+ triggerHaptic: x,
2497
+ triggerVisualFeedback: M,
2498
+ feedback: F,
2499
+ checkSupport: A,
2500
+ // Métodos de feedback específicos
2501
+ light: k,
2502
+ medium: D,
2503
+ heavy: B,
2504
+ selection: $,
2505
+ impact: C,
2506
+ notification: f,
2507
+ custom: p,
2508
+ // Controles
2509
+ enable: w,
2510
+ disable: z,
2511
+ toggle: O,
2512
+ // Utilitários
2513
+ detectHapticSupport: u
1313
2514
  };
1314
2515
  }
1315
- function ul(e, l) {
1316
- const s = localStorage.getItem(e);
1317
- let o = l;
1318
- if (s)
2516
+ function Bs(e, r) {
2517
+ const i = localStorage.getItem(e);
2518
+ let a = r;
2519
+ if (i)
1319
2520
  try {
1320
- o = JSON.parse(s);
2521
+ a = JSON.parse(i);
1321
2522
  } catch {
1322
- o = l;
2523
+ a = r;
1323
2524
  }
1324
- const r = k(o);
1325
- return T(
1326
- r,
1327
- (d) => {
1328
- localStorage.setItem(e, JSON.stringify(d));
2525
+ const l = V(a);
2526
+ return H(
2527
+ l,
2528
+ (n) => {
2529
+ localStorage.setItem(e, JSON.stringify(n));
1329
2530
  },
1330
2531
  { deep: !0 }
1331
- ), r;
2532
+ ), l;
1332
2533
  }
1333
- function ml(e, l = 300) {
1334
- const s = k(e.value);
1335
- let o = null;
1336
- return T(e, (r) => {
1337
- o && clearTimeout(o), o = setTimeout(() => {
1338
- s.value = r;
1339
- }, l);
1340
- }), s;
2534
+ function Ts(e, r = 300) {
2535
+ const i = V(e.value);
2536
+ let a = null;
2537
+ return H(e, (l) => {
2538
+ a && clearTimeout(a), a = setTimeout(() => {
2539
+ i.value = l;
2540
+ }, r);
2541
+ }), i;
1341
2542
  }
1342
- function bl() {
1343
- const e = k(!1), l = k(null);
2543
+ function Ls() {
2544
+ const e = V(!1), r = V(null);
1344
2545
  return {
1345
2546
  copied: e,
1346
- error: l,
1347
- copy: async (r) => {
2547
+ error: r,
2548
+ copy: async (l) => {
1348
2549
  try {
1349
- return await navigator.clipboard.writeText(r), e.value = !0, l.value = null, setTimeout(() => {
2550
+ return await navigator.clipboard.writeText(l), e.value = !0, r.value = null, setTimeout(() => {
1350
2551
  e.value = !1;
1351
2552
  }, 2e3), !0;
1352
- } catch (d) {
1353
- return l.value = d.message || "Copy failed", e.value = !1, !1;
2553
+ } catch (n) {
2554
+ return r.value = n.message || "Copy failed", e.value = !1, !1;
1354
2555
  }
1355
2556
  },
1356
2557
  read: async () => {
1357
2558
  try {
1358
- const r = await navigator.clipboard.readText();
1359
- return l.value = null, r;
1360
- } catch (r) {
1361
- return l.value = r.message || "Read failed", "";
2559
+ const l = await navigator.clipboard.readText();
2560
+ return r.value = null, l;
2561
+ } catch (l) {
2562
+ return r.value = l.message || "Read failed", "";
1362
2563
  }
1363
2564
  }
1364
2565
  };
1365
2566
  }
1366
2567
  export {
1367
- Qt as DatametriaAlert,
1368
- jt as DatametriaAutocomplete,
1369
- tl as DatametriaAvatar,
1370
- ll as DatametriaBadge,
1371
- dl as DatametriaBreadcrumb,
1372
- Et as DatametriaButton,
1373
- Gt as DatametriaCard,
1374
- Nt as DatametriaCheckbox,
1375
- sl as DatametriaChip,
1376
- Jt as DatametriaContainer,
1377
- Pt as DatametriaDatePicker,
1378
- Yt as DatametriaDivider,
1379
- Kt as DatametriaFileUpload,
1380
- Wt as DatametriaGrid,
1381
- At as DatametriaInput,
1382
- Ht as DatametriaModal,
1383
- rl as DatametriaNavbar,
1384
- Zt as DatametriaProgress,
1385
- Rt as DatametriaRadio,
1386
- Ot as DatametriaSelect,
1387
- el as DatametriaSpinner,
1388
- Ut as DatametriaSwitch,
1389
- al as DatametriaTable,
1390
- ol as DatametriaTabs,
1391
- Ft as DatametriaTextarea,
1392
- Xt as DatametriaToast,
1393
- St as custom,
1394
- Mt as email,
1395
- Tt as maxLength,
1396
- qt as minLength,
1397
- xt as pattern,
1398
- Lt as required,
1399
- cl as useAPI,
1400
- bl as useClipboard,
1401
- ml as useDebounce,
1402
- ul as useLocalStorage,
1403
- il as useTheme,
1404
- nl as useValidation
2568
+ ds as DatametriaAlert,
2569
+ ls as DatametriaAutocomplete,
2570
+ bs as DatametriaAvatar,
2571
+ ps as DatametriaBadge,
2572
+ ys as DatametriaBreadcrumb,
2573
+ Xl as DatametriaButton,
2574
+ ss as DatametriaCard,
2575
+ Gl as DatametriaCheckbox,
2576
+ gs as DatametriaChip,
2577
+ is as DatametriaContainer,
2578
+ Zl as DatametriaDatePicker,
2579
+ os as DatametriaDivider,
2580
+ ts as DatametriaFileUpload,
2581
+ ns as DatametriaGrid,
2582
+ jl as DatametriaInput,
2583
+ ks as DatametriaMenu,
2584
+ rs as DatametriaModal,
2585
+ _s as DatametriaNavbar,
2586
+ vs as DatametriaProgress,
2587
+ Yl as DatametriaRadio,
2588
+ Hl as DatametriaSelect,
2589
+ ms as DatametriaSkeleton,
2590
+ as as DatametriaSlider,
2591
+ hs as DatametriaSpinner,
2592
+ Jl as DatametriaSwitch,
2593
+ fs as DatametriaTable,
2594
+ $s as DatametriaTabs,
2595
+ Ql as DatametriaTextarea,
2596
+ es as DatametriaTimePicker,
2597
+ cs as DatametriaToast,
2598
+ us as DatametriaTooltip,
2599
+ Wl as custom,
2600
+ Ol as email,
2601
+ Pl as maxLength,
2602
+ Nl as minLength,
2603
+ Ul as pattern,
2604
+ Al as required,
2605
+ Vs as useAPI,
2606
+ Ms as useAccessibilityScale,
2607
+ Ds as useBreakpoints,
2608
+ Ls as useClipboard,
2609
+ Ts as useDebounce,
2610
+ Is as useHapticFeedback,
2611
+ Bs as useLocalStorage,
2612
+ Cs as useRipple,
2613
+ ws as useTheme,
2614
+ xs as useValidation
1405
2615
  };