iryx-ui 0.13.0 → 0.14.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/dist/component-names.d.ts +1 -1
- package/dist/component-names.js +1 -1
- package/dist/components/Banner.vue.d.ts +1 -1
- package/dist/components/Breadcrumb.vue.d.ts +1 -1
- package/dist/components/Combobox.vue.d.ts +34 -7
- package/dist/components/Combobox.vue_vue_type_script_setup_true_lang.js +172 -103
- package/dist/components/CommandPalette.vue.d.ts +1 -1
- package/dist/components/DatePicker.vue.d.ts +1 -1
- package/dist/components/DateRangePicker.vue.d.ts +1 -1
- package/dist/components/FileUpload.vue.d.ts +2 -2
- package/dist/components/Icon.vue.d.ts +6 -0
- package/dist/components/Icon.vue_vue_type_script_setup_true_lang.js +11 -9
- package/dist/components/NavigationMenu.vue.d.ts +1 -1
- package/dist/components/Pagination.vue.d.ts +1 -1
- package/dist/components/Sidebar.vue.d.ts +1 -1
- package/dist/components/SignaturePad.vue.d.ts +1 -1
- package/dist/components/Skeleton.vue.d.ts +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +146 -144
- package/dist/index.d.ts +2 -0
- package/dist/index.js +154 -152
- package/dist/theme/combobox.d.ts +48 -0
- package/dist/theme/combobox.js +23 -3
- package/package.json +1 -1
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
* Consumed by the Vue plugin (global registration) and the Nuxt module
|
|
4
4
|
* (auto-imports). Keep in sync with `src/components/index.ts`.
|
|
5
5
|
*/
|
|
6
|
-
export declare const componentNames: readonly ["Accordion", "Alert", "App", "AppShell", "AspectRatio", "Avatar", "AvatarGroup", "Badge", "BarChart", "Banner", "Breadcrumb", "Button", "ButtonGroup", "Card", "ChartLegend", "Checkbox", "ColorPicker", "Combobox", "Collapsible", "CommandPalette", "Container", "ConfirmDialog", "ContextMenu", "DatePicker", "DateRangePicker", "Dialog", "Drawer", "DropdownMenu", "EmptyState", "FileUpload", "Form", "FormField", "Input", "Kbd", "Label", "LineChart", "NavigationMenu", "NumberInput", "Menubar", "PageHeader", "Pagination", "PasswordInput", "PinInput", "Popover", "Progress", "RadioGroup", "ScrollArea", "ScrollFade", "Select", "Separator", "Sidebar", "SignaturePad", "Skeleton", "Slider", "Sparkline", "Splitter", "Stat", "Stepper", "Switch", "Table", "Tabs", "TagsInput", "Textarea", "Toaster", "Toggle", "ToggleGroup", "TimeField", "Timeline", "Toolbar", "Tooltip", "Tree"];
|
|
6
|
+
export declare const componentNames: readonly ["Accordion", "Alert", "App", "AppShell", "AspectRatio", "Avatar", "AvatarGroup", "Badge", "BarChart", "Banner", "Breadcrumb", "Button", "ButtonGroup", "Card", "ChartLegend", "Checkbox", "ColorPicker", "Combobox", "Collapsible", "CommandPalette", "Container", "ConfirmDialog", "ContextMenu", "DatePicker", "DateRangePicker", "Dialog", "Drawer", "DropdownMenu", "EmptyState", "FileUpload", "Form", "FormField", "Icon", "Input", "Kbd", "Label", "LineChart", "NavigationMenu", "NumberInput", "Menubar", "PageHeader", "Pagination", "PasswordInput", "PinInput", "Popover", "Progress", "RadioGroup", "ScrollArea", "ScrollFade", "Select", "Separator", "Sidebar", "SignaturePad", "Skeleton", "Slider", "Sparkline", "Splitter", "Stat", "Stepper", "Switch", "Table", "Tabs", "TagsInput", "Textarea", "Toaster", "Toggle", "ToggleGroup", "TimeField", "Timeline", "Toolbar", "Tooltip", "Tree"];
|
|
7
7
|
export type ComponentName = (typeof componentNames)[number];
|
package/dist/component-names.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
//#region src/component-names.ts
|
|
2
|
-
var e = /* @__PURE__ */ "Accordion.Alert.App.AppShell.AspectRatio.Avatar.AvatarGroup.Badge.BarChart.Banner.Breadcrumb.Button.ButtonGroup.Card.ChartLegend.Checkbox.ColorPicker.Combobox.Collapsible.CommandPalette.Container.ConfirmDialog.ContextMenu.DatePicker.DateRangePicker.Dialog.Drawer.DropdownMenu.EmptyState.FileUpload.Form.FormField.Input.Kbd.Label.LineChart.NavigationMenu.NumberInput.Menubar.PageHeader.Pagination.PasswordInput.PinInput.Popover.Progress.RadioGroup.ScrollArea.ScrollFade.Select.Separator.Sidebar.SignaturePad.Skeleton.Slider.Sparkline.Splitter.Stat.Stepper.Switch.Table.Tabs.TagsInput.Textarea.Toaster.Toggle.ToggleGroup.TimeField.Timeline.Toolbar.Tooltip.Tree".split(".");
|
|
2
|
+
var e = /* @__PURE__ */ "Accordion.Alert.App.AppShell.AspectRatio.Avatar.AvatarGroup.Badge.BarChart.Banner.Breadcrumb.Button.ButtonGroup.Card.ChartLegend.Checkbox.ColorPicker.Combobox.Collapsible.CommandPalette.Container.ConfirmDialog.ContextMenu.DatePicker.DateRangePicker.Dialog.Drawer.DropdownMenu.EmptyState.FileUpload.Form.FormField.Icon.Input.Kbd.Label.LineChart.NavigationMenu.NumberInput.Menubar.PageHeader.Pagination.PasswordInput.PinInput.Popover.Progress.RadioGroup.ScrollArea.ScrollFade.Select.Separator.Sidebar.SignaturePad.Skeleton.Slider.Sparkline.Splitter.Stat.Stepper.Switch.Table.Tabs.TagsInput.Textarea.Toaster.Toggle.ToggleGroup.TimeField.Timeline.Toolbar.Tooltip.Tree".split(".");
|
|
3
3
|
//#endregion
|
|
4
4
|
export { e as componentNames };
|
|
@@ -65,9 +65,9 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
|
|
|
65
65
|
onClose?: (() => any) | undefined;
|
|
66
66
|
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
67
67
|
}>, {
|
|
68
|
+
label: string;
|
|
68
69
|
unstyled: boolean;
|
|
69
70
|
as: string;
|
|
70
|
-
label: string;
|
|
71
71
|
closeLabel: string;
|
|
72
72
|
contained: boolean;
|
|
73
73
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -32,8 +32,8 @@ type __VLS_Slots = {} & {
|
|
|
32
32
|
separator?: (props: typeof __VLS_26) => any;
|
|
33
33
|
};
|
|
34
34
|
declare const __VLS_base: import("vue").DefineComponent<BreadcrumbProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<BreadcrumbProps> & Readonly<{}>, {
|
|
35
|
-
unstyled: boolean;
|
|
36
35
|
label: string;
|
|
36
|
+
unstyled: boolean;
|
|
37
37
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
38
38
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
39
39
|
declare const _default: typeof __VLS_export;
|
|
@@ -21,8 +21,22 @@ export interface ComboboxProps extends ComboboxRootProps {
|
|
|
21
21
|
/** Mark the field as invalid — styles the border and ring red. */
|
|
22
22
|
invalid?: boolean;
|
|
23
23
|
id?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Hold several values. The model becomes an array and each choice is drawn
|
|
26
|
+
* as a removable chip inside the field.
|
|
27
|
+
*/
|
|
28
|
+
multiple?: boolean;
|
|
24
29
|
/** Shown when the query matches nothing. Override for non-English apps. */
|
|
25
30
|
emptyText?: string;
|
|
31
|
+
/**
|
|
32
|
+
* Swap the dropdown arrow for a clear button once something is selected.
|
|
33
|
+
* Clearing empties the query too and returns focus to the input.
|
|
34
|
+
*/
|
|
35
|
+
clearable?: boolean;
|
|
36
|
+
/** Accessible name for that button — override for non-English apps. */
|
|
37
|
+
clearLabel?: string;
|
|
38
|
+
/** Accessible name for a chip's remove button. Receives the chip's label. */
|
|
39
|
+
removeLabel?: (label: string) => string;
|
|
26
40
|
/**
|
|
27
41
|
* Offer a "create" row when the query matches no option's label, for
|
|
28
42
|
* adding a client or item without leaving the field. Selecting it emits
|
|
@@ -49,6 +63,10 @@ export interface ComboboxProps extends ComboboxRootProps {
|
|
|
49
63
|
anchor?: string;
|
|
50
64
|
input?: string;
|
|
51
65
|
trigger?: string;
|
|
66
|
+
clear?: string;
|
|
67
|
+
tag?: string;
|
|
68
|
+
tagText?: string;
|
|
69
|
+
tagDelete?: string;
|
|
52
70
|
content?: string;
|
|
53
71
|
viewport?: string;
|
|
54
72
|
item?: string;
|
|
@@ -57,21 +75,26 @@ export interface ComboboxProps extends ComboboxRootProps {
|
|
|
57
75
|
groupLabel?: string;
|
|
58
76
|
};
|
|
59
77
|
}
|
|
60
|
-
declare var
|
|
78
|
+
declare var __VLS_16: {
|
|
79
|
+
option: ComboboxItemOption;
|
|
80
|
+
remove: () => void;
|
|
81
|
+
}, __VLS_70: {
|
|
61
82
|
query: string;
|
|
62
|
-
},
|
|
83
|
+
}, __VLS_78: {
|
|
63
84
|
query: string;
|
|
64
|
-
},
|
|
85
|
+
}, __VLS_80: {}, __VLS_159: {
|
|
65
86
|
query: string;
|
|
66
87
|
};
|
|
67
88
|
type __VLS_Slots = {} & {
|
|
68
|
-
|
|
89
|
+
tag?: (props: typeof __VLS_16) => any;
|
|
90
|
+
} & {
|
|
91
|
+
empty?: (props: typeof __VLS_70) => any;
|
|
69
92
|
} & {
|
|
70
|
-
empty?: (props: typeof
|
|
93
|
+
empty?: (props: typeof __VLS_78) => any;
|
|
71
94
|
} & {
|
|
72
|
-
default?: (props: typeof
|
|
95
|
+
default?: (props: typeof __VLS_80) => any;
|
|
73
96
|
} & {
|
|
74
|
-
create?: (props: typeof
|
|
97
|
+
create?: (props: typeof __VLS_159) => any;
|
|
75
98
|
};
|
|
76
99
|
declare const __VLS_base: import("vue").DefineComponent<ComboboxProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
77
100
|
"update:modelValue": (value: AcceptableValue) => any;
|
|
@@ -90,12 +113,16 @@ declare const __VLS_base: import("vue").DefineComponent<ComboboxProps, {}, {}, {
|
|
|
90
113
|
} | undefined) => any) | undefined;
|
|
91
114
|
onCreate?: ((query: string) => any) | undefined;
|
|
92
115
|
}>, {
|
|
116
|
+
multiple: boolean;
|
|
93
117
|
disabled: boolean;
|
|
94
118
|
unstyled: boolean;
|
|
95
119
|
open: boolean;
|
|
96
120
|
defaultOpen: boolean;
|
|
97
121
|
invalid: boolean;
|
|
98
122
|
emptyText: string;
|
|
123
|
+
clearable: boolean;
|
|
124
|
+
clearLabel: string;
|
|
125
|
+
removeLabel: (label: string) => string;
|
|
99
126
|
create: boolean;
|
|
100
127
|
createLabel: (query: string) => string;
|
|
101
128
|
virtual: boolean;
|
|
@@ -2,11 +2,11 @@ import { useIryxUiConfig as e } from "../config.js";
|
|
|
2
2
|
import t from "./Icon.js";
|
|
3
3
|
import { useFormField as n } from "../composables/form.js";
|
|
4
4
|
import { comboboxTheme as ee } from "../theme/combobox.js";
|
|
5
|
-
import { Fragment as r, computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s,
|
|
6
|
-
import { ArrowDown01Icon as
|
|
7
|
-
import { ComboboxAnchor as
|
|
5
|
+
import { Fragment as r, computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createTextVNode as l, createVNode as u, defineComponent as d, mergeProps as f, normalizeClass as p, openBlock as m, ref as h, renderList as g, renderSlot as _, toDisplayString as v, unref as y, vShow as b, watch as x, withCtx as S, withDirectives as te, withModifiers as ne } from "vue";
|
|
6
|
+
import { ArrowDown01Icon as re, Cancel01Icon as C, Tick02Icon as w } from "@hugeicons/core-free-icons";
|
|
7
|
+
import { ComboboxAnchor as T, ComboboxCancel as ie, ComboboxContent as ae, ComboboxEmpty as oe, ComboboxGroup as se, ComboboxInput as ce, ComboboxItem as E, ComboboxItemIndicator as D, ComboboxLabel as le, ComboboxPortal as ue, ComboboxRoot as de, ComboboxTrigger as fe, ComboboxViewport as pe, ComboboxVirtualizer as me, useFilter as he, useForwardPropsEmits as ge } from "reka-ui";
|
|
8
8
|
//#region src/components/Combobox.vue?vue&type=script&setup=true&lang.ts
|
|
9
|
-
var
|
|
9
|
+
var _e = ["aria-label", "onClick"], O = /*@__PURE__*/ d({
|
|
10
10
|
inheritAttrs: !1,
|
|
11
11
|
__name: "Combobox",
|
|
12
12
|
props: {
|
|
@@ -18,7 +18,20 @@ var M = /*@__PURE__*/ u({
|
|
|
18
18
|
default: void 0
|
|
19
19
|
},
|
|
20
20
|
id: {},
|
|
21
|
+
multiple: {
|
|
22
|
+
type: Boolean,
|
|
23
|
+
default: void 0
|
|
24
|
+
},
|
|
21
25
|
emptyText: { default: "No results found." },
|
|
26
|
+
clearable: {
|
|
27
|
+
type: Boolean,
|
|
28
|
+
default: void 0
|
|
29
|
+
},
|
|
30
|
+
clearLabel: { default: "Clear" },
|
|
31
|
+
removeLabel: {
|
|
32
|
+
type: Function,
|
|
33
|
+
default: (e) => `Remove ${e}`
|
|
34
|
+
},
|
|
22
35
|
create: {
|
|
23
36
|
type: Boolean,
|
|
24
37
|
default: void 0
|
|
@@ -55,7 +68,6 @@ var M = /*@__PURE__*/ u({
|
|
|
55
68
|
resetModelValueOnClear: { type: Boolean },
|
|
56
69
|
modelValue: {},
|
|
57
70
|
defaultValue: {},
|
|
58
|
-
multiple: { type: Boolean },
|
|
59
71
|
dir: {},
|
|
60
72
|
disabled: {
|
|
61
73
|
type: Boolean,
|
|
@@ -74,128 +86,185 @@ var M = /*@__PURE__*/ u({
|
|
|
74
86
|
"update:open",
|
|
75
87
|
"create"
|
|
76
88
|
],
|
|
77
|
-
setup(
|
|
78
|
-
let
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
})
|
|
82
|
-
function
|
|
89
|
+
setup(d, { emit: O }) {
|
|
90
|
+
let k = d, A = O, j = h(k.modelValue ?? k.defaultValue);
|
|
91
|
+
x(() => k.modelValue, (e) => {
|
|
92
|
+
e !== void 0 && (j.value = e);
|
|
93
|
+
});
|
|
94
|
+
function M(e) {
|
|
95
|
+
j.value = e, A("update:modelValue", e);
|
|
96
|
+
}
|
|
97
|
+
let N = i(() => {
|
|
98
|
+
if (!k.clearable || k.disabled) return !1;
|
|
99
|
+
let e = j.value;
|
|
100
|
+
return Array.isArray(e) ? e.length > 0 : e != null && e !== "";
|
|
101
|
+
}), P = ge(i(() => {
|
|
102
|
+
let { items: e, placeholder: t, size: n, invalid: ee, id: r, emptyText: i, clearable: a, clearLabel: o, removeLabel: s, create: c, createLabel: l, virtual: u, estimateSize: d, overscan: f, unstyled: p, class: m, ui: h, defaultValue: g, modelValue: _, ...v } = k;
|
|
103
|
+
return {
|
|
104
|
+
...v,
|
|
105
|
+
modelValue: j.value
|
|
106
|
+
};
|
|
107
|
+
}), A);
|
|
108
|
+
function F(e) {
|
|
83
109
|
return typeof e == "string" ? {
|
|
84
110
|
label: e,
|
|
85
111
|
value: e
|
|
86
112
|
} : e;
|
|
87
113
|
}
|
|
88
|
-
function
|
|
114
|
+
function I(e) {
|
|
89
115
|
return typeof e != "string" && "items" in e;
|
|
90
116
|
}
|
|
91
|
-
let
|
|
92
|
-
let e =
|
|
93
|
-
return e.some(
|
|
117
|
+
let L = i(() => {
|
|
118
|
+
let e = k.items ?? [];
|
|
119
|
+
return e.some(I) ? e.map((e) => I(e) ? e : {
|
|
94
120
|
label: "",
|
|
95
121
|
items: [e]
|
|
96
122
|
}) : void 0;
|
|
97
|
-
}),
|
|
98
|
-
function
|
|
99
|
-
|
|
123
|
+
}), R = i(() => (k.items ?? []).flatMap((e) => I(e) ? e.items.map(F) : [F(e)])), z = i(() => !!k.virtual), B = h(""), V = h("");
|
|
124
|
+
function ve(e) {
|
|
125
|
+
V.value = e.target.value;
|
|
100
126
|
}
|
|
101
|
-
let { contains:
|
|
102
|
-
let e =
|
|
103
|
-
return e ?
|
|
104
|
-
})
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
127
|
+
let { contains: ye } = he({ sensitivity: "base" }), H = i(() => {
|
|
128
|
+
let e = V.value.trim();
|
|
129
|
+
return e ? R.value.filter((t) => ye(t.label, e)) : R.value;
|
|
130
|
+
}), U = i(() => {
|
|
131
|
+
let e = j.value;
|
|
132
|
+
return Array.isArray(e) ? e.map((e) => R.value.find((t) => t.value === e) ?? {
|
|
133
|
+
label: String(e),
|
|
134
|
+
value: String(e)
|
|
135
|
+
}) : [];
|
|
136
|
+
}), W = i(() => !!k.multiple && U.value.length > 0);
|
|
137
|
+
function G(e) {
|
|
138
|
+
let t = j.value;
|
|
139
|
+
Array.isArray(t) && M(t.filter((t) => t !== e));
|
|
108
140
|
}
|
|
109
|
-
function
|
|
141
|
+
function be(e) {
|
|
142
|
+
e.key !== "Backspace" || !W.value || e.target.value === "" && (e.preventDefault(), G(U.value[U.value.length - 1].value));
|
|
143
|
+
}
|
|
144
|
+
function xe(e) {
|
|
145
|
+
let t = (e) => R.value.find((t) => t.value === e)?.label ?? String(e ?? "");
|
|
146
|
+
return Array.isArray(e) ? W.value ? "" : e.map(t).join(", ") : e == null || e === "" ? "" : t(e);
|
|
147
|
+
}
|
|
148
|
+
function Se(e) {
|
|
110
149
|
let t = e.target;
|
|
111
150
|
requestAnimationFrame(() => {
|
|
112
151
|
document.activeElement === t && t.select();
|
|
113
|
-
}),
|
|
152
|
+
}), V.value = "";
|
|
114
153
|
}
|
|
115
154
|
let K = i(() => {
|
|
116
|
-
let e =
|
|
117
|
-
return !!
|
|
155
|
+
let e = V.value.trim();
|
|
156
|
+
return !!k.create && e.length > 0 && !R.value.some((t) => t.label.toLowerCase() === e.toLowerCase());
|
|
118
157
|
});
|
|
119
158
|
function q(e) {
|
|
120
|
-
e.preventDefault(),
|
|
159
|
+
e.preventDefault(), A("create", V.value.trim()), e.target?.dispatchEvent(new KeyboardEvent("keydown", {
|
|
121
160
|
key: "Escape",
|
|
122
161
|
bubbles: !0
|
|
123
162
|
}));
|
|
124
163
|
}
|
|
125
|
-
let J = n(),
|
|
126
|
-
size:
|
|
164
|
+
let J = n(), Ce = i(() => k.id ?? J?.id.value), Y = i(() => k.invalid ?? J?.invalid.value ?? !1), we = e(), X = i(() => k.unstyled ?? we.unstyled), Z = i(() => ee({
|
|
165
|
+
size: k.size,
|
|
166
|
+
chips: W.value,
|
|
127
167
|
invalid: Y.value,
|
|
128
|
-
disabled:
|
|
168
|
+
disabled: k.disabled
|
|
129
169
|
}));
|
|
130
170
|
function Q(e, t) {
|
|
131
|
-
let n =
|
|
171
|
+
let n = k.ui?.[e];
|
|
132
172
|
return X.value ? [n, t] : Z.value[e]({ class: [n, t] });
|
|
133
173
|
}
|
|
134
174
|
let $ = i(() => X.value ? void 0 : Z.value.itemIndicator());
|
|
135
|
-
return (e, n) => (
|
|
175
|
+
return (e, n) => (m(), a(y(de), f(y(P), {
|
|
136
176
|
"open-on-click": "",
|
|
137
|
-
|
|
177
|
+
"reset-model-value-on-clear": k.clearable || k.resetModelValueOnClear,
|
|
178
|
+
class: "contents",
|
|
179
|
+
"onUpdate:modelValue": n[1] ||= (e) => j.value = e
|
|
138
180
|
}), {
|
|
139
|
-
default:
|
|
140
|
-
default:
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
"
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
"
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
181
|
+
default: S(() => [u(y(T), { class: p(Q("anchor", k.class)) }, {
|
|
182
|
+
default: S(() => [
|
|
183
|
+
(m(!0), s(r, null, g(U.value, (n) => (m(), s("span", {
|
|
184
|
+
key: String(n.value),
|
|
185
|
+
class: p(Q("tag"))
|
|
186
|
+
}, [_(e.$slots, "tag", {
|
|
187
|
+
option: n,
|
|
188
|
+
remove: () => G(n.value)
|
|
189
|
+
}, () => [c("span", { class: p(Q("tagText")) }, v(n.label), 3), c("button", {
|
|
190
|
+
type: "button",
|
|
191
|
+
tabindex: "-1",
|
|
192
|
+
"aria-label": k.removeLabel(n.label),
|
|
193
|
+
class: p(Q("tagDelete")),
|
|
194
|
+
onClick: ne((e) => G(n.value), ["stop"])
|
|
195
|
+
}, [u(t, { icon: y(C) }, null, 8, ["icon"])], 10, _e)])], 2))), 128)),
|
|
196
|
+
u(y(ce), f({
|
|
197
|
+
id: Ce.value,
|
|
198
|
+
modelValue: B.value,
|
|
199
|
+
"onUpdate:modelValue": n[0] ||= (e) => B.value = e
|
|
200
|
+
}, e.$attrs, {
|
|
201
|
+
placeholder: k.placeholder,
|
|
202
|
+
"display-value": xe,
|
|
203
|
+
"aria-invalid": Y.value || void 0,
|
|
204
|
+
"aria-describedby": y(J)?.describedBy.value,
|
|
205
|
+
class: Q("input"),
|
|
206
|
+
onFocus: Se,
|
|
207
|
+
onInput: ve,
|
|
208
|
+
onKeydown: be
|
|
209
|
+
}), null, 16, [
|
|
210
|
+
"id",
|
|
211
|
+
"modelValue",
|
|
212
|
+
"placeholder",
|
|
213
|
+
"aria-invalid",
|
|
214
|
+
"aria-describedby",
|
|
215
|
+
"class"
|
|
216
|
+
]),
|
|
217
|
+
N.value ? (m(), a(y(ie), {
|
|
218
|
+
key: 0,
|
|
219
|
+
"aria-label": k.clearLabel,
|
|
220
|
+
class: p(Q("clear"))
|
|
221
|
+
}, {
|
|
222
|
+
default: S(() => [u(t, { icon: y(C) }, null, 8, ["icon"])]),
|
|
223
|
+
_: 1
|
|
224
|
+
}, 8, ["aria-label", "class"])) : (m(), a(y(fe), {
|
|
225
|
+
key: 1,
|
|
226
|
+
class: p(Q("trigger"))
|
|
227
|
+
}, {
|
|
228
|
+
default: S(() => [u(t, { icon: y(re) }, null, 8, ["icon"])]),
|
|
229
|
+
_: 1
|
|
230
|
+
}, 8, ["class"]))
|
|
231
|
+
]),
|
|
232
|
+
_: 3
|
|
233
|
+
}, 8, ["class"]), u(y(ue), null, {
|
|
234
|
+
default: S(() => [u(y(ae), {
|
|
235
|
+
class: p(Q("content")),
|
|
167
236
|
position: "popper",
|
|
168
237
|
"side-offset": 4
|
|
169
238
|
}, {
|
|
170
|
-
default:
|
|
171
|
-
default:
|
|
172
|
-
|
|
239
|
+
default: S(() => [u(y(pe), { class: p(Q("viewport")) }, {
|
|
240
|
+
default: S(() => [
|
|
241
|
+
z.value ? te((m(), s("div", {
|
|
173
242
|
key: 0,
|
|
174
|
-
class:
|
|
175
|
-
}, [
|
|
243
|
+
class: p(Q("empty"))
|
|
244
|
+
}, [_(e.$slots, "empty", { query: V.value }, () => [l(v(k.emptyText), 1)])], 2)), [[b, !K.value && H.value.length === 0]]) : K.value ? o("", !0) : (m(), a(y(oe), {
|
|
176
245
|
key: 1,
|
|
177
|
-
class:
|
|
246
|
+
class: p(Q("empty"))
|
|
178
247
|
}, {
|
|
179
|
-
default:
|
|
248
|
+
default: S(() => [_(e.$slots, "empty", { query: V.value }, () => [l(v(k.emptyText), 1)])]),
|
|
180
249
|
_: 3
|
|
181
250
|
}, 8, ["class"])),
|
|
182
|
-
|
|
251
|
+
_(e.$slots, "default", {}, () => [z.value ? (m(), a(y(me), {
|
|
183
252
|
key: 0,
|
|
184
|
-
options:
|
|
185
|
-
"estimate-size":
|
|
186
|
-
overscan:
|
|
253
|
+
options: H.value,
|
|
254
|
+
"estimate-size": k.estimateSize,
|
|
255
|
+
overscan: k.overscan,
|
|
187
256
|
"text-content": (e) => e.label
|
|
188
257
|
}, {
|
|
189
|
-
default:
|
|
258
|
+
default: S(({ option: e }) => [u(y(E), {
|
|
190
259
|
value: e.value,
|
|
191
260
|
"text-value": e.label,
|
|
192
261
|
disabled: e.disabled,
|
|
193
|
-
class:
|
|
262
|
+
class: p(Q("item"))
|
|
194
263
|
}, {
|
|
195
|
-
default:
|
|
196
|
-
default:
|
|
264
|
+
default: S(() => [u(y(D), { class: p($.value) }, {
|
|
265
|
+
default: S(() => [u(t, { icon: y(w) }, null, 8, ["icon"])]),
|
|
197
266
|
_: 1
|
|
198
|
-
}, 8, ["class"]),
|
|
267
|
+
}, 8, ["class"]), l(" " + v(e.label), 1)]),
|
|
199
268
|
_: 2
|
|
200
269
|
}, 1032, [
|
|
201
270
|
"value",
|
|
@@ -209,27 +278,27 @@ var M = /*@__PURE__*/ u({
|
|
|
209
278
|
"estimate-size",
|
|
210
279
|
"overscan",
|
|
211
280
|
"text-content"
|
|
212
|
-
])) :
|
|
281
|
+
])) : L.value ? (m(!0), s(r, { key: 1 }, g(L.value, (e, n) => (m(), a(y(se), {
|
|
213
282
|
key: e.label || n,
|
|
214
|
-
class:
|
|
283
|
+
class: p(Q("group"))
|
|
215
284
|
}, {
|
|
216
|
-
default:
|
|
285
|
+
default: S(() => [e.label ? (m(), a(y(le), {
|
|
217
286
|
key: 0,
|
|
218
|
-
class:
|
|
287
|
+
class: p(Q("groupLabel"))
|
|
219
288
|
}, {
|
|
220
|
-
default:
|
|
289
|
+
default: S(() => [l(v(e.label), 1)]),
|
|
221
290
|
_: 2
|
|
222
|
-
}, 1032, ["class"])) : o("", !0), (
|
|
291
|
+
}, 1032, ["class"])) : o("", !0), (m(!0), s(r, null, g(e.items, (e) => (m(), a(y(E), {
|
|
223
292
|
key: typeof e == "string" ? e : e.value,
|
|
224
293
|
value: typeof e == "string" ? e : e.value,
|
|
225
294
|
"text-value": typeof e == "string" ? e : e.label,
|
|
226
295
|
disabled: typeof e == "string" ? void 0 : e.disabled,
|
|
227
|
-
class:
|
|
296
|
+
class: p(Q("item"))
|
|
228
297
|
}, {
|
|
229
|
-
default:
|
|
230
|
-
default:
|
|
298
|
+
default: S(() => [u(y(D), { class: p($.value) }, {
|
|
299
|
+
default: S(() => [u(t, { icon: y(w) }, null, 8, ["icon"])]),
|
|
231
300
|
_: 1
|
|
232
|
-
}, 8, ["class"]),
|
|
301
|
+
}, 8, ["class"]), l(" " + v(typeof e == "string" ? e : e.label), 1)]),
|
|
233
302
|
_: 2
|
|
234
303
|
}, 1032, [
|
|
235
304
|
"value",
|
|
@@ -238,17 +307,17 @@ var M = /*@__PURE__*/ u({
|
|
|
238
307
|
"class"
|
|
239
308
|
]))), 128))]),
|
|
240
309
|
_: 2
|
|
241
|
-
}, 1032, ["class"]))), 128)) : (
|
|
310
|
+
}, 1032, ["class"]))), 128)) : (m(!0), s(r, { key: 2 }, g(R.value, (e) => (m(), a(y(E), {
|
|
242
311
|
key: e.value,
|
|
243
312
|
value: e.value,
|
|
244
313
|
"text-value": e.label,
|
|
245
314
|
disabled: e.disabled,
|
|
246
|
-
class:
|
|
315
|
+
class: p(Q("item"))
|
|
247
316
|
}, {
|
|
248
|
-
default:
|
|
249
|
-
default:
|
|
317
|
+
default: S(() => [u(y(D), { class: p($.value) }, {
|
|
318
|
+
default: S(() => [u(t, { icon: y(w) }, null, 8, ["icon"])]),
|
|
250
319
|
_: 1
|
|
251
|
-
}, 8, ["class"]),
|
|
320
|
+
}, 8, ["class"]), l(" " + v(e.label), 1)]),
|
|
252
321
|
_: 2
|
|
253
322
|
}, 1032, [
|
|
254
323
|
"value",
|
|
@@ -256,15 +325,15 @@ var M = /*@__PURE__*/ u({
|
|
|
256
325
|
"disabled",
|
|
257
326
|
"class"
|
|
258
327
|
]))), 128))]),
|
|
259
|
-
K.value ? (
|
|
260
|
-
key:
|
|
261
|
-
value:
|
|
328
|
+
K.value ? (m(), a(y(E), {
|
|
329
|
+
key: V.value,
|
|
330
|
+
value: V.value,
|
|
262
331
|
"data-create": "",
|
|
263
|
-
"text-value":
|
|
264
|
-
class:
|
|
332
|
+
"text-value": V.value,
|
|
333
|
+
class: p(Q("item")),
|
|
265
334
|
onSelect: q
|
|
266
335
|
}, {
|
|
267
|
-
default:
|
|
336
|
+
default: S(() => [_(e.$slots, "create", { query: V.value }, () => [l(v(k.createLabel(V.value.trim())), 1)])]),
|
|
268
337
|
_: 3
|
|
269
338
|
}, 8, [
|
|
270
339
|
"value",
|
|
@@ -279,8 +348,8 @@ var M = /*@__PURE__*/ u({
|
|
|
279
348
|
_: 3
|
|
280
349
|
})]),
|
|
281
350
|
_: 3
|
|
282
|
-
}, 16));
|
|
351
|
+
}, 16, ["reset-model-value-on-clear"]));
|
|
283
352
|
}
|
|
284
353
|
});
|
|
285
354
|
//#endregion
|
|
286
|
-
export {
|
|
355
|
+
export { O as default };
|
|
@@ -45,8 +45,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
|
|
|
45
45
|
onSelect?: ((item: CommandItem) => any) | undefined;
|
|
46
46
|
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
47
47
|
}>, {
|
|
48
|
-
unstyled: boolean;
|
|
49
48
|
label: string;
|
|
49
|
+
unstyled: boolean;
|
|
50
50
|
placeholder: string;
|
|
51
51
|
footer: boolean;
|
|
52
52
|
emptyText: string;
|
|
@@ -43,8 +43,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
43
43
|
unstyled: boolean;
|
|
44
44
|
placeholder: string;
|
|
45
45
|
invalid: boolean;
|
|
46
|
-
todayLabel: string;
|
|
47
46
|
clearLabel: string;
|
|
47
|
+
todayLabel: string;
|
|
48
48
|
previousLabel: string;
|
|
49
49
|
nextLabel: string;
|
|
50
50
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -51,8 +51,8 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
51
51
|
placeholder: string;
|
|
52
52
|
separator: string;
|
|
53
53
|
invalid: boolean;
|
|
54
|
-
months: number;
|
|
55
54
|
clearLabel: string;
|
|
55
|
+
months: number;
|
|
56
56
|
previousLabel: string;
|
|
57
57
|
nextLabel: string;
|
|
58
58
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -51,11 +51,11 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
51
51
|
"onUpdate:modelValue"?: ((value: File[]) => any) | undefined;
|
|
52
52
|
onReject?: ((rejections: FileRejection[]) => any) | undefined;
|
|
53
53
|
}>, {
|
|
54
|
-
unstyled: boolean;
|
|
55
54
|
label: string;
|
|
55
|
+
unstyled: boolean;
|
|
56
56
|
invalid: boolean;
|
|
57
|
-
browseLabel: string;
|
|
58
57
|
removeLabel: string;
|
|
58
|
+
browseLabel: string;
|
|
59
59
|
tooLargeText: string;
|
|
60
60
|
wrongTypeText: string;
|
|
61
61
|
tooManyText: string;
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import type { IconLike } from '../composables/icon';
|
|
2
2
|
export interface IconProps {
|
|
3
3
|
icon?: IconLike;
|
|
4
|
+
/**
|
|
5
|
+
* Names the icon for assistive technology. Icons are decorative by default
|
|
6
|
+
* and hidden; set this only when the icon is the sole carrier of meaning,
|
|
7
|
+
* such as inside a control with no visible text.
|
|
8
|
+
*/
|
|
9
|
+
label?: string;
|
|
4
10
|
class?: string;
|
|
5
11
|
}
|
|
6
12
|
declare const __VLS_export: import("vue").DefineComponent<IconProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<IconProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
@@ -1,25 +1,27 @@
|
|
|
1
1
|
import { isIconArray as e } from "../composables/icon.js";
|
|
2
|
-
import { computed as t, createBlock as n, createCommentVNode as r, defineComponent as i,
|
|
2
|
+
import { computed as t, createBlock as n, createCommentVNode as r, defineComponent as i, mergeProps as a, openBlock as o, resolveDynamicComponent as s, unref as c } from "vue";
|
|
3
3
|
import { HugeiconsIcon as l } from "@hugeicons/vue";
|
|
4
4
|
//#region src/components/Icon.vue?vue&type=script&setup=true&lang.ts
|
|
5
5
|
var u = /*@__PURE__*/ i({
|
|
6
6
|
__name: "Icon",
|
|
7
7
|
props: {
|
|
8
8
|
icon: {},
|
|
9
|
+
label: {},
|
|
9
10
|
class: {}
|
|
10
11
|
},
|
|
11
12
|
setup(i) {
|
|
12
|
-
let u = i, d = t(() => u.icon && e(u.icon) ? u.icon : void 0)
|
|
13
|
-
|
|
13
|
+
let u = i, d = t(() => u.icon && e(u.icon) ? u.icon : void 0), f = t(() => u.label ? {
|
|
14
|
+
role: "img",
|
|
15
|
+
"aria-label": u.label
|
|
16
|
+
} : { "aria-hidden": "true" });
|
|
17
|
+
return (e, t) => d.value ? (o(), n(c(l), a({
|
|
14
18
|
key: 0,
|
|
15
19
|
icon: d.value,
|
|
16
|
-
class:
|
|
17
|
-
|
|
18
|
-
}, null, 8, ["icon", "class"])) : u.icon ? (o(), n(s(u.icon), {
|
|
20
|
+
class: u.class
|
|
21
|
+
}, f.value), null, 16, ["icon", "class"])) : u.icon ? (o(), n(s(u.icon), a({
|
|
19
22
|
key: 1,
|
|
20
|
-
class:
|
|
21
|
-
|
|
22
|
-
}, null, 8, ["class"])) : r("", !0);
|
|
23
|
+
class: u.class
|
|
24
|
+
}, f.value), null, 16, ["class"])) : r("", !0);
|
|
23
25
|
}
|
|
24
26
|
});
|
|
25
27
|
//#endregion
|
|
@@ -60,9 +60,9 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {
|
|
|
60
60
|
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
61
61
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
62
62
|
}>, {
|
|
63
|
+
label: string;
|
|
63
64
|
unstyled: boolean;
|
|
64
65
|
orientation: "horizontal" | "vertical";
|
|
65
|
-
label: string;
|
|
66
66
|
columns: 1 | 2 | 3;
|
|
67
67
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
68
68
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|