iryx-ui 0.4.0 → 0.6.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 +293 -10
- package/dist/component-names.d.ts +1 -1
- package/dist/components/Alert.vue.d.ts +19 -4
- package/dist/components/App.vue.d.ts +1 -1
- package/dist/components/Badge.vue.d.ts +4 -3
- package/dist/components/Banner.vue.d.ts +81 -0
- package/dist/components/Combobox.vue.d.ts +112 -0
- package/dist/components/Pagination.vue.d.ts +2 -0
- package/dist/components/Select.vue.d.ts +15 -4
- package/dist/components/Table.vue.d.ts +131 -0
- package/dist/components/index.d.ts +3 -0
- package/dist/composables/data-table.d.ts +93 -0
- package/dist/index.d.ts +5 -1
- package/dist/index.js +65 -58
- package/dist/node_modules/.pnpm/@hugeicons_core-free-icons@4.2.3/node_modules/@hugeicons/core-free-icons/dist/esm/index.js +15 -1
- package/dist/nuxt.d.ts +1 -1
- package/dist/packages/iryx-ui/src/component-names.js +1 -1
- package/dist/packages/iryx-ui/src/components/Alert.vue_vue_type_script_setup_true_lang.js +51 -35
- package/dist/packages/iryx-ui/src/components/Badge.vue_vue_type_script_setup_true_lang.js +1 -2
- package/dist/packages/iryx-ui/src/components/Banner.js +5 -0
- package/dist/packages/iryx-ui/src/components/Banner.vue_vue_type_script_setup_true_lang.js +93 -0
- package/dist/packages/iryx-ui/src/components/Combobox.js +5 -0
- package/dist/packages/iryx-ui/src/components/Combobox.vue_vue_type_script_setup_true_lang.js +284 -0
- package/dist/packages/iryx-ui/src/components/Pagination.vue_vue_type_script_setup_true_lang.js +5 -1
- package/dist/packages/iryx-ui/src/components/Select.vue_vue_type_script_setup_true_lang.js +72 -27
- package/dist/packages/iryx-ui/src/components/Table.js +5 -0
- package/dist/packages/iryx-ui/src/components/Table.vue_vue_type_script_setup_true_lang.js +217 -0
- package/dist/packages/iryx-ui/src/components/index.js +62 -56
- package/dist/packages/iryx-ui/src/composables/data-table.js +106 -0
- package/dist/packages/iryx-ui/src/theme/alert.js +10 -21
- package/dist/packages/iryx-ui/src/theme/badge.js +37 -37
- package/dist/packages/iryx-ui/src/theme/banner.js +62 -0
- package/dist/packages/iryx-ui/src/theme/button.js +2 -2
- package/dist/packages/iryx-ui/src/theme/card.js +1 -1
- package/dist/packages/iryx-ui/src/theme/checkbox.js +1 -1
- package/dist/packages/iryx-ui/src/theme/combobox.js +29 -0
- package/dist/packages/iryx-ui/src/theme/dialog.js +2 -2
- package/dist/packages/iryx-ui/src/theme/dropdown-menu.js +4 -4
- package/dist/packages/iryx-ui/src/theme/input.js +1 -1
- package/dist/packages/iryx-ui/src/theme/number-input.js +1 -1
- package/dist/packages/iryx-ui/src/theme/pagination.js +24 -14
- package/dist/packages/iryx-ui/src/theme/presets.js +0 -42
- package/dist/packages/iryx-ui/src/theme/radio-group.js +1 -1
- package/dist/packages/iryx-ui/src/theme/select.js +5 -3
- package/dist/packages/iryx-ui/src/theme/skeleton.js +1 -1
- package/dist/packages/iryx-ui/src/theme/stat.js +4 -4
- package/dist/packages/iryx-ui/src/theme/stepper.js +1 -1
- package/dist/packages/iryx-ui/src/theme/switch.js +1 -1
- package/dist/packages/iryx-ui/src/theme/table.js +62 -0
- package/dist/packages/iryx-ui/src/theme/tabs.js +3 -3
- package/dist/packages/iryx-ui/src/theme/toast.js +11 -26
- package/dist/packages/iryx-ui/src/theme/tooltip.js +1 -1
- package/dist/plugin.d.ts +1 -1
- package/dist/theme/alert.d.ts +6 -12
- package/dist/theme/badge.d.ts +15 -12
- package/dist/theme/banner.d.ts +185 -0
- package/dist/theme/button.d.ts +2 -2
- package/dist/theme/combobox.d.ts +101 -0
- package/dist/theme/index.d.ts +3 -0
- package/dist/theme/input.d.ts +5 -5
- package/dist/theme/pagination.d.ts +33 -0
- package/dist/theme/presets.d.ts +0 -42
- package/dist/theme/select.d.ts +6 -0
- package/dist/theme/stat.d.ts +0 -3
- package/dist/theme/table.d.ts +230 -0
- package/dist/theme/toast.d.ts +0 -15
- package/package.json +1 -1
- package/theme.css +24 -0
|
@@ -9,7 +9,6 @@ var h = /*@__PURE__*/ s({
|
|
|
9
9
|
as: { default: "span" },
|
|
10
10
|
asChild: { type: Boolean },
|
|
11
11
|
variant: {},
|
|
12
|
-
tone: {},
|
|
13
12
|
size: {},
|
|
14
13
|
dot: { type: Boolean },
|
|
15
14
|
label: {},
|
|
@@ -23,7 +22,7 @@ var h = /*@__PURE__*/ s({
|
|
|
23
22
|
setup(s) {
|
|
24
23
|
let h = s, g = e(), _ = n(() => h.unstyled ?? g.unstyled), v = n(() => t({
|
|
25
24
|
variant: h.variant,
|
|
26
|
-
|
|
25
|
+
withDot: h.dot ?? !1,
|
|
27
26
|
size: h.size
|
|
28
27
|
})), y = n(() => _.value ? [h.ui?.root, h.class] : v.value.root({ class: [h.ui?.root, h.class] })), b = n(() => _.value ? h.ui?.dot : v.value.dot({ class: h.ui?.dot }));
|
|
29
28
|
return (e, t) => (l(), r(f(m), {
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { Cancel01Icon 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 { bannerTheme as r } from "../theme/banner.js";
|
|
5
|
+
import { computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createTextVNode as l, createVNode as u, defineComponent as d, mergeModels as f, normalizeClass as p, openBlock as m, renderSlot as h, toDisplayString as g, unref as _, useModel as v, withCtx as y } from "vue";
|
|
6
|
+
import { Primitive as b } from "reka-ui";
|
|
7
|
+
//#region src/components/Banner.vue?vue&type=script&setup=true&lang.ts
|
|
8
|
+
var x = ["aria-label"], S = /*@__PURE__*/ d({
|
|
9
|
+
__name: "Banner",
|
|
10
|
+
props: /*@__PURE__*/ f({
|
|
11
|
+
as: { default: "div" },
|
|
12
|
+
variant: {},
|
|
13
|
+
position: {},
|
|
14
|
+
title: {},
|
|
15
|
+
description: {},
|
|
16
|
+
icon: {},
|
|
17
|
+
contained: {
|
|
18
|
+
type: Boolean,
|
|
19
|
+
default: void 0
|
|
20
|
+
},
|
|
21
|
+
align: {},
|
|
22
|
+
closable: { type: Boolean },
|
|
23
|
+
closeLabel: { default: "Dismiss" },
|
|
24
|
+
label: { default: "Announcement" },
|
|
25
|
+
unstyled: {
|
|
26
|
+
type: Boolean,
|
|
27
|
+
default: void 0
|
|
28
|
+
},
|
|
29
|
+
class: {},
|
|
30
|
+
ui: {}
|
|
31
|
+
}, {
|
|
32
|
+
open: {
|
|
33
|
+
type: Boolean,
|
|
34
|
+
default: !0
|
|
35
|
+
},
|
|
36
|
+
openModifiers: {}
|
|
37
|
+
}),
|
|
38
|
+
emits: /*@__PURE__*/ f(["close"], ["update:open"]),
|
|
39
|
+
setup(d) {
|
|
40
|
+
let f = d, S = v(d, "open"), C = t(), w = i(() => f.unstyled ?? C.unstyled), T = i(() => r({
|
|
41
|
+
variant: f.variant,
|
|
42
|
+
position: f.position,
|
|
43
|
+
contained: f.contained ?? !1,
|
|
44
|
+
align: f.align
|
|
45
|
+
})), E = i(() => w.value ? [f.ui?.root, f.class] : T.value.root({ class: [f.ui?.root, f.class] }));
|
|
46
|
+
function D(e) {
|
|
47
|
+
let t = f.ui?.[e];
|
|
48
|
+
return w.value ? t : T.value[e]({ class: t });
|
|
49
|
+
}
|
|
50
|
+
return (t, r) => S.value ? (m(), a(_(b), {
|
|
51
|
+
key: 0,
|
|
52
|
+
as: f.as,
|
|
53
|
+
role: "region",
|
|
54
|
+
"aria-label": f.label,
|
|
55
|
+
class: p(E.value)
|
|
56
|
+
}, {
|
|
57
|
+
default: y(() => [c("div", { class: p(D("container")) }, [
|
|
58
|
+
f.icon || t.$slots.icon ? (m(), s("span", {
|
|
59
|
+
key: 0,
|
|
60
|
+
class: p(D("icon"))
|
|
61
|
+
}, [h(t.$slots, "icon", {}, () => [u(n, { icon: f.icon }, null, 8, ["icon"])])], 2)) : o("", !0),
|
|
62
|
+
c("p", { class: p(D("content")) }, [
|
|
63
|
+
f.title || t.$slots.title ? (m(), s("strong", {
|
|
64
|
+
key: 0,
|
|
65
|
+
class: p(D("title"))
|
|
66
|
+
}, [h(t.$slots, "title", {}, () => [l(g(f.title), 1)])], 2)) : o("", !0),
|
|
67
|
+
r[1] ||= l(" " + g(" ") + " ", -1),
|
|
68
|
+
h(t.$slots, "default", {}, () => [l(g(f.description), 1)])
|
|
69
|
+
], 2),
|
|
70
|
+
t.$slots.actions ? (m(), s("span", {
|
|
71
|
+
key: 1,
|
|
72
|
+
class: p(D("actions"))
|
|
73
|
+
}, [h(t.$slots, "actions")], 2)) : o("", !0),
|
|
74
|
+
f.closable ? (m(), s("button", {
|
|
75
|
+
key: 2,
|
|
76
|
+
type: "button",
|
|
77
|
+
"aria-label": f.closeLabel,
|
|
78
|
+
class: p(D("close")),
|
|
79
|
+
onClick: r[0] ||= (e) => {
|
|
80
|
+
S.value = !1, t.$emit("close");
|
|
81
|
+
}
|
|
82
|
+
}, [h(t.$slots, "close", {}, () => [u(n, { icon: _(e) }, null, 8, ["icon"])])], 10, x)) : o("", !0)
|
|
83
|
+
], 2)]),
|
|
84
|
+
_: 3
|
|
85
|
+
}, 8, [
|
|
86
|
+
"as",
|
|
87
|
+
"aria-label",
|
|
88
|
+
"class"
|
|
89
|
+
])) : o("", !0);
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
//#endregion
|
|
93
|
+
export { S as default };
|
|
@@ -0,0 +1,284 @@
|
|
|
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 { useFormField as i } from "../composables/form.js";
|
|
5
|
+
import { comboboxTheme as ee } from "../theme/combobox.js";
|
|
6
|
+
import { Fragment as a, computed as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createTextVNode as u, createVNode as d, defineComponent as f, mergeProps as p, normalizeClass as m, openBlock as h, ref as g, renderList as _, renderSlot as v, toDisplayString as y, unref as b, vShow as x, withCtx as S, withDirectives as te } from "vue";
|
|
7
|
+
import { ComboboxAnchor as ne, ComboboxContent as re, ComboboxEmpty as ie, ComboboxGroup as ae, ComboboxInput as oe, ComboboxItem as C, ComboboxItemIndicator as w, ComboboxLabel as T, ComboboxPortal as se, ComboboxRoot as E, ComboboxTrigger as D, ComboboxViewport as O, ComboboxVirtualizer as k, useFilter as A, useForwardPropsEmits as j } from "reka-ui";
|
|
8
|
+
//#region src/components/Combobox.vue?vue&type=script&setup=true&lang.ts
|
|
9
|
+
var M = /*@__PURE__*/ f({
|
|
10
|
+
__name: "Combobox",
|
|
11
|
+
props: {
|
|
12
|
+
items: {},
|
|
13
|
+
placeholder: {},
|
|
14
|
+
size: {},
|
|
15
|
+
invalid: {
|
|
16
|
+
type: Boolean,
|
|
17
|
+
default: void 0
|
|
18
|
+
},
|
|
19
|
+
id: {},
|
|
20
|
+
emptyText: { default: "No results found." },
|
|
21
|
+
create: {
|
|
22
|
+
type: Boolean,
|
|
23
|
+
default: void 0
|
|
24
|
+
},
|
|
25
|
+
createLabel: {
|
|
26
|
+
type: Function,
|
|
27
|
+
default: (e) => `Create "${e}"`
|
|
28
|
+
},
|
|
29
|
+
virtual: {
|
|
30
|
+
type: Boolean,
|
|
31
|
+
default: void 0
|
|
32
|
+
},
|
|
33
|
+
estimateSize: { default: 32 },
|
|
34
|
+
overscan: { default: 12 },
|
|
35
|
+
unstyled: {
|
|
36
|
+
type: Boolean,
|
|
37
|
+
default: void 0
|
|
38
|
+
},
|
|
39
|
+
class: {},
|
|
40
|
+
ui: {},
|
|
41
|
+
open: {
|
|
42
|
+
type: Boolean,
|
|
43
|
+
default: void 0
|
|
44
|
+
},
|
|
45
|
+
defaultOpen: {
|
|
46
|
+
type: Boolean,
|
|
47
|
+
default: void 0
|
|
48
|
+
},
|
|
49
|
+
resetSearchTermOnBlur: { type: Boolean },
|
|
50
|
+
resetSearchTermOnSelect: { type: Boolean },
|
|
51
|
+
openOnFocus: { type: Boolean },
|
|
52
|
+
openOnClick: { type: Boolean },
|
|
53
|
+
ignoreFilter: { type: Boolean },
|
|
54
|
+
resetModelValueOnClear: { type: Boolean },
|
|
55
|
+
modelValue: {},
|
|
56
|
+
defaultValue: {},
|
|
57
|
+
multiple: { type: Boolean },
|
|
58
|
+
dir: {},
|
|
59
|
+
disabled: {
|
|
60
|
+
type: Boolean,
|
|
61
|
+
default: void 0
|
|
62
|
+
},
|
|
63
|
+
highlightOnHover: { type: Boolean },
|
|
64
|
+
by: {},
|
|
65
|
+
asChild: { type: Boolean },
|
|
66
|
+
as: {},
|
|
67
|
+
name: {},
|
|
68
|
+
required: { type: Boolean }
|
|
69
|
+
},
|
|
70
|
+
emits: [
|
|
71
|
+
"update:modelValue",
|
|
72
|
+
"highlight",
|
|
73
|
+
"update:open",
|
|
74
|
+
"create"
|
|
75
|
+
],
|
|
76
|
+
setup(f, { emit: M }) {
|
|
77
|
+
let N = f, P = M, F = j(o(() => {
|
|
78
|
+
let { items: e, placeholder: t, size: n, invalid: r, id: i, emptyText: ee, create: a, createLabel: o, virtual: s, estimateSize: c, overscan: l, unstyled: u, class: d, ui: f, ...p } = N;
|
|
79
|
+
return p;
|
|
80
|
+
}), P);
|
|
81
|
+
function I(e) {
|
|
82
|
+
return typeof e == "string" ? {
|
|
83
|
+
label: e,
|
|
84
|
+
value: e
|
|
85
|
+
} : e;
|
|
86
|
+
}
|
|
87
|
+
function L(e) {
|
|
88
|
+
return typeof e != "string" && "items" in e;
|
|
89
|
+
}
|
|
90
|
+
let R = o(() => {
|
|
91
|
+
let e = N.items ?? [];
|
|
92
|
+
return e.some(L) ? e.map((e) => L(e) ? e : {
|
|
93
|
+
label: "",
|
|
94
|
+
items: [e]
|
|
95
|
+
}) : void 0;
|
|
96
|
+
}), z = o(() => (N.items ?? []).flatMap((e) => L(e) ? e.items.map(I) : [I(e)])), B = o(() => !!N.virtual), V = g(""), H = g("");
|
|
97
|
+
function U(e) {
|
|
98
|
+
H.value = e.target.value;
|
|
99
|
+
}
|
|
100
|
+
let { contains: W } = A({ sensitivity: "base" }), G = o(() => {
|
|
101
|
+
let e = H.value.trim();
|
|
102
|
+
return e ? z.value.filter((t) => W(t.label, e)) : z.value;
|
|
103
|
+
});
|
|
104
|
+
function ce(e) {
|
|
105
|
+
let t = (e) => z.value.find((t) => t.value === e)?.label ?? String(e ?? "");
|
|
106
|
+
return Array.isArray(e) ? e.map(t).join(", ") : e == null || e === "" ? "" : t(e);
|
|
107
|
+
}
|
|
108
|
+
function le(e) {
|
|
109
|
+
let t = e.target;
|
|
110
|
+
requestAnimationFrame(() => {
|
|
111
|
+
document.activeElement === t && t.select();
|
|
112
|
+
}), H.value = "";
|
|
113
|
+
}
|
|
114
|
+
let K = o(() => {
|
|
115
|
+
let e = H.value.trim();
|
|
116
|
+
return !!N.create && e.length > 0 && !z.value.some((t) => t.label.toLowerCase() === e.toLowerCase());
|
|
117
|
+
});
|
|
118
|
+
function q(e) {
|
|
119
|
+
e.preventDefault(), P("create", H.value.trim()), e.target?.dispatchEvent(new KeyboardEvent("keydown", {
|
|
120
|
+
key: "Escape",
|
|
121
|
+
bubbles: !0
|
|
122
|
+
}));
|
|
123
|
+
}
|
|
124
|
+
let J = i(), ue = o(() => N.id ?? J?.id.value), Y = o(() => N.invalid ?? J?.invalid.value ?? !1), de = n(), X = o(() => N.unstyled ?? de.unstyled), Z = o(() => ee({
|
|
125
|
+
size: N.size,
|
|
126
|
+
invalid: Y.value,
|
|
127
|
+
disabled: N.disabled
|
|
128
|
+
}));
|
|
129
|
+
function Q(e, t) {
|
|
130
|
+
let n = N.ui?.[e];
|
|
131
|
+
return X.value ? [n, t] : Z.value[e]({ class: [n, t] });
|
|
132
|
+
}
|
|
133
|
+
let $ = o(() => X.value ? void 0 : Z.value.itemIndicator());
|
|
134
|
+
return (n, i) => (h(), s(b(E), p(b(F), {
|
|
135
|
+
"open-on-click": "",
|
|
136
|
+
class: "contents"
|
|
137
|
+
}), {
|
|
138
|
+
default: S(() => [d(b(ne), { class: m(Q("anchor", N.class)) }, {
|
|
139
|
+
default: S(() => [d(b(oe), {
|
|
140
|
+
id: ue.value,
|
|
141
|
+
modelValue: V.value,
|
|
142
|
+
"onUpdate:modelValue": i[0] ||= (e) => V.value = e,
|
|
143
|
+
placeholder: N.placeholder,
|
|
144
|
+
"display-value": ce,
|
|
145
|
+
"aria-invalid": Y.value || void 0,
|
|
146
|
+
"aria-describedby": b(J)?.describedBy.value,
|
|
147
|
+
class: m(Q("input")),
|
|
148
|
+
onFocus: le,
|
|
149
|
+
onInput: U
|
|
150
|
+
}, null, 8, [
|
|
151
|
+
"id",
|
|
152
|
+
"modelValue",
|
|
153
|
+
"placeholder",
|
|
154
|
+
"aria-invalid",
|
|
155
|
+
"aria-describedby",
|
|
156
|
+
"class"
|
|
157
|
+
]), d(b(D), { class: m(Q("trigger")) }, {
|
|
158
|
+
default: S(() => [d(r, { icon: b(e) }, null, 8, ["icon"])]),
|
|
159
|
+
_: 1
|
|
160
|
+
}, 8, ["class"])]),
|
|
161
|
+
_: 1
|
|
162
|
+
}, 8, ["class"]), d(b(se), null, {
|
|
163
|
+
default: S(() => [d(b(re), {
|
|
164
|
+
class: m(Q("content")),
|
|
165
|
+
position: "popper",
|
|
166
|
+
"side-offset": 4
|
|
167
|
+
}, {
|
|
168
|
+
default: S(() => [d(b(O), { class: m(Q("viewport")) }, {
|
|
169
|
+
default: S(() => [
|
|
170
|
+
B.value ? te((h(), l("div", {
|
|
171
|
+
key: 0,
|
|
172
|
+
class: m(Q("empty"))
|
|
173
|
+
}, [v(n.$slots, "empty", { query: H.value }, () => [u(y(N.emptyText), 1)])], 2)), [[x, !K.value && G.value.length === 0]]) : K.value ? c("", !0) : (h(), s(b(ie), {
|
|
174
|
+
key: 1,
|
|
175
|
+
class: m(Q("empty"))
|
|
176
|
+
}, {
|
|
177
|
+
default: S(() => [v(n.$slots, "empty", { query: H.value }, () => [u(y(N.emptyText), 1)])]),
|
|
178
|
+
_: 3
|
|
179
|
+
}, 8, ["class"])),
|
|
180
|
+
v(n.$slots, "default", {}, () => [B.value ? (h(), s(b(k), {
|
|
181
|
+
key: 0,
|
|
182
|
+
options: G.value,
|
|
183
|
+
"estimate-size": N.estimateSize,
|
|
184
|
+
overscan: N.overscan,
|
|
185
|
+
"text-content": (e) => e.label
|
|
186
|
+
}, {
|
|
187
|
+
default: S(({ option: e }) => [d(b(C), {
|
|
188
|
+
value: e.value,
|
|
189
|
+
"text-value": e.label,
|
|
190
|
+
disabled: e.disabled,
|
|
191
|
+
class: m(Q("item"))
|
|
192
|
+
}, {
|
|
193
|
+
default: S(() => [d(b(w), { class: m($.value) }, {
|
|
194
|
+
default: S(() => [d(r, { icon: b(t) }, null, 8, ["icon"])]),
|
|
195
|
+
_: 1
|
|
196
|
+
}, 8, ["class"]), u(" " + y(e.label), 1)]),
|
|
197
|
+
_: 2
|
|
198
|
+
}, 1032, [
|
|
199
|
+
"value",
|
|
200
|
+
"text-value",
|
|
201
|
+
"disabled",
|
|
202
|
+
"class"
|
|
203
|
+
])]),
|
|
204
|
+
_: 1
|
|
205
|
+
}, 8, [
|
|
206
|
+
"options",
|
|
207
|
+
"estimate-size",
|
|
208
|
+
"overscan",
|
|
209
|
+
"text-content"
|
|
210
|
+
])) : R.value ? (h(!0), l(a, { key: 1 }, _(R.value, (e, n) => (h(), s(b(ae), {
|
|
211
|
+
key: e.label || n,
|
|
212
|
+
class: m(Q("group"))
|
|
213
|
+
}, {
|
|
214
|
+
default: S(() => [e.label ? (h(), s(b(T), {
|
|
215
|
+
key: 0,
|
|
216
|
+
class: m(Q("groupLabel"))
|
|
217
|
+
}, {
|
|
218
|
+
default: S(() => [u(y(e.label), 1)]),
|
|
219
|
+
_: 2
|
|
220
|
+
}, 1032, ["class"])) : c("", !0), (h(!0), l(a, null, _(e.items, (e) => (h(), s(b(C), {
|
|
221
|
+
key: typeof e == "string" ? e : e.value,
|
|
222
|
+
value: typeof e == "string" ? e : e.value,
|
|
223
|
+
"text-value": typeof e == "string" ? e : e.label,
|
|
224
|
+
disabled: typeof e == "string" ? void 0 : e.disabled,
|
|
225
|
+
class: m(Q("item"))
|
|
226
|
+
}, {
|
|
227
|
+
default: S(() => [d(b(w), { class: m($.value) }, {
|
|
228
|
+
default: S(() => [d(r, { icon: b(t) }, null, 8, ["icon"])]),
|
|
229
|
+
_: 1
|
|
230
|
+
}, 8, ["class"]), u(" " + y(typeof e == "string" ? e : e.label), 1)]),
|
|
231
|
+
_: 2
|
|
232
|
+
}, 1032, [
|
|
233
|
+
"value",
|
|
234
|
+
"text-value",
|
|
235
|
+
"disabled",
|
|
236
|
+
"class"
|
|
237
|
+
]))), 128))]),
|
|
238
|
+
_: 2
|
|
239
|
+
}, 1032, ["class"]))), 128)) : (h(!0), l(a, { key: 2 }, _(z.value, (e) => (h(), s(b(C), {
|
|
240
|
+
key: e.value,
|
|
241
|
+
value: e.value,
|
|
242
|
+
"text-value": e.label,
|
|
243
|
+
disabled: e.disabled,
|
|
244
|
+
class: m(Q("item"))
|
|
245
|
+
}, {
|
|
246
|
+
default: S(() => [d(b(w), { class: m($.value) }, {
|
|
247
|
+
default: S(() => [d(r, { icon: b(t) }, null, 8, ["icon"])]),
|
|
248
|
+
_: 1
|
|
249
|
+
}, 8, ["class"]), u(" " + y(e.label), 1)]),
|
|
250
|
+
_: 2
|
|
251
|
+
}, 1032, [
|
|
252
|
+
"value",
|
|
253
|
+
"text-value",
|
|
254
|
+
"disabled",
|
|
255
|
+
"class"
|
|
256
|
+
]))), 128))]),
|
|
257
|
+
K.value ? (h(), s(b(C), {
|
|
258
|
+
key: H.value,
|
|
259
|
+
value: H.value,
|
|
260
|
+
"data-create": "",
|
|
261
|
+
"text-value": H.value,
|
|
262
|
+
class: m(Q("item")),
|
|
263
|
+
onSelect: q
|
|
264
|
+
}, {
|
|
265
|
+
default: S(() => [v(n.$slots, "create", { query: H.value }, () => [u(y(N.createLabel(H.value.trim())), 1)])]),
|
|
266
|
+
_: 3
|
|
267
|
+
}, 8, [
|
|
268
|
+
"value",
|
|
269
|
+
"text-value",
|
|
270
|
+
"class"
|
|
271
|
+
])) : c("", !0)
|
|
272
|
+
]),
|
|
273
|
+
_: 3
|
|
274
|
+
}, 8, ["class"])]),
|
|
275
|
+
_: 3
|
|
276
|
+
}, 8, ["class"])]),
|
|
277
|
+
_: 3
|
|
278
|
+
})]),
|
|
279
|
+
_: 3
|
|
280
|
+
}, 16));
|
|
281
|
+
}
|
|
282
|
+
});
|
|
283
|
+
//#endregion
|
|
284
|
+
export { M as default };
|
package/dist/packages/iryx-ui/src/components/Pagination.vue_vue_type_script_setup_true_lang.js
CHANGED
|
@@ -16,6 +16,7 @@ var D = /*@__PURE__*/ d({
|
|
|
16
16
|
default: !0
|
|
17
17
|
},
|
|
18
18
|
size: {},
|
|
19
|
+
align: {},
|
|
19
20
|
prevLabel: { default: "Previous page" },
|
|
20
21
|
nextLabel: { default: "Next page" },
|
|
21
22
|
label: { default: "Pagination" },
|
|
@@ -31,7 +32,10 @@ var D = /*@__PURE__*/ d({
|
|
|
31
32
|
}),
|
|
32
33
|
emits: ["update:page"],
|
|
33
34
|
setup(d) {
|
|
34
|
-
let f = d, D = y(d, "page"), O = n(), k = o(() => f.unstyled ?? O.unstyled), A = o(() => i({
|
|
35
|
+
let f = d, D = y(d, "page"), O = n(), k = o(() => f.unstyled ?? O.unstyled), A = o(() => i({
|
|
36
|
+
size: f.size,
|
|
37
|
+
align: f.align
|
|
38
|
+
})), 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
39
|
function P(e) {
|
|
36
40
|
return k.value ? f.ui?.item : [A.value.item({ class: f.ui?.item }), e ? A.value.active() : A.value.inactive()];
|
|
37
41
|
}
|
|
@@ -2,10 +2,10 @@ import { ArrowDown01Icon as e, Tick02Icon as t } from "../../../../node_modules/
|
|
|
2
2
|
import { useIryxUiConfig as n } from "../config.js";
|
|
3
3
|
import r from "./Icon.js";
|
|
4
4
|
import { selectTheme as i } from "../theme/select.js";
|
|
5
|
-
import { Fragment as a, computed as o, createBlock as s,
|
|
6
|
-
import { SelectContent as
|
|
5
|
+
import { Fragment as a, computed as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createTextVNode as u, createVNode as d, defineComponent as f, guardReactiveProps as p, normalizeClass as m, normalizeProps as h, openBlock as g, renderList as _, renderSlot as v, toDisplayString as y, unref as b, withCtx as x } from "vue";
|
|
6
|
+
import { SelectContent as S, SelectGroup as C, SelectIcon as w, SelectItem as T, SelectItemIndicator as E, SelectItemText as D, SelectLabel as O, SelectPortal as k, SelectRoot as A, SelectTrigger as j, SelectValue as M, SelectViewport as N, useForwardPropsEmits as P } from "reka-ui";
|
|
7
7
|
//#region src/components/Select.vue?vue&type=script&setup=true&lang.ts
|
|
8
|
-
var
|
|
8
|
+
var F = /*@__PURE__*/ f({
|
|
9
9
|
__name: "Select",
|
|
10
10
|
props: {
|
|
11
11
|
items: {},
|
|
@@ -30,39 +30,84 @@ var M = /*@__PURE__*/ d({
|
|
|
30
30
|
required: { type: Boolean }
|
|
31
31
|
},
|
|
32
32
|
emits: ["update:modelValue", "update:open"],
|
|
33
|
-
setup(
|
|
34
|
-
let
|
|
35
|
-
let { items: e, placeholder: t, size: n, unstyled: r, class: i, ui: a, ...o } =
|
|
33
|
+
setup(f, { emit: F }) {
|
|
34
|
+
let I = f, L = F, R = P(o(() => {
|
|
35
|
+
let { items: e, placeholder: t, size: n, unstyled: r, class: i, ui: a, ...o } = I;
|
|
36
36
|
return o;
|
|
37
|
-
}),
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
37
|
+
}), L);
|
|
38
|
+
function z(e) {
|
|
39
|
+
return typeof e == "string" ? {
|
|
40
|
+
label: e,
|
|
41
|
+
value: e
|
|
42
|
+
} : e;
|
|
43
|
+
}
|
|
44
|
+
function B(e) {
|
|
45
|
+
return typeof e != "string" && "items" in e;
|
|
46
|
+
}
|
|
47
|
+
let V = o(() => {
|
|
48
|
+
let e = I.items ?? [];
|
|
49
|
+
if (e.some(B)) return e.map((e) => B(e) ? {
|
|
50
|
+
label: e.label,
|
|
51
|
+
options: e.items.map(z)
|
|
52
|
+
} : {
|
|
53
|
+
label: "",
|
|
54
|
+
options: [z(e)]
|
|
55
|
+
});
|
|
56
|
+
}), H = o(() => (I.items ?? []).flatMap((e) => B(e) ? e.items.map(z) : [z(e)])), U = n(), W = o(() => I.unstyled ?? U.unstyled), G = o(() => i({ size: I.size })), K = o(() => W.value ? [I.ui?.trigger, I.class] : G.value.trigger({ class: [I.ui?.trigger, I.class] })), q = o(() => W.value ? I.ui?.content : G.value.content({ class: I.ui?.content })), J = o(() => W.value ? I.ui?.viewport : G.value.viewport({ class: I.ui?.viewport })), Y = o(() => W.value ? I.ui?.item : G.value.item({ class: I.ui?.item })), X = o(() => W.value ? void 0 : G.value.itemIndicator()), Z = o(() => W.value ? I.ui?.group : G.value.group({ class: I.ui?.group })), Q = o(() => W.value ? I.ui?.groupLabel : G.value.groupLabel({ class: I.ui?.groupLabel }));
|
|
57
|
+
return (n, i) => (g(), s(b(A), h(p(b(R))), {
|
|
58
|
+
default: x(() => [d(b(j), { class: m(K.value) }, {
|
|
59
|
+
default: x(() => [d(b(M), { placeholder: I.placeholder }, null, 8, ["placeholder"]), d(b(w), { "as-child": "" }, {
|
|
60
|
+
default: x(() => [d(r, { icon: b(e) }, null, 8, ["icon"])]),
|
|
45
61
|
_: 1
|
|
46
62
|
})]),
|
|
47
63
|
_: 1
|
|
48
|
-
}, 8, ["class"]),
|
|
49
|
-
default:
|
|
50
|
-
class:
|
|
51
|
-
position: "
|
|
52
|
-
"side-offset": 4
|
|
64
|
+
}, 8, ["class"]), d(b(k), null, {
|
|
65
|
+
default: x(() => [d(b(S), {
|
|
66
|
+
class: m(q.value),
|
|
67
|
+
position: "item-aligned"
|
|
53
68
|
}, {
|
|
54
|
-
default:
|
|
55
|
-
default:
|
|
69
|
+
default: x(() => [d(b(N), { class: m(J.value) }, {
|
|
70
|
+
default: x(() => [v(n.$slots, "default", {}, () => [V.value ? (g(!0), l(a, { key: 0 }, _(V.value, (e, n) => (g(), s(b(C), {
|
|
71
|
+
key: e.label || n,
|
|
72
|
+
class: m(Z.value)
|
|
73
|
+
}, {
|
|
74
|
+
default: x(() => [e.label ? (g(), s(b(O), {
|
|
75
|
+
key: 0,
|
|
76
|
+
class: m(Q.value)
|
|
77
|
+
}, {
|
|
78
|
+
default: x(() => [u(y(e.label), 1)]),
|
|
79
|
+
_: 2
|
|
80
|
+
}, 1032, ["class"])) : c("", !0), (g(!0), l(a, null, _(e.options, (e) => (g(), s(b(T), {
|
|
81
|
+
key: e.value,
|
|
82
|
+
value: e.value,
|
|
83
|
+
disabled: e.disabled,
|
|
84
|
+
class: m(Y.value)
|
|
85
|
+
}, {
|
|
86
|
+
default: x(() => [d(b(E), { class: m(X.value) }, {
|
|
87
|
+
default: x(() => [d(r, { icon: b(t) }, null, 8, ["icon"])]),
|
|
88
|
+
_: 1
|
|
89
|
+
}, 8, ["class"]), d(b(D), null, {
|
|
90
|
+
default: x(() => [u(y(e.label), 1)]),
|
|
91
|
+
_: 2
|
|
92
|
+
}, 1024)]),
|
|
93
|
+
_: 2
|
|
94
|
+
}, 1032, [
|
|
95
|
+
"value",
|
|
96
|
+
"disabled",
|
|
97
|
+
"class"
|
|
98
|
+
]))), 128))]),
|
|
99
|
+
_: 2
|
|
100
|
+
}, 1032, ["class"]))), 128)) : (g(!0), l(a, { key: 1 }, _(H.value, (e) => (g(), s(b(T), {
|
|
56
101
|
key: e.value,
|
|
57
102
|
value: e.value,
|
|
58
103
|
disabled: e.disabled,
|
|
59
|
-
class:
|
|
104
|
+
class: m(Y.value)
|
|
60
105
|
}, {
|
|
61
|
-
default:
|
|
62
|
-
default:
|
|
106
|
+
default: x(() => [d(b(E), { class: m(X.value) }, {
|
|
107
|
+
default: x(() => [d(r, { icon: b(t) }, null, 8, ["icon"])]),
|
|
63
108
|
_: 1
|
|
64
|
-
}, 8, ["class"]),
|
|
65
|
-
default:
|
|
109
|
+
}, 8, ["class"]), d(b(D), null, {
|
|
110
|
+
default: x(() => [u(y(e.label), 1)]),
|
|
66
111
|
_: 2
|
|
67
112
|
}, 1024)]),
|
|
68
113
|
_: 2
|
|
@@ -82,4 +127,4 @@ var M = /*@__PURE__*/ d({
|
|
|
82
127
|
}
|
|
83
128
|
});
|
|
84
129
|
//#endregion
|
|
85
|
-
export {
|
|
130
|
+
export { F as default };
|