@datametria/vue-components 1.2.0 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +548 -657
- package/dist/index.es.js +2353 -1364
- package/dist/index.umd.js +10 -10
- package/dist/vue-components.css +1 -1
- package/package.json +102 -98
- package/src/components/DatametriaAlert.vue +137 -137
- package/src/components/DatametriaAutocomplete.vue +184 -138
- package/src/components/DatametriaAvatar.vue +177 -33
- package/src/components/DatametriaBadge.vue +98 -98
- package/src/components/DatametriaBreadcrumb.vue +21 -21
- package/src/components/DatametriaButton.vue +177 -165
- package/src/components/DatametriaCard.vue +12 -12
- package/src/components/DatametriaCheckbox.vue +8 -8
- package/src/components/DatametriaChip.vue +145 -149
- package/src/components/DatametriaContainer.vue +4 -4
- package/src/components/DatametriaDatePicker.vue +686 -68
- package/src/components/DatametriaDivider.vue +13 -13
- package/src/components/DatametriaFileUpload.vue +272 -140
- package/src/components/DatametriaGrid.vue +3 -3
- package/src/components/DatametriaInput.vue +15 -15
- package/src/components/DatametriaMenu.vue +604 -619
- package/src/components/DatametriaModal.vue +16 -16
- package/src/components/DatametriaNavbar.vue +230 -252
- package/src/components/DatametriaPasswordInput.vue +430 -0
- package/src/components/DatametriaProgress.vue +18 -18
- package/src/components/DatametriaRadio.vue +20 -20
- package/src/components/DatametriaSelect.vue +15 -15
- package/src/components/DatametriaSkeleton.vue +243 -239
- package/src/components/DatametriaSlider.vue +395 -407
- package/src/components/DatametriaSortableTable.vue +585 -0
- package/src/components/DatametriaSpinner.vue +7 -7
- package/src/components/DatametriaSwitch.vue +16 -16
- package/src/components/DatametriaTable.vue +14 -14
- package/src/components/DatametriaTextarea.vue +28 -28
- package/src/components/DatametriaTimePicker.vue +285 -285
- package/src/components/DatametriaToast.vue +176 -176
- package/src/components/DatametriaTooltip.vue +408 -408
- package/src/components/__tests__/DatametriaAlert.test.js +35 -35
- package/src/components/__tests__/DatametriaAlert.test.ts +190 -0
- package/src/components/__tests__/DatametriaAutocomplete.test.ts +180 -0
- package/src/components/__tests__/DatametriaAvatar.test.ts +152 -0
- package/src/components/__tests__/DatametriaBadge.test.js +29 -29
- package/src/components/__tests__/DatametriaBadge.test.ts +167 -0
- package/src/components/__tests__/DatametriaBreadcrumb.test.ts +75 -0
- package/src/components/__tests__/DatametriaButton.test.js +30 -30
- package/src/components/__tests__/DatametriaButton.test.ts +283 -0
- package/src/components/__tests__/DatametriaCard.test.ts +201 -0
- package/src/components/__tests__/DatametriaCheckbox.test.ts +47 -0
- package/src/components/__tests__/DatametriaChip.test.js +38 -38
- package/src/components/__tests__/DatametriaContainer.test.ts +52 -0
- package/src/components/__tests__/DatametriaDatePicker.test.ts +234 -0
- package/src/components/__tests__/DatametriaDivider.test.ts +54 -0
- package/src/components/__tests__/DatametriaFileUpload.test.ts +291 -0
- package/src/components/__tests__/DatametriaGrid.test.ts +31 -0
- package/src/components/__tests__/DatametriaInput.test.ts +72 -0
- package/src/components/__tests__/DatametriaMenu.test.ts +366 -0
- package/src/components/__tests__/DatametriaModal.test.ts +86 -0
- package/src/components/__tests__/DatametriaNavbar.test.js +48 -48
- package/src/components/__tests__/DatametriaNavbar.test.ts +203 -0
- package/src/components/__tests__/DatametriaPasswordInput.test.js +305 -0
- package/src/components/__tests__/DatametriaProgress.test.ts +90 -0
- package/src/components/__tests__/DatametriaRadio.test.ts +77 -0
- package/src/components/__tests__/DatametriaSelect.test.ts +77 -0
- package/src/components/__tests__/DatametriaSlider.test.ts +261 -0
- package/src/components/__tests__/DatametriaSortableTable.test.js +168 -0
- package/src/components/__tests__/DatametriaSpinner.test.ts +156 -0
- package/src/components/__tests__/DatametriaSwitch.test.ts +64 -0
- package/src/components/__tests__/DatametriaTable.test.ts +97 -0
- package/src/components/__tests__/DatametriaTextarea.test.ts +66 -0
- package/src/components/__tests__/DatametriaToast.test.js +48 -48
- package/src/components/__tests__/DatametriaToast.test.ts +99 -0
- package/src/composables/useAccessibilityScale.ts +94 -94
- package/src/composables/useBreakpoints.ts +82 -82
- package/src/composables/useHapticFeedback.ts +439 -439
- package/src/composables/useRipple.ts +218 -218
- package/src/index.ts +68 -61
- package/src/stories/Variants.stories.js +95 -95
- package/src/styles/design-tokens.css +623 -623
- package/src/theme/ThemeProvider.vue +96 -0
- package/src/theme/__tests__/ThemeProvider.test.ts +208 -0
- package/src/theme/__tests__/constants.test.ts +31 -0
- package/src/theme/__tests__/presets.test.ts +166 -0
- package/src/theme/__tests__/tokens.test.ts +155 -0
- package/src/theme/__tests__/types.test.ts +153 -0
- package/src/theme/__tests__/useTheme.test.ts +146 -0
- package/src/theme/constants.ts +14 -0
- package/src/theme/index.ts +12 -0
- package/src/theme/presets/datametria.ts +94 -0
- package/src/theme/presets/default.ts +94 -0
- package/src/theme/presets/index.ts +8 -0
- package/src/theme/tokens/colors.ts +28 -0
- package/src/theme/tokens/index.ts +47 -0
- package/src/theme/tokens/spacing.ts +21 -0
- package/src/theme/tokens/typography.ts +35 -0
- package/src/theme/types.ts +111 -0
- package/src/theme/useTheme.ts +28 -0
- package/src/types/index.ts +19 -0
package/dist/index.es.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
var
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as N, computed as D, createElementBlock as s, openBlock as l, normalizeClass as R, createCommentVNode as b, renderSlot as Y, createElementVNode as c, createTextVNode as U, toDisplayString as g, ref as S, watch as Q, normalizeStyle as G, Fragment as K, renderList as X, withDirectives as se, vModelText as oe, onMounted as te, onUnmounted as de, withModifiers as ie, nextTick as le, createBlock as ne, Teleport as ce, createVNode as ue, Transition as me, withCtx as ve, createStaticVNode as De, withKeys as he, vModelSelect as Ve, resolveDynamicComponent as Ce, provide as Me, inject as Se } from "vue";
|
|
2
|
+
var be = /* @__PURE__ */ ((e) => (e.PRIMARY = "primary", e.SECONDARY = "secondary", e.OUTLINE = "outline", e.GHOST = "ghost", e))(be || {}), ge = /* @__PURE__ */ ((e) => (e.SM = "sm", e.MD = "md", e.LG = "lg", e))(ge || {});
|
|
3
|
+
const Te = ["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
|
-
},
|
|
8
|
+
}, Ie = /* @__PURE__ */ N({
|
|
9
9
|
__name: "DatametriaButton",
|
|
10
10
|
props: {
|
|
11
|
-
variant: { default:
|
|
12
|
-
size: { default:
|
|
11
|
+
variant: { default: be.PRIMARY },
|
|
12
|
+
size: { default: ge.MD },
|
|
13
13
|
disabled: { type: Boolean, default: !1 },
|
|
14
14
|
loading: { type: Boolean, default: !1 },
|
|
15
15
|
fullWidth: { type: Boolean, default: !1 },
|
|
@@ -19,10 +19,10 @@ const he = ["disabled", "type", "aria-busy", "aria-disabled"], be = {
|
|
|
19
19
|
setup(e) {
|
|
20
20
|
const i = e;
|
|
21
21
|
if (process.env.NODE_ENV === "development") {
|
|
22
|
-
const
|
|
23
|
-
|
|
22
|
+
const t = Object.values(be);
|
|
23
|
+
t.includes(i.variant) || console.warn(`[DatametriaButton] Invalid variant "${i.variant}". Valid options: ${t.join(", ")}`);
|
|
24
24
|
}
|
|
25
|
-
const
|
|
25
|
+
const a = D(() => [
|
|
26
26
|
"datametria-button",
|
|
27
27
|
`datametria-button--${i.variant}`,
|
|
28
28
|
`datametria-button--${i.size}`,
|
|
@@ -32,30 +32,30 @@ const he = ["disabled", "type", "aria-busy", "aria-disabled"], be = {
|
|
|
32
32
|
"datametria-button--disabled": i.disabled
|
|
33
33
|
}
|
|
34
34
|
]);
|
|
35
|
-
return (
|
|
36
|
-
class:
|
|
35
|
+
return (t, n) => (l(), s("button", {
|
|
36
|
+
class: R(a.value),
|
|
37
37
|
disabled: e.disabled || e.loading,
|
|
38
38
|
type: e.type,
|
|
39
39
|
"aria-busy": e.loading,
|
|
40
40
|
"aria-disabled": e.disabled,
|
|
41
|
-
onClick:
|
|
41
|
+
onClick: n[0] || (n[0] = (r) => t.$emit("click", r))
|
|
42
42
|
}, [
|
|
43
|
-
e.loading ? (
|
|
44
|
-
|
|
45
|
-
], 10,
|
|
43
|
+
e.loading ? (l(), s("span", Be)) : b("", !0),
|
|
44
|
+
Y(t.$slots, "default", {}, void 0, !0)
|
|
45
|
+
], 10, Te));
|
|
46
46
|
}
|
|
47
|
-
}),
|
|
48
|
-
const
|
|
49
|
-
for (const [
|
|
50
|
-
|
|
51
|
-
return
|
|
52
|
-
},
|
|
47
|
+
}), P = (e, i) => {
|
|
48
|
+
const a = e.__vccOpts || e;
|
|
49
|
+
for (const [t, n] of i)
|
|
50
|
+
a[t] = n;
|
|
51
|
+
return a;
|
|
52
|
+
}, Dr = /* @__PURE__ */ P(Ie, [["__scopeId", "data-v-920bfc9a"]]), Ee = { class: "datametria-input" }, Le = ["for"], Fe = {
|
|
53
53
|
key: 0,
|
|
54
54
|
class: "datametria-input__required"
|
|
55
|
-
},
|
|
55
|
+
}, Oe = ["id", "value", "placeholder", "disabled", "required"], Re = {
|
|
56
56
|
key: 1,
|
|
57
57
|
class: "datametria-input__error"
|
|
58
|
-
},
|
|
58
|
+
}, qe = /* @__PURE__ */ N({
|
|
59
59
|
__name: "DatametriaInput",
|
|
60
60
|
props: {
|
|
61
61
|
modelValue: { default: "" },
|
|
@@ -67,45 +67,255 @@ const he = ["disabled", "type", "aria-busy", "aria-disabled"], be = {
|
|
|
67
67
|
},
|
|
68
68
|
emits: ["update:modelValue"],
|
|
69
69
|
setup(e) {
|
|
70
|
-
const i = e,
|
|
70
|
+
const i = e, a = D(() => `input-${Math.random().toString(36).substr(2, 9)}`), t = D(() => [
|
|
71
71
|
"datametria-input__field",
|
|
72
72
|
{
|
|
73
73
|
"datametria-input__field--error": i.errorMessage,
|
|
74
74
|
"datametria-input__field--disabled": i.disabled
|
|
75
75
|
}
|
|
76
76
|
]);
|
|
77
|
-
return (
|
|
78
|
-
e.label ? (
|
|
77
|
+
return (n, r) => (l(), s("div", Ee, [
|
|
78
|
+
e.label ? (l(), s("label", {
|
|
79
79
|
key: 0,
|
|
80
|
-
for:
|
|
80
|
+
for: a.value,
|
|
81
81
|
class: "datametria-input__label"
|
|
82
82
|
}, [
|
|
83
|
-
|
|
84
|
-
e.required ? (
|
|
85
|
-
], 8,
|
|
86
|
-
|
|
87
|
-
id:
|
|
83
|
+
U(g(e.label) + " ", 1),
|
|
84
|
+
e.required ? (l(), s("span", Fe, "*")) : b("", !0)
|
|
85
|
+
], 8, Le)) : b("", !0),
|
|
86
|
+
c("input", {
|
|
87
|
+
id: a.value,
|
|
88
88
|
value: e.modelValue,
|
|
89
89
|
placeholder: e.placeholder,
|
|
90
90
|
disabled: e.disabled,
|
|
91
91
|
required: e.required,
|
|
92
|
-
class:
|
|
93
|
-
onInput: r[0] || (r[0] = (o) =>
|
|
94
|
-
}, null, 42,
|
|
95
|
-
e.errorMessage ? (
|
|
92
|
+
class: R(t.value),
|
|
93
|
+
onInput: r[0] || (r[0] = (o) => n.$emit("update:modelValue", o.target.value))
|
|
94
|
+
}, null, 42, Oe),
|
|
95
|
+
e.errorMessage ? (l(), s("p", Re, g(e.errorMessage), 1)) : b("", !0)
|
|
96
96
|
]));
|
|
97
97
|
}
|
|
98
|
-
}),
|
|
98
|
+
}), Vr = /* @__PURE__ */ P(qe, [["__scopeId", "data-v-f9fcf63b"]]), ze = { class: "datametria-password-input" }, Ae = ["for"], Ne = {
|
|
99
|
+
key: 0,
|
|
100
|
+
class: "datametria-password-input__required"
|
|
101
|
+
}, Pe = { class: "datametria-password-input__wrapper" }, je = ["id", "value", "type", "placeholder", "disabled", "required", "autocomplete", "aria-invalid", "aria-describedby"], Ye = ["aria-label"], Ue = {
|
|
102
|
+
key: 0,
|
|
103
|
+
class: "datametria-password-input__icon",
|
|
104
|
+
fill: "none",
|
|
105
|
+
viewBox: "0 0 24 24",
|
|
106
|
+
stroke: "currentColor"
|
|
107
|
+
}, We = {
|
|
108
|
+
key: 1,
|
|
109
|
+
class: "datametria-password-input__icon",
|
|
110
|
+
fill: "none",
|
|
111
|
+
viewBox: "0 0 24 24",
|
|
112
|
+
stroke: "currentColor"
|
|
113
|
+
}, He = {
|
|
114
|
+
key: 1,
|
|
115
|
+
class: "datametria-password-input__warning"
|
|
116
|
+
}, Ke = {
|
|
117
|
+
key: 2,
|
|
118
|
+
class: "datametria-password-input__strength"
|
|
119
|
+
}, Xe = { class: "datametria-password-input__strength-bar" }, Ge = ["id"], Je = { class: "datametria-password-input__requirements-list" }, Qe = { class: "datametria-password-input__check" }, Ze = { class: "datametria-password-input__check" }, ea = { class: "datametria-password-input__check" }, aa = { class: "datametria-password-input__check" }, ta = { class: "datametria-password-input__check" }, la = ["id"], sa = ["id"], ra = /* @__PURE__ */ N({
|
|
120
|
+
__name: "DatametriaPasswordInput",
|
|
121
|
+
props: {
|
|
122
|
+
modelValue: { default: "" },
|
|
123
|
+
label: {},
|
|
124
|
+
placeholder: {},
|
|
125
|
+
errorMessage: {},
|
|
126
|
+
helpText: {},
|
|
127
|
+
disabled: { type: Boolean, default: !1 },
|
|
128
|
+
required: { type: Boolean, default: !1 },
|
|
129
|
+
minLength: { default: 8 },
|
|
130
|
+
showStrength: { type: Boolean, default: !0 },
|
|
131
|
+
showRequirements: { type: Boolean, default: !0 },
|
|
132
|
+
autocomplete: { default: "current-password" }
|
|
133
|
+
},
|
|
134
|
+
emits: ["update:modelValue", "strength-change"],
|
|
135
|
+
setup(e, { emit: i }) {
|
|
136
|
+
const a = e, t = i, n = D(() => `password-${Math.random().toString(36).substr(2, 9)}`), r = S(!1), o = S(!1), d = S(!1), u = D(() => ({
|
|
137
|
+
minLength: a.modelValue.length >= a.minLength,
|
|
138
|
+
hasUppercase: /[A-Z]/.test(a.modelValue),
|
|
139
|
+
hasLowercase: /[a-z]/.test(a.modelValue),
|
|
140
|
+
hasNumber: /\d/.test(a.modelValue),
|
|
141
|
+
hasSpecial: /[!@#$%^&*(),.?":{}|<>]/.test(a.modelValue)
|
|
142
|
+
})), m = D(() => {
|
|
143
|
+
if (!a.modelValue) return 0;
|
|
144
|
+
let p = 0;
|
|
145
|
+
const h = u.value;
|
|
146
|
+
return h.minLength && (p += 20), h.hasUppercase && (p += 20), h.hasLowercase && (p += 20), h.hasNumber && (p += 20), h.hasSpecial && (p += 20), p;
|
|
147
|
+
}), y = D(() => m.value), V = D(() => {
|
|
148
|
+
const p = m.value;
|
|
149
|
+
return p === 0 ? "" : p <= 40 ? "Fraca" : p <= 60 ? "Média" : p <= 80 ? "Boa" : "Forte";
|
|
150
|
+
}), F = D(() => [
|
|
151
|
+
"datametria-password-input__strength-fill",
|
|
152
|
+
{
|
|
153
|
+
"datametria-password-input__strength-fill--weak": m.value <= 40,
|
|
154
|
+
"datametria-password-input__strength-fill--medium": m.value > 40 && m.value <= 60,
|
|
155
|
+
"datametria-password-input__strength-fill--good": m.value > 60 && m.value <= 80,
|
|
156
|
+
"datametria-password-input__strength-fill--strong": m.value > 80
|
|
157
|
+
}
|
|
158
|
+
]), B = D(() => [
|
|
159
|
+
"datametria-password-input__strength-text",
|
|
160
|
+
{
|
|
161
|
+
"datametria-password-input__strength-text--weak": m.value <= 40,
|
|
162
|
+
"datametria-password-input__strength-text--medium": m.value > 40 && m.value <= 60,
|
|
163
|
+
"datametria-password-input__strength-text--good": m.value > 60 && m.value <= 80,
|
|
164
|
+
"datametria-password-input__strength-text--strong": m.value > 80
|
|
165
|
+
}
|
|
166
|
+
]), q = D(() => [
|
|
167
|
+
"datametria-password-input__field",
|
|
168
|
+
{
|
|
169
|
+
"datametria-password-input__field--error": a.errorMessage,
|
|
170
|
+
"datametria-password-input__field--disabled": a.disabled
|
|
171
|
+
}
|
|
172
|
+
]), $ = D(() => {
|
|
173
|
+
const p = [];
|
|
174
|
+
return a.showRequirements && o.value && p.push(`${n.value}-requirements`), a.errorMessage && p.push(`${n.value}-error`), a.helpText && !a.errorMessage && p.push(`${n.value}-help`), p.length > 0 ? p.join(" ") : void 0;
|
|
175
|
+
}), w = (p) => {
|
|
176
|
+
const h = p.target.value;
|
|
177
|
+
t("update:modelValue", h);
|
|
178
|
+
}, j = () => {
|
|
179
|
+
o.value = !0;
|
|
180
|
+
}, E = () => {
|
|
181
|
+
o.value = !1;
|
|
182
|
+
}, x = () => {
|
|
183
|
+
r.value = !r.value;
|
|
184
|
+
}, O = (p) => {
|
|
185
|
+
d.value = p.getModifierState("CapsLock");
|
|
186
|
+
};
|
|
187
|
+
return Q(m, (p) => {
|
|
188
|
+
a.modelValue && t("strength-change", p);
|
|
189
|
+
}), (p, h) => (l(), s("div", ze, [
|
|
190
|
+
e.label ? (l(), s("label", {
|
|
191
|
+
key: 0,
|
|
192
|
+
for: n.value,
|
|
193
|
+
class: "datametria-password-input__label"
|
|
194
|
+
}, [
|
|
195
|
+
U(g(e.label) + " ", 1),
|
|
196
|
+
e.required ? (l(), s("span", Ne, "*")) : b("", !0)
|
|
197
|
+
], 8, Ae)) : b("", !0),
|
|
198
|
+
c("div", Pe, [
|
|
199
|
+
c("input", {
|
|
200
|
+
id: n.value,
|
|
201
|
+
value: e.modelValue,
|
|
202
|
+
type: r.value ? "text" : "password",
|
|
203
|
+
placeholder: e.placeholder,
|
|
204
|
+
disabled: e.disabled,
|
|
205
|
+
required: e.required,
|
|
206
|
+
autocomplete: e.autocomplete,
|
|
207
|
+
class: R(q.value),
|
|
208
|
+
"aria-invalid": !!e.errorMessage,
|
|
209
|
+
"aria-describedby": $.value,
|
|
210
|
+
onInput: w,
|
|
211
|
+
onFocus: j,
|
|
212
|
+
onBlur: E,
|
|
213
|
+
onKeyup: O
|
|
214
|
+
}, null, 42, je),
|
|
215
|
+
c("button", {
|
|
216
|
+
type: "button",
|
|
217
|
+
class: "datametria-password-input__toggle",
|
|
218
|
+
"aria-label": r.value ? "Ocultar senha" : "Mostrar senha",
|
|
219
|
+
onClick: x,
|
|
220
|
+
tabindex: "-1"
|
|
221
|
+
}, [
|
|
222
|
+
r.value ? (l(), s("svg", Ue, [...h[0] || (h[0] = [
|
|
223
|
+
c("path", {
|
|
224
|
+
"stroke-linecap": "round",
|
|
225
|
+
"stroke-linejoin": "round",
|
|
226
|
+
"stroke-width": "2",
|
|
227
|
+
d: "M13.875 18.825A10.05 10.05 0 0112 19c-4.478 0-8.268-2.943-9.543-7a9.97 9.97 0 011.563-3.029m5.858.908a3 3 0 114.243 4.243M9.878 9.878l4.242 4.242M9.88 9.88l-3.29-3.29m7.532 7.532l3.29 3.29M3 3l3.59 3.59m0 0A9.953 9.953 0 0112 5c4.478 0 8.268 2.943 9.543 7a10.025 10.025 0 01-4.132 5.411m0 0L21 21"
|
|
228
|
+
}, null, -1)
|
|
229
|
+
])])) : (l(), s("svg", We, [...h[1] || (h[1] = [
|
|
230
|
+
c("path", {
|
|
231
|
+
"stroke-linecap": "round",
|
|
232
|
+
"stroke-linejoin": "round",
|
|
233
|
+
"stroke-width": "2",
|
|
234
|
+
d: "M15 12a3 3 0 11-6 0 3 3 0 016 0z"
|
|
235
|
+
}, null, -1),
|
|
236
|
+
c("path", {
|
|
237
|
+
"stroke-linecap": "round",
|
|
238
|
+
"stroke-linejoin": "round",
|
|
239
|
+
"stroke-width": "2",
|
|
240
|
+
d: "M2.458 12C3.732 7.943 7.523 5 12 5c4.478 0 8.268 2.943 9.542 7-1.274 4.057-5.064 7-9.542 7-4.477 0-8.268-2.943-9.542-7z"
|
|
241
|
+
}, null, -1)
|
|
242
|
+
])]))
|
|
243
|
+
], 8, Ye)
|
|
244
|
+
]),
|
|
245
|
+
d.value ? (l(), s("p", He, " ⚠️ Caps Lock está ativado ")) : b("", !0),
|
|
246
|
+
e.showStrength && e.modelValue ? (l(), s("div", Ke, [
|
|
247
|
+
c("div", Xe, [
|
|
248
|
+
c("div", {
|
|
249
|
+
class: R(F.value),
|
|
250
|
+
style: G({ width: `${y.value}%` })
|
|
251
|
+
}, null, 6)
|
|
252
|
+
]),
|
|
253
|
+
c("span", {
|
|
254
|
+
class: R(B.value)
|
|
255
|
+
}, g(V.value), 3)
|
|
256
|
+
])) : b("", !0),
|
|
257
|
+
e.showRequirements && o.value ? (l(), s("div", {
|
|
258
|
+
key: 3,
|
|
259
|
+
id: `${n.value}-requirements`,
|
|
260
|
+
class: "datametria-password-input__requirements"
|
|
261
|
+
}, [
|
|
262
|
+
h[6] || (h[6] = c("p", { class: "datametria-password-input__requirements-title" }, "A senha deve conter:", -1)),
|
|
263
|
+
c("ul", Je, [
|
|
264
|
+
c("li", {
|
|
265
|
+
class: R({ valid: u.value.minLength })
|
|
266
|
+
}, [
|
|
267
|
+
c("span", Qe, g(u.value.minLength ? "✓" : "○"), 1),
|
|
268
|
+
U(" Mínimo " + g(e.minLength) + " caracteres ", 1)
|
|
269
|
+
], 2),
|
|
270
|
+
c("li", {
|
|
271
|
+
class: R({ valid: u.value.hasUppercase })
|
|
272
|
+
}, [
|
|
273
|
+
c("span", Ze, g(u.value.hasUppercase ? "✓" : "○"), 1),
|
|
274
|
+
h[2] || (h[2] = U(" Pelo menos 1 letra maiúscula ", -1))
|
|
275
|
+
], 2),
|
|
276
|
+
c("li", {
|
|
277
|
+
class: R({ valid: u.value.hasLowercase })
|
|
278
|
+
}, [
|
|
279
|
+
c("span", ea, g(u.value.hasLowercase ? "✓" : "○"), 1),
|
|
280
|
+
h[3] || (h[3] = U(" Pelo menos 1 letra minúscula ", -1))
|
|
281
|
+
], 2),
|
|
282
|
+
c("li", {
|
|
283
|
+
class: R({ valid: u.value.hasNumber })
|
|
284
|
+
}, [
|
|
285
|
+
c("span", aa, g(u.value.hasNumber ? "✓" : "○"), 1),
|
|
286
|
+
h[4] || (h[4] = U(" Pelo menos 1 número ", -1))
|
|
287
|
+
], 2),
|
|
288
|
+
c("li", {
|
|
289
|
+
class: R({ valid: u.value.hasSpecial })
|
|
290
|
+
}, [
|
|
291
|
+
c("span", ta, g(u.value.hasSpecial ? "✓" : "○"), 1),
|
|
292
|
+
h[5] || (h[5] = U(" Pelo menos 1 caractere especial ", -1))
|
|
293
|
+
], 2)
|
|
294
|
+
])
|
|
295
|
+
], 8, Ge)) : b("", !0),
|
|
296
|
+
e.errorMessage ? (l(), s("p", {
|
|
297
|
+
key: 4,
|
|
298
|
+
id: `${n.value}-error`,
|
|
299
|
+
class: "datametria-password-input__error"
|
|
300
|
+
}, g(e.errorMessage), 9, la)) : b("", !0),
|
|
301
|
+
e.helpText && !e.errorMessage ? (l(), s("p", {
|
|
302
|
+
key: 5,
|
|
303
|
+
id: `${n.value}-help`,
|
|
304
|
+
class: "datametria-password-input__help"
|
|
305
|
+
}, g(e.helpText), 9, sa)) : b("", !0)
|
|
306
|
+
]));
|
|
307
|
+
}
|
|
308
|
+
}), Cr = /* @__PURE__ */ P(ra, [["__scopeId", "data-v-68f8806d"]]), na = { class: "datametria-select" }, oa = ["for"], ia = {
|
|
99
309
|
key: 0,
|
|
100
310
|
class: "datametria-select__required"
|
|
101
|
-
},
|
|
311
|
+
}, da = ["id", "value", "disabled", "required"], ca = {
|
|
102
312
|
key: 0,
|
|
103
313
|
value: "",
|
|
104
314
|
disabled: ""
|
|
105
|
-
},
|
|
315
|
+
}, ua = ["value"], ma = {
|
|
106
316
|
key: 1,
|
|
107
317
|
class: "datametria-select__error"
|
|
108
|
-
},
|
|
318
|
+
}, va = /* @__PURE__ */ N({
|
|
109
319
|
__name: "DatametriaSelect",
|
|
110
320
|
props: {
|
|
111
321
|
modelValue: { default: "" },
|
|
@@ -118,43 +328,43 @@ const he = ["disabled", "type", "aria-busy", "aria-disabled"], be = {
|
|
|
118
328
|
},
|
|
119
329
|
emits: ["update:modelValue"],
|
|
120
330
|
setup(e) {
|
|
121
|
-
const i = e,
|
|
331
|
+
const i = e, a = D(() => `select-${Math.random().toString(36).substr(2, 9)}`), t = D(() => [
|
|
122
332
|
"datametria-select__field",
|
|
123
333
|
{
|
|
124
334
|
"datametria-select__field--error": i.errorMessage,
|
|
125
335
|
"datametria-select__field--disabled": i.disabled
|
|
126
336
|
}
|
|
127
337
|
]);
|
|
128
|
-
return (
|
|
129
|
-
e.label ? (
|
|
338
|
+
return (n, r) => (l(), s("div", na, [
|
|
339
|
+
e.label ? (l(), s("label", {
|
|
130
340
|
key: 0,
|
|
131
|
-
for:
|
|
341
|
+
for: a.value,
|
|
132
342
|
class: "datametria-select__label"
|
|
133
343
|
}, [
|
|
134
|
-
|
|
135
|
-
e.required ? (
|
|
136
|
-
], 8,
|
|
137
|
-
|
|
138
|
-
id:
|
|
344
|
+
U(g(e.label) + " ", 1),
|
|
345
|
+
e.required ? (l(), s("span", ia, "*")) : b("", !0)
|
|
346
|
+
], 8, oa)) : b("", !0),
|
|
347
|
+
c("select", {
|
|
348
|
+
id: a.value,
|
|
139
349
|
value: e.modelValue,
|
|
140
350
|
disabled: e.disabled,
|
|
141
351
|
required: e.required,
|
|
142
|
-
class:
|
|
143
|
-
onChange: r[0] || (r[0] = (o) =>
|
|
352
|
+
class: R(t.value),
|
|
353
|
+
onChange: r[0] || (r[0] = (o) => n.$emit("update:modelValue", o.target.value))
|
|
144
354
|
}, [
|
|
145
|
-
e.placeholder ? (
|
|
146
|
-
(
|
|
355
|
+
e.placeholder ? (l(), s("option", ca, g(e.placeholder), 1)) : b("", !0),
|
|
356
|
+
(l(!0), s(K, null, X(e.options, (o) => (l(), s("option", {
|
|
147
357
|
key: o.value,
|
|
148
358
|
value: o.value
|
|
149
|
-
}, g(o.label), 9,
|
|
150
|
-
], 42,
|
|
151
|
-
e.errorMessage ? (
|
|
359
|
+
}, g(o.label), 9, ua))), 128))
|
|
360
|
+
], 42, da),
|
|
361
|
+
e.errorMessage ? (l(), s("p", ma, g(e.errorMessage), 1)) : b("", !0)
|
|
152
362
|
]));
|
|
153
363
|
}
|
|
154
|
-
}),
|
|
364
|
+
}), Mr = /* @__PURE__ */ P(va, [["__scopeId", "data-v-991c460a"]]), ha = { class: "datametria-checkbox" }, fa = ["checked", "disabled"], ba = {
|
|
155
365
|
key: 0,
|
|
156
366
|
class: "datametria-checkbox__label"
|
|
157
|
-
},
|
|
367
|
+
}, pa = /* @__PURE__ */ N({
|
|
158
368
|
__name: "DatametriaCheckbox",
|
|
159
369
|
props: {
|
|
160
370
|
modelValue: { type: Boolean, default: !1 },
|
|
@@ -163,22 +373,22 @@ const he = ["disabled", "type", "aria-busy", "aria-disabled"], be = {
|
|
|
163
373
|
},
|
|
164
374
|
emits: ["update:modelValue"],
|
|
165
375
|
setup(e) {
|
|
166
|
-
return (i,
|
|
167
|
-
|
|
376
|
+
return (i, a) => (l(), s("label", ha, [
|
|
377
|
+
c("input", {
|
|
168
378
|
type: "checkbox",
|
|
169
379
|
checked: e.modelValue,
|
|
170
380
|
disabled: e.disabled,
|
|
171
381
|
class: "datametria-checkbox__input",
|
|
172
|
-
onChange:
|
|
173
|
-
}, null, 40,
|
|
174
|
-
|
|
175
|
-
e.label ? (
|
|
382
|
+
onChange: a[0] || (a[0] = (t) => i.$emit("update:modelValue", t.target.checked))
|
|
383
|
+
}, null, 40, fa),
|
|
384
|
+
a[1] || (a[1] = c("span", { class: "datametria-checkbox__checkmark" }, null, -1)),
|
|
385
|
+
e.label ? (l(), s("span", ba, g(e.label), 1)) : b("", !0)
|
|
176
386
|
]));
|
|
177
387
|
}
|
|
178
|
-
}),
|
|
388
|
+
}), Sr = /* @__PURE__ */ P(pa, [["__scopeId", "data-v-b26af283"]]), ga = { class: "dm-radio" }, _a = { class: "dm-radio__label" }, ya = ["value", "checked", "disabled", "name", "aria-label", "aria-describedby"], ka = {
|
|
179
389
|
key: 0,
|
|
180
390
|
class: "dm-radio__text"
|
|
181
|
-
},
|
|
391
|
+
}, $a = ["id"], wa = /* @__PURE__ */ N({
|
|
182
392
|
__name: "DatametriaRadio",
|
|
183
393
|
props: {
|
|
184
394
|
modelValue: { type: [String, Number, Boolean] },
|
|
@@ -191,12 +401,12 @@ const he = ["disabled", "type", "aria-busy", "aria-disabled"], be = {
|
|
|
191
401
|
},
|
|
192
402
|
emits: ["update:modelValue"],
|
|
193
403
|
setup(e, { emit: i }) {
|
|
194
|
-
const
|
|
195
|
-
|
|
404
|
+
const a = e, t = i, n = () => {
|
|
405
|
+
a.disabled || t("update:modelValue", a.value);
|
|
196
406
|
};
|
|
197
|
-
return (r, o) => (
|
|
198
|
-
|
|
199
|
-
|
|
407
|
+
return (r, o) => (l(), s("div", ga, [
|
|
408
|
+
c("label", _a, [
|
|
409
|
+
c("input", {
|
|
200
410
|
type: "radio",
|
|
201
411
|
class: "dm-radio__input",
|
|
202
412
|
value: e.value,
|
|
@@ -205,25 +415,25 @@ const he = ["disabled", "type", "aria-busy", "aria-disabled"], be = {
|
|
|
205
415
|
name: e.name,
|
|
206
416
|
"aria-label": e.ariaLabel,
|
|
207
417
|
"aria-describedby": e.error ? `${e.name}-error` : void 0,
|
|
208
|
-
onChange:
|
|
209
|
-
}, null, 40,
|
|
210
|
-
o[0] || (o[0] =
|
|
211
|
-
e.label ? (
|
|
418
|
+
onChange: n
|
|
419
|
+
}, null, 40, ya),
|
|
420
|
+
o[0] || (o[0] = c("span", { class: "dm-radio__checkmark" }, null, -1)),
|
|
421
|
+
e.label ? (l(), s("span", ka, g(e.label), 1)) : b("", !0)
|
|
212
422
|
]),
|
|
213
|
-
e.error ? (
|
|
423
|
+
e.error ? (l(), s("p", {
|
|
214
424
|
key: 0,
|
|
215
425
|
id: `${e.name}-error`,
|
|
216
426
|
class: "dm-radio__error"
|
|
217
|
-
}, g(e.error), 9,
|
|
427
|
+
}, g(e.error), 9, $a)) : b("", !0)
|
|
218
428
|
]));
|
|
219
429
|
}
|
|
220
|
-
}),
|
|
430
|
+
}), Tr = /* @__PURE__ */ P(wa, [["__scopeId", "data-v-60c8511f"]]), xa = { class: "dm-switch" }, Da = { class: "dm-switch__label" }, Va = ["checked", "disabled", "aria-label", "aria-checked"], Ca = {
|
|
221
431
|
key: 0,
|
|
222
432
|
class: "dm-switch__text"
|
|
223
|
-
},
|
|
433
|
+
}, Ma = {
|
|
224
434
|
key: 0,
|
|
225
435
|
class: "dm-switch__error"
|
|
226
|
-
},
|
|
436
|
+
}, Sa = /* @__PURE__ */ N({
|
|
227
437
|
__name: "DatametriaSwitch",
|
|
228
438
|
props: {
|
|
229
439
|
modelValue: { type: Boolean, default: !1 },
|
|
@@ -234,12 +444,12 @@ const he = ["disabled", "type", "aria-busy", "aria-disabled"], be = {
|
|
|
234
444
|
},
|
|
235
445
|
emits: ["update:modelValue"],
|
|
236
446
|
setup(e, { emit: i }) {
|
|
237
|
-
const
|
|
238
|
-
|
|
447
|
+
const a = e, t = i, n = (r) => {
|
|
448
|
+
a.disabled || t("update:modelValue", r.target.checked);
|
|
239
449
|
};
|
|
240
|
-
return (r, o) => (
|
|
241
|
-
|
|
242
|
-
|
|
450
|
+
return (r, o) => (l(), s("div", xa, [
|
|
451
|
+
c("label", Da, [
|
|
452
|
+
c("input", {
|
|
243
453
|
type: "checkbox",
|
|
244
454
|
class: "dm-switch__input",
|
|
245
455
|
checked: e.modelValue,
|
|
@@ -247,26 +457,26 @@ const he = ["disabled", "type", "aria-busy", "aria-disabled"], be = {
|
|
|
247
457
|
"aria-label": e.ariaLabel,
|
|
248
458
|
"aria-checked": e.modelValue,
|
|
249
459
|
role: "switch",
|
|
250
|
-
onChange:
|
|
251
|
-
}, null, 40,
|
|
252
|
-
o[0] || (o[0] =
|
|
253
|
-
|
|
460
|
+
onChange: n
|
|
461
|
+
}, null, 40, Va),
|
|
462
|
+
o[0] || (o[0] = c("span", { class: "dm-switch__track" }, [
|
|
463
|
+
c("span", { class: "dm-switch__thumb" })
|
|
254
464
|
], -1)),
|
|
255
|
-
e.label ? (
|
|
465
|
+
e.label ? (l(), s("span", Ca, g(e.label), 1)) : b("", !0)
|
|
256
466
|
]),
|
|
257
|
-
e.error ? (
|
|
467
|
+
e.error ? (l(), s("p", Ma, g(e.error), 1)) : b("", !0)
|
|
258
468
|
]));
|
|
259
469
|
}
|
|
260
|
-
}),
|
|
470
|
+
}), Br = /* @__PURE__ */ P(Sa, [["__scopeId", "data-v-91ca822a"]]), Ta = { class: "dm-textarea" }, Ba = {
|
|
261
471
|
key: 0,
|
|
262
472
|
class: "dm-textarea__required"
|
|
263
|
-
},
|
|
473
|
+
}, Ia = ["placeholder", "disabled", "required", "rows", "maxlength", "aria-label", "aria-describedby", "aria-invalid"], Ea = {
|
|
264
474
|
key: 1,
|
|
265
475
|
class: "dm-textarea__footer"
|
|
266
|
-
},
|
|
476
|
+
}, La = ["id"], Fa = {
|
|
267
477
|
key: 1,
|
|
268
478
|
class: "dm-textarea__counter"
|
|
269
|
-
},
|
|
479
|
+
}, Oa = /* @__PURE__ */ N({
|
|
270
480
|
__name: "DatametriaTextarea",
|
|
271
481
|
props: {
|
|
272
482
|
modelValue: { default: "" },
|
|
@@ -281,130 +491,377 @@ const he = ["disabled", "type", "aria-busy", "aria-disabled"], be = {
|
|
|
281
491
|
},
|
|
282
492
|
emits: ["update:modelValue"],
|
|
283
493
|
setup(e, { emit: i }) {
|
|
284
|
-
const
|
|
285
|
-
|
|
286
|
-
r.value =
|
|
494
|
+
const a = e, t = i, n = `dm-textarea-${Math.random().toString(36).substr(2, 9)}`, r = S(a.modelValue);
|
|
495
|
+
Q(() => a.modelValue, (d) => {
|
|
496
|
+
r.value = d;
|
|
287
497
|
});
|
|
288
498
|
const o = () => {
|
|
289
|
-
|
|
499
|
+
t("update:modelValue", r.value || "");
|
|
290
500
|
};
|
|
291
|
-
return (
|
|
292
|
-
var
|
|
293
|
-
return
|
|
294
|
-
e.label ? (
|
|
501
|
+
return (d, u) => {
|
|
502
|
+
var m;
|
|
503
|
+
return l(), s("div", Ta, [
|
|
504
|
+
e.label ? (l(), s("label", {
|
|
295
505
|
key: 0,
|
|
296
|
-
for:
|
|
506
|
+
for: n,
|
|
297
507
|
class: "dm-textarea__label"
|
|
298
508
|
}, [
|
|
299
|
-
|
|
300
|
-
e.required ? (
|
|
301
|
-
])) :
|
|
302
|
-
|
|
303
|
-
id:
|
|
304
|
-
"onUpdate:modelValue":
|
|
305
|
-
class:
|
|
509
|
+
U(g(e.label) + " ", 1),
|
|
510
|
+
e.required ? (l(), s("span", Ba, "*")) : b("", !0)
|
|
511
|
+
])) : b("", !0),
|
|
512
|
+
se(c("textarea", {
|
|
513
|
+
id: n,
|
|
514
|
+
"onUpdate:modelValue": u[0] || (u[0] = (y) => r.value = y),
|
|
515
|
+
class: R(["dm-textarea__input", { "dm-textarea__input--error": e.error }]),
|
|
306
516
|
placeholder: e.placeholder,
|
|
307
517
|
disabled: e.disabled,
|
|
308
518
|
required: e.required,
|
|
309
519
|
rows: e.rows,
|
|
310
520
|
maxlength: e.maxLength,
|
|
311
521
|
"aria-label": e.ariaLabel,
|
|
312
|
-
"aria-describedby": e.error ? `${
|
|
522
|
+
"aria-describedby": e.error ? `${n}-error` : void 0,
|
|
313
523
|
"aria-invalid": !!e.error,
|
|
314
524
|
onInput: o
|
|
315
|
-
}, null, 42,
|
|
316
|
-
[
|
|
525
|
+
}, null, 42, Ia), [
|
|
526
|
+
[oe, r.value]
|
|
317
527
|
]),
|
|
318
|
-
e.maxLength || e.error ? (
|
|
319
|
-
e.error ? (
|
|
528
|
+
e.maxLength || e.error ? (l(), s("div", Ea, [
|
|
529
|
+
e.error ? (l(), s("p", {
|
|
320
530
|
key: 0,
|
|
321
|
-
id: `${
|
|
531
|
+
id: `${n}-error`,
|
|
322
532
|
class: "dm-textarea__error"
|
|
323
|
-
}, g(e.error), 9,
|
|
324
|
-
e.maxLength ? (
|
|
325
|
-
])) :
|
|
533
|
+
}, g(e.error), 9, La)) : b("", !0),
|
|
534
|
+
e.maxLength ? (l(), s("span", Fa, g(((m = r.value) == null ? void 0 : m.length) || 0) + "/" + g(e.maxLength), 1)) : b("", !0)
|
|
535
|
+
])) : b("", !0)
|
|
326
536
|
]);
|
|
327
537
|
};
|
|
328
538
|
}
|
|
329
|
-
}),
|
|
539
|
+
}), Ir = /* @__PURE__ */ P(Oa, [["__scopeId", "data-v-fefdee17"]]), Ra = ["for"], qa = {
|
|
330
540
|
key: 0,
|
|
331
541
|
class: "dm-datepicker__required"
|
|
332
|
-
},
|
|
542
|
+
}, za = { class: "dm-datepicker__wrapper" }, Aa = ["id", "placeholder", "disabled", "readonly", "required", "aria-label", "aria-invalid", "aria-describedby"], Na = { class: "dm-datepicker__header" }, Pa = ["aria-label"], ja = {
|
|
543
|
+
key: 0,
|
|
544
|
+
class: "dm-datepicker__shortcuts"
|
|
545
|
+
}, Ya = ["onClick"], Ua = {
|
|
546
|
+
key: 1,
|
|
547
|
+
class: "dm-datepicker__year-picker"
|
|
548
|
+
}, Wa = ["onClick"], Ha = {
|
|
549
|
+
key: 2,
|
|
550
|
+
class: "dm-datepicker__grid"
|
|
551
|
+
}, Ka = { class: "dm-datepicker__weekdays" }, Xa = { class: "dm-datepicker__days" }, Ga = ["data-date", "disabled", "aria-label", "aria-current", "onClick"], Ja = {
|
|
552
|
+
key: 3,
|
|
553
|
+
class: "dm-datepicker__footer"
|
|
554
|
+
}, Qa = ["id"], Za = /* @__PURE__ */ N({
|
|
333
555
|
__name: "DatametriaDatePicker",
|
|
334
556
|
props: {
|
|
335
|
-
modelValue: {
|
|
557
|
+
modelValue: {},
|
|
558
|
+
mode: { default: "single" },
|
|
559
|
+
format: { default: "DD/MM/YYYY" },
|
|
560
|
+
placeholder: { default: "Select date..." },
|
|
336
561
|
label: {},
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
562
|
+
errorMessage: {},
|
|
563
|
+
disabled: { type: Boolean },
|
|
564
|
+
readonly: { type: Boolean },
|
|
565
|
+
required: { type: Boolean },
|
|
340
566
|
min: {},
|
|
341
567
|
max: {},
|
|
342
|
-
|
|
568
|
+
disabledDates: {},
|
|
569
|
+
disabledWeekdays: {},
|
|
570
|
+
enabledDates: {},
|
|
571
|
+
showToday: { type: Boolean, default: !1 },
|
|
572
|
+
clearable: { type: Boolean, default: !1 },
|
|
573
|
+
closeOnSelect: { type: Boolean, default: !0 },
|
|
574
|
+
showShortcuts: { type: Boolean, default: !1 },
|
|
575
|
+
shortcuts: { default: () => [
|
|
576
|
+
{ label: "Today", value: (/* @__PURE__ */ new Date()).toISOString().split("T")[0] },
|
|
577
|
+
{ label: "Tomorrow", value: new Date(Date.now() + 864e5).toISOString().split("T")[0] },
|
|
578
|
+
{ label: "Next Week", value: new Date(Date.now() + 7 * 864e5).toISOString().split("T")[0] }
|
|
579
|
+
] }
|
|
343
580
|
},
|
|
344
|
-
emits: ["update:modelValue"],
|
|
581
|
+
emits: ["update:modelValue", "open", "close", "clear"],
|
|
345
582
|
setup(e, { emit: i }) {
|
|
346
|
-
const
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
})
|
|
350
|
-
|
|
351
|
-
a
|
|
583
|
+
const a = e, t = i, n = S(), r = S(!1), o = S(!1), d = S(/* @__PURE__ */ new Date()), u = S(!1), m = D(() => `datepicker-${Math.random().toString(36).substr(2, 9)}`), y = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], V = D(() => {
|
|
584
|
+
var k, L;
|
|
585
|
+
return a.mode === "single" ? !!a.modelValue : a.mode === "range" ? !!((k = a.modelValue) != null && k.start) && !!((L = a.modelValue) != null && L.end) : a.mode === "multiple" ? Array.isArray(a.modelValue) && a.modelValue.length > 0 : !1;
|
|
586
|
+
}), F = D(() => {
|
|
587
|
+
if (!a.modelValue) return "";
|
|
588
|
+
if (a.mode === "single") {
|
|
589
|
+
const k = new Date(a.modelValue);
|
|
590
|
+
return w(k, a.format);
|
|
591
|
+
}
|
|
592
|
+
if (a.mode === "range") {
|
|
593
|
+
const k = a.modelValue;
|
|
594
|
+
if (!k.start || !k.end) return "";
|
|
595
|
+
const L = w(new Date(k.start), a.format), I = w(new Date(k.end), a.format);
|
|
596
|
+
return `${L} - ${I}`;
|
|
597
|
+
}
|
|
598
|
+
if (a.mode === "multiple") {
|
|
599
|
+
const k = a.modelValue;
|
|
600
|
+
return k.length === 0 ? "" : k.length === 1 ? w(new Date(k[0]), a.format) : `${k.length} dates selected`;
|
|
601
|
+
}
|
|
602
|
+
return "";
|
|
603
|
+
}), B = D(() => {
|
|
604
|
+
const k = d.value.toLocaleString("default", { month: "long" }), L = d.value.getFullYear();
|
|
605
|
+
return `${k} ${L}`;
|
|
606
|
+
}), q = D(() => {
|
|
607
|
+
const k = (/* @__PURE__ */ new Date()).getFullYear(), L = [];
|
|
608
|
+
for (let I = k - 50; I <= k + 10; I++)
|
|
609
|
+
L.push(I);
|
|
610
|
+
return L;
|
|
611
|
+
}), $ = D(() => {
|
|
612
|
+
const k = d.value.getFullYear(), L = d.value.getMonth(), I = new Date(k, L, 1), H = new Date(I);
|
|
613
|
+
H.setDate(H.getDate() - I.getDay());
|
|
614
|
+
const ee = [], ye = /* @__PURE__ */ new Date();
|
|
615
|
+
for (let fe = 0; fe < 42; fe++) {
|
|
616
|
+
const ae = new Date(H);
|
|
617
|
+
ae.setDate(H.getDate() + fe);
|
|
618
|
+
const pe = ae.toISOString().split("T")[0], ke = ae.getMonth() !== L, $e = E(ae), we = x(pe), xe = j(ae, ye);
|
|
619
|
+
ee.push({
|
|
620
|
+
date: ae.getDate(),
|
|
621
|
+
month: ae.getMonth(),
|
|
622
|
+
year: ae.getFullYear(),
|
|
623
|
+
dateString: pe,
|
|
624
|
+
otherMonth: ke,
|
|
625
|
+
disabled: $e,
|
|
626
|
+
selected: we,
|
|
627
|
+
today: xe,
|
|
628
|
+
inRange: !1,
|
|
629
|
+
rangeStart: !1,
|
|
630
|
+
rangeEnd: !1
|
|
631
|
+
});
|
|
632
|
+
}
|
|
633
|
+
return ee;
|
|
634
|
+
}), w = (k, L) => {
|
|
635
|
+
const I = k.getDate().toString().padStart(2, "0"), H = (k.getMonth() + 1).toString().padStart(2, "0"), ee = k.getFullYear().toString();
|
|
636
|
+
return L.replace("DD", I).replace("MM", H).replace("YYYY", ee);
|
|
637
|
+
}, j = (k, L) => k.getFullYear() === L.getFullYear() && k.getMonth() === L.getMonth() && k.getDate() === L.getDate(), E = (k) => {
|
|
638
|
+
var I, H;
|
|
639
|
+
const L = k.toISOString().split("T")[0];
|
|
640
|
+
return !!(a.min && k < new Date(a.min) || a.max && k > new Date(a.max) || (I = a.disabledDates) != null && I.includes(L) || (H = a.disabledWeekdays) != null && H.includes(k.getDay()) || a.enabledDates && !a.enabledDates.includes(L));
|
|
641
|
+
}, x = (k) => {
|
|
642
|
+
if (a.mode === "single")
|
|
643
|
+
return a.modelValue === k;
|
|
644
|
+
if (a.mode === "range") {
|
|
645
|
+
const L = a.modelValue;
|
|
646
|
+
return (L == null ? void 0 : L.start) === k || (L == null ? void 0 : L.end) === k;
|
|
647
|
+
}
|
|
648
|
+
if (a.mode === "multiple") {
|
|
649
|
+
const L = a.modelValue;
|
|
650
|
+
return (L == null ? void 0 : L.includes(k)) || !1;
|
|
651
|
+
}
|
|
652
|
+
return !1;
|
|
653
|
+
}, O = (k) => {
|
|
654
|
+
let H = new Date(k.year, k.month, k.date).toLocaleDateString("en-US", {
|
|
655
|
+
weekday: "long",
|
|
656
|
+
year: "numeric",
|
|
657
|
+
month: "long",
|
|
658
|
+
day: "numeric"
|
|
659
|
+
});
|
|
660
|
+
return k.today && (H += ", today"), k.selected && (H += ", selected"), k.disabled && (H += ", disabled"), H;
|
|
661
|
+
}, p = () => {
|
|
662
|
+
!a.disabled && !a.readonly && (r.value = !r.value, r.value ? t("open") : t("close"));
|
|
663
|
+
}, h = () => {
|
|
664
|
+
!a.disabled && !a.readonly && (r.value = !0, t("open"));
|
|
665
|
+
}, _ = (k) => {
|
|
666
|
+
k.key === "Enter" || k.key === " " ? (k.preventDefault(), p()) : k.key === "Escape" && (r.value = !1, t("close"));
|
|
667
|
+
}, M = () => {
|
|
668
|
+
d.value = new Date(d.value.getFullYear(), d.value.getMonth() - 1, 1);
|
|
669
|
+
}, A = () => {
|
|
670
|
+
d.value = new Date(d.value.getFullYear(), d.value.getMonth() + 1, 1);
|
|
671
|
+
}, W = () => {
|
|
672
|
+
o.value = !o.value;
|
|
673
|
+
}, v = (k) => {
|
|
674
|
+
d.value = new Date(k, d.value.getMonth(), 1), o.value = !1;
|
|
675
|
+
}, f = (k) => {
|
|
676
|
+
if (k.disabled) return;
|
|
677
|
+
const L = k.dateString;
|
|
678
|
+
if (a.mode === "single" && (t("update:modelValue", L), a.closeOnSelect && (r.value = !1, t("close"))), a.mode === "range") {
|
|
679
|
+
const I = a.modelValue || { start: "", end: "" };
|
|
680
|
+
if (!I.start || I.start && I.end)
|
|
681
|
+
t("update:modelValue", { start: L, end: "" });
|
|
682
|
+
else {
|
|
683
|
+
const H = new Date(I.start);
|
|
684
|
+
new Date(L) < H ? t("update:modelValue", { start: L, end: I.start }) : t("update:modelValue", { start: I.start, end: L }), a.closeOnSelect && (r.value = !1, t("close"));
|
|
685
|
+
}
|
|
686
|
+
}
|
|
687
|
+
if (a.mode === "multiple") {
|
|
688
|
+
const I = a.modelValue || [], H = I.indexOf(L);
|
|
689
|
+
if (H >= 0) {
|
|
690
|
+
const ee = [...I];
|
|
691
|
+
ee.splice(H, 1), t("update:modelValue", ee);
|
|
692
|
+
} else
|
|
693
|
+
t("update:modelValue", [...I, L]);
|
|
694
|
+
}
|
|
695
|
+
}, T = () => {
|
|
696
|
+
const k = (/* @__PURE__ */ new Date()).toISOString().split("T")[0];
|
|
697
|
+
if (a.mode === "single")
|
|
698
|
+
t("update:modelValue", k);
|
|
699
|
+
else if (a.mode === "range")
|
|
700
|
+
t("update:modelValue", { start: k, end: k });
|
|
701
|
+
else if (a.mode === "multiple") {
|
|
702
|
+
const L = a.modelValue || [];
|
|
703
|
+
L.includes(k) || t("update:modelValue", [...L, k]);
|
|
704
|
+
}
|
|
705
|
+
r.value = !1, t("close");
|
|
706
|
+
}, C = (k) => {
|
|
707
|
+
t("update:modelValue", k.value), r.value = !1, t("close");
|
|
708
|
+
}, z = () => {
|
|
709
|
+
a.mode === "single" ? t("update:modelValue", "") : a.mode === "range" ? t("update:modelValue", { start: "", end: "" }) : a.mode === "multiple" && t("update:modelValue", []), t("clear");
|
|
710
|
+
}, Z = (k) => {
|
|
711
|
+
n.value && !n.value.contains(k.target) && (r.value = !1, o.value = !1, t("close"));
|
|
712
|
+
}, re = () => {
|
|
713
|
+
u.value = window.innerWidth <= 640;
|
|
352
714
|
};
|
|
353
|
-
return (
|
|
354
|
-
|
|
715
|
+
return te(() => {
|
|
716
|
+
document.addEventListener("click", Z), window.addEventListener("resize", re), re();
|
|
717
|
+
}), de(() => {
|
|
718
|
+
document.removeEventListener("click", Z), window.removeEventListener("resize", re);
|
|
719
|
+
}), (k, L) => (l(), s("div", {
|
|
720
|
+
class: "dm-datepicker",
|
|
721
|
+
ref_key: "datepickerRef",
|
|
722
|
+
ref: n
|
|
723
|
+
}, [
|
|
724
|
+
e.label ? (l(), s("label", {
|
|
355
725
|
key: 0,
|
|
356
|
-
for:
|
|
726
|
+
for: m.value,
|
|
357
727
|
class: "dm-datepicker__label"
|
|
358
728
|
}, [
|
|
359
|
-
|
|
360
|
-
e.required ? (
|
|
361
|
-
])) :
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
id:
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
class:
|
|
729
|
+
U(g(e.label) + " ", 1),
|
|
730
|
+
e.required ? (l(), s("span", qa, "*")) : b("", !0)
|
|
731
|
+
], 8, Ra)) : b("", !0),
|
|
732
|
+
c("div", za, [
|
|
733
|
+
se(c("input", {
|
|
734
|
+
id: m.value,
|
|
735
|
+
"onUpdate:modelValue": L[0] || (L[0] = (I) => F.value = I),
|
|
736
|
+
type: "text",
|
|
737
|
+
class: R(["dm-datepicker__input", { "dm-datepicker__input--error": e.errorMessage }]),
|
|
738
|
+
placeholder: e.placeholder,
|
|
368
739
|
disabled: e.disabled,
|
|
740
|
+
readonly: e.readonly,
|
|
369
741
|
required: e.required,
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
"aria-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
}, null, 42,
|
|
377
|
-
[
|
|
378
|
-
])
|
|
742
|
+
"aria-label": e.label || "Date picker",
|
|
743
|
+
"aria-invalid": !!e.errorMessage,
|
|
744
|
+
"aria-describedby": e.errorMessage ? `${m.value}-error` : void 0,
|
|
745
|
+
onClick: p,
|
|
746
|
+
onFocus: h,
|
|
747
|
+
onKeydown: _
|
|
748
|
+
}, null, 42, Aa), [
|
|
749
|
+
[oe, F.value]
|
|
750
|
+
]),
|
|
751
|
+
e.clearable && V.value ? (l(), s("button", {
|
|
752
|
+
key: 0,
|
|
753
|
+
type: "button",
|
|
754
|
+
class: "dm-datepicker__clear",
|
|
755
|
+
onClick: z,
|
|
756
|
+
"aria-label": "Clear date"
|
|
757
|
+
}, " × ")) : b("", !0)
|
|
379
758
|
]),
|
|
380
|
-
|
|
759
|
+
r.value ? (l(), s("div", {
|
|
381
760
|
key: 1,
|
|
382
|
-
|
|
761
|
+
class: "dm-datepicker__calendar",
|
|
762
|
+
role: "dialog",
|
|
763
|
+
"aria-label": "Calendar",
|
|
764
|
+
onClick: L[1] || (L[1] = ie(() => {
|
|
765
|
+
}, ["stop"]))
|
|
766
|
+
}, [
|
|
767
|
+
c("div", Na, [
|
|
768
|
+
c("button", {
|
|
769
|
+
type: "button",
|
|
770
|
+
class: "dm-datepicker__nav dm-datepicker__nav-prev",
|
|
771
|
+
onClick: M,
|
|
772
|
+
"aria-label": "Previous month"
|
|
773
|
+
}, " ‹ "),
|
|
774
|
+
c("button", {
|
|
775
|
+
type: "button",
|
|
776
|
+
class: "dm-datepicker__month-year",
|
|
777
|
+
onClick: W,
|
|
778
|
+
"aria-label": `${B.value}, click to select year`
|
|
779
|
+
}, g(B.value), 9, Pa),
|
|
780
|
+
c("button", {
|
|
781
|
+
type: "button",
|
|
782
|
+
class: "dm-datepicker__nav dm-datepicker__nav-next",
|
|
783
|
+
onClick: A,
|
|
784
|
+
"aria-label": "Next month"
|
|
785
|
+
}, " › ")
|
|
786
|
+
]),
|
|
787
|
+
e.showShortcuts && e.shortcuts.length > 0 ? (l(), s("div", ja, [
|
|
788
|
+
(l(!0), s(K, null, X(e.shortcuts, (I) => (l(), s("button", {
|
|
789
|
+
key: I.label,
|
|
790
|
+
type: "button",
|
|
791
|
+
class: "dm-datepicker__shortcut",
|
|
792
|
+
onClick: (H) => C(I)
|
|
793
|
+
}, g(I.label), 9, Ya))), 128))
|
|
794
|
+
])) : b("", !0),
|
|
795
|
+
o.value ? (l(), s("div", Ua, [
|
|
796
|
+
(l(!0), s(K, null, X(q.value, (I) => (l(), s("div", {
|
|
797
|
+
key: I,
|
|
798
|
+
class: R(["dm-datepicker__year-option", { "dm-datepicker__year-option--current": I === d.value.getFullYear() }]),
|
|
799
|
+
onClick: (H) => v(I)
|
|
800
|
+
}, g(I), 11, Wa))), 128))
|
|
801
|
+
])) : (l(), s("div", Ha, [
|
|
802
|
+
c("div", Ka, [
|
|
803
|
+
(l(), s(K, null, X(y, (I) => c("div", {
|
|
804
|
+
key: I,
|
|
805
|
+
class: "dm-datepicker__weekday"
|
|
806
|
+
}, g(I), 1)), 64))
|
|
807
|
+
]),
|
|
808
|
+
c("div", Xa, [
|
|
809
|
+
(l(!0), s(K, null, X($.value, (I) => (l(), s("button", {
|
|
810
|
+
key: `${I.date}-${I.month}`,
|
|
811
|
+
type: "button",
|
|
812
|
+
class: R(["dm-datepicker__day", {
|
|
813
|
+
"dm-datepicker__day--other-month": I.otherMonth,
|
|
814
|
+
"dm-datepicker__day--disabled": I.disabled,
|
|
815
|
+
"dm-datepicker__day--selected": I.selected,
|
|
816
|
+
"dm-datepicker__day--today": I.today,
|
|
817
|
+
"dm-datepicker__day--in-range": I.inRange,
|
|
818
|
+
"dm-datepicker__day--range-start": I.rangeStart,
|
|
819
|
+
"dm-datepicker__day--range-end": I.rangeEnd
|
|
820
|
+
}]),
|
|
821
|
+
"data-date": I.dateString,
|
|
822
|
+
disabled: I.disabled,
|
|
823
|
+
"aria-label": O(I),
|
|
824
|
+
"aria-current": I.today ? "date" : void 0,
|
|
825
|
+
onClick: (H) => f(I)
|
|
826
|
+
}, g(I.date), 11, Ga))), 128))
|
|
827
|
+
])
|
|
828
|
+
])),
|
|
829
|
+
e.showToday ? (l(), s("div", Ja, [
|
|
830
|
+
c("button", {
|
|
831
|
+
type: "button",
|
|
832
|
+
class: "dm-datepicker__today",
|
|
833
|
+
onClick: T
|
|
834
|
+
}, " Today ")
|
|
835
|
+
])) : b("", !0)
|
|
836
|
+
])) : b("", !0),
|
|
837
|
+
e.errorMessage ? (l(), s("div", {
|
|
838
|
+
key: 2,
|
|
839
|
+
id: `${m.value}-error`,
|
|
383
840
|
class: "dm-datepicker__error"
|
|
384
|
-
}, g(e.
|
|
385
|
-
]));
|
|
841
|
+
}, g(e.errorMessage), 9, Qa)) : b("", !0)
|
|
842
|
+
], 512));
|
|
386
843
|
}
|
|
387
|
-
}),
|
|
844
|
+
}), Er = /* @__PURE__ */ P(Za, [["__scopeId", "data-v-5f5c3dc9"]]), et = ["for"], at = {
|
|
388
845
|
key: 0,
|
|
389
846
|
class: "dm-time-picker__required",
|
|
390
847
|
"aria-label": "obrigatório"
|
|
391
|
-
},
|
|
848
|
+
}, tt = { class: "dm-time-picker__wrapper" }, lt = ["id", "disabled", "required", "min", "max", "step", "aria-describedby", "aria-invalid"], st = {
|
|
392
849
|
key: 0,
|
|
393
850
|
class: "dm-time-picker__icon"
|
|
394
|
-
},
|
|
851
|
+
}, rt = {
|
|
395
852
|
key: 0,
|
|
396
853
|
class: "dm-time-picker__icon--error",
|
|
397
854
|
viewBox: "0 0 20 20",
|
|
398
855
|
fill: "currentColor"
|
|
399
|
-
},
|
|
856
|
+
}, nt = {
|
|
400
857
|
key: 1,
|
|
401
858
|
class: "dm-time-picker__icon--success",
|
|
402
859
|
viewBox: "0 0 20 20",
|
|
403
860
|
fill: "currentColor"
|
|
404
|
-
},
|
|
861
|
+
}, ot = {
|
|
405
862
|
key: 1,
|
|
406
863
|
class: "dm-time-picker__messages"
|
|
407
|
-
},
|
|
864
|
+
}, it = ["id"], dt = ["id"], ct = ["id"], ut = /* @__PURE__ */ N({
|
|
408
865
|
__name: "DatametriaTimePicker",
|
|
409
866
|
props: {
|
|
410
867
|
modelValue: { default: "" },
|
|
@@ -421,123 +878,123 @@ const he = ["disabled", "type", "aria-busy", "aria-disabled"], be = {
|
|
|
421
878
|
format24h: { type: Boolean, default: !0 }
|
|
422
879
|
},
|
|
423
880
|
emits: ["update:modelValue", "blur", "focus", "change"],
|
|
424
|
-
setup(e, { expose: i, emit:
|
|
425
|
-
const
|
|
426
|
-
const
|
|
427
|
-
return
|
|
428
|
-
}),
|
|
429
|
-
get: () =>
|
|
430
|
-
set: (
|
|
431
|
-
|
|
881
|
+
setup(e, { expose: i, emit: a }) {
|
|
882
|
+
const t = e, n = a, r = S(), o = D(() => `dm-time-picker-${Math.random().toString(36).substr(2, 9)}`), d = D(() => !!t.errorMessage), u = D(() => !!t.successMessage && !d.value), m = D(() => {
|
|
883
|
+
const w = [];
|
|
884
|
+
return t.errorMessage ? w.push(`${o.value}-error`) : t.successMessage ? w.push(`${o.value}-success`) : t.helperText && w.push(`${o.value}-helper`), w.length > 0 ? w.join(" ") : void 0;
|
|
885
|
+
}), y = D({
|
|
886
|
+
get: () => t.modelValue,
|
|
887
|
+
set: (w) => {
|
|
888
|
+
n("update:modelValue", w), n("change", w);
|
|
432
889
|
}
|
|
433
|
-
}),
|
|
434
|
-
const
|
|
435
|
-
|
|
436
|
-
},
|
|
437
|
-
|
|
438
|
-
},
|
|
439
|
-
|
|
440
|
-
},
|
|
441
|
-
|
|
442
|
-
var
|
|
443
|
-
(
|
|
890
|
+
}), V = (w) => {
|
|
891
|
+
const j = w.target;
|
|
892
|
+
y.value = j.value;
|
|
893
|
+
}, F = (w) => {
|
|
894
|
+
n("blur", w);
|
|
895
|
+
}, B = (w) => {
|
|
896
|
+
n("focus", w);
|
|
897
|
+
}, q = () => {
|
|
898
|
+
le(() => {
|
|
899
|
+
var w;
|
|
900
|
+
(w = r.value) == null || w.focus();
|
|
444
901
|
});
|
|
445
|
-
},
|
|
446
|
-
var
|
|
447
|
-
(
|
|
902
|
+
}, $ = () => {
|
|
903
|
+
var w;
|
|
904
|
+
(w = r.value) == null || w.blur();
|
|
448
905
|
};
|
|
449
|
-
return
|
|
450
|
-
r.value && r.value.value !==
|
|
906
|
+
return Q(() => t.modelValue, (w) => {
|
|
907
|
+
r.value && r.value.value !== w && (r.value.value = w);
|
|
451
908
|
}), i({
|
|
452
|
-
focus:
|
|
453
|
-
blur:
|
|
909
|
+
focus: q,
|
|
910
|
+
blur: $,
|
|
454
911
|
inputRef: r
|
|
455
|
-
}), (
|
|
456
|
-
class:
|
|
912
|
+
}), (w, j) => (l(), s("div", {
|
|
913
|
+
class: R(["dm-time-picker", { "dm-time-picker--disabled": e.disabled }])
|
|
457
914
|
}, [
|
|
458
|
-
e.label ? (
|
|
915
|
+
e.label ? (l(), s("label", {
|
|
459
916
|
key: 0,
|
|
460
917
|
for: o.value,
|
|
461
918
|
class: "dm-time-picker__label"
|
|
462
919
|
}, [
|
|
463
|
-
|
|
464
|
-
e.required ? (
|
|
465
|
-
], 8,
|
|
466
|
-
|
|
467
|
-
|
|
920
|
+
U(g(e.label) + " ", 1),
|
|
921
|
+
e.required ? (l(), s("span", at, "*")) : b("", !0)
|
|
922
|
+
], 8, et)) : b("", !0),
|
|
923
|
+
c("div", tt, [
|
|
924
|
+
se(c("input", {
|
|
468
925
|
id: o.value,
|
|
469
926
|
ref_key: "inputRef",
|
|
470
927
|
ref: r,
|
|
471
|
-
"onUpdate:modelValue":
|
|
928
|
+
"onUpdate:modelValue": j[0] || (j[0] = (E) => y.value = E),
|
|
472
929
|
type: "time",
|
|
473
|
-
class:
|
|
474
|
-
"dm-time-picker__input--error":
|
|
475
|
-
"dm-time-picker__input--success":
|
|
930
|
+
class: R(["dm-time-picker__input", {
|
|
931
|
+
"dm-time-picker__input--error": d.value,
|
|
932
|
+
"dm-time-picker__input--success": u.value
|
|
476
933
|
}]),
|
|
477
934
|
disabled: e.disabled,
|
|
478
935
|
required: e.required,
|
|
479
936
|
min: e.min,
|
|
480
937
|
max: e.max,
|
|
481
938
|
step: e.step,
|
|
482
|
-
"aria-describedby":
|
|
483
|
-
"aria-invalid":
|
|
484
|
-
onInput:
|
|
485
|
-
onBlur:
|
|
486
|
-
onFocus:
|
|
487
|
-
}, null, 42,
|
|
488
|
-
[
|
|
939
|
+
"aria-describedby": m.value,
|
|
940
|
+
"aria-invalid": d.value,
|
|
941
|
+
onInput: V,
|
|
942
|
+
onBlur: F,
|
|
943
|
+
onFocus: B
|
|
944
|
+
}, null, 42, lt), [
|
|
945
|
+
[oe, y.value]
|
|
489
946
|
]),
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
947
|
+
d.value || u.value ? (l(), s("div", st, [
|
|
948
|
+
d.value ? (l(), s("svg", rt, [...j[1] || (j[1] = [
|
|
949
|
+
c("path", {
|
|
493
950
|
"fill-rule": "evenodd",
|
|
494
951
|
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",
|
|
495
952
|
"clip-rule": "evenodd"
|
|
496
953
|
}, null, -1)
|
|
497
|
-
])])) :
|
|
498
|
-
|
|
954
|
+
])])) : u.value ? (l(), s("svg", nt, [...j[2] || (j[2] = [
|
|
955
|
+
c("path", {
|
|
499
956
|
"fill-rule": "evenodd",
|
|
500
957
|
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",
|
|
501
958
|
"clip-rule": "evenodd"
|
|
502
959
|
}, null, -1)
|
|
503
|
-
])])) :
|
|
504
|
-
])) :
|
|
960
|
+
])])) : b("", !0)
|
|
961
|
+
])) : b("", !0)
|
|
505
962
|
]),
|
|
506
|
-
e.errorMessage || e.successMessage || e.helperText ? (
|
|
507
|
-
e.errorMessage ? (
|
|
963
|
+
e.errorMessage || e.successMessage || e.helperText ? (l(), s("div", ot, [
|
|
964
|
+
e.errorMessage ? (l(), s("p", {
|
|
508
965
|
key: 0,
|
|
509
966
|
id: `${o.value}-error`,
|
|
510
967
|
class: "dm-time-picker__error",
|
|
511
968
|
role: "alert"
|
|
512
|
-
}, g(e.errorMessage), 9,
|
|
969
|
+
}, g(e.errorMessage), 9, it)) : e.successMessage ? (l(), s("p", {
|
|
513
970
|
key: 1,
|
|
514
971
|
id: `${o.value}-success`,
|
|
515
972
|
class: "dm-time-picker__success"
|
|
516
|
-
}, g(e.successMessage), 9,
|
|
973
|
+
}, g(e.successMessage), 9, dt)) : e.helperText ? (l(), s("p", {
|
|
517
974
|
key: 2,
|
|
518
975
|
id: `${o.value}-helper`,
|
|
519
976
|
class: "dm-time-picker__helper"
|
|
520
|
-
}, g(e.helperText), 9,
|
|
521
|
-
])) :
|
|
977
|
+
}, g(e.helperText), 9, ct)) : b("", !0)
|
|
978
|
+
])) : b("", !0)
|
|
522
979
|
], 2));
|
|
523
980
|
}
|
|
524
|
-
}),
|
|
981
|
+
}), Lr = /* @__PURE__ */ P(ut, [["__scopeId", "data-v-b28853ee"]]), mt = {
|
|
525
982
|
key: 0,
|
|
526
983
|
class: "dm-slider__header"
|
|
527
|
-
},
|
|
984
|
+
}, vt = ["for"], ht = {
|
|
528
985
|
key: 0,
|
|
529
986
|
class: "dm-slider__required",
|
|
530
987
|
"aria-label": "obrigatório"
|
|
531
|
-
},
|
|
988
|
+
}, ft = {
|
|
532
989
|
key: 1,
|
|
533
990
|
class: "dm-slider__value"
|
|
534
|
-
},
|
|
991
|
+
}, bt = { class: "dm-slider__wrapper" }, pt = ["id", "value", "min", "max", "step", "disabled", "required", "aria-label", "aria-describedby", "aria-valuemin", "aria-valuemax", "aria-valuenow", "aria-valuetext"], gt = {
|
|
535
992
|
key: 1,
|
|
536
993
|
class: "dm-slider__range"
|
|
537
|
-
},
|
|
994
|
+
}, _t = { class: "dm-slider__min" }, yt = { class: "dm-slider__max" }, kt = {
|
|
538
995
|
key: 2,
|
|
539
996
|
class: "dm-slider__messages"
|
|
540
|
-
},
|
|
997
|
+
}, $t = ["id"], wt = ["id"], xt = /* @__PURE__ */ N({
|
|
541
998
|
__name: "DatametriaSlider",
|
|
542
999
|
props: {
|
|
543
1000
|
modelValue: {},
|
|
@@ -555,98 +1012,98 @@ const he = ["disabled", "type", "aria-busy", "aria-disabled"], be = {
|
|
|
555
1012
|
formatter: {}
|
|
556
1013
|
},
|
|
557
1014
|
emits: ["update:modelValue", "change", "input", "focus", "blur"],
|
|
558
|
-
setup(e, { expose: i, emit:
|
|
559
|
-
const
|
|
560
|
-
const
|
|
561
|
-
return (
|
|
562
|
-
}),
|
|
563
|
-
const
|
|
564
|
-
return
|
|
565
|
-
}),
|
|
566
|
-
const
|
|
567
|
-
|
|
568
|
-
},
|
|
569
|
-
const
|
|
570
|
-
|
|
571
|
-
},
|
|
572
|
-
|
|
573
|
-
},
|
|
574
|
-
|
|
575
|
-
},
|
|
576
|
-
if (
|
|
577
|
-
const
|
|
578
|
-
|
|
579
|
-
},
|
|
580
|
-
if (
|
|
581
|
-
o.value = !0,
|
|
582
|
-
const
|
|
1015
|
+
setup(e, { expose: i, emit: a }) {
|
|
1016
|
+
const t = e, n = a, r = S(), o = S(!1), d = D(() => `dm-slider-${Math.random().toString(36).substr(2, 9)}`), u = D(() => {
|
|
1017
|
+
const h = t.max - t.min;
|
|
1018
|
+
return (t.modelValue - t.min) / h * 100;
|
|
1019
|
+
}), m = D(() => t.formatter ? t.formatter(t.modelValue) : t.modelValue.toString()), y = D(() => {
|
|
1020
|
+
const h = [];
|
|
1021
|
+
return t.errorMessage ? h.push(`${d.value}-error`) : t.helperText && h.push(`${d.value}-helper`), h.length > 0 ? h.join(" ") : void 0;
|
|
1022
|
+
}), V = D(() => t.formatter ? t.formatter(t.modelValue) : `${t.modelValue}`), F = (h) => t.formatter ? t.formatter(h) : h.toString(), B = (h) => {
|
|
1023
|
+
const _ = h.target, M = parseFloat(_.value);
|
|
1024
|
+
n("update:modelValue", M), n("input", M);
|
|
1025
|
+
}, q = (h) => {
|
|
1026
|
+
const _ = h.target, M = parseFloat(_.value);
|
|
1027
|
+
n("change", M);
|
|
1028
|
+
}, $ = (h) => {
|
|
1029
|
+
n("focus", h);
|
|
1030
|
+
}, w = (h) => {
|
|
1031
|
+
n("blur", h);
|
|
1032
|
+
}, j = (h) => {
|
|
1033
|
+
if (t.disabled) return;
|
|
1034
|
+
const M = h.currentTarget.getBoundingClientRect(), A = (h.clientX - M.left) / M.width, W = t.max - t.min, v = t.min + A * W, f = Math.round(v / t.step) * t.step, T = Math.max(t.min, Math.min(t.max, f));
|
|
1035
|
+
n("update:modelValue", T), n("change", T);
|
|
1036
|
+
}, E = (h) => {
|
|
1037
|
+
if (t.disabled) return;
|
|
1038
|
+
o.value = !0, h.preventDefault();
|
|
1039
|
+
const _ = (A) => {
|
|
583
1040
|
if (!o.value) return;
|
|
584
|
-
const
|
|
585
|
-
if (!
|
|
586
|
-
const
|
|
587
|
-
|
|
588
|
-
},
|
|
589
|
-
o.value && (o.value = !1,
|
|
1041
|
+
const W = h.target.parentElement;
|
|
1042
|
+
if (!W) return;
|
|
1043
|
+
const v = W.getBoundingClientRect(), f = Math.max(0, Math.min(1, (A.clientX - v.left) / v.width)), T = t.max - t.min, C = t.min + f * T, z = Math.round(C / t.step) * t.step, Z = Math.max(t.min, Math.min(t.max, z));
|
|
1044
|
+
n("update:modelValue", Z), n("input", Z);
|
|
1045
|
+
}, M = () => {
|
|
1046
|
+
o.value && (o.value = !1, n("change", t.modelValue)), document.removeEventListener("mousemove", _), document.removeEventListener("mouseup", M);
|
|
590
1047
|
};
|
|
591
|
-
document.addEventListener("mousemove",
|
|
592
|
-
},
|
|
593
|
-
if (
|
|
594
|
-
o.value = !0,
|
|
595
|
-
const
|
|
1048
|
+
document.addEventListener("mousemove", _), document.addEventListener("mouseup", M);
|
|
1049
|
+
}, x = (h) => {
|
|
1050
|
+
if (t.disabled) return;
|
|
1051
|
+
o.value = !0, h.preventDefault();
|
|
1052
|
+
const _ = (A) => {
|
|
596
1053
|
if (!o.value) return;
|
|
597
|
-
const
|
|
598
|
-
if (!
|
|
599
|
-
const
|
|
600
|
-
|
|
601
|
-
},
|
|
602
|
-
o.value && (o.value = !1,
|
|
1054
|
+
const W = h.target.parentElement;
|
|
1055
|
+
if (!W) return;
|
|
1056
|
+
const v = W.getBoundingClientRect(), f = A.touches[0], T = Math.max(0, Math.min(1, (f.clientX - v.left) / v.width)), C = t.max - t.min, z = t.min + T * C, Z = Math.round(z / t.step) * t.step, re = Math.max(t.min, Math.min(t.max, Z));
|
|
1057
|
+
n("update:modelValue", re), n("input", re);
|
|
1058
|
+
}, M = () => {
|
|
1059
|
+
o.value && (o.value = !1, n("change", t.modelValue)), document.removeEventListener("touchmove", _), document.removeEventListener("touchend", M);
|
|
603
1060
|
};
|
|
604
|
-
document.addEventListener("touchmove",
|
|
1061
|
+
document.addEventListener("touchmove", _), document.addEventListener("touchend", M);
|
|
605
1062
|
};
|
|
606
1063
|
return i({
|
|
607
1064
|
focus: () => {
|
|
608
|
-
|
|
609
|
-
var
|
|
610
|
-
(
|
|
1065
|
+
le(() => {
|
|
1066
|
+
var h;
|
|
1067
|
+
(h = r.value) == null || h.focus();
|
|
611
1068
|
});
|
|
612
1069
|
},
|
|
613
1070
|
blur: () => {
|
|
614
|
-
var
|
|
615
|
-
(
|
|
1071
|
+
var h;
|
|
1072
|
+
(h = r.value) == null || h.blur();
|
|
616
1073
|
},
|
|
617
1074
|
inputRef: r
|
|
618
|
-
}), (
|
|
619
|
-
class:
|
|
1075
|
+
}), (h, _) => (l(), s("div", {
|
|
1076
|
+
class: R(["dm-slider", { "dm-slider--disabled": e.disabled }])
|
|
620
1077
|
}, [
|
|
621
|
-
e.label || e.showValue ? (
|
|
622
|
-
e.label ? (
|
|
1078
|
+
e.label || e.showValue ? (l(), s("div", mt, [
|
|
1079
|
+
e.label ? (l(), s("label", {
|
|
623
1080
|
key: 0,
|
|
624
|
-
for:
|
|
1081
|
+
for: d.value,
|
|
625
1082
|
class: "dm-slider__label"
|
|
626
1083
|
}, [
|
|
627
|
-
|
|
628
|
-
e.required ? (
|
|
629
|
-
], 8,
|
|
630
|
-
e.showValue ? (
|
|
631
|
-
])) :
|
|
632
|
-
|
|
633
|
-
|
|
1084
|
+
U(g(e.label) + " ", 1),
|
|
1085
|
+
e.required ? (l(), s("span", ht, "*")) : b("", !0)
|
|
1086
|
+
], 8, vt)) : b("", !0),
|
|
1087
|
+
e.showValue ? (l(), s("span", ft, g(m.value), 1)) : b("", !0)
|
|
1088
|
+
])) : b("", !0),
|
|
1089
|
+
c("div", bt, [
|
|
1090
|
+
c("div", {
|
|
634
1091
|
class: "dm-slider__track",
|
|
635
|
-
onClick:
|
|
1092
|
+
onClick: j
|
|
636
1093
|
}, [
|
|
637
|
-
|
|
1094
|
+
c("div", {
|
|
638
1095
|
class: "dm-slider__progress",
|
|
639
|
-
style:
|
|
1096
|
+
style: G({ width: `${u.value}%` })
|
|
640
1097
|
}, null, 4),
|
|
641
|
-
|
|
1098
|
+
c("div", {
|
|
642
1099
|
class: "dm-slider__thumb",
|
|
643
|
-
style:
|
|
644
|
-
onMousedown:
|
|
645
|
-
onTouchstart:
|
|
1100
|
+
style: G({ left: `${u.value}%` }),
|
|
1101
|
+
onMousedown: E,
|
|
1102
|
+
onTouchstart: x
|
|
646
1103
|
}, null, 36)
|
|
647
1104
|
]),
|
|
648
|
-
|
|
649
|
-
id:
|
|
1105
|
+
c("input", {
|
|
1106
|
+
id: d.value,
|
|
650
1107
|
ref_key: "inputRef",
|
|
651
1108
|
ref: r,
|
|
652
1109
|
type: "range",
|
|
@@ -658,314 +1115,369 @@ const he = ["disabled", "type", "aria-busy", "aria-disabled"], be = {
|
|
|
658
1115
|
disabled: e.disabled,
|
|
659
1116
|
required: e.required,
|
|
660
1117
|
"aria-label": e.ariaLabel,
|
|
661
|
-
"aria-describedby":
|
|
1118
|
+
"aria-describedby": y.value,
|
|
662
1119
|
"aria-valuemin": e.min,
|
|
663
1120
|
"aria-valuemax": e.max,
|
|
664
1121
|
"aria-valuenow": e.modelValue,
|
|
665
|
-
"aria-valuetext":
|
|
666
|
-
onInput:
|
|
667
|
-
onChange:
|
|
668
|
-
onFocus:
|
|
669
|
-
onBlur:
|
|
670
|
-
}, null, 40,
|
|
1122
|
+
"aria-valuetext": V.value,
|
|
1123
|
+
onInput: B,
|
|
1124
|
+
onChange: q,
|
|
1125
|
+
onFocus: $,
|
|
1126
|
+
onBlur: w
|
|
1127
|
+
}, null, 40, pt)
|
|
671
1128
|
]),
|
|
672
|
-
e.showMinMax ? (
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
])) :
|
|
676
|
-
e.errorMessage || e.helperText ? (
|
|
677
|
-
e.errorMessage ? (
|
|
1129
|
+
e.showMinMax ? (l(), s("div", gt, [
|
|
1130
|
+
c("span", _t, g(F(e.min)), 1),
|
|
1131
|
+
c("span", yt, g(F(e.max)), 1)
|
|
1132
|
+
])) : b("", !0),
|
|
1133
|
+
e.errorMessage || e.helperText ? (l(), s("div", kt, [
|
|
1134
|
+
e.errorMessage ? (l(), s("p", {
|
|
678
1135
|
key: 0,
|
|
679
|
-
id: `${
|
|
1136
|
+
id: `${d.value}-error`,
|
|
680
1137
|
class: "dm-slider__error",
|
|
681
1138
|
role: "alert"
|
|
682
|
-
}, g(e.errorMessage), 9,
|
|
1139
|
+
}, g(e.errorMessage), 9, $t)) : e.helperText ? (l(), s("p", {
|
|
683
1140
|
key: 1,
|
|
684
|
-
id: `${
|
|
1141
|
+
id: `${d.value}-helper`,
|
|
685
1142
|
class: "dm-slider__helper"
|
|
686
|
-
}, g(e.helperText), 9,
|
|
687
|
-
])) :
|
|
1143
|
+
}, g(e.helperText), 9, wt)) : b("", !0)
|
|
1144
|
+
])) : b("", !0)
|
|
688
1145
|
], 2));
|
|
689
1146
|
}
|
|
690
|
-
}),
|
|
1147
|
+
}), Fr = /* @__PURE__ */ P(xt, [["__scopeId", "data-v-5576db83"]]), Dt = ["accept", "multiple", "disabled"], Vt = {
|
|
691
1148
|
key: 0,
|
|
692
|
-
class: "dm-file-
|
|
693
|
-
},
|
|
694
|
-
key:
|
|
695
|
-
class: "dm-file-
|
|
696
|
-
},
|
|
1149
|
+
class: "dm-file-upload__spinner"
|
|
1150
|
+
}, Ct = {
|
|
1151
|
+
key: 1,
|
|
1152
|
+
class: "dm-file-upload__content"
|
|
1153
|
+
}, Mt = { class: "dm-file-upload__text" }, St = { class: "dm-file-upload__primary-text" }, Tt = { class: "dm-file-upload__secondary-text" }, Bt = {
|
|
697
1154
|
key: 0,
|
|
698
|
-
class: "dm-file-
|
|
699
|
-
},
|
|
1155
|
+
class: "dm-file-upload__progress"
|
|
1156
|
+
}, It = { class: "dm-file-upload__progress-track" }, Et = { class: "dm-file-upload__progress-text" }, Lt = {
|
|
700
1157
|
key: 1,
|
|
701
1158
|
class: "dm-file-upload__files"
|
|
702
|
-
},
|
|
1159
|
+
}, Ft = { class: "dm-file-upload__file-info" }, Ot = { class: "dm-file-upload__file-name" }, Rt = { class: "dm-file-upload__file-size" }, qt = ["onClick"], zt = {
|
|
703
1160
|
key: 2,
|
|
704
1161
|
class: "dm-file-upload__error"
|
|
705
|
-
},
|
|
1162
|
+
}, At = /* @__PURE__ */ N({
|
|
706
1163
|
__name: "DatametriaFileUpload",
|
|
707
1164
|
props: {
|
|
708
|
-
modelValue: {
|
|
709
|
-
label: {},
|
|
1165
|
+
modelValue: {},
|
|
710
1166
|
accept: {},
|
|
711
1167
|
multiple: { type: Boolean, default: !1 },
|
|
1168
|
+
maxSize: {},
|
|
1169
|
+
maxFiles: {},
|
|
712
1170
|
disabled: { type: Boolean, default: !1 },
|
|
713
|
-
|
|
1171
|
+
loading: { type: Boolean, default: !1 },
|
|
1172
|
+
progress: {},
|
|
1173
|
+
uploadText: {},
|
|
714
1174
|
error: {}
|
|
715
1175
|
},
|
|
716
|
-
emits: ["update:modelValue"],
|
|
1176
|
+
emits: ["update:modelValue", "file-added", "file-removed"],
|
|
717
1177
|
setup(e, { emit: i }) {
|
|
718
|
-
const
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
},
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
1178
|
+
const a = e, t = i, n = S(), r = S(!1), o = S([]), d = S(""), u = D(() => a.error || d.value), m = () => {
|
|
1179
|
+
!a.disabled && n.value && n.value.click();
|
|
1180
|
+
}, y = (E) => {
|
|
1181
|
+
const x = E.target;
|
|
1182
|
+
x.files && $(Array.from(x.files));
|
|
1183
|
+
}, V = (E) => {
|
|
1184
|
+
var O;
|
|
1185
|
+
if (E.preventDefault(), r.value = !1, a.disabled) return;
|
|
1186
|
+
const x = (O = E.dataTransfer) == null ? void 0 : O.files;
|
|
1187
|
+
x && $(Array.from(x));
|
|
1188
|
+
}, F = (E) => {
|
|
1189
|
+
E.preventDefault();
|
|
1190
|
+
}, B = (E) => {
|
|
1191
|
+
E.preventDefault(), a.disabled || (r.value = !0);
|
|
1192
|
+
}, q = (E) => {
|
|
1193
|
+
var x;
|
|
1194
|
+
E.preventDefault(), (x = E.currentTarget) != null && x.contains(E.relatedTarget) || (r.value = !1);
|
|
1195
|
+
}, $ = (E) => {
|
|
1196
|
+
if (d.value = "", a.accept) {
|
|
1197
|
+
const x = a.accept.split(",").map((p) => p.trim()), O = E.filter((p) => !x.some((h) => h.startsWith(".") ? p.name.toLowerCase().endsWith(h.toLowerCase()) : p.type.match(h.replace("*", ".*"))));
|
|
1198
|
+
if (O.length > 0) {
|
|
1199
|
+
d.value = `Invalid file type(s): ${O.map((p) => p.name).join(", ")}`;
|
|
1200
|
+
return;
|
|
1201
|
+
}
|
|
733
1202
|
}
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
1203
|
+
if (a.maxSize) {
|
|
1204
|
+
const x = E.filter((O) => O.size > a.maxSize);
|
|
1205
|
+
if (x.length > 0) {
|
|
1206
|
+
d.value = `File(s) too large: ${x.map((O) => O.name).join(", ")}`;
|
|
1207
|
+
return;
|
|
1208
|
+
}
|
|
1209
|
+
}
|
|
1210
|
+
if (a.multiple) {
|
|
1211
|
+
const x = o.value.length + E.length;
|
|
1212
|
+
if (a.maxFiles && x > a.maxFiles) {
|
|
1213
|
+
d.value = `Maximum ${a.maxFiles} files allowed`;
|
|
1214
|
+
return;
|
|
1215
|
+
}
|
|
1216
|
+
o.value.push(...E), t("update:modelValue", o.value);
|
|
1217
|
+
} else
|
|
1218
|
+
o.value = [E[0]], t("update:modelValue", E[0]);
|
|
1219
|
+
E.forEach((x) => {
|
|
1220
|
+
t("file-added", x);
|
|
1221
|
+
});
|
|
1222
|
+
}, w = (E) => {
|
|
1223
|
+
const x = o.value[E];
|
|
1224
|
+
o.value.splice(E, 1), a.multiple ? t("update:modelValue", o.value) : t("update:modelValue", o.value[0] || null), t("file-removed", x, E);
|
|
1225
|
+
}, j = (E) => {
|
|
1226
|
+
if (E === 0) return "0 Bytes";
|
|
1227
|
+
const x = 1024, O = ["Bytes", "KB", "MB", "GB"], p = Math.floor(Math.log(E) / Math.log(x));
|
|
1228
|
+
return parseFloat((E / Math.pow(x, p)).toFixed(2)) + " " + O[p];
|
|
742
1229
|
};
|
|
743
|
-
return (
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
onDragover:
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
onClick: u
|
|
1230
|
+
return (E, x) => (l(), s("div", {
|
|
1231
|
+
class: R(["dm-file-upload", { "dm-file-upload--disabled": e.disabled, "dm-file-upload--loading": e.loading }])
|
|
1232
|
+
}, [
|
|
1233
|
+
c("div", {
|
|
1234
|
+
class: R(["dm-file-upload__area", { "dm-file-upload__area--dragover": r.value }]),
|
|
1235
|
+
onClick: m,
|
|
1236
|
+
onDrop: V,
|
|
1237
|
+
onDragover: F,
|
|
1238
|
+
onDragenter: B,
|
|
1239
|
+
onDragleave: q
|
|
754
1240
|
}, [
|
|
755
|
-
|
|
756
|
-
ref_key: "
|
|
757
|
-
ref:
|
|
1241
|
+
c("input", {
|
|
1242
|
+
ref_key: "fileInputRef",
|
|
1243
|
+
ref: n,
|
|
758
1244
|
type: "file",
|
|
759
1245
|
class: "dm-file-upload__input",
|
|
760
1246
|
accept: e.accept,
|
|
761
1247
|
multiple: e.multiple,
|
|
762
1248
|
disabled: e.disabled,
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
v("path", {
|
|
774
|
-
d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4M17 8l-5-5-5 5M12 3v12",
|
|
775
|
-
"stroke-width": "2",
|
|
776
|
-
"stroke-linecap": "round",
|
|
777
|
-
"stroke-linejoin": "round"
|
|
778
|
-
})
|
|
779
|
-
], -1)),
|
|
780
|
-
p[1] || (p[1] = v("p", { class: "dm-file-upload__text" }, [
|
|
781
|
-
v("span", { class: "dm-file-upload__text--primary" }, "Clique para selecionar"),
|
|
782
|
-
A(" ou arraste arquivos aqui ")
|
|
1249
|
+
onChange: y
|
|
1250
|
+
}, null, 40, Dt),
|
|
1251
|
+
e.loading ? (l(), s("div", Vt)) : (l(), s("div", Ct, [
|
|
1252
|
+
x[0] || (x[0] = c("div", { class: "dm-file-upload__icon" }, [
|
|
1253
|
+
c("svg", {
|
|
1254
|
+
viewBox: "0 0 24 24",
|
|
1255
|
+
fill: "currentColor"
|
|
1256
|
+
}, [
|
|
1257
|
+
c("path", { d: "M14,2H6A2,2 0 0,0 4,4V20A2,2 0 0,0 6,22H18A2,2 0 0,0 20,20V8L14,2M18,20H6V4H13V9H18V20Z" })
|
|
1258
|
+
])
|
|
783
1259
|
], -1)),
|
|
784
|
-
|
|
785
|
-
|
|
1260
|
+
c("div", Mt, [
|
|
1261
|
+
c("p", St, g(e.uploadText || "Click to upload or drag and drop"), 1),
|
|
1262
|
+
c("p", Tt, g(e.accept ? `Supported formats: ${e.accept}` : "All file types supported"), 1)
|
|
1263
|
+
])
|
|
1264
|
+
]))
|
|
786
1265
|
], 34),
|
|
787
|
-
|
|
788
|
-
(
|
|
789
|
-
|
|
1266
|
+
e.progress !== void 0 ? (l(), s("div", Bt, [
|
|
1267
|
+
c("div", It, [
|
|
1268
|
+
c("div", {
|
|
1269
|
+
class: "dm-file-upload__progress-bar",
|
|
1270
|
+
style: G({ width: `${e.progress}%` })
|
|
1271
|
+
}, null, 4)
|
|
1272
|
+
]),
|
|
1273
|
+
c("span", Et, g(e.progress) + "%", 1)
|
|
1274
|
+
])) : b("", !0),
|
|
1275
|
+
o.value.length > 0 ? (l(), s("div", Lt, [
|
|
1276
|
+
(l(!0), s(K, null, X(o.value, (O, p) => (l(), s("div", {
|
|
1277
|
+
key: `${O.name}-${p}`,
|
|
790
1278
|
class: "dm-file-upload__file"
|
|
791
1279
|
}, [
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
1280
|
+
c("div", Ft, [
|
|
1281
|
+
c("span", Ot, g(O.name), 1),
|
|
1282
|
+
c("span", Rt, g(j(O.size)), 1)
|
|
1283
|
+
]),
|
|
1284
|
+
c("button", {
|
|
795
1285
|
type: "button",
|
|
796
1286
|
class: "dm-file-upload__remove",
|
|
797
|
-
onClick: (
|
|
798
|
-
|
|
799
|
-
}, "×", 8, Aa)
|
|
1287
|
+
onClick: (h) => w(p)
|
|
1288
|
+
}, " × ", 8, qt)
|
|
800
1289
|
]))), 128))
|
|
801
|
-
])) :
|
|
802
|
-
|
|
803
|
-
]));
|
|
1290
|
+
])) : b("", !0),
|
|
1291
|
+
u.value ? (l(), s("div", zt, g(u.value), 1)) : b("", !0)
|
|
1292
|
+
], 2));
|
|
804
1293
|
}
|
|
805
|
-
}),
|
|
1294
|
+
}), Or = /* @__PURE__ */ P(At, [["__scopeId", "data-v-81a7f4c1"]]), Nt = ["for"], Pt = {
|
|
806
1295
|
key: 0,
|
|
807
1296
|
class: "dm-autocomplete__required"
|
|
808
|
-
},
|
|
809
|
-
key:
|
|
1297
|
+
}, jt = { class: "dm-autocomplete__wrapper" }, Yt = ["id", "placeholder", "disabled", "required", "aria-label", "aria-expanded", "aria-controls", "aria-activedescendant"], Ut = {
|
|
1298
|
+
key: 0,
|
|
1299
|
+
class: "dm-autocomplete__loading"
|
|
1300
|
+
}, Wt = ["id"], Ht = {
|
|
1301
|
+
key: 0,
|
|
810
1302
|
class: "dm-autocomplete__no-results"
|
|
811
|
-
},
|
|
812
|
-
key:
|
|
1303
|
+
}, Kt = ["id", "aria-selected", "onClick", "onMouseenter"], Xt = {
|
|
1304
|
+
key: 2,
|
|
1305
|
+
class: "dm-autocomplete__tags"
|
|
1306
|
+
}, Gt = ["onClick"], Jt = {
|
|
1307
|
+
key: 3,
|
|
813
1308
|
class: "dm-autocomplete__error"
|
|
814
|
-
},
|
|
1309
|
+
}, Qt = /* @__PURE__ */ N({
|
|
815
1310
|
__name: "DatametriaAutocomplete",
|
|
816
1311
|
props: {
|
|
817
|
-
modelValue: {
|
|
818
|
-
options: {
|
|
1312
|
+
modelValue: {},
|
|
1313
|
+
options: {},
|
|
1314
|
+
placeholder: { default: "Search..." },
|
|
819
1315
|
label: {},
|
|
820
|
-
placeholder: {},
|
|
821
|
-
disabled: { type: Boolean, default: !1 },
|
|
822
|
-
required: { type: Boolean, default: !1 },
|
|
823
1316
|
error: {},
|
|
1317
|
+
disabled: { type: Boolean },
|
|
1318
|
+
required: { type: Boolean },
|
|
1319
|
+
loading: { type: Boolean },
|
|
1320
|
+
multiple: { type: Boolean, default: !1 },
|
|
824
1321
|
ariaLabel: {}
|
|
825
1322
|
},
|
|
826
1323
|
emits: ["update:modelValue"],
|
|
827
1324
|
setup(e, { emit: i }) {
|
|
828
|
-
const
|
|
829
|
-
(
|
|
830
|
-
)
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
}, $ = () => {
|
|
1325
|
+
const a = e, t = i, n = S(), r = S(""), o = S(!1), d = S(-1), u = S([]), m = D(() => `autocomplete-${Math.random().toString(36).substr(2, 9)}`), y = D(
|
|
1326
|
+
() => d.value >= 0 ? `${m.value}-option-${d.value}` : void 0
|
|
1327
|
+
), V = D(() => {
|
|
1328
|
+
const x = a.options.map(
|
|
1329
|
+
(O) => typeof O == "string" ? { value: O, label: O } : O
|
|
1330
|
+
);
|
|
1331
|
+
return r.value ? x.filter(
|
|
1332
|
+
(O) => O.label.toLowerCase().includes(r.value.toLowerCase())
|
|
1333
|
+
) : x;
|
|
1334
|
+
}), F = () => {
|
|
1335
|
+
o.value = !0;
|
|
1336
|
+
}, B = () => {
|
|
841
1337
|
setTimeout(() => {
|
|
842
|
-
|
|
1338
|
+
o.value = !1, d.value = -1;
|
|
843
1339
|
}, 200);
|
|
844
|
-
},
|
|
845
|
-
o.value =
|
|
846
|
-
},
|
|
847
|
-
|
|
848
|
-
u.value = !0;
|
|
849
|
-
return;
|
|
850
|
-
}
|
|
851
|
-
switch (w.key) {
|
|
1340
|
+
}, q = () => {
|
|
1341
|
+
o.value = !0, d.value = -1;
|
|
1342
|
+
}, $ = (x) => {
|
|
1343
|
+
switch (x.key) {
|
|
852
1344
|
case "ArrowDown":
|
|
853
|
-
|
|
1345
|
+
x.preventDefault(), d.value < V.value.length - 1 && d.value++;
|
|
854
1346
|
break;
|
|
855
1347
|
case "ArrowUp":
|
|
856
|
-
|
|
1348
|
+
x.preventDefault(), d.value > 0 && d.value--;
|
|
857
1349
|
break;
|
|
858
1350
|
case "Enter":
|
|
859
|
-
|
|
1351
|
+
x.preventDefault(), d.value >= 0 && w(V.value[d.value]);
|
|
860
1352
|
break;
|
|
861
1353
|
case "Escape":
|
|
862
|
-
|
|
1354
|
+
o.value = !1, d.value = -1;
|
|
863
1355
|
break;
|
|
864
1356
|
}
|
|
865
|
-
},
|
|
866
|
-
|
|
1357
|
+
}, w = (x) => {
|
|
1358
|
+
a.multiple ? u.value.find((O) => O.value === x.value) || (u.value.push(x), t("update:modelValue", u.value)) : (r.value = x.label, t("update:modelValue", x), o.value = !1);
|
|
1359
|
+
}, j = (x) => {
|
|
1360
|
+
u.value = u.value.filter((O) => O.value !== x.value), t("update:modelValue", u.value);
|
|
1361
|
+
}, E = (x) => {
|
|
1362
|
+
n.value && !n.value.contains(x.target) && (o.value = !1);
|
|
867
1363
|
};
|
|
868
|
-
return
|
|
869
|
-
document.addEventListener("click",
|
|
870
|
-
}),
|
|
871
|
-
document.removeEventListener("click",
|
|
872
|
-
}), (
|
|
1364
|
+
return te(() => {
|
|
1365
|
+
document.addEventListener("click", E);
|
|
1366
|
+
}), de(() => {
|
|
1367
|
+
document.removeEventListener("click", E);
|
|
1368
|
+
}), (x, O) => (l(), s("div", {
|
|
873
1369
|
class: "dm-autocomplete",
|
|
874
1370
|
ref_key: "autocompleteRef",
|
|
875
|
-
ref:
|
|
1371
|
+
ref: n
|
|
876
1372
|
}, [
|
|
877
|
-
e.label ? (
|
|
1373
|
+
e.label ? (l(), s("label", {
|
|
878
1374
|
key: 0,
|
|
879
|
-
for:
|
|
1375
|
+
for: m.value,
|
|
880
1376
|
class: "dm-autocomplete__label"
|
|
881
1377
|
}, [
|
|
882
|
-
|
|
883
|
-
e.required ? (
|
|
884
|
-
])) :
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
id:
|
|
888
|
-
"onUpdate:modelValue":
|
|
1378
|
+
U(g(e.label) + " ", 1),
|
|
1379
|
+
e.required ? (l(), s("span", Pt, "*")) : b("", !0)
|
|
1380
|
+
], 8, Nt)) : b("", !0),
|
|
1381
|
+
c("div", jt, [
|
|
1382
|
+
se(c("input", {
|
|
1383
|
+
id: m.value,
|
|
1384
|
+
"onUpdate:modelValue": O[0] || (O[0] = (p) => r.value = p),
|
|
889
1385
|
type: "text",
|
|
890
|
-
|
|
1386
|
+
role: "combobox",
|
|
1387
|
+
class: R(["dm-autocomplete__input", { "dm-autocomplete__input--error": e.error }]),
|
|
891
1388
|
placeholder: e.placeholder,
|
|
892
1389
|
disabled: e.disabled,
|
|
893
1390
|
required: e.required,
|
|
894
1391
|
"aria-label": e.ariaLabel,
|
|
895
|
-
"aria-expanded":
|
|
896
|
-
"aria-controls": `${
|
|
897
|
-
"aria-activedescendant":
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
}, null, 42, Ka), [
|
|
905
|
-
[ne, o.value]
|
|
1392
|
+
"aria-expanded": o.value,
|
|
1393
|
+
"aria-controls": `${m.value}-listbox`,
|
|
1394
|
+
"aria-activedescendant": y.value,
|
|
1395
|
+
onFocus: F,
|
|
1396
|
+
onBlur: B,
|
|
1397
|
+
onKeydown: $,
|
|
1398
|
+
onInput: q
|
|
1399
|
+
}, null, 42, Yt), [
|
|
1400
|
+
[oe, r.value]
|
|
906
1401
|
]),
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
class: "dm-autocomplete__dropdown",
|
|
911
|
-
role: "listbox"
|
|
912
|
-
}, [
|
|
913
|
-
(t(!0), s(U, null, K(b.value, (F, P) => (t(), s("li", {
|
|
914
|
-
key: P,
|
|
915
|
-
id: `${l}-option-${P}`,
|
|
916
|
-
class: L(["dm-autocomplete__option", { "dm-autocomplete__option--active": P === m.value }]),
|
|
917
|
-
role: "option",
|
|
918
|
-
"aria-selected": P === m.value,
|
|
919
|
-
onClick: (W) => C(F),
|
|
920
|
-
onMouseenter: (W) => m.value = P
|
|
921
|
-
}, g(F), 43, Ha))), 128))
|
|
922
|
-
], 8, Xa)) : u.value && !b.value.length ? (t(), s("div", Ga, " No results ")) : f("", !0)
|
|
1402
|
+
e.loading ? (l(), s("div", Ut, [...O[1] || (O[1] = [
|
|
1403
|
+
c("span", { class: "dm-autocomplete__spinner" }, null, -1)
|
|
1404
|
+
])])) : b("", !0)
|
|
923
1405
|
]),
|
|
924
|
-
|
|
1406
|
+
o.value ? (l(), s("div", {
|
|
1407
|
+
key: 1,
|
|
1408
|
+
id: `${m.value}-listbox`,
|
|
1409
|
+
class: "dm-autocomplete__dropdown",
|
|
1410
|
+
role: "listbox"
|
|
1411
|
+
}, [
|
|
1412
|
+
V.value.length === 0 ? (l(), s("div", Ht, " No results found ")) : b("", !0),
|
|
1413
|
+
(l(!0), s(K, null, X(V.value, (p, h) => (l(), s("div", {
|
|
1414
|
+
key: p.value,
|
|
1415
|
+
id: `${m.value}-option-${h}`,
|
|
1416
|
+
class: R(["dm-autocomplete__option", { "dm-autocomplete__option--active": h === d.value }]),
|
|
1417
|
+
role: "option",
|
|
1418
|
+
"aria-selected": h === d.value,
|
|
1419
|
+
onClick: (_) => w(p),
|
|
1420
|
+
onMouseenter: (_) => d.value = h
|
|
1421
|
+
}, g(p.label), 43, Kt))), 128))
|
|
1422
|
+
], 8, Wt)) : b("", !0),
|
|
1423
|
+
e.multiple && u.value.length > 0 ? (l(), s("div", Xt, [
|
|
1424
|
+
(l(!0), s(K, null, X(u.value, (p) => (l(), s("span", {
|
|
1425
|
+
key: p.value,
|
|
1426
|
+
class: "dm-autocomplete__tag"
|
|
1427
|
+
}, [
|
|
1428
|
+
U(g(p.label) + " ", 1),
|
|
1429
|
+
c("button", {
|
|
1430
|
+
type: "button",
|
|
1431
|
+
class: "dm-autocomplete__tag-remove",
|
|
1432
|
+
onClick: (h) => j(p)
|
|
1433
|
+
}, " × ", 8, Gt)
|
|
1434
|
+
]))), 128))
|
|
1435
|
+
])) : b("", !0),
|
|
1436
|
+
e.error ? (l(), s("div", Jt, g(e.error), 1)) : b("", !0)
|
|
925
1437
|
], 512));
|
|
926
1438
|
}
|
|
927
|
-
}),
|
|
1439
|
+
}), Rr = /* @__PURE__ */ P(Qt, [["__scopeId", "data-v-1a634995"]]), Zt = {
|
|
928
1440
|
key: 0,
|
|
929
1441
|
class: "datametria-card__header"
|
|
930
|
-
},
|
|
1442
|
+
}, el = { class: "datametria-card__title" }, al = { class: "datametria-card__content" }, tl = {
|
|
931
1443
|
key: 1,
|
|
932
1444
|
class: "datametria-card__footer"
|
|
933
|
-
},
|
|
1445
|
+
}, ll = /* @__PURE__ */ N({
|
|
934
1446
|
__name: "DatametriaCard",
|
|
935
1447
|
props: {
|
|
936
1448
|
title: {},
|
|
937
1449
|
padding: { type: Boolean, default: !0 }
|
|
938
1450
|
},
|
|
939
1451
|
setup(e) {
|
|
940
|
-
const i = e,
|
|
1452
|
+
const i = e, a = D(() => [
|
|
941
1453
|
"datametria-card",
|
|
942
1454
|
{
|
|
943
1455
|
"datametria-card--no-padding": !i.padding
|
|
944
1456
|
}
|
|
945
1457
|
]);
|
|
946
|
-
return (
|
|
947
|
-
class:
|
|
1458
|
+
return (t, n) => (l(), s("div", {
|
|
1459
|
+
class: R(a.value)
|
|
948
1460
|
}, [
|
|
949
|
-
e.title ||
|
|
950
|
-
|
|
951
|
-
|
|
1461
|
+
e.title || t.$slots.header ? (l(), s("div", Zt, [
|
|
1462
|
+
Y(t.$slots, "header", {}, () => [
|
|
1463
|
+
c("h3", el, g(e.title), 1)
|
|
952
1464
|
], !0)
|
|
953
|
-
])) :
|
|
954
|
-
|
|
955
|
-
|
|
1465
|
+
])) : b("", !0),
|
|
1466
|
+
c("div", al, [
|
|
1467
|
+
Y(t.$slots, "default", {}, void 0, !0)
|
|
956
1468
|
]),
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
])) :
|
|
1469
|
+
t.$slots.footer ? (l(), s("div", tl, [
|
|
1470
|
+
Y(t.$slots, "footer", {}, void 0, !0)
|
|
1471
|
+
])) : b("", !0)
|
|
960
1472
|
], 2));
|
|
961
1473
|
}
|
|
962
|
-
}),
|
|
1474
|
+
}), qr = /* @__PURE__ */ P(ll, [["__scopeId", "data-v-6d92b9c7"]]), sl = {
|
|
963
1475
|
key: 0,
|
|
964
1476
|
class: "datametria-modal__header"
|
|
965
|
-
},
|
|
1477
|
+
}, rl = { class: "datametria-modal__title" }, nl = { class: "datametria-modal__body" }, ol = {
|
|
966
1478
|
key: 1,
|
|
967
1479
|
class: "datametria-modal__footer"
|
|
968
|
-
},
|
|
1480
|
+
}, il = /* @__PURE__ */ N({
|
|
969
1481
|
__name: "DatametriaModal",
|
|
970
1482
|
props: {
|
|
971
1483
|
modelValue: { type: Boolean },
|
|
@@ -975,78 +1487,78 @@ const he = ["disabled", "type", "aria-busy", "aria-disabled"], be = {
|
|
|
975
1487
|
},
|
|
976
1488
|
emits: ["update:modelValue", "close"],
|
|
977
1489
|
setup(e, { emit: i }) {
|
|
978
|
-
const
|
|
979
|
-
|
|
1490
|
+
const a = e, t = i, n = () => {
|
|
1491
|
+
a.closable && (t("update:modelValue", !1), t("close"));
|
|
980
1492
|
};
|
|
981
|
-
return (r, o) => (
|
|
982
|
-
|
|
983
|
-
default:
|
|
984
|
-
e.modelValue ? (
|
|
1493
|
+
return (r, o) => (l(), ne(ce, { to: "body" }, [
|
|
1494
|
+
ue(me, { name: "modal" }, {
|
|
1495
|
+
default: ve(() => [
|
|
1496
|
+
e.modelValue ? (l(), s("div", {
|
|
985
1497
|
key: 0,
|
|
986
1498
|
class: "datametria-modal",
|
|
987
|
-
onClick:
|
|
1499
|
+
onClick: ie(n, ["self"])
|
|
988
1500
|
}, [
|
|
989
|
-
|
|
1501
|
+
c("div", {
|
|
990
1502
|
class: "datametria-modal__content",
|
|
991
|
-
style:
|
|
1503
|
+
style: G({ maxWidth: e.size })
|
|
992
1504
|
}, [
|
|
993
|
-
e.title || r.$slots.header ? (
|
|
994
|
-
|
|
995
|
-
|
|
1505
|
+
e.title || r.$slots.header ? (l(), s("div", sl, [
|
|
1506
|
+
Y(r.$slots, "header", {}, () => [
|
|
1507
|
+
c("h3", rl, g(e.title), 1)
|
|
996
1508
|
], !0),
|
|
997
|
-
e.closable ? (
|
|
1509
|
+
e.closable ? (l(), s("button", {
|
|
998
1510
|
key: 0,
|
|
999
1511
|
class: "datametria-modal__close",
|
|
1000
|
-
onClick:
|
|
1001
|
-
}, " × ")) :
|
|
1002
|
-
])) :
|
|
1003
|
-
|
|
1004
|
-
|
|
1512
|
+
onClick: n
|
|
1513
|
+
}, " × ")) : b("", !0)
|
|
1514
|
+
])) : b("", !0),
|
|
1515
|
+
c("div", nl, [
|
|
1516
|
+
Y(r.$slots, "default", {}, void 0, !0)
|
|
1005
1517
|
]),
|
|
1006
|
-
r.$slots.footer ? (
|
|
1007
|
-
|
|
1008
|
-
])) :
|
|
1518
|
+
r.$slots.footer ? (l(), s("div", ol, [
|
|
1519
|
+
Y(r.$slots, "footer", {}, void 0, !0)
|
|
1520
|
+
])) : b("", !0)
|
|
1009
1521
|
], 4)
|
|
1010
|
-
])) :
|
|
1522
|
+
])) : b("", !0)
|
|
1011
1523
|
]),
|
|
1012
1524
|
_: 3
|
|
1013
1525
|
})
|
|
1014
1526
|
]));
|
|
1015
1527
|
}
|
|
1016
|
-
}),
|
|
1528
|
+
}), zr = /* @__PURE__ */ P(il, [["__scopeId", "data-v-8a26600b"]]), dl = /* @__PURE__ */ N({
|
|
1017
1529
|
__name: "DatametriaContainer",
|
|
1018
1530
|
props: {
|
|
1019
1531
|
size: { default: "lg" },
|
|
1020
1532
|
fluid: { type: Boolean, default: !1 }
|
|
1021
1533
|
},
|
|
1022
1534
|
setup(e) {
|
|
1023
|
-
return (i,
|
|
1024
|
-
class:
|
|
1535
|
+
return (i, a) => (l(), s("div", {
|
|
1536
|
+
class: R(["dm-container", [`dm-container--${e.size}`, { "dm-container--fluid": e.fluid }]])
|
|
1025
1537
|
}, [
|
|
1026
|
-
|
|
1538
|
+
Y(i.$slots, "default", {}, void 0, !0)
|
|
1027
1539
|
], 2));
|
|
1028
1540
|
}
|
|
1029
|
-
}),
|
|
1541
|
+
}), Ar = /* @__PURE__ */ P(dl, [["__scopeId", "data-v-8f876f3f"]]), cl = /* @__PURE__ */ N({
|
|
1030
1542
|
__name: "DatametriaGrid",
|
|
1031
1543
|
props: {
|
|
1032
1544
|
cols: { default: 12 },
|
|
1033
|
-
gap: { default: "var(--dm-
|
|
1545
|
+
gap: { default: "var(--dm-spacing-4, 1rem)" }
|
|
1034
1546
|
},
|
|
1035
1547
|
setup(e) {
|
|
1036
|
-
return (i,
|
|
1548
|
+
return (i, a) => (l(), s("div", {
|
|
1037
1549
|
class: "dm-grid",
|
|
1038
|
-
style:
|
|
1550
|
+
style: G({
|
|
1039
1551
|
"--dm-grid-cols": e.cols,
|
|
1040
1552
|
"--dm-grid-gap": e.gap
|
|
1041
1553
|
})
|
|
1042
1554
|
}, [
|
|
1043
|
-
|
|
1555
|
+
Y(i.$slots, "default", {}, void 0, !0)
|
|
1044
1556
|
], 4));
|
|
1045
1557
|
}
|
|
1046
|
-
}),
|
|
1558
|
+
}), Nr = /* @__PURE__ */ P(cl, [["__scopeId", "data-v-2bb920b0"]]), ul = ["role", "aria-orientation"], ml = {
|
|
1047
1559
|
key: 0,
|
|
1048
1560
|
class: "dm-divider__label"
|
|
1049
|
-
},
|
|
1561
|
+
}, vl = /* @__PURE__ */ N({
|
|
1050
1562
|
__name: "DatametriaDivider",
|
|
1051
1563
|
props: {
|
|
1052
1564
|
orientation: { default: "horizontal" },
|
|
@@ -1054,22 +1566,22 @@ const he = ["disabled", "type", "aria-busy", "aria-disabled"], be = {
|
|
|
1054
1566
|
label: {}
|
|
1055
1567
|
},
|
|
1056
1568
|
setup(e) {
|
|
1057
|
-
return (i,
|
|
1058
|
-
class:
|
|
1569
|
+
return (i, a) => (l(), s("div", {
|
|
1570
|
+
class: R(["dm-divider", [`dm-divider--${e.orientation}`, { "dm-divider--dashed": e.dashed }]]),
|
|
1059
1571
|
role: e.orientation === "horizontal" ? "separator" : void 0,
|
|
1060
1572
|
"aria-orientation": e.orientation
|
|
1061
1573
|
}, [
|
|
1062
|
-
i.$slots.default || e.label ? (
|
|
1063
|
-
|
|
1064
|
-
|
|
1574
|
+
i.$slots.default || e.label ? (l(), s("span", ml, [
|
|
1575
|
+
Y(i.$slots, "default", {}, () => [
|
|
1576
|
+
U(g(e.label), 1)
|
|
1065
1577
|
], !0)
|
|
1066
|
-
])) :
|
|
1067
|
-
], 10,
|
|
1578
|
+
])) : b("", !0)
|
|
1579
|
+
], 10, ul));
|
|
1068
1580
|
}
|
|
1069
|
-
}),
|
|
1581
|
+
}), Pr = /* @__PURE__ */ P(vl, [["__scopeId", "data-v-24cfb5d9"]]), hl = { class: "datametria-alert__icon" }, fl = { key: 0 }, bl = { key: 1 }, pl = { key: 2 }, gl = { key: 3 }, _l = { class: "datametria-alert__content" }, yl = {
|
|
1070
1582
|
key: 0,
|
|
1071
1583
|
class: "datametria-alert__title"
|
|
1072
|
-
},
|
|
1584
|
+
}, kl = { class: "datametria-alert__message" }, $l = /* @__PURE__ */ N({
|
|
1073
1585
|
__name: "DatametriaAlert",
|
|
1074
1586
|
props: {
|
|
1075
1587
|
modelValue: { type: Boolean, default: !0 },
|
|
@@ -1082,36 +1594,36 @@ const he = ["disabled", "type", "aria-busy", "aria-disabled"], be = {
|
|
|
1082
1594
|
setup(e) {
|
|
1083
1595
|
const i = e;
|
|
1084
1596
|
if (process.env.NODE_ENV === "development") {
|
|
1085
|
-
const
|
|
1086
|
-
|
|
1597
|
+
const t = ["success", "error", "warning", "info", "primary"];
|
|
1598
|
+
t.includes(i.variant) || console.warn(`[DatametriaAlert] Invalid variant "${i.variant}". Valid options: ${t.join(", ")}`);
|
|
1087
1599
|
}
|
|
1088
|
-
const
|
|
1600
|
+
const a = D(() => [
|
|
1089
1601
|
"datametria-alert",
|
|
1090
1602
|
`datametria-alert--${i.variant}`
|
|
1091
1603
|
]);
|
|
1092
|
-
return (
|
|
1604
|
+
return (t, n) => e.modelValue ? (l(), s("div", {
|
|
1093
1605
|
key: 0,
|
|
1094
|
-
class:
|
|
1606
|
+
class: R(a.value)
|
|
1095
1607
|
}, [
|
|
1096
|
-
|
|
1097
|
-
e.variant === "success" ? (
|
|
1608
|
+
c("div", hl, [
|
|
1609
|
+
e.variant === "success" ? (l(), s("span", fl, "✓")) : e.variant === "error" ? (l(), s("span", bl, "✕")) : e.variant === "warning" ? (l(), s("span", pl, "⚠")) : (l(), s("span", gl, "ℹ"))
|
|
1098
1610
|
]),
|
|
1099
|
-
|
|
1100
|
-
e.title ? (
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1611
|
+
c("div", _l, [
|
|
1612
|
+
e.title ? (l(), s("h4", yl, g(e.title), 1)) : b("", !0),
|
|
1613
|
+
c("p", kl, [
|
|
1614
|
+
Y(t.$slots, "default", {}, () => [
|
|
1615
|
+
U(g(e.message), 1)
|
|
1104
1616
|
], !0)
|
|
1105
1617
|
])
|
|
1106
1618
|
]),
|
|
1107
|
-
e.closable ? (
|
|
1619
|
+
e.closable ? (l(), s("button", {
|
|
1108
1620
|
key: 0,
|
|
1109
1621
|
class: "datametria-alert__close",
|
|
1110
|
-
onClick:
|
|
1111
|
-
}, " × ")) :
|
|
1112
|
-
], 2)) :
|
|
1622
|
+
onClick: n[0] || (n[0] = (r) => t.$emit("update:modelValue", !1))
|
|
1623
|
+
}, " × ")) : b("", !0)
|
|
1624
|
+
], 2)) : b("", !0);
|
|
1113
1625
|
}
|
|
1114
|
-
}),
|
|
1626
|
+
}), jr = /* @__PURE__ */ P($l, [["__scopeId", "data-v-ce11a7b3"]]), wl = ["aria-live"], xl = { class: "dm-toast__content" }, Dl = { class: "dm-toast__message" }, Vl = /* @__PURE__ */ N({
|
|
1115
1627
|
__name: "DatametriaToast",
|
|
1116
1628
|
props: {
|
|
1117
1629
|
message: {},
|
|
@@ -1122,53 +1634,53 @@ const he = ["disabled", "type", "aria-busy", "aria-disabled"], be = {
|
|
|
1122
1634
|
},
|
|
1123
1635
|
emits: ["update:modelValue", "close"],
|
|
1124
1636
|
setup(e, { emit: i }) {
|
|
1125
|
-
const
|
|
1637
|
+
const a = e;
|
|
1126
1638
|
if (process.env.NODE_ENV === "development") {
|
|
1127
|
-
const
|
|
1128
|
-
|
|
1639
|
+
const u = ["success", "error", "warning", "info", "primary"];
|
|
1640
|
+
u.includes(a.variant) || console.warn(`[DatametriaToast] Invalid variant "${a.variant}". Valid options: ${u.join(", ")}`);
|
|
1129
1641
|
}
|
|
1130
|
-
const
|
|
1642
|
+
const t = i, n = S(a.modelValue);
|
|
1131
1643
|
let r = null;
|
|
1132
|
-
|
|
1133
|
-
|
|
1644
|
+
Q(() => a.modelValue, (u) => {
|
|
1645
|
+
n.value = u, u && a.duration > 0 && o();
|
|
1134
1646
|
});
|
|
1135
1647
|
const o = () => {
|
|
1136
1648
|
r && clearTimeout(r), r = setTimeout(() => {
|
|
1137
|
-
|
|
1138
|
-
},
|
|
1139
|
-
},
|
|
1140
|
-
|
|
1649
|
+
d();
|
|
1650
|
+
}, a.duration);
|
|
1651
|
+
}, d = () => {
|
|
1652
|
+
n.value = !1, t("update:modelValue", !1), t("close"), r && clearTimeout(r);
|
|
1141
1653
|
};
|
|
1142
|
-
return
|
|
1143
|
-
|
|
1144
|
-
}), (
|
|
1145
|
-
|
|
1146
|
-
default:
|
|
1147
|
-
|
|
1654
|
+
return te(() => {
|
|
1655
|
+
n.value && a.duration > 0 && o();
|
|
1656
|
+
}), (u, m) => (l(), ne(ce, { to: "body" }, [
|
|
1657
|
+
ue(me, { name: "dm-toast" }, {
|
|
1658
|
+
default: ve(() => [
|
|
1659
|
+
n.value ? (l(), s("div", {
|
|
1148
1660
|
key: 0,
|
|
1149
|
-
class:
|
|
1661
|
+
class: R(["dm-toast", `dm-toast--${e.variant}`]),
|
|
1150
1662
|
role: "alert",
|
|
1151
1663
|
"aria-live": e.variant === "error" ? "assertive" : "polite"
|
|
1152
1664
|
}, [
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
e.closable ? (
|
|
1665
|
+
c("div", xl, [
|
|
1666
|
+
c("span", Dl, g(e.message), 1),
|
|
1667
|
+
e.closable ? (l(), s("button", {
|
|
1156
1668
|
key: 0,
|
|
1157
1669
|
class: "dm-toast__close",
|
|
1158
|
-
onClick:
|
|
1670
|
+
onClick: d,
|
|
1159
1671
|
"aria-label": "Fechar"
|
|
1160
|
-
}, "×")) :
|
|
1672
|
+
}, "×")) : b("", !0)
|
|
1161
1673
|
])
|
|
1162
|
-
], 10,
|
|
1674
|
+
], 10, wl)) : b("", !0)
|
|
1163
1675
|
]),
|
|
1164
1676
|
_: 1
|
|
1165
1677
|
})
|
|
1166
1678
|
]));
|
|
1167
1679
|
}
|
|
1168
|
-
}),
|
|
1680
|
+
}), Yr = /* @__PURE__ */ P(Vl, [["__scopeId", "data-v-12133386"]]), Cl = ["id", "aria-hidden"], Ml = { class: "dm-tooltip__content" }, Sl = {
|
|
1169
1681
|
key: 0,
|
|
1170
1682
|
class: "dm-tooltip__arrow"
|
|
1171
|
-
},
|
|
1683
|
+
}, Tl = /* @__PURE__ */ N({
|
|
1172
1684
|
__name: "DatametriaTooltip",
|
|
1173
1685
|
props: {
|
|
1174
1686
|
content: {},
|
|
@@ -1183,151 +1695,151 @@ const he = ["disabled", "type", "aria-busy", "aria-disabled"], be = {
|
|
|
1183
1695
|
maxWidth: { default: "200px" }
|
|
1184
1696
|
},
|
|
1185
1697
|
emits: ["show", "hide"],
|
|
1186
|
-
setup(e, { expose: i, emit:
|
|
1187
|
-
const
|
|
1698
|
+
setup(e, { expose: i, emit: a }) {
|
|
1699
|
+
const t = e, n = a, r = S(), o = S(), d = S(!1), u = S(), m = S(), y = D(() => `dm-tooltip-${Math.random().toString(36).substr(2, 9)}`), V = S({}), F = async () => {
|
|
1188
1700
|
if (!r.value || !o.value) return;
|
|
1189
|
-
await
|
|
1190
|
-
const
|
|
1701
|
+
await le();
|
|
1702
|
+
const M = r.value.getBoundingClientRect(), A = o.value.getBoundingClientRect(), W = {
|
|
1191
1703
|
width: window.innerWidth,
|
|
1192
1704
|
height: window.innerHeight
|
|
1193
1705
|
};
|
|
1194
|
-
let
|
|
1195
|
-
switch (
|
|
1706
|
+
let v = 0, f = 0;
|
|
1707
|
+
switch (t.placement) {
|
|
1196
1708
|
case "top":
|
|
1197
1709
|
case "top-start":
|
|
1198
1710
|
case "top-end":
|
|
1199
|
-
|
|
1711
|
+
v = M.top - A.height - t.offset;
|
|
1200
1712
|
break;
|
|
1201
1713
|
case "bottom":
|
|
1202
1714
|
case "bottom-start":
|
|
1203
1715
|
case "bottom-end":
|
|
1204
|
-
|
|
1716
|
+
v = M.bottom + t.offset;
|
|
1205
1717
|
break;
|
|
1206
1718
|
case "left":
|
|
1207
|
-
|
|
1719
|
+
v = M.top + (M.height - A.height) / 2, f = M.left - A.width - t.offset;
|
|
1208
1720
|
break;
|
|
1209
1721
|
case "right":
|
|
1210
|
-
|
|
1722
|
+
v = M.top + (M.height - A.height) / 2, f = M.right + t.offset;
|
|
1211
1723
|
break;
|
|
1212
1724
|
}
|
|
1213
|
-
if (
|
|
1214
|
-
switch (
|
|
1725
|
+
if (t.placement.startsWith("top") || t.placement.startsWith("bottom"))
|
|
1726
|
+
switch (t.placement) {
|
|
1215
1727
|
case "top":
|
|
1216
1728
|
case "bottom":
|
|
1217
|
-
|
|
1729
|
+
f = M.left + (M.width - A.width) / 2;
|
|
1218
1730
|
break;
|
|
1219
1731
|
case "top-start":
|
|
1220
1732
|
case "bottom-start":
|
|
1221
|
-
|
|
1733
|
+
f = M.left;
|
|
1222
1734
|
break;
|
|
1223
1735
|
case "top-end":
|
|
1224
1736
|
case "bottom-end":
|
|
1225
|
-
|
|
1737
|
+
f = M.right - A.width;
|
|
1226
1738
|
break;
|
|
1227
1739
|
}
|
|
1228
|
-
|
|
1740
|
+
f < 0 ? f = 8 : f + A.width > W.width && (f = W.width - A.width - 8), v < 0 ? v = 8 : v + A.height > W.height && (v = W.height - A.height - 8), V.value = {
|
|
1229
1741
|
position: "fixed",
|
|
1230
|
-
top: `${
|
|
1231
|
-
left: `${
|
|
1232
|
-
maxWidth:
|
|
1742
|
+
top: `${v}px`,
|
|
1743
|
+
left: `${f}px`,
|
|
1744
|
+
maxWidth: t.maxWidth,
|
|
1233
1745
|
zIndex: "9999"
|
|
1234
1746
|
};
|
|
1747
|
+
}, B = () => {
|
|
1748
|
+
t.disabled || d.value || (clearTimeout(m.value), u.value = window.setTimeout(async () => {
|
|
1749
|
+
d.value = !0, n("show"), await F();
|
|
1750
|
+
}, t.delay));
|
|
1751
|
+
}, q = () => {
|
|
1752
|
+
clearTimeout(u.value), m.value = window.setTimeout(() => {
|
|
1753
|
+
d.value = !1, n("hide");
|
|
1754
|
+
}, t.hideDelay);
|
|
1235
1755
|
}, $ = () => {
|
|
1236
|
-
|
|
1237
|
-
u.value = !0, l("show"), await T();
|
|
1238
|
-
}, a.delay));
|
|
1239
|
-
}, C = () => {
|
|
1240
|
-
clearTimeout(m.value), b.value = window.setTimeout(() => {
|
|
1241
|
-
u.value = !1, l("hide");
|
|
1242
|
-
}, a.hideDelay);
|
|
1243
|
-
}, h = () => {
|
|
1244
|
-
a.trigger === "hover" && $();
|
|
1245
|
-
}, p = () => {
|
|
1246
|
-
a.trigger === "hover" && C();
|
|
1756
|
+
t.trigger === "hover" && B();
|
|
1247
1757
|
}, w = () => {
|
|
1248
|
-
|
|
1249
|
-
},
|
|
1250
|
-
|
|
1251
|
-
},
|
|
1252
|
-
|
|
1253
|
-
}, P = () => {
|
|
1254
|
-
T();
|
|
1255
|
-
}, W = () => {
|
|
1256
|
-
M.value = {};
|
|
1758
|
+
t.trigger === "hover" && q();
|
|
1759
|
+
}, j = () => {
|
|
1760
|
+
t.trigger === "focus" && B();
|
|
1761
|
+
}, E = () => {
|
|
1762
|
+
t.trigger === "focus" && q();
|
|
1257
1763
|
}, x = () => {
|
|
1258
|
-
|
|
1259
|
-
},
|
|
1260
|
-
|
|
1764
|
+
t.trigger === "click" && (d.value ? q() : B());
|
|
1765
|
+
}, O = () => {
|
|
1766
|
+
F();
|
|
1767
|
+
}, p = () => {
|
|
1768
|
+
V.value = {};
|
|
1769
|
+
}, h = () => {
|
|
1770
|
+
d.value && F();
|
|
1771
|
+
}, _ = () => {
|
|
1772
|
+
d.value && F();
|
|
1261
1773
|
};
|
|
1262
|
-
return
|
|
1263
|
-
window.addEventListener("resize",
|
|
1264
|
-
}),
|
|
1265
|
-
clearTimeout(
|
|
1774
|
+
return te(() => {
|
|
1775
|
+
window.addEventListener("resize", h), window.addEventListener("scroll", _, !0);
|
|
1776
|
+
}), de(() => {
|
|
1777
|
+
clearTimeout(u.value), clearTimeout(m.value), window.removeEventListener("resize", h), window.removeEventListener("scroll", _, !0);
|
|
1266
1778
|
}), i({
|
|
1267
|
-
show:
|
|
1268
|
-
hide:
|
|
1269
|
-
isVisible:
|
|
1270
|
-
}), (
|
|
1779
|
+
show: B,
|
|
1780
|
+
hide: q,
|
|
1781
|
+
isVisible: D(() => d.value)
|
|
1782
|
+
}), (M, A) => (l(), s("div", {
|
|
1271
1783
|
ref_key: "triggerRef",
|
|
1272
1784
|
ref: r,
|
|
1273
1785
|
class: "dm-tooltip-trigger",
|
|
1274
|
-
onMouseenter:
|
|
1275
|
-
onMouseleave:
|
|
1276
|
-
onFocus:
|
|
1277
|
-
onBlur:
|
|
1278
|
-
onClick:
|
|
1786
|
+
onMouseenter: $,
|
|
1787
|
+
onMouseleave: w,
|
|
1788
|
+
onFocus: j,
|
|
1789
|
+
onBlur: E,
|
|
1790
|
+
onClick: x
|
|
1279
1791
|
}, [
|
|
1280
|
-
|
|
1281
|
-
(
|
|
1282
|
-
|
|
1792
|
+
Y(M.$slots, "default", {}, void 0, !0),
|
|
1793
|
+
(l(), ne(ce, { to: "body" }, [
|
|
1794
|
+
ue(me, {
|
|
1283
1795
|
name: "tooltip",
|
|
1284
|
-
onEnter:
|
|
1285
|
-
onLeave:
|
|
1796
|
+
onEnter: O,
|
|
1797
|
+
onLeave: p
|
|
1286
1798
|
}, {
|
|
1287
|
-
default:
|
|
1288
|
-
|
|
1799
|
+
default: ve(() => [
|
|
1800
|
+
d.value ? (l(), s("div", {
|
|
1289
1801
|
key: 0,
|
|
1290
1802
|
ref_key: "tooltipRef",
|
|
1291
1803
|
ref: o,
|
|
1292
|
-
id:
|
|
1293
|
-
class:
|
|
1804
|
+
id: y.value,
|
|
1805
|
+
class: R(["dm-tooltip", [
|
|
1294
1806
|
`dm-tooltip--${e.placement}`,
|
|
1295
1807
|
`dm-tooltip--${e.variant}`,
|
|
1296
1808
|
{ "dm-tooltip--arrow": e.showArrow }
|
|
1297
1809
|
]]),
|
|
1298
|
-
style:
|
|
1810
|
+
style: G(V.value),
|
|
1299
1811
|
role: "tooltip",
|
|
1300
|
-
"aria-hidden": !
|
|
1812
|
+
"aria-hidden": !d.value
|
|
1301
1813
|
}, [
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1814
|
+
c("div", Ml, [
|
|
1815
|
+
Y(M.$slots, "content", {}, () => [
|
|
1816
|
+
U(g(e.content), 1)
|
|
1305
1817
|
], !0)
|
|
1306
1818
|
]),
|
|
1307
|
-
e.showArrow ? (
|
|
1308
|
-
], 14,
|
|
1819
|
+
e.showArrow ? (l(), s("div", Sl)) : b("", !0)
|
|
1820
|
+
], 14, Cl)) : b("", !0)
|
|
1309
1821
|
]),
|
|
1310
1822
|
_: 3
|
|
1311
1823
|
})
|
|
1312
1824
|
]))
|
|
1313
1825
|
], 544));
|
|
1314
1826
|
}
|
|
1315
|
-
}),
|
|
1827
|
+
}), Ur = /* @__PURE__ */ P(Tl, [["__scopeId", "data-v-ea043383"]]), Bl = ["aria-label"], Il = {
|
|
1316
1828
|
key: 0,
|
|
1317
1829
|
class: "datametria-skeleton__text"
|
|
1318
|
-
},
|
|
1830
|
+
}, El = {
|
|
1319
1831
|
key: 1,
|
|
1320
1832
|
class: "datametria-skeleton__avatar shimmer"
|
|
1321
|
-
},
|
|
1833
|
+
}, Ll = {
|
|
1322
1834
|
key: 2,
|
|
1323
1835
|
class: "datametria-skeleton__card"
|
|
1324
|
-
},
|
|
1836
|
+
}, Fl = {
|
|
1325
1837
|
key: 3,
|
|
1326
1838
|
class: "datametria-skeleton__button shimmer"
|
|
1327
|
-
},
|
|
1839
|
+
}, Ol = {
|
|
1328
1840
|
key: 4,
|
|
1329
1841
|
class: "datametria-skeleton__custom shimmer"
|
|
1330
|
-
},
|
|
1842
|
+
}, Rl = /* @__PURE__ */ N({
|
|
1331
1843
|
__name: "DatametriaSkeleton",
|
|
1332
1844
|
props: {
|
|
1333
1845
|
variant: { default: "text" },
|
|
@@ -1339,41 +1851,41 @@ const he = ["disabled", "type", "aria-busy", "aria-disabled"], be = {
|
|
|
1339
1851
|
lastLineWidth: { default: 75 }
|
|
1340
1852
|
},
|
|
1341
1853
|
setup(e) {
|
|
1342
|
-
const i = e,
|
|
1343
|
-
const
|
|
1344
|
-
return i.width && (
|
|
1345
|
-
}),
|
|
1346
|
-
width:
|
|
1347
|
-
marginBottom:
|
|
1854
|
+
const i = e, a = D(() => {
|
|
1855
|
+
const n = {};
|
|
1856
|
+
return i.width && (n.width = typeof i.width == "number" ? `${i.width}px` : i.width), i.height && (n.height = typeof i.height == "number" ? `${i.height}px` : i.height), n;
|
|
1857
|
+
}), t = (n) => ({
|
|
1858
|
+
width: n === i.lines ? `${i.lastLineWidth}%` : "100%",
|
|
1859
|
+
marginBottom: n < i.lines ? "0.5rem" : "0"
|
|
1348
1860
|
});
|
|
1349
|
-
return (
|
|
1350
|
-
class:
|
|
1861
|
+
return (n, r) => (l(), s("div", {
|
|
1862
|
+
class: R(["datametria-skeleton", [
|
|
1351
1863
|
`datametria-skeleton--${e.variant}`,
|
|
1352
1864
|
{ "datametria-skeleton--animated": e.animated }
|
|
1353
1865
|
]]),
|
|
1354
|
-
style:
|
|
1866
|
+
style: G(a.value),
|
|
1355
1867
|
"aria-label": e.ariaLabel,
|
|
1356
1868
|
role: "status",
|
|
1357
1869
|
"aria-live": "polite"
|
|
1358
1870
|
}, [
|
|
1359
|
-
e.variant === "text" ? (
|
|
1360
|
-
(
|
|
1871
|
+
e.variant === "text" ? (l(), s("div", Il, [
|
|
1872
|
+
(l(!0), s(K, null, X(e.lines, (o) => (l(), s("div", {
|
|
1361
1873
|
key: o,
|
|
1362
1874
|
class: "datametria-skeleton__line shimmer",
|
|
1363
|
-
style:
|
|
1875
|
+
style: G(t(o))
|
|
1364
1876
|
}, null, 4))), 128))
|
|
1365
|
-
])) : e.variant === "avatar" ? (
|
|
1366
|
-
|
|
1367
|
-
])])) : e.variant === "button" ? (
|
|
1368
|
-
], 14,
|
|
1877
|
+
])) : e.variant === "avatar" ? (l(), s("div", El)) : e.variant === "card" ? (l(), s("div", Ll, [...r[0] || (r[0] = [
|
|
1878
|
+
De('<div class="datametria-skeleton__card-header shimmer" data-v-07f00442></div><div class="datametria-skeleton__card-content" data-v-07f00442><div class="datametria-skeleton__line shimmer" style="width:100%;" data-v-07f00442></div><div class="datametria-skeleton__line shimmer" style="width:80%;" data-v-07f00442></div><div class="datametria-skeleton__line shimmer" style="width:60%;" data-v-07f00442></div></div>', 2)
|
|
1879
|
+
])])) : e.variant === "button" ? (l(), s("div", Fl)) : (l(), s("div", Ol))
|
|
1880
|
+
], 14, Bl));
|
|
1369
1881
|
}
|
|
1370
|
-
}),
|
|
1882
|
+
}), Wr = /* @__PURE__ */ P(Rl, [["__scopeId", "data-v-07f00442"]]), ql = { class: "dm-progress" }, zl = {
|
|
1371
1883
|
key: 0,
|
|
1372
1884
|
class: "dm-progress__header"
|
|
1373
|
-
},
|
|
1885
|
+
}, Al = { class: "dm-progress__label" }, Nl = {
|
|
1374
1886
|
key: 0,
|
|
1375
1887
|
class: "dm-progress__value"
|
|
1376
|
-
},
|
|
1888
|
+
}, Pl = ["aria-valuenow", "aria-label"], jl = /* @__PURE__ */ N({
|
|
1377
1889
|
__name: "DatametriaProgress",
|
|
1378
1890
|
props: {
|
|
1379
1891
|
value: {},
|
|
@@ -1383,13 +1895,13 @@ const he = ["disabled", "type", "aria-busy", "aria-disabled"], be = {
|
|
|
1383
1895
|
ariaLabel: {}
|
|
1384
1896
|
},
|
|
1385
1897
|
setup(e) {
|
|
1386
|
-
const i = e,
|
|
1387
|
-
return (
|
|
1388
|
-
e.label ? (
|
|
1389
|
-
|
|
1390
|
-
e.showValue ? (
|
|
1391
|
-
])) :
|
|
1392
|
-
|
|
1898
|
+
const i = e, a = D(() => Math.min(Math.max(i.value, 0), 100));
|
|
1899
|
+
return (t, n) => (l(), s("div", ql, [
|
|
1900
|
+
e.label ? (l(), s("div", zl, [
|
|
1901
|
+
c("span", Al, g(e.label), 1),
|
|
1902
|
+
e.showValue ? (l(), s("span", Nl, g(e.value) + "%", 1)) : b("", !0)
|
|
1903
|
+
])) : b("", !0),
|
|
1904
|
+
c("div", {
|
|
1393
1905
|
class: "dm-progress__track",
|
|
1394
1906
|
role: "progressbar",
|
|
1395
1907
|
"aria-valuenow": e.value,
|
|
@@ -1397,17 +1909,17 @@ const he = ["disabled", "type", "aria-busy", "aria-disabled"], be = {
|
|
|
1397
1909
|
"aria-valuemax": 100,
|
|
1398
1910
|
"aria-label": e.ariaLabel || e.label
|
|
1399
1911
|
}, [
|
|
1400
|
-
|
|
1401
|
-
class:
|
|
1402
|
-
style:
|
|
1912
|
+
c("div", {
|
|
1913
|
+
class: R(["dm-progress__bar", `dm-progress__bar--${e.variant}`]),
|
|
1914
|
+
style: G({ width: `${a.value}%` })
|
|
1403
1915
|
}, null, 6)
|
|
1404
|
-
], 8,
|
|
1916
|
+
], 8, Pl)
|
|
1405
1917
|
]));
|
|
1406
1918
|
}
|
|
1407
|
-
}),
|
|
1919
|
+
}), Hr = /* @__PURE__ */ P(jl, [["__scopeId", "data-v-0fca73d6"]]), Yl = ["aria-label"], Ul = {
|
|
1408
1920
|
key: 0,
|
|
1409
1921
|
class: "dm-spinner__label"
|
|
1410
|
-
},
|
|
1922
|
+
}, Wl = /* @__PURE__ */ N({
|
|
1411
1923
|
__name: "DatametriaSpinner",
|
|
1412
1924
|
props: {
|
|
1413
1925
|
size: { default: "md" },
|
|
@@ -1416,16 +1928,16 @@ const he = ["disabled", "type", "aria-busy", "aria-disabled"], be = {
|
|
|
1416
1928
|
ariaLabel: { default: "Carregando" }
|
|
1417
1929
|
},
|
|
1418
1930
|
setup(e) {
|
|
1419
|
-
return (i,
|
|
1420
|
-
class:
|
|
1931
|
+
return (i, a) => (l(), s("div", {
|
|
1932
|
+
class: R(["dm-spinner", [`dm-spinner--${e.size}`, `dm-spinner--${e.variant}`]]),
|
|
1421
1933
|
role: "status",
|
|
1422
1934
|
"aria-label": e.ariaLabel
|
|
1423
1935
|
}, [
|
|
1424
|
-
|
|
1936
|
+
a[0] || (a[0] = c("svg", {
|
|
1425
1937
|
class: "dm-spinner__svg",
|
|
1426
1938
|
viewBox: "0 0 50 50"
|
|
1427
1939
|
}, [
|
|
1428
|
-
|
|
1940
|
+
c("circle", {
|
|
1429
1941
|
class: "dm-spinner__circle",
|
|
1430
1942
|
cx: "25",
|
|
1431
1943
|
cy: "25",
|
|
@@ -1434,91 +1946,379 @@ const he = ["disabled", "type", "aria-busy", "aria-disabled"], be = {
|
|
|
1434
1946
|
"stroke-width": "4"
|
|
1435
1947
|
})
|
|
1436
1948
|
], -1)),
|
|
1437
|
-
e.label ? (
|
|
1438
|
-
], 10,
|
|
1949
|
+
e.label ? (l(), s("span", Ul, g(e.label), 1)) : b("", !0)
|
|
1950
|
+
], 10, Yl));
|
|
1439
1951
|
}
|
|
1440
|
-
}),
|
|
1952
|
+
}), Kr = /* @__PURE__ */ P(Wl, [["__scopeId", "data-v-86b6d4d5"]]), Hl = { class: "datametria-table" }, Kl = { class: "datametria-table__table" }, Xl = { class: "datametria-table__thead" }, Gl = { class: "datametria-table__tbody" }, Jl = {
|
|
1441
1953
|
key: 0,
|
|
1442
1954
|
class: "datametria-table__empty"
|
|
1443
|
-
},
|
|
1955
|
+
}, Ql = /* @__PURE__ */ N({
|
|
1444
1956
|
__name: "DatametriaTable",
|
|
1445
1957
|
props: {
|
|
1446
1958
|
columns: {},
|
|
1447
1959
|
data: {}
|
|
1448
1960
|
},
|
|
1449
1961
|
setup(e) {
|
|
1450
|
-
return (i,
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
(
|
|
1455
|
-
key:
|
|
1962
|
+
return (i, a) => (l(), s("div", Hl, [
|
|
1963
|
+
c("table", Kl, [
|
|
1964
|
+
c("thead", Xl, [
|
|
1965
|
+
c("tr", null, [
|
|
1966
|
+
(l(!0), s(K, null, X(e.columns, (t) => (l(), s("th", {
|
|
1967
|
+
key: t.key,
|
|
1456
1968
|
class: "datametria-table__th",
|
|
1457
|
-
style:
|
|
1458
|
-
}, g(
|
|
1969
|
+
style: G({ width: t.width })
|
|
1970
|
+
}, g(t.label), 5))), 128))
|
|
1459
1971
|
])
|
|
1460
1972
|
]),
|
|
1461
|
-
|
|
1462
|
-
(
|
|
1463
|
-
key:
|
|
1973
|
+
c("tbody", Gl, [
|
|
1974
|
+
(l(!0), s(K, null, X(e.data, (t, n) => (l(), s("tr", {
|
|
1975
|
+
key: n,
|
|
1464
1976
|
class: "datametria-table__tr"
|
|
1465
1977
|
}, [
|
|
1466
|
-
(
|
|
1978
|
+
(l(!0), s(K, null, X(e.columns, (r) => (l(), s("td", {
|
|
1467
1979
|
key: r.key,
|
|
1468
1980
|
class: "datametria-table__td"
|
|
1469
1981
|
}, [
|
|
1470
|
-
|
|
1471
|
-
row:
|
|
1472
|
-
value:
|
|
1982
|
+
Y(i.$slots, `cell-${r.key}`, {
|
|
1983
|
+
row: t,
|
|
1984
|
+
value: t[r.key]
|
|
1473
1985
|
}, () => [
|
|
1474
|
-
|
|
1986
|
+
U(g(t[r.key]), 1)
|
|
1475
1987
|
], !0)
|
|
1476
1988
|
]))), 128))
|
|
1477
1989
|
]))), 128))
|
|
1478
1990
|
])
|
|
1479
1991
|
]),
|
|
1480
|
-
e.data.length === 0 ? (
|
|
1481
|
-
|
|
1482
|
-
|
|
1992
|
+
e.data.length === 0 ? (l(), s("div", Jl, [
|
|
1993
|
+
Y(i.$slots, "empty", {}, () => [
|
|
1994
|
+
a[0] || (a[0] = U("Nenhum dado disponível", -1))
|
|
1483
1995
|
], !0)
|
|
1484
|
-
])) :
|
|
1996
|
+
])) : b("", !0)
|
|
1485
1997
|
]));
|
|
1486
1998
|
}
|
|
1487
|
-
}),
|
|
1999
|
+
}), Xr = /* @__PURE__ */ P(Ql, [["__scopeId", "data-v-3a563348"]]), Zl = { class: "datametria-sortable-table" }, es = {
|
|
2000
|
+
key: 0,
|
|
2001
|
+
class: "datametria-sortable-table__search"
|
|
2002
|
+
}, as = { class: "datametria-sortable-table__wrapper" }, ts = {
|
|
2003
|
+
class: "datametria-sortable-table__table",
|
|
2004
|
+
role: "table"
|
|
2005
|
+
}, ls = { class: "datametria-sortable-table__thead" }, ss = { role: "row" }, rs = {
|
|
2006
|
+
key: 0,
|
|
2007
|
+
class: "datametria-sortable-table__th datametria-sortable-table__th--checkbox",
|
|
2008
|
+
role: "columnheader"
|
|
2009
|
+
}, ns = ["checked", "indeterminate"], os = ["aria-sort", "onClick", "onKeydown", "tabindex"], is = { class: "datametria-sortable-table__th-content" }, ds = {
|
|
2010
|
+
key: 0,
|
|
2011
|
+
class: "datametria-sortable-table__sort-icon",
|
|
2012
|
+
"aria-hidden": "true"
|
|
2013
|
+
}, cs = { key: 0 }, us = {
|
|
1488
2014
|
key: 1,
|
|
1489
|
-
class: "
|
|
1490
|
-
},
|
|
2015
|
+
class: "datametria-sortable-table__sort-icon--inactive"
|
|
2016
|
+
}, ms = ["onUpdate:modelValue", "placeholder", "aria-label"], vs = { class: "datametria-sortable-table__tbody" }, hs = {
|
|
2017
|
+
key: 0,
|
|
2018
|
+
class: "datametria-sortable-table__td datametria-sortable-table__td--checkbox",
|
|
2019
|
+
role: "cell"
|
|
2020
|
+
}, fs = ["checked", "aria-label", "onChange"], bs = {
|
|
2021
|
+
key: 0,
|
|
2022
|
+
class: "datametria-sortable-table__empty",
|
|
2023
|
+
role: "status"
|
|
2024
|
+
}, ps = {
|
|
2025
|
+
key: 1,
|
|
2026
|
+
class: "datametria-sortable-table__pagination",
|
|
2027
|
+
role: "navigation",
|
|
2028
|
+
"aria-label": "Paginação da tabela"
|
|
2029
|
+
}, gs = {
|
|
2030
|
+
class: "datametria-sortable-table__pagination-info",
|
|
2031
|
+
"aria-live": "polite"
|
|
2032
|
+
}, _s = { key: 0 }, ys = { class: "datametria-sortable-table__pagination-controls" }, ks = ["value"], $s = ["disabled"], ws = ["disabled"], xs = {
|
|
2033
|
+
class: "datametria-sortable-table__pagination-pages",
|
|
2034
|
+
"aria-current": "page"
|
|
2035
|
+
}, Ds = ["disabled"], Vs = ["disabled"], Cs = /* @__PURE__ */ N({
|
|
2036
|
+
__name: "DatametriaSortableTable",
|
|
2037
|
+
props: {
|
|
2038
|
+
columns: {},
|
|
2039
|
+
data: {},
|
|
2040
|
+
selectable: { type: Boolean, default: !1 },
|
|
2041
|
+
searchable: { type: Boolean, default: !0 },
|
|
2042
|
+
filterable: { type: Boolean, default: !0 },
|
|
2043
|
+
paginated: { type: Boolean, default: !0 },
|
|
2044
|
+
pageSize: { default: 10 },
|
|
2045
|
+
pageSizeOptions: { default: () => [5, 10, 25, 50, 100] }
|
|
2046
|
+
},
|
|
2047
|
+
emits: ["selection-change"],
|
|
2048
|
+
setup(e, { emit: i }) {
|
|
2049
|
+
const a = e;
|
|
2050
|
+
process.env.NODE_ENV === "development" && ((!a.columns || a.columns.length === 0) && console.warn("[DatametriaSortableTable] No columns provided"), a.data || console.warn("[DatametriaSortableTable] No data provided"));
|
|
2051
|
+
const t = i, n = S(""), r = S(""), o = S("asc"), d = S({}), u = S(/* @__PURE__ */ new Set()), m = S(1), y = S(a.pageSize), V = D(() => {
|
|
2052
|
+
let p = [...a.data];
|
|
2053
|
+
if (n.value) {
|
|
2054
|
+
const h = n.value.toLowerCase();
|
|
2055
|
+
p = p.filter(
|
|
2056
|
+
(_) => Object.values(_).some(
|
|
2057
|
+
(M) => String(M).toLowerCase().includes(h)
|
|
2058
|
+
)
|
|
2059
|
+
);
|
|
2060
|
+
}
|
|
2061
|
+
return Object.entries(d.value).forEach(([h, _]) => {
|
|
2062
|
+
if (_) {
|
|
2063
|
+
const M = _.toLowerCase();
|
|
2064
|
+
p = p.filter(
|
|
2065
|
+
(A) => String(A[h]).toLowerCase().includes(M)
|
|
2066
|
+
);
|
|
2067
|
+
}
|
|
2068
|
+
}), r.value && p.sort((h, _) => {
|
|
2069
|
+
const M = h[r.value], A = _[r.value];
|
|
2070
|
+
if (M === A) return 0;
|
|
2071
|
+
const W = M > A ? 1 : -1;
|
|
2072
|
+
return o.value === "asc" ? W : -W;
|
|
2073
|
+
}), p;
|
|
2074
|
+
}), F = D(
|
|
2075
|
+
() => Math.ceil(V.value.length / y.value)
|
|
2076
|
+
), B = D(
|
|
2077
|
+
() => (m.value - 1) * y.value
|
|
2078
|
+
), q = D(
|
|
2079
|
+
() => Math.min(B.value + y.value, V.value.length)
|
|
2080
|
+
), $ = D(() => a.paginated ? V.value.slice(B.value, q.value) : V.value), w = D(
|
|
2081
|
+
() => $.value.length > 0 && $.value.every((p) => u.value.has(p.id || a.data.indexOf(p)))
|
|
2082
|
+
), j = D(
|
|
2083
|
+
() => u.value.size > 0 && !w.value
|
|
2084
|
+
), E = (p) => {
|
|
2085
|
+
r.value === p ? o.value = o.value === "asc" ? "desc" : "asc" : (r.value = p, o.value = "asc");
|
|
2086
|
+
}, x = (p) => {
|
|
2087
|
+
u.value.has(p) ? u.value.delete(p) : u.value.add(p), t("selection-change", Array.from(u.value));
|
|
2088
|
+
}, O = () => {
|
|
2089
|
+
w.value ? $.value.forEach((p) => {
|
|
2090
|
+
u.value.delete(p.id || a.data.indexOf(p));
|
|
2091
|
+
}) : $.value.forEach((p) => {
|
|
2092
|
+
u.value.add(p.id || a.data.indexOf(p));
|
|
2093
|
+
}), t("selection-change", Array.from(u.value));
|
|
2094
|
+
};
|
|
2095
|
+
return Q([n, d], () => {
|
|
2096
|
+
m.value = 1;
|
|
2097
|
+
}, { deep: !0 }), Q(F, (p) => {
|
|
2098
|
+
m.value > p && p > 0 && (m.value = p);
|
|
2099
|
+
}), (p, h) => (l(), s("div", Zl, [
|
|
2100
|
+
e.searchable ? (l(), s("div", es, [
|
|
2101
|
+
se(c("input", {
|
|
2102
|
+
"onUpdate:modelValue": h[0] || (h[0] = (_) => n.value = _),
|
|
2103
|
+
type: "text",
|
|
2104
|
+
placeholder: "Buscar...",
|
|
2105
|
+
class: "datametria-sortable-table__search-input",
|
|
2106
|
+
"aria-label": "Buscar na tabela"
|
|
2107
|
+
}, null, 512), [
|
|
2108
|
+
[oe, n.value]
|
|
2109
|
+
])
|
|
2110
|
+
])) : b("", !0),
|
|
2111
|
+
c("div", as, [
|
|
2112
|
+
c("table", ts, [
|
|
2113
|
+
c("thead", ls, [
|
|
2114
|
+
c("tr", ss, [
|
|
2115
|
+
e.selectable ? (l(), s("th", rs, [
|
|
2116
|
+
c("input", {
|
|
2117
|
+
type: "checkbox",
|
|
2118
|
+
checked: w.value,
|
|
2119
|
+
indeterminate: j.value,
|
|
2120
|
+
"aria-label": "Selecionar todas as linhas",
|
|
2121
|
+
onChange: O
|
|
2122
|
+
}, null, 40, ns)
|
|
2123
|
+
])) : b("", !0),
|
|
2124
|
+
(l(!0), s(K, null, X(e.columns, (_) => (l(), s("th", {
|
|
2125
|
+
key: _.key,
|
|
2126
|
+
class: R(["datametria-sortable-table__th", { "datametria-sortable-table__th--sortable": _.sortable !== !1 }]),
|
|
2127
|
+
style: G({ width: _.width }),
|
|
2128
|
+
role: "columnheader",
|
|
2129
|
+
"aria-sort": r.value === _.key ? o.value === "asc" ? "ascending" : "descending" : "none",
|
|
2130
|
+
onClick: (M) => _.sortable !== !1 && E(_.key),
|
|
2131
|
+
onKeydown: [
|
|
2132
|
+
he((M) => _.sortable !== !1 && E(_.key), ["enter"]),
|
|
2133
|
+
he(ie((M) => _.sortable !== !1 && E(_.key), ["prevent"]), ["space"])
|
|
2134
|
+
],
|
|
2135
|
+
tabindex: _.sortable !== !1 ? 0 : void 0
|
|
2136
|
+
}, [
|
|
2137
|
+
c("div", is, [
|
|
2138
|
+
c("span", null, g(_.label), 1),
|
|
2139
|
+
_.sortable !== !1 ? (l(), s("span", ds, [
|
|
2140
|
+
r.value === _.key ? (l(), s("span", cs, g(o.value === "asc" ? "↑" : "↓"), 1)) : (l(), s("span", us, "↕"))
|
|
2141
|
+
])) : b("", !0)
|
|
2142
|
+
]),
|
|
2143
|
+
e.filterable && _.filterable !== !1 ? se((l(), s("input", {
|
|
2144
|
+
key: 0,
|
|
2145
|
+
"onUpdate:modelValue": (M) => d.value[_.key] = M,
|
|
2146
|
+
type: "text",
|
|
2147
|
+
placeholder: `Filtrar ${_.label}...`,
|
|
2148
|
+
"aria-label": `Filtrar por ${_.label}`,
|
|
2149
|
+
class: "datametria-sortable-table__filter-input",
|
|
2150
|
+
onClick: h[1] || (h[1] = ie(() => {
|
|
2151
|
+
}, ["stop"]))
|
|
2152
|
+
}, null, 8, ms)), [
|
|
2153
|
+
[oe, d.value[_.key]]
|
|
2154
|
+
]) : b("", !0)
|
|
2155
|
+
], 46, os))), 128))
|
|
2156
|
+
])
|
|
2157
|
+
]),
|
|
2158
|
+
c("tbody", vs, [
|
|
2159
|
+
(l(!0), s(K, null, X($.value, (_, M) => (l(), s("tr", {
|
|
2160
|
+
key: _.id || M,
|
|
2161
|
+
class: R(["datametria-sortable-table__tr", { "datametria-sortable-table__tr--selected": u.value.has(_.id || M) }]),
|
|
2162
|
+
role: "row"
|
|
2163
|
+
}, [
|
|
2164
|
+
e.selectable ? (l(), s("td", hs, [
|
|
2165
|
+
c("input", {
|
|
2166
|
+
type: "checkbox",
|
|
2167
|
+
checked: u.value.has(_.id || M),
|
|
2168
|
+
"aria-label": `Selecionar linha ${M + 1}`,
|
|
2169
|
+
onChange: (A) => x(_.id || M)
|
|
2170
|
+
}, null, 40, fs)
|
|
2171
|
+
])) : b("", !0),
|
|
2172
|
+
(l(!0), s(K, null, X(e.columns, (A) => (l(), s("td", {
|
|
2173
|
+
key: A.key,
|
|
2174
|
+
class: "datametria-sortable-table__td",
|
|
2175
|
+
role: "cell"
|
|
2176
|
+
}, [
|
|
2177
|
+
Y(p.$slots, `cell-${A.key}`, {
|
|
2178
|
+
row: _,
|
|
2179
|
+
value: _[A.key]
|
|
2180
|
+
}, () => [
|
|
2181
|
+
U(g(_[A.key]), 1)
|
|
2182
|
+
], !0)
|
|
2183
|
+
]))), 128))
|
|
2184
|
+
], 2))), 128))
|
|
2185
|
+
])
|
|
2186
|
+
]),
|
|
2187
|
+
V.value.length === 0 ? (l(), s("div", bs, [
|
|
2188
|
+
Y(p.$slots, "empty", {}, () => [
|
|
2189
|
+
h[7] || (h[7] = U("Nenhum dado encontrado", -1))
|
|
2190
|
+
], !0)
|
|
2191
|
+
])) : b("", !0)
|
|
2192
|
+
]),
|
|
2193
|
+
e.paginated && V.value.length > 0 ? (l(), s("div", ps, [
|
|
2194
|
+
c("div", gs, [
|
|
2195
|
+
U(" Mostrando " + g(B.value + 1) + " - " + g(q.value) + " de " + g(V.value.length) + " registros ", 1),
|
|
2196
|
+
u.value.size > 0 ? (l(), s("span", _s, "(" + g(u.value.size) + " selecionados)", 1)) : b("", !0)
|
|
2197
|
+
]),
|
|
2198
|
+
c("div", ys, [
|
|
2199
|
+
se(c("select", {
|
|
2200
|
+
"onUpdate:modelValue": h[2] || (h[2] = (_) => y.value = _),
|
|
2201
|
+
class: "datametria-sortable-table__page-size",
|
|
2202
|
+
"aria-label": "Itens por página"
|
|
2203
|
+
}, [
|
|
2204
|
+
(l(!0), s(K, null, X(e.pageSizeOptions, (_) => (l(), s("option", {
|
|
2205
|
+
key: _,
|
|
2206
|
+
value: _
|
|
2207
|
+
}, g(_) + " por página ", 9, ks))), 128))
|
|
2208
|
+
], 512), [
|
|
2209
|
+
[
|
|
2210
|
+
Ve,
|
|
2211
|
+
y.value,
|
|
2212
|
+
void 0,
|
|
2213
|
+
{ number: !0 }
|
|
2214
|
+
]
|
|
2215
|
+
]),
|
|
2216
|
+
c("button", {
|
|
2217
|
+
class: "datametria-sortable-table__pagination-btn",
|
|
2218
|
+
disabled: m.value === 1,
|
|
2219
|
+
"aria-label": "Primeira página",
|
|
2220
|
+
onClick: h[3] || (h[3] = (_) => m.value = 1)
|
|
2221
|
+
}, " «« ", 8, $s),
|
|
2222
|
+
c("button", {
|
|
2223
|
+
class: "datametria-sortable-table__pagination-btn",
|
|
2224
|
+
disabled: m.value === 1,
|
|
2225
|
+
"aria-label": "Página anterior",
|
|
2226
|
+
onClick: h[4] || (h[4] = (_) => m.value--)
|
|
2227
|
+
}, " ‹ ", 8, ws),
|
|
2228
|
+
c("span", xs, " Página " + g(m.value) + " de " + g(F.value), 1),
|
|
2229
|
+
c("button", {
|
|
2230
|
+
class: "datametria-sortable-table__pagination-btn",
|
|
2231
|
+
disabled: m.value === F.value,
|
|
2232
|
+
"aria-label": "Próxima página",
|
|
2233
|
+
onClick: h[5] || (h[5] = (_) => m.value++)
|
|
2234
|
+
}, " › ", 8, Ds),
|
|
2235
|
+
c("button", {
|
|
2236
|
+
class: "datametria-sortable-table__pagination-btn",
|
|
2237
|
+
disabled: m.value === F.value,
|
|
2238
|
+
"aria-label": "Última página",
|
|
2239
|
+
onClick: h[6] || (h[6] = (_) => m.value = F.value)
|
|
2240
|
+
}, " »» ", 8, Vs)
|
|
2241
|
+
])
|
|
2242
|
+
])) : b("", !0)
|
|
2243
|
+
]));
|
|
2244
|
+
}
|
|
2245
|
+
}), Gr = /* @__PURE__ */ P(Cs, [["__scopeId", "data-v-a37e62fc"]]), Ms = ["src", "alt"], Ss = {
|
|
2246
|
+
key: 2,
|
|
2247
|
+
class: "dm-avatar__icon"
|
|
2248
|
+
}, Ts = {
|
|
2249
|
+
key: 3,
|
|
2250
|
+
class: "dm-avatar__loading"
|
|
2251
|
+
}, Bs = /* @__PURE__ */ N({
|
|
1491
2252
|
__name: "DatametriaAvatar",
|
|
1492
2253
|
props: {
|
|
1493
2254
|
src: {},
|
|
1494
2255
|
name: {},
|
|
1495
2256
|
alt: {},
|
|
1496
2257
|
size: { default: "md" },
|
|
1497
|
-
|
|
1498
|
-
|
|
2258
|
+
variant: { default: "circular" },
|
|
2259
|
+
backgroundColor: {},
|
|
2260
|
+
textColor: {},
|
|
2261
|
+
clickable: { type: Boolean, default: !1 },
|
|
2262
|
+
loading: { type: Boolean, default: !1 },
|
|
2263
|
+
badge: { type: Boolean, default: !1 },
|
|
2264
|
+
status: {}
|
|
1499
2265
|
},
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
2266
|
+
emits: ["click"],
|
|
2267
|
+
setup(e, { emit: i }) {
|
|
2268
|
+
const a = e, t = i, n = S(!1), r = D(() => {
|
|
2269
|
+
if (!a.name) return "";
|
|
2270
|
+
const V = a.name.split(" ");
|
|
2271
|
+
return V.length === 1 ? V[0].charAt(0).toUpperCase() : V[0].charAt(0).toUpperCase() + V[V.length - 1].charAt(0).toUpperCase();
|
|
2272
|
+
}), o = D(() => [
|
|
2273
|
+
`dm-avatar--${a.size}`,
|
|
2274
|
+
`dm-avatar--${a.variant}`,
|
|
2275
|
+
{
|
|
2276
|
+
"dm-avatar--clickable": a.clickable,
|
|
2277
|
+
"dm-avatar--loading": a.loading
|
|
2278
|
+
}
|
|
2279
|
+
]), d = D(() => ({
|
|
2280
|
+
backgroundColor: a.backgroundColor || "var(--dm-primary, #0072ce)"
|
|
2281
|
+
})), u = (V) => {
|
|
2282
|
+
a.clickable && t("click", V);
|
|
2283
|
+
}, m = () => {
|
|
1506
2284
|
n.value = !0;
|
|
2285
|
+
}, y = () => {
|
|
2286
|
+
n.value = !1;
|
|
1507
2287
|
};
|
|
1508
|
-
return (
|
|
1509
|
-
class:
|
|
1510
|
-
|
|
2288
|
+
return (V, F) => (l(), s("div", {
|
|
2289
|
+
class: R(["dm-avatar", o.value]),
|
|
2290
|
+
style: G(d.value),
|
|
2291
|
+
onClick: u
|
|
1511
2292
|
}, [
|
|
1512
|
-
e.src ? (
|
|
2293
|
+
e.src && !n.value ? (l(), s("img", {
|
|
1513
2294
|
key: 0,
|
|
1514
2295
|
src: e.src,
|
|
1515
|
-
alt: e.alt || e.name
|
|
2296
|
+
alt: e.alt || `${e.name} avatar`,
|
|
1516
2297
|
class: "dm-avatar__image",
|
|
1517
|
-
onError:
|
|
1518
|
-
|
|
1519
|
-
|
|
2298
|
+
onError: m,
|
|
2299
|
+
onLoad: y
|
|
2300
|
+
}, null, 40, Ms)) : e.name && !e.loading ? (l(), s("div", {
|
|
2301
|
+
key: 1,
|
|
2302
|
+
class: "dm-avatar__initials",
|
|
2303
|
+
style: G({ color: e.textColor })
|
|
2304
|
+
}, g(r.value), 5)) : e.loading ? b("", !0) : (l(), s("div", Ss, [...F[0] || (F[0] = [
|
|
2305
|
+
c("svg", {
|
|
2306
|
+
viewBox: "0 0 24 24",
|
|
2307
|
+
fill: "currentColor"
|
|
2308
|
+
}, [
|
|
2309
|
+
c("path", { d: "M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z" })
|
|
2310
|
+
], -1)
|
|
2311
|
+
])])),
|
|
2312
|
+
e.loading ? (l(), s("div", Ts, [...F[1] || (F[1] = [
|
|
2313
|
+
c("div", { class: "dm-avatar__spinner" }, null, -1)
|
|
2314
|
+
])])) : b("", !0),
|
|
2315
|
+
e.badge && e.status ? (l(), s("div", {
|
|
2316
|
+
key: 4,
|
|
2317
|
+
class: R(["dm-avatar__badge", `dm-avatar__badge--${e.status}`])
|
|
2318
|
+
}, null, 2)) : b("", !0)
|
|
2319
|
+
], 6));
|
|
1520
2320
|
}
|
|
1521
|
-
}),
|
|
2321
|
+
}), Jr = /* @__PURE__ */ P(Bs, [["__scopeId", "data-v-dcba5fa2"]]), Is = ["aria-label"], Es = /* @__PURE__ */ N({
|
|
1522
2322
|
__name: "DatametriaBadge",
|
|
1523
2323
|
props: {
|
|
1524
2324
|
label: {},
|
|
@@ -1529,22 +2329,22 @@ const he = ["disabled", "type", "aria-busy", "aria-disabled"], be = {
|
|
|
1529
2329
|
setup(e) {
|
|
1530
2330
|
const i = e;
|
|
1531
2331
|
if (process.env.NODE_ENV === "development") {
|
|
1532
|
-
const
|
|
1533
|
-
|
|
2332
|
+
const a = ["primary", "secondary", "success", "warning", "error", "info"];
|
|
2333
|
+
a.includes(i.variant) || console.warn(`[DatametriaBadge] Invalid variant "${i.variant}". Valid options: ${a.join(", ")}`);
|
|
1534
2334
|
}
|
|
1535
|
-
return (
|
|
1536
|
-
class:
|
|
2335
|
+
return (a, t) => (l(), s("span", {
|
|
2336
|
+
class: R(["dm-badge", [`dm-badge--${e.variant}`, `dm-badge--${e.size}`]]),
|
|
1537
2337
|
"aria-label": e.ariaLabel
|
|
1538
2338
|
}, [
|
|
1539
|
-
|
|
1540
|
-
|
|
2339
|
+
Y(a.$slots, "default", {}, () => [
|
|
2340
|
+
U(g(e.label), 1)
|
|
1541
2341
|
], !0)
|
|
1542
|
-
], 10,
|
|
2342
|
+
], 10, Is));
|
|
1543
2343
|
}
|
|
1544
|
-
}),
|
|
2344
|
+
}), Qr = /* @__PURE__ */ P(Es, [["__scopeId", "data-v-62a21600"]]), Ls = ["role", "tabindex", "onKeydown"], Fs = {
|
|
1545
2345
|
key: 0,
|
|
1546
2346
|
class: "dm-chip__icon"
|
|
1547
|
-
},
|
|
2347
|
+
}, Os = { class: "dm-chip__label" }, Rs = /* @__PURE__ */ N({
|
|
1548
2348
|
__name: "DatametriaChip",
|
|
1549
2349
|
props: {
|
|
1550
2350
|
label: {},
|
|
@@ -1554,50 +2354,50 @@ const he = ["disabled", "type", "aria-busy", "aria-disabled"], be = {
|
|
|
1554
2354
|
},
|
|
1555
2355
|
emits: ["click", "close"],
|
|
1556
2356
|
setup(e, { emit: i }) {
|
|
1557
|
-
const
|
|
2357
|
+
const a = e;
|
|
1558
2358
|
if (process.env.NODE_ENV === "development") {
|
|
1559
2359
|
const o = ["primary", "secondary", "success", "warning", "error"];
|
|
1560
|
-
o.includes(
|
|
2360
|
+
o.includes(a.variant) || console.warn(`[DatametriaChip] Invalid variant "${a.variant}". Valid options: ${o.join(", ")}`);
|
|
1561
2361
|
}
|
|
1562
|
-
const
|
|
1563
|
-
|
|
2362
|
+
const t = i, n = () => {
|
|
2363
|
+
t("click");
|
|
1564
2364
|
}, r = () => {
|
|
1565
|
-
|
|
2365
|
+
t("close");
|
|
1566
2366
|
};
|
|
1567
|
-
return (o,
|
|
1568
|
-
class:
|
|
2367
|
+
return (o, d) => (l(), s("div", {
|
|
2368
|
+
class: R(["dm-chip", [`dm-chip--${e.variant}`, { "dm-chip--clickable": e.clickable }]]),
|
|
1569
2369
|
role: e.clickable ? "button" : void 0,
|
|
1570
2370
|
tabindex: e.clickable ? 0 : void 0,
|
|
1571
|
-
onClick:
|
|
2371
|
+
onClick: n,
|
|
1572
2372
|
onKeydown: [
|
|
1573
|
-
|
|
1574
|
-
|
|
2373
|
+
he(n, ["enter"]),
|
|
2374
|
+
he(ie(n, ["prevent"]), ["space"])
|
|
1575
2375
|
]
|
|
1576
2376
|
}, [
|
|
1577
|
-
o.$slots.icon ? (
|
|
1578
|
-
|
|
1579
|
-
])) :
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
|
|
2377
|
+
o.$slots.icon ? (l(), s("span", Fs, [
|
|
2378
|
+
Y(o.$slots, "icon", {}, void 0, !0)
|
|
2379
|
+
])) : b("", !0),
|
|
2380
|
+
c("span", Os, [
|
|
2381
|
+
Y(o.$slots, "default", {}, () => [
|
|
2382
|
+
U(g(e.label), 1)
|
|
1583
2383
|
], !0)
|
|
1584
2384
|
]),
|
|
1585
|
-
e.closable ? (
|
|
2385
|
+
e.closable ? (l(), s("button", {
|
|
1586
2386
|
key: 1,
|
|
1587
2387
|
class: "dm-chip__close",
|
|
1588
|
-
onClick:
|
|
2388
|
+
onClick: ie(r, ["stop"]),
|
|
1589
2389
|
"aria-label": "Remover",
|
|
1590
2390
|
type: "button"
|
|
1591
|
-
}, "×")) :
|
|
1592
|
-
], 42,
|
|
2391
|
+
}, "×")) : b("", !0)
|
|
2392
|
+
], 42, Ls));
|
|
1593
2393
|
}
|
|
1594
|
-
}),
|
|
2394
|
+
}), Zr = /* @__PURE__ */ P(Rs, [["__scopeId", "data-v-6a4ff5cc"]]), qs = ["aria-label"], zs = { class: "dm-navbar__container" }, As = { class: "dm-navbar__brand" }, Ns = {
|
|
1595
2395
|
href: "/",
|
|
1596
2396
|
class: "dm-navbar__logo"
|
|
1597
|
-
},
|
|
2397
|
+
}, Ps = ["aria-expanded"], js = {
|
|
1598
2398
|
key: 1,
|
|
1599
2399
|
class: "dm-navbar__actions"
|
|
1600
|
-
},
|
|
2400
|
+
}, Ys = /* @__PURE__ */ N({
|
|
1601
2401
|
__name: "DatametriaNavbar",
|
|
1602
2402
|
props: {
|
|
1603
2403
|
brand: { default: "" },
|
|
@@ -1613,60 +2413,60 @@ const he = ["disabled", "type", "aria-busy", "aria-disabled"], be = {
|
|
|
1613
2413
|
const r = ["light", "dark", "transparent", "primary"];
|
|
1614
2414
|
r.includes(i.variant) || console.warn(`[DatametriaNavbar] Invalid variant "${i.variant}". Valid options: ${r.join(", ")}`);
|
|
1615
2415
|
}
|
|
1616
|
-
const
|
|
2416
|
+
const a = D(() => [
|
|
1617
2417
|
"dm-navbar",
|
|
1618
2418
|
`dm-navbar--${i.variant}`,
|
|
1619
2419
|
{ "dm-navbar--sticky": i.sticky },
|
|
1620
2420
|
{ "dm-navbar--transparent": i.transparent },
|
|
1621
2421
|
{ "dm-navbar--bordered": i.bordered }
|
|
1622
|
-
]),
|
|
1623
|
-
|
|
2422
|
+
]), t = S(!1), n = () => {
|
|
2423
|
+
t.value = !t.value;
|
|
1624
2424
|
};
|
|
1625
|
-
return (r, o) => (
|
|
1626
|
-
class:
|
|
2425
|
+
return (r, o) => (l(), s("nav", {
|
|
2426
|
+
class: R(a.value),
|
|
1627
2427
|
role: "navigation",
|
|
1628
2428
|
"aria-label": i.ariaLabel
|
|
1629
2429
|
}, [
|
|
1630
|
-
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
|
|
2430
|
+
c("div", zs, [
|
|
2431
|
+
c("div", As, [
|
|
2432
|
+
Y(r.$slots, "brand", {}, () => [
|
|
2433
|
+
c("a", Ns, g(e.brand), 1)
|
|
1634
2434
|
], !0)
|
|
1635
2435
|
]),
|
|
1636
|
-
r.$slots.menu ? (
|
|
2436
|
+
r.$slots.menu ? (l(), s("button", {
|
|
1637
2437
|
key: 0,
|
|
1638
2438
|
class: "dm-navbar__toggle",
|
|
1639
|
-
"aria-expanded":
|
|
2439
|
+
"aria-expanded": t.value,
|
|
1640
2440
|
"aria-controls": "navbar-menu",
|
|
1641
|
-
onClick:
|
|
2441
|
+
onClick: n
|
|
1642
2442
|
}, [...o[0] || (o[0] = [
|
|
1643
|
-
|
|
1644
|
-
])], 8,
|
|
1645
|
-
|
|
2443
|
+
c("span", { class: "dm-navbar__toggle-icon" }, null, -1)
|
|
2444
|
+
])], 8, Ps)) : b("", !0),
|
|
2445
|
+
c("div", {
|
|
1646
2446
|
id: "navbar-menu",
|
|
1647
|
-
class:
|
|
2447
|
+
class: R(["dm-navbar__menu", { "dm-navbar__menu--open": t.value }])
|
|
1648
2448
|
}, [
|
|
1649
|
-
|
|
2449
|
+
Y(r.$slots, "menu", {}, void 0, !0)
|
|
1650
2450
|
], 2),
|
|
1651
|
-
r.$slots.actions ? (
|
|
1652
|
-
|
|
1653
|
-
])) :
|
|
2451
|
+
r.$slots.actions ? (l(), s("div", js, [
|
|
2452
|
+
Y(r.$slots, "actions", {}, void 0, !0)
|
|
2453
|
+
])) : b("", !0)
|
|
1654
2454
|
])
|
|
1655
|
-
], 10,
|
|
2455
|
+
], 10, qs));
|
|
1656
2456
|
}
|
|
1657
|
-
}),
|
|
2457
|
+
}), en = /* @__PURE__ */ P(Ys, [["__scopeId", "data-v-e6e1ff80"]]), Us = ["aria-expanded", "aria-controls"], Ws = ["disabled"], Hs = ["id", "aria-labelledby"], Ks = { class: "dm-menu__content" }, Xs = ["tabindex", "aria-disabled", "onClick", "onMouseenter"], Gs = {
|
|
1658
2458
|
key: 0,
|
|
1659
2459
|
class: "dm-menu__divider"
|
|
1660
|
-
},
|
|
2460
|
+
}, Js = {
|
|
1661
2461
|
key: 0,
|
|
1662
2462
|
class: "dm-menu__item-icon"
|
|
1663
|
-
},
|
|
2463
|
+
}, Qs = { class: "dm-menu__item-content" }, Zs = { class: "dm-menu__item-label" }, er = {
|
|
1664
2464
|
key: 0,
|
|
1665
2465
|
class: "dm-menu__item-description"
|
|
1666
|
-
},
|
|
2466
|
+
}, ar = {
|
|
1667
2467
|
key: 1,
|
|
1668
2468
|
class: "dm-menu__item-shortcut"
|
|
1669
|
-
},
|
|
2469
|
+
}, tr = /* @__PURE__ */ N({
|
|
1670
2470
|
__name: "DatametriaMenu",
|
|
1671
2471
|
props: {
|
|
1672
2472
|
items: { default: () => [] },
|
|
@@ -1679,252 +2479,252 @@ const he = ["disabled", "type", "aria-busy", "aria-disabled"], be = {
|
|
|
1679
2479
|
offset: { default: 4 }
|
|
1680
2480
|
},
|
|
1681
2481
|
emits: ["open", "close", "item-click"],
|
|
1682
|
-
setup(e, { expose: i, emit:
|
|
1683
|
-
const
|
|
2482
|
+
setup(e, { expose: i, emit: a }) {
|
|
2483
|
+
const t = e, n = a, r = S(), o = S(), d = S(!1), u = S(-1), m = D(() => `dm-menu-${Math.random().toString(36).substr(2, 9)}`), y = D(() => `dm-menu-trigger-${Math.random().toString(36).substr(2, 9)}`), V = S({}), F = async () => {
|
|
1684
2484
|
if (!r.value || !o.value) return;
|
|
1685
|
-
await
|
|
1686
|
-
const
|
|
2485
|
+
await le();
|
|
2486
|
+
const v = r.value.getBoundingClientRect(), f = o.value.getBoundingClientRect(), T = {
|
|
1687
2487
|
width: window.innerWidth,
|
|
1688
2488
|
height: window.innerHeight
|
|
1689
2489
|
};
|
|
1690
|
-
let
|
|
1691
|
-
switch (
|
|
2490
|
+
let C = 0, z = 0;
|
|
2491
|
+
switch (t.placement) {
|
|
1692
2492
|
case "bottom-start":
|
|
1693
|
-
|
|
2493
|
+
C = v.bottom + t.offset, z = v.left;
|
|
1694
2494
|
break;
|
|
1695
2495
|
case "bottom-end":
|
|
1696
|
-
|
|
2496
|
+
C = v.bottom + t.offset, z = v.right - f.width;
|
|
1697
2497
|
break;
|
|
1698
2498
|
case "top-start":
|
|
1699
|
-
|
|
2499
|
+
C = v.top - f.height - t.offset, z = v.left;
|
|
1700
2500
|
break;
|
|
1701
2501
|
case "top-end":
|
|
1702
|
-
|
|
2502
|
+
C = v.top - f.height - t.offset, z = v.right - f.width;
|
|
1703
2503
|
break;
|
|
1704
2504
|
case "left":
|
|
1705
|
-
|
|
2505
|
+
C = v.top, z = v.left - f.width - t.offset;
|
|
1706
2506
|
break;
|
|
1707
2507
|
case "right":
|
|
1708
|
-
|
|
2508
|
+
C = v.top, z = v.right + t.offset;
|
|
1709
2509
|
break;
|
|
1710
2510
|
}
|
|
1711
|
-
|
|
1712
|
-
const
|
|
1713
|
-
|
|
2511
|
+
z < 8 ? z = 8 : z + f.width > T.width - 8 && (z = T.width - f.width - 8), C < 8 ? C = 8 : C + f.height > T.height - 8 && (C = T.height - f.height - 8);
|
|
2512
|
+
const Z = t.fullWidth ? `${v.width}px` : "auto";
|
|
2513
|
+
V.value = {
|
|
1714
2514
|
position: "fixed",
|
|
1715
|
-
top: `${
|
|
1716
|
-
left: `${
|
|
1717
|
-
width:
|
|
2515
|
+
top: `${C}px`,
|
|
2516
|
+
left: `${z}px`,
|
|
2517
|
+
width: Z,
|
|
1718
2518
|
zIndex: "9999"
|
|
1719
2519
|
};
|
|
1720
|
-
},
|
|
1721
|
-
|
|
1722
|
-
const
|
|
1723
|
-
|
|
2520
|
+
}, B = async () => {
|
|
2521
|
+
t.disabled || d.value || (d.value = !0, u.value = -1, n("open"), await F(), le(() => {
|
|
2522
|
+
const v = t.items.findIndex((f) => !f.disabled && !f.divider);
|
|
2523
|
+
v !== -1 && (u.value = v);
|
|
1724
2524
|
}));
|
|
1725
|
-
},
|
|
1726
|
-
|
|
1727
|
-
var
|
|
1728
|
-
(
|
|
2525
|
+
}, q = () => {
|
|
2526
|
+
d.value && (d.value = !1, u.value = -1, n("close"), le(() => {
|
|
2527
|
+
var v;
|
|
2528
|
+
(v = r.value) == null || v.focus();
|
|
1729
2529
|
}));
|
|
1730
|
-
},
|
|
1731
|
-
|
|
1732
|
-
},
|
|
1733
|
-
|
|
1734
|
-
},
|
|
1735
|
-
switch (
|
|
2530
|
+
}, $ = () => {
|
|
2531
|
+
d.value ? q() : B();
|
|
2532
|
+
}, w = () => {
|
|
2533
|
+
$();
|
|
2534
|
+
}, j = (v) => {
|
|
2535
|
+
switch (v.key) {
|
|
1736
2536
|
case "Enter":
|
|
1737
2537
|
case " ":
|
|
1738
2538
|
case "ArrowDown":
|
|
1739
|
-
|
|
2539
|
+
v.preventDefault(), B();
|
|
1740
2540
|
break;
|
|
1741
2541
|
case "ArrowUp":
|
|
1742
|
-
|
|
1743
|
-
var
|
|
1744
|
-
const
|
|
1745
|
-
|
|
2542
|
+
v.preventDefault(), B(), le(() => {
|
|
2543
|
+
var T;
|
|
2544
|
+
const f = ((T = t.items.map((C, z) => ({ item: C, index: z })).filter(({ item: C }) => !C.disabled && !C.divider).pop()) == null ? void 0 : T.index) ?? -1;
|
|
2545
|
+
f !== -1 && (u.value = f);
|
|
1746
2546
|
});
|
|
1747
2547
|
break;
|
|
1748
2548
|
case "Escape":
|
|
1749
|
-
|
|
2549
|
+
q();
|
|
1750
2550
|
break;
|
|
1751
2551
|
}
|
|
1752
|
-
},
|
|
1753
|
-
switch (
|
|
2552
|
+
}, E = (v) => {
|
|
2553
|
+
switch (v.key) {
|
|
1754
2554
|
case "ArrowDown":
|
|
1755
|
-
|
|
2555
|
+
v.preventDefault(), x();
|
|
1756
2556
|
break;
|
|
1757
2557
|
case "ArrowUp":
|
|
1758
|
-
|
|
2558
|
+
v.preventDefault(), O();
|
|
1759
2559
|
break;
|
|
1760
2560
|
case "Enter":
|
|
1761
2561
|
case " ":
|
|
1762
|
-
if (
|
|
1763
|
-
const
|
|
1764
|
-
|
|
2562
|
+
if (v.preventDefault(), u.value !== -1) {
|
|
2563
|
+
const f = t.items[u.value];
|
|
2564
|
+
p(f, u.value);
|
|
1765
2565
|
}
|
|
1766
2566
|
break;
|
|
1767
2567
|
case "Escape":
|
|
1768
|
-
|
|
2568
|
+
v.preventDefault(), q();
|
|
1769
2569
|
break;
|
|
1770
2570
|
case "Tab":
|
|
1771
|
-
|
|
2571
|
+
q();
|
|
1772
2572
|
break;
|
|
1773
2573
|
}
|
|
1774
|
-
},
|
|
1775
|
-
const
|
|
1776
|
-
if (
|
|
1777
|
-
const
|
|
1778
|
-
|
|
1779
|
-
}, P = () => {
|
|
1780
|
-
const d = a.items.map((_, I) => ({ item: _, index: I })).filter(({ item: _ }) => !_.disabled && !_.divider).map(({ index: _ }) => _);
|
|
1781
|
-
if (d.length === 0) return;
|
|
1782
|
-
const c = d.indexOf(m.value), y = c === -1 ? d.length - 1 : (c - 1 + d.length) % d.length;
|
|
1783
|
-
m.value = d[y];
|
|
1784
|
-
}, W = (d, c) => {
|
|
1785
|
-
d.disabled || d.divider || (l("item-click", d, c), d.action && d.action(), a.closeOnItemClick && C());
|
|
1786
|
-
}, x = (d) => {
|
|
1787
|
-
d.stopPropagation();
|
|
1788
|
-
}, q = () => {
|
|
1789
|
-
T();
|
|
1790
|
-
}, D = () => {
|
|
1791
|
-
M.value = {};
|
|
1792
|
-
}, N = (d) => {
|
|
1793
|
-
var y, _;
|
|
1794
|
-
if (!u.value) return;
|
|
1795
|
-
const c = d.target;
|
|
1796
|
-
(y = r.value) != null && y.contains(c) || (_ = o.value) != null && _.contains(c) || C();
|
|
2574
|
+
}, x = () => {
|
|
2575
|
+
const v = t.items.map((C, z) => ({ item: C, index: z })).filter(({ item: C }) => !C.disabled && !C.divider).map(({ index: C }) => C);
|
|
2576
|
+
if (v.length === 0) return;
|
|
2577
|
+
const f = v.indexOf(u.value), T = f === -1 ? 0 : (f + 1) % v.length;
|
|
2578
|
+
u.value = v[T];
|
|
1797
2579
|
}, O = () => {
|
|
1798
|
-
|
|
2580
|
+
const v = t.items.map((C, z) => ({ item: C, index: z })).filter(({ item: C }) => !C.disabled && !C.divider).map(({ index: C }) => C);
|
|
2581
|
+
if (v.length === 0) return;
|
|
2582
|
+
const f = v.indexOf(u.value), T = f === -1 ? v.length - 1 : (f - 1 + v.length) % v.length;
|
|
2583
|
+
u.value = v[T];
|
|
2584
|
+
}, p = (v, f) => {
|
|
2585
|
+
v.disabled || v.divider || (n("item-click", v, f), v.action && v.action(), t.closeOnItemClick && q());
|
|
2586
|
+
}, h = (v) => {
|
|
2587
|
+
v.stopPropagation();
|
|
2588
|
+
}, _ = () => {
|
|
2589
|
+
F();
|
|
2590
|
+
}, M = () => {
|
|
2591
|
+
V.value = {};
|
|
2592
|
+
}, A = (v) => {
|
|
2593
|
+
var T, C;
|
|
2594
|
+
if (!d.value) return;
|
|
2595
|
+
const f = v.target;
|
|
2596
|
+
(T = r.value) != null && T.contains(f) || (C = o.value) != null && C.contains(f) || q();
|
|
2597
|
+
}, W = () => {
|
|
2598
|
+
d.value && F();
|
|
1799
2599
|
};
|
|
1800
|
-
return
|
|
1801
|
-
document.addEventListener("click",
|
|
1802
|
-
}),
|
|
1803
|
-
document.removeEventListener("click",
|
|
1804
|
-
}),
|
|
1805
|
-
|
|
2600
|
+
return te(() => {
|
|
2601
|
+
document.addEventListener("click", A), window.addEventListener("resize", W);
|
|
2602
|
+
}), de(() => {
|
|
2603
|
+
document.removeEventListener("click", A), window.removeEventListener("resize", W);
|
|
2604
|
+
}), Q(() => t.items, () => {
|
|
2605
|
+
u.value >= t.items.length && (u.value = -1);
|
|
1806
2606
|
}), i({
|
|
1807
|
-
open:
|
|
1808
|
-
close:
|
|
1809
|
-
toggle:
|
|
1810
|
-
isOpen:
|
|
1811
|
-
}), (
|
|
1812
|
-
class:
|
|
2607
|
+
open: B,
|
|
2608
|
+
close: q,
|
|
2609
|
+
toggle: $,
|
|
2610
|
+
isOpen: D(() => d.value)
|
|
2611
|
+
}), (v, f) => (l(), s("div", {
|
|
2612
|
+
class: R(["dm-menu", { "dm-menu--disabled": e.disabled }])
|
|
1813
2613
|
}, [
|
|
1814
|
-
|
|
2614
|
+
c("div", {
|
|
1815
2615
|
ref_key: "triggerRef",
|
|
1816
2616
|
ref: r,
|
|
1817
2617
|
class: "dm-menu__trigger",
|
|
1818
|
-
"aria-expanded":
|
|
2618
|
+
"aria-expanded": d.value,
|
|
1819
2619
|
"aria-haspopup": !0,
|
|
1820
|
-
"aria-controls":
|
|
1821
|
-
onClick:
|
|
1822
|
-
onKeydown:
|
|
2620
|
+
"aria-controls": m.value,
|
|
2621
|
+
onClick: w,
|
|
2622
|
+
onKeydown: j
|
|
1823
2623
|
}, [
|
|
1824
|
-
|
|
1825
|
-
isOpen:
|
|
1826
|
-
toggle:
|
|
2624
|
+
Y(v.$slots, "trigger", {
|
|
2625
|
+
isOpen: d.value,
|
|
2626
|
+
toggle: $
|
|
1827
2627
|
}, () => [
|
|
1828
|
-
|
|
2628
|
+
c("button", {
|
|
1829
2629
|
type: "button",
|
|
1830
2630
|
class: "dm-menu__button",
|
|
1831
2631
|
disabled: e.disabled
|
|
1832
2632
|
}, [
|
|
1833
|
-
|
|
1834
|
-
(
|
|
1835
|
-
class:
|
|
2633
|
+
U(g(e.triggerText) + " ", 1),
|
|
2634
|
+
(l(), s("svg", {
|
|
2635
|
+
class: R(["dm-menu__chevron", { "dm-menu__chevron--open": d.value }]),
|
|
1836
2636
|
viewBox: "0 0 20 20",
|
|
1837
2637
|
fill: "currentColor"
|
|
1838
|
-
}, [...
|
|
1839
|
-
|
|
2638
|
+
}, [...f[0] || (f[0] = [
|
|
2639
|
+
c("path", {
|
|
1840
2640
|
"fill-rule": "evenodd",
|
|
1841
2641
|
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",
|
|
1842
2642
|
"clip-rule": "evenodd"
|
|
1843
2643
|
}, null, -1)
|
|
1844
2644
|
])], 2))
|
|
1845
|
-
], 8,
|
|
2645
|
+
], 8, Ws)
|
|
1846
2646
|
], !0)
|
|
1847
|
-
], 40,
|
|
1848
|
-
(
|
|
1849
|
-
|
|
2647
|
+
], 40, Us),
|
|
2648
|
+
(l(), ne(ce, { to: "body" }, [
|
|
2649
|
+
ue(me, {
|
|
1850
2650
|
name: "menu",
|
|
1851
|
-
onEnter:
|
|
1852
|
-
onLeave:
|
|
2651
|
+
onEnter: _,
|
|
2652
|
+
onLeave: M
|
|
1853
2653
|
}, {
|
|
1854
|
-
default:
|
|
1855
|
-
|
|
2654
|
+
default: ve(() => [
|
|
2655
|
+
d.value ? (l(), s("div", {
|
|
1856
2656
|
key: 0,
|
|
1857
2657
|
ref_key: "menuRef",
|
|
1858
2658
|
ref: o,
|
|
1859
|
-
id:
|
|
1860
|
-
class:
|
|
2659
|
+
id: m.value,
|
|
2660
|
+
class: R(["dm-menu__dropdown", [
|
|
1861
2661
|
`dm-menu__dropdown--${e.placement}`,
|
|
1862
2662
|
{ "dm-menu__dropdown--full-width": e.fullWidth }
|
|
1863
2663
|
]]),
|
|
1864
|
-
style:
|
|
2664
|
+
style: G(V.value),
|
|
1865
2665
|
role: "menu",
|
|
1866
|
-
"aria-labelledby":
|
|
1867
|
-
onKeydown:
|
|
1868
|
-
onClick:
|
|
2666
|
+
"aria-labelledby": y.value,
|
|
2667
|
+
onKeydown: E,
|
|
2668
|
+
onClick: h
|
|
1869
2669
|
}, [
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
close:
|
|
1873
|
-
focusedIndex:
|
|
2670
|
+
c("div", Ks, [
|
|
2671
|
+
Y(v.$slots, "default", {
|
|
2672
|
+
close: q,
|
|
2673
|
+
focusedIndex: u.value
|
|
1874
2674
|
}, () => [
|
|
1875
|
-
(
|
|
1876
|
-
key:
|
|
1877
|
-
class:
|
|
1878
|
-
"dm-menu__item--focused":
|
|
1879
|
-
"dm-menu__item--disabled":
|
|
1880
|
-
"dm-menu__item--divider":
|
|
2675
|
+
(l(!0), s(K, null, X(e.items, (T, C) => (l(), s("div", {
|
|
2676
|
+
key: T.key || C,
|
|
2677
|
+
class: R(["dm-menu__item", {
|
|
2678
|
+
"dm-menu__item--focused": u.value === C,
|
|
2679
|
+
"dm-menu__item--disabled": T.disabled,
|
|
2680
|
+
"dm-menu__item--divider": T.divider
|
|
1881
2681
|
}]),
|
|
1882
2682
|
role: "menuitem",
|
|
1883
|
-
tabindex:
|
|
1884
|
-
"aria-disabled":
|
|
1885
|
-
onClick: (
|
|
1886
|
-
onMouseenter: (
|
|
2683
|
+
tabindex: T.disabled ? -1 : 0,
|
|
2684
|
+
"aria-disabled": T.disabled,
|
|
2685
|
+
onClick: (z) => p(T, C),
|
|
2686
|
+
onMouseenter: (z) => u.value = C
|
|
1887
2687
|
}, [
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
(
|
|
1891
|
-
])) :
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
2688
|
+
T.divider ? (l(), s("div", Gs)) : (l(), s(K, { key: 1 }, [
|
|
2689
|
+
T.icon ? (l(), s("div", Js, [
|
|
2690
|
+
(l(), ne(Ce(T.icon)))
|
|
2691
|
+
])) : b("", !0),
|
|
2692
|
+
c("div", Qs, [
|
|
2693
|
+
c("div", Zs, g(T.label), 1),
|
|
2694
|
+
T.description ? (l(), s("div", er, g(T.description), 1)) : b("", !0)
|
|
1895
2695
|
]),
|
|
1896
|
-
|
|
2696
|
+
T.shortcut ? (l(), s("div", ar, g(T.shortcut), 1)) : b("", !0)
|
|
1897
2697
|
], 64))
|
|
1898
|
-
], 42,
|
|
2698
|
+
], 42, Xs))), 128))
|
|
1899
2699
|
], !0)
|
|
1900
2700
|
])
|
|
1901
|
-
], 46,
|
|
2701
|
+
], 46, Hs)) : b("", !0)
|
|
1902
2702
|
]),
|
|
1903
2703
|
_: 3
|
|
1904
2704
|
})
|
|
1905
2705
|
])),
|
|
1906
|
-
(
|
|
1907
|
-
|
|
1908
|
-
default:
|
|
1909
|
-
|
|
2706
|
+
(l(), ne(ce, { to: "body" }, [
|
|
2707
|
+
ue(me, { name: "backdrop" }, {
|
|
2708
|
+
default: ve(() => [
|
|
2709
|
+
d.value && e.showBackdrop ? (l(), s("div", {
|
|
1910
2710
|
key: 0,
|
|
1911
2711
|
class: "dm-menu__backdrop",
|
|
1912
|
-
onClick:
|
|
1913
|
-
})) :
|
|
2712
|
+
onClick: q
|
|
2713
|
+
})) : b("", !0)
|
|
1914
2714
|
]),
|
|
1915
2715
|
_: 1
|
|
1916
2716
|
})
|
|
1917
2717
|
]))
|
|
1918
2718
|
], 2));
|
|
1919
2719
|
}
|
|
1920
|
-
}),
|
|
2720
|
+
}), an = /* @__PURE__ */ P(tr, [["__scopeId", "data-v-3569b243"]]), lr = {
|
|
1921
2721
|
class: "dm-breadcrumb",
|
|
1922
2722
|
"aria-label": "Breadcrumb"
|
|
1923
|
-
},
|
|
2723
|
+
}, sr = { class: "dm-breadcrumb__list" }, rr = ["href", "onClick"], nr = ["aria-current"], or = {
|
|
1924
2724
|
key: 2,
|
|
1925
2725
|
class: "dm-breadcrumb__separator",
|
|
1926
2726
|
"aria-hidden": "true"
|
|
1927
|
-
},
|
|
2727
|
+
}, ir = /* @__PURE__ */ N({
|
|
1928
2728
|
__name: "DatametriaBreadcrumb",
|
|
1929
2729
|
props: {
|
|
1930
2730
|
items: {},
|
|
@@ -1932,31 +2732,31 @@ const he = ["disabled", "type", "aria-busy", "aria-disabled"], be = {
|
|
|
1932
2732
|
},
|
|
1933
2733
|
emits: ["click"],
|
|
1934
2734
|
setup(e, { emit: i }) {
|
|
1935
|
-
const
|
|
1936
|
-
|
|
2735
|
+
const a = i, t = (n, r, o) => {
|
|
2736
|
+
a("click", r, o);
|
|
1937
2737
|
};
|
|
1938
|
-
return (
|
|
1939
|
-
|
|
1940
|
-
(
|
|
1941
|
-
key:
|
|
2738
|
+
return (n, r) => (l(), s("nav", lr, [
|
|
2739
|
+
c("ol", sr, [
|
|
2740
|
+
(l(!0), s(K, null, X(e.items, (o, d) => (l(), s("li", {
|
|
2741
|
+
key: d,
|
|
1942
2742
|
class: "dm-breadcrumb__item"
|
|
1943
2743
|
}, [
|
|
1944
|
-
o.href &&
|
|
2744
|
+
o.href && d < e.items.length - 1 ? (l(), s("a", {
|
|
1945
2745
|
key: 0,
|
|
1946
2746
|
href: o.href,
|
|
1947
2747
|
class: "dm-breadcrumb__link",
|
|
1948
|
-
onClick: (
|
|
1949
|
-
}, g(o.label), 9,
|
|
2748
|
+
onClick: (u) => t(u, o, d)
|
|
2749
|
+
}, g(o.label), 9, rr)) : (l(), s("span", {
|
|
1950
2750
|
key: 1,
|
|
1951
2751
|
class: "dm-breadcrumb__current",
|
|
1952
|
-
"aria-current":
|
|
1953
|
-
}, g(o.label), 9,
|
|
1954
|
-
|
|
2752
|
+
"aria-current": d === e.items.length - 1 ? "page" : void 0
|
|
2753
|
+
}, g(o.label), 9, nr)),
|
|
2754
|
+
d < e.items.length - 1 ? (l(), s("span", or, g(e.separator), 1)) : b("", !0)
|
|
1955
2755
|
]))), 128))
|
|
1956
2756
|
])
|
|
1957
2757
|
]));
|
|
1958
2758
|
}
|
|
1959
|
-
}),
|
|
2759
|
+
}), tn = /* @__PURE__ */ P(ir, [["__scopeId", "data-v-87b7a811"]]), dr = { class: "dm-tabs" }, cr = ["aria-label"], ur = ["id", "aria-selected", "aria-controls", "tabindex", "onClick", "onKeydown"], mr = { class: "dm-tabs__panels" }, vr = ["id", "aria-labelledby", "hidden"], hr = /* @__PURE__ */ N({
|
|
1960
2760
|
__name: "DatametriaTabs",
|
|
1961
2761
|
props: {
|
|
1962
2762
|
tabs: {},
|
|
@@ -1965,200 +2765,168 @@ const he = ["disabled", "type", "aria-busy", "aria-disabled"], be = {
|
|
|
1965
2765
|
},
|
|
1966
2766
|
emits: ["update:modelValue"],
|
|
1967
2767
|
setup(e, { emit: i }) {
|
|
1968
|
-
const
|
|
1969
|
-
|
|
1970
|
-
|
|
2768
|
+
const a = e, t = i, n = S(a.modelValue);
|
|
2769
|
+
Q(() => a.modelValue, (d) => {
|
|
2770
|
+
n.value = d;
|
|
1971
2771
|
});
|
|
1972
|
-
const r = (
|
|
1973
|
-
|
|
1974
|
-
}, o = (
|
|
1975
|
-
var
|
|
1976
|
-
let
|
|
1977
|
-
switch (
|
|
2772
|
+
const r = (d) => {
|
|
2773
|
+
n.value = d, t("update:modelValue", d);
|
|
2774
|
+
}, o = (d, u) => {
|
|
2775
|
+
var y;
|
|
2776
|
+
let m = u;
|
|
2777
|
+
switch (d.key) {
|
|
1978
2778
|
case "ArrowLeft":
|
|
1979
|
-
|
|
2779
|
+
d.preventDefault(), m = u > 0 ? u - 1 : a.tabs.length - 1;
|
|
1980
2780
|
break;
|
|
1981
2781
|
case "ArrowRight":
|
|
1982
|
-
|
|
2782
|
+
d.preventDefault(), m = u < a.tabs.length - 1 ? u + 1 : 0;
|
|
1983
2783
|
break;
|
|
1984
2784
|
case "Home":
|
|
1985
|
-
|
|
2785
|
+
d.preventDefault(), m = 0;
|
|
1986
2786
|
break;
|
|
1987
2787
|
case "End":
|
|
1988
|
-
|
|
2788
|
+
d.preventDefault(), m = a.tabs.length - 1;
|
|
1989
2789
|
break;
|
|
1990
2790
|
default:
|
|
1991
2791
|
return;
|
|
1992
2792
|
}
|
|
1993
|
-
r(
|
|
2793
|
+
r(m), (y = document.getElementById(`tab-${m}`)) == null || y.focus();
|
|
1994
2794
|
};
|
|
1995
|
-
return (
|
|
1996
|
-
|
|
2795
|
+
return (d, u) => (l(), s("div", dr, [
|
|
2796
|
+
c("div", {
|
|
1997
2797
|
class: "dm-tabs__header",
|
|
1998
2798
|
role: "tablist",
|
|
1999
2799
|
"aria-label": e.ariaLabel
|
|
2000
2800
|
}, [
|
|
2001
|
-
(
|
|
2002
|
-
key:
|
|
2003
|
-
id: `tab-${
|
|
2004
|
-
class:
|
|
2801
|
+
(l(!0), s(K, null, X(e.tabs, (m, y) => (l(), s("button", {
|
|
2802
|
+
key: y,
|
|
2803
|
+
id: `tab-${y}`,
|
|
2804
|
+
class: R(["dm-tabs__tab", { "dm-tabs__tab--active": n.value === y }]),
|
|
2005
2805
|
role: "tab",
|
|
2006
|
-
"aria-selected":
|
|
2007
|
-
"aria-controls": `panel-${
|
|
2008
|
-
tabindex:
|
|
2009
|
-
onClick: (
|
|
2010
|
-
onKeydown: (
|
|
2011
|
-
}, g(
|
|
2012
|
-
|
|
2806
|
+
"aria-selected": n.value === y,
|
|
2807
|
+
"aria-controls": `panel-${y}`,
|
|
2808
|
+
tabindex: n.value === y ? 0 : -1,
|
|
2809
|
+
onClick: (V) => r(y),
|
|
2810
|
+
onKeydown: (V) => o(V, y)
|
|
2811
|
+
}, g(m), 43, ur))), 128)),
|
|
2812
|
+
c("div", {
|
|
2013
2813
|
class: "dm-tabs__indicator",
|
|
2014
|
-
style:
|
|
2814
|
+
style: G({ transform: `translateX(${n.value * 100}%)` })
|
|
2015
2815
|
}, null, 4)
|
|
2016
|
-
], 8,
|
|
2017
|
-
|
|
2018
|
-
(
|
|
2019
|
-
key:
|
|
2020
|
-
id: `panel-${
|
|
2021
|
-
class:
|
|
2816
|
+
], 8, cr),
|
|
2817
|
+
c("div", mr, [
|
|
2818
|
+
(l(!0), s(K, null, X(e.tabs, (m, y) => (l(), s("div", {
|
|
2819
|
+
key: y,
|
|
2820
|
+
id: `panel-${y}`,
|
|
2821
|
+
class: R(["dm-tabs__panel", { "dm-tabs__panel--active": n.value === y }]),
|
|
2022
2822
|
role: "tabpanel",
|
|
2023
|
-
"aria-labelledby": `tab-${
|
|
2024
|
-
hidden:
|
|
2823
|
+
"aria-labelledby": `tab-${y}`,
|
|
2824
|
+
hidden: n.value !== y
|
|
2025
2825
|
}, [
|
|
2026
|
-
|
|
2027
|
-
], 10,
|
|
2826
|
+
Y(d.$slots, `panel-${y}`, {}, void 0, !0)
|
|
2827
|
+
], 10, vr))), 128))
|
|
2028
2828
|
])
|
|
2029
2829
|
]));
|
|
2030
2830
|
}
|
|
2031
|
-
}),
|
|
2032
|
-
|
|
2033
|
-
function ws() {
|
|
2034
|
-
const e = () => {
|
|
2035
|
-
G.value = !G.value, document.documentElement.classList.toggle("dark", G.value), localStorage.setItem("theme", G.value ? "dark" : "light");
|
|
2036
|
-
}, i = (o) => {
|
|
2037
|
-
G.value = o === "dark", document.documentElement.classList.toggle("dark", G.value), localStorage.setItem("theme", o);
|
|
2038
|
-
}, n = () => {
|
|
2039
|
-
ue = !0;
|
|
2040
|
-
const o = localStorage.getItem("theme");
|
|
2041
|
-
if (o)
|
|
2042
|
-
i(o);
|
|
2043
|
-
else if (typeof window < "u" && window.matchMedia) {
|
|
2044
|
-
const u = window.matchMedia("(prefers-color-scheme: dark)").matches;
|
|
2045
|
-
i(u ? "dark" : "light");
|
|
2046
|
-
}
|
|
2047
|
-
typeof window < "u" && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change", (u) => {
|
|
2048
|
-
localStorage.getItem("theme") || i(u.matches ? "dark" : "light");
|
|
2049
|
-
});
|
|
2050
|
-
};
|
|
2051
|
-
ue || n();
|
|
2052
|
-
const a = B(() => G.value ? "dark" : "light");
|
|
2831
|
+
}), ln = /* @__PURE__ */ P(hr, [["__scopeId", "data-v-6d59d320"]]), fr = (e) => !!e, br = (e) => e ? /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e) : !0, pr = (e) => (i) => i ? i.length >= e : !0, gr = (e) => (i) => i ? i.length <= e : !0, _r = (e) => (i) => i ? e.test(i) : !0, yr = (e) => (i) => e(i);
|
|
2832
|
+
function sn() {
|
|
2053
2833
|
return {
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
initTheme: n
|
|
2834
|
+
required: fr,
|
|
2835
|
+
email: br,
|
|
2836
|
+
minLength: pr,
|
|
2837
|
+
maxLength: gr,
|
|
2838
|
+
pattern: _r,
|
|
2839
|
+
custom: yr
|
|
2061
2840
|
};
|
|
2062
2841
|
}
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
required: Ol,
|
|
2067
|
-
email: Fl,
|
|
2068
|
-
minLength: Al,
|
|
2069
|
-
maxLength: jl,
|
|
2070
|
-
pattern: Pl,
|
|
2071
|
-
custom: Ul
|
|
2072
|
-
};
|
|
2073
|
-
}
|
|
2074
|
-
function Vs(e = {}) {
|
|
2075
|
-
const i = V(!1), n = V(null), a = V(null), l = async (b, k = {}) => {
|
|
2076
|
-
i.value = !0, n.value = null;
|
|
2842
|
+
function rn(e = {}) {
|
|
2843
|
+
const i = S(!1), a = S(null), t = S(null), n = async (m, y = {}) => {
|
|
2844
|
+
i.value = !0, a.value = null;
|
|
2077
2845
|
try {
|
|
2078
|
-
const
|
|
2079
|
-
...
|
|
2846
|
+
const V = e.baseURL ? `${e.baseURL}${m}` : m, F = await fetch(V, {
|
|
2847
|
+
...y,
|
|
2080
2848
|
headers: {
|
|
2081
2849
|
"Content-Type": "application/json",
|
|
2082
2850
|
...e.headers,
|
|
2083
|
-
...
|
|
2851
|
+
...y.headers
|
|
2084
2852
|
}
|
|
2085
2853
|
});
|
|
2086
|
-
if (!
|
|
2087
|
-
throw new Error(`HTTP ${
|
|
2088
|
-
const
|
|
2089
|
-
return
|
|
2090
|
-
} catch (
|
|
2091
|
-
throw
|
|
2854
|
+
if (!F.ok)
|
|
2855
|
+
throw new Error(`HTTP ${F.status}: ${F.statusText}`);
|
|
2856
|
+
const B = await F.json();
|
|
2857
|
+
return t.value = B, B;
|
|
2858
|
+
} catch (V) {
|
|
2859
|
+
throw a.value = V.message || "Request failed", V;
|
|
2092
2860
|
} finally {
|
|
2093
2861
|
i.value = !1;
|
|
2094
2862
|
}
|
|
2095
2863
|
};
|
|
2096
2864
|
return {
|
|
2097
2865
|
loading: i,
|
|
2098
|
-
error:
|
|
2099
|
-
data:
|
|
2100
|
-
get: (
|
|
2101
|
-
post: (
|
|
2102
|
-
...
|
|
2866
|
+
error: a,
|
|
2867
|
+
data: t,
|
|
2868
|
+
get: (m, y) => n(m, { ...y, method: "GET" }),
|
|
2869
|
+
post: (m, y, V) => n(m, {
|
|
2870
|
+
...V,
|
|
2103
2871
|
method: "POST",
|
|
2104
|
-
body: JSON.stringify(
|
|
2872
|
+
body: JSON.stringify(y)
|
|
2105
2873
|
}),
|
|
2106
|
-
put: (
|
|
2107
|
-
...
|
|
2874
|
+
put: (m, y, V) => n(m, {
|
|
2875
|
+
...V,
|
|
2108
2876
|
method: "PUT",
|
|
2109
|
-
body: JSON.stringify(
|
|
2877
|
+
body: JSON.stringify(y)
|
|
2110
2878
|
}),
|
|
2111
|
-
delete: (
|
|
2879
|
+
delete: (m, y) => n(m, { ...y, method: "DELETE" })
|
|
2112
2880
|
};
|
|
2113
2881
|
}
|
|
2114
|
-
function
|
|
2115
|
-
const e =
|
|
2116
|
-
() => Math.max(
|
|
2117
|
-
), r =
|
|
2118
|
-
const
|
|
2119
|
-
return
|
|
2120
|
-
}), o = (
|
|
2121
|
-
const
|
|
2122
|
-
document.documentElement.style.setProperty("--user-scale",
|
|
2123
|
-
},
|
|
2882
|
+
function nn() {
|
|
2883
|
+
const e = S(1), i = "datametria-accessibility-scale", a = 0.8, t = 2, n = D(
|
|
2884
|
+
() => Math.max(a, Math.min(t, e.value))
|
|
2885
|
+
), r = D(() => {
|
|
2886
|
+
const B = n.value;
|
|
2887
|
+
return B <= 0.9 ? "scale-small" : B >= 1.1 ? "scale-large" : "scale-normal";
|
|
2888
|
+
}), o = (B) => {
|
|
2889
|
+
const q = Math.max(a, Math.min(t, B));
|
|
2890
|
+
document.documentElement.style.setProperty("--user-scale", q.toString()), e.value = q;
|
|
2891
|
+
}, d = (B) => {
|
|
2124
2892
|
try {
|
|
2125
|
-
localStorage.setItem(i,
|
|
2126
|
-
} catch (
|
|
2127
|
-
console.warn("Failed to save accessibility scale:",
|
|
2893
|
+
localStorage.setItem(i, B.toString());
|
|
2894
|
+
} catch (q) {
|
|
2895
|
+
console.warn("Failed to save accessibility scale:", q);
|
|
2128
2896
|
}
|
|
2129
|
-
},
|
|
2897
|
+
}, u = () => {
|
|
2130
2898
|
try {
|
|
2131
|
-
const
|
|
2132
|
-
return
|
|
2133
|
-
} catch (
|
|
2134
|
-
return console.warn("Failed to load accessibility scale:",
|
|
2899
|
+
const B = localStorage.getItem(i);
|
|
2900
|
+
return B ? parseFloat(B) : 1;
|
|
2901
|
+
} catch (B) {
|
|
2902
|
+
return console.warn("Failed to load accessibility scale:", B), 1;
|
|
2135
2903
|
}
|
|
2136
|
-
},
|
|
2137
|
-
o(
|
|
2138
|
-
},
|
|
2139
|
-
|
|
2140
|
-
},
|
|
2141
|
-
|
|
2142
|
-
},
|
|
2143
|
-
|
|
2904
|
+
}, m = (B) => {
|
|
2905
|
+
o(B), d(n.value);
|
|
2906
|
+
}, y = () => {
|
|
2907
|
+
m(e.value + 0.1);
|
|
2908
|
+
}, V = () => {
|
|
2909
|
+
m(e.value - 0.1);
|
|
2910
|
+
}, F = () => {
|
|
2911
|
+
m(1);
|
|
2144
2912
|
};
|
|
2145
|
-
return
|
|
2146
|
-
o(
|
|
2147
|
-
}),
|
|
2148
|
-
const
|
|
2149
|
-
o(
|
|
2913
|
+
return Q(e, (B) => {
|
|
2914
|
+
o(B);
|
|
2915
|
+
}), te(() => {
|
|
2916
|
+
const B = u();
|
|
2917
|
+
o(B);
|
|
2150
2918
|
}), {
|
|
2151
|
-
scale:
|
|
2919
|
+
scale: n,
|
|
2152
2920
|
scaleClass: r,
|
|
2153
|
-
setScale:
|
|
2154
|
-
increaseScale:
|
|
2155
|
-
decreaseScale:
|
|
2156
|
-
resetScale:
|
|
2157
|
-
minScale:
|
|
2158
|
-
maxScale:
|
|
2921
|
+
setScale: m,
|
|
2922
|
+
increaseScale: y,
|
|
2923
|
+
decreaseScale: V,
|
|
2924
|
+
resetScale: F,
|
|
2925
|
+
minScale: a,
|
|
2926
|
+
maxScale: t
|
|
2159
2927
|
};
|
|
2160
2928
|
}
|
|
2161
|
-
const
|
|
2929
|
+
const J = {
|
|
2162
2930
|
xs: 475,
|
|
2163
2931
|
sm: 640,
|
|
2164
2932
|
md: 768,
|
|
@@ -2166,96 +2934,96 @@ const j = {
|
|
|
2166
2934
|
xl: 1280,
|
|
2167
2935
|
"2xl": 1536
|
|
2168
2936
|
};
|
|
2169
|
-
function
|
|
2170
|
-
const e =
|
|
2937
|
+
function on() {
|
|
2938
|
+
const e = S(0), i = () => {
|
|
2171
2939
|
e.value = window.innerWidth;
|
|
2172
|
-
},
|
|
2173
|
-
const
|
|
2174
|
-
return
|
|
2175
|
-
}, o = () => e.value <
|
|
2176
|
-
return
|
|
2940
|
+
}, a = ($) => e.value >= J[$], t = ($) => e.value <= J[$], n = ($, w) => e.value >= J[$] && e.value <= J[w], r = () => {
|
|
2941
|
+
const $ = e.value;
|
|
2942
|
+
return $ >= J["2xl"] ? "2xl" : $ >= J.xl ? "xl" : $ >= J.lg ? "lg" : $ >= J.md ? "md" : $ >= J.sm ? "sm" : "xs";
|
|
2943
|
+
}, o = () => e.value < J.sm, d = () => a("sm") && e.value < J.md, u = () => a("md") && e.value < J.lg, m = () => a("lg") && e.value < J.xl, y = () => a("xl") && e.value < J["2xl"], V = () => a("2xl"), F = () => e.value < J.md, B = () => n("md", "lg"), q = () => a("lg");
|
|
2944
|
+
return te(() => {
|
|
2177
2945
|
i(), window.addEventListener("resize", i);
|
|
2178
|
-
}),
|
|
2946
|
+
}), de(() => {
|
|
2179
2947
|
window.removeEventListener("resize", i);
|
|
2180
2948
|
}), {
|
|
2181
2949
|
windowWidth: e,
|
|
2182
|
-
breakpoints:
|
|
2183
|
-
isGreaterOrEqual:
|
|
2184
|
-
isLessOrEqual:
|
|
2185
|
-
isBetween:
|
|
2950
|
+
breakpoints: J,
|
|
2951
|
+
isGreaterOrEqual: a,
|
|
2952
|
+
isLessOrEqual: t,
|
|
2953
|
+
isBetween: n,
|
|
2186
2954
|
getCurrentBreakpoint: r,
|
|
2187
2955
|
isXs: o,
|
|
2188
|
-
isSm:
|
|
2189
|
-
isMd:
|
|
2190
|
-
isLg:
|
|
2191
|
-
isXl:
|
|
2192
|
-
is2xl:
|
|
2193
|
-
isMobile:
|
|
2194
|
-
isTablet:
|
|
2195
|
-
isDesktop:
|
|
2956
|
+
isSm: d,
|
|
2957
|
+
isMd: u,
|
|
2958
|
+
isLg: m,
|
|
2959
|
+
isXl: y,
|
|
2960
|
+
is2xl: V,
|
|
2961
|
+
isMobile: F,
|
|
2962
|
+
isTablet: B,
|
|
2963
|
+
isDesktop: q
|
|
2196
2964
|
};
|
|
2197
2965
|
}
|
|
2198
|
-
function
|
|
2966
|
+
function dn(e = {}) {
|
|
2199
2967
|
const {
|
|
2200
2968
|
color: i = "rgba(255, 255, 255, 0.3)",
|
|
2201
|
-
duration:
|
|
2202
|
-
disabled:
|
|
2203
|
-
} = e,
|
|
2204
|
-
if (
|
|
2205
|
-
const
|
|
2206
|
-
let
|
|
2207
|
-
if (
|
|
2208
|
-
|
|
2969
|
+
duration: a = 600,
|
|
2970
|
+
disabled: t = !1
|
|
2971
|
+
} = e, n = S(), r = S([]), o = ($) => {
|
|
2972
|
+
if (t || !n.value) return;
|
|
2973
|
+
const w = n.value, j = w.getBoundingClientRect();
|
|
2974
|
+
let E, x;
|
|
2975
|
+
if ($ instanceof MouseEvent)
|
|
2976
|
+
E = $.clientX, x = $.clientY;
|
|
2209
2977
|
else {
|
|
2210
|
-
const
|
|
2211
|
-
|
|
2978
|
+
const M = $.touches[0] || $.changedTouches[0];
|
|
2979
|
+
E = M.clientX, x = M.clientY;
|
|
2212
2980
|
}
|
|
2213
|
-
const
|
|
2214
|
-
|
|
2981
|
+
const O = E - j.left, p = x - j.top, h = Math.max(j.width, j.height), _ = document.createElement("div");
|
|
2982
|
+
_.className = "datametria-ripple", _.style.cssText = `
|
|
2215
2983
|
position: absolute;
|
|
2216
|
-
left: ${
|
|
2217
|
-
top: ${
|
|
2218
|
-
width: ${
|
|
2219
|
-
height: ${
|
|
2984
|
+
left: ${O - h / 2}px;
|
|
2985
|
+
top: ${p - h / 2}px;
|
|
2986
|
+
width: ${h}px;
|
|
2987
|
+
height: ${h}px;
|
|
2220
2988
|
border-radius: 50%;
|
|
2221
2989
|
background: ${i};
|
|
2222
2990
|
transform: scale(0);
|
|
2223
|
-
animation: ripple-animation ${
|
|
2991
|
+
animation: ripple-animation ${a / 1e3}s ease-out;
|
|
2224
2992
|
pointer-events: none;
|
|
2225
2993
|
z-index: 1;
|
|
2226
|
-
`,
|
|
2227
|
-
|
|
2228
|
-
},
|
|
2229
|
-
},
|
|
2230
|
-
o(
|
|
2231
|
-
},
|
|
2232
|
-
|
|
2233
|
-
}) : void 0,
|
|
2234
|
-
const
|
|
2235
|
-
|
|
2236
|
-
},
|
|
2994
|
+
`, w.appendChild(_), setTimeout(() => {
|
|
2995
|
+
_.parentNode && _.parentNode.removeChild(_);
|
|
2996
|
+
}, a);
|
|
2997
|
+
}, d = ($) => {
|
|
2998
|
+
o($);
|
|
2999
|
+
}, u = ($) => $ ? (n.value = $, window.getComputedStyle($).position === "static" && ($.style.position = "relative"), $.style.overflow = "hidden", $.addEventListener("click", d), () => {
|
|
3000
|
+
$.removeEventListener("click", d);
|
|
3001
|
+
}) : void 0, m = ($) => {
|
|
3002
|
+
const w = r.value.findIndex((j) => j.id === $);
|
|
3003
|
+
w > -1 && r.value.splice(w, 1);
|
|
3004
|
+
}, y = () => {
|
|
2237
3005
|
r.value = [];
|
|
2238
3006
|
};
|
|
2239
|
-
|
|
2240
|
-
|
|
3007
|
+
de(() => {
|
|
3008
|
+
y();
|
|
2241
3009
|
});
|
|
2242
|
-
const
|
|
3010
|
+
const V = ($) => ({
|
|
2243
3011
|
position: "absolute",
|
|
2244
|
-
left: `${
|
|
2245
|
-
top: `${
|
|
2246
|
-
width: `${
|
|
2247
|
-
height: `${
|
|
3012
|
+
left: `${$.x}px`,
|
|
3013
|
+
top: `${$.y}px`,
|
|
3014
|
+
width: `${$.size}px`,
|
|
3015
|
+
height: `${$.size}px`,
|
|
2248
3016
|
borderRadius: "50%",
|
|
2249
3017
|
backgroundColor: i,
|
|
2250
3018
|
transform: "scale(0)",
|
|
2251
|
-
animation: `ripple-animation ${
|
|
3019
|
+
animation: `ripple-animation ${a}ms ease-out`,
|
|
2252
3020
|
pointerEvents: "none",
|
|
2253
3021
|
zIndex: 1
|
|
2254
|
-
}),
|
|
2255
|
-
const
|
|
2256
|
-
if (document.getElementById(
|
|
2257
|
-
const
|
|
2258
|
-
|
|
3022
|
+
}), F = () => {
|
|
3023
|
+
const $ = "ripple-keyframes";
|
|
3024
|
+
if (document.getElementById($)) return;
|
|
3025
|
+
const w = document.createElement("style");
|
|
3026
|
+
w.id = $, w.textContent = `
|
|
2259
3027
|
@keyframes ripple-animation {
|
|
2260
3028
|
0% {
|
|
2261
3029
|
transform: scale(0);
|
|
@@ -2275,169 +3043,169 @@ function Cs(e = {}) {
|
|
|
2275
3043
|
}
|
|
2276
3044
|
}
|
|
2277
3045
|
}
|
|
2278
|
-
`, document.head.appendChild(
|
|
2279
|
-
},
|
|
2280
|
-
if (
|
|
2281
|
-
return
|
|
2282
|
-
},
|
|
2283
|
-
|
|
3046
|
+
`, document.head.appendChild(w);
|
|
3047
|
+
}, B = () => {
|
|
3048
|
+
if (n.value)
|
|
3049
|
+
return u(n.value);
|
|
3050
|
+
}, q = () => {
|
|
3051
|
+
n.value && n.value.removeEventListener("click", d);
|
|
2284
3052
|
};
|
|
2285
|
-
return
|
|
2286
|
-
|
|
2287
|
-
}),
|
|
2288
|
-
|
|
3053
|
+
return te(() => {
|
|
3054
|
+
F(), n.value && B();
|
|
3055
|
+
}), Q(n, ($) => {
|
|
3056
|
+
$ && B();
|
|
2289
3057
|
}), {
|
|
2290
|
-
rippleRef:
|
|
3058
|
+
rippleRef: n,
|
|
2291
3059
|
ripples: r,
|
|
2292
|
-
applyRipple:
|
|
2293
|
-
removeRipple:
|
|
2294
|
-
clearRipples:
|
|
2295
|
-
getRippleStyle:
|
|
3060
|
+
applyRipple: u,
|
|
3061
|
+
removeRipple: m,
|
|
3062
|
+
clearRipples: y,
|
|
3063
|
+
getRippleStyle: V,
|
|
2296
3064
|
createRipple: o,
|
|
2297
|
-
addRippleEffect:
|
|
2298
|
-
removeRippleEffect:
|
|
3065
|
+
addRippleEffect: B,
|
|
3066
|
+
removeRippleEffect: q
|
|
2299
3067
|
};
|
|
2300
3068
|
}
|
|
2301
|
-
function
|
|
3069
|
+
function cn(e = {}) {
|
|
2302
3070
|
const {
|
|
2303
3071
|
enabled: i = !0,
|
|
2304
|
-
fallbackToVisual:
|
|
2305
|
-
visualDuration:
|
|
2306
|
-
} = e,
|
|
3072
|
+
fallbackToVisual: a = !0,
|
|
3073
|
+
visualDuration: t = 150
|
|
3074
|
+
} = e, n = S(!1), r = S(i), o = S(null), d = () => !!("hapticFeedback" in navigator && navigator.hapticFeedback || "vibrate" in navigator && typeof navigator.vibrate == "function"), u = (v) => {
|
|
2307
3075
|
if (!("vibrate" in navigator) || typeof navigator.vibrate != "function") return !1;
|
|
2308
3076
|
try {
|
|
2309
|
-
return navigator.vibrate(
|
|
2310
|
-
} catch (
|
|
2311
|
-
return console.warn("Haptic feedback failed:",
|
|
3077
|
+
return navigator.vibrate(v);
|
|
3078
|
+
} catch (f) {
|
|
3079
|
+
return console.warn("Haptic feedback failed:", f), !1;
|
|
2312
3080
|
}
|
|
2313
|
-
},
|
|
2314
|
-
if (!
|
|
2315
|
-
const
|
|
2316
|
-
if (o.value =
|
|
2317
|
-
const
|
|
2318
|
-
switch (
|
|
3081
|
+
}, m = (v, f) => {
|
|
3082
|
+
if (!a) return;
|
|
3083
|
+
const T = `visual-${Date.now()}`;
|
|
3084
|
+
if (o.value = T, f) {
|
|
3085
|
+
const C = f.style.transform, z = f.style.transition;
|
|
3086
|
+
switch (f.style.transition = "transform 75ms ease-out", v) {
|
|
2319
3087
|
case "light":
|
|
2320
|
-
|
|
3088
|
+
f.style.transform = "scale(0.98)";
|
|
2321
3089
|
break;
|
|
2322
3090
|
case "medium":
|
|
2323
|
-
|
|
3091
|
+
f.style.transform = "scale(0.95)";
|
|
2324
3092
|
break;
|
|
2325
3093
|
case "heavy":
|
|
2326
|
-
|
|
3094
|
+
f.style.transform = "scale(0.92)";
|
|
2327
3095
|
break;
|
|
2328
3096
|
case "selection":
|
|
2329
|
-
|
|
3097
|
+
f.style.transform = "scale(1.02)";
|
|
2330
3098
|
break;
|
|
2331
3099
|
default:
|
|
2332
|
-
|
|
3100
|
+
f.style.transform = "scale(0.97)";
|
|
2333
3101
|
}
|
|
2334
3102
|
setTimeout(() => {
|
|
2335
|
-
|
|
2336
|
-
|
|
3103
|
+
f.style.transform = C, setTimeout(() => {
|
|
3104
|
+
f.style.transition = z, o.value === T && (o.value = null);
|
|
2337
3105
|
}, 75);
|
|
2338
3106
|
}, 75);
|
|
2339
3107
|
}
|
|
2340
3108
|
setTimeout(() => {
|
|
2341
|
-
o.value ===
|
|
2342
|
-
},
|
|
2343
|
-
},
|
|
3109
|
+
o.value === T && (o.value = null);
|
|
3110
|
+
}, t);
|
|
3111
|
+
}, y = (v) => {
|
|
2344
3112
|
if (!r.value) return;
|
|
2345
|
-
let
|
|
2346
|
-
|
|
2347
|
-
},
|
|
3113
|
+
let f = !1;
|
|
3114
|
+
n.value && (f = u(10)), !f && a && m("light", v);
|
|
3115
|
+
}, V = (v) => {
|
|
2348
3116
|
if (!r.value) return;
|
|
2349
|
-
let
|
|
2350
|
-
|
|
2351
|
-
},
|
|
3117
|
+
let f = !1;
|
|
3118
|
+
n.value && (f = u(20)), !f && a && m("medium", v);
|
|
3119
|
+
}, F = (v) => {
|
|
2352
3120
|
if (!r.value) return;
|
|
2353
|
-
let
|
|
2354
|
-
|
|
2355
|
-
},
|
|
3121
|
+
let f = !1;
|
|
3122
|
+
n.value && (f = u(40)), !f && a && m("heavy", v);
|
|
3123
|
+
}, B = (v) => {
|
|
2356
3124
|
if (!r.value) return;
|
|
2357
|
-
let
|
|
2358
|
-
|
|
2359
|
-
},
|
|
2360
|
-
switch (
|
|
3125
|
+
let f = !1;
|
|
3126
|
+
n.value && (f = u(5)), !f && a && m("selection", v);
|
|
3127
|
+
}, q = (v = "medium", f) => {
|
|
3128
|
+
switch (v) {
|
|
2361
3129
|
case "light":
|
|
2362
|
-
|
|
3130
|
+
y(f);
|
|
2363
3131
|
break;
|
|
2364
3132
|
case "medium":
|
|
2365
|
-
|
|
3133
|
+
V(f);
|
|
2366
3134
|
break;
|
|
2367
3135
|
case "heavy":
|
|
2368
|
-
|
|
3136
|
+
F(f);
|
|
2369
3137
|
break;
|
|
2370
3138
|
}
|
|
2371
|
-
},
|
|
3139
|
+
}, $ = (v, f) => {
|
|
2372
3140
|
if (!r.value) return;
|
|
2373
|
-
let
|
|
2374
|
-
switch (
|
|
3141
|
+
let T;
|
|
3142
|
+
switch (v) {
|
|
2375
3143
|
case "success":
|
|
2376
|
-
|
|
3144
|
+
T = [10, 50, 10];
|
|
2377
3145
|
break;
|
|
2378
3146
|
case "warning":
|
|
2379
|
-
|
|
3147
|
+
T = [20, 100, 20, 100, 20];
|
|
2380
3148
|
break;
|
|
2381
3149
|
case "error":
|
|
2382
|
-
|
|
3150
|
+
T = [50, 100, 50, 100, 50];
|
|
2383
3151
|
break;
|
|
2384
3152
|
}
|
|
2385
|
-
let
|
|
2386
|
-
|
|
2387
|
-
},
|
|
3153
|
+
let C = !1;
|
|
3154
|
+
n.value && (C = u(T)), !C && a && m("notification", f);
|
|
3155
|
+
}, w = (v, f) => {
|
|
2388
3156
|
if (!r.value) return;
|
|
2389
|
-
let
|
|
2390
|
-
|
|
2391
|
-
},
|
|
3157
|
+
let T = !1;
|
|
3158
|
+
n.value && (T = u(v)), !T && a && m("medium", f);
|
|
3159
|
+
}, j = () => {
|
|
2392
3160
|
r.value = !0;
|
|
2393
|
-
},
|
|
3161
|
+
}, E = () => {
|
|
2394
3162
|
r.value = !1;
|
|
2395
|
-
},
|
|
3163
|
+
}, x = () => {
|
|
2396
3164
|
r.value = !r.value;
|
|
2397
|
-
},
|
|
3165
|
+
}, O = D(() => n.value && r.value), p = D(() => o.value !== null), h = (v = "light") => {
|
|
2398
3166
|
if (!r.value) return !1;
|
|
2399
3167
|
if ("hapticFeedback" in navigator && navigator.hapticFeedback)
|
|
2400
3168
|
try {
|
|
2401
|
-
return navigator.hapticFeedback.impact(
|
|
2402
|
-
} catch (
|
|
2403
|
-
console.warn("Haptic feedback failed:",
|
|
3169
|
+
return navigator.hapticFeedback.impact(v);
|
|
3170
|
+
} catch (f) {
|
|
3171
|
+
console.warn("Haptic feedback failed:", f);
|
|
2404
3172
|
}
|
|
2405
3173
|
if ("vibrate" in navigator && typeof navigator.vibrate == "function") {
|
|
2406
|
-
let
|
|
2407
|
-
switch (
|
|
3174
|
+
let f;
|
|
3175
|
+
switch (v) {
|
|
2408
3176
|
case "light":
|
|
2409
|
-
|
|
3177
|
+
f = 10;
|
|
2410
3178
|
break;
|
|
2411
3179
|
case "medium":
|
|
2412
|
-
|
|
3180
|
+
f = 20;
|
|
2413
3181
|
break;
|
|
2414
3182
|
case "heavy":
|
|
2415
|
-
|
|
3183
|
+
f = 30;
|
|
2416
3184
|
break;
|
|
2417
3185
|
case "success":
|
|
2418
|
-
|
|
3186
|
+
f = [10, 50, 10];
|
|
2419
3187
|
break;
|
|
2420
3188
|
case "warning":
|
|
2421
|
-
|
|
3189
|
+
f = [20, 100, 20];
|
|
2422
3190
|
break;
|
|
2423
3191
|
case "error":
|
|
2424
|
-
|
|
3192
|
+
f = [50, 100, 50, 100, 50];
|
|
2425
3193
|
break;
|
|
2426
3194
|
default:
|
|
2427
|
-
|
|
3195
|
+
f = 10;
|
|
2428
3196
|
}
|
|
2429
3197
|
try {
|
|
2430
|
-
return navigator.vibrate(
|
|
2431
|
-
} catch (
|
|
2432
|
-
return console.warn("Vibration failed:",
|
|
3198
|
+
return navigator.vibrate(f);
|
|
3199
|
+
} catch (T) {
|
|
3200
|
+
return console.warn("Vibration failed:", T), !1;
|
|
2433
3201
|
}
|
|
2434
3202
|
}
|
|
2435
3203
|
return !1;
|
|
2436
|
-
},
|
|
2437
|
-
const
|
|
2438
|
-
if (document.getElementById(
|
|
2439
|
-
const
|
|
2440
|
-
|
|
3204
|
+
}, _ = () => {
|
|
3205
|
+
const v = "haptic-keyframes";
|
|
3206
|
+
if (document.getElementById(v)) return;
|
|
3207
|
+
const f = document.createElement("style");
|
|
3208
|
+
f.id = v, f.textContent = `
|
|
2441
3209
|
@keyframes haptic-pulse-light {
|
|
2442
3210
|
0% { transform: scale(1); }
|
|
2443
3211
|
50% { transform: scale(0.98); }
|
|
@@ -2478,107 +3246,107 @@ function Is(e = {}) {
|
|
|
2478
3246
|
0%, 100% { transform: none; filter: none; }
|
|
2479
3247
|
}
|
|
2480
3248
|
}
|
|
2481
|
-
`, document.head.appendChild(
|
|
2482
|
-
},
|
|
2483
|
-
if (!
|
|
2484
|
-
|
|
2485
|
-
const
|
|
2486
|
-
let
|
|
2487
|
-
switch (
|
|
3249
|
+
`, document.head.appendChild(f);
|
|
3250
|
+
}, M = (v, f) => {
|
|
3251
|
+
if (!v) return;
|
|
3252
|
+
_();
|
|
3253
|
+
const T = v.style.animation;
|
|
3254
|
+
let C, z;
|
|
3255
|
+
switch (f) {
|
|
2488
3256
|
case "light":
|
|
2489
|
-
|
|
3257
|
+
C = "haptic-pulse-light 0.15s ease-out", z = 150;
|
|
2490
3258
|
break;
|
|
2491
3259
|
case "medium":
|
|
2492
|
-
|
|
3260
|
+
C = "haptic-pulse-medium 0.2s ease-out", z = 200;
|
|
2493
3261
|
break;
|
|
2494
3262
|
case "heavy":
|
|
2495
|
-
|
|
3263
|
+
C = "haptic-pulse-heavy 0.25s ease-out", z = 250;
|
|
2496
3264
|
break;
|
|
2497
3265
|
case "success":
|
|
2498
|
-
|
|
3266
|
+
C = "haptic-success 0.3s ease-out", z = 300;
|
|
2499
3267
|
break;
|
|
2500
3268
|
case "warning":
|
|
2501
|
-
|
|
3269
|
+
C = "haptic-pulse-medium 0.2s ease-out", z = 200;
|
|
2502
3270
|
break;
|
|
2503
3271
|
case "error":
|
|
2504
|
-
|
|
3272
|
+
C = "haptic-error 0.4s ease-out", z = 400;
|
|
2505
3273
|
break;
|
|
2506
3274
|
default:
|
|
2507
|
-
|
|
3275
|
+
C = "haptic-pulse-light 0.15s ease-out", z = 150;
|
|
2508
3276
|
}
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
},
|
|
2512
|
-
},
|
|
2513
|
-
const
|
|
2514
|
-
return
|
|
2515
|
-
},
|
|
2516
|
-
const
|
|
2517
|
-
return
|
|
3277
|
+
v.style.animation = C, setTimeout(() => {
|
|
3278
|
+
v.style.animation = T;
|
|
3279
|
+
}, z);
|
|
3280
|
+
}, A = (v, f) => {
|
|
3281
|
+
const T = h(f);
|
|
3282
|
+
return M(v, f), T;
|
|
3283
|
+
}, W = () => {
|
|
3284
|
+
const v = d();
|
|
3285
|
+
return n.value = v, v;
|
|
2518
3286
|
};
|
|
2519
|
-
return
|
|
3287
|
+
return W(), {
|
|
2520
3288
|
// Estado
|
|
2521
|
-
isSupported:
|
|
3289
|
+
isSupported: n,
|
|
2522
3290
|
isEnabled: r,
|
|
2523
|
-
canVibrate:
|
|
2524
|
-
hasVisualFeedback:
|
|
3291
|
+
canVibrate: O,
|
|
3292
|
+
hasVisualFeedback: p,
|
|
2525
3293
|
activeVisualFeedback: o,
|
|
2526
3294
|
// Métodos principais (compatíveis com testes)
|
|
2527
|
-
triggerHaptic:
|
|
2528
|
-
triggerVisualFeedback:
|
|
2529
|
-
feedback:
|
|
2530
|
-
checkSupport:
|
|
3295
|
+
triggerHaptic: h,
|
|
3296
|
+
triggerVisualFeedback: M,
|
|
3297
|
+
feedback: A,
|
|
3298
|
+
checkSupport: W,
|
|
2531
3299
|
// Métodos de feedback específicos
|
|
2532
|
-
light:
|
|
2533
|
-
medium:
|
|
2534
|
-
heavy:
|
|
2535
|
-
selection:
|
|
2536
|
-
impact:
|
|
2537
|
-
notification:
|
|
2538
|
-
custom:
|
|
3300
|
+
light: y,
|
|
3301
|
+
medium: V,
|
|
3302
|
+
heavy: F,
|
|
3303
|
+
selection: B,
|
|
3304
|
+
impact: q,
|
|
3305
|
+
notification: $,
|
|
3306
|
+
custom: w,
|
|
2539
3307
|
// Controles
|
|
2540
|
-
enable:
|
|
2541
|
-
disable:
|
|
2542
|
-
toggle:
|
|
3308
|
+
enable: j,
|
|
3309
|
+
disable: E,
|
|
3310
|
+
toggle: x,
|
|
2543
3311
|
// Utilitários
|
|
2544
|
-
detectHapticSupport:
|
|
3312
|
+
detectHapticSupport: d
|
|
2545
3313
|
};
|
|
2546
3314
|
}
|
|
2547
|
-
function
|
|
2548
|
-
const
|
|
2549
|
-
let
|
|
2550
|
-
if (
|
|
3315
|
+
function un(e, i) {
|
|
3316
|
+
const a = localStorage.getItem(e);
|
|
3317
|
+
let t = i;
|
|
3318
|
+
if (a)
|
|
2551
3319
|
try {
|
|
2552
|
-
|
|
3320
|
+
t = JSON.parse(a);
|
|
2553
3321
|
} catch {
|
|
2554
|
-
|
|
3322
|
+
t = i;
|
|
2555
3323
|
}
|
|
2556
|
-
const
|
|
2557
|
-
return
|
|
2558
|
-
|
|
3324
|
+
const n = S(t);
|
|
3325
|
+
return Q(
|
|
3326
|
+
n,
|
|
2559
3327
|
(r) => {
|
|
2560
3328
|
localStorage.setItem(e, JSON.stringify(r));
|
|
2561
3329
|
},
|
|
2562
3330
|
{ deep: !0 }
|
|
2563
|
-
),
|
|
3331
|
+
), n;
|
|
2564
3332
|
}
|
|
2565
|
-
function
|
|
2566
|
-
const
|
|
2567
|
-
let
|
|
2568
|
-
return
|
|
2569
|
-
|
|
2570
|
-
|
|
3333
|
+
function mn(e, i = 300) {
|
|
3334
|
+
const a = S(e.value);
|
|
3335
|
+
let t = null;
|
|
3336
|
+
return Q(e, (n) => {
|
|
3337
|
+
t && clearTimeout(t), t = setTimeout(() => {
|
|
3338
|
+
a.value = n;
|
|
2571
3339
|
}, i);
|
|
2572
|
-
}),
|
|
3340
|
+
}), a;
|
|
2573
3341
|
}
|
|
2574
|
-
function
|
|
2575
|
-
const e =
|
|
3342
|
+
function vn() {
|
|
3343
|
+
const e = S(!1), i = S(null);
|
|
2576
3344
|
return {
|
|
2577
3345
|
copied: e,
|
|
2578
3346
|
error: i,
|
|
2579
|
-
copy: async (
|
|
3347
|
+
copy: async (n) => {
|
|
2580
3348
|
try {
|
|
2581
|
-
return await navigator.clipboard.writeText(
|
|
3349
|
+
return await navigator.clipboard.writeText(n), e.value = !0, i.value = null, setTimeout(() => {
|
|
2582
3350
|
e.value = !1;
|
|
2583
3351
|
}, 2e3), !0;
|
|
2584
3352
|
} catch (r) {
|
|
@@ -2587,60 +3355,281 @@ function Ls() {
|
|
|
2587
3355
|
},
|
|
2588
3356
|
read: async () => {
|
|
2589
3357
|
try {
|
|
2590
|
-
const
|
|
2591
|
-
return i.value = null,
|
|
2592
|
-
} catch (
|
|
2593
|
-
return i.value =
|
|
3358
|
+
const n = await navigator.clipboard.readText();
|
|
3359
|
+
return i.value = null, n;
|
|
3360
|
+
} catch (n) {
|
|
3361
|
+
return i.value = n.message || "Read failed", "";
|
|
2594
3362
|
}
|
|
2595
3363
|
}
|
|
2596
3364
|
};
|
|
2597
3365
|
}
|
|
3366
|
+
const _e = Symbol("theme"), kr = "dm", $r = "--", wr = /* @__PURE__ */ N({
|
|
3367
|
+
__name: "ThemeProvider",
|
|
3368
|
+
props: {
|
|
3369
|
+
theme: {},
|
|
3370
|
+
prefix: { default: kr }
|
|
3371
|
+
},
|
|
3372
|
+
setup(e) {
|
|
3373
|
+
const i = e, a = D(() => i.theme);
|
|
3374
|
+
Me(_e, a);
|
|
3375
|
+
const t = D(() => `${i.prefix}-theme`), n = D(() => {
|
|
3376
|
+
const r = {}, { tokens: o } = i.theme, d = `${$r}${i.prefix}`;
|
|
3377
|
+
return r[`${d}-primary`] = o.colors.primary, r[`${d}-secondary`] = o.colors.secondary, r[`${d}-success`] = o.colors.success, r[`${d}-warning`] = o.colors.warning, r[`${d}-error`] = o.colors.error, r[`${d}-info`] = o.colors.info, Object.entries(o.colors.neutral).forEach(([u, m]) => {
|
|
3378
|
+
r[`${d}-neutral-${u}`] = m;
|
|
3379
|
+
}), r[`${d}-font-sans`] = o.typography.fontFamily.sans, r[`${d}-font-mono`] = o.typography.fontFamily.mono, Object.entries(o.typography.fontSize).forEach(([u, m]) => {
|
|
3380
|
+
r[`${d}-text-${u}`] = m;
|
|
3381
|
+
}), Object.entries(o.typography.fontWeight).forEach(([u, m]) => {
|
|
3382
|
+
r[`${d}-font-${u}`] = m.toString();
|
|
3383
|
+
}), Object.entries(o.typography.lineHeight).forEach(([u, m]) => {
|
|
3384
|
+
r[`${d}-leading-${u}`] = m.toString();
|
|
3385
|
+
}), Object.entries(o.spacing).forEach(([u, m]) => {
|
|
3386
|
+
r[`${d}-space-${u}`] = m;
|
|
3387
|
+
}), Object.entries(o.radius).forEach(([u, m]) => {
|
|
3388
|
+
r[`${d}-radius-${u}`] = m;
|
|
3389
|
+
}), Object.entries(o.shadows).forEach(([u, m]) => {
|
|
3390
|
+
r[`${d}-shadow-${u}`] = m;
|
|
3391
|
+
}), Object.entries(o.transitions).forEach(([u, m]) => {
|
|
3392
|
+
r[`${d}-transition-${u}`] = m;
|
|
3393
|
+
}), r;
|
|
3394
|
+
});
|
|
3395
|
+
return (r, o) => (l(), s("div", {
|
|
3396
|
+
class: R(t.value),
|
|
3397
|
+
style: G(n.value)
|
|
3398
|
+
}, [
|
|
3399
|
+
Y(r.$slots, "default", {}, void 0, !0)
|
|
3400
|
+
], 6));
|
|
3401
|
+
}
|
|
3402
|
+
}), hn = /* @__PURE__ */ P(wr, [["__scopeId", "data-v-dc6e895c"]]);
|
|
3403
|
+
function fn() {
|
|
3404
|
+
const e = Se(_e);
|
|
3405
|
+
if (!e)
|
|
3406
|
+
throw new Error(
|
|
3407
|
+
'useTheme must be used within a ThemeProvider. Wrap your component tree with <ThemeProvider :theme="yourTheme">'
|
|
3408
|
+
);
|
|
3409
|
+
return e;
|
|
3410
|
+
}
|
|
3411
|
+
const bn = {
|
|
3412
|
+
name: "DATAMETRIA",
|
|
3413
|
+
tokens: {
|
|
3414
|
+
colors: {
|
|
3415
|
+
primary: "#0072CE",
|
|
3416
|
+
secondary: "#4B0078",
|
|
3417
|
+
success: "#10b981",
|
|
3418
|
+
warning: "#f59e0b",
|
|
3419
|
+
error: "#ef4444",
|
|
3420
|
+
info: "#06b6d4",
|
|
3421
|
+
neutral: {
|
|
3422
|
+
50: "#f9fafb",
|
|
3423
|
+
100: "#f3f4f6",
|
|
3424
|
+
200: "#e5e7eb",
|
|
3425
|
+
300: "#d1d5db",
|
|
3426
|
+
400: "#9ca3af",
|
|
3427
|
+
500: "#6b7280",
|
|
3428
|
+
600: "#4b5563",
|
|
3429
|
+
700: "#374151",
|
|
3430
|
+
800: "#1f2937",
|
|
3431
|
+
900: "#111827"
|
|
3432
|
+
}
|
|
3433
|
+
},
|
|
3434
|
+
typography: {
|
|
3435
|
+
fontFamily: {
|
|
3436
|
+
sans: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif',
|
|
3437
|
+
mono: 'Menlo, Monaco, Consolas, "Courier New", monospace'
|
|
3438
|
+
},
|
|
3439
|
+
fontSize: {
|
|
3440
|
+
xs: "0.75rem",
|
|
3441
|
+
sm: "0.875rem",
|
|
3442
|
+
base: "1rem",
|
|
3443
|
+
lg: "1.125rem",
|
|
3444
|
+
xl: "1.25rem",
|
|
3445
|
+
"2xl": "1.5rem",
|
|
3446
|
+
"3xl": "1.875rem",
|
|
3447
|
+
"4xl": "2.25rem"
|
|
3448
|
+
},
|
|
3449
|
+
fontWeight: {
|
|
3450
|
+
normal: 400,
|
|
3451
|
+
medium: 500,
|
|
3452
|
+
semibold: 600,
|
|
3453
|
+
bold: 700
|
|
3454
|
+
},
|
|
3455
|
+
lineHeight: {
|
|
3456
|
+
tight: 1.25,
|
|
3457
|
+
normal: 1.5,
|
|
3458
|
+
relaxed: 1.75
|
|
3459
|
+
}
|
|
3460
|
+
},
|
|
3461
|
+
spacing: {
|
|
3462
|
+
0: "0",
|
|
3463
|
+
1: "0.25rem",
|
|
3464
|
+
2: "0.5rem",
|
|
3465
|
+
3: "0.75rem",
|
|
3466
|
+
4: "1rem",
|
|
3467
|
+
6: "1.5rem",
|
|
3468
|
+
8: "2rem",
|
|
3469
|
+
12: "3rem",
|
|
3470
|
+
16: "4rem",
|
|
3471
|
+
20: "5rem",
|
|
3472
|
+
24: "6rem"
|
|
3473
|
+
},
|
|
3474
|
+
radius: {
|
|
3475
|
+
none: "0",
|
|
3476
|
+
sm: "0.25rem",
|
|
3477
|
+
md: "0.375rem",
|
|
3478
|
+
lg: "0.5rem",
|
|
3479
|
+
xl: "0.75rem",
|
|
3480
|
+
full: "9999px"
|
|
3481
|
+
},
|
|
3482
|
+
shadows: {
|
|
3483
|
+
none: "none",
|
|
3484
|
+
sm: "0 1px 2px 0 rgba(0, 0, 0, 0.05)",
|
|
3485
|
+
md: "0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",
|
|
3486
|
+
lg: "0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",
|
|
3487
|
+
xl: "0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)",
|
|
3488
|
+
"2xl": "0 25px 50px -12px rgba(0, 0, 0, 0.25)"
|
|
3489
|
+
},
|
|
3490
|
+
transitions: {
|
|
3491
|
+
fast: "150ms cubic-bezier(0.4, 0, 0.2, 1)",
|
|
3492
|
+
base: "200ms cubic-bezier(0.4, 0, 0.2, 1)",
|
|
3493
|
+
slow: "300ms cubic-bezier(0.4, 0, 0.2, 1)"
|
|
3494
|
+
}
|
|
3495
|
+
}
|
|
3496
|
+
}, pn = {
|
|
3497
|
+
name: "Default",
|
|
3498
|
+
tokens: {
|
|
3499
|
+
colors: {
|
|
3500
|
+
primary: "#3b82f6",
|
|
3501
|
+
secondary: "#8b5cf6",
|
|
3502
|
+
success: "#10b981",
|
|
3503
|
+
warning: "#f59e0b",
|
|
3504
|
+
error: "#ef4444",
|
|
3505
|
+
info: "#06b6d4",
|
|
3506
|
+
neutral: {
|
|
3507
|
+
50: "#f9fafb",
|
|
3508
|
+
100: "#f3f4f6",
|
|
3509
|
+
200: "#e5e7eb",
|
|
3510
|
+
300: "#d1d5db",
|
|
3511
|
+
400: "#9ca3af",
|
|
3512
|
+
500: "#6b7280",
|
|
3513
|
+
600: "#4b5563",
|
|
3514
|
+
700: "#374151",
|
|
3515
|
+
800: "#1f2937",
|
|
3516
|
+
900: "#111827"
|
|
3517
|
+
}
|
|
3518
|
+
},
|
|
3519
|
+
typography: {
|
|
3520
|
+
fontFamily: {
|
|
3521
|
+
sans: "system-ui, -apple-system, sans-serif",
|
|
3522
|
+
mono: "ui-monospace, monospace"
|
|
3523
|
+
},
|
|
3524
|
+
fontSize: {
|
|
3525
|
+
xs: "0.75rem",
|
|
3526
|
+
sm: "0.875rem",
|
|
3527
|
+
base: "1rem",
|
|
3528
|
+
lg: "1.125rem",
|
|
3529
|
+
xl: "1.25rem",
|
|
3530
|
+
"2xl": "1.5rem",
|
|
3531
|
+
"3xl": "1.875rem",
|
|
3532
|
+
"4xl": "2.25rem"
|
|
3533
|
+
},
|
|
3534
|
+
fontWeight: {
|
|
3535
|
+
normal: 400,
|
|
3536
|
+
medium: 500,
|
|
3537
|
+
semibold: 600,
|
|
3538
|
+
bold: 700
|
|
3539
|
+
},
|
|
3540
|
+
lineHeight: {
|
|
3541
|
+
tight: 1.25,
|
|
3542
|
+
normal: 1.5,
|
|
3543
|
+
relaxed: 1.75
|
|
3544
|
+
}
|
|
3545
|
+
},
|
|
3546
|
+
spacing: {
|
|
3547
|
+
0: "0",
|
|
3548
|
+
1: "0.25rem",
|
|
3549
|
+
2: "0.5rem",
|
|
3550
|
+
3: "0.75rem",
|
|
3551
|
+
4: "1rem",
|
|
3552
|
+
6: "1.5rem",
|
|
3553
|
+
8: "2rem",
|
|
3554
|
+
12: "3rem",
|
|
3555
|
+
16: "4rem",
|
|
3556
|
+
20: "5rem",
|
|
3557
|
+
24: "6rem"
|
|
3558
|
+
},
|
|
3559
|
+
radius: {
|
|
3560
|
+
none: "0",
|
|
3561
|
+
sm: "0.25rem",
|
|
3562
|
+
md: "0.375rem",
|
|
3563
|
+
lg: "0.5rem",
|
|
3564
|
+
xl: "0.75rem",
|
|
3565
|
+
full: "9999px"
|
|
3566
|
+
},
|
|
3567
|
+
shadows: {
|
|
3568
|
+
none: "none",
|
|
3569
|
+
sm: "0 1px 2px 0 rgba(0, 0, 0, 0.05)",
|
|
3570
|
+
md: "0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",
|
|
3571
|
+
lg: "0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",
|
|
3572
|
+
xl: "0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)",
|
|
3573
|
+
"2xl": "0 25px 50px -12px rgba(0, 0, 0, 0.25)"
|
|
3574
|
+
},
|
|
3575
|
+
transitions: {
|
|
3576
|
+
fast: "150ms cubic-bezier(0.4, 0, 0.2, 1)",
|
|
3577
|
+
base: "200ms cubic-bezier(0.4, 0, 0.2, 1)",
|
|
3578
|
+
slow: "300ms cubic-bezier(0.4, 0, 0.2, 1)"
|
|
3579
|
+
}
|
|
3580
|
+
}
|
|
3581
|
+
};
|
|
2598
3582
|
export {
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
3583
|
+
jr as DatametriaAlert,
|
|
3584
|
+
Rr as DatametriaAutocomplete,
|
|
3585
|
+
Jr as DatametriaAvatar,
|
|
3586
|
+
Qr as DatametriaBadge,
|
|
3587
|
+
tn as DatametriaBreadcrumb,
|
|
3588
|
+
Dr as DatametriaButton,
|
|
3589
|
+
qr as DatametriaCard,
|
|
3590
|
+
Sr as DatametriaCheckbox,
|
|
3591
|
+
Zr as DatametriaChip,
|
|
3592
|
+
Ar as DatametriaContainer,
|
|
3593
|
+
Er as DatametriaDatePicker,
|
|
3594
|
+
Pr as DatametriaDivider,
|
|
3595
|
+
Or as DatametriaFileUpload,
|
|
3596
|
+
Nr as DatametriaGrid,
|
|
3597
|
+
Vr as DatametriaInput,
|
|
3598
|
+
an as DatametriaMenu,
|
|
3599
|
+
zr as DatametriaModal,
|
|
3600
|
+
en as DatametriaNavbar,
|
|
3601
|
+
Cr as DatametriaPasswordInput,
|
|
3602
|
+
Hr as DatametriaProgress,
|
|
3603
|
+
Tr as DatametriaRadio,
|
|
3604
|
+
Mr as DatametriaSelect,
|
|
3605
|
+
Wr as DatametriaSkeleton,
|
|
3606
|
+
Fr as DatametriaSlider,
|
|
3607
|
+
Gr as DatametriaSortableTable,
|
|
3608
|
+
Kr as DatametriaSpinner,
|
|
3609
|
+
Br as DatametriaSwitch,
|
|
3610
|
+
Xr as DatametriaTable,
|
|
3611
|
+
ln as DatametriaTabs,
|
|
3612
|
+
Ir as DatametriaTextarea,
|
|
3613
|
+
Lr as DatametriaTimePicker,
|
|
3614
|
+
Yr as DatametriaToast,
|
|
3615
|
+
Ur as DatametriaTooltip,
|
|
3616
|
+
hn as ThemeProvider,
|
|
3617
|
+
yr as custom,
|
|
3618
|
+
bn as datametriaTheme,
|
|
3619
|
+
pn as defaultTheme,
|
|
3620
|
+
br as email,
|
|
3621
|
+
gr as maxLength,
|
|
3622
|
+
pr as minLength,
|
|
3623
|
+
_r as pattern,
|
|
3624
|
+
fr as required,
|
|
3625
|
+
rn as useAPI,
|
|
3626
|
+
nn as useAccessibilityScale,
|
|
3627
|
+
on as useBreakpoints,
|
|
3628
|
+
vn as useClipboard,
|
|
3629
|
+
mn as useDebounce,
|
|
3630
|
+
cn as useHapticFeedback,
|
|
3631
|
+
un as useLocalStorage,
|
|
3632
|
+
dn as useRipple,
|
|
3633
|
+
fn as useTheme,
|
|
3634
|
+
sn as useValidation
|
|
2646
3635
|
};
|