@gspa/ui 0.1.4 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +34 -1
- package/dist/Button.vue_vue_type_script_setup_true_lang-B3TkBTvG.js +205 -0
- package/dist/Button.vue_vue_type_script_setup_true_lang-DZxttvYH.cjs +1 -0
- package/dist/DataTable.css +1 -0
- package/dist/DataTableToolBar.css +1 -0
- package/dist/DatePicker.vue_vue_type_script_setup_true_lang-CIKiZaO1.cjs +1 -0
- package/dist/DatePicker.vue_vue_type_script_setup_true_lang-Dx_9f8DO.js +557 -0
- package/dist/FormField.vue_vue_type_script_setup_true_lang-BljDj5YZ.js +205 -0
- package/dist/FormField.vue_vue_type_script_setup_true_lang-FWitIR3U.cjs +1 -0
- package/dist/Header.css +1 -0
- package/dist/Input.vue_vue_type_script_setup_true_lang-C1OQn24h.cjs +1 -0
- package/dist/Input.vue_vue_type_script_setup_true_lang-CpBoY97r.js +137 -0
- package/dist/Loader.css +1 -0
- package/dist/ReminderConfig.css +1 -0
- package/dist/ReusableForm.css +1 -0
- package/dist/Sidebar.css +1 -0
- package/dist/Toast.css +1 -0
- package/dist/components/AccordionItem.cjs +1 -1
- package/dist/components/AccordionItem.js +5 -5
- package/dist/components/Alert.cjs +1 -1
- package/dist/components/Alert.js +71 -66
- package/dist/components/Button.cjs +1 -1
- package/dist/components/Button.js +2 -188
- package/dist/components/DataTable.cjs +1 -1
- package/dist/components/DataTable.js +1 -1
- package/dist/components/DataTableFilters.cjs +1 -1
- package/dist/components/DataTableFilters.js +19 -19
- package/dist/components/DataTableToolBar.cjs +1 -1
- package/dist/components/DataTableToolBar.js +1 -1
- package/dist/components/DatePicker.cjs +1 -1
- package/dist/components/DatePicker.js +2 -399
- package/dist/components/FormField.cjs +1 -1
- package/dist/components/FormField.js +2 -188
- package/dist/components/GraphFilters.cjs +1 -1
- package/dist/components/GraphFilters.js +29 -29
- package/dist/components/Icon.cjs +1 -1
- package/dist/components/Icon.js +23 -16
- package/dist/components/Input.cjs +1 -1
- package/dist/components/Input.js +2 -164
- package/dist/components/ReusableForm.cjs +1 -1
- package/dist/components/ReusableForm.js +188 -159
- package/dist/components/ThemeConfigurator.cjs +1 -1
- package/dist/components/ThemeConfigurator.js +51 -28
- package/dist/gspa-ui.css +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.esm.js +124 -118
- package/dist/layouts/AuthLayout.cjs +1 -1
- package/dist/layouts/AuthLayout.js +110 -112
- package/dist/lib/form-field.cjs +1 -0
- package/dist/lib/form-field.js +4 -0
- package/dist/lib/icon.cjs +1 -0
- package/dist/lib/icon.js +4 -0
- package/dist/lib/theme.cjs +1 -1
- package/dist/lib/theme.js +73 -63
- package/dist/src/components/Alert.vue.d.ts.map +1 -1
- package/dist/src/components/Button.vue.d.ts +127 -29
- package/dist/src/components/Button.vue.d.ts.map +1 -1
- package/dist/src/components/Calendar.vue.d.ts +4 -4
- package/dist/src/components/Checkbox.vue.d.ts +2 -2
- package/dist/src/components/DataTable.vue.d.ts +1 -1
- package/dist/src/components/DatePicker.vue.d.ts +139 -29
- package/dist/src/components/DatePicker.vue.d.ts.map +1 -1
- package/dist/src/components/FormField.vue.d.ts +106 -38
- package/dist/src/components/FormField.vue.d.ts.map +1 -1
- package/dist/src/components/Icon.vue.d.ts.map +1 -1
- package/dist/src/components/Input.vue.d.ts +137 -33
- package/dist/src/components/Input.vue.d.ts.map +1 -1
- package/dist/src/components/ReusableForm.vue.d.ts +1 -1
- package/dist/src/components/ReusableForm.vue.d.ts.map +1 -1
- package/dist/src/components/ReusableFormModal.vue.d.ts +1 -1
- package/dist/src/components/Textarea.vue.d.ts +2 -2
- package/dist/src/index.d.ts +9 -4
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/layouts/AuthLayout.vue.d.ts +2 -0
- package/dist/src/layouts/AuthLayout.vue.d.ts.map +1 -1
- package/dist/src/lib/form-field.d.ts +2 -0
- package/dist/src/lib/form-field.d.ts.map +1 -0
- package/dist/src/lib/icon.d.ts +2 -0
- package/dist/src/lib/icon.d.ts.map +1 -0
- package/dist/src/lib/theme.d.ts +4 -0
- package/dist/src/lib/theme.d.ts.map +1 -1
- package/dist/src/types.d.ts +47 -0
- package/dist/src/types.d.ts.map +1 -0
- package/dist/styles/auth-layout.css +1 -0
- package/dist/styles/button.css +1 -0
- package/dist/styles/form-field.css +1 -0
- package/dist/styles/input.css +1 -0
- package/dist/styles/tokens.css +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +10 -3
- package/dist/src/__tests__/Alert.spec.d.ts +0 -2
- package/dist/src/__tests__/Alert.spec.d.ts.map +0 -1
- package/dist/src/__tests__/App.spec.d.ts +0 -2
- package/dist/src/__tests__/App.spec.d.ts.map +0 -1
- package/dist/src/__tests__/AuthLayout.spec.d.ts +0 -2
- package/dist/src/__tests__/AuthLayout.spec.d.ts.map +0 -1
- package/dist/src/__tests__/Badge.spec.d.ts +0 -2
- package/dist/src/__tests__/Badge.spec.d.ts.map +0 -1
- package/dist/src/__tests__/Button.spec.d.ts +0 -2
- package/dist/src/__tests__/Button.spec.d.ts.map +0 -1
- package/dist/src/__tests__/Card.spec.d.ts +0 -2
- package/dist/src/__tests__/Card.spec.d.ts.map +0 -1
- package/dist/src/__tests__/Checkbox.spec.d.ts +0 -2
- package/dist/src/__tests__/Checkbox.spec.d.ts.map +0 -1
- package/dist/src/__tests__/Dropdown.spec.d.ts +0 -2
- package/dist/src/__tests__/Dropdown.spec.d.ts.map +0 -1
- package/dist/src/__tests__/Input.spec.d.ts +0 -2
- package/dist/src/__tests__/Input.spec.d.ts.map +0 -1
- package/dist/src/__tests__/Modal.spec.d.ts +0 -2
- package/dist/src/__tests__/Modal.spec.d.ts.map +0 -1
- package/dist/src/__tests__/Radio.spec.d.ts +0 -2
- package/dist/src/__tests__/Radio.spec.d.ts.map +0 -1
- package/dist/src/__tests__/ReusableForm.spec.d.ts +0 -2
- package/dist/src/__tests__/ReusableForm.spec.d.ts.map +0 -1
- package/dist/src/__tests__/Tabs.spec.d.ts +0 -2
- package/dist/src/__tests__/Tabs.spec.d.ts.map +0 -1
- package/dist/src/__tests__/integration/CardIntegration.spec.d.ts +0 -2
- package/dist/src/__tests__/integration/CardIntegration.spec.d.ts.map +0 -1
- package/dist/src/__tests__/integration/FormIntegration.spec.d.ts +0 -2
- package/dist/src/__tests__/integration/FormIntegration.spec.d.ts.map +0 -1
- package/dist/src/__tests__/integration/ModalIntegration.spec.d.ts +0 -2
- package/dist/src/__tests__/integration/ModalIntegration.spec.d.ts.map +0 -1
- package/dist/src/__tests__/integration/NavigationIntegration.spec.d.ts +0 -2
- package/dist/src/__tests__/integration/NavigationIntegration.spec.d.ts.map +0 -1
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
import { defineComponent as D, useId as N, computed as s, ref as F, provide as A, createElementBlock as r, openBlock as i, normalizeClass as m, unref as a, createCommentVNode as c, createElementVNode as d, createVNode as B, createTextVNode as O, toDisplayString as h, createBlock as H, renderSlot as K, Transition as C, withCtx as T } from "vue";
|
|
2
|
+
import { cva as g } from "class-variance-authority";
|
|
3
|
+
import { cn as f } from "./utils/cn.js";
|
|
4
|
+
import { FORM_FIELD_CONTEXT_KEY as R } from "./lib/form-field.js";
|
|
5
|
+
import { _ as U } from "./DatePicker.vue_vue_type_script_setup_true_lang-Dx_9f8DO.js";
|
|
6
|
+
const X = ["for"], Y = {
|
|
7
|
+
key: 0,
|
|
8
|
+
class: "ui-danger ml-1",
|
|
9
|
+
"aria-hidden": "true"
|
|
10
|
+
}, G = {
|
|
11
|
+
key: 1,
|
|
12
|
+
class: "sr-only"
|
|
13
|
+
}, J = ["id"], Q = { class: "relative" }, W = ["disabled", "aria-controls", "aria-label"], Z = {
|
|
14
|
+
key: 0,
|
|
15
|
+
class: "h-4 w-4",
|
|
16
|
+
viewBox: "0 0 24 24",
|
|
17
|
+
fill: "none",
|
|
18
|
+
stroke: "currentColor",
|
|
19
|
+
"aria-hidden": "true"
|
|
20
|
+
}, _ = {
|
|
21
|
+
key: 1,
|
|
22
|
+
class: "h-4 w-4",
|
|
23
|
+
viewBox: "0 0 24 24",
|
|
24
|
+
fill: "none",
|
|
25
|
+
stroke: "currentColor",
|
|
26
|
+
"aria-hidden": "true"
|
|
27
|
+
}, ee = ["id"], te = ["id"], se = ["id"], oe = /* @__PURE__ */ D({
|
|
28
|
+
inheritAttrs: !1,
|
|
29
|
+
__name: "FormField",
|
|
30
|
+
props: {
|
|
31
|
+
label: String,
|
|
32
|
+
description: String,
|
|
33
|
+
error: String,
|
|
34
|
+
serverError: String,
|
|
35
|
+
success: String,
|
|
36
|
+
helpText: String,
|
|
37
|
+
required: { type: Boolean, default: !1 },
|
|
38
|
+
disabled: { type: Boolean, default: !1 },
|
|
39
|
+
autocomplete: String,
|
|
40
|
+
name: String,
|
|
41
|
+
type: { type: String, default: "text" },
|
|
42
|
+
modelValue: { type: [String, Date], default: "" },
|
|
43
|
+
size: { type: String, default: "md" },
|
|
44
|
+
id: String,
|
|
45
|
+
showPasswordLabel: { type: String, default: "Show password" },
|
|
46
|
+
hidePasswordLabel: { type: String, default: "Hide password" }
|
|
47
|
+
},
|
|
48
|
+
emits: ["update:modelValue"],
|
|
49
|
+
setup(e, { emit: M }) {
|
|
50
|
+
const t = e, q = M, E = `field-${N()}`, o = s(() => t.id || E), b = s(() => t.serverError || t.error || ""), n = s(() => !!b.value), v = F(!1), p = s(() => t.type === "password" && v.value ? "text" : t.type), x = s(() => `${o.value}-description`), k = s(() => `${o.value}-error`), w = s(() => `${o.value}-help`), z = s(() => `${o.value}-success`), V = () => {
|
|
51
|
+
t.disabled || (v.value = !v.value);
|
|
52
|
+
}, y = s(() => {
|
|
53
|
+
const u = [];
|
|
54
|
+
return t.description && u.push(x.value), n.value ? u.push(k.value) : t.helpText && u.push(w.value), t.success && !n.value && u.push(z.value), u.length ? u.join(" ") : void 0;
|
|
55
|
+
});
|
|
56
|
+
A(R, {
|
|
57
|
+
id: o,
|
|
58
|
+
describedBy: y,
|
|
59
|
+
invalid: n,
|
|
60
|
+
required: s(() => t.required),
|
|
61
|
+
disabled: s(() => t.disabled),
|
|
62
|
+
autocomplete: s(() => t.autocomplete),
|
|
63
|
+
name: s(() => t.name),
|
|
64
|
+
inputType: p,
|
|
65
|
+
originalType: s(() => t.type),
|
|
66
|
+
hasPasswordToggle: s(() => t.type === "password")
|
|
67
|
+
});
|
|
68
|
+
const I = g("ui-text", { variants: { size: { sm: "space-y-1", md: "space-y-2", lg: "space-y-3" } }, defaultVariants: { size: "md" } }), L = g("block ui-text", { variants: { size: { sm: "text-xs font-medium", md: "text-sm font-medium", lg: "text-base font-medium" } }, defaultVariants: { size: "md" } }), P = g("ui-text-muted", { variants: { size: { sm: "text-xs", md: "text-sm", lg: "text-base" } }, defaultVariants: { size: "md" } }), S = g("flex items-start gap-2", { variants: { size: { sm: "text-xs", md: "text-sm", lg: "text-sm" }, intent: { error: "ui-danger", success: "ui-success" } }, defaultVariants: { size: "md", intent: "error" } }), $ = g("ui-text-muted", { variants: { size: { sm: "text-xs", md: "text-sm", lg: "text-sm" } }, defaultVariants: { size: "md" } });
|
|
69
|
+
return (u, l) => (i(), r("div", {
|
|
70
|
+
class: m(a(f)(a(I)({ size: e.size }), u.$attrs.class))
|
|
71
|
+
}, [
|
|
72
|
+
e.label ? (i(), r("label", {
|
|
73
|
+
key: 0,
|
|
74
|
+
for: o.value,
|
|
75
|
+
class: m(a(f)(a(L)({ size: e.size })))
|
|
76
|
+
}, [
|
|
77
|
+
O(h(e.label) + " ", 1),
|
|
78
|
+
e.required ? (i(), r("span", Y, "*")) : c("", !0),
|
|
79
|
+
e.required ? (i(), r("span", G, " (required)")) : c("", !0)
|
|
80
|
+
], 10, X)) : c("", !0),
|
|
81
|
+
e.description ? (i(), r("p", {
|
|
82
|
+
key: 1,
|
|
83
|
+
id: x.value,
|
|
84
|
+
class: m(a(f)(a(P)({ size: e.size })))
|
|
85
|
+
}, h(e.description), 11, J)) : c("", !0),
|
|
86
|
+
d("div", Q, [
|
|
87
|
+
e.type === "date" ? (i(), H(U, {
|
|
88
|
+
key: 0,
|
|
89
|
+
id: o.value,
|
|
90
|
+
"model-value": e.modelValue,
|
|
91
|
+
disabled: e.disabled,
|
|
92
|
+
required: e.required,
|
|
93
|
+
"aria-describedby": y.value,
|
|
94
|
+
"aria-invalid": n.value,
|
|
95
|
+
class: m(n.value ? "border-(--ui-danger)" : ""),
|
|
96
|
+
"onUpdate:modelValue": l[0] || (l[0] = (j) => q("update:modelValue", j))
|
|
97
|
+
}, null, 8, ["id", "model-value", "disabled", "required", "aria-describedby", "aria-invalid", "class"])) : K(u.$slots, "default", {
|
|
98
|
+
key: 1,
|
|
99
|
+
fieldId: o.value,
|
|
100
|
+
hasError: n.value,
|
|
101
|
+
ariaDescribedBy: y.value,
|
|
102
|
+
inputType: p.value,
|
|
103
|
+
showPassword: v.value,
|
|
104
|
+
togglePasswordVisibility: V
|
|
105
|
+
}),
|
|
106
|
+
e.type === "password" ? (i(), r("button", {
|
|
107
|
+
key: 2,
|
|
108
|
+
type: "button",
|
|
109
|
+
class: "absolute inset-y-0 right-0 flex items-center pr-3 ui-text-muted transition-colors hover:text-(--ui-text) focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-(--ui-ring) focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
|
|
110
|
+
disabled: e.disabled,
|
|
111
|
+
"aria-controls": o.value,
|
|
112
|
+
"aria-label": v.value ? e.hidePasswordLabel : e.showPasswordLabel,
|
|
113
|
+
onClick: V
|
|
114
|
+
}, [
|
|
115
|
+
v.value ? (i(), r("svg", Z, [...l[1] || (l[1] = [
|
|
116
|
+
d("path", {
|
|
117
|
+
"stroke-linecap": "round",
|
|
118
|
+
"stroke-linejoin": "round",
|
|
119
|
+
"stroke-width": "2",
|
|
120
|
+
d: "M3 3l18 18M10.6 10.7a2 2 0 002.7 2.7M9.9 4.2A10.7 10.7 0 0112 4c5 0 8.7 4.4 9.6 6.5.2.3.2.7 0 1a15 15 0 01-2.2 3.3M6.2 6.2A15.8 15.8 0 002.4 10.5c-.2.3-.2.7 0 1C3.3 13.6 7 18 12 18c1 0 2-.2 2.9-.5"
|
|
121
|
+
}, null, -1)
|
|
122
|
+
])])) : (i(), r("svg", _, [...l[2] || (l[2] = [
|
|
123
|
+
d("path", {
|
|
124
|
+
"stroke-linecap": "round",
|
|
125
|
+
"stroke-linejoin": "round",
|
|
126
|
+
"stroke-width": "2",
|
|
127
|
+
d: "M2.4 10.5C3.3 8.4 7 4 12 4s8.7 4.4 9.6 6.5c.2.3.2.7 0 1C20.7 13.6 17 18 12 18s-8.7-4.4-9.6-6.5a1.1 1.1 0 010-1z"
|
|
128
|
+
}, null, -1),
|
|
129
|
+
d("circle", {
|
|
130
|
+
cx: "12",
|
|
131
|
+
cy: "11",
|
|
132
|
+
r: "3",
|
|
133
|
+
"stroke-width": "2"
|
|
134
|
+
}, null, -1)
|
|
135
|
+
])]))
|
|
136
|
+
], 8, W)) : c("", !0)
|
|
137
|
+
]),
|
|
138
|
+
B(C, { name: "ui-field-message" }, {
|
|
139
|
+
default: T(() => [
|
|
140
|
+
n.value ? (i(), r("div", {
|
|
141
|
+
key: 0,
|
|
142
|
+
id: k.value,
|
|
143
|
+
class: m(a(f)(a(S)({ size: e.size, intent: "error" }))),
|
|
144
|
+
role: "alert",
|
|
145
|
+
"aria-live": "polite",
|
|
146
|
+
"aria-atomic": "true"
|
|
147
|
+
}, [
|
|
148
|
+
l[3] || (l[3] = d("svg", {
|
|
149
|
+
class: "mt-0.5 h-4 w-4 shrink-0",
|
|
150
|
+
viewBox: "0 0 24 24",
|
|
151
|
+
fill: "none",
|
|
152
|
+
stroke: "currentColor",
|
|
153
|
+
"aria-hidden": "true"
|
|
154
|
+
}, [
|
|
155
|
+
d("path", {
|
|
156
|
+
"stroke-linecap": "round",
|
|
157
|
+
"stroke-linejoin": "round",
|
|
158
|
+
"stroke-width": "2",
|
|
159
|
+
d: "M12 9v4m0 4h.01M10.3 4.1L2 18.2a1.2 1.2 0 001 1.8h18a1.2 1.2 0 001-1.8L13.7 4.1a2 2 0 00-3.4 0z"
|
|
160
|
+
})
|
|
161
|
+
], -1)),
|
|
162
|
+
d("span", null, h(b.value), 1)
|
|
163
|
+
], 10, ee)) : c("", !0)
|
|
164
|
+
]),
|
|
165
|
+
_: 1
|
|
166
|
+
}),
|
|
167
|
+
e.helpText && !n.value ? (i(), r("p", {
|
|
168
|
+
key: 2,
|
|
169
|
+
id: w.value,
|
|
170
|
+
class: m(a(f)(a($)({ size: e.size })))
|
|
171
|
+
}, h(e.helpText), 11, te)) : c("", !0),
|
|
172
|
+
B(C, { name: "ui-field-message" }, {
|
|
173
|
+
default: T(() => [
|
|
174
|
+
e.success && !n.value ? (i(), r("div", {
|
|
175
|
+
key: 0,
|
|
176
|
+
id: z.value,
|
|
177
|
+
class: m(a(f)(a(S)({ size: e.size, intent: "success" }))),
|
|
178
|
+
role: "status",
|
|
179
|
+
"aria-live": "polite"
|
|
180
|
+
}, [
|
|
181
|
+
l[4] || (l[4] = d("svg", {
|
|
182
|
+
class: "mt-0.5 h-4 w-4 shrink-0",
|
|
183
|
+
viewBox: "0 0 24 24",
|
|
184
|
+
fill: "none",
|
|
185
|
+
stroke: "currentColor",
|
|
186
|
+
"aria-hidden": "true"
|
|
187
|
+
}, [
|
|
188
|
+
d("path", {
|
|
189
|
+
"stroke-linecap": "round",
|
|
190
|
+
"stroke-linejoin": "round",
|
|
191
|
+
"stroke-width": "2",
|
|
192
|
+
d: "M5 12l4 4L19 6"
|
|
193
|
+
})
|
|
194
|
+
], -1)),
|
|
195
|
+
d("span", null, h(e.success), 1)
|
|
196
|
+
], 10, se)) : c("", !0)
|
|
197
|
+
]),
|
|
198
|
+
_: 1
|
|
199
|
+
})
|
|
200
|
+
], 2));
|
|
201
|
+
}
|
|
202
|
+
});
|
|
203
|
+
export {
|
|
204
|
+
oe as _
|
|
205
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("vue"),d=require("class-variance-authority"),n=require("./utils/cn.cjs"),C=require("./lib/form-field.cjs"),N=require("./DatePicker.vue_vue_type_script_setup_true_lang-CIKiZaO1.cjs"),S=["for"],q={key:0,class:"ui-danger ml-1","aria-hidden":"true"},T={key:1,class:"sr-only"},D=["id"],M={class:"relative"},I=["disabled","aria-controls","aria-label"],P={key:0,class:"h-4 w-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","aria-hidden":"true"},L={key:1,class:"h-4 w-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","aria-hidden":"true"},$=["id"],j=["id"],F=["id"],A=e.defineComponent({inheritAttrs:!1,__name:"FormField",props:{label:String,description:String,error:String,serverError:String,success:String,helpText:String,required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},autocomplete:String,name:String,type:{type:String,default:"text"},modelValue:{type:[String,Date],default:""},size:{type:String,default:"md"},id:String,showPasswordLabel:{type:String,default:"Show password"},hidePasswordLabel:{type:String,default:"Hide password"}},emits:["update:modelValue"],setup(t,{emit:g}){const s=t,b=g,x=`field-${e.useId()}`,i=e.computed(()=>s.id||x),u=e.computed(()=>s.serverError||s.error||""),r=e.computed(()=>!!u.value),o=e.ref(!1),m=e.computed(()=>s.type==="password"&&o.value?"text":s.type),v=e.computed(()=>`${i.value}-description`),f=e.computed(()=>`${i.value}-error`),p=e.computed(()=>`${i.value}-help`),k=e.computed(()=>`${i.value}-success`),h=()=>{s.disabled||(o.value=!o.value)},c=e.computed(()=>{const l=[];return s.description&&l.push(v.value),r.value?l.push(f.value):s.helpText&&l.push(p.value),s.success&&!r.value&&l.push(k.value),l.length?l.join(" "):void 0});e.provide(C.FORM_FIELD_CONTEXT_KEY,{id:i,describedBy:c,invalid:r,required:e.computed(()=>s.required),disabled:e.computed(()=>s.disabled),autocomplete:e.computed(()=>s.autocomplete),name:e.computed(()=>s.name),inputType:m,originalType:e.computed(()=>s.type),hasPasswordToggle:e.computed(()=>s.type==="password")});const V=d.cva("ui-text",{variants:{size:{sm:"space-y-1",md:"space-y-2",lg:"space-y-3"}},defaultVariants:{size:"md"}}),w=d.cva("block ui-text",{variants:{size:{sm:"text-xs font-medium",md:"text-sm font-medium",lg:"text-base font-medium"}},defaultVariants:{size:"md"}}),B=d.cva("ui-text-muted",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),y=d.cva("flex items-start gap-2",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-sm"},intent:{error:"ui-danger",success:"ui-success"}},defaultVariants:{size:"md",intent:"error"}}),z=d.cva("ui-text-muted",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-sm"}},defaultVariants:{size:"md"}});return(l,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(n.cn)(e.unref(V)({size:t.size}),l.$attrs.class))},[t.label?(e.openBlock(),e.createElementBlock("label",{key:0,for:i.value,class:e.normalizeClass(e.unref(n.cn)(e.unref(w)({size:t.size})))},[e.createTextVNode(e.toDisplayString(t.label)+" ",1),t.required?(e.openBlock(),e.createElementBlock("span",q,"*")):e.createCommentVNode("",!0),t.required?(e.openBlock(),e.createElementBlock("span",T," (required)")):e.createCommentVNode("",!0)],10,S)):e.createCommentVNode("",!0),t.description?(e.openBlock(),e.createElementBlock("p",{key:1,id:v.value,class:e.normalizeClass(e.unref(n.cn)(e.unref(B)({size:t.size})))},e.toDisplayString(t.description),11,D)):e.createCommentVNode("",!0),e.createElementVNode("div",M,[t.type==="date"?(e.openBlock(),e.createBlock(N._sfc_main,{key:0,id:i.value,"model-value":t.modelValue,disabled:t.disabled,required:t.required,"aria-describedby":c.value,"aria-invalid":r.value,class:e.normalizeClass(r.value?"border-(--ui-danger)":""),"onUpdate:modelValue":a[0]||(a[0]=E=>b("update:modelValue",E))},null,8,["id","model-value","disabled","required","aria-describedby","aria-invalid","class"])):e.renderSlot(l.$slots,"default",{key:1,fieldId:i.value,hasError:r.value,ariaDescribedBy:c.value,inputType:m.value,showPassword:o.value,togglePasswordVisibility:h}),t.type==="password"?(e.openBlock(),e.createElementBlock("button",{key:2,type:"button",class:"absolute inset-y-0 right-0 flex items-center pr-3 ui-text-muted transition-colors hover:text-(--ui-text) focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-(--ui-ring) focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",disabled:t.disabled,"aria-controls":i.value,"aria-label":o.value?t.hidePasswordLabel:t.showPasswordLabel,onClick:h},[o.value?(e.openBlock(),e.createElementBlock("svg",P,[...a[1]||(a[1]=[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M3 3l18 18M10.6 10.7a2 2 0 002.7 2.7M9.9 4.2A10.7 10.7 0 0112 4c5 0 8.7 4.4 9.6 6.5.2.3.2.7 0 1a15 15 0 01-2.2 3.3M6.2 6.2A15.8 15.8 0 002.4 10.5c-.2.3-.2.7 0 1C3.3 13.6 7 18 12 18c1 0 2-.2 2.9-.5"},null,-1)])])):(e.openBlock(),e.createElementBlock("svg",L,[...a[2]||(a[2]=[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M2.4 10.5C3.3 8.4 7 4 12 4s8.7 4.4 9.6 6.5c.2.3.2.7 0 1C20.7 13.6 17 18 12 18s-8.7-4.4-9.6-6.5a1.1 1.1 0 010-1z"},null,-1),e.createElementVNode("circle",{cx:"12",cy:"11",r:"3","stroke-width":"2"},null,-1)])]))],8,I)):e.createCommentVNode("",!0)]),e.createVNode(e.Transition,{name:"ui-field-message"},{default:e.withCtx(()=>[r.value?(e.openBlock(),e.createElementBlock("div",{key:0,id:f.value,class:e.normalizeClass(e.unref(n.cn)(e.unref(y)({size:t.size,intent:"error"}))),role:"alert","aria-live":"polite","aria-atomic":"true"},[a[3]||(a[3]=e.createElementVNode("svg",{class:"mt-0.5 h-4 w-4 shrink-0",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","aria-hidden":"true"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 9v4m0 4h.01M10.3 4.1L2 18.2a1.2 1.2 0 001 1.8h18a1.2 1.2 0 001-1.8L13.7 4.1a2 2 0 00-3.4 0z"})],-1)),e.createElementVNode("span",null,e.toDisplayString(u.value),1)],10,$)):e.createCommentVNode("",!0)]),_:1}),t.helpText&&!r.value?(e.openBlock(),e.createElementBlock("p",{key:2,id:p.value,class:e.normalizeClass(e.unref(n.cn)(e.unref(z)({size:t.size})))},e.toDisplayString(t.helpText),11,j)):e.createCommentVNode("",!0),e.createVNode(e.Transition,{name:"ui-field-message"},{default:e.withCtx(()=>[t.success&&!r.value?(e.openBlock(),e.createElementBlock("div",{key:0,id:k.value,class:e.normalizeClass(e.unref(n.cn)(e.unref(y)({size:t.size,intent:"success"}))),role:"status","aria-live":"polite"},[a[4]||(a[4]=e.createElementVNode("svg",{class:"mt-0.5 h-4 w-4 shrink-0",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","aria-hidden":"true"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 12l4 4L19 6"})],-1)),e.createElementVNode("span",null,e.toDisplayString(t.success),1)],10,F)):e.createCommentVNode("",!0)]),_:1})],2))}});exports._sfc_main=A;
|
package/dist/Header.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.kv-module-header[data-v-3e4b26b8]{background:color-mix(in oklab,var(--module-soft, var(--ui-primary-soft)) 62%,var(--ui-surface) 38%)}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("vue"),I=require("./lib/form-field.cjs"),R={class:"relative"},q={key:0,class:"pointer-events-none absolute left-3 top-1/2 -translate-y-1/2"},z=["id","name","type","value","placeholder","disabled","readonly","required","autocomplete","aria-describedby","aria-invalid"],L={key:1,class:"absolute right-3 top-1/2 -translate-y-1/2"},F=["aria-label"],j=["id"],M=["id"],O=e.defineComponent({__name:"Input",props:{modelValue:{type:[String,Number],default:""},type:{type:String,default:"text"},placeholder:{type:String,default:""},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},size:{type:String,default:"md"},variant:{type:String,default:"default"},iconLeft:{type:[String,Object],default:null},iconRight:{type:[String,Object],default:null},clearable:{type:Boolean,default:!1},clearLabel:{type:String,default:"Clear input"},autocomplete:String,name:String,error:String,serverError:String,helpText:String,ariaDescribedBy:String,id:String},emits:["update:modelValue","blur","focus","clear","keydown"],setup(o,{expose:g,emit:y}){const t=o,i=y,r=e.inject(I.FORM_FIELD_CONTEXT_KEY,null),u=e.ref(null),b=`input-${e.useId()}`,d=e.computed(()=>t.id||e.unref(r?.id)||b),B=e.computed(()=>{const a=e.unref(r?.inputType),l=e.unref(r?.originalType);return l==="password"||t.type==="text"&&l&&l!=="text"?a:t.type}),c=e.computed(()=>t.disabled||!!e.unref(r?.disabled)),h=e.computed(()=>t.required||!!e.unref(r?.required)),k=e.computed(()=>t.autocomplete??e.unref(r?.autocomplete)??void 0),x=e.computed(()=>t.name??e.unref(r?.name)??void 0),s=e.computed(()=>t.serverError||t.error||""),f=e.computed(()=>!!s.value||t.variant==="error"||!!e.unref(r?.invalid)),m=e.computed(()=>`${d.value}-error`),p=e.computed(()=>`${d.value}-help`),C=e.computed(()=>!!s.value&&!r),E=e.computed(()=>{const a=new Set,l=n=>String(n||"").split(/\s+/).filter(Boolean).forEach(D=>a.add(D));return l(t.ariaDescribedBy),l(e.unref(r?.describedBy)),!r&&s.value?a.add(m.value):!r&&t.helpText&&a.add(p.value),a.size?[...a].join(" "):void 0}),S=a=>i("update:modelValue",a.target.value),w=()=>{i("update:modelValue",""),i("clear"),u.value?.focus()},V=e.computed(()=>({sm:"px-3 py-1.5 text-sm",md:"px-3 py-2 text-sm",lg:"px-4 py-3 text-base"})[t.size]),T=e.computed(()=>f.value?"border-(--ui-danger) focus:border-(--ui-danger) focus:ring-(--ui-danger)":{default:"ui-border-strong focus:border-(--ui-primary) focus:ring-(--ui-ring)",error:"border-(--ui-danger) focus:border-(--ui-danger) focus:ring-(--ui-danger)",success:"border-(--ui-success) focus:border-(--ui-success) focus:ring-(--ui-success)"}[t.variant]),v=e.computed(()=>["ui-text-muted",{sm:"h-4 w-4",md:"h-4 w-4",lg:"h-5 w-5"}[t.size]]),N=e.computed(()=>["block rounded-lg border ui-surface transition-colors duration-200","focus:outline-none focus:ring-2 focus:ring-offset-1","disabled:bg-(--ui-surface-muted) disabled:text-(--ui-text-muted) disabled:cursor-not-allowed disabled:opacity-80","placeholder:text-(--ui-text-muted)",t.type==="color"?"h-12 w-20 cursor-pointer":"w-full",V.value,T.value,{"pl-10":t.iconLeft,"pr-10":t.iconRight||t.clearable||!!e.unref(r?.hasPasswordToggle)}]);return g({focus:()=>u.value?.focus(),blur:()=>u.value?.blur(),select:()=>u.value?.select()}),(a,l)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",R,[o.iconLeft?(e.openBlock(),e.createElementBlock("div",q,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.iconLeft),{class:e.normalizeClass(v.value),"aria-hidden":"true"},null,8,["class"]))])):e.createCommentVNode("",!0),e.createElementVNode("input",{id:d.value,ref_key:"inputRef",ref:u,name:x.value,type:B.value,value:o.modelValue,placeholder:o.placeholder,disabled:c.value,readonly:o.readonly,required:h.value,autocomplete:k.value,class:e.normalizeClass(N.value),"aria-describedby":E.value,"aria-invalid":f.value?"true":void 0,onInput:S,onBlur:l[0]||(l[0]=n=>i("blur",n)),onFocus:l[1]||(l[1]=n=>i("focus",n)),onKeydown:l[2]||(l[2]=n=>i("keydown",n))},null,42,z),o.iconRight||o.clearable?(e.openBlock(),e.createElementBlock("div",L,[o.clearable&&o.modelValue&&!c.value?(e.openBlock(),e.createElementBlock("button",{key:0,class:"rounded-sm ui-text-muted transition-colors hover:text-(--ui-text) focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-(--ui-ring)",type:"button","aria-label":o.clearLabel,onClick:w},[...l[3]||(l[3]=[e.createElementVNode("svg",{class:"h-5 w-5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","aria-hidden":"true"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 6l12 12M18 6L6 18"})],-1)])],8,F)):o.iconRight?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.iconRight),{key:1,class:e.normalizeClass(v.value),"aria-hidden":"true"},null,8,["class"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),C.value?(e.openBlock(),e.createElementBlock("p",{key:0,id:m.value,class:"mt-1 flex items-center gap-1 text-sm ui-danger",role:"alert","aria-live":"polite","aria-atomic":"true"},e.toDisplayString(s.value),9,j)):o.helpText&&!e.unref(r)?(e.openBlock(),e.createElementBlock("p",{key:1,id:p.value,class:"mt-1 text-sm ui-text-muted"},e.toDisplayString(o.helpText),9,M)):e.createCommentVNode("",!0)]))}});exports._sfc_main=O;
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import { defineComponent as $, inject as A, ref as K, useId as H, computed as t, unref as i, createElementBlock as d, openBlock as n, createElementVNode as v, createCommentVNode as p, createBlock as k, resolveDynamicComponent as S, normalizeClass as g, toDisplayString as w } from "vue";
|
|
2
|
+
import { FORM_FIELD_CONTEXT_KEY as P } from "./lib/form-field.js";
|
|
3
|
+
const X = { class: "relative" }, Y = {
|
|
4
|
+
key: 0,
|
|
5
|
+
class: "pointer-events-none absolute left-3 top-1/2 -translate-y-1/2"
|
|
6
|
+
}, G = ["id", "name", "type", "value", "placeholder", "disabled", "readonly", "required", "autocomplete", "aria-describedby", "aria-invalid"], J = {
|
|
7
|
+
key: 1,
|
|
8
|
+
class: "absolute right-3 top-1/2 -translate-y-1/2"
|
|
9
|
+
}, Q = ["aria-label"], U = ["id"], W = ["id"], ee = /* @__PURE__ */ $({
|
|
10
|
+
__name: "Input",
|
|
11
|
+
props: {
|
|
12
|
+
modelValue: { type: [String, Number], default: "" },
|
|
13
|
+
type: { type: String, default: "text" },
|
|
14
|
+
placeholder: { type: String, default: "" },
|
|
15
|
+
disabled: { type: Boolean, default: !1 },
|
|
16
|
+
readonly: { type: Boolean, default: !1 },
|
|
17
|
+
required: { type: Boolean, default: !1 },
|
|
18
|
+
size: { type: String, default: "md" },
|
|
19
|
+
variant: { type: String, default: "default" },
|
|
20
|
+
iconLeft: { type: [String, Object], default: null },
|
|
21
|
+
iconRight: { type: [String, Object], default: null },
|
|
22
|
+
clearable: { type: Boolean, default: !1 },
|
|
23
|
+
clearLabel: { type: String, default: "Clear input" },
|
|
24
|
+
autocomplete: String,
|
|
25
|
+
name: String,
|
|
26
|
+
error: String,
|
|
27
|
+
serverError: String,
|
|
28
|
+
helpText: String,
|
|
29
|
+
ariaDescribedBy: String,
|
|
30
|
+
id: String
|
|
31
|
+
},
|
|
32
|
+
emits: ["update:modelValue", "blur", "focus", "clear", "keydown"],
|
|
33
|
+
setup(l, { expose: C, emit: T }) {
|
|
34
|
+
const e = l, s = T, r = A(P, null), c = K(null), E = `input-${H()}`, m = t(() => e.id || i(r?.id) || E), I = t(() => {
|
|
35
|
+
const o = i(r?.inputType), a = i(r?.originalType);
|
|
36
|
+
return a === "password" || e.type === "text" && a && a !== "text" ? o : e.type;
|
|
37
|
+
}), y = t(() => e.disabled || !!i(r?.disabled)), R = t(() => e.required || !!i(r?.required)), L = t(() => e.autocomplete ?? i(r?.autocomplete) ?? void 0), V = t(() => e.name ?? i(r?.name) ?? void 0), f = t(() => e.serverError || e.error || ""), b = t(() => !!f.value || e.variant === "error" || !!i(r?.invalid)), h = t(() => `${m.value}-error`), x = t(() => `${m.value}-help`), D = t(() => !!f.value && !r), q = t(() => {
|
|
38
|
+
const o = /* @__PURE__ */ new Set(), a = (u) => String(u || "").split(/\s+/).filter(Boolean).forEach((O) => o.add(O));
|
|
39
|
+
return a(e.ariaDescribedBy), a(i(r?.describedBy)), !r && f.value ? o.add(h.value) : !r && e.helpText && o.add(x.value), o.size ? [...o].join(" ") : void 0;
|
|
40
|
+
}), z = (o) => s("update:modelValue", o.target.value), j = () => {
|
|
41
|
+
s("update:modelValue", ""), s("clear"), c.value?.focus();
|
|
42
|
+
}, F = t(() => ({ sm: "px-3 py-1.5 text-sm", md: "px-3 py-2 text-sm", lg: "px-4 py-3 text-base" })[e.size]), N = t(() => b.value ? "border-(--ui-danger) focus:border-(--ui-danger) focus:ring-(--ui-danger)" : {
|
|
43
|
+
default: "ui-border-strong focus:border-(--ui-primary) focus:ring-(--ui-ring)",
|
|
44
|
+
error: "border-(--ui-danger) focus:border-(--ui-danger) focus:ring-(--ui-danger)",
|
|
45
|
+
success: "border-(--ui-success) focus:border-(--ui-success) focus:ring-(--ui-success)"
|
|
46
|
+
}[e.variant]), B = t(() => ["ui-text-muted", { sm: "h-4 w-4", md: "h-4 w-4", lg: "h-5 w-5" }[e.size]]), M = t(() => [
|
|
47
|
+
"block rounded-lg border ui-surface transition-colors duration-200",
|
|
48
|
+
"focus:outline-none focus:ring-2 focus:ring-offset-1",
|
|
49
|
+
"disabled:bg-(--ui-surface-muted) disabled:text-(--ui-text-muted) disabled:cursor-not-allowed disabled:opacity-80",
|
|
50
|
+
"placeholder:text-(--ui-text-muted)",
|
|
51
|
+
e.type === "color" ? "h-12 w-20 cursor-pointer" : "w-full",
|
|
52
|
+
F.value,
|
|
53
|
+
N.value,
|
|
54
|
+
{
|
|
55
|
+
"pl-10": e.iconLeft,
|
|
56
|
+
"pr-10": e.iconRight || e.clearable || !!i(r?.hasPasswordToggle)
|
|
57
|
+
}
|
|
58
|
+
]);
|
|
59
|
+
return C({
|
|
60
|
+
focus: () => c.value?.focus(),
|
|
61
|
+
blur: () => c.value?.blur(),
|
|
62
|
+
select: () => c.value?.select()
|
|
63
|
+
}), (o, a) => (n(), d("div", null, [
|
|
64
|
+
v("div", X, [
|
|
65
|
+
l.iconLeft ? (n(), d("div", Y, [
|
|
66
|
+
(n(), k(S(l.iconLeft), {
|
|
67
|
+
class: g(B.value),
|
|
68
|
+
"aria-hidden": "true"
|
|
69
|
+
}, null, 8, ["class"]))
|
|
70
|
+
])) : p("", !0),
|
|
71
|
+
v("input", {
|
|
72
|
+
id: m.value,
|
|
73
|
+
ref_key: "inputRef",
|
|
74
|
+
ref: c,
|
|
75
|
+
name: V.value,
|
|
76
|
+
type: I.value,
|
|
77
|
+
value: l.modelValue,
|
|
78
|
+
placeholder: l.placeholder,
|
|
79
|
+
disabled: y.value,
|
|
80
|
+
readonly: l.readonly,
|
|
81
|
+
required: R.value,
|
|
82
|
+
autocomplete: L.value,
|
|
83
|
+
class: g(M.value),
|
|
84
|
+
"aria-describedby": q.value,
|
|
85
|
+
"aria-invalid": b.value ? "true" : void 0,
|
|
86
|
+
onInput: z,
|
|
87
|
+
onBlur: a[0] || (a[0] = (u) => s("blur", u)),
|
|
88
|
+
onFocus: a[1] || (a[1] = (u) => s("focus", u)),
|
|
89
|
+
onKeydown: a[2] || (a[2] = (u) => s("keydown", u))
|
|
90
|
+
}, null, 42, G),
|
|
91
|
+
l.iconRight || l.clearable ? (n(), d("div", J, [
|
|
92
|
+
l.clearable && l.modelValue && !y.value ? (n(), d("button", {
|
|
93
|
+
key: 0,
|
|
94
|
+
class: "rounded-sm ui-text-muted transition-colors hover:text-(--ui-text) focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-(--ui-ring)",
|
|
95
|
+
type: "button",
|
|
96
|
+
"aria-label": l.clearLabel,
|
|
97
|
+
onClick: j
|
|
98
|
+
}, [...a[3] || (a[3] = [
|
|
99
|
+
v("svg", {
|
|
100
|
+
class: "h-5 w-5",
|
|
101
|
+
viewBox: "0 0 24 24",
|
|
102
|
+
fill: "none",
|
|
103
|
+
stroke: "currentColor",
|
|
104
|
+
"aria-hidden": "true"
|
|
105
|
+
}, [
|
|
106
|
+
v("path", {
|
|
107
|
+
"stroke-linecap": "round",
|
|
108
|
+
"stroke-linejoin": "round",
|
|
109
|
+
"stroke-width": "2",
|
|
110
|
+
d: "M6 6l12 12M18 6L6 18"
|
|
111
|
+
})
|
|
112
|
+
], -1)
|
|
113
|
+
])], 8, Q)) : l.iconRight ? (n(), k(S(l.iconRight), {
|
|
114
|
+
key: 1,
|
|
115
|
+
class: g(B.value),
|
|
116
|
+
"aria-hidden": "true"
|
|
117
|
+
}, null, 8, ["class"])) : p("", !0)
|
|
118
|
+
])) : p("", !0)
|
|
119
|
+
]),
|
|
120
|
+
D.value ? (n(), d("p", {
|
|
121
|
+
key: 0,
|
|
122
|
+
id: h.value,
|
|
123
|
+
class: "mt-1 flex items-center gap-1 text-sm ui-danger",
|
|
124
|
+
role: "alert",
|
|
125
|
+
"aria-live": "polite",
|
|
126
|
+
"aria-atomic": "true"
|
|
127
|
+
}, w(f.value), 9, U)) : l.helpText && !i(r) ? (n(), d("p", {
|
|
128
|
+
key: 1,
|
|
129
|
+
id: x.value,
|
|
130
|
+
class: "mt-1 text-sm ui-text-muted"
|
|
131
|
+
}, w(l.helpText), 9, W)) : p("", !0)
|
|
132
|
+
]));
|
|
133
|
+
}
|
|
134
|
+
});
|
|
135
|
+
export {
|
|
136
|
+
ee as _
|
|
137
|
+
};
|
package/dist/Loader.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.loader[data-v-4cf22c8b]{position:relative;width:100%;display:flex;justify-content:center;align-items:center}.loader--overlay[data-v-4cf22c8b]{position:absolute;inset:0;z-index:20;display:grid;place-items:center;box-sizing:border-box;padding:16px}.loader--fullscreen[data-v-4cf22c8b]{position:fixed;inset:0;z-index:9999;width:100%;height:100dvh;min-height:100vh;min-height:100svh;display:grid;place-items:center;box-sizing:border-box;overflow:hidden;padding:max(16px,env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) max(16px,env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left))}.loader__backdrop[data-v-4cf22c8b]{position:absolute;inset:0;background-color:var(--loader-bg);backdrop-filter:blur(var(--loader-blur));-webkit-backdrop-filter:blur(var(--loader-blur))}.loader__container[data-v-4cf22c8b]{position:relative;z-index:1;width:100%;max-width:min(360px,calc(100vw - 32px));max-width:min(360px,calc(100dvw - 32px));max-width:min(360px,calc(100svw - 32px));max-height:calc(100dvh - 32px);max-height:calc(100svh - 32px);overflow:auto;box-sizing:border-box;display:flex;flex-direction:column;align-items:center;gap:12px}.loader__text[data-v-4cf22c8b]{font-size:14px;color:var(--ui-text);font-weight:500;text-align:center;line-height:1.4;word-break:break-word}.loader__text--top[data-v-4cf22c8b]{margin-bottom:8px}.loader__text--bottom[data-v-4cf22c8b]{margin-top:8px}.loader--small .loader__container[data-v-4cf22c8b]{gap:8px}.loader--medium .loader__container[data-v-4cf22c8b]{gap:12px}.loader--large .loader__container[data-v-4cf22c8b]{gap:16px}.loader--xl .loader__container[data-v-4cf22c8b]{gap:20px}.loader--2xl .loader__container[data-v-4cf22c8b]{gap:24px}.loader--3xl .loader__container[data-v-4cf22c8b]{gap:28px}.loader--small .loader__text[data-v-4cf22c8b]{font-size:12px}.loader--medium .loader__text[data-v-4cf22c8b]{font-size:14px}.loader--large .loader__text[data-v-4cf22c8b]{font-size:16px}.loader--xl .loader__text[data-v-4cf22c8b]{font-size:18px}.loader--2xl .loader__text[data-v-4cf22c8b]{font-size:20px}.loader--3xl .loader__text[data-v-4cf22c8b]{font-size:22px}.loader__spin[data-v-4cf22c8b]{border:4px solid var(--ui-border-strong);border-top:4px solid var(--loader-color);border-radius:50%;animation:spin-4cf22c8b 1s linear infinite}.loader--small .loader__spin[data-v-4cf22c8b]{width:24px;height:24px;border-width:3px}.loader--medium .loader__spin[data-v-4cf22c8b]{width:40px;height:40px;border-width:4px}.loader--large .loader__spin[data-v-4cf22c8b]{width:56px;height:56px;border-width:5px}.loader--xl .loader__spin[data-v-4cf22c8b]{width:72px;height:72px;border-width:6px}.loader--2xl .loader__spin[data-v-4cf22c8b]{width:88px;height:88px;border-width:7px}.loader--3xl .loader__spin[data-v-4cf22c8b]{width:104px;height:104px;border-width:8px}.loader__pulse[data-v-4cf22c8b]{background-color:var(--loader-color);border-radius:50%;animation:pulse-4cf22c8b 2s cubic-bezier(.4,0,.6,1) infinite}.loader--small .loader__pulse[data-v-4cf22c8b]{width:24px;height:24px}.loader--medium .loader__pulse[data-v-4cf22c8b]{width:40px;height:40px}.loader--large .loader__pulse[data-v-4cf22c8b]{width:56px;height:56px}.loader--xl .loader__pulse[data-v-4cf22c8b]{width:72px;height:72px}.loader--2xl .loader__pulse[data-v-4cf22c8b]{width:88px;height:88px}.loader--3xl .loader__pulse[data-v-4cf22c8b]{width:104px;height:104px}.loader__bounce[data-v-4cf22c8b]{display:flex;gap:4px;align-items:flex-end}.loader__bounce-dot[data-v-4cf22c8b]{background-color:var(--loader-color);border-radius:50%;animation:bounce-4cf22c8b 1.4s ease-in-out infinite both}.loader--small .loader__bounce-dot[data-v-4cf22c8b]{width:8px;height:8px}.loader--medium .loader__bounce-dot[data-v-4cf22c8b]{width:12px;height:12px}.loader--large .loader__bounce-dot[data-v-4cf22c8b]{width:16px;height:16px}.loader--xl .loader__bounce-dot[data-v-4cf22c8b]{width:20px;height:20px}.loader--2xl .loader__bounce-dot[data-v-4cf22c8b]{width:24px;height:24px}.loader--3xl .loader__bounce-dot[data-v-4cf22c8b]{width:28px;height:28px}.loader__ripple[data-v-4cf22c8b]{position:relative}.loader__ripple-ring[data-v-4cf22c8b]{position:absolute;border:4px solid var(--loader-color);border-radius:50%;animation:ripple-4cf22c8b 1s linear infinite;top:50%;left:50%;transform:translate(-50%,-50%)}.loader--small .loader__ripple[data-v-4cf22c8b]{width:40px;height:40px}.loader--medium .loader__ripple[data-v-4cf22c8b]{width:60px;height:60px}.loader--large .loader__ripple[data-v-4cf22c8b]{width:80px;height:80px}.loader--xl .loader__ripple[data-v-4cf22c8b]{width:100px;height:100px}.loader--2xl .loader__ripple[data-v-4cf22c8b]{width:120px;height:120px}.loader--3xl .loader__ripple[data-v-4cf22c8b]{width:140px;height:140px}.loader--small .loader__ripple-ring[data-v-4cf22c8b]{width:40px;height:40px;border-width:2px}.loader--medium .loader__ripple-ring[data-v-4cf22c8b]{width:60px;height:60px;border-width:3px}.loader--large .loader__ripple-ring[data-v-4cf22c8b]{width:80px;height:80px;border-width:4px}.loader--xl .loader__ripple-ring[data-v-4cf22c8b]{width:100px;height:100px;border-width:5px}.loader--2xl .loader__ripple-ring[data-v-4cf22c8b]{width:120px;height:120px;border-width:6px}.loader--3xl .loader__ripple-ring[data-v-4cf22c8b]{width:140px;height:140px;border-width:7px}.loader__bars[data-v-4cf22c8b]{display:flex;gap:3px;align-items:flex-end}.loader__bar[data-v-4cf22c8b]{background-color:var(--loader-color);border-radius:2px;animation:bar-scale-4cf22c8b 1s ease-in-out infinite}.loader--small .loader__bar[data-v-4cf22c8b]{width:3px;height:16px}.loader--medium .loader__bar[data-v-4cf22c8b]{width:4px;height:24px}.loader--large .loader__bar[data-v-4cf22c8b]{width:5px;height:32px}.loader--xl .loader__bar[data-v-4cf22c8b]{width:6px;height:40px}.loader--2xl .loader__bar[data-v-4cf22c8b]{width:7px;height:48px}.loader--3xl .loader__bar[data-v-4cf22c8b]{width:8px;height:56px}.loader__dots[data-v-4cf22c8b]{display:flex;gap:6px}.loader__dot[data-v-4cf22c8b]{background-color:var(--loader-color);border-radius:50%;animation:dot-bounce-4cf22c8b 1.4s ease-in-out infinite both}.loader--small .loader__dot[data-v-4cf22c8b]{width:8px;height:8px}.loader--medium .loader__dot[data-v-4cf22c8b]{width:12px;height:12px}.loader--large .loader__dot[data-v-4cf22c8b]{width:16px;height:16px}.loader--xl .loader__dot[data-v-4cf22c8b]{width:20px;height:20px}.loader--2xl .loader__dot[data-v-4cf22c8b]{width:24px;height:24px}.loader--3xl .loader__dot[data-v-4cf22c8b]{width:28px;height:28px}.loader__ring[data-v-4cf22c8b]{position:relative}.loader__ring-track[data-v-4cf22c8b]{border:4px solid var(--ui-border-strong);border-radius:50%}.loader__ring-fill[data-v-4cf22c8b]{position:absolute;top:0;left:0;border:4px solid transparent;border-top:4px solid var(--loader-color);border-radius:50%;animation:spin-4cf22c8b 1s linear infinite}.loader--small .loader__ring-track[data-v-4cf22c8b],.loader--small .loader__ring-fill[data-v-4cf22c8b]{width:24px;height:24px;border-width:3px}.loader--medium .loader__ring-track[data-v-4cf22c8b],.loader--medium .loader__ring-fill[data-v-4cf22c8b]{width:40px;height:40px;border-width:4px}.loader--large .loader__ring-track[data-v-4cf22c8b],.loader--large .loader__ring-fill[data-v-4cf22c8b]{width:56px;height:56px;border-width:5px}.loader--xl .loader__ring-track[data-v-4cf22c8b],.loader--xl .loader__ring-fill[data-v-4cf22c8b]{width:72px;height:72px;border-width:6px}.loader--2xl .loader__ring-track[data-v-4cf22c8b],.loader--2xl .loader__ring-fill[data-v-4cf22c8b]{width:88px;height:88px;border-width:7px}.loader--3xl .loader__ring-track[data-v-4cf22c8b],.loader--3xl .loader__ring-fill[data-v-4cf22c8b]{width:104px;height:104px;border-width:8px}.loader__spinner-text[data-v-4cf22c8b]{display:flex;flex-direction:column;align-items:center;gap:12px}.loader__spinner[data-v-4cf22c8b]{border:3px solid var(--ui-border-strong);border-top:3px solid var(--loader-color);border-radius:50%;animation:spin-4cf22c8b 1s linear infinite}.loader--small .loader__spinner[data-v-4cf22c8b]{width:20px;height:20px}.loader--medium .loader__spinner[data-v-4cf22c8b]{width:32px;height:32px}.loader--large .loader__spinner[data-v-4cf22c8b]{width:44px;height:44px}.loader--xl .loader__spinner[data-v-4cf22c8b]{width:56px;height:56px}.loader--2xl .loader__spinner[data-v-4cf22c8b]{width:68px;height:68px;border-width:4px}.loader--3xl .loader__spinner[data-v-4cf22c8b]{width:80px;height:80px;border-width:5px}@media (max-width: 640px){.loader__container[data-v-4cf22c8b]{max-width:min(300px,calc(100vw - 24px));max-width:min(300px,calc(100dvw - 24px));max-width:min(300px,calc(100svw - 24px));gap:10px}.loader__text[data-v-4cf22c8b]{font-size:13px;line-height:1.35}.loader--large .loader__text[data-v-4cf22c8b],.loader--xl .loader__text[data-v-4cf22c8b],.loader--2xl .loader__text[data-v-4cf22c8b],.loader--3xl .loader__text[data-v-4cf22c8b]{font-size:14px}.loader--large .loader__spin[data-v-4cf22c8b],.loader--xl .loader__spin[data-v-4cf22c8b],.loader--2xl .loader__spin[data-v-4cf22c8b],.loader--3xl .loader__spin[data-v-4cf22c8b]{width:48px;height:48px;border-width:4px}.loader--large .loader__pulse[data-v-4cf22c8b],.loader--xl .loader__pulse[data-v-4cf22c8b],.loader--2xl .loader__pulse[data-v-4cf22c8b],.loader--3xl .loader__pulse[data-v-4cf22c8b]{width:48px;height:48px}.loader--large .loader__bounce-dot[data-v-4cf22c8b],.loader--xl .loader__bounce-dot[data-v-4cf22c8b],.loader--2xl .loader__bounce-dot[data-v-4cf22c8b],.loader--3xl .loader__bounce-dot[data-v-4cf22c8b]{width:14px;height:14px}.loader--large .loader__ripple[data-v-4cf22c8b],.loader--xl .loader__ripple[data-v-4cf22c8b],.loader--2xl .loader__ripple[data-v-4cf22c8b],.loader--3xl .loader__ripple[data-v-4cf22c8b]{width:72px;height:72px}.loader--large .loader__ripple-ring[data-v-4cf22c8b],.loader--xl .loader__ripple-ring[data-v-4cf22c8b],.loader--2xl .loader__ripple-ring[data-v-4cf22c8b],.loader--3xl .loader__ripple-ring[data-v-4cf22c8b]{width:72px;height:72px;border-width:3px}.loader--large .loader__bar[data-v-4cf22c8b],.loader--xl .loader__bar[data-v-4cf22c8b],.loader--2xl .loader__bar[data-v-4cf22c8b],.loader--3xl .loader__bar[data-v-4cf22c8b]{width:4px;height:28px}.loader--large .loader__dot[data-v-4cf22c8b],.loader--xl .loader__dot[data-v-4cf22c8b],.loader--2xl .loader__dot[data-v-4cf22c8b],.loader--3xl .loader__dot[data-v-4cf22c8b]{width:14px;height:14px}.loader--large .loader__ring-track[data-v-4cf22c8b],.loader--large .loader__ring-fill[data-v-4cf22c8b],.loader--xl .loader__ring-track[data-v-4cf22c8b],.loader--xl .loader__ring-fill[data-v-4cf22c8b],.loader--2xl .loader__ring-track[data-v-4cf22c8b],.loader--2xl .loader__ring-fill[data-v-4cf22c8b],.loader--3xl .loader__ring-track[data-v-4cf22c8b],.loader--3xl .loader__ring-fill[data-v-4cf22c8b]{width:48px;height:48px;border-width:4px}.loader--large .loader__spinner[data-v-4cf22c8b],.loader--xl .loader__spinner[data-v-4cf22c8b],.loader--2xl .loader__spinner[data-v-4cf22c8b],.loader--3xl .loader__spinner[data-v-4cf22c8b]{width:40px;height:40px}.loader--large .loader__container[data-v-4cf22c8b],.loader--xl .loader__container[data-v-4cf22c8b],.loader--2xl .loader__container[data-v-4cf22c8b],.loader--3xl .loader__container[data-v-4cf22c8b]{transform:none}}@keyframes spin-4cf22c8b{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes pulse-4cf22c8b{0%,to{opacity:1}50%{opacity:.5}}@keyframes bounce-4cf22c8b{0%,80%,to{transform:scale(0);opacity:.5}40%{transform:scale(1);opacity:1}}@keyframes ripple-4cf22c8b{0%{transform:translate(-50%,-50%) scale(0);opacity:1}to{transform:translate(-50%,-50%) scale(1);opacity:0}}@keyframes bar-scale-4cf22c8b{0%,40%,to{transform:scaleY(.4)}20%{transform:scaleY(1)}}@keyframes dot-bounce-4cf22c8b{0%,80%,to{transform:scale(0)}40%{transform:scale(1)}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*! tailwindcss v4.1.13 | MIT License | https://tailwindcss.com */.reminder-config-wrapper[data-v-c46bf185]{width:100%}.overflow-y-auto[data-v-c46bf185]::-webkit-scrollbar{width:8px}.overflow-y-auto[data-v-c46bf185]::-webkit-scrollbar-track{background:#f1f5f9;border-radius:4px}.overflow-y-auto[data-v-c46bf185]::-webkit-scrollbar-thumb{background:#cbd5e1;border-radius:4px}.overflow-y-auto[data-v-c46bf185]::-webkit-scrollbar-thumb:hover{background:#94a3b8}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.has-trailing-icon[data-v-7f79d2a2] input{padding-right:2.5rem}
|
package/dist/Sidebar.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.kv-module-sidebar[data-v-82c80c9a]{background:color-mix(in oklab,var(--module-soft, var(--ui-primary-soft)) 45%,var(--ui-background) 55%)}.kv-module-sidebar[data-v-82c80c9a] [data-submenu-dropdown]{background:color-mix(in oklab,var(--module-soft-alt, var(--ui-accent-soft)) 50%,var(--ui-surface) 50%)}
|
package/dist/Toast.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@keyframes toast-progress-8acde4d1{0%{transform:scaleX(1)}to{transform:scaleX(0)}}.animate-toast-progress[data-v-8acde4d1]{animation:toast-progress-8acde4d1 linear forwards}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),n=require("class-variance-authority"),s=require("../utils/cn.cjs"),p=require("
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),n=require("class-variance-authority"),s=require("../utils/cn.cjs"),p=require("../Button.vue_vue_type_script_setup_true_lang-DZxttvYH.cjs"),g={__name:"AccordionItem",props:{variant:{type:String,default:"default",validator:a=>["default","bordered","filled","flush"].includes(a)},size:{type:String,default:"md",validator:a=>["sm","md","lg"].includes(a)}},setup(a){const l={render(){return e.h("svg",{fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor"},[e.h("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"})])}},r=a,t=e.ref(!1),i=()=>t.value=!t.value,c=n.cva("",{variants:{variant:{default:"",bordered:"border ui-border-strong rounded-lg overflow-hidden",filled:"ui-surface-strong border ui-border-strong rounded-lg overflow-hidden",flush:""}}}),u=n.cva("flex items-center justify-between w-full text-left transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-(--ui-primary) focus:ring-offset-2",{variants:{size:{sm:"p-3 text-sm",md:"p-4 text-base",lg:"p-6 text-lg"}}}),d=n.cva("overflow-hidden ui-text border-t ui-border-strong ",{variants:{size:{sm:"p-3 text-sm",md:"p-4 text-base",lg:"p-6 text-lg"}}}),v=e.computed(()=>s.cn(c({variant:r.variant}))),m=e.computed(()=>s.cn(u({size:r.size}))),f=e.computed(()=>s.cn(d({size:r.size})));return(o,h)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(v.value)},[e.createVNode(p._sfc_main,{class:e.normalizeClass(m.value),"aria-expanded":t.value,onClick:i},{default:e.withCtx(()=>[e.renderSlot(o.$slots,"header",{isOpen:t.value}),e.createVNode(l,{class:e.normalizeClass(e.unref(s.cn)("w-5 h-5 transition-transform ml-2",{"rotate-180":t.value}))},null,8,["class"])]),_:3},8,["class","aria-expanded"]),e.createVNode(e.Transition,{"enter-active-class":"transition-all duration-300 ease-out","enter-from-class":"opacity-0 max-h-0","enter-to-class":"opacity-100 max-h-96","leave-active-class":"transition-all duration-200 ease-in","leave-from-class":"opacity-100 max-h-96","leave-to-class":"opacity-0 max-h-0"},{default:e.withCtx(()=>[t.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(f.value)},[e.renderSlot(o.$slots,"content",{isOpen:t.value})],2)):e.createCommentVNode("",!0)]),_:3})],2))}};exports.default=g;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ref as C, computed as o, createElementBlock as d, openBlock as c, normalizeClass as a, createVNode as n, withCtx as u, renderSlot as f, unref as
|
|
1
|
+
import { ref as C, computed as o, createElementBlock as d, openBlock as c, normalizeClass as a, createVNode as n, withCtx as u, renderSlot as f, unref as _, Transition as k, createCommentVNode as z, h as m } from "vue";
|
|
2
2
|
import { cva as i } from "class-variance-authority";
|
|
3
3
|
import { cn as s } from "../utils/cn.js";
|
|
4
|
-
import V from "
|
|
4
|
+
import { _ as V } from "../Button.vue_vue_type_script_setup_true_lang-B3TkBTvG.js";
|
|
5
5
|
const I = {
|
|
6
6
|
__name: "AccordionItem",
|
|
7
7
|
props: {
|
|
@@ -78,12 +78,12 @@ const I = {
|
|
|
78
78
|
default: u(() => [
|
|
79
79
|
f(l.$slots, "header", { isOpen: e.value }),
|
|
80
80
|
n(v, {
|
|
81
|
-
class: a(
|
|
81
|
+
class: a(_(s)("w-5 h-5 transition-transform ml-2", { "rotate-180": e.value }))
|
|
82
82
|
}, null, 8, ["class"])
|
|
83
83
|
]),
|
|
84
84
|
_: 3
|
|
85
85
|
}, 8, ["class", "aria-expanded"]),
|
|
86
|
-
n(
|
|
86
|
+
n(k, {
|
|
87
87
|
"enter-active-class": "transition-all duration-300 ease-out",
|
|
88
88
|
"enter-from-class": "opacity-0 max-h-0",
|
|
89
89
|
"enter-to-class": "opacity-100 max-h-96",
|
|
@@ -97,7 +97,7 @@ const I = {
|
|
|
97
97
|
class: a(y.value)
|
|
98
98
|
}, [
|
|
99
99
|
f(l.$slots, "content", { isOpen: e.value })
|
|
100
|
-
], 2)) :
|
|
100
|
+
], 2)) : z("", !0)
|
|
101
101
|
]),
|
|
102
102
|
_: 3
|
|
103
103
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),C=require("class-variance-authority"),y=require("../utils/cn.cjs"),B=require("../Button.vue_vue_type_script_setup_true_lang-DZxttvYH.cjs"),x=["aria-live"],b={class:"flex items-start gap-3"},V={key:0,class:"shrink-0 mt-0.5"},N={class:"flex-1 min-w-0"},z={key:0,class:"font-medium text-sm mb-1"},M={key:1,class:"mt-3 flex gap-2"},S=["aria-label"],E=Object.assign({inheritAttrs:!1},{__name:"Alert",props:{variant:{type:String,default:"info",validator:t=>["info","success","warning","error","default","danger"].includes(t)},title:String,message:String,dismissible:{type:Boolean,default:!1},dismissLabel:{type:String,default:"Dismiss alert"},showIcon:{type:Boolean,default:!0},actions:{type:Array,default:()=>[]},autoClose:{type:[Boolean,Number],default:!1}},emits:["dismiss","action"],setup(t,{emit:d}){const o=t,s=d,a=e.ref(!0),i=()=>{a.value=!1,s("dismiss")},m=r=>{s("action",r),r.onClick&&r.onClick()};let l;if(o.autoClose){const r=typeof o.autoClose=="number"?o.autoClose:5e3;l=setTimeout(i,r)}e.onBeforeUnmount(()=>clearTimeout(l));const c={render(){return e.h("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[e.h("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 9v2m0 4h.01M21 12A9 9 0 1112 3a9 9 0 019 9z"})])}},v={render(){return e.h("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[e.h("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 12l2 2l4-4m5 2a9 9 0 11-18 0a9 9 0 0118 0z"})])}},g={render(){return e.h("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[e.h("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 9v2m0 4h.01M10.29 3.86L1.82 18a1.5 1.5 0 001.29 2.25h18.78a1.5 1.5 0 001.29-2.25L13.71 3.86a1.5 1.5 0 00-2.42 0z"})])}},u={render(){return e.h("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[e.h("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0a9 9 0 0118 0z"})])}},f={render(){return e.h("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[e.h("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})])}},h=e.computed(()=>({info:c,success:v,warning:g,error:u,default:c,danger:u})[o.variant]),k=C.cva("relative w-full rounded-lg border p-4 flex items-start gap-3 ",{variants:{variant:{default:"ui-surface ui-text ",danger:"ui-danger-soft ui-danger",info:"ui-primary-soft ui-primary",success:"ui-success-soft ui-success",warning:"ui-warning-soft ui-warning",error:"ui-danger-soft ui-danger"}},defaultVariants:{variant:"default"}}),w=e.computed(()=>["w-5 h-5",{info:"ui-primary",success:"ui-success",warning:"ui-warning",error:"ui-danger",default:"ui-text",danger:"ui-danger"}[o.variant]]),p=e.computed(()=>["shrink-0 p-1 rounded-md transition-colors duration-200",{info:"ui-primary hover:text-(--ui-primary) hover:bg-(--ui-primary-soft)",success:"ui-success hover:text-(--ui-success) hover:bg-(--ui-success-soft)",warning:"ui-warning hover:text-(--ui-warning) hover:bg-(--ui-warning-soft)",error:"ui-danger hover:text-(--ui-danger) hover:bg-(--ui-danger-soft)",default:"ui-text hover:text-(--ui-text) hover:bg-(--ui-surface)",danger:"ui-danger hover:text-(--ui-danger) hover:bg-(--ui-danger-soft)"}[o.variant]]);return(r,I)=>(e.openBlock(),e.createBlock(e.Transition,{"enter-active-class":"transition-all duration-300","enter-from-class":"opacity-0 scale-95","enter-to-class":"opacity-100 scale-100","leave-active-class":"transition-all duration-200","leave-from-class":"opacity-100 scale-100","leave-to-class":"opacity-0 scale-95"},{default:e.withCtx(()=>[a.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(y.cn)(e.unref(k)({variant:t.variant}),r.$attrs.class)),role:"alert","aria-live":t.variant==="error"||t.variant==="danger"?"assertive":"polite","aria-atomic":"true"},[e.createElementVNode("div",b,[t.showIcon?(e.openBlock(),e.createElementBlock("div",V,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(h.value),{class:e.normalizeClass(w.value)},null,8,["class"]))])):e.createCommentVNode("",!0),e.createElementVNode("div",N,[t.title?(e.openBlock(),e.createElementBlock("h4",z,e.toDisplayString(t.title),1)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["text-sm",{"mt-0":!t.title,"mt-1":t.title}])},[e.renderSlot(r.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(t.message),1)])],2),r.$slots.actions||t.actions.length>0?(e.openBlock(),e.createElementBlock("div",M,[e.renderSlot(r.$slots,"actions",{},()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.actions,n=>(e.openBlock(),e.createBlock(B._sfc_main,{key:n.label,variant:n.variant||"outline",size:n.size||"sm",onClick:T=>m(n)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.label),1)]),_:2},1032,["variant","size","onClick"]))),128))])])):e.createCommentVNode("",!0)]),t.dismissible?(e.openBlock(),e.createElementBlock("button",{key:1,type:"button",class:e.normalizeClass(p.value),"aria-label":t.dismissLabel,onClick:i},[e.createVNode(f,{class:"w-4 h-4"})],10,S)):e.createCommentVNode("",!0)])],10,x)):e.createCommentVNode("",!0)]),_:3}))}});exports.default=E;
|