iryx-ui 0.2.0 → 0.4.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 +200 -19
- package/dist/component-names.d.ts +1 -1
- package/dist/components/Alert.vue.d.ts +3 -3
- package/dist/components/Breadcrumb.vue.d.ts +45 -0
- package/dist/components/Button.vue.d.ts +8 -0
- package/dist/components/ButtonGroup.vue.d.ts +32 -0
- package/dist/components/ConfirmDialog.vue.d.ts +18 -0
- package/dist/components/Dialog.vue.d.ts +65 -0
- package/dist/components/DropdownMenu.vue.d.ts +49 -0
- package/dist/components/DropdownMenuItems.vue.d.ts +24 -0
- package/dist/components/EmptyState.vue.d.ts +46 -0
- package/dist/components/Icon.vue.d.ts +8 -0
- package/dist/components/NumberInput.vue.d.ts +63 -0
- package/dist/components/Pagination.vue.d.ts +57 -0
- package/dist/components/Progress.vue.d.ts +52 -0
- package/dist/components/Separator.vue.d.ts +36 -0
- package/dist/components/Skeleton.vue.d.ts +20 -0
- package/dist/components/Stat.vue.d.ts +57 -0
- package/dist/components/Stepper.vue.d.ts +61 -0
- package/dist/components/Tabs.vue.d.ts +63 -0
- package/dist/components/Toaster.vue.d.ts +28 -0
- package/dist/components/Tooltip.vue.d.ts +49 -0
- package/dist/components/index.d.ts +16 -0
- package/dist/composables/button-group.d.ts +12 -0
- package/dist/composables/confirm.d.ts +36 -0
- package/dist/composables/decimal.d.ts +53 -0
- package/dist/composables/dropdown-menu.d.ts +22 -0
- package/dist/composables/icon.d.ts +10 -0
- package/dist/composables/toast.d.ts +42 -0
- package/dist/config.d.ts +9 -0
- package/dist/index.d.ts +21 -0
- package/dist/index.js +67 -31
- package/dist/node_modules/.pnpm/@hugeicons_core-free-icons@4.2.3/node_modules/@hugeicons/core-free-icons/dist/esm/index.js +201 -0
- package/dist/node_modules/.pnpm/@hugeicons_vue@1.0.7_vue@3.5.35_typescript@6.0.3_/node_modules/@hugeicons/vue/dist/esm/_virtual/_plugin-vue_export-helper.js +8 -0
- package/dist/node_modules/.pnpm/@hugeicons_vue@1.0.7_vue@3.5.35_typescript@6.0.3_/node_modules/@hugeicons/vue/dist/esm/components/HugeiconsIcon.vue.js +25 -0
- package/dist/node_modules/.pnpm/@hugeicons_vue@1.0.7_vue@3.5.35_typescript@6.0.3_/node_modules/@hugeicons/vue/dist/esm/components/HugeiconsIcon.vue2.js +63 -0
- package/dist/nuxt.js +1 -1
- package/dist/packages/iryx-ui/src/component-names.js +4 -0
- package/dist/packages/iryx-ui/src/components/Alert.vue_vue_type_script_setup_true_lang.js +75 -0
- package/dist/packages/iryx-ui/src/components/Breadcrumb.js +5 -0
- package/dist/packages/iryx-ui/src/components/Breadcrumb.vue_vue_type_script_setup_true_lang.js +68 -0
- package/dist/packages/iryx-ui/src/components/Button.vue_vue_type_script_setup_true_lang.js +59 -0
- package/dist/packages/iryx-ui/src/components/ButtonGroup.js +5 -0
- package/dist/packages/iryx-ui/src/components/ButtonGroup.vue_vue_type_script_setup_true_lang.js +39 -0
- package/dist/packages/iryx-ui/src/components/Checkbox.vue_vue_type_script_setup_true_lang.js +92 -0
- package/dist/packages/iryx-ui/src/components/ConfirmDialog.js +5 -0
- package/dist/packages/iryx-ui/src/components/ConfirmDialog.vue_vue_type_script_setup_true_lang.js +63 -0
- package/dist/packages/iryx-ui/src/components/Dialog.js +5 -0
- package/dist/packages/iryx-ui/src/components/Dialog.vue_vue_type_script_setup_true_lang.js +99 -0
- package/dist/packages/iryx-ui/src/components/DropdownMenu.js +5 -0
- package/dist/packages/iryx-ui/src/components/DropdownMenu.vue_vue_type_script_setup_true_lang.js +67 -0
- package/dist/packages/iryx-ui/src/components/DropdownMenuItems.js +5 -0
- package/dist/packages/iryx-ui/src/components/DropdownMenuItems.vue_vue_type_script_setup_true_lang.js +92 -0
- package/dist/packages/iryx-ui/src/components/EmptyState.js +5 -0
- package/dist/packages/iryx-ui/src/components/EmptyState.vue_vue_type_script_setup_true_lang.js +55 -0
- package/dist/packages/iryx-ui/src/components/Icon.js +5 -0
- package/dist/packages/iryx-ui/src/components/Icon.vue_vue_type_script_setup_true_lang.js +26 -0
- package/dist/packages/iryx-ui/src/components/NumberInput.js +5 -0
- package/dist/packages/iryx-ui/src/components/NumberInput.vue_vue_type_script_setup_true_lang.js +136 -0
- package/dist/packages/iryx-ui/src/components/Pagination.js +5 -0
- package/dist/packages/iryx-ui/src/components/Pagination.vue_vue_type_script_setup_true_lang.js +94 -0
- package/dist/packages/iryx-ui/src/components/Progress.js +5 -0
- package/dist/packages/iryx-ui/src/components/Progress.vue_vue_type_script_setup_true_lang.js +65 -0
- package/dist/packages/iryx-ui/src/components/Select.vue_vue_type_script_setup_true_lang.js +85 -0
- package/dist/packages/iryx-ui/src/components/Separator.js +5 -0
- package/dist/packages/iryx-ui/src/components/Separator.vue_vue_type_script_setup_true_lang.js +56 -0
- package/dist/packages/iryx-ui/src/components/Skeleton.js +5 -0
- package/dist/packages/iryx-ui/src/components/Skeleton.vue_vue_type_script_setup_true_lang.js +48 -0
- package/dist/packages/iryx-ui/src/components/Stat.js +5 -0
- package/dist/packages/iryx-ui/src/components/Stat.vue_vue_type_script_setup_true_lang.js +63 -0
- package/dist/packages/iryx-ui/src/components/Stepper.js +5 -0
- package/dist/packages/iryx-ui/src/components/Stepper.vue_vue_type_script_setup_true_lang.js +89 -0
- package/dist/packages/iryx-ui/src/components/Tabs.js +5 -0
- package/dist/packages/iryx-ui/src/components/Tabs.vue_vue_type_script_setup_true_lang.js +78 -0
- package/dist/packages/iryx-ui/src/components/Toaster.js +5 -0
- package/dist/packages/iryx-ui/src/components/Toaster.vue_vue_type_script_setup_true_lang.js +115 -0
- package/dist/packages/iryx-ui/src/components/Tooltip.js +5 -0
- package/dist/packages/iryx-ui/src/components/Tooltip.vue_vue_type_script_setup_true_lang.js +70 -0
- package/dist/packages/iryx-ui/src/components/index.js +66 -0
- package/dist/{composables → packages/iryx-ui/src/composables}/appearance.js +11 -7
- package/dist/packages/iryx-ui/src/composables/button-group.js +8 -0
- package/dist/packages/iryx-ui/src/composables/confirm.js +25 -0
- package/dist/packages/iryx-ui/src/composables/decimal.js +79 -0
- package/dist/packages/iryx-ui/src/composables/dropdown-menu.js +9 -0
- package/dist/packages/iryx-ui/src/composables/icon.js +6 -0
- package/dist/packages/iryx-ui/src/composables/toast.js +38 -0
- package/dist/{theme → packages/iryx-ui/src/theme}/badge.js +3 -3
- package/dist/packages/iryx-ui/src/theme/breadcrumb.js +12 -0
- package/dist/packages/iryx-ui/src/theme/button-group.js +15 -0
- package/dist/packages/iryx-ui/src/theme/button.js +59 -0
- package/dist/packages/iryx-ui/src/theme/dialog.js +23 -0
- package/dist/packages/iryx-ui/src/theme/dropdown-menu.js +16 -0
- package/dist/packages/iryx-ui/src/theme/empty-state.js +34 -0
- package/dist/{theme → packages/iryx-ui/src/theme}/form.js +1 -1
- package/dist/packages/iryx-ui/src/theme/number-input.js +49 -0
- package/dist/packages/iryx-ui/src/theme/pagination.js +29 -0
- package/dist/packages/iryx-ui/src/theme/progress.js +33 -0
- package/dist/packages/iryx-ui/src/theme/separator.js +22 -0
- package/dist/packages/iryx-ui/src/theme/skeleton.js +13 -0
- package/dist/packages/iryx-ui/src/theme/stat.js +30 -0
- package/dist/packages/iryx-ui/src/theme/stepper.js +25 -0
- package/dist/packages/iryx-ui/src/theme/tabs.js +52 -0
- package/dist/packages/iryx-ui/src/theme/toast.js +53 -0
- package/dist/packages/iryx-ui/src/theme/tooltip.js +8 -0
- package/dist/theme/breadcrumb.d.ts +59 -0
- package/dist/theme/button-group.d.ts +29 -0
- package/dist/theme/button.d.ts +17 -2
- package/dist/theme/dialog.d.ts +74 -0
- package/dist/theme/dropdown-menu.d.ts +53 -0
- package/dist/theme/empty-state.d.ts +86 -0
- package/dist/theme/index.d.ts +15 -0
- package/dist/theme/number-input.d.ts +92 -0
- package/dist/theme/pagination.d.ts +71 -0
- package/dist/theme/progress.d.ts +143 -0
- package/dist/theme/separator.d.ts +50 -0
- package/dist/theme/skeleton.d.ts +23 -0
- package/dist/theme/stat.d.ts +110 -0
- package/dist/theme/stepper.d.ts +56 -0
- package/dist/theme/tabs.d.ts +104 -0
- package/dist/theme/toast.d.ts +176 -0
- package/dist/theme/tooltip.d.ts +32 -0
- package/package.json +4 -3
- package/theme.css +55 -0
- package/dist/component-names.js +0 -19
- package/dist/components/Alert.vue_vue_type_script_setup_true_lang.js +0 -74
- package/dist/components/Button.vue_vue_type_script_setup_true_lang.js +0 -54
- package/dist/components/Checkbox.vue_vue_type_script_setup_true_lang.js +0 -79
- package/dist/components/Select.vue_vue_type_script_setup_true_lang.js +0 -84
- package/dist/components/index.js +0 -34
- package/dist/theme/button.js +0 -27
- /package/dist/{components → packages/iryx-ui/src/components}/Alert.js +0 -0
- /package/dist/{components → packages/iryx-ui/src/components}/App.js +0 -0
- /package/dist/{components → packages/iryx-ui/src/components}/App.vue_vue_type_script_setup_true_lang.js +0 -0
- /package/dist/{components → packages/iryx-ui/src/components}/Badge.js +0 -0
- /package/dist/{components → packages/iryx-ui/src/components}/Badge.vue_vue_type_script_setup_true_lang.js +0 -0
- /package/dist/{components → packages/iryx-ui/src/components}/Button.js +0 -0
- /package/dist/{components → packages/iryx-ui/src/components}/Card.js +0 -0
- /package/dist/{components → packages/iryx-ui/src/components}/Card.vue_vue_type_script_setup_true_lang.js +0 -0
- /package/dist/{components → packages/iryx-ui/src/components}/Checkbox.js +0 -0
- /package/dist/{components → packages/iryx-ui/src/components}/Form.js +0 -0
- /package/dist/{components → packages/iryx-ui/src/components}/Form.vue_vue_type_script_setup_true_lang.js +0 -0
- /package/dist/{components → packages/iryx-ui/src/components}/FormField.js +0 -0
- /package/dist/{components → packages/iryx-ui/src/components}/FormField.vue_vue_type_script_setup_true_lang.js +0 -0
- /package/dist/{components → packages/iryx-ui/src/components}/Input.js +0 -0
- /package/dist/{components → packages/iryx-ui/src/components}/Input.vue_vue_type_script_setup_true_lang.js +0 -0
- /package/dist/{components → packages/iryx-ui/src/components}/Label.js +0 -0
- /package/dist/{components → packages/iryx-ui/src/components}/Label.vue_vue_type_script_setup_true_lang.js +0 -0
- /package/dist/{components → packages/iryx-ui/src/components}/RadioGroup.js +0 -0
- /package/dist/{components → packages/iryx-ui/src/components}/RadioGroup.vue_vue_type_script_setup_true_lang.js +0 -0
- /package/dist/{components → packages/iryx-ui/src/components}/Select.js +0 -0
- /package/dist/{components → packages/iryx-ui/src/components}/Switch.js +0 -0
- /package/dist/{components → packages/iryx-ui/src/components}/Switch.vue_vue_type_script_setup_true_lang.js +0 -0
- /package/dist/{components → packages/iryx-ui/src/components}/Textarea.js +0 -0
- /package/dist/{components → packages/iryx-ui/src/components}/Textarea.vue_vue_type_script_setup_true_lang.js +0 -0
- /package/dist/{composables → packages/iryx-ui/src/composables}/form.js +0 -0
- /package/dist/{config.js → packages/iryx-ui/src/config.js} +0 -0
- /package/dist/{plugin.js → packages/iryx-ui/src/plugin.js} +0 -0
- /package/dist/{theme → packages/iryx-ui/src/theme}/alert.js +0 -0
- /package/dist/{theme → packages/iryx-ui/src/theme}/card.js +0 -0
- /package/dist/{theme → packages/iryx-ui/src/theme}/checkbox.js +0 -0
- /package/dist/{theme → packages/iryx-ui/src/theme}/input.js +0 -0
- /package/dist/{theme → packages/iryx-ui/src/theme}/label.js +0 -0
- /package/dist/{theme → packages/iryx-ui/src/theme}/presets.js +0 -0
- /package/dist/{theme → packages/iryx-ui/src/theme}/radio-group.js +0 -0
- /package/dist/{theme → packages/iryx-ui/src/theme}/select.js +0 -0
- /package/dist/{theme → packages/iryx-ui/src/theme}/switch.js +0 -0
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { Tick02Icon as e } from "../../../../node_modules/.pnpm/@hugeicons_core-free-icons@4.2.3/node_modules/@hugeicons/core-free-icons/dist/esm/index.js";
|
|
2
|
+
import { useIryxUiConfig as t } from "../config.js";
|
|
3
|
+
import n from "./Icon.js";
|
|
4
|
+
import { stepperTheme as r } from "../theme/stepper.js";
|
|
5
|
+
import { Fragment as i, computed as a, createBlock as o, createCommentVNode as s, createElementBlock as c, createElementVNode as l, createTextVNode as u, createVNode as d, defineComponent as f, mergeModels as p, normalizeClass as m, openBlock as h, renderList as g, renderSlot as _, toDisplayString as v, unref as y, useModel as b, withCtx as x } from "vue";
|
|
6
|
+
import { StepperDescription as S, StepperIndicator as C, StepperItem as w, StepperRoot as T, StepperSeparator as E, StepperTitle as D, StepperTrigger as O } from "reka-ui";
|
|
7
|
+
//#region src/components/Stepper.vue?vue&type=script&setup=true&lang.ts
|
|
8
|
+
var k = /*@__PURE__*/ f({
|
|
9
|
+
__name: "Stepper",
|
|
10
|
+
props: /*@__PURE__*/ p({
|
|
11
|
+
items: {},
|
|
12
|
+
orientation: {},
|
|
13
|
+
linear: {
|
|
14
|
+
type: Boolean,
|
|
15
|
+
default: !1
|
|
16
|
+
},
|
|
17
|
+
unstyled: {
|
|
18
|
+
type: Boolean,
|
|
19
|
+
default: void 0
|
|
20
|
+
},
|
|
21
|
+
class: {},
|
|
22
|
+
ui: {}
|
|
23
|
+
}, {
|
|
24
|
+
modelValue: { default: 1 },
|
|
25
|
+
modelModifiers: {}
|
|
26
|
+
}),
|
|
27
|
+
emits: ["update:modelValue"],
|
|
28
|
+
setup(f) {
|
|
29
|
+
let p = f, k = b(f, "modelValue"), A = a(() => (p.items ?? []).map((e) => typeof e == "string" ? { title: e } : e)), j = t(), M = a(() => p.unstyled ?? j.unstyled), N = a(() => r({ orientation: p.orientation }));
|
|
30
|
+
function P(e) {
|
|
31
|
+
let t = p.ui?.[e];
|
|
32
|
+
return M.value ? t : N.value[e]({ class: t });
|
|
33
|
+
}
|
|
34
|
+
let F = a(() => M.value ? [p.ui?.root, p.class] : N.value.root({ class: [p.ui?.root, p.class] }));
|
|
35
|
+
return (t, r) => (h(), o(y(T), {
|
|
36
|
+
modelValue: k.value,
|
|
37
|
+
"onUpdate:modelValue": r[0] ||= (e) => k.value = e,
|
|
38
|
+
orientation: p.orientation,
|
|
39
|
+
linear: p.linear,
|
|
40
|
+
class: m(F.value)
|
|
41
|
+
}, {
|
|
42
|
+
default: x(() => [(h(!0), c(i, null, g(A.value, (r, a) => (h(), o(y(w), {
|
|
43
|
+
key: a,
|
|
44
|
+
step: a + 1,
|
|
45
|
+
disabled: r.disabled,
|
|
46
|
+
class: m(P("item"))
|
|
47
|
+
}, {
|
|
48
|
+
default: x(() => [d(y(O), { class: m(P("trigger")) }, {
|
|
49
|
+
default: x(() => [d(y(C), { class: m(P("indicator")) }, {
|
|
50
|
+
default: x(() => [_(t.$slots, "indicator", {
|
|
51
|
+
step: a + 1,
|
|
52
|
+
item: r
|
|
53
|
+
}, () => [a + 1 < k.value ? (h(), o(n, {
|
|
54
|
+
key: 0,
|
|
55
|
+
icon: y(e)
|
|
56
|
+
}, null, 8, ["icon"])) : (h(), c(i, { key: 1 }, [u(v(a + 1), 1)], 64))])]),
|
|
57
|
+
_: 2
|
|
58
|
+
}, 1032, ["class"]), l("span", { class: m(P("content")) }, [d(y(D), { class: m(P("title")) }, {
|
|
59
|
+
default: x(() => [u(v(r.title), 1)]),
|
|
60
|
+
_: 2
|
|
61
|
+
}, 1032, ["class"]), r.description ? (h(), o(y(S), {
|
|
62
|
+
key: 0,
|
|
63
|
+
class: m(P("description"))
|
|
64
|
+
}, {
|
|
65
|
+
default: x(() => [u(v(r.description), 1)]),
|
|
66
|
+
_: 2
|
|
67
|
+
}, 1032, ["class"])) : s("", !0)], 2)]),
|
|
68
|
+
_: 2
|
|
69
|
+
}, 1032, ["class"]), a < A.value.length - 1 ? (h(), o(y(E), {
|
|
70
|
+
key: 0,
|
|
71
|
+
class: m(P("separator"))
|
|
72
|
+
}, null, 8, ["class"])) : s("", !0)]),
|
|
73
|
+
_: 2
|
|
74
|
+
}, 1032, [
|
|
75
|
+
"step",
|
|
76
|
+
"disabled",
|
|
77
|
+
"class"
|
|
78
|
+
]))), 128))]),
|
|
79
|
+
_: 3
|
|
80
|
+
}, 8, [
|
|
81
|
+
"modelValue",
|
|
82
|
+
"orientation",
|
|
83
|
+
"linear",
|
|
84
|
+
"class"
|
|
85
|
+
]));
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
//#endregion
|
|
89
|
+
export { k as default };
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { useIryxUiConfig as e } from "../config.js";
|
|
2
|
+
import t from "./Icon.js";
|
|
3
|
+
import { tabsTheme as n } from "../theme/tabs.js";
|
|
4
|
+
import { Fragment as r, computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createTextVNode as c, createVNode as l, defineComponent as u, mergeModels as d, normalizeClass as f, openBlock as p, renderList as m, renderSlot as h, toDisplayString as g, unref as _, useModel as v, withCtx as y } from "vue";
|
|
5
|
+
import { TabsContent as b, TabsIndicator as x, TabsList as S, TabsRoot as C, TabsTrigger as w } from "reka-ui";
|
|
6
|
+
//#region src/components/Tabs.vue?vue&type=script&setup=true&lang.ts
|
|
7
|
+
var T = /*@__PURE__*/ u({
|
|
8
|
+
__name: "Tabs",
|
|
9
|
+
props: /*@__PURE__*/ d({
|
|
10
|
+
items: {},
|
|
11
|
+
variant: {},
|
|
12
|
+
orientation: {},
|
|
13
|
+
keepMounted: { type: Boolean },
|
|
14
|
+
unstyled: {
|
|
15
|
+
type: Boolean,
|
|
16
|
+
default: void 0
|
|
17
|
+
},
|
|
18
|
+
class: {},
|
|
19
|
+
ui: {}
|
|
20
|
+
}, {
|
|
21
|
+
modelValue: { default: void 0 },
|
|
22
|
+
modelModifiers: {}
|
|
23
|
+
}),
|
|
24
|
+
emits: ["update:modelValue"],
|
|
25
|
+
setup(u) {
|
|
26
|
+
let d = u, T = i(() => (d.items ?? []).map((e) => typeof e == "string" ? { label: e } : e)), E = (e) => e.value ?? e.label, D = v(u, "modelValue"), O = e(), k = i(() => d.unstyled ?? O.unstyled), A = i(() => n({
|
|
27
|
+
variant: d.variant,
|
|
28
|
+
orientation: d.orientation
|
|
29
|
+
})), j = i(() => k.value ? [d.ui?.root, d.class] : A.value.root({ class: [d.ui?.root, d.class] })), M = i(() => k.value ? d.ui?.list : A.value.list({ class: d.ui?.list })), N = i(() => k.value ? d.ui?.indicator : A.value.indicator({ class: d.ui?.indicator })), P = i(() => k.value ? d.ui?.trigger : A.value.trigger({ class: d.ui?.trigger })), F = i(() => k.value ? d.ui?.content : A.value.content({ class: d.ui?.content }));
|
|
30
|
+
return (e, n) => (p(), a(_(C), {
|
|
31
|
+
modelValue: D.value,
|
|
32
|
+
"onUpdate:modelValue": n[0] ||= (e) => D.value = e,
|
|
33
|
+
"default-value": T.value[0] ? E(T.value[0]) : void 0,
|
|
34
|
+
orientation: d.orientation,
|
|
35
|
+
class: f(j.value)
|
|
36
|
+
}, {
|
|
37
|
+
default: y(() => [l(_(S), { class: f(M.value) }, {
|
|
38
|
+
default: y(() => [l(_(x), { class: f(N.value) }, null, 8, ["class"]), h(e.$slots, "list", {}, () => [(p(!0), s(r, null, m(T.value, (n) => (p(), a(_(w), {
|
|
39
|
+
key: E(n),
|
|
40
|
+
value: E(n),
|
|
41
|
+
disabled: n.disabled,
|
|
42
|
+
class: f(P.value)
|
|
43
|
+
}, {
|
|
44
|
+
default: y(() => [h(e.$slots, "trigger", { item: n }, () => [n.icon ? (p(), a(t, {
|
|
45
|
+
key: 0,
|
|
46
|
+
icon: n.icon
|
|
47
|
+
}, null, 8, ["icon"])) : o("", !0), c(" " + g(n.label), 1)])]),
|
|
48
|
+
_: 2
|
|
49
|
+
}, 1032, [
|
|
50
|
+
"value",
|
|
51
|
+
"disabled",
|
|
52
|
+
"class"
|
|
53
|
+
]))), 128))])]),
|
|
54
|
+
_: 3
|
|
55
|
+
}, 8, ["class"]), h(e.$slots, "default", {}, () => [(p(!0), s(r, null, m(T.value, (t) => (p(), a(_(b), {
|
|
56
|
+
key: E(t),
|
|
57
|
+
value: E(t),
|
|
58
|
+
"force-mount": d.keepMounted || void 0,
|
|
59
|
+
class: f(F.value)
|
|
60
|
+
}, {
|
|
61
|
+
default: y(() => [h(e.$slots, E(t), { item: t })]),
|
|
62
|
+
_: 2
|
|
63
|
+
}, 1032, [
|
|
64
|
+
"value",
|
|
65
|
+
"force-mount",
|
|
66
|
+
"class"
|
|
67
|
+
]))), 128))])]),
|
|
68
|
+
_: 3
|
|
69
|
+
}, 8, [
|
|
70
|
+
"modelValue",
|
|
71
|
+
"default-value",
|
|
72
|
+
"orientation",
|
|
73
|
+
"class"
|
|
74
|
+
]));
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
//#endregion
|
|
78
|
+
export { T as default };
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { Alert02Icon as e, AlertCircleIcon as t, Cancel01Icon as n, CheckmarkCircle02Icon as r, InformationCircleIcon as i } from "../../../../node_modules/.pnpm/@hugeicons_core-free-icons@4.2.3/node_modules/@hugeicons/core-free-icons/dist/esm/index.js";
|
|
2
|
+
import { useIryxUiConfig as a } from "../config.js";
|
|
3
|
+
import o from "./Icon.js";
|
|
4
|
+
import { useToast as s, useToastState as c } from "../composables/toast.js";
|
|
5
|
+
import { toastTheme as l } from "../theme/toast.js";
|
|
6
|
+
import { Fragment as u, computed as d, createBlock as f, createCommentVNode as p, createElementBlock as m, createElementVNode as h, createTextVNode as g, createVNode as _, defineComponent as v, normalizeClass as y, openBlock as b, renderList as x, toDisplayString as S, unref as C, withCtx as w } from "vue";
|
|
7
|
+
import { ToastAction as T, ToastClose as E, ToastDescription as D, ToastPortal as O, ToastProvider as k, ToastRoot as A, ToastTitle as j, ToastViewport as M } from "reka-ui";
|
|
8
|
+
//#region src/components/Toaster.vue?vue&type=script&setup=true&lang.ts
|
|
9
|
+
var N = /*@__PURE__*/ v({
|
|
10
|
+
__name: "Toaster",
|
|
11
|
+
props: {
|
|
12
|
+
position: {},
|
|
13
|
+
duration: { default: 5e3 },
|
|
14
|
+
closeLabel: { default: "Close" },
|
|
15
|
+
unstyled: {
|
|
16
|
+
type: Boolean,
|
|
17
|
+
default: void 0
|
|
18
|
+
},
|
|
19
|
+
class: {},
|
|
20
|
+
ui: {}
|
|
21
|
+
},
|
|
22
|
+
setup(v) {
|
|
23
|
+
let N = v, P = c(), { dismiss: F } = s(), I = {
|
|
24
|
+
success: r,
|
|
25
|
+
warning: e,
|
|
26
|
+
danger: t,
|
|
27
|
+
info: i
|
|
28
|
+
};
|
|
29
|
+
function L(e) {
|
|
30
|
+
return e.variant && e.variant !== "neutral" ? I[e.variant] : void 0;
|
|
31
|
+
}
|
|
32
|
+
function R(e) {
|
|
33
|
+
let t = e.duration ?? N.duration;
|
|
34
|
+
return t === 0 ? Infinity : t;
|
|
35
|
+
}
|
|
36
|
+
let z = a(), B = d(() => N.unstyled ?? z.unstyled);
|
|
37
|
+
function V(e) {
|
|
38
|
+
return l({
|
|
39
|
+
variant: e.variant,
|
|
40
|
+
position: N.position,
|
|
41
|
+
withTitle: !!e.title
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
let H = d(() => {
|
|
45
|
+
let e = l({ position: N.position });
|
|
46
|
+
return B.value ? [N.ui?.viewport, N.class] : e.viewport({ class: [N.ui?.viewport, N.class] });
|
|
47
|
+
});
|
|
48
|
+
function U(e, t) {
|
|
49
|
+
let n = N.ui?.[t];
|
|
50
|
+
return B.value ? n : V(e)[t]({ class: n });
|
|
51
|
+
}
|
|
52
|
+
function W(e) {
|
|
53
|
+
e.action?.onClick(), F(e.id);
|
|
54
|
+
}
|
|
55
|
+
return (e, t) => (b(), f(C(k), null, {
|
|
56
|
+
default: w(() => [(b(!0), m(u, null, x(C(P), (e) => (b(), f(C(A), {
|
|
57
|
+
key: e.id,
|
|
58
|
+
duration: R(e),
|
|
59
|
+
class: y(U(e, "root")),
|
|
60
|
+
"onUpdate:open": (t) => !t && C(F)(e.id)
|
|
61
|
+
}, {
|
|
62
|
+
default: w(() => [
|
|
63
|
+
L(e) ? (b(), m("div", {
|
|
64
|
+
key: 0,
|
|
65
|
+
class: y(U(e, "icon"))
|
|
66
|
+
}, [_(o, { icon: L(e) }, null, 8, ["icon"])], 2)) : p("", !0),
|
|
67
|
+
h("div", { class: y(U(e, "content")) }, [e.title ? (b(), f(C(j), {
|
|
68
|
+
key: 0,
|
|
69
|
+
class: y(U(e, "title"))
|
|
70
|
+
}, {
|
|
71
|
+
default: w(() => [g(S(e.title), 1)]),
|
|
72
|
+
_: 2
|
|
73
|
+
}, 1032, ["class"])) : p("", !0), e.description ? (b(), f(C(D), {
|
|
74
|
+
key: 1,
|
|
75
|
+
class: y(U(e, "description"))
|
|
76
|
+
}, {
|
|
77
|
+
default: w(() => [g(S(e.description), 1)]),
|
|
78
|
+
_: 2
|
|
79
|
+
}, 1032, ["class"])) : p("", !0)], 2),
|
|
80
|
+
e.action ? (b(), f(C(T), {
|
|
81
|
+
key: 1,
|
|
82
|
+
"alt-text": e.action.label,
|
|
83
|
+
class: y(U(e, "action")),
|
|
84
|
+
onClick: (t) => W(e)
|
|
85
|
+
}, {
|
|
86
|
+
default: w(() => [g(S(e.action.label), 1)]),
|
|
87
|
+
_: 2
|
|
88
|
+
}, 1032, [
|
|
89
|
+
"alt-text",
|
|
90
|
+
"class",
|
|
91
|
+
"onClick"
|
|
92
|
+
])) : p("", !0),
|
|
93
|
+
_(C(E), {
|
|
94
|
+
"aria-label": N.closeLabel,
|
|
95
|
+
class: y(U(e, "close"))
|
|
96
|
+
}, {
|
|
97
|
+
default: w(() => [_(o, { icon: C(n) }, null, 8, ["icon"])]),
|
|
98
|
+
_: 1
|
|
99
|
+
}, 8, ["aria-label", "class"])
|
|
100
|
+
]),
|
|
101
|
+
_: 2
|
|
102
|
+
}, 1032, [
|
|
103
|
+
"duration",
|
|
104
|
+
"class",
|
|
105
|
+
"onUpdate:open"
|
|
106
|
+
]))), 128)), _(C(O), null, {
|
|
107
|
+
default: w(() => [_(C(M), { class: y(H.value) }, null, 8, ["class"])]),
|
|
108
|
+
_: 1
|
|
109
|
+
})]),
|
|
110
|
+
_: 1
|
|
111
|
+
}));
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
//#endregion
|
|
115
|
+
export { N as default };
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { useIryxUiConfig as e } from "../config.js";
|
|
2
|
+
import { tooltipTheme as t } from "../theme/tooltip.js";
|
|
3
|
+
import { computed as n, createBlock as r, createCommentVNode as i, createTextVNode as a, createVNode as o, defineComponent as s, mergeModels as c, normalizeClass as l, openBlock as u, renderSlot as d, toDisplayString as f, unref as p, useModel as m, withCtx as h } from "vue";
|
|
4
|
+
import { TooltipArrow as g, TooltipContent as _, TooltipPortal as v, TooltipProvider as y, TooltipRoot as b, TooltipTrigger as x } from "reka-ui";
|
|
5
|
+
//#region src/components/Tooltip.vue?vue&type=script&setup=true&lang.ts
|
|
6
|
+
var S = /*@__PURE__*/ s({
|
|
7
|
+
__name: "Tooltip",
|
|
8
|
+
props: /*@__PURE__*/ c({
|
|
9
|
+
text: {},
|
|
10
|
+
side: { default: "top" },
|
|
11
|
+
align: {},
|
|
12
|
+
sideOffset: { default: 6 },
|
|
13
|
+
delay: { default: 300 },
|
|
14
|
+
arrow: { type: Boolean },
|
|
15
|
+
disabled: { type: Boolean },
|
|
16
|
+
unstyled: {
|
|
17
|
+
type: Boolean,
|
|
18
|
+
default: void 0
|
|
19
|
+
},
|
|
20
|
+
class: {},
|
|
21
|
+
ui: {}
|
|
22
|
+
}, {
|
|
23
|
+
open: {
|
|
24
|
+
type: Boolean,
|
|
25
|
+
default: void 0
|
|
26
|
+
},
|
|
27
|
+
openModifiers: {}
|
|
28
|
+
}),
|
|
29
|
+
emits: ["update:open"],
|
|
30
|
+
setup(s) {
|
|
31
|
+
let c = s, S = m(s, "open"), C = e(), w = n(() => c.unstyled ?? C.unstyled), T = n(() => t()), E = n(() => w.value ? [c.ui?.content, c.class] : T.value.content({ class: [c.ui?.content, c.class] })), D = n(() => w.value ? c.ui?.arrow : T.value.arrow({ class: c.ui?.arrow }));
|
|
32
|
+
return (e, t) => (u(), r(p(y), { "delay-duration": c.delay }, {
|
|
33
|
+
default: h(() => [o(p(b), {
|
|
34
|
+
open: S.value,
|
|
35
|
+
"onUpdate:open": t[0] ||= (e) => S.value = e,
|
|
36
|
+
disabled: c.disabled
|
|
37
|
+
}, {
|
|
38
|
+
default: h(() => [o(p(x), { "as-child": "" }, {
|
|
39
|
+
default: h(() => [d(e.$slots, "trigger")]),
|
|
40
|
+
_: 3
|
|
41
|
+
}), o(p(v), null, {
|
|
42
|
+
default: h(() => [o(p(_), {
|
|
43
|
+
side: c.side,
|
|
44
|
+
align: c.align,
|
|
45
|
+
"side-offset": c.sideOffset,
|
|
46
|
+
class: l(E.value)
|
|
47
|
+
}, {
|
|
48
|
+
default: h(() => [d(e.$slots, "content", {}, () => [a(f(c.text), 1)]), c.arrow ? (u(), r(p(g), {
|
|
49
|
+
key: 0,
|
|
50
|
+
class: l(D.value),
|
|
51
|
+
width: 10,
|
|
52
|
+
height: 5
|
|
53
|
+
}, null, 8, ["class"])) : i("", !0)]),
|
|
54
|
+
_: 3
|
|
55
|
+
}, 8, [
|
|
56
|
+
"side",
|
|
57
|
+
"align",
|
|
58
|
+
"side-offset",
|
|
59
|
+
"class"
|
|
60
|
+
])]),
|
|
61
|
+
_: 3
|
|
62
|
+
})]),
|
|
63
|
+
_: 3
|
|
64
|
+
}, 8, ["open", "disabled"])]),
|
|
65
|
+
_: 3
|
|
66
|
+
}, 8, ["delay-duration"]));
|
|
67
|
+
}
|
|
68
|
+
});
|
|
69
|
+
//#endregion
|
|
70
|
+
export { S as default };
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { __exportAll as e } from "../../../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
import t from "./Alert.js";
|
|
3
|
+
import n from "./App.js";
|
|
4
|
+
import r from "./Badge.js";
|
|
5
|
+
import i from "./Breadcrumb.js";
|
|
6
|
+
import a from "./Button.js";
|
|
7
|
+
import o from "./ButtonGroup.js";
|
|
8
|
+
import s from "./Card.js";
|
|
9
|
+
import c from "./Checkbox.js";
|
|
10
|
+
import l from "./Dialog.js";
|
|
11
|
+
import u from "./ConfirmDialog.js";
|
|
12
|
+
import d from "./DropdownMenu.js";
|
|
13
|
+
import f from "./EmptyState.js";
|
|
14
|
+
import p from "./Form.js";
|
|
15
|
+
import m from "./Label.js";
|
|
16
|
+
import h from "./FormField.js";
|
|
17
|
+
import g from "./Input.js";
|
|
18
|
+
import _ from "./NumberInput.js";
|
|
19
|
+
import v from "./Pagination.js";
|
|
20
|
+
import y from "./Progress.js";
|
|
21
|
+
import b from "./RadioGroup.js";
|
|
22
|
+
import x from "./Select.js";
|
|
23
|
+
import S from "./Separator.js";
|
|
24
|
+
import C from "./Skeleton.js";
|
|
25
|
+
import w from "./Stat.js";
|
|
26
|
+
import T from "./Stepper.js";
|
|
27
|
+
import E from "./Switch.js";
|
|
28
|
+
import D from "./Tabs.js";
|
|
29
|
+
import O from "./Textarea.js";
|
|
30
|
+
import k from "./Toaster.js";
|
|
31
|
+
import A from "./Tooltip.js";
|
|
32
|
+
//#region src/components/index.ts
|
|
33
|
+
var j = /* @__PURE__ */ e({
|
|
34
|
+
Alert: () => t,
|
|
35
|
+
App: () => n,
|
|
36
|
+
Badge: () => r,
|
|
37
|
+
Breadcrumb: () => i,
|
|
38
|
+
Button: () => a,
|
|
39
|
+
ButtonGroup: () => o,
|
|
40
|
+
Card: () => s,
|
|
41
|
+
Checkbox: () => c,
|
|
42
|
+
ConfirmDialog: () => u,
|
|
43
|
+
Dialog: () => l,
|
|
44
|
+
DropdownMenu: () => d,
|
|
45
|
+
EmptyState: () => f,
|
|
46
|
+
Form: () => p,
|
|
47
|
+
FormField: () => h,
|
|
48
|
+
Input: () => g,
|
|
49
|
+
Label: () => m,
|
|
50
|
+
NumberInput: () => _,
|
|
51
|
+
Pagination: () => v,
|
|
52
|
+
Progress: () => y,
|
|
53
|
+
RadioGroup: () => b,
|
|
54
|
+
Select: () => x,
|
|
55
|
+
Separator: () => S,
|
|
56
|
+
Skeleton: () => C,
|
|
57
|
+
Stat: () => w,
|
|
58
|
+
Stepper: () => T,
|
|
59
|
+
Switch: () => E,
|
|
60
|
+
Tabs: () => D,
|
|
61
|
+
Textarea: () => O,
|
|
62
|
+
Toaster: () => k,
|
|
63
|
+
Tooltip: () => A
|
|
64
|
+
});
|
|
65
|
+
//#endregion
|
|
66
|
+
export { j as components_exports };
|
|
@@ -4,7 +4,11 @@ var r = "iryx-ui:appearance", i = t("system"), a = t(!1), o = !1;
|
|
|
4
4
|
function s() {
|
|
5
5
|
return i.value === "dark" || i.value === "system" && a.value;
|
|
6
6
|
}
|
|
7
|
-
function c() {
|
|
7
|
+
function c(e) {
|
|
8
|
+
let t = document.createElement("style");
|
|
9
|
+
t.textContent = "*,*::before,*::after{transition:none !important;animation:none !important}", document.head.appendChild(t), document.documentElement.classList.toggle("dark", e), document.body?.offsetHeight, requestAnimationFrame(() => t.remove());
|
|
10
|
+
}
|
|
11
|
+
function l() {
|
|
8
12
|
if (o || typeof window > "u") return;
|
|
9
13
|
o = !0;
|
|
10
14
|
let e = window.localStorage.getItem(r);
|
|
@@ -15,16 +19,16 @@ function c() {
|
|
|
15
19
|
});
|
|
16
20
|
}
|
|
17
21
|
n(() => {
|
|
18
|
-
|
|
22
|
+
c(s()), window.localStorage.setItem(r, i.value);
|
|
19
23
|
});
|
|
20
24
|
}
|
|
21
|
-
function
|
|
25
|
+
function u(e) {
|
|
22
26
|
if (typeof window > "u") return;
|
|
23
27
|
let t = window.localStorage.getItem(r) !== null;
|
|
24
|
-
|
|
28
|
+
l(), t || (i.value = e);
|
|
25
29
|
}
|
|
26
|
-
function
|
|
27
|
-
return
|
|
30
|
+
function d() {
|
|
31
|
+
return l(), {
|
|
28
32
|
appearance: i,
|
|
29
33
|
isDark: e(() => s()),
|
|
30
34
|
setAppearance: (e) => {
|
|
@@ -36,4 +40,4 @@ function u() {
|
|
|
36
40
|
};
|
|
37
41
|
}
|
|
38
42
|
//#endregion
|
|
39
|
-
export {
|
|
43
|
+
export { u as initAppearance, d as useAppearance };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { shallowRef as e } from "vue";
|
|
2
|
+
//#region src/composables/confirm.ts
|
|
3
|
+
var t = e(null), n = 0;
|
|
4
|
+
function r() {
|
|
5
|
+
return t;
|
|
6
|
+
}
|
|
7
|
+
function i(e) {
|
|
8
|
+
let n = t.value;
|
|
9
|
+
n && (t.value = null, n.resolve(e));
|
|
10
|
+
}
|
|
11
|
+
function a() {
|
|
12
|
+
function e(e) {
|
|
13
|
+
let r = typeof e == "string" ? { title: e } : e;
|
|
14
|
+
return i(!1), new Promise((e) => {
|
|
15
|
+
t.value = {
|
|
16
|
+
...r,
|
|
17
|
+
id: n++,
|
|
18
|
+
resolve: e
|
|
19
|
+
};
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
return { confirm: e };
|
|
23
|
+
}
|
|
24
|
+
//#endregion
|
|
25
|
+
export { i as resolveConfirm, a as useConfirm, r as useConfirmState };
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
//#region src/composables/decimal.ts
|
|
2
|
+
var e = /^[+-]?(?:\d+(?:\.\d*)?|\.\d+)$/;
|
|
3
|
+
function t(t) {
|
|
4
|
+
let n = t.trim();
|
|
5
|
+
if (!n || !e.test(n)) return;
|
|
6
|
+
let r = n.startsWith("-"), [i = "", a = ""] = n.replace(/^[+-]/, "").split("."), o = `${i || "0"}${a}`, s = BigInt(o || "0");
|
|
7
|
+
return {
|
|
8
|
+
units: r ? -s : s,
|
|
9
|
+
scale: a.length
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
function n({ units: e, scale: t }) {
|
|
13
|
+
let n = e < 0n, r = (n ? -e : e).toString().padStart(t + 1, "0"), i = r.slice(0, r.length - t), a = t ? r.slice(r.length - t) : "";
|
|
14
|
+
return `${n ? "-" : ""}${i}${a ? `.${a}` : ""}`;
|
|
15
|
+
}
|
|
16
|
+
function r(e, t) {
|
|
17
|
+
let n = Math.max(e.scale, t.scale), r = (e) => e.units * 10n ** BigInt(n - e.scale);
|
|
18
|
+
return [
|
|
19
|
+
r(e),
|
|
20
|
+
r(t),
|
|
21
|
+
n
|
|
22
|
+
];
|
|
23
|
+
}
|
|
24
|
+
function i(e, n) {
|
|
25
|
+
let i = t(e), a = t(n);
|
|
26
|
+
if (!i || !a) return NaN;
|
|
27
|
+
let [o, s] = r(i, a);
|
|
28
|
+
return o < s ? -1 : +(o > s);
|
|
29
|
+
}
|
|
30
|
+
function a(e, i) {
|
|
31
|
+
let a = t(e), o = t(i);
|
|
32
|
+
if (!a || !o) return;
|
|
33
|
+
let [s, c, l] = r(a, o);
|
|
34
|
+
return n({
|
|
35
|
+
units: s + c,
|
|
36
|
+
scale: l
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
function o(e, r) {
|
|
40
|
+
let i = t(e);
|
|
41
|
+
if (!i) return;
|
|
42
|
+
if (i.scale <= r) return n({
|
|
43
|
+
units: i.units * 10n ** BigInt(r - i.scale),
|
|
44
|
+
scale: r
|
|
45
|
+
});
|
|
46
|
+
let a = 10n ** BigInt(i.scale - r), o = i.units < 0n, s = o ? -i.units : i.units, c = s % a * 2n >= a ? 1n : 0n, l = s / a + c;
|
|
47
|
+
return n({
|
|
48
|
+
units: o ? -l : l,
|
|
49
|
+
scale: r
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
function s(e, t, n) {
|
|
53
|
+
return t != null && i(e, t) < 0 ? t : n != null && i(e, n) > 0 ? n : e;
|
|
54
|
+
}
|
|
55
|
+
function c(e) {
|
|
56
|
+
return t(e) !== void 0;
|
|
57
|
+
}
|
|
58
|
+
function l(e) {
|
|
59
|
+
let t = new Intl.NumberFormat(e).formatToParts(12345.6);
|
|
60
|
+
return {
|
|
61
|
+
decimal: t.find((e) => e.type === "decimal")?.value ?? ".",
|
|
62
|
+
group: t.find((e) => e.type === "group")?.value ?? ","
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
function u(e, n, r) {
|
|
66
|
+
let i = t(e);
|
|
67
|
+
if (!i) return e;
|
|
68
|
+
let a = o(e, r ?? i.scale) ?? e, [s = "0", c = ""] = a.replace("-", "").split("."), { decimal: u, group: d } = l(n), f = s.replace(/\B(?=(\d{3})+(?!\d))/g, d);
|
|
69
|
+
return `${a.startsWith("-") ? "-" : ""}${f}${c ? `${u}${c}` : ""}`;
|
|
70
|
+
}
|
|
71
|
+
function d(e, t) {
|
|
72
|
+
return !e || !t ? e : e.replace(".", l(t).decimal);
|
|
73
|
+
}
|
|
74
|
+
function f(e, t) {
|
|
75
|
+
let { decimal: n, group: r } = l(t), i = e.trim().replaceAll(r, "").replace(/\s/g, "").replace(n, ".");
|
|
76
|
+
return c(i) ? i : void 0;
|
|
77
|
+
}
|
|
78
|
+
//#endregion
|
|
79
|
+
export { a as addDecimals, s as clampDecimal, i as compareDecimals, n as formatDecimal, u as formatForLocale, c as isDecimal, l as localeSeparators, t as parseDecimal, f as parseFromLocale, o as roundDecimal, d as toEditable };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { shallowRef as e } from "vue";
|
|
2
|
+
//#region src/composables/toast.ts
|
|
3
|
+
var t = e([]), n = 0;
|
|
4
|
+
function r() {
|
|
5
|
+
return t;
|
|
6
|
+
}
|
|
7
|
+
function i(e) {
|
|
8
|
+
return typeof e == "string" ? { title: e } : e;
|
|
9
|
+
}
|
|
10
|
+
function a() {
|
|
11
|
+
function e(e) {
|
|
12
|
+
let r = n++;
|
|
13
|
+
return t.value = [...t.value, {
|
|
14
|
+
...i(e),
|
|
15
|
+
id: r
|
|
16
|
+
}], r;
|
|
17
|
+
}
|
|
18
|
+
function r(t) {
|
|
19
|
+
return (n) => e({
|
|
20
|
+
...i(n),
|
|
21
|
+
variant: t
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
function a(e) {
|
|
25
|
+
t.value = t.value.filter((t) => t.id !== e);
|
|
26
|
+
}
|
|
27
|
+
return {
|
|
28
|
+
toast: e,
|
|
29
|
+
success: r("success"),
|
|
30
|
+
warning: r("warning"),
|
|
31
|
+
danger: r("danger"),
|
|
32
|
+
info: r("info"),
|
|
33
|
+
dismiss: a,
|
|
34
|
+
clear: () => t.value = []
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
//#endregion
|
|
38
|
+
export { a as useToast, r as useToastState };
|
|
@@ -19,15 +19,15 @@ var t = e({
|
|
|
19
19
|
},
|
|
20
20
|
size: {
|
|
21
21
|
sm: {
|
|
22
|
-
root: "h-5 gap-1 px-2 text-xs [&_svg]:size-3",
|
|
22
|
+
root: "h-5 gap-1 px-2 text-xs has-[[data-icon=inline-end]]:pr-1.5 has-[[data-icon=inline-start]]:pl-1.5 [&_svg]:size-3",
|
|
23
23
|
dot: "size-1.5"
|
|
24
24
|
},
|
|
25
25
|
md: {
|
|
26
|
-
root: "h-6 gap-1.5 px-2.5 text-xs [&_svg]:size-3.5",
|
|
26
|
+
root: "h-6 gap-1.5 px-2.5 text-xs has-[[data-icon=inline-end]]:pr-2 has-[[data-icon=inline-start]]:pl-2 [&_svg]:size-3.5",
|
|
27
27
|
dot: "size-2"
|
|
28
28
|
},
|
|
29
29
|
lg: {
|
|
30
|
-
root: "h-7 gap-1.5 px-3 text-sm [&_svg]:size-4",
|
|
30
|
+
root: "h-7 gap-1.5 px-3 text-sm has-[[data-icon=inline-end]]:pr-2.5 has-[[data-icon=inline-start]]:pl-2.5 [&_svg]:size-4",
|
|
31
31
|
dot: "size-2"
|
|
32
32
|
}
|
|
33
33
|
}
|