iryx-ui 0.16.0 → 0.17.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/Calendar.js +5 -0
- package/dist/components/Calendar.vue.d.ts +69 -0
- package/dist/components/Calendar.vue_vue_type_script_setup_true_lang.js +168 -0
- package/dist/components/Combobox.vue.d.ts +9 -9
- package/dist/components/Combobox.vue_vue_type_script_setup_true_lang.js +180 -144
- package/dist/components/DateField.js +5 -0
- package/dist/components/DateField.vue.d.ts +38 -0
- package/dist/components/DateField.vue_vue_type_script_setup_true_lang.js +94 -0
- package/dist/components/DatePicker.vue.d.ts +7 -2
- package/dist/components/DatePicker.vue_vue_type_script_setup_true_lang.js +73 -124
- package/dist/components/DateRangePicker.vue.d.ts +2 -2
- package/dist/components/DateRangePicker.vue_vue_type_script_setup_true_lang.js +81 -78
- package/dist/components/DropdownMenu.vue.d.ts +13 -6
- package/dist/components/DropdownMenu.vue_vue_type_script_setup_true_lang.js +28 -22
- package/dist/components/Editable.js +5 -0
- package/dist/components/Editable.vue.d.ts +81 -0
- package/dist/components/Editable.vue_vue_type_script_setup_true_lang.js +140 -0
- package/dist/components/HoverCard.js +5 -0
- package/dist/components/HoverCard.vue.d.ts +68 -0
- package/dist/components/HoverCard.vue_vue_type_script_setup_true_lang.js +79 -0
- package/dist/components/TagsInput.vue.d.ts +2 -2
- package/dist/components/TimeField.vue_vue_type_script_setup_true_lang.js +17 -14
- package/dist/components/index.d.ts +4 -0
- package/dist/components/index.js +124 -116
- package/dist/index.d.ts +4 -0
- package/dist/index.js +130 -122
- package/dist/theme/accordion.d.ts +0 -15
- package/dist/theme/alert.d.ts +0 -3
- package/dist/theme/avatar.d.ts +0 -3
- package/dist/theme/banner.d.ts +0 -6
- package/dist/theme/bar-chart.d.ts +0 -18
- package/dist/theme/breadcrumb.d.ts +0 -3
- package/dist/theme/calendar.d.ts +62 -0
- package/dist/theme/calendar.js +29 -0
- package/dist/theme/card.d.ts +0 -6
- package/dist/theme/chart-legend.d.ts +0 -3
- package/dist/theme/checkbox.d.ts +0 -6
- package/dist/theme/color-picker.d.ts +0 -6
- package/dist/theme/combobox.js +4 -4
- package/dist/theme/command-palette.d.ts +0 -6
- package/dist/theme/container.d.ts +0 -3
- package/dist/theme/container.js +3 -3
- package/dist/theme/date-field.d.ts +65 -0
- package/dist/theme/date-field.js +21 -0
- package/dist/theme/date-picker.d.ts +0 -195
- package/dist/theme/date-picker.js +2 -24
- package/dist/theme/donut-chart.d.ts +0 -18
- package/dist/theme/dropdown-menu.d.ts +3 -0
- package/dist/theme/dropdown-menu.js +1 -0
- package/dist/theme/editable.d.ts +77 -0
- package/dist/theme/editable.js +26 -0
- package/dist/theme/empty-state.d.ts +0 -3
- package/dist/theme/file-upload.d.ts +0 -39
- package/dist/theme/hover-card.d.ts +92 -0
- package/dist/theme/hover-card.js +28 -0
- package/dist/theme/index.d.ts +4 -0
- package/dist/theme/input.d.ts +0 -18
- package/dist/theme/kbd.d.ts +0 -3
- package/dist/theme/line-chart.d.ts +0 -18
- package/dist/theme/navigation-menu.d.ts +0 -48
- package/dist/theme/number-input.d.ts +0 -3
- package/dist/theme/page-header.d.ts +0 -3
- package/dist/theme/password-input.d.ts +0 -23
- package/dist/theme/pin-input.d.ts +0 -3
- package/dist/theme/popover.d.ts +0 -6
- package/dist/theme/progress.d.ts +0 -51
- package/dist/theme/scroll-area.d.ts +0 -3
- package/dist/theme/separator.d.ts +0 -3
- package/dist/theme/sidebar.d.ts +0 -54
- package/dist/theme/skeleton.d.ts +0 -3
- package/dist/theme/skeleton.js +1 -1
- package/dist/theme/slider.d.ts +0 -6
- package/dist/theme/sparkline.d.ts +0 -11
- package/dist/theme/splitter.d.ts +0 -3
- package/dist/theme/stat.d.ts +0 -12
- package/dist/theme/stat.js +2 -2
- package/dist/theme/switch.d.ts +0 -6
- package/dist/theme/table.d.ts +0 -39
- package/dist/theme/tabs.d.ts +0 -12
- package/dist/theme/time-field.d.ts +0 -3
- package/dist/theme/timeline.d.ts +0 -18
- package/dist/theme/toast.d.ts +0 -3
- package/dist/theme/toggle.d.ts +0 -23
- package/dist/theme/tree.d.ts +0 -3
- package/package.json +1 -1
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
export interface EditableProps {
|
|
2
|
+
modelValue?: string;
|
|
3
|
+
placeholder?: string;
|
|
4
|
+
/**
|
|
5
|
+
* What puts it into edit mode. `focus` is the default and the kindest — a
|
|
6
|
+
* double click is invisible to anyone who does not already know it is there,
|
|
7
|
+
* and impossible to discover with a keyboard.
|
|
8
|
+
*/
|
|
9
|
+
activationMode?: 'focus' | 'dblclick' | 'none';
|
|
10
|
+
/**
|
|
11
|
+
* What commits the value. `blur` commits when focus leaves, `enter` on the
|
|
12
|
+
* key, `both` on either, `none` only through the controls.
|
|
13
|
+
*/
|
|
14
|
+
submitMode?: 'blur' | 'enter' | 'both' | 'none';
|
|
15
|
+
/** Show edit, save and cancel buttons beside the value. */
|
|
16
|
+
controls?: boolean;
|
|
17
|
+
/** Select the existing text when editing starts, so typing replaces it. */
|
|
18
|
+
selectOnFocus?: boolean;
|
|
19
|
+
/** Start in edit mode — for a row that was just added and has no value yet. */
|
|
20
|
+
startWithEditMode?: boolean;
|
|
21
|
+
maxLength?: number;
|
|
22
|
+
/**
|
|
23
|
+
* Size the field to its text. On by default: an input left at its own
|
|
24
|
+
* intrinsic width is about twenty characters wide whatever it holds, so the
|
|
25
|
+
* line jumps as soon as an edit starts.
|
|
26
|
+
*/
|
|
27
|
+
autoResize?: boolean;
|
|
28
|
+
size?: 'sm' | 'md' | 'lg';
|
|
29
|
+
disabled?: boolean;
|
|
30
|
+
readonly?: boolean;
|
|
31
|
+
invalid?: boolean;
|
|
32
|
+
id?: string;
|
|
33
|
+
/** Submitted with a surrounding native form. */
|
|
34
|
+
name?: string;
|
|
35
|
+
required?: boolean;
|
|
36
|
+
/** Control labels — override for non-English apps. */
|
|
37
|
+
editLabel?: string;
|
|
38
|
+
submitLabel?: string;
|
|
39
|
+
cancelLabel?: string;
|
|
40
|
+
/** Skip built-in classes; you take over styling entirely. */
|
|
41
|
+
unstyled?: boolean;
|
|
42
|
+
class?: string;
|
|
43
|
+
ui?: {
|
|
44
|
+
root?: string;
|
|
45
|
+
area?: string;
|
|
46
|
+
preview?: string;
|
|
47
|
+
placeholder?: string;
|
|
48
|
+
input?: string;
|
|
49
|
+
control?: string;
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
type __VLS_Slots = {
|
|
53
|
+
/** Replaces the rendered value. Given the value and whether it is empty. */
|
|
54
|
+
preview?: (props: {
|
|
55
|
+
value: string;
|
|
56
|
+
isEmpty: boolean;
|
|
57
|
+
}) => unknown;
|
|
58
|
+
};
|
|
59
|
+
declare const __VLS_base: import("vue").DefineComponent<EditableProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
60
|
+
"update:modelValue": (value: string) => any;
|
|
61
|
+
submit: (value: string) => any;
|
|
62
|
+
}, string, import("vue").PublicProps, Readonly<EditableProps> & Readonly<{
|
|
63
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
64
|
+
onSubmit?: ((value: string) => any) | undefined;
|
|
65
|
+
}>, {
|
|
66
|
+
unstyled: boolean;
|
|
67
|
+
invalid: boolean;
|
|
68
|
+
cancelLabel: string;
|
|
69
|
+
submitMode: "blur" | "enter" | "both" | "none";
|
|
70
|
+
autoResize: boolean;
|
|
71
|
+
editLabel: string;
|
|
72
|
+
submitLabel: string;
|
|
73
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
74
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
75
|
+
declare const _default: typeof __VLS_export;
|
|
76
|
+
export default _default;
|
|
77
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
78
|
+
new (): {
|
|
79
|
+
$slots: S;
|
|
80
|
+
};
|
|
81
|
+
};
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import { useIryxUiConfig as e } from "../config.js";
|
|
2
|
+
import t from "./Icon.js";
|
|
3
|
+
import { useFormField as n } from "../composables/form.js";
|
|
4
|
+
import { editableTheme as r } from "../theme/editable.js";
|
|
5
|
+
import { Fragment as i, computed as a, createBlock as o, createCommentVNode as s, createElementBlock as c, createVNode as l, defineComponent as u, normalizeClass as d, openBlock as f, renderSlot as p, unref as m, withCtx as h } from "vue";
|
|
6
|
+
import { Cancel01Icon as g, Edit02Icon as _, Tick02Icon as v } from "@hugeicons/core-free-icons";
|
|
7
|
+
import { EditableArea as y, EditableCancelTrigger as b, EditableEditTrigger as x, EditableInput as S, EditablePreview as C, EditableRoot as w, EditableSubmitTrigger as T } from "reka-ui";
|
|
8
|
+
//#region src/components/Editable.vue?vue&type=script&setup=true&lang.ts
|
|
9
|
+
var E = /*@__PURE__*/ u({
|
|
10
|
+
__name: "Editable",
|
|
11
|
+
props: {
|
|
12
|
+
modelValue: {},
|
|
13
|
+
placeholder: {},
|
|
14
|
+
activationMode: {},
|
|
15
|
+
submitMode: { default: "both" },
|
|
16
|
+
controls: { type: Boolean },
|
|
17
|
+
selectOnFocus: { type: Boolean },
|
|
18
|
+
startWithEditMode: { type: Boolean },
|
|
19
|
+
maxLength: {},
|
|
20
|
+
autoResize: {
|
|
21
|
+
type: Boolean,
|
|
22
|
+
default: !0
|
|
23
|
+
},
|
|
24
|
+
size: {},
|
|
25
|
+
disabled: { type: Boolean },
|
|
26
|
+
readonly: { type: Boolean },
|
|
27
|
+
invalid: {
|
|
28
|
+
type: Boolean,
|
|
29
|
+
default: void 0
|
|
30
|
+
},
|
|
31
|
+
id: {},
|
|
32
|
+
name: {},
|
|
33
|
+
required: { type: Boolean },
|
|
34
|
+
editLabel: { default: "Edit" },
|
|
35
|
+
submitLabel: { default: "Save" },
|
|
36
|
+
cancelLabel: { default: "Cancel" },
|
|
37
|
+
unstyled: {
|
|
38
|
+
type: Boolean,
|
|
39
|
+
default: void 0
|
|
40
|
+
},
|
|
41
|
+
class: {},
|
|
42
|
+
ui: {}
|
|
43
|
+
},
|
|
44
|
+
emits: ["update:modelValue", "submit"],
|
|
45
|
+
setup(u, { emit: E }) {
|
|
46
|
+
let D = u, O = E, k = n(), A = a(() => D.id ?? k?.id.value), j = a(() => D.invalid ?? k?.invalid.value ?? !1), M = e(), N = a(() => D.unstyled ?? M.unstyled), P = a(() => r({
|
|
47
|
+
size: D.size,
|
|
48
|
+
invalid: j.value
|
|
49
|
+
}));
|
|
50
|
+
function F(e, t) {
|
|
51
|
+
let n = D.ui?.[e];
|
|
52
|
+
return N.value ? [n, t] : P.value[e]({ class: [n, t] });
|
|
53
|
+
}
|
|
54
|
+
return (e, n) => (f(), o(m(w), {
|
|
55
|
+
id: A.value,
|
|
56
|
+
"model-value": D.modelValue,
|
|
57
|
+
placeholder: D.placeholder,
|
|
58
|
+
"activation-mode": D.activationMode,
|
|
59
|
+
"submit-mode": D.submitMode,
|
|
60
|
+
"select-on-focus": D.selectOnFocus,
|
|
61
|
+
"start-with-edit-mode": D.startWithEditMode,
|
|
62
|
+
"max-length": D.maxLength,
|
|
63
|
+
"auto-resize": D.autoResize,
|
|
64
|
+
disabled: D.disabled,
|
|
65
|
+
readonly: D.readonly,
|
|
66
|
+
name: D.name,
|
|
67
|
+
required: D.required,
|
|
68
|
+
"aria-invalid": j.value || void 0,
|
|
69
|
+
"aria-describedby": m(k)?.describedBy.value,
|
|
70
|
+
class: d(F("root", D.class)),
|
|
71
|
+
"onUpdate:modelValue": n[0] ||= (e) => O("update:modelValue", e ?? ""),
|
|
72
|
+
onSubmit: n[1] ||= () => O("submit", D.modelValue ?? "")
|
|
73
|
+
}, {
|
|
74
|
+
default: h(({ isEditing: n, isEmpty: r, modelValue: a, edit: u, submit: w, cancel: E }) => [l(m(y), { class: d(F("area")) }, {
|
|
75
|
+
default: h(() => [l(m(C), { class: d(F("preview", r ? P.value.placeholder() : void 0)) }, {
|
|
76
|
+
default: h(() => [p(e.$slots, "preview", {
|
|
77
|
+
value: a ?? "",
|
|
78
|
+
isEmpty: r
|
|
79
|
+
})]),
|
|
80
|
+
_: 2
|
|
81
|
+
}, 1032, ["class"]), l(m(S), { class: d(F("input")) }, null, 8, ["class"])]),
|
|
82
|
+
_: 2
|
|
83
|
+
}, 1032, ["class"]), D.controls ? (f(), c(i, { key: 0 }, [n ? (f(), c(i, { key: 1 }, [l(m(T), {
|
|
84
|
+
"aria-label": D.submitLabel,
|
|
85
|
+
class: d(F("control")),
|
|
86
|
+
onClick: w
|
|
87
|
+
}, {
|
|
88
|
+
default: h(() => [l(t, { icon: m(v) }, null, 8, ["icon"])]),
|
|
89
|
+
_: 1
|
|
90
|
+
}, 8, [
|
|
91
|
+
"aria-label",
|
|
92
|
+
"class",
|
|
93
|
+
"onClick"
|
|
94
|
+
]), l(m(b), {
|
|
95
|
+
"aria-label": D.cancelLabel,
|
|
96
|
+
class: d(F("control")),
|
|
97
|
+
onClick: E
|
|
98
|
+
}, {
|
|
99
|
+
default: h(() => [l(t, { icon: m(g) }, null, 8, ["icon"])]),
|
|
100
|
+
_: 1
|
|
101
|
+
}, 8, [
|
|
102
|
+
"aria-label",
|
|
103
|
+
"class",
|
|
104
|
+
"onClick"
|
|
105
|
+
])], 64)) : (f(), o(m(x), {
|
|
106
|
+
key: 0,
|
|
107
|
+
"aria-label": D.editLabel,
|
|
108
|
+
class: d(F("control")),
|
|
109
|
+
onClick: u
|
|
110
|
+
}, {
|
|
111
|
+
default: h(() => [l(t, { icon: m(_) }, null, 8, ["icon"])]),
|
|
112
|
+
_: 1
|
|
113
|
+
}, 8, [
|
|
114
|
+
"aria-label",
|
|
115
|
+
"class",
|
|
116
|
+
"onClick"
|
|
117
|
+
]))], 64)) : s("", !0)]),
|
|
118
|
+
_: 3
|
|
119
|
+
}, 8, [
|
|
120
|
+
"id",
|
|
121
|
+
"model-value",
|
|
122
|
+
"placeholder",
|
|
123
|
+
"activation-mode",
|
|
124
|
+
"submit-mode",
|
|
125
|
+
"select-on-focus",
|
|
126
|
+
"start-with-edit-mode",
|
|
127
|
+
"max-length",
|
|
128
|
+
"auto-resize",
|
|
129
|
+
"disabled",
|
|
130
|
+
"readonly",
|
|
131
|
+
"name",
|
|
132
|
+
"required",
|
|
133
|
+
"aria-invalid",
|
|
134
|
+
"aria-describedby",
|
|
135
|
+
"class"
|
|
136
|
+
]));
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
//#endregion
|
|
140
|
+
export { E as default };
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
export interface HoverCardProps {
|
|
2
|
+
side?: 'top' | 'right' | 'bottom' | 'left';
|
|
3
|
+
align?: 'start' | 'center' | 'end';
|
|
4
|
+
sideOffset?: number;
|
|
5
|
+
/** Render the little pointer against the trigger. */
|
|
6
|
+
arrow?: boolean;
|
|
7
|
+
/** How long the pointer must rest on the trigger before the card opens, in ms. */
|
|
8
|
+
openDelay?: number;
|
|
9
|
+
/**
|
|
10
|
+
* Grace period after the pointer leaves, in ms. It is what lets the pointer
|
|
11
|
+
* travel from the trigger to the card without the card vanishing on the way.
|
|
12
|
+
*/
|
|
13
|
+
closeDelay?: number;
|
|
14
|
+
/**
|
|
15
|
+
* Open on touch as well. Off by default, and worth leaving off: a tap has no
|
|
16
|
+
* hover to precede it, so the card competes with whatever the trigger does
|
|
17
|
+
* when tapped. Put the same content somewhere reachable instead.
|
|
18
|
+
*/
|
|
19
|
+
enableTouch?: boolean;
|
|
20
|
+
padding?: 'none' | 'sm' | 'md' | 'lg';
|
|
21
|
+
/** `none` lets the content size itself. */
|
|
22
|
+
width?: 'none' | 'sm' | 'md' | 'lg';
|
|
23
|
+
/** Skip built-in classes; you take over styling entirely. */
|
|
24
|
+
unstyled?: boolean;
|
|
25
|
+
class?: string;
|
|
26
|
+
ui?: {
|
|
27
|
+
content?: string;
|
|
28
|
+
arrow?: string;
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* A preview of what a link points at, shown when the pointer rests on it.
|
|
33
|
+
*
|
|
34
|
+
* It is for **supplementary** content — a profile, a definition, a summary of
|
|
35
|
+
* the page behind a link. Nothing inside may be the only way to reach an
|
|
36
|
+
* action: the card is hover- and focus-summoned, so a touch user never sees
|
|
37
|
+
* it. `ITooltip` is the one for a short label, and `IPopover` the one for
|
|
38
|
+
* content a reader has to be able to click into.
|
|
39
|
+
*/
|
|
40
|
+
type __VLS_Props = HoverCardProps;
|
|
41
|
+
type __VLS_ModelProps = {
|
|
42
|
+
'open'?: boolean;
|
|
43
|
+
};
|
|
44
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
45
|
+
declare var __VLS_14: {}, __VLS_28: {};
|
|
46
|
+
type __VLS_Slots = {} & {
|
|
47
|
+
trigger?: (props: typeof __VLS_14) => any;
|
|
48
|
+
} & {
|
|
49
|
+
default?: (props: typeof __VLS_28) => any;
|
|
50
|
+
};
|
|
51
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
52
|
+
"update:open": (value: boolean) => any;
|
|
53
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
54
|
+
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
55
|
+
}>, {
|
|
56
|
+
unstyled: boolean;
|
|
57
|
+
side: "top" | "right" | "bottom" | "left";
|
|
58
|
+
align: "start" | "center" | "end";
|
|
59
|
+
sideOffset: number;
|
|
60
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
61
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
62
|
+
declare const _default: typeof __VLS_export;
|
|
63
|
+
export default _default;
|
|
64
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
65
|
+
new (): {
|
|
66
|
+
$slots: S;
|
|
67
|
+
};
|
|
68
|
+
};
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { useIryxUiConfig as e } from "../config.js";
|
|
2
|
+
import { hoverCardTheme as t } from "../theme/hover-card.js";
|
|
3
|
+
import { computed as n, createBlock as r, createCommentVNode as i, createVNode as a, defineComponent as o, mergeModels as s, normalizeClass as c, openBlock as l, renderSlot as u, unref as d, useModel as f, withCtx as p } from "vue";
|
|
4
|
+
import { HoverCardArrow as m, HoverCardContent as h, HoverCardPortal as g, HoverCardRoot as _, HoverCardTrigger as v } from "reka-ui";
|
|
5
|
+
//#region src/components/HoverCard.vue?vue&type=script&setup=true&lang.ts
|
|
6
|
+
var y = /*@__PURE__*/ o({
|
|
7
|
+
__name: "HoverCard",
|
|
8
|
+
props: /*@__PURE__*/ s({
|
|
9
|
+
side: { default: "bottom" },
|
|
10
|
+
align: { default: "center" },
|
|
11
|
+
sideOffset: { default: 6 },
|
|
12
|
+
arrow: { type: Boolean },
|
|
13
|
+
openDelay: {},
|
|
14
|
+
closeDelay: {},
|
|
15
|
+
enableTouch: { type: Boolean },
|
|
16
|
+
padding: {},
|
|
17
|
+
width: {},
|
|
18
|
+
unstyled: {
|
|
19
|
+
type: Boolean,
|
|
20
|
+
default: void 0
|
|
21
|
+
},
|
|
22
|
+
class: {},
|
|
23
|
+
ui: {}
|
|
24
|
+
}, {
|
|
25
|
+
open: {
|
|
26
|
+
type: Boolean,
|
|
27
|
+
default: void 0
|
|
28
|
+
},
|
|
29
|
+
openModifiers: {}
|
|
30
|
+
}),
|
|
31
|
+
emits: ["update:open"],
|
|
32
|
+
setup(o) {
|
|
33
|
+
let s = o, y = f(o, "open"), b = e(), x = n(() => s.unstyled ?? b.unstyled), S = n(() => t({
|
|
34
|
+
padding: s.padding,
|
|
35
|
+
width: s.width
|
|
36
|
+
})), C = n(() => x.value ? [s.ui?.content, s.class] : S.value.content({ class: [s.ui?.content, s.class] })), w = n(() => x.value ? s.ui?.arrow : S.value.arrow({ class: s.ui?.arrow }));
|
|
37
|
+
return (e, t) => (l(), r(d(_), {
|
|
38
|
+
open: y.value,
|
|
39
|
+
"onUpdate:open": t[0] ||= (e) => y.value = e,
|
|
40
|
+
"open-delay": s.openDelay,
|
|
41
|
+
"close-delay": s.closeDelay,
|
|
42
|
+
"enable-touch": s.enableTouch
|
|
43
|
+
}, {
|
|
44
|
+
default: p(() => [a(d(v), { "as-child": "" }, {
|
|
45
|
+
default: p(() => [u(e.$slots, "trigger")]),
|
|
46
|
+
_: 3
|
|
47
|
+
}), a(d(g), null, {
|
|
48
|
+
default: p(() => [a(d(h), {
|
|
49
|
+
side: s.side,
|
|
50
|
+
align: s.align,
|
|
51
|
+
"side-offset": s.sideOffset,
|
|
52
|
+
class: c(C.value)
|
|
53
|
+
}, {
|
|
54
|
+
default: p(() => [u(e.$slots, "default"), s.arrow ? (l(), r(d(m), {
|
|
55
|
+
key: 0,
|
|
56
|
+
class: c(w.value),
|
|
57
|
+
width: 10,
|
|
58
|
+
height: 5
|
|
59
|
+
}, null, 8, ["class"])) : i("", !0)]),
|
|
60
|
+
_: 3
|
|
61
|
+
}, 8, [
|
|
62
|
+
"side",
|
|
63
|
+
"align",
|
|
64
|
+
"side-offset",
|
|
65
|
+
"class"
|
|
66
|
+
])]),
|
|
67
|
+
_: 3
|
|
68
|
+
})]),
|
|
69
|
+
_: 3
|
|
70
|
+
}, 8, [
|
|
71
|
+
"open",
|
|
72
|
+
"open-delay",
|
|
73
|
+
"close-delay",
|
|
74
|
+
"enable-touch"
|
|
75
|
+
]));
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
//#endregion
|
|
79
|
+
export { y as default };
|
|
@@ -48,14 +48,14 @@ type __VLS_Slots = {} & {
|
|
|
48
48
|
};
|
|
49
49
|
declare const __VLS_base: import("vue").DefineComponent<TagsInputProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
50
50
|
"update:modelValue": (value: string[]) => any;
|
|
51
|
-
invalidTag: (value: string) => any;
|
|
52
51
|
addTag: (value: string) => any;
|
|
53
52
|
removeTag: (value: string) => any;
|
|
53
|
+
invalidTag: (value: string) => any;
|
|
54
54
|
}, string, import("vue").PublicProps, Readonly<TagsInputProps> & Readonly<{
|
|
55
55
|
"onUpdate:modelValue"?: ((value: string[]) => any) | undefined;
|
|
56
|
-
onInvalidTag?: ((value: string) => any) | undefined;
|
|
57
56
|
onAddTag?: ((value: string) => any) | undefined;
|
|
58
57
|
onRemoveTag?: ((value: string) => any) | undefined;
|
|
58
|
+
onInvalidTag?: ((value: string) => any) | undefined;
|
|
59
59
|
}>, {
|
|
60
60
|
unstyled: boolean;
|
|
61
61
|
invalid: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useIryxUiConfig as e } from "../config.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { toIsoTime as t, toTime as n } from "../composables/date.js";
|
|
3
|
+
import { useFormField as r } from "../composables/form.js";
|
|
4
4
|
import { timeFieldTheme as i } from "../theme/time-field.js";
|
|
5
5
|
import { Fragment as a, computed as o, createBlock as s, createElementBlock as c, createTextVNode as l, defineComponent as u, normalizeClass as d, openBlock as f, renderList as p, toDisplayString as m, unref as h, withCtx as g } from "vue";
|
|
6
6
|
import { TimeFieldInput as _, TimeFieldRoot as v } from "reka-ui";
|
|
@@ -32,33 +32,36 @@ var y = /*@__PURE__*/ u({
|
|
|
32
32
|
},
|
|
33
33
|
emits: ["update:modelValue"],
|
|
34
34
|
setup(u, { emit: y }) {
|
|
35
|
-
let b = u, x = y, S =
|
|
35
|
+
let b = u, x = y, S = r(), C = o(() => b.id ?? S?.id.value), w = o(() => {
|
|
36
|
+
let e = b.modelValue;
|
|
37
|
+
return !e || !n(e) ? !1 : !!(b.minValue && e < b.minValue || b.maxValue && e > b.maxValue);
|
|
38
|
+
}), T = o(() => (b.invalid ?? S?.invalid.value ?? !1) || w.value), E = e(), D = o(() => b.unstyled ?? E.unstyled), O = o(() => i({
|
|
36
39
|
size: b.size,
|
|
37
|
-
invalid:
|
|
38
|
-
})),
|
|
39
|
-
return (e,
|
|
40
|
+
invalid: T.value
|
|
41
|
+
})), k = o(() => D.value ? [b.ui?.root, b.class] : O.value.root({ class: [b.ui?.root, b.class] })), A = o(() => D.value ? b.ui?.segment : O.value.segment({ class: b.ui?.segment })), j = o(() => D.value ? b.ui?.literal : O.value.literal({ class: b.ui?.literal }));
|
|
42
|
+
return (e, r) => (f(), s(h(v), {
|
|
40
43
|
id: C.value,
|
|
41
|
-
"model-value": h(
|
|
44
|
+
"model-value": h(n)(b.modelValue),
|
|
42
45
|
granularity: b.granularity,
|
|
43
46
|
"hour-cycle": b.hourCycle,
|
|
44
47
|
locale: b.locale,
|
|
45
48
|
step: b.step,
|
|
46
|
-
"min-value": h(
|
|
47
|
-
"max-value": h(
|
|
49
|
+
"min-value": h(n)(b.minValue),
|
|
50
|
+
"max-value": h(n)(b.maxValue),
|
|
48
51
|
disabled: b.disabled,
|
|
49
52
|
readonly: b.readonly,
|
|
50
|
-
"aria-invalid":
|
|
53
|
+
"aria-invalid": T.value || void 0,
|
|
51
54
|
"aria-describedby": h(S)?.describedBy.value,
|
|
52
|
-
class: d(
|
|
53
|
-
"onUpdate:modelValue":
|
|
55
|
+
class: d(k.value),
|
|
56
|
+
"onUpdate:modelValue": r[0] ||= (e) => x("update:modelValue", h(t)(e))
|
|
54
57
|
}, {
|
|
55
58
|
default: g(({ segments: e }) => [(f(!0), c(a, null, p(e, (e) => (f(), c(a, { key: e.part }, [e.part === "literal" ? (f(), c("span", {
|
|
56
59
|
key: 0,
|
|
57
|
-
class: d(
|
|
60
|
+
class: d(j.value)
|
|
58
61
|
}, m(e.value), 3)) : (f(), s(h(_), {
|
|
59
62
|
key: 1,
|
|
60
63
|
part: e.part,
|
|
61
|
-
class: d(
|
|
64
|
+
class: d(A.value)
|
|
62
65
|
}, {
|
|
63
66
|
default: g(() => [l(m(e.value), 1)]),
|
|
64
67
|
_: 2
|
|
@@ -11,6 +11,7 @@ export { default as BarChart } from './BarChart.vue';
|
|
|
11
11
|
export { default as Breadcrumb } from './Breadcrumb.vue';
|
|
12
12
|
export { default as Button } from './Button.vue';
|
|
13
13
|
export { default as ButtonGroup } from './ButtonGroup.vue';
|
|
14
|
+
export { default as Calendar } from './Calendar.vue';
|
|
14
15
|
export { default as Card } from './Card.vue';
|
|
15
16
|
export { default as ChartLegend } from './ChartLegend.vue';
|
|
16
17
|
export { default as Checkbox } from './Checkbox.vue';
|
|
@@ -21,16 +22,19 @@ export { default as CommandPalette } from './CommandPalette.vue';
|
|
|
21
22
|
export { default as ConfirmDialog } from './ConfirmDialog.vue';
|
|
22
23
|
export { default as Container } from './Container.vue';
|
|
23
24
|
export { default as ContextMenu } from './ContextMenu.vue';
|
|
25
|
+
export { default as DateField } from './DateField.vue';
|
|
24
26
|
export { default as DatePicker } from './DatePicker.vue';
|
|
25
27
|
export { default as DateRangePicker } from './DateRangePicker.vue';
|
|
26
28
|
export { default as Dialog } from './Dialog.vue';
|
|
27
29
|
export { default as DonutChart } from './DonutChart.vue';
|
|
28
30
|
export { default as Drawer } from './Drawer.vue';
|
|
29
31
|
export { default as DropdownMenu } from './DropdownMenu.vue';
|
|
32
|
+
export { default as Editable } from './Editable.vue';
|
|
30
33
|
export { default as EmptyState } from './EmptyState.vue';
|
|
31
34
|
export { default as FileUpload } from './FileUpload.vue';
|
|
32
35
|
export { default as Form } from './Form.vue';
|
|
33
36
|
export { default as FormField } from './FormField.vue';
|
|
37
|
+
export { default as HoverCard } from './HoverCard.vue';
|
|
34
38
|
export { default as Icon } from './Icon.vue';
|
|
35
39
|
export { default as Input } from './Input.vue';
|
|
36
40
|
export { default as Kbd } from './Kbd.vue';
|