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,26 @@
|
|
|
1
|
+
import { HugeiconsIcon as e } from "../../../../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";
|
|
2
|
+
import { isIconArray as t } from "../composables/icon.js";
|
|
3
|
+
import { computed as n, createBlock as r, createCommentVNode as i, defineComponent as a, normalizeClass as o, openBlock as s, resolveDynamicComponent as c, unref as l } from "vue";
|
|
4
|
+
//#region src/components/Icon.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
+
var u = /*@__PURE__*/ a({
|
|
6
|
+
__name: "Icon",
|
|
7
|
+
props: {
|
|
8
|
+
icon: {},
|
|
9
|
+
class: {}
|
|
10
|
+
},
|
|
11
|
+
setup(a) {
|
|
12
|
+
let u = a, d = n(() => u.icon && t(u.icon) ? u.icon : void 0);
|
|
13
|
+
return (t, n) => d.value ? (s(), r(l(e), {
|
|
14
|
+
key: 0,
|
|
15
|
+
icon: d.value,
|
|
16
|
+
class: o(u.class),
|
|
17
|
+
"aria-hidden": "true"
|
|
18
|
+
}, null, 8, ["icon", "class"])) : u.icon ? (s(), r(c(u.icon), {
|
|
19
|
+
key: 1,
|
|
20
|
+
class: o(u.class),
|
|
21
|
+
"aria-hidden": "true"
|
|
22
|
+
}, null, 8, ["class"])) : i("", !0);
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
//#endregion
|
|
26
|
+
export { u as default };
|
package/dist/packages/iryx-ui/src/components/NumberInput.vue_vue_type_script_setup_true_lang.js
ADDED
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { ArrowDown01Icon as e, ArrowUp01Icon as t } 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 n } from "../config.js";
|
|
3
|
+
import r from "./Icon.js";
|
|
4
|
+
import { useFormField as i } from "../composables/form.js";
|
|
5
|
+
import { addDecimals as a, clampDecimal as o, compareDecimals as s, formatForLocale as c, isDecimal as l, parseFromLocale as u, roundDecimal as d, toEditable as f } from "../composables/decimal.js";
|
|
6
|
+
import { numberInputTheme as p } from "../theme/number-input.js";
|
|
7
|
+
import { computed as m, createCommentVNode as h, createElementBlock as g, createElementVNode as _, createVNode as v, defineComponent as y, mergeModels as b, normalizeClass as x, openBlock as S, ref as C, unref as w, useModel as T, vModelText as E, watch as D, withDirectives as O, withKeys as k, withModifiers as A } from "vue";
|
|
8
|
+
//#region src/components/NumberInput.vue?vue&type=script&setup=true&lang.ts
|
|
9
|
+
var j = [
|
|
10
|
+
"id",
|
|
11
|
+
"aria-valuenow",
|
|
12
|
+
"aria-valuemin",
|
|
13
|
+
"aria-valuemax",
|
|
14
|
+
"placeholder",
|
|
15
|
+
"disabled",
|
|
16
|
+
"required",
|
|
17
|
+
"aria-invalid",
|
|
18
|
+
"aria-describedby"
|
|
19
|
+
], M = ["aria-label", "disabled"], N = ["aria-label", "disabled"], P = /*@__PURE__*/ y({
|
|
20
|
+
__name: "NumberInput",
|
|
21
|
+
props: /*@__PURE__*/ b({
|
|
22
|
+
min: {},
|
|
23
|
+
max: {},
|
|
24
|
+
step: { default: "1" },
|
|
25
|
+
precision: {},
|
|
26
|
+
locale: {},
|
|
27
|
+
stepper: {
|
|
28
|
+
type: Boolean,
|
|
29
|
+
default: !0
|
|
30
|
+
},
|
|
31
|
+
size: {},
|
|
32
|
+
placeholder: {},
|
|
33
|
+
disabled: { type: Boolean },
|
|
34
|
+
required: { type: Boolean },
|
|
35
|
+
invalid: {
|
|
36
|
+
type: Boolean,
|
|
37
|
+
default: void 0
|
|
38
|
+
},
|
|
39
|
+
id: {},
|
|
40
|
+
incrementLabel: { default: "Increment" },
|
|
41
|
+
decrementLabel: { default: "Decrement" },
|
|
42
|
+
unstyled: {
|
|
43
|
+
type: Boolean,
|
|
44
|
+
default: void 0
|
|
45
|
+
},
|
|
46
|
+
class: {},
|
|
47
|
+
ui: {}
|
|
48
|
+
}, {
|
|
49
|
+
modelValue: { default: "" },
|
|
50
|
+
modelModifiers: {}
|
|
51
|
+
}),
|
|
52
|
+
emits: ["update:modelValue"],
|
|
53
|
+
setup(y) {
|
|
54
|
+
let b = y, P = T(y, "modelValue"), F = i(), I = m(() => b.id ?? F?.id.value), L = m(() => b.invalid ?? F?.invalid.value ?? !1), R = n(), z = m(() => b.unstyled ?? R.unstyled), B = C(""), V = C(!1);
|
|
55
|
+
function H(e) {
|
|
56
|
+
return e ? b.locale ? c(e, b.locale, b.precision) : b.precision == null ? e : d(e, b.precision) ?? e : "";
|
|
57
|
+
}
|
|
58
|
+
D(() => P.value, (e) => {
|
|
59
|
+
V.value || (B.value = H(e));
|
|
60
|
+
}, { immediate: !0 });
|
|
61
|
+
function U(e) {
|
|
62
|
+
let t = e.trim();
|
|
63
|
+
if (!t) {
|
|
64
|
+
P.value = "", B.value = "";
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
let n = b.locale ? u(t, b.locale) : l(t) ? t : void 0;
|
|
68
|
+
if (n == null) {
|
|
69
|
+
B.value = H(P.value);
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
let r = o(n, b.min, b.max), i = b.precision == null ? r : d(r, b.precision) ?? r;
|
|
73
|
+
P.value = i, B.value = H(i);
|
|
74
|
+
}
|
|
75
|
+
function W() {
|
|
76
|
+
V.value = !0, B.value = f(P.value, b.locale);
|
|
77
|
+
}
|
|
78
|
+
function G() {
|
|
79
|
+
V.value = !1, U(B.value);
|
|
80
|
+
}
|
|
81
|
+
function K(e) {
|
|
82
|
+
let t = a(P.value || "0", e === 1 ? b.step : `-${b.step}`);
|
|
83
|
+
if (t == null) return;
|
|
84
|
+
let n = o(t, b.min, b.max), r = b.precision == null ? n : d(n, b.precision) ?? n;
|
|
85
|
+
P.value = r, B.value = V.value ? f(r, b.locale) : H(r);
|
|
86
|
+
}
|
|
87
|
+
let q = m(() => b.min != null && P.value !== "" && s(P.value, b.min) <= 0), J = m(() => b.max != null && P.value !== "" && s(P.value, b.max) >= 0), Y = m(() => p({
|
|
88
|
+
size: b.size,
|
|
89
|
+
invalid: L.value,
|
|
90
|
+
withStepper: b.stepper
|
|
91
|
+
}));
|
|
92
|
+
function X(e, t) {
|
|
93
|
+
let n = b.ui?.[e];
|
|
94
|
+
return z.value ? [n, t] : Y.value[e]({ class: [n, t] });
|
|
95
|
+
}
|
|
96
|
+
return (n, i) => (S(), g("div", { class: x(X("root")) }, [O(_("input", {
|
|
97
|
+
id: I.value,
|
|
98
|
+
"onUpdate:modelValue": i[0] ||= (e) => B.value = e,
|
|
99
|
+
type: "text",
|
|
100
|
+
inputmode: "decimal",
|
|
101
|
+
autocomplete: "off",
|
|
102
|
+
role: "spinbutton",
|
|
103
|
+
"aria-valuenow": P.value || void 0,
|
|
104
|
+
"aria-valuemin": b.min,
|
|
105
|
+
"aria-valuemax": b.max,
|
|
106
|
+
placeholder: b.placeholder,
|
|
107
|
+
disabled: b.disabled,
|
|
108
|
+
required: b.required,
|
|
109
|
+
"aria-invalid": L.value || void 0,
|
|
110
|
+
"aria-describedby": w(F)?.describedBy.value,
|
|
111
|
+
class: x(z.value ? [b.ui?.input, b.class] : Y.value.input({ class: [b.ui?.input, b.class] })),
|
|
112
|
+
onFocus: W,
|
|
113
|
+
onBlur: G,
|
|
114
|
+
onKeydown: [i[1] ||= k(A((e) => K(1), ["prevent"]), ["up"]), i[2] ||= k(A((e) => K(-1), ["prevent"]), ["down"])]
|
|
115
|
+
}, null, 42, j), [[E, B.value]]), b.stepper ? (S(), g("div", {
|
|
116
|
+
key: 0,
|
|
117
|
+
class: x(X("stepper"))
|
|
118
|
+
}, [_("button", {
|
|
119
|
+
type: "button",
|
|
120
|
+
tabindex: "-1",
|
|
121
|
+
"aria-label": b.incrementLabel,
|
|
122
|
+
disabled: b.disabled || J.value,
|
|
123
|
+
class: x(X("step")),
|
|
124
|
+
onClick: i[3] ||= (e) => K(1)
|
|
125
|
+
}, [v(r, { icon: w(t) }, null, 8, ["icon"])], 10, M), _("button", {
|
|
126
|
+
type: "button",
|
|
127
|
+
tabindex: "-1",
|
|
128
|
+
"aria-label": b.decrementLabel,
|
|
129
|
+
disabled: b.disabled || q.value,
|
|
130
|
+
class: x(X("step")),
|
|
131
|
+
onClick: i[4] ||= (e) => K(-1)
|
|
132
|
+
}, [v(r, { icon: w(e) }, null, 8, ["icon"])], 10, N)], 2)) : h("", !0)], 2));
|
|
133
|
+
}
|
|
134
|
+
});
|
|
135
|
+
//#endregion
|
|
136
|
+
export { P as default };
|
package/dist/packages/iryx-ui/src/components/Pagination.vue_vue_type_script_setup_true_lang.js
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { ArrowLeft01Icon as e, ArrowRight01Icon as t } 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 n } from "../config.js";
|
|
3
|
+
import r from "./Icon.js";
|
|
4
|
+
import { paginationTheme as i } from "../theme/pagination.js";
|
|
5
|
+
import { Fragment as a, computed as o, createBlock as s, createElementBlock as c, createTextVNode as l, createVNode as u, defineComponent as d, mergeModels as f, normalizeClass as p, openBlock as m, renderList as h, renderSlot as g, toDisplayString as _, unref as v, useModel as y, withCtx as b } from "vue";
|
|
6
|
+
import { PaginationEllipsis as x, PaginationList as S, PaginationListItem as C, PaginationNext as w, PaginationPrev as T, PaginationRoot as E } from "reka-ui";
|
|
7
|
+
//#region src/components/Pagination.vue?vue&type=script&setup=true&lang.ts
|
|
8
|
+
var D = /*@__PURE__*/ d({
|
|
9
|
+
__name: "Pagination",
|
|
10
|
+
props: /*@__PURE__*/ f({
|
|
11
|
+
total: { default: 0 },
|
|
12
|
+
itemsPerPage: { default: 10 },
|
|
13
|
+
siblingCount: { default: 1 },
|
|
14
|
+
showEdges: {
|
|
15
|
+
type: Boolean,
|
|
16
|
+
default: !0
|
|
17
|
+
},
|
|
18
|
+
size: {},
|
|
19
|
+
prevLabel: { default: "Previous page" },
|
|
20
|
+
nextLabel: { default: "Next page" },
|
|
21
|
+
label: { default: "Pagination" },
|
|
22
|
+
unstyled: {
|
|
23
|
+
type: Boolean,
|
|
24
|
+
default: void 0
|
|
25
|
+
},
|
|
26
|
+
class: {},
|
|
27
|
+
ui: {}
|
|
28
|
+
}, {
|
|
29
|
+
page: { default: 1 },
|
|
30
|
+
pageModifiers: {}
|
|
31
|
+
}),
|
|
32
|
+
emits: ["update:page"],
|
|
33
|
+
setup(d) {
|
|
34
|
+
let f = d, D = y(d, "page"), O = n(), k = o(() => f.unstyled ?? O.unstyled), A = o(() => i({ size: f.size })), j = o(() => k.value ? [f.ui?.root, f.class] : A.value.root({ class: [f.ui?.root, f.class] })), M = o(() => k.value ? f.ui?.list : A.value.list({ class: f.ui?.list })), N = o(() => k.value ? f.ui?.ellipsis : A.value.ellipsis({ class: f.ui?.ellipsis }));
|
|
35
|
+
function P(e) {
|
|
36
|
+
return k.value ? f.ui?.item : [A.value.item({ class: f.ui?.item }), e ? A.value.active() : A.value.inactive()];
|
|
37
|
+
}
|
|
38
|
+
return (n, i) => (m(), s(v(E), {
|
|
39
|
+
page: D.value,
|
|
40
|
+
"onUpdate:page": i[0] ||= (e) => D.value = e,
|
|
41
|
+
total: f.total,
|
|
42
|
+
"items-per-page": f.itemsPerPage,
|
|
43
|
+
"sibling-count": f.siblingCount,
|
|
44
|
+
"show-edges": f.showEdges,
|
|
45
|
+
"aria-label": f.label,
|
|
46
|
+
class: p(j.value)
|
|
47
|
+
}, {
|
|
48
|
+
default: b(() => [u(v(S), { class: p(M.value) }, {
|
|
49
|
+
default: b(({ items: o }) => [
|
|
50
|
+
u(v(T), {
|
|
51
|
+
"aria-label": f.prevLabel,
|
|
52
|
+
class: p(P(!1))
|
|
53
|
+
}, {
|
|
54
|
+
default: b(() => [g(n.$slots, "prev", {}, () => [u(r, { icon: v(e) }, null, 8, ["icon"])])]),
|
|
55
|
+
_: 3
|
|
56
|
+
}, 8, ["aria-label", "class"]),
|
|
57
|
+
(m(!0), c(a, null, h(o, (e, t) => (m(), c(a, { key: t }, [e.type === "page" ? (m(), s(v(C), {
|
|
58
|
+
key: 0,
|
|
59
|
+
value: e.value,
|
|
60
|
+
class: p(P(e.value === D.value))
|
|
61
|
+
}, {
|
|
62
|
+
default: b(() => [l(_(e.value), 1)]),
|
|
63
|
+
_: 2
|
|
64
|
+
}, 1032, ["value", "class"])) : (m(), s(v(x), {
|
|
65
|
+
key: 1,
|
|
66
|
+
class: p(N.value)
|
|
67
|
+
}, {
|
|
68
|
+
default: b(() => [...i[1] ||= [l(" … ", -1)]]),
|
|
69
|
+
_: 1
|
|
70
|
+
}, 8, ["class"]))], 64))), 128)),
|
|
71
|
+
u(v(w), {
|
|
72
|
+
"aria-label": f.nextLabel,
|
|
73
|
+
class: p(P(!1))
|
|
74
|
+
}, {
|
|
75
|
+
default: b(() => [g(n.$slots, "next", {}, () => [u(r, { icon: v(t) }, null, 8, ["icon"])])]),
|
|
76
|
+
_: 3
|
|
77
|
+
}, 8, ["aria-label", "class"])
|
|
78
|
+
]),
|
|
79
|
+
_: 3
|
|
80
|
+
}, 8, ["class"])]),
|
|
81
|
+
_: 3
|
|
82
|
+
}, 8, [
|
|
83
|
+
"page",
|
|
84
|
+
"total",
|
|
85
|
+
"items-per-page",
|
|
86
|
+
"sibling-count",
|
|
87
|
+
"show-edges",
|
|
88
|
+
"aria-label",
|
|
89
|
+
"class"
|
|
90
|
+
]));
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
//#endregion
|
|
94
|
+
export { D as default };
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { useIryxUiConfig as e } from "../config.js";
|
|
2
|
+
import { progressTheme as t } from "../theme/progress.js";
|
|
3
|
+
import { computed as n, createCommentVNode as r, createElementBlock as i, createTextVNode as a, createVNode as o, defineComponent as s, normalizeClass as c, normalizeStyle as l, openBlock as u, renderSlot as d, toDisplayString as f, unref as p, withCtx as m } from "vue";
|
|
4
|
+
import { ProgressIndicator as h, ProgressRoot as g } from "reka-ui";
|
|
5
|
+
//#region src/components/Progress.vue?vue&type=script&setup=true&lang.ts
|
|
6
|
+
var _ = /*@__PURE__*/ s({
|
|
7
|
+
__name: "Progress",
|
|
8
|
+
props: {
|
|
9
|
+
modelValue: {},
|
|
10
|
+
max: { default: 100 },
|
|
11
|
+
variant: {},
|
|
12
|
+
size: {},
|
|
13
|
+
indeterminate: { type: Boolean },
|
|
14
|
+
label: {},
|
|
15
|
+
showValue: { type: Boolean },
|
|
16
|
+
formatValue: {},
|
|
17
|
+
unstyled: {
|
|
18
|
+
type: Boolean,
|
|
19
|
+
default: void 0
|
|
20
|
+
},
|
|
21
|
+
class: {},
|
|
22
|
+
ui: {}
|
|
23
|
+
},
|
|
24
|
+
setup(s) {
|
|
25
|
+
let _ = s, v = n(() => _.indeterminate || _.modelValue == null), y = n(() => v.value ? null : Math.min(Math.max(_.modelValue ?? 0, 0), _.max)), b = n(() => y.value == null ? 0 : y.value / _.max * 100), x = n(() => {
|
|
26
|
+
if (y.value != null) return _.formatValue ? _.formatValue(y.value, _.max) : `${Math.round(b.value)}%`;
|
|
27
|
+
}), S = n(() => !!(_.label || _.showValue && x.value)), C = e(), w = n(() => _.unstyled ?? C.unstyled), T = n(() => t({
|
|
28
|
+
variant: _.variant,
|
|
29
|
+
size: _.size,
|
|
30
|
+
indeterminate: v.value
|
|
31
|
+
})), E = n(() => w.value ? [_.ui?.root, _.class] : T.value.root({ class: [_.ui?.root, _.class] })), D = n(() => w.value ? _.ui?.header : T.value.header({ class: _.ui?.header })), O = n(() => w.value ? _.ui?.label : T.value.label({ class: _.ui?.label })), k = n(() => w.value ? _.ui?.value : T.value.value({ class: _.ui?.value })), A = n(() => w.value ? _.ui?.track : T.value.track({ class: _.ui?.track })), j = n(() => w.value ? _.ui?.indicator : T.value.indicator({ class: _.ui?.indicator })), M = n(() => v.value ? void 0 : { transform: `translateX(-${100 - b.value}%)` });
|
|
32
|
+
return (e, t) => (u(), i("div", { class: c(E.value) }, [S.value ? (u(), i("div", {
|
|
33
|
+
key: 0,
|
|
34
|
+
class: c(D.value)
|
|
35
|
+
}, [_.label || e.$slots.label ? (u(), i("span", {
|
|
36
|
+
key: 0,
|
|
37
|
+
class: c(O.value)
|
|
38
|
+
}, [d(e.$slots, "label", {}, () => [a(f(_.label), 1)])], 2)) : r("", !0), _.showValue && x.value ? (u(), i("span", {
|
|
39
|
+
key: 1,
|
|
40
|
+
class: c(k.value)
|
|
41
|
+
}, [d(e.$slots, "value", {
|
|
42
|
+
value: y.value,
|
|
43
|
+
percent: b.value,
|
|
44
|
+
formatted: x.value
|
|
45
|
+
}, () => [a(f(x.value), 1)])], 2)) : r("", !0)], 2)) : r("", !0), o(p(g), {
|
|
46
|
+
"model-value": y.value,
|
|
47
|
+
max: _.max,
|
|
48
|
+
"get-value-label": () => x.value ?? "",
|
|
49
|
+
class: c(A.value)
|
|
50
|
+
}, {
|
|
51
|
+
default: m(() => [o(p(h), {
|
|
52
|
+
class: c(j.value),
|
|
53
|
+
style: l(M.value)
|
|
54
|
+
}, null, 8, ["class", "style"])]),
|
|
55
|
+
_: 1
|
|
56
|
+
}, 8, [
|
|
57
|
+
"model-value",
|
|
58
|
+
"max",
|
|
59
|
+
"get-value-label",
|
|
60
|
+
"class"
|
|
61
|
+
])], 2));
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
//#endregion
|
|
65
|
+
export { _ as default };
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { ArrowDown01Icon as e, Tick02Icon as t } 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 n } from "../config.js";
|
|
3
|
+
import r from "./Icon.js";
|
|
4
|
+
import { selectTheme as i } from "../theme/select.js";
|
|
5
|
+
import { Fragment as a, computed as o, createBlock as s, createElementBlock as c, createTextVNode as l, createVNode as u, defineComponent as d, guardReactiveProps as f, normalizeClass as p, normalizeProps as m, openBlock as h, renderList as g, renderSlot as _, toDisplayString as v, unref as y, withCtx as b } from "vue";
|
|
6
|
+
import { SelectContent as x, SelectIcon as S, SelectItem as C, SelectItemIndicator as w, SelectItemText as T, SelectPortal as E, SelectRoot as D, SelectTrigger as O, SelectValue as k, SelectViewport as A, useForwardPropsEmits as j } from "reka-ui";
|
|
7
|
+
//#region src/components/Select.vue?vue&type=script&setup=true&lang.ts
|
|
8
|
+
var M = /*@__PURE__*/ d({
|
|
9
|
+
__name: "Select",
|
|
10
|
+
props: {
|
|
11
|
+
items: {},
|
|
12
|
+
placeholder: {},
|
|
13
|
+
size: {},
|
|
14
|
+
unstyled: {
|
|
15
|
+
type: Boolean,
|
|
16
|
+
default: void 0
|
|
17
|
+
},
|
|
18
|
+
class: {},
|
|
19
|
+
ui: {},
|
|
20
|
+
open: { type: Boolean },
|
|
21
|
+
defaultOpen: { type: Boolean },
|
|
22
|
+
defaultValue: {},
|
|
23
|
+
modelValue: {},
|
|
24
|
+
by: {},
|
|
25
|
+
dir: {},
|
|
26
|
+
multiple: { type: Boolean },
|
|
27
|
+
autocomplete: {},
|
|
28
|
+
disabled: { type: Boolean },
|
|
29
|
+
name: {},
|
|
30
|
+
required: { type: Boolean }
|
|
31
|
+
},
|
|
32
|
+
emits: ["update:modelValue", "update:open"],
|
|
33
|
+
setup(d, { emit: M }) {
|
|
34
|
+
let N = d, P = M, F = j(o(() => {
|
|
35
|
+
let { items: e, placeholder: t, size: n, unstyled: r, class: i, ui: a, ...o } = N;
|
|
36
|
+
return o;
|
|
37
|
+
}), P), I = o(() => (N.items ?? []).map((e) => typeof e == "string" ? {
|
|
38
|
+
label: e,
|
|
39
|
+
value: e
|
|
40
|
+
} : e)), L = n(), R = o(() => N.unstyled ?? L.unstyled), z = o(() => i({ size: N.size })), B = o(() => R.value ? [N.ui?.trigger, N.class] : z.value.trigger({ class: [N.ui?.trigger, N.class] })), V = o(() => R.value ? N.ui?.content : z.value.content({ class: N.ui?.content })), H = o(() => R.value ? N.ui?.viewport : z.value.viewport({ class: N.ui?.viewport })), U = o(() => R.value ? N.ui?.item : z.value.item({ class: N.ui?.item })), W = o(() => R.value ? void 0 : z.value.itemIndicator());
|
|
41
|
+
return (n, i) => (h(), s(y(D), m(f(y(F))), {
|
|
42
|
+
default: b(() => [u(y(O), { class: p(B.value) }, {
|
|
43
|
+
default: b(() => [u(y(k), { placeholder: N.placeholder }, null, 8, ["placeholder"]), u(y(S), { "as-child": "" }, {
|
|
44
|
+
default: b(() => [u(r, { icon: y(e) }, null, 8, ["icon"])]),
|
|
45
|
+
_: 1
|
|
46
|
+
})]),
|
|
47
|
+
_: 1
|
|
48
|
+
}, 8, ["class"]), u(y(E), null, {
|
|
49
|
+
default: b(() => [u(y(x), {
|
|
50
|
+
class: p(V.value),
|
|
51
|
+
position: "popper",
|
|
52
|
+
"side-offset": 4
|
|
53
|
+
}, {
|
|
54
|
+
default: b(() => [u(y(A), { class: p(H.value) }, {
|
|
55
|
+
default: b(() => [_(n.$slots, "default", {}, () => [(h(!0), c(a, null, g(I.value, (e) => (h(), s(y(C), {
|
|
56
|
+
key: e.value,
|
|
57
|
+
value: e.value,
|
|
58
|
+
disabled: e.disabled,
|
|
59
|
+
class: p(U.value)
|
|
60
|
+
}, {
|
|
61
|
+
default: b(() => [u(y(w), { class: p(W.value) }, {
|
|
62
|
+
default: b(() => [u(r, { icon: y(t) }, null, 8, ["icon"])]),
|
|
63
|
+
_: 1
|
|
64
|
+
}, 8, ["class"]), u(y(T), null, {
|
|
65
|
+
default: b(() => [l(v(e.label), 1)]),
|
|
66
|
+
_: 2
|
|
67
|
+
}, 1024)]),
|
|
68
|
+
_: 2
|
|
69
|
+
}, 1032, [
|
|
70
|
+
"value",
|
|
71
|
+
"disabled",
|
|
72
|
+
"class"
|
|
73
|
+
]))), 128))])]),
|
|
74
|
+
_: 3
|
|
75
|
+
}, 8, ["class"])]),
|
|
76
|
+
_: 3
|
|
77
|
+
}, 8, ["class"])]),
|
|
78
|
+
_: 3
|
|
79
|
+
})]),
|
|
80
|
+
_: 3
|
|
81
|
+
}, 16));
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
//#endregion
|
|
85
|
+
export { M as default };
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { useIryxUiConfig as e } from "../config.js";
|
|
2
|
+
import { separatorTheme as t } from "../theme/separator.js";
|
|
3
|
+
import { computed as n, createBlock as r, createElementBlock as i, createElementVNode as a, createTextVNode as o, createVNode as s, defineComponent as c, normalizeClass as l, openBlock as u, renderSlot as d, toDisplayString as f, unref as p, useSlots as m } from "vue";
|
|
4
|
+
import { Separator as h } from "reka-ui";
|
|
5
|
+
//#region src/components/Separator.vue?vue&type=script&setup=true&lang.ts
|
|
6
|
+
var g = /*@__PURE__*/ c({
|
|
7
|
+
__name: "Separator",
|
|
8
|
+
props: {
|
|
9
|
+
orientation: { default: "horizontal" },
|
|
10
|
+
label: {},
|
|
11
|
+
decorative: {
|
|
12
|
+
type: Boolean,
|
|
13
|
+
default: !0
|
|
14
|
+
},
|
|
15
|
+
unstyled: {
|
|
16
|
+
type: Boolean,
|
|
17
|
+
default: void 0
|
|
18
|
+
},
|
|
19
|
+
class: {},
|
|
20
|
+
ui: {}
|
|
21
|
+
},
|
|
22
|
+
setup(c) {
|
|
23
|
+
let g = c, _ = m(), v = n(() => !!(g.label || _.default)), y = e(), b = n(() => g.unstyled ?? y.unstyled), x = n(() => t({ orientation: g.orientation })), S = n(() => b.value ? [g.ui?.root, g.class] : x.value.root({ class: [g.ui?.root, g.class] })), C = n(() => b.value ? g.ui?.line : x.value.line({ class: g.ui?.line })), w = n(() => b.value ? g.ui?.label : x.value.label({ class: g.ui?.label }));
|
|
24
|
+
return (e, t) => v.value ? (u(), i("div", {
|
|
25
|
+
key: 0,
|
|
26
|
+
class: l(S.value)
|
|
27
|
+
}, [
|
|
28
|
+
s(p(h), {
|
|
29
|
+
orientation: g.orientation,
|
|
30
|
+
decorative: g.decorative,
|
|
31
|
+
class: l(C.value)
|
|
32
|
+
}, null, 8, [
|
|
33
|
+
"orientation",
|
|
34
|
+
"decorative",
|
|
35
|
+
"class"
|
|
36
|
+
]),
|
|
37
|
+
a("span", { class: l(w.value) }, [d(e.$slots, "default", {}, () => [o(f(g.label), 1)])], 2),
|
|
38
|
+
s(p(h), {
|
|
39
|
+
orientation: g.orientation,
|
|
40
|
+
decorative: "",
|
|
41
|
+
class: l(C.value)
|
|
42
|
+
}, null, 8, ["orientation", "class"])
|
|
43
|
+
], 2)) : (u(), r(p(h), {
|
|
44
|
+
key: 1,
|
|
45
|
+
orientation: g.orientation,
|
|
46
|
+
decorative: g.decorative,
|
|
47
|
+
class: l(b.value ? [g.ui?.line, g.class] : x.value.line({ class: [g.ui?.line, g.class] }))
|
|
48
|
+
}, null, 8, [
|
|
49
|
+
"orientation",
|
|
50
|
+
"decorative",
|
|
51
|
+
"class"
|
|
52
|
+
]));
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
//#endregion
|
|
56
|
+
export { g as default };
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { useIryxUiConfig as e } from "../config.js";
|
|
2
|
+
import { skeletonTheme as t } from "../theme/skeleton.js";
|
|
3
|
+
import { Fragment as n, computed as r, createBlock as i, createElementBlock as a, defineComponent as o, normalizeClass as s, openBlock as c, renderList as l, unref as u } from "vue";
|
|
4
|
+
import { Primitive as d } from "reka-ui";
|
|
5
|
+
//#region src/components/Skeleton.vue?vue&type=script&setup=true&lang.ts
|
|
6
|
+
var f = ["aria-label"], p = /*@__PURE__*/ o({
|
|
7
|
+
__name: "Skeleton",
|
|
8
|
+
props: {
|
|
9
|
+
as: { default: "div" },
|
|
10
|
+
variant: {},
|
|
11
|
+
lines: { default: 1 },
|
|
12
|
+
label: { default: "Loading" },
|
|
13
|
+
unstyled: {
|
|
14
|
+
type: Boolean,
|
|
15
|
+
default: void 0
|
|
16
|
+
},
|
|
17
|
+
class: {}
|
|
18
|
+
},
|
|
19
|
+
setup(o) {
|
|
20
|
+
let p = o, m = e(), h = r(() => p.unstyled ?? m.unstyled), g = r(() => h.value ? p.class : t({
|
|
21
|
+
variant: p.variant,
|
|
22
|
+
class: p.class
|
|
23
|
+
})), _ = r(() => Math.max(1, p.lines));
|
|
24
|
+
return (e, t) => _.value > 1 ? (c(), a("div", {
|
|
25
|
+
key: 0,
|
|
26
|
+
role: "status",
|
|
27
|
+
"aria-label": p.label,
|
|
28
|
+
class: "flex w-full flex-col gap-2"
|
|
29
|
+
}, [(c(!0), a(n, null, l(_.value, (e) => (c(), i(u(d), {
|
|
30
|
+
key: e,
|
|
31
|
+
as: p.as,
|
|
32
|
+
class: s(g.value),
|
|
33
|
+
"aria-hidden": "true"
|
|
34
|
+
}, null, 8, ["as", "class"]))), 128))], 8, f)) : (c(), i(u(d), {
|
|
35
|
+
key: 1,
|
|
36
|
+
as: p.as,
|
|
37
|
+
role: "status",
|
|
38
|
+
"aria-label": p.label,
|
|
39
|
+
class: s(g.value)
|
|
40
|
+
}, null, 8, [
|
|
41
|
+
"as",
|
|
42
|
+
"aria-label",
|
|
43
|
+
"class"
|
|
44
|
+
]));
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
//#endregion
|
|
48
|
+
export { p as default };
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { ArrowDown01Icon as e, ArrowRight01Icon as t, ArrowUp01Icon as n } 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 r } from "../config.js";
|
|
3
|
+
import i from "./Icon.js";
|
|
4
|
+
import { statTheme as a } from "../theme/stat.js";
|
|
5
|
+
import { computed as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createTextVNode as d, createVNode as f, defineComponent as p, normalizeClass as m, openBlock as h, renderSlot as g, toDisplayString as _, unref as v, withCtx as y } from "vue";
|
|
6
|
+
import { Primitive as b } from "reka-ui";
|
|
7
|
+
//#region src/components/Stat.vue?vue&type=script&setup=true&lang.ts
|
|
8
|
+
var x = /*@__PURE__*/ p({
|
|
9
|
+
__name: "Stat",
|
|
10
|
+
props: {
|
|
11
|
+
as: { default: "div" },
|
|
12
|
+
label: {},
|
|
13
|
+
value: {},
|
|
14
|
+
delta: {},
|
|
15
|
+
trend: {},
|
|
16
|
+
hint: {},
|
|
17
|
+
size: {},
|
|
18
|
+
formatDelta: {},
|
|
19
|
+
unstyled: {
|
|
20
|
+
type: Boolean,
|
|
21
|
+
default: void 0
|
|
22
|
+
},
|
|
23
|
+
class: {},
|
|
24
|
+
ui: {}
|
|
25
|
+
},
|
|
26
|
+
setup(p) {
|
|
27
|
+
let x = p, S = o(() => x.trend ? x.trend : x.delta == null || x.delta === 0 ? "neutral" : x.delta > 0 ? "up" : "down"), C = o(() => ({
|
|
28
|
+
up: n,
|
|
29
|
+
down: e,
|
|
30
|
+
neutral: t
|
|
31
|
+
})[S.value]), w = o(() => {
|
|
32
|
+
if (x.delta != null) return x.formatDelta ? x.formatDelta(x.delta) : `${x.delta > 0 ? "+" : ""}${x.delta}%`;
|
|
33
|
+
}), T = r(), E = o(() => x.unstyled ?? T.unstyled), D = o(() => a({
|
|
34
|
+
size: x.size,
|
|
35
|
+
trend: S.value
|
|
36
|
+
})), O = o(() => E.value ? [x.ui?.root, x.class] : D.value.root({ class: [x.ui?.root, x.class] })), k = o(() => E.value ? x.ui?.label : D.value.label({ class: x.ui?.label })), A = o(() => E.value ? x.ui?.value : D.value.value({ class: x.ui?.value })), j = o(() => E.value ? x.ui?.delta : D.value.delta({ class: x.ui?.delta })), M = o(() => E.value ? x.ui?.hint : D.value.hint({ class: x.ui?.hint })), N = o(() => E.value ? x.ui?.row : D.value.row({ class: x.ui?.row }));
|
|
37
|
+
return (e, t) => (h(), s(v(b), {
|
|
38
|
+
as: x.as,
|
|
39
|
+
class: m(O.value)
|
|
40
|
+
}, {
|
|
41
|
+
default: y(() => [
|
|
42
|
+
x.label || e.$slots.label ? (h(), l("span", {
|
|
43
|
+
key: 0,
|
|
44
|
+
class: m(k.value)
|
|
45
|
+
}, [g(e.$slots, "label", {}, () => [d(_(x.label), 1)])], 2)) : c("", !0),
|
|
46
|
+
u("span", { class: m(N.value) }, [u("span", { class: m(A.value) }, [g(e.$slots, "default", {}, () => [d(_(x.value), 1)])], 2), w.value || e.$slots.delta ? (h(), l("span", {
|
|
47
|
+
key: 0,
|
|
48
|
+
class: m(j.value)
|
|
49
|
+
}, [g(e.$slots, "delta", { trend: S.value }, () => [f(i, {
|
|
50
|
+
icon: C.value,
|
|
51
|
+
"data-icon": "inline-start"
|
|
52
|
+
}, null, 8, ["icon"]), d(" " + _(w.value), 1)])], 2)) : c("", !0)], 2),
|
|
53
|
+
x.hint || e.$slots.hint ? (h(), l("span", {
|
|
54
|
+
key: 1,
|
|
55
|
+
class: m(M.value)
|
|
56
|
+
}, [g(e.$slots, "hint", {}, () => [d(_(x.hint), 1)])], 2)) : c("", !0)
|
|
57
|
+
]),
|
|
58
|
+
_: 3
|
|
59
|
+
}, 8, ["as", "class"]));
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
//#endregion
|
|
63
|
+
export { x as default };
|