iryx-ui 0.11.0 → 0.13.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 +35 -1235
- package/dist/component-names.d.ts +1 -1
- package/dist/component-names.js +1 -1
- package/dist/components/Accordion.js +5 -0
- package/dist/components/Accordion.vue.d.ts +80 -0
- package/dist/components/Accordion.vue_vue_type_script_setup_true_lang.js +87 -0
- package/dist/components/Alert.vue.d.ts +1 -1
- package/dist/components/Alert.vue_vue_type_script_setup_true_lang.js +43 -43
- package/dist/components/App.vue.d.ts +1 -1
- package/dist/components/AppShell.js +5 -0
- package/dist/components/AppShell.vue.d.ts +46 -0
- package/dist/components/AppShell.vue_vue_type_script_setup_true_lang.js +59 -0
- package/dist/components/AspectRatio.js +5 -0
- package/dist/components/AspectRatio.vue.d.ts +26 -0
- package/dist/components/AspectRatio.vue_vue_type_script_setup_true_lang.js +27 -0
- package/dist/components/Avatar.js +5 -0
- package/dist/components/Avatar.vue.d.ts +52 -0
- package/dist/components/Avatar.vue_vue_type_script_setup_true_lang.js +67 -0
- package/dist/components/AvatarGroup.js +5 -0
- package/dist/components/AvatarGroup.vue.d.ts +39 -0
- package/dist/components/AvatarGroup.vue_vue_type_script_setup_true_lang.js +45 -0
- package/dist/components/Badge.vue.d.ts +1 -1
- package/dist/components/Banner.vue.d.ts +2 -2
- package/dist/components/Banner.vue_vue_type_script_setup_true_lang.js +40 -40
- package/dist/components/BarChart.vue.d.ts +1 -1
- package/dist/components/BarChart.vue_vue_type_script_setup_true_lang.js +14 -14
- package/dist/components/Breadcrumb.vue_vue_type_script_setup_true_lang.js +28 -28
- package/dist/components/Button.vue.d.ts +2 -2
- package/dist/components/Button.vue_vue_type_script_setup_true_lang.js +14 -14
- package/dist/components/ButtonGroup.vue.d.ts +1 -1
- package/dist/components/Card.vue.d.ts +1 -1
- package/dist/components/Checkbox.vue_vue_type_script_setup_true_lang.js +37 -30
- package/dist/components/Collapsible.js +5 -0
- package/dist/components/Collapsible.vue.d.ts +58 -0
- package/dist/components/Collapsible.vue_vue_type_script_setup_true_lang.js +67 -0
- package/dist/components/ColorPicker.js +5 -0
- package/dist/components/ColorPicker.vue.d.ts +49 -0
- package/dist/components/ColorPicker.vue_vue_type_script_setup_true_lang.js +172 -0
- package/dist/components/Combobox.vue.d.ts +6 -6
- package/dist/components/Combobox.vue_vue_type_script_setup_true_lang.js +62 -60
- package/dist/components/CommandPalette.js +5 -0
- package/dist/components/CommandPalette.vue.d.ts +63 -0
- package/dist/components/CommandPalette.vue_vue_type_script_setup_true_lang.js +185 -0
- package/dist/components/Container.js +5 -0
- package/dist/components/Container.vue.d.ts +33 -0
- package/dist/components/Container.vue_vue_type_script_setup_true_lang.js +40 -0
- package/dist/components/ContextMenu.js +5 -0
- package/dist/components/ContextMenu.vue.d.ts +42 -0
- package/dist/components/ContextMenu.vue_vue_type_script_setup_true_lang.js +49 -0
- package/dist/components/DatePicker.vue_vue_type_script_setup_true_lang.js +65 -65
- package/dist/components/DateRangePicker.vue.d.ts +1 -1
- package/dist/components/DateRangePicker.vue_vue_type_script_setup_true_lang.js +74 -74
- package/dist/components/Dialog.vue.d.ts +1 -1
- 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/EmptyState.vue.d.ts +1 -1
- 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.d.ts +1 -1
- package/dist/components/Input.vue_vue_type_script_setup_true_lang.js +33 -33
- package/dist/components/Kbd.js +5 -0
- package/dist/components/Kbd.vue.d.ts +46 -0
- package/dist/components/Kbd.vue_vue_type_script_setup_true_lang.js +41 -0
- package/dist/components/LineChart.vue_vue_type_script_setup_true_lang.js +19 -19
- package/dist/components/Menubar.js +5 -0
- package/dist/components/Menubar.vue.d.ts +62 -0
- package/dist/components/Menubar.vue_vue_type_script_setup_true_lang.js +79 -0
- package/dist/components/NavigationMenu.js +5 -0
- package/dist/components/NavigationMenu.vue.d.ts +75 -0
- package/dist/components/NavigationMenu.vue_vue_type_script_setup_true_lang.js +167 -0
- package/dist/components/NumberInput.vue_vue_type_script_setup_true_lang.js +68 -66
- package/dist/components/PageHeader.js +5 -0
- package/dist/components/PageHeader.vue.d.ts +52 -0
- package/dist/components/PageHeader.vue_vue_type_script_setup_true_lang.js +59 -0
- 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/PinInput.js +5 -0
- package/dist/components/PinInput.vue.d.ts +65 -0
- package/dist/components/PinInput.vue_vue_type_script_setup_true_lang.js +76 -0
- package/dist/components/Popover.js +5 -0
- package/dist/components/Popover.vue.d.ts +75 -0
- package/dist/components/Popover.vue_vue_type_script_setup_true_lang.js +99 -0
- package/dist/components/Progress.vue.d.ts +20 -1
- package/dist/components/Progress.vue_vue_type_script_setup_true_lang.js +85 -42
- package/dist/components/RadioGroup.vue_vue_type_script_setup_true_lang.js +4 -1
- package/dist/components/ScrollArea.js +5 -0
- package/dist/components/ScrollArea.vue.d.ts +41 -0
- package/dist/components/ScrollArea.vue_vue_type_script_setup_true_lang.js +68 -0
- package/dist/components/ScrollFade.js +5 -0
- package/dist/components/ScrollFade.vue.d.ts +36 -0
- package/dist/components/ScrollFade.vue_vue_type_script_setup_true_lang.js +59 -0
- package/dist/components/Select.vue.d.ts +2 -2
- package/dist/components/Select.vue_vue_type_script_setup_true_lang.js +47 -45
- package/dist/components/Sidebar.js +5 -0
- package/dist/components/Sidebar.vue.d.ts +72 -0
- package/dist/components/Sidebar.vue_vue_type_script_setup_true_lang.js +183 -0
- package/dist/components/SignaturePad.js +5 -0
- package/dist/components/SignaturePad.vue.d.ts +60 -0
- package/dist/components/SignaturePad.vue_vue_type_script_setup_true_lang.js +158 -0
- package/dist/components/Skeleton.vue.d.ts +1 -1
- package/dist/components/Skeleton.vue_vue_type_script_setup_true_lang.js +8 -8
- package/dist/components/Slider.js +5 -0
- package/dist/components/Slider.vue.d.ts +80 -0
- package/dist/components/Slider.vue_vue_type_script_setup_true_lang.js +115 -0
- package/dist/components/Splitter.js +5 -0
- package/dist/components/Splitter.vue.d.ts +59 -0
- package/dist/components/Splitter.vue_vue_type_script_setup_true_lang.js +69 -0
- package/dist/components/Stat.vue.d.ts +1 -1
- 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.d.ts +1 -0
- package/dist/components/Switch.vue_vue_type_script_setup_true_lang.js +16 -5
- package/dist/components/Table.vue.d.ts +7 -1
- package/dist/components/Table.vue_vue_type_script_setup_true_lang.js +120 -105
- package/dist/components/TagsInput.js +5 -0
- package/dist/components/TagsInput.vue.d.ts +71 -0
- package/dist/components/TagsInput.vue_vue_type_script_setup_true_lang.js +119 -0
- package/dist/components/Textarea.vue_vue_type_script_setup_true_lang.js +3 -3
- package/dist/components/TimeField.js +5 -0
- package/dist/components/TimeField.vue.d.ts +50 -0
- package/dist/components/TimeField.vue_vue_type_script_setup_true_lang.js +85 -0
- package/dist/components/Timeline.js +5 -0
- package/dist/components/Timeline.vue.d.ts +61 -0
- package/dist/components/Timeline.vue_vue_type_script_setup_true_lang.js +60 -0
- package/dist/components/Toaster.vue.d.ts +1 -1
- package/dist/components/Toaster.vue_vue_type_script_setup_true_lang.js +41 -41
- package/dist/components/Toggle.js +5 -0
- package/dist/components/Toggle.vue.d.ts +42 -0
- package/dist/components/Toggle.vue_vue_type_script_setup_true_lang.js +52 -0
- package/dist/components/ToggleGroup.js +5 -0
- package/dist/components/ToggleGroup.vue.d.ts +64 -0
- package/dist/components/ToggleGroup.vue_vue_type_script_setup_true_lang.js +78 -0
- package/dist/components/Toolbar.js +5 -0
- package/dist/components/Toolbar.vue.d.ts +52 -0
- package/dist/components/Toolbar.vue_vue_type_script_setup_true_lang.js +94 -0
- package/dist/components/Tree.js +5 -0
- package/dist/components/Tree.vue.d.ts +70 -0
- package/dist/components/Tree.vue_vue_type_script_setup_true_lang.js +112 -0
- package/dist/components/index.d.ts +30 -0
- package/dist/components/index.js +144 -84
- package/dist/composables/appearance.js +5 -1
- package/dist/composables/cartesian.d.ts +11 -0
- package/dist/composables/cartesian.js +18 -19
- package/dist/composables/command-palette.d.ts +42 -0
- package/dist/composables/command-palette.js +32 -0
- package/dist/composables/date.d.ts +18 -2
- package/dist/composables/date.js +23 -15
- package/dist/composables/kbd.d.ts +26 -0
- package/dist/composables/kbd.js +161 -0
- package/dist/composables/navigation-menu.d.ts +29 -0
- package/dist/composables/navigation-menu.js +6 -0
- package/dist/composables/scroll-fade.d.ts +35 -0
- package/dist/composables/scroll-fade.js +36 -0
- package/dist/composables/sidebar.d.ts +35 -0
- package/dist/composables/sidebar.js +23 -0
- package/dist/composables/signature.d.ts +22 -0
- package/dist/composables/signature.js +13 -0
- package/dist/index.d.ts +36 -0
- package/dist/index.js +153 -92
- package/dist/theme/accordion.d.ts +68 -0
- package/dist/theme/accordion.js +24 -0
- package/dist/theme/alert.d.ts +0 -3
- package/dist/theme/app-shell.d.ts +77 -0
- package/dist/theme/app-shell.js +35 -0
- package/dist/theme/avatar.d.ts +253 -0
- package/dist/theme/avatar.js +84 -0
- package/dist/theme/banner.d.ts +0 -9
- package/dist/theme/bar-chart.d.ts +0 -16
- package/dist/theme/breadcrumb.d.ts +3 -3
- package/dist/theme/button-group.d.ts +0 -3
- package/dist/theme/button.d.ts +0 -3
- package/dist/theme/card.js +2 -2
- package/dist/theme/chart-legend.d.ts +3 -11
- package/dist/theme/collapsible.d.ts +44 -0
- package/dist/theme/collapsible.js +17 -0
- package/dist/theme/color-picker.d.ts +98 -0
- package/dist/theme/color-picker.js +19 -0
- package/dist/theme/command-palette.d.ts +122 -0
- package/dist/theme/command-palette.js +22 -0
- package/dist/theme/container.d.ts +101 -0
- package/dist/theme/container.js +26 -0
- package/dist/theme/date-picker.d.ts +12 -0
- package/dist/theme/date-picker.js +1 -1
- package/dist/theme/drawer.d.ts +110 -0
- package/dist/theme/drawer.js +100 -0
- package/dist/theme/dropdown-menu.d.ts +0 -9
- package/dist/theme/file-upload.d.ts +0 -3
- package/dist/theme/form.d.ts +12 -12
- package/dist/theme/index.d.ts +26 -0
- package/dist/theme/kbd.d.ts +71 -0
- package/dist/theme/kbd.js +29 -0
- package/dist/theme/line-chart.d.ts +0 -9
- package/dist/theme/menubar.d.ts +29 -0
- package/dist/theme/menubar.js +11 -0
- package/dist/theme/navigation-menu.d.ts +161 -0
- package/dist/theme/navigation-menu.js +43 -0
- package/dist/theme/number-input.d.ts +0 -3
- package/dist/theme/page-header.d.ts +47 -0
- package/dist/theme/page-header.js +17 -0
- package/dist/theme/pagination.d.ts +0 -3
- package/dist/theme/pin-input.d.ts +86 -0
- package/dist/theme/pin-input.js +32 -0
- package/dist/theme/popover.d.ts +119 -0
- package/dist/theme/popover.js +31 -0
- package/dist/theme/presets.d.ts +0 -2
- package/dist/theme/progress.d.ts +93 -0
- package/dist/theme/progress.js +37 -7
- package/dist/theme/radio-group.d.ts +24 -0
- package/dist/theme/radio-group.js +23 -14
- package/dist/theme/scroll-area.d.ts +65 -0
- package/dist/theme/scroll-area.js +57 -0
- package/dist/theme/scroll-fade.d.ts +35 -0
- package/dist/theme/scroll-fade.js +12 -0
- package/dist/theme/sidebar.d.ts +167 -0
- package/dist/theme/sidebar.js +43 -0
- package/dist/theme/signature-pad.d.ts +50 -0
- package/dist/theme/signature-pad.js +17 -0
- package/dist/theme/slider.d.ts +128 -0
- package/dist/theme/slider.js +49 -0
- package/dist/theme/sparkline.d.ts +0 -6
- package/dist/theme/splitter.d.ts +59 -0
- package/dist/theme/splitter.js +25 -0
- package/dist/theme/stat.d.ts +0 -3
- package/dist/theme/stepper.js +2 -2
- package/dist/theme/switch.d.ts +53 -29
- package/dist/theme/switch.js +33 -8
- package/dist/theme/table.d.ts +51 -3
- package/dist/theme/table.js +8 -3
- package/dist/theme/tabs.d.ts +0 -3
- package/dist/theme/tags-input.d.ts +110 -0
- package/dist/theme/tags-input.js +42 -0
- package/dist/theme/time-field.d.ts +68 -0
- package/dist/theme/time-field.js +21 -0
- package/dist/theme/timeline.d.ts +182 -0
- package/dist/theme/timeline.js +83 -0
- package/dist/theme/toggle.d.ts +145 -0
- package/dist/theme/toggle.js +84 -0
- package/dist/theme/toolbar.d.ts +56 -0
- package/dist/theme/toolbar.js +21 -0
- package/dist/theme/tree.d.ts +68 -0
- package/dist/theme/tree.js +28 -0
- package/package.json +4 -3
- package/theme.css +335 -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,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import n from "
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { useIryxUiConfig as e } from "../config.js";
|
|
2
|
+
import t from "./Icon.js";
|
|
3
|
+
import { stepperTheme as n } from "../theme/stepper.js";
|
|
4
|
+
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, 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";
|
|
5
|
+
import { Tick02Icon as x } from "@hugeicons/core-free-icons";
|
|
6
6
|
import { StepperDescription as S, StepperIndicator as C, StepperItem as w, StepperRoot as T, StepperSeparator as E, StepperTitle as D, StepperTrigger as O } from "reka-ui";
|
|
7
7
|
//#region src/components/Stepper.vue?vue&type=script&setup=true&lang.ts
|
|
8
|
-
var k = /*@__PURE__*/
|
|
8
|
+
var k = /*@__PURE__*/ d({
|
|
9
9
|
__name: "Stepper",
|
|
10
|
-
props: /*@__PURE__*/
|
|
10
|
+
props: /*@__PURE__*/ f({
|
|
11
11
|
items: {},
|
|
12
12
|
orientation: {},
|
|
13
13
|
linear: {
|
|
@@ -25,51 +25,51 @@ var k = /*@__PURE__*/ f({
|
|
|
25
25
|
modelModifiers: {}
|
|
26
26
|
}),
|
|
27
27
|
emits: ["update:modelValue"],
|
|
28
|
-
setup(
|
|
29
|
-
let
|
|
28
|
+
setup(d) {
|
|
29
|
+
let f = d, k = y(d, "modelValue"), A = i(() => (f.items ?? []).map((e) => typeof e == "string" ? { title: e } : e)), j = e(), M = i(() => f.unstyled ?? j.unstyled), N = i(() => n({ orientation: f.orientation }));
|
|
30
30
|
function P(e) {
|
|
31
|
-
let t =
|
|
31
|
+
let t = f.ui?.[e];
|
|
32
32
|
return M.value ? t : N.value[e]({ class: t });
|
|
33
33
|
}
|
|
34
|
-
let F =
|
|
35
|
-
return (
|
|
34
|
+
let F = i(() => M.value ? [f.ui?.root, f.class] : N.value.root({ class: [f.ui?.root, f.class] }));
|
|
35
|
+
return (e, n) => (m(), a(v(T), {
|
|
36
36
|
modelValue: k.value,
|
|
37
|
-
"onUpdate:modelValue":
|
|
38
|
-
orientation:
|
|
39
|
-
linear:
|
|
40
|
-
class:
|
|
37
|
+
"onUpdate:modelValue": n[0] ||= (e) => k.value = e,
|
|
38
|
+
orientation: f.orientation,
|
|
39
|
+
linear: f.linear,
|
|
40
|
+
class: p(F.value)
|
|
41
41
|
}, {
|
|
42
|
-
default:
|
|
43
|
-
key:
|
|
44
|
-
step:
|
|
45
|
-
disabled:
|
|
46
|
-
class:
|
|
42
|
+
default: b(() => [(m(!0), s(r, null, h(A.value, (n, i) => (m(), a(v(w), {
|
|
43
|
+
key: i,
|
|
44
|
+
step: i + 1,
|
|
45
|
+
disabled: n.disabled,
|
|
46
|
+
class: p(P("item"))
|
|
47
47
|
}, {
|
|
48
|
-
default:
|
|
49
|
-
default:
|
|
50
|
-
default:
|
|
51
|
-
step:
|
|
52
|
-
item:
|
|
53
|
-
}, () => [
|
|
48
|
+
default: b(() => [u(v(O), { class: p(P("trigger")) }, {
|
|
49
|
+
default: b(() => [u(v(C), { class: p(P("indicator")) }, {
|
|
50
|
+
default: b(() => [g(e.$slots, "indicator", {
|
|
51
|
+
step: i + 1,
|
|
52
|
+
item: n
|
|
53
|
+
}, () => [i + 1 < k.value ? (m(), a(t, {
|
|
54
54
|
key: 0,
|
|
55
|
-
icon:
|
|
56
|
-
}, null, 8, ["icon"])) : (
|
|
55
|
+
icon: v(x)
|
|
56
|
+
}, null, 8, ["icon"])) : (m(), s(r, { key: 1 }, [l(_(i + 1), 1)], 64))])]),
|
|
57
57
|
_: 2
|
|
58
|
-
}, 1032, ["class"]),
|
|
59
|
-
default:
|
|
58
|
+
}, 1032, ["class"]), c("span", { class: p(P("content")) }, [u(v(D), { class: p(P("title")) }, {
|
|
59
|
+
default: b(() => [l(_(n.title), 1)]),
|
|
60
60
|
_: 2
|
|
61
|
-
}, 1032, ["class"]),
|
|
61
|
+
}, 1032, ["class"]), n.description ? (m(), a(v(S), {
|
|
62
62
|
key: 0,
|
|
63
|
-
class:
|
|
63
|
+
class: p(P("description"))
|
|
64
64
|
}, {
|
|
65
|
-
default:
|
|
65
|
+
default: b(() => [l(_(n.description), 1)]),
|
|
66
66
|
_: 2
|
|
67
|
-
}, 1032, ["class"])) :
|
|
67
|
+
}, 1032, ["class"])) : o("", !0)], 2)]),
|
|
68
68
|
_: 2
|
|
69
|
-
}, 1032, ["class"]),
|
|
69
|
+
}, 1032, ["class"]), i < A.value.length - 1 ? (m(), a(v(E), {
|
|
70
70
|
key: 0,
|
|
71
|
-
class:
|
|
72
|
-
}, null, 8, ["class"])) :
|
|
71
|
+
class: p(P("separator"))
|
|
72
|
+
}, null, 8, ["class"])) : o("", !0)]),
|
|
73
73
|
_: 2
|
|
74
74
|
}, 1032, [
|
|
75
75
|
"step",
|
|
@@ -4,6 +4,7 @@ export interface SwitchProps extends SwitchRootProps {
|
|
|
4
4
|
label?: string;
|
|
5
5
|
/** Secondary text under the label, e.g. what the setting does. */
|
|
6
6
|
description?: string;
|
|
7
|
+
size?: 'sm' | 'md' | 'lg';
|
|
7
8
|
id?: string;
|
|
8
9
|
/** Skip built-in classes; you take over styling entirely. */
|
|
9
10
|
unstyled?: boolean;
|
|
@@ -4,10 +4,12 @@ import { computed as n, createBlock as r, createCommentVNode as i, createElement
|
|
|
4
4
|
import { Label as _, SwitchRoot as v, SwitchThumb as y, useForwardPropsEmits as b, useId as x } from "reka-ui";
|
|
5
5
|
//#region src/components/Switch.vue?vue&type=script&setup=true&lang.ts
|
|
6
6
|
var S = ["id"], C = /*@__PURE__*/ l({
|
|
7
|
+
inheritAttrs: !1,
|
|
7
8
|
__name: "Switch",
|
|
8
9
|
props: {
|
|
9
10
|
label: {},
|
|
10
11
|
description: {},
|
|
12
|
+
size: {},
|
|
11
13
|
id: {},
|
|
12
14
|
unstyled: {
|
|
13
15
|
type: Boolean,
|
|
@@ -29,13 +31,19 @@ var S = ["id"], C = /*@__PURE__*/ l({
|
|
|
29
31
|
emits: ["update:modelValue"],
|
|
30
32
|
setup(l, { emit: C }) {
|
|
31
33
|
let w = l, T = C, E = b(n(() => {
|
|
32
|
-
let { label: e, description: t,
|
|
33
|
-
return
|
|
34
|
-
}), T), D = x(), O = n(() => w.id ?? D), k = n(() => !!(w.label || w.description)), A = e(), j = n(() => w.unstyled ?? A.unstyled), M =
|
|
34
|
+
let { label: e, description: t, size: n, id: r, unstyled: i, class: a, ui: o, ...s } = w;
|
|
35
|
+
return s;
|
|
36
|
+
}), T), D = x(), O = n(() => w.id ?? D), k = n(() => !!(w.label || w.description)), A = e(), j = n(() => w.unstyled ?? A.unstyled), M = n(() => t({
|
|
37
|
+
size: w.size,
|
|
38
|
+
withText: k.value
|
|
39
|
+
})), N = n(() => j.value ? w.ui?.wrapper : M.value.wrapper({ class: w.ui?.wrapper })), P = n(() => j.value ? [w.ui?.root, w.class] : M.value.root({ class: [w.ui?.root, w.class] })), F = n(() => j.value ? w.ui?.thumb : M.value.thumb({ class: w.ui?.thumb })), I = n(() => j.value ? w.ui?.content : M.value.content({ class: w.ui?.content })), L = n(() => j.value ? w.ui?.label : M.value.label({ class: w.ui?.label })), R = n(() => j.value ? w.ui?.description : M.value.description({ class: w.ui?.description }));
|
|
35
40
|
return (e, t) => k.value ? (f(), a("div", {
|
|
36
41
|
key: 0,
|
|
37
42
|
class: d(N.value)
|
|
38
|
-
}, [c(h(v), u({ id: O.value },
|
|
43
|
+
}, [c(h(v), u({ id: O.value }, {
|
|
44
|
+
...h(E),
|
|
45
|
+
...e.$attrs
|
|
46
|
+
}, {
|
|
39
47
|
"aria-describedby": w.description ? `${O.value}-description` : void 0,
|
|
40
48
|
class: P.value
|
|
41
49
|
}), {
|
|
@@ -58,7 +66,10 @@ var S = ["id"], C = /*@__PURE__*/ l({
|
|
|
58
66
|
}, [p(e.$slots, "description", {}, () => [s(m(w.description), 1)])], 10, S)) : i("", !0)], 2)], 2)) : (f(), r(h(v), u({
|
|
59
67
|
key: 1,
|
|
60
68
|
id: w.id
|
|
61
|
-
},
|
|
69
|
+
}, {
|
|
70
|
+
...h(E),
|
|
71
|
+
...e.$attrs
|
|
72
|
+
}, { class: P.value }), {
|
|
62
73
|
default: g(() => [c(h(y), { class: d(F.value) }, null, 8, ["class"])]),
|
|
63
74
|
_: 1
|
|
64
75
|
}, 16, ["id", "class"]));
|
|
@@ -13,7 +13,7 @@ export interface TableProps<Row = any> {
|
|
|
13
13
|
rowKey?: string;
|
|
14
14
|
loading?: boolean;
|
|
15
15
|
/** Rows of skeletons while `loading` and there is nothing to show yet. */
|
|
16
|
-
|
|
16
|
+
skeletonRows?: number;
|
|
17
17
|
selectable?: boolean;
|
|
18
18
|
/** Veto selection per row — the checkbox is hidden and the header skips it. */
|
|
19
19
|
isRowSelectable?: (row: Row) => boolean;
|
|
@@ -28,6 +28,8 @@ export interface TableProps<Row = any> {
|
|
|
28
28
|
size?: 'sm' | 'md' | 'lg';
|
|
29
29
|
/** Text when there are no rows. Overridden by the `empty` slot. */
|
|
30
30
|
emptyText?: string;
|
|
31
|
+
/** Accessible name for the actions column, whose header is blank. */
|
|
32
|
+
actionsLabel?: string;
|
|
31
33
|
/** Accessible name for the table, since a visible caption is optional. */
|
|
32
34
|
label?: string;
|
|
33
35
|
caption?: string;
|
|
@@ -113,6 +115,10 @@ declare const __VLS_export: <T = any>(__VLS_props: NonNullable<Awaited<typeof __
|
|
|
113
115
|
caption?: (props: {}) => any;
|
|
114
116
|
} & {
|
|
115
117
|
empty?: (props: {}) => any;
|
|
118
|
+
} & {
|
|
119
|
+
'row-actions'?: (props: {
|
|
120
|
+
row: T;
|
|
121
|
+
}) => any;
|
|
116
122
|
} & {
|
|
117
123
|
expanded?: (props: {
|
|
118
124
|
row: T;
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
1
|
+
import { useIryxUiConfig as e } from "../config.js";
|
|
2
|
+
import t from "./Icon.js";
|
|
3
|
+
import n from "./Checkbox.js";
|
|
4
|
+
import r from "./Skeleton.js";
|
|
5
|
+
import { useDataTable as i } from "../composables/data-table.js";
|
|
6
|
+
import { tableTheme as a } from "../theme/table.js";
|
|
7
|
+
import { Fragment as o, computed as s, createBlock as c, createCommentVNode as l, createElementBlock as u, createElementVNode as d, createTextVNode as f, createVNode as p, defineComponent as m, mergeModels as h, normalizeClass as g, normalizeStyle as _, openBlock as v, renderList as y, renderSlot as b, toDisplayString as x, unref as S, useModel as C, useSlots as w, withModifiers as T } from "vue";
|
|
8
|
+
import { ArrowDown01Icon as E, ArrowRight01Icon as D, ArrowUp01Icon as O, UnfoldMoreIcon as ee } from "@hugeicons/core-free-icons";
|
|
9
9
|
//#region src/components/Table.vue?vue&type=script&setup=true&lang.ts
|
|
10
|
-
var
|
|
10
|
+
var te = ["aria-label", "aria-busy"], ne = ["aria-sort"], k = ["onClick"], A = { class: "sr-only" }, j = { key: 1 }, M = ["colspan"], N = ["data-selected", "onClick"], P = ["aria-expanded", "onClick"], F = ["colspan"], I = /*@__PURE__*/ m({
|
|
11
11
|
__name: "Table",
|
|
12
|
-
props: /*@__PURE__*/
|
|
12
|
+
props: /*@__PURE__*/ h({
|
|
13
13
|
rows: { default: () => [] },
|
|
14
14
|
columns: { default: () => [] },
|
|
15
15
|
total: { default: void 0 },
|
|
16
16
|
rowKey: { default: "id" },
|
|
17
17
|
loading: { type: Boolean },
|
|
18
|
-
|
|
18
|
+
skeletonRows: { default: 5 },
|
|
19
19
|
selectable: { type: Boolean },
|
|
20
20
|
isRowSelectable: {},
|
|
21
21
|
expandable: { type: Boolean },
|
|
@@ -29,6 +29,7 @@ var k = ["aria-label", "aria-busy"], A = ["aria-sort"], j = ["onClick"], M = { k
|
|
|
29
29
|
stickyHeader: { type: Boolean },
|
|
30
30
|
size: {},
|
|
31
31
|
emptyText: { default: "No results." },
|
|
32
|
+
actionsLabel: { default: "Actions" },
|
|
32
33
|
label: {},
|
|
33
34
|
caption: {},
|
|
34
35
|
unstyled: {
|
|
@@ -49,15 +50,15 @@ var k = ["aria-label", "aria-busy"], A = ["aria-sort"], j = ["onClick"], M = { k
|
|
|
49
50
|
expanded: { default: () => [] },
|
|
50
51
|
expandedModifiers: {}
|
|
51
52
|
}),
|
|
52
|
-
emits: /*@__PURE__*/
|
|
53
|
+
emits: /*@__PURE__*/ h(["rowClick"], [
|
|
53
54
|
"update:sort",
|
|
54
55
|
"update:page",
|
|
55
56
|
"update:perPage",
|
|
56
57
|
"update:selection",
|
|
57
58
|
"update:expanded"
|
|
58
59
|
]),
|
|
59
|
-
setup(
|
|
60
|
-
let L =
|
|
60
|
+
setup(m, { expose: h, emit: I }) {
|
|
61
|
+
let L = m, R = I, z = C(m, "sort"), B = C(m, "page"), V = C(m, "perPage"), H = C(m, "selection"), U = C(m, "expanded"), W = i({
|
|
61
62
|
rows: () => L.rows,
|
|
62
63
|
columns: () => L.columns,
|
|
63
64
|
total: () => L.total,
|
|
@@ -68,149 +69,163 @@ var k = ["aria-label", "aria-busy"], A = ["aria-sort"], j = ["onClick"], M = { k
|
|
|
68
69
|
perPage: V,
|
|
69
70
|
selection: H,
|
|
70
71
|
expanded: U
|
|
71
|
-
}), G =
|
|
72
|
+
}), G = w(), K = e(), q = s(() => L.unstyled ?? K.unstyled), J = s(() => a({
|
|
72
73
|
size: L.size,
|
|
73
74
|
striped: L.striped,
|
|
74
75
|
hoverable: L.hoverable ?? !0,
|
|
75
76
|
stickyHeader: L.stickyHeader,
|
|
76
|
-
clickable: L.clickableRows
|
|
77
|
+
clickable: L.clickableRows,
|
|
78
|
+
loading: !!L.loading && W.pageRows.value.length > 0
|
|
77
79
|
}));
|
|
78
|
-
function
|
|
80
|
+
function Y(e, t) {
|
|
79
81
|
let n = L.ui?.[e];
|
|
80
|
-
return
|
|
82
|
+
return q.value ? [n, t] : J.value[e]({ class: [n, t] });
|
|
81
83
|
}
|
|
82
|
-
function
|
|
83
|
-
return
|
|
84
|
+
function X(e) {
|
|
85
|
+
return q.value ? void 0 : J.value[e]();
|
|
84
86
|
}
|
|
85
|
-
let
|
|
87
|
+
let re = s(() => q.value ? [L.ui?.root, L.class] : J.value.root({ class: [L.ui?.root, L.class] }));
|
|
86
88
|
function Z(e) {
|
|
87
|
-
if (
|
|
89
|
+
if (q.value) return;
|
|
88
90
|
let t = e.align ?? (e.numeric ? "end" : "start");
|
|
89
91
|
if (t !== "start") return t === "end" ? "text-end" : "text-center";
|
|
90
92
|
}
|
|
91
|
-
function
|
|
92
|
-
return !
|
|
93
|
+
function ie(e) {
|
|
94
|
+
return !q.value && e.numeric ? "tabular-nums" : void 0;
|
|
93
95
|
}
|
|
94
|
-
function
|
|
96
|
+
function ae(e, t) {
|
|
95
97
|
return typeof t.class == "function" ? t.class(e) : t.class;
|
|
96
98
|
}
|
|
97
|
-
function
|
|
99
|
+
function oe(e, t) {
|
|
98
100
|
return typeof t.hidden == "function" ? t.hidden(e) : !1;
|
|
99
101
|
}
|
|
100
|
-
let
|
|
101
|
-
function
|
|
102
|
+
let Q = s(() => W.visibleColumns.value.length + +!!L.selectable + +!!L.expandable + +!!G["row-actions"]), $ = s(() => L.loading && W.pageRows.value.length === 0), se = s(() => !L.loading && W.pageRows.value.length === 0);
|
|
103
|
+
function ce(e) {
|
|
102
104
|
if (!e.sortable) return;
|
|
103
105
|
let t = W.sortOrderFor(e);
|
|
104
106
|
return t === "asc" ? "ascending" : t === "desc" ? "descending" : "none";
|
|
105
107
|
}
|
|
106
|
-
function
|
|
108
|
+
function le(e) {
|
|
107
109
|
L.clickableRows && R("rowClick", e);
|
|
108
110
|
}
|
|
109
|
-
return
|
|
110
|
-
class:
|
|
111
|
+
return h({ table: W }), (e, i) => (v(), u("div", { class: g(re.value) }, [d("table", {
|
|
112
|
+
class: g(Y("table")),
|
|
111
113
|
"aria-label": L.label,
|
|
112
114
|
"aria-busy": L.loading || void 0
|
|
113
115
|
}, [
|
|
114
|
-
L.caption ||
|
|
116
|
+
L.caption || e.$slots.caption ? (v(), u("caption", {
|
|
115
117
|
key: 0,
|
|
116
|
-
class:
|
|
117
|
-
}, [
|
|
118
|
-
|
|
119
|
-
L.expandable ? (
|
|
118
|
+
class: g(Y("caption"))
|
|
119
|
+
}, [b(e.$slots, "caption", {}, () => [f(x(L.caption), 1)])], 2)) : l("", !0),
|
|
120
|
+
d("thead", { class: g(Y("thead")) }, [d("tr", null, [
|
|
121
|
+
L.expandable ? (v(), u("th", {
|
|
120
122
|
key: 0,
|
|
121
|
-
class:
|
|
122
|
-
}, null, 2)) :
|
|
123
|
-
L.selectable ? (
|
|
123
|
+
class: g(X("headGutter"))
|
|
124
|
+
}, null, 2)) : l("", !0),
|
|
125
|
+
L.selectable ? (v(), u("th", {
|
|
124
126
|
key: 1,
|
|
125
|
-
class:
|
|
126
|
-
}, [
|
|
127
|
-
"model-value":
|
|
127
|
+
class: g(X("headGutter"))
|
|
128
|
+
}, [p(n, {
|
|
129
|
+
"model-value": S(W).headerSelection.value,
|
|
128
130
|
"aria-label": "Select all rows on this page",
|
|
129
|
-
"onUpdate:modelValue":
|
|
130
|
-
}, null, 8, ["model-value", "onUpdate:modelValue"])], 2)) :
|
|
131
|
-
(
|
|
132
|
-
key:
|
|
133
|
-
class:
|
|
134
|
-
style:
|
|
135
|
-
"aria-sort":
|
|
131
|
+
"onUpdate:modelValue": S(W).toggleAll
|
|
132
|
+
}, null, 8, ["model-value", "onUpdate:modelValue"])], 2)) : l("", !0),
|
|
133
|
+
(v(!0), u(o, null, y(S(W).visibleColumns.value, (n) => (v(), u("th", {
|
|
134
|
+
key: n.key,
|
|
135
|
+
class: g(Y("th", Z(n))),
|
|
136
|
+
style: _(n.width ? { width: n.width } : void 0),
|
|
137
|
+
"aria-sort": ce(n),
|
|
136
138
|
scope: "col"
|
|
137
|
-
}, [
|
|
139
|
+
}, [b(e.$slots, `header-${n.key}`, { column: n }, () => [n.sortable ? (v(), u("button", {
|
|
138
140
|
key: 0,
|
|
139
141
|
type: "button",
|
|
140
|
-
class:
|
|
141
|
-
onClick: (e) =>
|
|
142
|
-
}, [
|
|
143
|
-
icon:
|
|
144
|
-
class:
|
|
145
|
-
}, null, 8, ["icon", "class"])], 10,
|
|
142
|
+
class: g(X("sortButton")),
|
|
143
|
+
onClick: (e) => S(W).toggleSort(n)
|
|
144
|
+
}, [f(x(n.label ?? n.key) + " ", 1), p(t, {
|
|
145
|
+
icon: S(W).sortOrderFor(n) === "asc" ? S(O) : S(W).sortOrderFor(n) === "desc" ? S(E) : S(ee),
|
|
146
|
+
class: g(X("sortIcon"))
|
|
147
|
+
}, null, 8, ["icon", "class"])], 10, k)) : (v(), u(o, { key: 1 }, [f(x(n.label ?? n.key), 1)], 64))])], 14, ne))), 128)),
|
|
148
|
+
e.$slots["row-actions"] ? (v(), u("th", {
|
|
149
|
+
key: 2,
|
|
150
|
+
class: g(X("headActions"))
|
|
151
|
+
}, [d("span", A, x(L.actionsLabel), 1)], 2)) : l("", !0)
|
|
146
152
|
])], 2),
|
|
147
|
-
|
|
148
|
-
key: `skeleton-${
|
|
149
|
-
class:
|
|
153
|
+
d("tbody", { class: g(Y("tbody")) }, [$.value ? (v(!0), u(o, { key: 0 }, y(L.skeletonRows, (t) => (v(), u("tr", {
|
|
154
|
+
key: `skeleton-${t}`,
|
|
155
|
+
class: g(Y("tr"))
|
|
150
156
|
}, [
|
|
151
|
-
L.expandable ? (
|
|
157
|
+
L.expandable ? (v(), u("td", {
|
|
152
158
|
key: 0,
|
|
153
|
-
class:
|
|
154
|
-
}, [
|
|
155
|
-
L.selectable ? (
|
|
159
|
+
class: g(X("gutter"))
|
|
160
|
+
}, [p(r, { class: "size-4" })], 2)) : l("", !0),
|
|
161
|
+
L.selectable ? (v(), u("td", {
|
|
156
162
|
key: 1,
|
|
157
|
-
class:
|
|
158
|
-
}, [
|
|
159
|
-
(
|
|
163
|
+
class: g(X("gutter"))
|
|
164
|
+
}, [p(r, { class: "size-4" })], 2)) : l("", !0),
|
|
165
|
+
(v(!0), u(o, null, y(S(W).visibleColumns.value, (e) => (v(), u("td", {
|
|
160
166
|
key: e.key,
|
|
161
|
-
class:
|
|
162
|
-
}, [
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
167
|
+
class: g(Y("td"))
|
|
168
|
+
}, [p(r, { class: "h-4 w-24" })], 2))), 128)),
|
|
169
|
+
e.$slots["row-actions"] ? (v(), u("td", {
|
|
170
|
+
key: 2,
|
|
171
|
+
class: g(X("actions"))
|
|
172
|
+
}, [p(r, { class: "size-4" })], 2)) : l("", !0)
|
|
173
|
+
], 2))), 128)) : se.value ? (v(), u("tr", j, [d("td", {
|
|
174
|
+
colspan: Q.value,
|
|
175
|
+
class: g(Y("empty"))
|
|
176
|
+
}, [b(e.$slots, "empty", {}, () => [f(x(L.emptyText), 1)])], 10, M)])) : (v(!0), u(o, { key: 2 }, y(S(W).pageRows.value, (r) => (v(), u(o, { key: S(W).keyOf(r) }, [d("tr", {
|
|
177
|
+
class: g([Y("tr"), !q.value && S(W).isSelected(r) ? "bg-primary/5" : void 0]),
|
|
178
|
+
"data-selected": S(W).isSelected(r) || void 0,
|
|
179
|
+
onClick: (e) => le(r)
|
|
170
180
|
}, [
|
|
171
|
-
L.expandable ? (
|
|
181
|
+
L.expandable ? (v(), u("td", {
|
|
172
182
|
key: 0,
|
|
173
|
-
class:
|
|
174
|
-
onClick:
|
|
175
|
-
}, [!L.canExpandRow || L.canExpandRow(
|
|
183
|
+
class: g(X("gutter")),
|
|
184
|
+
onClick: i[0] ||= T(() => {}, ["stop"])
|
|
185
|
+
}, [!L.canExpandRow || L.canExpandRow(r) ? (v(), u("button", {
|
|
176
186
|
key: 0,
|
|
177
187
|
type: "button",
|
|
178
|
-
class:
|
|
179
|
-
"aria-expanded":
|
|
188
|
+
class: g([X("expandButton"), S(W).isExpanded(r) && !q.value ? "rotate-90" : void 0]),
|
|
189
|
+
"aria-expanded": S(W).isExpanded(r),
|
|
180
190
|
"aria-label": "Toggle row details",
|
|
181
|
-
onClick: (
|
|
182
|
-
}, [
|
|
183
|
-
L.selectable ? (
|
|
191
|
+
onClick: (e) => S(W).toggleExpanded(r)
|
|
192
|
+
}, [p(t, { icon: S(D) }, null, 8, ["icon"])], 10, P)) : l("", !0)], 2)) : l("", !0),
|
|
193
|
+
L.selectable ? (v(), u("td", {
|
|
184
194
|
key: 1,
|
|
185
|
-
class:
|
|
186
|
-
onClick:
|
|
187
|
-
}, [!L.isRowSelectable || L.isRowSelectable(
|
|
195
|
+
class: g(X("gutter")),
|
|
196
|
+
onClick: i[1] ||= T(() => {}, ["stop"])
|
|
197
|
+
}, [!L.isRowSelectable || L.isRowSelectable(r) ? (v(), c(n, {
|
|
188
198
|
key: 0,
|
|
189
|
-
"model-value":
|
|
199
|
+
"model-value": S(W).isSelected(r),
|
|
190
200
|
"aria-label": "Select row",
|
|
191
|
-
"onUpdate:modelValue": (
|
|
192
|
-
}, null, 8, ["model-value", "onUpdate:modelValue"])) :
|
|
193
|
-
(
|
|
201
|
+
"onUpdate:modelValue": (e) => S(W).toggleRow(r)
|
|
202
|
+
}, null, 8, ["model-value", "onUpdate:modelValue"])) : l("", !0)], 2)) : l("", !0),
|
|
203
|
+
(v(!0), u(o, null, y(S(W).visibleColumns.value, (t) => (v(), u("td", {
|
|
194
204
|
key: t.key,
|
|
195
|
-
class:
|
|
205
|
+
class: g(Y("td", [
|
|
196
206
|
Z(t),
|
|
197
|
-
|
|
198
|
-
|
|
207
|
+
ie(t),
|
|
208
|
+
ae(r, t)
|
|
199
209
|
].filter(Boolean).join(" ") || void 0))
|
|
200
|
-
}, [
|
|
210
|
+
}, [oe(r, t) ? l("", !0) : b(e.$slots, `cell-${t.key}`, {
|
|
201
211
|
key: 0,
|
|
202
|
-
row:
|
|
212
|
+
row: r,
|
|
203
213
|
column: t,
|
|
204
|
-
value:
|
|
205
|
-
}, () => [
|
|
206
|
-
|
|
214
|
+
value: S(W).getRowValue(r, t.key)
|
|
215
|
+
}, () => [f(x(S(W).getRowValue(r, t.key)), 1)])], 2))), 128)),
|
|
216
|
+
e.$slots["row-actions"] ? (v(), u("td", {
|
|
217
|
+
key: 2,
|
|
218
|
+
class: g(X("actions")),
|
|
219
|
+
onClick: i[2] ||= T(() => {}, ["stop"])
|
|
220
|
+
}, [b(e.$slots, "row-actions", { row: r })], 2)) : l("", !0)
|
|
221
|
+
], 10, N), L.expandable && S(W).isExpanded(r) ? (v(), u("tr", {
|
|
207
222
|
key: 0,
|
|
208
|
-
class:
|
|
209
|
-
}, [
|
|
210
|
-
colspan:
|
|
211
|
-
class:
|
|
212
|
-
}, [
|
|
213
|
-
], 10,
|
|
223
|
+
class: g([Y("tr"), X("expandedRow")])
|
|
224
|
+
}, [d("td", {
|
|
225
|
+
colspan: Q.value,
|
|
226
|
+
class: g(X("expandedCell"))
|
|
227
|
+
}, [b(e.$slots, "expanded", { row: r })], 10, F)], 2)) : l("", !0)], 64))), 128))], 2)
|
|
228
|
+
], 10, te)], 2));
|
|
214
229
|
}
|
|
215
230
|
});
|
|
216
231
|
//#endregion
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
export interface TagsInputProps {
|
|
2
|
+
modelValue?: string[];
|
|
3
|
+
placeholder?: string;
|
|
4
|
+
/** Stop accepting tags past this many. */
|
|
5
|
+
max?: number;
|
|
6
|
+
/**
|
|
7
|
+
* What ends a tag. A comma by default, so pasting a comma-separated list
|
|
8
|
+
* does the obvious thing.
|
|
9
|
+
*/
|
|
10
|
+
delimiter?: string | RegExp;
|
|
11
|
+
/** Allow the same tag twice. Off by default — a repeated tag is usually a slip. */
|
|
12
|
+
duplicate?: boolean;
|
|
13
|
+
/** Split a pasted string on the delimiter instead of taking it as one tag. */
|
|
14
|
+
addOnPaste?: boolean;
|
|
15
|
+
/** Commit the typed text when Tab moves focus on. */
|
|
16
|
+
addOnTab?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Commit the typed text when focus leaves. Worth turning on: half-typed
|
|
19
|
+
* text silently discarded on blur is the classic way to lose a tag.
|
|
20
|
+
*/
|
|
21
|
+
addOnBlur?: boolean;
|
|
22
|
+
/** Show a control that empties the whole field. */
|
|
23
|
+
clearable?: boolean;
|
|
24
|
+
disabled?: boolean;
|
|
25
|
+
invalid?: boolean;
|
|
26
|
+
size?: 'sm' | 'md' | 'lg';
|
|
27
|
+
id?: string;
|
|
28
|
+
/** Skip built-in classes; you take over styling entirely. */
|
|
29
|
+
unstyled?: boolean;
|
|
30
|
+
class?: string;
|
|
31
|
+
/** Override classes per slot, e.g. `{ tag: 'bg-accent' }`. */
|
|
32
|
+
ui?: {
|
|
33
|
+
root?: string;
|
|
34
|
+
tag?: string;
|
|
35
|
+
tagText?: string;
|
|
36
|
+
tagDelete?: string;
|
|
37
|
+
input?: string;
|
|
38
|
+
clear?: string;
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
declare var __VLS_16: {
|
|
42
|
+
tag: string;
|
|
43
|
+
}, __VLS_45: {};
|
|
44
|
+
type __VLS_Slots = {} & {
|
|
45
|
+
tag?: (props: typeof __VLS_16) => any;
|
|
46
|
+
} & {
|
|
47
|
+
clear?: (props: typeof __VLS_45) => any;
|
|
48
|
+
};
|
|
49
|
+
declare const __VLS_base: import("vue").DefineComponent<TagsInputProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
50
|
+
"update:modelValue": (value: string[]) => any;
|
|
51
|
+
invalidTag: (value: string) => any;
|
|
52
|
+
addTag: (value: string) => any;
|
|
53
|
+
removeTag: (value: string) => any;
|
|
54
|
+
}, string, import("vue").PublicProps, Readonly<TagsInputProps> & Readonly<{
|
|
55
|
+
"onUpdate:modelValue"?: ((value: string[]) => any) | undefined;
|
|
56
|
+
onInvalidTag?: ((value: string) => any) | undefined;
|
|
57
|
+
onAddTag?: ((value: string) => any) | undefined;
|
|
58
|
+
onRemoveTag?: ((value: string) => any) | undefined;
|
|
59
|
+
}>, {
|
|
60
|
+
unstyled: boolean;
|
|
61
|
+
invalid: boolean;
|
|
62
|
+
delimiter: string | RegExp;
|
|
63
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
64
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
65
|
+
declare const _default: typeof __VLS_export;
|
|
66
|
+
export default _default;
|
|
67
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
68
|
+
new (): {
|
|
69
|
+
$slots: S;
|
|
70
|
+
};
|
|
71
|
+
};
|