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
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import { useIryxUiConfig as e } from "../config.js";
|
|
2
2
|
import t from "./Icon.js";
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
3
|
+
import { formatIsoDate as n, isoToday as r } from "../composables/date.js";
|
|
4
|
+
import i from "./Calendar.js";
|
|
5
|
+
import { useFormField as a } from "../composables/form.js";
|
|
6
|
+
import { datePickerTheme as o } from "../theme/date-picker.js";
|
|
7
|
+
import { computed as s, createBlock as c, createCommentVNode as l, createElementBlock as u, createElementVNode as d, createVNode as f, defineComponent as p, mergeModels as m, normalizeClass as h, openBlock as g, ref as _, toDisplayString as v, unref as y, useModel as b, withCtx as x } from "vue";
|
|
8
|
+
import { Calendar03Icon as S } from "@hugeicons/core-free-icons";
|
|
9
|
+
import { PopoverContent as C, PopoverPortal as w, PopoverRoot as T, PopoverTrigger as E } from "reka-ui";
|
|
9
10
|
//#region src/components/DatePicker.vue?vue&type=script&setup=true&lang.ts
|
|
10
|
-
var
|
|
11
|
+
var D = [
|
|
11
12
|
"id",
|
|
12
13
|
"disabled",
|
|
13
14
|
"aria-invalid",
|
|
14
15
|
"aria-describedby"
|
|
15
|
-
],
|
|
16
|
+
], O = { key: 0 }, k = /*@__PURE__*/ p({
|
|
16
17
|
__name: "DatePicker",
|
|
17
|
-
props: /*@__PURE__*/
|
|
18
|
+
props: /*@__PURE__*/ m({
|
|
18
19
|
size: {},
|
|
19
20
|
placeholder: { default: "Pick a date" },
|
|
20
21
|
disabled: { type: Boolean },
|
|
@@ -28,6 +29,7 @@ var H = [
|
|
|
28
29
|
locale: {},
|
|
29
30
|
format: {},
|
|
30
31
|
weekStartsOn: {},
|
|
32
|
+
isUnavailable: {},
|
|
31
33
|
clearable: { type: Boolean },
|
|
32
34
|
todayLabel: { default: "Today" },
|
|
33
35
|
clearLabel: { default: "Clear" },
|
|
@@ -44,136 +46,83 @@ var H = [
|
|
|
44
46
|
modelModifiers: {}
|
|
45
47
|
}),
|
|
46
48
|
emits: ["update:modelValue"],
|
|
47
|
-
setup(
|
|
48
|
-
let
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
W.value = o(e);
|
|
52
|
-
}
|
|
53
|
-
}), re = l(() => a(g.min)), ie = l(() => a(g.max)), Q = l(() => r(W.value, g.locale, g.format));
|
|
54
|
-
function ae() {
|
|
55
|
-
W.value = i(), G.value = !1;
|
|
49
|
+
setup(p) {
|
|
50
|
+
let m = p, k = b(p, "modelValue"), A = _(!1), j = a(), M = s(() => m.id ?? j?.id.value), N = s(() => m.invalid ?? j?.invalid.value ?? !1), P = e(), F = s(() => m.unstyled ?? P.unstyled), I = s(() => n(k.value, m.locale, m.format));
|
|
51
|
+
function L() {
|
|
52
|
+
k.value = r(), A.value = !1;
|
|
56
53
|
}
|
|
57
|
-
function
|
|
58
|
-
|
|
54
|
+
function R() {
|
|
55
|
+
k.value = null, A.value = !1;
|
|
59
56
|
}
|
|
60
|
-
let
|
|
61
|
-
size:
|
|
62
|
-
invalid:
|
|
57
|
+
let z = s(() => o({
|
|
58
|
+
size: m.size,
|
|
59
|
+
invalid: N.value
|
|
63
60
|
}));
|
|
64
|
-
function
|
|
65
|
-
let n =
|
|
66
|
-
return
|
|
61
|
+
function B(e, t) {
|
|
62
|
+
let n = m.ui?.[e];
|
|
63
|
+
return F.value ? [n, t] : z.value[e]({ class: [n, t] });
|
|
67
64
|
}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
65
|
+
let V = s(() => {
|
|
66
|
+
let { trigger: e, placeholder: t, content: n, footer: r, action: i, ...a } = m.ui ?? {};
|
|
67
|
+
return a;
|
|
68
|
+
});
|
|
69
|
+
return (e, n) => (g(), c(y(T), {
|
|
70
|
+
open: A.value,
|
|
71
|
+
"onUpdate:open": n[2] ||= (e) => A.value = e
|
|
71
72
|
}, {
|
|
72
|
-
default:
|
|
73
|
-
default:
|
|
74
|
-
id:
|
|
73
|
+
default: x(() => [f(y(E), { "as-child": "" }, {
|
|
74
|
+
default: x(() => [d("button", {
|
|
75
|
+
id: M.value,
|
|
75
76
|
type: "button",
|
|
76
|
-
disabled:
|
|
77
|
-
"aria-invalid":
|
|
78
|
-
"aria-describedby":
|
|
79
|
-
class:
|
|
80
|
-
}, [
|
|
77
|
+
disabled: m.disabled,
|
|
78
|
+
"aria-invalid": N.value || void 0,
|
|
79
|
+
"aria-describedby": y(j)?.describedBy.value,
|
|
80
|
+
class: h(B("trigger", m.class))
|
|
81
|
+
}, [I.value ? (g(), u("span", O, v(I.value), 1)) : (g(), u("span", {
|
|
81
82
|
key: 1,
|
|
82
|
-
class:
|
|
83
|
-
},
|
|
83
|
+
class: h(B("placeholder"))
|
|
84
|
+
}, v(m.placeholder), 3)), f(t, { icon: y(S) }, null, 8, ["icon"])], 10, D)]),
|
|
84
85
|
_: 1
|
|
85
|
-
}),
|
|
86
|
-
default:
|
|
87
|
-
class:
|
|
86
|
+
}), f(y(w), null, {
|
|
87
|
+
default: x(() => [f(y(C), {
|
|
88
|
+
class: h(B("content")),
|
|
88
89
|
"side-offset": 4,
|
|
89
90
|
align: "start"
|
|
90
91
|
}, {
|
|
91
|
-
default:
|
|
92
|
-
modelValue:
|
|
93
|
-
"onUpdate:modelValue": [n[0] ||= (e) =>
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
locale:
|
|
97
|
-
"week-starts-on":
|
|
98
|
-
"
|
|
99
|
-
"
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
class: _($("nav"))
|
|
106
|
-
}, {
|
|
107
|
-
default: w(() => [m(t, { icon: S(T) }, null, 8, ["icon"])]),
|
|
108
|
-
_: 1
|
|
109
|
-
}, 8, ["aria-label", "class"]),
|
|
110
|
-
m(S(F), { class: _($("heading")) }, null, 8, ["class"]),
|
|
111
|
-
m(S(I), {
|
|
112
|
-
"aria-label": g.nextLabel,
|
|
113
|
-
class: _($("nav"))
|
|
114
|
-
}, {
|
|
115
|
-
default: w(() => [m(t, { icon: S(te) }, null, 8, ["icon"])]),
|
|
116
|
-
_: 1
|
|
117
|
-
}, 8, ["aria-label", "class"])
|
|
118
|
-
]),
|
|
119
|
-
_: 1
|
|
120
|
-
}, 8, ["class"]), f("div", { class: _($("months")) }, [(v(!0), d(c, null, b(e, (e) => (v(), u(S(k), {
|
|
121
|
-
key: e.value.toString(),
|
|
122
|
-
class: _($("grid"))
|
|
123
|
-
}, {
|
|
124
|
-
default: w(() => [m(S(j), null, {
|
|
125
|
-
default: w(() => [m(S(M), null, {
|
|
126
|
-
default: w(() => [(v(!0), d(c, null, b(n, (e) => (v(), u(S(N), {
|
|
127
|
-
key: e,
|
|
128
|
-
class: _($("headCell"))
|
|
129
|
-
}, {
|
|
130
|
-
default: w(() => [p(x(e), 1)]),
|
|
131
|
-
_: 2
|
|
132
|
-
}, 1032, ["class"]))), 128))]),
|
|
133
|
-
_: 2
|
|
134
|
-
}, 1024)]),
|
|
135
|
-
_: 2
|
|
136
|
-
}, 1024), m(S(A), null, {
|
|
137
|
-
default: w(() => [(v(!0), d(c, null, b(e.rows, (t, n) => (v(), u(S(M), { key: `week-${n}` }, {
|
|
138
|
-
default: w(() => [(v(!0), d(c, null, b(t, (t) => (v(), u(S(D), {
|
|
139
|
-
key: t.toString(),
|
|
140
|
-
date: t,
|
|
141
|
-
class: _($("cell"))
|
|
142
|
-
}, {
|
|
143
|
-
default: w(() => [m(S(O), {
|
|
144
|
-
day: t,
|
|
145
|
-
month: e.value,
|
|
146
|
-
class: _($("cellTrigger"))
|
|
147
|
-
}, null, 8, [
|
|
148
|
-
"day",
|
|
149
|
-
"month",
|
|
150
|
-
"class"
|
|
151
|
-
])]),
|
|
152
|
-
_: 2
|
|
153
|
-
}, 1032, ["date", "class"]))), 128))]),
|
|
154
|
-
_: 2
|
|
155
|
-
}, 1024))), 128))]),
|
|
156
|
-
_: 2
|
|
157
|
-
}, 1024)]),
|
|
158
|
-
_: 2
|
|
159
|
-
}, 1032, ["class"]))), 128))], 2)]),
|
|
160
|
-
_: 1
|
|
161
|
-
}, 8, [
|
|
92
|
+
default: x(() => [f(i, {
|
|
93
|
+
modelValue: k.value,
|
|
94
|
+
"onUpdate:modelValue": [n[0] ||= (e) => k.value = e, n[1] ||= (e) => A.value = !1],
|
|
95
|
+
min: m.min,
|
|
96
|
+
max: m.max,
|
|
97
|
+
locale: m.locale,
|
|
98
|
+
"week-starts-on": m.weekStartsOn,
|
|
99
|
+
"is-unavailable": m.isUnavailable,
|
|
100
|
+
"previous-label": m.previousLabel,
|
|
101
|
+
"next-label": m.nextLabel,
|
|
102
|
+
"initial-focus": "",
|
|
103
|
+
unstyled: m.unstyled,
|
|
104
|
+
ui: V.value
|
|
105
|
+
}, null, 8, [
|
|
162
106
|
"modelValue",
|
|
163
|
-
"min
|
|
164
|
-
"max
|
|
107
|
+
"min",
|
|
108
|
+
"max",
|
|
165
109
|
"locale",
|
|
166
|
-
"week-starts-on"
|
|
167
|
-
|
|
110
|
+
"week-starts-on",
|
|
111
|
+
"is-unavailable",
|
|
112
|
+
"previous-label",
|
|
113
|
+
"next-label",
|
|
114
|
+
"unstyled",
|
|
115
|
+
"ui"
|
|
116
|
+
]), d("div", { class: h(B("footer")) }, [d("button", {
|
|
168
117
|
type: "button",
|
|
169
|
-
class:
|
|
170
|
-
onClick:
|
|
171
|
-
},
|
|
118
|
+
class: h(B("action")),
|
|
119
|
+
onClick: L
|
|
120
|
+
}, v(m.todayLabel), 3), m.clearable ? (g(), u("button", {
|
|
172
121
|
key: 0,
|
|
173
122
|
type: "button",
|
|
174
|
-
class:
|
|
175
|
-
onClick:
|
|
176
|
-
},
|
|
123
|
+
class: h(B("action")),
|
|
124
|
+
onClick: R
|
|
125
|
+
}, v(m.clearLabel), 3)) : l("", !0)], 2)]),
|
|
177
126
|
_: 1
|
|
178
127
|
}, 8, ["class"])]),
|
|
179
128
|
_: 1
|
|
@@ -183,4 +132,4 @@ var H = [
|
|
|
183
132
|
}
|
|
184
133
|
});
|
|
185
134
|
//#endregion
|
|
186
|
-
export {
|
|
135
|
+
export { k as default };
|
|
@@ -50,11 +50,11 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {},
|
|
|
50
50
|
unstyled: boolean;
|
|
51
51
|
placeholder: string;
|
|
52
52
|
separator: string;
|
|
53
|
-
invalid: boolean;
|
|
54
|
-
clearLabel: string;
|
|
55
53
|
months: number;
|
|
56
54
|
previousLabel: string;
|
|
57
55
|
nextLabel: string;
|
|
56
|
+
invalid: boolean;
|
|
57
|
+
clearLabel: string;
|
|
58
58
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
59
59
|
declare const _default: typeof __VLS_export;
|
|
60
60
|
export default _default;
|
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import { useIryxUiConfig as e } from "../config.js";
|
|
2
2
|
import t from "./Icon.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
3
|
+
import { formatIsoDate as n, toCalendarDate as r, toIsoDate as i } from "../composables/date.js";
|
|
4
|
+
import { calendarTheme as ee } from "../theme/calendar.js";
|
|
5
|
+
import { useFormField as a } from "../composables/form.js";
|
|
6
|
+
import { datePickerTheme as o } from "../theme/date-picker.js";
|
|
7
|
+
import { Fragment as s, computed as c, createBlock as l, createCommentVNode as u, createElementBlock as d, createElementVNode as f, createTextVNode as p, createVNode as m, defineComponent as h, mergeModels as g, normalizeClass as _, openBlock as v, ref as y, renderList as b, shallowRef as x, toDisplayString as S, unref as C, useModel as w, watch as T, withCtx as E } from "vue";
|
|
8
|
+
import { ArrowLeft01Icon as te, ArrowRight01Icon as ne, Calendar03Icon as re } from "@hugeicons/core-free-icons";
|
|
9
|
+
import { PopoverContent as D, PopoverPortal as O, PopoverRoot as k, PopoverTrigger as A, RangeCalendarCell as j, RangeCalendarCellTrigger as M, RangeCalendarGrid as N, RangeCalendarGridBody as P, RangeCalendarGridHead as F, RangeCalendarGridRow as I, RangeCalendarHeadCell as L, RangeCalendarHeader as R, RangeCalendarHeading as z, RangeCalendarNext as B, RangeCalendarPrev as V, RangeCalendarRoot as ie } from "reka-ui";
|
|
9
10
|
//#region src/components/DateRangePicker.vue?vue&type=script&setup=true&lang.ts
|
|
10
11
|
var H = [
|
|
11
12
|
"id",
|
|
12
13
|
"disabled",
|
|
13
14
|
"aria-invalid",
|
|
14
15
|
"aria-describedby"
|
|
15
|
-
], U = { key: 0 }, W = /*@__PURE__*/
|
|
16
|
+
], U = { key: 0 }, W = /*@__PURE__*/ h({
|
|
16
17
|
__name: "DateRangePicker",
|
|
17
|
-
props: /*@__PURE__*/
|
|
18
|
+
props: /*@__PURE__*/ g({
|
|
18
19
|
size: {},
|
|
19
20
|
placeholder: { default: "Pick a date range" },
|
|
20
21
|
disabled: { type: Boolean },
|
|
@@ -48,127 +49,129 @@ var H = [
|
|
|
48
49
|
modelModifiers: {}
|
|
49
50
|
}),
|
|
50
51
|
emits: ["update:modelValue"],
|
|
51
|
-
setup(
|
|
52
|
-
let
|
|
53
|
-
start:
|
|
54
|
-
end:
|
|
52
|
+
setup(h) {
|
|
53
|
+
let g = h, W = w(h, "modelValue"), G = y(!1), K = a(), q = c(() => g.id ?? K?.id.value), J = c(() => g.invalid ?? K?.invalid.value ?? !1), Y = e(), ae = c(() => g.unstyled ?? Y.unstyled), X = x({
|
|
54
|
+
start: r(W.value?.start),
|
|
55
|
+
end: r(W.value?.end)
|
|
55
56
|
});
|
|
56
57
|
function Z(e) {
|
|
57
|
-
return
|
|
58
|
+
return i(e.start) === (W.value?.start ?? null) && i(e.end) === (W.value?.end ?? null);
|
|
58
59
|
}
|
|
59
|
-
|
|
60
|
+
T(W, () => {
|
|
60
61
|
Z(X.value) || (X.value = {
|
|
61
|
-
start:
|
|
62
|
-
end:
|
|
62
|
+
start: r(W.value?.start),
|
|
63
|
+
end: r(W.value?.end)
|
|
63
64
|
});
|
|
64
|
-
}, { deep: !0 }),
|
|
65
|
+
}, { deep: !0 }), T(X, (e) => {
|
|
65
66
|
Z(e) || (W.value = {
|
|
66
|
-
start:
|
|
67
|
-
end:
|
|
67
|
+
start: i(e.start),
|
|
68
|
+
end: i(e.end)
|
|
68
69
|
});
|
|
69
70
|
});
|
|
70
|
-
let
|
|
71
|
-
let e =
|
|
72
|
-
return !e && !t ? "" : t ? `${e}${
|
|
71
|
+
let oe = c(() => r(g.min)), se = c(() => r(g.max)), Q = c(() => {
|
|
72
|
+
let e = n(W.value?.start, g.locale, g.format), t = n(W.value?.end, g.locale, g.format);
|
|
73
|
+
return !e && !t ? "" : t ? `${e}${g.separator}${t}` : e;
|
|
73
74
|
});
|
|
74
|
-
|
|
75
|
+
T(W, (e) => {
|
|
75
76
|
G.value && e?.start && e?.end && (G.value = !1);
|
|
76
77
|
}, { deep: !0 });
|
|
77
|
-
function
|
|
78
|
+
function ce() {
|
|
78
79
|
W.value = {
|
|
79
80
|
start: null,
|
|
80
81
|
end: null
|
|
81
82
|
}, G.value = !1;
|
|
82
83
|
}
|
|
83
|
-
let
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
84
|
+
let le = c(() => ({
|
|
85
|
+
...o({
|
|
86
|
+
size: g.size,
|
|
87
|
+
invalid: J.value
|
|
88
|
+
}),
|
|
89
|
+
...ee({ range: !0 })
|
|
87
90
|
}));
|
|
88
91
|
function $(e, t) {
|
|
89
|
-
let n =
|
|
90
|
-
return
|
|
92
|
+
let n = g.ui?.[e];
|
|
93
|
+
return ae.value ? [n, t] : le.value[e]({ class: [n, t] });
|
|
91
94
|
}
|
|
92
|
-
return (e, n) => (
|
|
95
|
+
return (e, n) => (v(), l(C(k), {
|
|
93
96
|
open: G.value,
|
|
94
97
|
"onUpdate:open": n[1] ||= (e) => G.value = e
|
|
95
98
|
}, {
|
|
96
|
-
default:
|
|
97
|
-
default:
|
|
99
|
+
default: E(() => [m(C(A), { "as-child": "" }, {
|
|
100
|
+
default: E(() => [f("button", {
|
|
98
101
|
id: q.value,
|
|
99
102
|
type: "button",
|
|
100
|
-
disabled:
|
|
103
|
+
disabled: g.disabled,
|
|
101
104
|
"aria-invalid": J.value || void 0,
|
|
102
|
-
"aria-describedby":
|
|
103
|
-
class:
|
|
104
|
-
}, [Q.value ? (
|
|
105
|
+
"aria-describedby": C(K)?.describedBy.value,
|
|
106
|
+
class: _($("trigger", g.class))
|
|
107
|
+
}, [Q.value ? (v(), d("span", U, S(Q.value), 1)) : (v(), d("span", {
|
|
105
108
|
key: 1,
|
|
106
|
-
class:
|
|
107
|
-
},
|
|
109
|
+
class: _($("placeholder"))
|
|
110
|
+
}, S(g.placeholder), 3)), m(t, { icon: C(re) }, null, 8, ["icon"])], 10, H)]),
|
|
108
111
|
_: 1
|
|
109
|
-
}),
|
|
110
|
-
default:
|
|
111
|
-
class:
|
|
112
|
+
}), m(C(O), null, {
|
|
113
|
+
default: E(() => [m(C(D), {
|
|
114
|
+
class: _($("content")),
|
|
112
115
|
"side-offset": 4,
|
|
113
116
|
align: "start"
|
|
114
117
|
}, {
|
|
115
|
-
default:
|
|
118
|
+
default: E(() => [m(C(ie), {
|
|
116
119
|
modelValue: X.value,
|
|
117
120
|
"onUpdate:modelValue": n[0] ||= (e) => X.value = e,
|
|
118
|
-
"min-value":
|
|
119
|
-
"max-value":
|
|
120
|
-
locale:
|
|
121
|
-
"week-starts-on":
|
|
122
|
-
"number-of-months":
|
|
121
|
+
"min-value": oe.value,
|
|
122
|
+
"max-value": se.value,
|
|
123
|
+
locale: g.locale,
|
|
124
|
+
"week-starts-on": g.weekStartsOn,
|
|
125
|
+
"number-of-months": g.months,
|
|
123
126
|
"fixed-weeks": "",
|
|
124
127
|
"initial-focus": ""
|
|
125
128
|
}, {
|
|
126
|
-
default:
|
|
127
|
-
default:
|
|
128
|
-
|
|
129
|
-
"aria-label":
|
|
130
|
-
class:
|
|
129
|
+
default: E(({ grid: e, weekDays: n }) => [m(C(R), { class: _($("header")) }, {
|
|
130
|
+
default: E(() => [
|
|
131
|
+
m(C(V), {
|
|
132
|
+
"aria-label": g.previousLabel,
|
|
133
|
+
class: _($("nav"))
|
|
131
134
|
}, {
|
|
132
|
-
default:
|
|
135
|
+
default: E(() => [m(t, { icon: C(te) }, null, 8, ["icon"])]),
|
|
133
136
|
_: 1
|
|
134
137
|
}, 8, ["aria-label", "class"]),
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
"aria-label":
|
|
138
|
-
class:
|
|
138
|
+
m(C(z), { class: _($("heading")) }, null, 8, ["class"]),
|
|
139
|
+
m(C(B), {
|
|
140
|
+
"aria-label": g.nextLabel,
|
|
141
|
+
class: _($("nav"))
|
|
139
142
|
}, {
|
|
140
|
-
default:
|
|
143
|
+
default: E(() => [m(t, { icon: C(ne) }, null, 8, ["icon"])]),
|
|
141
144
|
_: 1
|
|
142
145
|
}, 8, ["aria-label", "class"])
|
|
143
146
|
]),
|
|
144
147
|
_: 1
|
|
145
|
-
}, 8, ["class"]),
|
|
148
|
+
}, 8, ["class"]), f("div", { class: _($("months")) }, [(v(!0), d(s, null, b(e, (e) => (v(), l(C(N), {
|
|
146
149
|
key: e.value.toString(),
|
|
147
|
-
class:
|
|
150
|
+
class: _($("grid"))
|
|
148
151
|
}, {
|
|
149
|
-
default:
|
|
150
|
-
default:
|
|
151
|
-
default:
|
|
152
|
+
default: E(() => [m(C(F), null, {
|
|
153
|
+
default: E(() => [m(C(I), null, {
|
|
154
|
+
default: E(() => [(v(!0), d(s, null, b(n, (e) => (v(), l(C(L), {
|
|
152
155
|
key: e,
|
|
153
|
-
class:
|
|
156
|
+
class: _($("headCell"))
|
|
154
157
|
}, {
|
|
155
|
-
default:
|
|
158
|
+
default: E(() => [p(S(e), 1)]),
|
|
156
159
|
_: 2
|
|
157
160
|
}, 1032, ["class"]))), 128))]),
|
|
158
161
|
_: 2
|
|
159
162
|
}, 1024)]),
|
|
160
163
|
_: 2
|
|
161
|
-
}, 1024),
|
|
162
|
-
default:
|
|
163
|
-
default:
|
|
164
|
+
}, 1024), m(C(P), null, {
|
|
165
|
+
default: E(() => [(v(!0), d(s, null, b(e.rows, (t, n) => (v(), l(C(I), { key: `week-${n}` }, {
|
|
166
|
+
default: E(() => [(v(!0), d(s, null, b(t, (t) => (v(), l(C(j), {
|
|
164
167
|
key: t.toString(),
|
|
165
168
|
date: t,
|
|
166
|
-
class:
|
|
169
|
+
class: _($("cell"))
|
|
167
170
|
}, {
|
|
168
|
-
default:
|
|
171
|
+
default: E(() => [m(C(M), {
|
|
169
172
|
day: t,
|
|
170
173
|
month: e.value,
|
|
171
|
-
class:
|
|
174
|
+
class: _($("cellTrigger"))
|
|
172
175
|
}, null, 8, [
|
|
173
176
|
"day",
|
|
174
177
|
"month",
|
|
@@ -190,14 +193,14 @@ var H = [
|
|
|
190
193
|
"locale",
|
|
191
194
|
"week-starts-on",
|
|
192
195
|
"number-of-months"
|
|
193
|
-
]),
|
|
196
|
+
]), g.clearable ? (v(), d("div", {
|
|
194
197
|
key: 0,
|
|
195
|
-
class:
|
|
196
|
-
}, [
|
|
198
|
+
class: _($("footer"))
|
|
199
|
+
}, [f("button", {
|
|
197
200
|
type: "button",
|
|
198
|
-
class:
|
|
199
|
-
onClick:
|
|
200
|
-
},
|
|
201
|
+
class: _($("action")),
|
|
202
|
+
onClick: ce
|
|
203
|
+
}, S(g.clearLabel), 3)], 2)) : u("", !0)]),
|
|
201
204
|
_: 1
|
|
202
205
|
}, 8, ["class"])]),
|
|
203
206
|
_: 1
|
|
@@ -4,6 +4,7 @@ export interface DropdownMenuProps {
|
|
|
4
4
|
items?: DropdownMenuEntry[];
|
|
5
5
|
/** Which edge of the trigger to align to. */
|
|
6
6
|
align?: 'start' | 'center' | 'end';
|
|
7
|
+
alignOffset?: number;
|
|
7
8
|
side?: 'top' | 'right' | 'bottom' | 'left';
|
|
8
9
|
sideOffset?: number;
|
|
9
10
|
/** Skip built-in classes; you take over styling entirely. */
|
|
@@ -12,6 +13,7 @@ export interface DropdownMenuProps {
|
|
|
12
13
|
/** Override classes per slot, e.g. `{ item: 'py-2' }`. */
|
|
13
14
|
ui?: {
|
|
14
15
|
content?: string;
|
|
16
|
+
header?: string;
|
|
15
17
|
item?: string;
|
|
16
18
|
label?: string;
|
|
17
19
|
separator?: string;
|
|
@@ -20,16 +22,21 @@ export interface DropdownMenuProps {
|
|
|
20
22
|
};
|
|
21
23
|
}
|
|
22
24
|
type __VLS_Props = DropdownMenuProps;
|
|
25
|
+
type __VLS_Slots = {
|
|
26
|
+
/** What opens the menu. */
|
|
27
|
+
trigger?: () => unknown;
|
|
28
|
+
/**
|
|
29
|
+
* A block above the items — an account's name and address, a workspace, a
|
|
30
|
+
* plan. Not a menu row: it is not focusable and nothing selects it.
|
|
31
|
+
*/
|
|
32
|
+
header?: () => unknown;
|
|
33
|
+
/** Replaces the items entirely. */
|
|
34
|
+
default?: () => unknown;
|
|
35
|
+
};
|
|
23
36
|
type __VLS_ModelProps = {
|
|
24
37
|
'open'?: boolean;
|
|
25
38
|
};
|
|
26
39
|
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
27
|
-
declare var __VLS_14: {}, __VLS_28: {};
|
|
28
|
-
type __VLS_Slots = {} & {
|
|
29
|
-
trigger?: (props: typeof __VLS_14) => any;
|
|
30
|
-
} & {
|
|
31
|
-
default?: (props: typeof __VLS_28) => any;
|
|
32
|
-
};
|
|
33
40
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
34
41
|
"update:open": (value: boolean) => any;
|
|
35
42
|
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { useIryxUiConfig as e } from "../config.js";
|
|
2
2
|
import { dropdownMenuTheme as t } from "../theme/dropdown-menu.js";
|
|
3
3
|
import n from "./DropdownMenuItems.js";
|
|
4
|
-
import { computed as r, createBlock as i,
|
|
5
|
-
import { DropdownMenuContent as
|
|
4
|
+
import { computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createVNode as s, defineComponent as c, mergeModels as l, normalizeClass as u, openBlock as d, renderSlot as f, unref as p, useModel as m, withCtx as h } from "vue";
|
|
5
|
+
import { DropdownMenuContent as g, DropdownMenuPortal as _, DropdownMenuRoot as v, DropdownMenuTrigger as y } from "reka-ui";
|
|
6
6
|
//#region src/components/DropdownMenu.vue?vue&type=script&setup=true&lang.ts
|
|
7
|
-
var
|
|
7
|
+
var b = /*@__PURE__*/ c({
|
|
8
8
|
__name: "DropdownMenu",
|
|
9
|
-
props: /*@__PURE__*/
|
|
9
|
+
props: /*@__PURE__*/ l({
|
|
10
10
|
items: {},
|
|
11
11
|
align: { default: "start" },
|
|
12
|
+
alignOffset: {},
|
|
12
13
|
side: {},
|
|
13
14
|
sideOffset: { default: 4 },
|
|
14
15
|
unstyled: {
|
|
@@ -25,26 +26,30 @@ var v = /*@__PURE__*/ o({
|
|
|
25
26
|
openModifiers: {}
|
|
26
27
|
}),
|
|
27
28
|
emits: ["update:open"],
|
|
28
|
-
setup(
|
|
29
|
-
let
|
|
30
|
-
return (e, t) => (
|
|
31
|
-
open:
|
|
32
|
-
"onUpdate:open": t[0] ||= (e) =>
|
|
29
|
+
setup(c) {
|
|
30
|
+
let l = c, b = m(c, "open"), x = e(), S = r(() => l.unstyled ?? x.unstyled), C = r(() => l.items ?? []), w = r(() => S.value ? l.ui?.header : t().header({ class: l.ui?.header })), T = r(() => S.value ? [l.ui?.content, l.class] : t().content({ class: [l.ui?.content, l.class] }));
|
|
31
|
+
return (e, t) => (d(), i(p(v), {
|
|
32
|
+
open: b.value,
|
|
33
|
+
"onUpdate:open": t[0] ||= (e) => b.value = e
|
|
33
34
|
}, {
|
|
34
|
-
default:
|
|
35
|
-
default:
|
|
35
|
+
default: h(() => [s(p(y), { "as-child": "" }, {
|
|
36
|
+
default: h(() => [f(e.$slots, "trigger")]),
|
|
36
37
|
_: 3
|
|
37
|
-
}),
|
|
38
|
-
default:
|
|
39
|
-
align:
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
38
|
+
}), s(p(_), null, {
|
|
39
|
+
default: h(() => [s(p(g), {
|
|
40
|
+
align: l.align,
|
|
41
|
+
"align-offset": l.alignOffset,
|
|
42
|
+
side: l.side,
|
|
43
|
+
"side-offset": l.sideOffset,
|
|
44
|
+
class: u(T.value)
|
|
43
45
|
}, {
|
|
44
|
-
default:
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
default: h(() => [e.$slots.header ? (d(), o("div", {
|
|
47
|
+
key: 0,
|
|
48
|
+
class: u(w.value)
|
|
49
|
+
}, [f(e.$slots, "header")], 2)) : a("", !0), f(e.$slots, "default", {}, () => [s(n, {
|
|
50
|
+
entries: C.value,
|
|
51
|
+
unstyled: S.value,
|
|
52
|
+
ui: l.ui
|
|
48
53
|
}, null, 8, [
|
|
49
54
|
"entries",
|
|
50
55
|
"unstyled",
|
|
@@ -53,6 +58,7 @@ var v = /*@__PURE__*/ o({
|
|
|
53
58
|
_: 3
|
|
54
59
|
}, 8, [
|
|
55
60
|
"align",
|
|
61
|
+
"align-offset",
|
|
56
62
|
"side",
|
|
57
63
|
"side-offset",
|
|
58
64
|
"class"
|
|
@@ -64,4 +70,4 @@ var v = /*@__PURE__*/ o({
|
|
|
64
70
|
}
|
|
65
71
|
});
|
|
66
72
|
//#endregion
|
|
67
|
-
export {
|
|
73
|
+
export { b as default };
|