iryx-ui 0.10.2 → 0.12.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 +593 -496
- package/dist/component-names.d.ts +1 -1
- package/dist/component-names.js +1 -1
- package/dist/components/Alert.vue_vue_type_script_setup_true_lang.js +42 -42
- package/dist/components/Banner.vue_vue_type_script_setup_true_lang.js +40 -40
- package/dist/components/BarChart.vue.d.ts +13 -0
- package/dist/components/BarChart.vue_vue_type_script_setup_true_lang.js +174 -132
- package/dist/components/Breadcrumb.vue_vue_type_script_setup_true_lang.js +28 -28
- package/dist/components/Button.vue_vue_type_script_setup_true_lang.js +14 -14
- package/dist/components/Checkbox.vue_vue_type_script_setup_true_lang.js +37 -30
- package/dist/components/Combobox.vue_vue_type_script_setup_true_lang.js +62 -60
- package/dist/components/DatePicker.vue_vue_type_script_setup_true_lang.js +65 -65
- package/dist/components/DateRangePicker.vue_vue_type_script_setup_true_lang.js +74 -74
- package/dist/components/Dialog.vue_vue_type_script_setup_true_lang.js +34 -34
- package/dist/components/Drawer.js +5 -0
- package/dist/components/Drawer.vue.d.ts +94 -0
- package/dist/components/Drawer.vue_vue_type_script_setup_true_lang.js +144 -0
- package/dist/components/DropdownMenuItems.vue_vue_type_script_setup_true_lang.js +42 -42
- package/dist/components/FileUpload.vue_vue_type_script_setup_true_lang.js +77 -77
- package/dist/components/Icon.vue_vue_type_script_setup_true_lang.js +11 -11
- package/dist/components/Input.vue_vue_type_script_setup_true_lang.js +33 -33
- package/dist/components/NumberInput.vue_vue_type_script_setup_true_lang.js +68 -66
- package/dist/components/Pagination.vue.d.ts +1 -1
- package/dist/components/Pagination.vue_vue_type_script_setup_true_lang.js +37 -37
- package/dist/components/PasswordInput.vue_vue_type_script_setup_true_lang.js +37 -37
- package/dist/components/Progress.vue_vue_type_script_setup_true_lang.js +34 -31
- package/dist/components/Select.vue_vue_type_script_setup_true_lang.js +47 -45
- package/dist/components/Stat.vue_vue_type_script_setup_true_lang.js +27 -27
- package/dist/components/Stepper.vue_vue_type_script_setup_true_lang.js +38 -38
- package/dist/components/Switch.vue_vue_type_script_setup_true_lang.js +9 -2
- package/dist/components/Table.vue_vue_type_script_setup_true_lang.js +87 -87
- package/dist/components/Toaster.vue_vue_type_script_setup_true_lang.js +41 -41
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +54 -52
- package/dist/composables/date.js +12 -15
- package/dist/index.d.ts +1 -0
- package/dist/index.js +55 -54
- package/dist/theme/drawer.d.ts +110 -0
- package/dist/theme/drawer.js +100 -0
- package/dist/theme/index.d.ts +1 -0
- package/package.json +3 -2
- package/theme.css +114 -0
- package/dist/node_modules/.pnpm/@hugeicons_core-free-icons@4.2.3/node_modules/@hugeicons/core-free-icons/dist/esm/index.js +0 -377
- 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 +0 -8
- 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 +0 -25
- 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 +0 -63
- package/dist/node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/CalendarDate.js +0 -122
- package/dist/node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/DateFormatter.js +0 -84
- package/dist/node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/calendars/GregorianCalendar.js +0 -91
- package/dist/node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/conversion.js +0 -107
- package/dist/node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/manipulation.js +0 -159
- package/dist/node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/queries.js +0 -29
- package/dist/node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/string.js +0 -37
- package/dist/node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/utils.js +0 -6
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
1
|
+
import { useIryxUiConfig as e } from "../config.js";
|
|
2
|
+
import t from "./Icon.js";
|
|
3
|
+
import { useFormField as n } from "../composables/form.js";
|
|
4
|
+
import { addDecimals as r, clampDecimal as i, compareDecimals as a, formatForLocale as o, isDecimal as s, parseFromLocale as c, roundDecimal as l, toEditable as u } from "../composables/decimal.js";
|
|
5
|
+
import { numberInputTheme as d } from "../theme/number-input.js";
|
|
6
|
+
import { computed as f, createCommentVNode as p, createElementBlock as m, createElementVNode as h, createVNode as g, defineComponent as _, mergeModels as v, mergeProps as y, normalizeClass as b, openBlock as x, ref as S, unref as C, useModel as w, vModelText as T, watch as E, withDirectives as D, withKeys as O, withModifiers as k } from "vue";
|
|
7
|
+
import { ArrowDown01Icon as A, ArrowUp01Icon as j } from "@hugeicons/core-free-icons";
|
|
8
8
|
//#region src/components/NumberInput.vue?vue&type=script&setup=true&lang.ts
|
|
9
|
-
var
|
|
9
|
+
var M = [
|
|
10
10
|
"id",
|
|
11
11
|
"aria-valuenow",
|
|
12
12
|
"aria-valuemin",
|
|
@@ -16,9 +16,10 @@ var j = [
|
|
|
16
16
|
"required",
|
|
17
17
|
"aria-invalid",
|
|
18
18
|
"aria-describedby"
|
|
19
|
-
],
|
|
19
|
+
], N = ["aria-label", "disabled"], P = ["aria-label", "disabled"], F = /*@__PURE__*/ _({
|
|
20
|
+
inheritAttrs: !1,
|
|
20
21
|
__name: "NumberInput",
|
|
21
|
-
props: /*@__PURE__*/
|
|
22
|
+
props: /*@__PURE__*/ v({
|
|
22
23
|
min: {},
|
|
23
24
|
max: {},
|
|
24
25
|
step: { default: "1" },
|
|
@@ -50,87 +51,88 @@ var j = [
|
|
|
50
51
|
modelModifiers: {}
|
|
51
52
|
}),
|
|
52
53
|
emits: ["update:modelValue"],
|
|
53
|
-
setup(
|
|
54
|
-
let
|
|
55
|
-
function
|
|
56
|
-
return e ?
|
|
54
|
+
setup(_) {
|
|
55
|
+
let v = _, F = w(_, "modelValue"), I = n(), L = f(() => v.id ?? I?.id.value), R = f(() => v.invalid ?? I?.invalid.value ?? !1), z = e(), B = f(() => v.unstyled ?? z.unstyled), V = S(""), H = S(!1);
|
|
56
|
+
function U(e) {
|
|
57
|
+
return e ? v.locale ? o(e, v.locale, v.precision) : v.precision == null ? e : l(e, v.precision) ?? e : "";
|
|
57
58
|
}
|
|
58
|
-
|
|
59
|
-
|
|
59
|
+
E(() => F.value, (e) => {
|
|
60
|
+
H.value || (V.value = U(e));
|
|
60
61
|
}, { immediate: !0 });
|
|
61
|
-
function
|
|
62
|
+
function W(e) {
|
|
62
63
|
let t = e.trim();
|
|
63
64
|
if (!t) {
|
|
64
|
-
|
|
65
|
+
F.value = "", V.value = "";
|
|
65
66
|
return;
|
|
66
67
|
}
|
|
67
|
-
let n =
|
|
68
|
+
let n = v.locale ? c(t, v.locale) : s(t) ? t : void 0;
|
|
68
69
|
if (n == null) {
|
|
69
|
-
|
|
70
|
+
V.value = U(F.value);
|
|
70
71
|
return;
|
|
71
72
|
}
|
|
72
|
-
let r =
|
|
73
|
-
|
|
74
|
-
}
|
|
75
|
-
function W() {
|
|
76
|
-
V.value = !0, B.value = f(P.value, b.locale);
|
|
73
|
+
let r = i(n, v.min, v.max), a = v.precision == null ? r : l(r, v.precision) ?? r;
|
|
74
|
+
F.value = a, V.value = U(a);
|
|
77
75
|
}
|
|
78
76
|
function G() {
|
|
79
|
-
|
|
77
|
+
H.value = !0, V.value = u(F.value, v.locale);
|
|
78
|
+
}
|
|
79
|
+
function K() {
|
|
80
|
+
H.value = !1, W(V.value);
|
|
80
81
|
}
|
|
81
|
-
function
|
|
82
|
-
let t =
|
|
82
|
+
function q(e) {
|
|
83
|
+
let t = r(F.value || "0", e === 1 ? v.step : `-${v.step}`);
|
|
83
84
|
if (t == null) return;
|
|
84
|
-
let n =
|
|
85
|
-
|
|
85
|
+
let n = i(t, v.min, v.max), a = v.precision == null ? n : l(n, v.precision) ?? n;
|
|
86
|
+
F.value = a, V.value = H.value ? u(a, v.locale) : U(a);
|
|
86
87
|
}
|
|
87
|
-
let
|
|
88
|
-
size:
|
|
89
|
-
invalid:
|
|
90
|
-
withStepper:
|
|
88
|
+
let J = f(() => v.min != null && F.value !== "" && a(F.value, v.min) <= 0), Y = f(() => v.max != null && F.value !== "" && a(F.value, v.max) >= 0), X = f(() => d({
|
|
89
|
+
size: v.size,
|
|
90
|
+
invalid: R.value,
|
|
91
|
+
withStepper: v.stepper
|
|
91
92
|
}));
|
|
92
|
-
function
|
|
93
|
-
let n =
|
|
94
|
-
return
|
|
93
|
+
function Z(e, t) {
|
|
94
|
+
let n = v.ui?.[e];
|
|
95
|
+
return B.value ? [n, t] : X.value[e]({ class: [n, t] });
|
|
95
96
|
}
|
|
96
|
-
return (
|
|
97
|
-
id:
|
|
98
|
-
"onUpdate:modelValue":
|
|
97
|
+
return (e, n) => (x(), m("div", { class: b(Z("root")) }, [D(h("input", y({
|
|
98
|
+
id: L.value,
|
|
99
|
+
"onUpdate:modelValue": n[0] ||= (e) => V.value = e
|
|
100
|
+
}, e.$attrs, {
|
|
99
101
|
type: "text",
|
|
100
102
|
inputmode: "decimal",
|
|
101
103
|
autocomplete: "off",
|
|
102
104
|
role: "spinbutton",
|
|
103
|
-
"aria-valuenow":
|
|
104
|
-
"aria-valuemin":
|
|
105
|
-
"aria-valuemax":
|
|
106
|
-
placeholder:
|
|
107
|
-
disabled:
|
|
108
|
-
required:
|
|
109
|
-
"aria-invalid":
|
|
110
|
-
"aria-describedby":
|
|
111
|
-
class:
|
|
112
|
-
onFocus:
|
|
113
|
-
onBlur:
|
|
114
|
-
onKeydown: [
|
|
115
|
-
}, null,
|
|
105
|
+
"aria-valuenow": F.value || void 0,
|
|
106
|
+
"aria-valuemin": v.min,
|
|
107
|
+
"aria-valuemax": v.max,
|
|
108
|
+
placeholder: v.placeholder,
|
|
109
|
+
disabled: v.disabled,
|
|
110
|
+
required: v.required,
|
|
111
|
+
"aria-invalid": R.value || void 0,
|
|
112
|
+
"aria-describedby": C(I)?.describedBy.value,
|
|
113
|
+
class: B.value ? [v.ui?.input, v.class] : X.value.input({ class: [v.ui?.input, v.class] }),
|
|
114
|
+
onFocus: G,
|
|
115
|
+
onBlur: K,
|
|
116
|
+
onKeydown: [n[1] ||= O(k((e) => q(1), ["prevent"]), ["up"]), n[2] ||= O(k((e) => q(-1), ["prevent"]), ["down"])]
|
|
117
|
+
}), null, 16, M), [[T, V.value]]), v.stepper ? (x(), m("div", {
|
|
116
118
|
key: 0,
|
|
117
|
-
class:
|
|
118
|
-
}, [
|
|
119
|
+
class: b(Z("stepper"))
|
|
120
|
+
}, [h("button", {
|
|
119
121
|
type: "button",
|
|
120
122
|
tabindex: "-1",
|
|
121
|
-
"aria-label":
|
|
122
|
-
disabled:
|
|
123
|
-
class:
|
|
124
|
-
onClick:
|
|
125
|
-
}, [
|
|
123
|
+
"aria-label": v.incrementLabel,
|
|
124
|
+
disabled: v.disabled || Y.value,
|
|
125
|
+
class: b(Z("step")),
|
|
126
|
+
onClick: n[3] ||= (e) => q(1)
|
|
127
|
+
}, [g(t, { icon: C(j) }, null, 8, ["icon"])], 10, N), h("button", {
|
|
126
128
|
type: "button",
|
|
127
129
|
tabindex: "-1",
|
|
128
|
-
"aria-label":
|
|
129
|
-
disabled:
|
|
130
|
-
class:
|
|
131
|
-
onClick:
|
|
132
|
-
}, [
|
|
130
|
+
"aria-label": v.decrementLabel,
|
|
131
|
+
disabled: v.disabled || J.value,
|
|
132
|
+
class: b(Z("step")),
|
|
133
|
+
onClick: n[4] ||= (e) => q(-1)
|
|
134
|
+
}, [g(t, { icon: C(A) }, null, 8, ["icon"])], 10, P)], 2)) : p("", !0)], 2));
|
|
133
135
|
}
|
|
134
136
|
});
|
|
135
137
|
//#endregion
|
|
136
|
-
export {
|
|
138
|
+
export { F as default };
|
|
@@ -42,8 +42,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
|
|
|
42
42
|
}>, {
|
|
43
43
|
unstyled: boolean;
|
|
44
44
|
label: string;
|
|
45
|
-
nextLabel: string;
|
|
46
45
|
total: number;
|
|
46
|
+
nextLabel: string;
|
|
47
47
|
itemsPerPage: number;
|
|
48
48
|
siblingCount: number;
|
|
49
49
|
showEdges: boolean;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { useIryxUiConfig as e } from "../config.js";
|
|
2
|
+
import t from "./Icon.js";
|
|
3
|
+
import { paginationTheme as n } from "../theme/pagination.js";
|
|
4
|
+
import { Fragment as r, computed as i, createBlock as a, createElementBlock as o, createTextVNode as s, createVNode as c, defineComponent as l, mergeModels as u, normalizeClass as d, openBlock as f, renderList as p, renderSlot as m, toDisplayString as h, unref as g, useModel as _, withCtx as v } from "vue";
|
|
5
|
+
import { ArrowLeft01Icon as y, ArrowRight01Icon as b } from "@hugeicons/core-free-icons";
|
|
6
6
|
import { PaginationEllipsis as x, PaginationList as S, PaginationListItem as C, PaginationNext as w, PaginationPrev as T, PaginationRoot as E } from "reka-ui";
|
|
7
7
|
//#region src/components/Pagination.vue?vue&type=script&setup=true&lang.ts
|
|
8
|
-
var D = /*@__PURE__*/
|
|
8
|
+
var D = /*@__PURE__*/ l({
|
|
9
9
|
__name: "Pagination",
|
|
10
|
-
props: /*@__PURE__*/
|
|
10
|
+
props: /*@__PURE__*/ u({
|
|
11
11
|
total: { default: 0 },
|
|
12
12
|
itemsPerPage: { default: 10 },
|
|
13
13
|
siblingCount: { default: 1 },
|
|
@@ -31,52 +31,52 @@ var D = /*@__PURE__*/ d({
|
|
|
31
31
|
pageModifiers: {}
|
|
32
32
|
}),
|
|
33
33
|
emits: ["update:page"],
|
|
34
|
-
setup(
|
|
35
|
-
let
|
|
36
|
-
size:
|
|
37
|
-
align:
|
|
38
|
-
})), j =
|
|
34
|
+
setup(l) {
|
|
35
|
+
let u = l, D = _(l, "page"), O = e(), k = i(() => u.unstyled ?? O.unstyled), A = i(() => n({
|
|
36
|
+
size: u.size,
|
|
37
|
+
align: u.align
|
|
38
|
+
})), j = i(() => k.value ? [u.ui?.root, u.class] : A.value.root({ class: [u.ui?.root, u.class] })), M = i(() => k.value ? u.ui?.list : A.value.list({ class: u.ui?.list })), N = i(() => k.value ? u.ui?.ellipsis : A.value.ellipsis({ class: u.ui?.ellipsis }));
|
|
39
39
|
function P(e) {
|
|
40
|
-
return k.value ?
|
|
40
|
+
return k.value ? u.ui?.item : [A.value.item({ class: u.ui?.item }), e ? A.value.active() : A.value.inactive()];
|
|
41
41
|
}
|
|
42
|
-
return (
|
|
42
|
+
return (e, n) => (f(), a(g(E), {
|
|
43
43
|
page: D.value,
|
|
44
|
-
"onUpdate:page":
|
|
45
|
-
total:
|
|
46
|
-
"items-per-page":
|
|
47
|
-
"sibling-count":
|
|
48
|
-
"show-edges":
|
|
49
|
-
"aria-label":
|
|
50
|
-
class:
|
|
44
|
+
"onUpdate:page": n[0] ||= (e) => D.value = e,
|
|
45
|
+
total: u.total,
|
|
46
|
+
"items-per-page": u.itemsPerPage,
|
|
47
|
+
"sibling-count": u.siblingCount,
|
|
48
|
+
"show-edges": u.showEdges,
|
|
49
|
+
"aria-label": u.label,
|
|
50
|
+
class: d(j.value)
|
|
51
51
|
}, {
|
|
52
|
-
default:
|
|
53
|
-
default:
|
|
54
|
-
|
|
55
|
-
"aria-label":
|
|
56
|
-
class:
|
|
52
|
+
default: v(() => [c(g(S), { class: d(M.value) }, {
|
|
53
|
+
default: v(({ items: i }) => [
|
|
54
|
+
c(g(T), {
|
|
55
|
+
"aria-label": u.prevLabel,
|
|
56
|
+
class: d(P(!1))
|
|
57
57
|
}, {
|
|
58
|
-
default:
|
|
58
|
+
default: v(() => [m(e.$slots, "prev", {}, () => [c(t, { icon: g(y) }, null, 8, ["icon"])])]),
|
|
59
59
|
_: 3
|
|
60
60
|
}, 8, ["aria-label", "class"]),
|
|
61
|
-
(
|
|
61
|
+
(f(!0), o(r, null, p(i, (e, t) => (f(), o(r, { key: t }, [e.type === "page" ? (f(), a(g(C), {
|
|
62
62
|
key: 0,
|
|
63
63
|
value: e.value,
|
|
64
|
-
class:
|
|
64
|
+
class: d(P(e.value === D.value))
|
|
65
65
|
}, {
|
|
66
|
-
default:
|
|
66
|
+
default: v(() => [s(h(e.value), 1)]),
|
|
67
67
|
_: 2
|
|
68
|
-
}, 1032, ["value", "class"])) : (
|
|
68
|
+
}, 1032, ["value", "class"])) : (f(), a(g(x), {
|
|
69
69
|
key: 1,
|
|
70
|
-
class:
|
|
70
|
+
class: d(N.value)
|
|
71
71
|
}, {
|
|
72
|
-
default:
|
|
72
|
+
default: v(() => [...n[1] ||= [s(" … ", -1)]]),
|
|
73
73
|
_: 1
|
|
74
74
|
}, 8, ["class"]))], 64))), 128)),
|
|
75
|
-
|
|
76
|
-
"aria-label":
|
|
77
|
-
class:
|
|
75
|
+
c(g(w), {
|
|
76
|
+
"aria-label": u.nextLabel,
|
|
77
|
+
class: d(P(!1))
|
|
78
78
|
}, {
|
|
79
|
-
default:
|
|
79
|
+
default: v(() => [m(e.$slots, "next", {}, () => [c(t, { icon: g(b) }, null, 8, ["icon"])])]),
|
|
80
80
|
_: 3
|
|
81
81
|
}, 8, ["aria-label", "class"])
|
|
82
82
|
]),
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
import { useIryxUiConfig as e } from "../config.js";
|
|
2
|
+
import t from "./Icon.js";
|
|
3
|
+
import n from "./Input.js";
|
|
4
|
+
import { passwordInputTheme as r } from "../theme/password-input.js";
|
|
5
|
+
import { Fragment as i, computed as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createSlots as l, createVNode as u, defineComponent as d, mergeModels as f, mergeProps as p, normalizeClass as m, openBlock as h, ref as g, renderList as _, toDisplayString as v, unref as y, useModel as b, withCtx as x } from "vue";
|
|
6
|
+
import { ViewIcon as S, ViewOffIcon as C } from "@hugeicons/core-free-icons";
|
|
7
7
|
//#region src/components/PasswordInput.vue?vue&type=script&setup=true&lang.ts
|
|
8
8
|
var w = [
|
|
9
9
|
"aria-label",
|
|
10
10
|
"aria-pressed",
|
|
11
11
|
"disabled"
|
|
12
|
-
], T = ["data-filled"], E = /*@__PURE__*/
|
|
12
|
+
], T = ["data-filled"], E = /*@__PURE__*/ d({
|
|
13
13
|
inheritAttrs: !1,
|
|
14
14
|
__name: "PasswordInput",
|
|
15
|
-
props: /*@__PURE__*/
|
|
15
|
+
props: /*@__PURE__*/ f({
|
|
16
16
|
size: {},
|
|
17
17
|
placeholder: {},
|
|
18
18
|
disabled: { type: Boolean },
|
|
@@ -46,41 +46,41 @@ var w = [
|
|
|
46
46
|
modelModifiers: {}
|
|
47
47
|
}),
|
|
48
48
|
emits: ["update:modelValue"],
|
|
49
|
-
setup(
|
|
50
|
-
let
|
|
49
|
+
setup(d) {
|
|
50
|
+
let f = d, E = b(d, "modelValue"), D = e(), O = a(() => f.unstyled ?? D.unstyled), k = g(!1), A = a(() => {
|
|
51
51
|
let e = E.value;
|
|
52
52
|
if (!e) return 0;
|
|
53
53
|
let t = 0;
|
|
54
54
|
return e.length >= 8 && t++, e.length >= 12 && t++, /[a-z]/.test(e) && /[A-Z]/.test(e) && t++, /\d/.test(e) && t++, /[^\w\s]/.test(e) && t++, Math.max(1, Math.min(t, 4));
|
|
55
|
-
}), j =
|
|
55
|
+
}), j = a(() => f.strength && E.value.length > 0), M = a(() => r({ score: A.value })), N = a(() => O.value ? f.ui?.input : M.value.input({ class: f.ui?.input }));
|
|
56
56
|
function P(e, t) {
|
|
57
|
-
let n =
|
|
57
|
+
let n = f.ui?.[e];
|
|
58
58
|
return O.value ? [n, t] : M.value[e]({ class: [n, t] });
|
|
59
59
|
}
|
|
60
|
-
return (
|
|
61
|
-
id:
|
|
60
|
+
return (e, r) => (h(), s("div", { class: m(P("root", f.class)) }, [u(n, p({
|
|
61
|
+
id: f.id,
|
|
62
62
|
modelValue: E.value,
|
|
63
|
-
"onUpdate:modelValue":
|
|
63
|
+
"onUpdate:modelValue": r[1] ||= (e) => E.value = e,
|
|
64
64
|
type: k.value ? "text" : "password",
|
|
65
|
-
size:
|
|
66
|
-
placeholder:
|
|
67
|
-
disabled:
|
|
68
|
-
required:
|
|
69
|
-
invalid:
|
|
70
|
-
unstyled:
|
|
65
|
+
size: f.size,
|
|
66
|
+
placeholder: f.placeholder,
|
|
67
|
+
disabled: f.disabled,
|
|
68
|
+
required: f.required,
|
|
69
|
+
invalid: f.invalid,
|
|
70
|
+
unstyled: f.unstyled,
|
|
71
71
|
ui: { input: N.value },
|
|
72
72
|
autocomplete: "current-password"
|
|
73
|
-
},
|
|
73
|
+
}, e.$attrs), l({ _: 2 }, [f.toggle ? {
|
|
74
74
|
name: "trailing",
|
|
75
|
-
fn:
|
|
75
|
+
fn: x(() => [c("button", {
|
|
76
76
|
type: "button",
|
|
77
77
|
tabindex: "-1",
|
|
78
|
-
"aria-label": k.value ?
|
|
78
|
+
"aria-label": k.value ? f.hideLabel : f.showLabel,
|
|
79
79
|
"aria-pressed": k.value,
|
|
80
|
-
disabled:
|
|
81
|
-
class:
|
|
82
|
-
onClick:
|
|
83
|
-
}, [
|
|
80
|
+
disabled: f.disabled,
|
|
81
|
+
class: m(P("toggle")),
|
|
82
|
+
onClick: r[0] ||= (e) => k.value = !k.value
|
|
83
|
+
}, [u(t, { icon: k.value ? y(C) : y(S) }, null, 8, ["icon"])], 10, w)]),
|
|
84
84
|
key: "0"
|
|
85
85
|
} : void 0]), 1040, [
|
|
86
86
|
"id",
|
|
@@ -93,20 +93,20 @@ var w = [
|
|
|
93
93
|
"invalid",
|
|
94
94
|
"unstyled",
|
|
95
95
|
"ui"
|
|
96
|
-
]), j.value ? (
|
|
96
|
+
]), j.value ? (h(), s("div", {
|
|
97
97
|
key: 0,
|
|
98
|
-
class:
|
|
99
|
-
}, [
|
|
100
|
-
class:
|
|
98
|
+
class: m(P("meter"))
|
|
99
|
+
}, [c("div", {
|
|
100
|
+
class: m(P("track")),
|
|
101
101
|
"aria-hidden": "true"
|
|
102
|
-
}, [(
|
|
102
|
+
}, [(h(), s(i, null, _(4, (e) => c("span", {
|
|
103
103
|
key: e,
|
|
104
104
|
"data-filled": e <= A.value ? "" : void 0,
|
|
105
|
-
class:
|
|
106
|
-
}, null, 10, T)), 64))], 2),
|
|
107
|
-
class:
|
|
105
|
+
class: m(P("segment"))
|
|
106
|
+
}, null, 10, T)), 64))], 2), c("span", {
|
|
107
|
+
class: m(P("label")),
|
|
108
108
|
role: "status"
|
|
109
|
-
},
|
|
109
|
+
}, v(f.strengthLabels[A.value - 1]), 3)], 2)) : o("", !0)], 2));
|
|
110
110
|
}
|
|
111
111
|
});
|
|
112
112
|
//#endregion
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { useIryxUiConfig as e } from "../config.js";
|
|
2
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,
|
|
4
|
-
import { ProgressIndicator as
|
|
3
|
+
import { computed as n, createCommentVNode as r, createElementBlock as i, createTextVNode as a, createVNode as o, defineComponent as s, mergeProps as c, normalizeClass as l, normalizeStyle as u, openBlock as d, renderSlot as f, toDisplayString as p, unref as m, useSlots as h, withCtx as g } from "vue";
|
|
4
|
+
import { ProgressIndicator as _, ProgressRoot as v, useId as y } from "reka-ui";
|
|
5
5
|
//#region src/components/Progress.vue?vue&type=script&setup=true&lang.ts
|
|
6
|
-
var
|
|
6
|
+
var b = ["id"], x = /*@__PURE__*/ s({
|
|
7
|
+
inheritAttrs: !1,
|
|
7
8
|
__name: "Progress",
|
|
8
9
|
props: {
|
|
9
10
|
modelValue: {},
|
|
@@ -22,44 +23,46 @@ var _ = /*@__PURE__*/ s({
|
|
|
22
23
|
ui: {}
|
|
23
24
|
},
|
|
24
25
|
setup(s) {
|
|
25
|
-
let
|
|
26
|
-
if (
|
|
27
|
-
}),
|
|
28
|
-
variant:
|
|
29
|
-
size:
|
|
30
|
-
indeterminate:
|
|
31
|
-
})),
|
|
32
|
-
return (e, t) => (
|
|
26
|
+
let x = s, S = h(), C = y(), w = n(() => !!(x.label || S.label)), T = n(() => x.indeterminate || x.modelValue == null), E = n(() => T.value ? null : Math.min(Math.max(x.modelValue ?? 0, 0), x.max)), D = n(() => E.value == null ? 0 : E.value / x.max * 100), O = n(() => {
|
|
27
|
+
if (E.value != null) return x.formatValue ? x.formatValue(E.value, x.max) : `${Math.round(D.value)}%`;
|
|
28
|
+
}), k = n(() => !!(x.label || x.showValue && O.value)), A = e(), j = n(() => x.unstyled ?? A.unstyled), M = n(() => t({
|
|
29
|
+
variant: x.variant,
|
|
30
|
+
size: x.size,
|
|
31
|
+
indeterminate: T.value
|
|
32
|
+
})), N = n(() => j.value ? [x.ui?.root, x.class] : M.value.root({ class: [x.ui?.root, x.class] })), P = n(() => j.value ? x.ui?.header : M.value.header({ class: x.ui?.header })), F = n(() => j.value ? x.ui?.label : M.value.label({ class: x.ui?.label })), I = n(() => j.value ? x.ui?.value : M.value.value({ class: x.ui?.value })), L = n(() => j.value ? x.ui?.track : M.value.track({ class: x.ui?.track })), R = n(() => j.value ? x.ui?.indicator : M.value.indicator({ class: x.ui?.indicator })), z = n(() => T.value ? void 0 : { transform: `translateX(-${100 - D.value}%)` });
|
|
33
|
+
return (e, t) => (d(), i("div", { class: l(N.value) }, [k.value ? (d(), i("div", {
|
|
33
34
|
key: 0,
|
|
34
|
-
class:
|
|
35
|
-
}, [
|
|
35
|
+
class: l(P.value)
|
|
36
|
+
}, [w.value ? (d(), i("span", {
|
|
36
37
|
key: 0,
|
|
37
|
-
|
|
38
|
-
|
|
38
|
+
id: m(C),
|
|
39
|
+
class: l(F.value)
|
|
40
|
+
}, [f(e.$slots, "label", {}, () => [a(p(x.label), 1)])], 10, b)) : r("", !0), x.showValue && O.value ? (d(), i("span", {
|
|
39
41
|
key: 1,
|
|
40
|
-
class:
|
|
41
|
-
}, [
|
|
42
|
-
value:
|
|
43
|
-
percent:
|
|
44
|
-
formatted:
|
|
45
|
-
}, () => [a(
|
|
46
|
-
"model-value":
|
|
47
|
-
max:
|
|
48
|
-
"get-value-label": () =>
|
|
49
|
-
|
|
50
|
-
}, {
|
|
51
|
-
default:
|
|
52
|
-
class:
|
|
53
|
-
style:
|
|
42
|
+
class: l(I.value)
|
|
43
|
+
}, [f(e.$slots, "value", {
|
|
44
|
+
value: E.value,
|
|
45
|
+
percent: D.value,
|
|
46
|
+
formatted: O.value
|
|
47
|
+
}, () => [a(p(O.value), 1)])], 2)) : r("", !0)], 2)) : r("", !0), o(m(v), c({
|
|
48
|
+
"model-value": E.value,
|
|
49
|
+
max: x.max,
|
|
50
|
+
"get-value-label": () => O.value ?? "",
|
|
51
|
+
"aria-labelledby": w.value ? m(C) : void 0
|
|
52
|
+
}, e.$attrs, { class: L.value }), {
|
|
53
|
+
default: g(() => [o(m(_), {
|
|
54
|
+
class: l(R.value),
|
|
55
|
+
style: u(z.value)
|
|
54
56
|
}, null, 8, ["class", "style"])]),
|
|
55
57
|
_: 1
|
|
56
|
-
},
|
|
58
|
+
}, 16, [
|
|
57
59
|
"model-value",
|
|
58
60
|
"max",
|
|
59
61
|
"get-value-label",
|
|
62
|
+
"aria-labelledby",
|
|
60
63
|
"class"
|
|
61
64
|
])], 2));
|
|
62
65
|
}
|
|
63
66
|
});
|
|
64
67
|
//#endregion
|
|
65
|
-
export {
|
|
68
|
+
export { x as default };
|