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.
Files changed (87) hide show
  1. package/dist/component-names.d.ts +1 -1
  2. package/dist/component-names.js +1 -1
  3. package/dist/components/Calendar.js +5 -0
  4. package/dist/components/Calendar.vue.d.ts +69 -0
  5. package/dist/components/Calendar.vue_vue_type_script_setup_true_lang.js +168 -0
  6. package/dist/components/Combobox.vue.d.ts +9 -9
  7. package/dist/components/Combobox.vue_vue_type_script_setup_true_lang.js +180 -144
  8. package/dist/components/DateField.js +5 -0
  9. package/dist/components/DateField.vue.d.ts +38 -0
  10. package/dist/components/DateField.vue_vue_type_script_setup_true_lang.js +94 -0
  11. package/dist/components/DatePicker.vue.d.ts +7 -2
  12. package/dist/components/DatePicker.vue_vue_type_script_setup_true_lang.js +73 -124
  13. package/dist/components/DateRangePicker.vue.d.ts +2 -2
  14. package/dist/components/DateRangePicker.vue_vue_type_script_setup_true_lang.js +81 -78
  15. package/dist/components/DropdownMenu.vue.d.ts +13 -6
  16. package/dist/components/DropdownMenu.vue_vue_type_script_setup_true_lang.js +28 -22
  17. package/dist/components/Editable.js +5 -0
  18. package/dist/components/Editable.vue.d.ts +81 -0
  19. package/dist/components/Editable.vue_vue_type_script_setup_true_lang.js +140 -0
  20. package/dist/components/HoverCard.js +5 -0
  21. package/dist/components/HoverCard.vue.d.ts +68 -0
  22. package/dist/components/HoverCard.vue_vue_type_script_setup_true_lang.js +79 -0
  23. package/dist/components/TagsInput.vue.d.ts +2 -2
  24. package/dist/components/TimeField.vue_vue_type_script_setup_true_lang.js +17 -14
  25. package/dist/components/index.d.ts +4 -0
  26. package/dist/components/index.js +124 -116
  27. package/dist/index.d.ts +4 -0
  28. package/dist/index.js +130 -122
  29. package/dist/theme/accordion.d.ts +0 -15
  30. package/dist/theme/alert.d.ts +0 -3
  31. package/dist/theme/avatar.d.ts +0 -3
  32. package/dist/theme/banner.d.ts +0 -6
  33. package/dist/theme/bar-chart.d.ts +0 -18
  34. package/dist/theme/breadcrumb.d.ts +0 -3
  35. package/dist/theme/calendar.d.ts +62 -0
  36. package/dist/theme/calendar.js +29 -0
  37. package/dist/theme/card.d.ts +0 -6
  38. package/dist/theme/chart-legend.d.ts +0 -3
  39. package/dist/theme/checkbox.d.ts +0 -6
  40. package/dist/theme/color-picker.d.ts +0 -6
  41. package/dist/theme/combobox.js +4 -4
  42. package/dist/theme/command-palette.d.ts +0 -6
  43. package/dist/theme/container.d.ts +0 -3
  44. package/dist/theme/container.js +3 -3
  45. package/dist/theme/date-field.d.ts +65 -0
  46. package/dist/theme/date-field.js +21 -0
  47. package/dist/theme/date-picker.d.ts +0 -195
  48. package/dist/theme/date-picker.js +2 -24
  49. package/dist/theme/donut-chart.d.ts +0 -18
  50. package/dist/theme/dropdown-menu.d.ts +3 -0
  51. package/dist/theme/dropdown-menu.js +1 -0
  52. package/dist/theme/editable.d.ts +77 -0
  53. package/dist/theme/editable.js +26 -0
  54. package/dist/theme/empty-state.d.ts +0 -3
  55. package/dist/theme/file-upload.d.ts +0 -39
  56. package/dist/theme/hover-card.d.ts +92 -0
  57. package/dist/theme/hover-card.js +28 -0
  58. package/dist/theme/index.d.ts +4 -0
  59. package/dist/theme/input.d.ts +0 -18
  60. package/dist/theme/kbd.d.ts +0 -3
  61. package/dist/theme/line-chart.d.ts +0 -18
  62. package/dist/theme/navigation-menu.d.ts +0 -48
  63. package/dist/theme/number-input.d.ts +0 -3
  64. package/dist/theme/page-header.d.ts +0 -3
  65. package/dist/theme/password-input.d.ts +0 -23
  66. package/dist/theme/pin-input.d.ts +0 -3
  67. package/dist/theme/popover.d.ts +0 -6
  68. package/dist/theme/progress.d.ts +0 -51
  69. package/dist/theme/scroll-area.d.ts +0 -3
  70. package/dist/theme/separator.d.ts +0 -3
  71. package/dist/theme/sidebar.d.ts +0 -54
  72. package/dist/theme/skeleton.d.ts +0 -3
  73. package/dist/theme/skeleton.js +1 -1
  74. package/dist/theme/slider.d.ts +0 -6
  75. package/dist/theme/sparkline.d.ts +0 -11
  76. package/dist/theme/splitter.d.ts +0 -3
  77. package/dist/theme/stat.d.ts +0 -12
  78. package/dist/theme/stat.js +2 -2
  79. package/dist/theme/switch.d.ts +0 -6
  80. package/dist/theme/table.d.ts +0 -39
  81. package/dist/theme/tabs.d.ts +0 -12
  82. package/dist/theme/time-field.d.ts +0 -3
  83. package/dist/theme/timeline.d.ts +0 -18
  84. package/dist/theme/toast.d.ts +0 -3
  85. package/dist/theme/toggle.d.ts +0 -23
  86. package/dist/theme/tree.d.ts +0 -3
  87. 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 { useFormField as n } from "../composables/form.js";
4
- import { formatIsoDate as r, isoToday as i, toCalendarDate as a, toIsoDate as o } from "../composables/date.js";
5
- import { datePickerTheme as s } from "../theme/date-picker.js";
6
- import { Fragment as c, computed as l, createBlock as u, createCommentVNode as ee, 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, toDisplayString as x, unref as S, useModel as C, withCtx as w } from "vue";
7
- import { ArrowLeft01Icon as T, ArrowRight01Icon as te, Calendar03Icon as E } from "@hugeicons/core-free-icons";
8
- import { CalendarCell as D, CalendarCellTrigger as O, CalendarGrid as k, CalendarGridBody as A, CalendarGridHead as j, CalendarGridRow as M, CalendarHeadCell as N, CalendarHeader as P, CalendarHeading as F, CalendarNext as I, CalendarPrev as L, CalendarRoot as R, PopoverContent as z, PopoverPortal as B, PopoverRoot as ne, PopoverTrigger as V } from "reka-ui";
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 H = [
11
+ var D = [
11
12
  "id",
12
13
  "disabled",
13
14
  "aria-invalid",
14
15
  "aria-describedby"
15
- ], U = { key: 0 }, W = /*@__PURE__*/ h({
16
+ ], O = { key: 0 }, k = /*@__PURE__*/ p({
16
17
  __name: "DatePicker",
17
- props: /*@__PURE__*/ g({
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(h) {
48
- let g = h, W = C(h, "modelValue"), G = y(!1), K = n(), q = l(() => g.id ?? K?.id.value), J = l(() => g.invalid ?? K?.invalid.value ?? !1), Y = e(), X = l(() => g.unstyled ?? Y.unstyled), Z = l({
49
- get: () => a(W.value),
50
- set: (e) => {
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 oe() {
58
- W.value = null, G.value = !1;
54
+ function R() {
55
+ k.value = null, A.value = !1;
59
56
  }
60
- let se = l(() => s({
61
- size: g.size,
62
- invalid: J.value
57
+ let z = s(() => o({
58
+ size: m.size,
59
+ invalid: N.value
63
60
  }));
64
- function $(e, t) {
65
- let n = g.ui?.[e];
66
- return X.value ? [n, t] : se.value[e]({ class: [n, t] });
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
- return (e, n) => (v(), u(S(ne), {
69
- open: G.value,
70
- "onUpdate:open": n[2] ||= (e) => G.value = e
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: w(() => [m(S(V), { "as-child": "" }, {
73
- default: w(() => [f("button", {
74
- id: q.value,
73
+ default: x(() => [f(y(E), { "as-child": "" }, {
74
+ default: x(() => [d("button", {
75
+ id: M.value,
75
76
  type: "button",
76
- disabled: g.disabled,
77
- "aria-invalid": J.value || void 0,
78
- "aria-describedby": S(K)?.describedBy.value,
79
- class: _($("trigger", g.class))
80
- }, [Q.value ? (v(), d("span", U, x(Q.value), 1)) : (v(), d("span", {
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: _($("placeholder"))
83
- }, x(g.placeholder), 3)), m(t, { icon: S(E) }, null, 8, ["icon"])], 10, H)]),
83
+ class: h(B("placeholder"))
84
+ }, v(m.placeholder), 3)), f(t, { icon: y(S) }, null, 8, ["icon"])], 10, D)]),
84
85
  _: 1
85
- }), m(S(B), null, {
86
- default: w(() => [m(S(z), {
87
- class: _($("content")),
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: w(() => [m(S(R), {
92
- modelValue: Z.value,
93
- "onUpdate:modelValue": [n[0] ||= (e) => Z.value = e, n[1] ||= (e) => G.value = !1],
94
- "min-value": re.value,
95
- "max-value": ie.value,
96
- locale: g.locale,
97
- "week-starts-on": g.weekStartsOn,
98
- "fixed-weeks": "",
99
- "initial-focus": ""
100
- }, {
101
- default: w(({ grid: e, weekDays: n }) => [m(S(P), { class: _($("header")) }, {
102
- default: w(() => [
103
- m(S(L), {
104
- "aria-label": g.previousLabel,
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-value",
164
- "max-value",
107
+ "min",
108
+ "max",
165
109
  "locale",
166
- "week-starts-on"
167
- ]), f("div", { class: _($("footer")) }, [f("button", {
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: _($("action")),
170
- onClick: ae
171
- }, x(g.todayLabel), 3), g.clearable ? (v(), d("button", {
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: _($("action")),
175
- onClick: oe
176
- }, x(g.clearLabel), 3)) : ee("", !0)], 2)]),
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 { W as default };
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 { useFormField as n } from "../composables/form.js";
4
- import { formatIsoDate as r, toCalendarDate as i, toIsoDate as a } from "../composables/date.js";
5
- import { datePickerTheme as ee } from "../theme/date-picker.js";
6
- 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, openBlock as _, ref as v, renderList as y, shallowRef as b, toDisplayString as x, unref as S, useModel as C, watch as w, withCtx as T } from "vue";
7
- import { ArrowLeft01Icon as E, ArrowRight01Icon as D, Calendar03Icon as te } from "@hugeicons/core-free-icons";
8
- import { PopoverContent as ne, PopoverPortal as re, PopoverRoot as O, PopoverTrigger as k, RangeCalendarCell as A, RangeCalendarCellTrigger as j, RangeCalendarGrid as M, RangeCalendarGridBody as N, RangeCalendarGridHead as P, RangeCalendarGridRow as F, RangeCalendarHeadCell as I, RangeCalendarHeader as L, RangeCalendarHeading as R, RangeCalendarNext as z, RangeCalendarPrev as B, RangeCalendarRoot as V } from "reka-ui";
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__*/ m({
16
+ ], U = { key: 0 }, W = /*@__PURE__*/ h({
16
17
  __name: "DateRangePicker",
17
- props: /*@__PURE__*/ h({
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(m) {
52
- let h = m, W = C(m, "modelValue"), G = v(!1), K = n(), q = s(() => h.id ?? K?.id.value), J = s(() => h.invalid ?? K?.invalid.value ?? !1), Y = e(), ie = s(() => h.unstyled ?? Y.unstyled), X = b({
53
- start: i(W.value?.start),
54
- end: i(W.value?.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 a(e.start) === (W.value?.start ?? null) && a(e.end) === (W.value?.end ?? null);
58
+ return i(e.start) === (W.value?.start ?? null) && i(e.end) === (W.value?.end ?? null);
58
59
  }
59
- w(W, () => {
60
+ T(W, () => {
60
61
  Z(X.value) || (X.value = {
61
- start: i(W.value?.start),
62
- end: i(W.value?.end)
62
+ start: r(W.value?.start),
63
+ end: r(W.value?.end)
63
64
  });
64
- }, { deep: !0 }), w(X, (e) => {
65
+ }, { deep: !0 }), T(X, (e) => {
65
66
  Z(e) || (W.value = {
66
- start: a(e.start),
67
- end: a(e.end)
67
+ start: i(e.start),
68
+ end: i(e.end)
68
69
  });
69
70
  });
70
- let ae = s(() => i(h.min)), oe = s(() => i(h.max)), Q = s(() => {
71
- let e = r(W.value?.start, h.locale, h.format), t = r(W.value?.end, h.locale, h.format);
72
- return !e && !t ? "" : t ? `${e}${h.separator}${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
- w(W, (e) => {
75
+ T(W, (e) => {
75
76
  G.value && e?.start && e?.end && (G.value = !1);
76
77
  }, { deep: !0 });
77
- function se() {
78
+ function ce() {
78
79
  W.value = {
79
80
  start: null,
80
81
  end: null
81
82
  }, G.value = !1;
82
83
  }
83
- let ce = s(() => ee({
84
- size: h.size,
85
- invalid: J.value,
86
- range: !0
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 = h.ui?.[e];
90
- return ie.value ? [n, t] : ce.value[e]({ class: [n, t] });
92
+ let n = g.ui?.[e];
93
+ return ae.value ? [n, t] : le.value[e]({ class: [n, t] });
91
94
  }
92
- return (e, n) => (_(), c(S(O), {
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: T(() => [p(S(k), { "as-child": "" }, {
97
- default: T(() => [d("button", {
99
+ default: E(() => [m(C(A), { "as-child": "" }, {
100
+ default: E(() => [f("button", {
98
101
  id: q.value,
99
102
  type: "button",
100
- disabled: h.disabled,
103
+ disabled: g.disabled,
101
104
  "aria-invalid": J.value || void 0,
102
- "aria-describedby": S(K)?.describedBy.value,
103
- class: g($("trigger", h.class))
104
- }, [Q.value ? (_(), u("span", U, x(Q.value), 1)) : (_(), u("span", {
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: g($("placeholder"))
107
- }, x(h.placeholder), 3)), p(t, { icon: S(te) }, null, 8, ["icon"])], 10, H)]),
109
+ class: _($("placeholder"))
110
+ }, S(g.placeholder), 3)), m(t, { icon: C(re) }, null, 8, ["icon"])], 10, H)]),
108
111
  _: 1
109
- }), p(S(re), null, {
110
- default: T(() => [p(S(ne), {
111
- class: g($("content")),
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: T(() => [p(S(V), {
118
+ default: E(() => [m(C(ie), {
116
119
  modelValue: X.value,
117
120
  "onUpdate:modelValue": n[0] ||= (e) => X.value = e,
118
- "min-value": ae.value,
119
- "max-value": oe.value,
120
- locale: h.locale,
121
- "week-starts-on": h.weekStartsOn,
122
- "number-of-months": h.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: T(({ grid: e, weekDays: n }) => [p(S(L), { class: g($("header")) }, {
127
- default: T(() => [
128
- p(S(B), {
129
- "aria-label": h.previousLabel,
130
- class: g($("nav"))
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: T(() => [p(t, { icon: S(E) }, null, 8, ["icon"])]),
135
+ default: E(() => [m(t, { icon: C(te) }, null, 8, ["icon"])]),
133
136
  _: 1
134
137
  }, 8, ["aria-label", "class"]),
135
- p(S(R), { class: g($("heading")) }, null, 8, ["class"]),
136
- p(S(z), {
137
- "aria-label": h.nextLabel,
138
- class: g($("nav"))
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: T(() => [p(t, { icon: S(D) }, null, 8, ["icon"])]),
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"]), d("div", { class: g($("months")) }, [(_(!0), u(o, null, y(e, (e) => (_(), c(S(M), {
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: g($("grid"))
150
+ class: _($("grid"))
148
151
  }, {
149
- default: T(() => [p(S(P), null, {
150
- default: T(() => [p(S(F), null, {
151
- default: T(() => [(_(!0), u(o, null, y(n, (e) => (_(), c(S(I), {
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: g($("headCell"))
156
+ class: _($("headCell"))
154
157
  }, {
155
- default: T(() => [f(x(e), 1)]),
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), p(S(N), null, {
162
- default: T(() => [(_(!0), u(o, null, y(e.rows, (t, n) => (_(), c(S(F), { key: `week-${n}` }, {
163
- default: T(() => [(_(!0), u(o, null, y(t, (t) => (_(), c(S(A), {
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: g($("cell"))
169
+ class: _($("cell"))
167
170
  }, {
168
- default: T(() => [p(S(j), {
171
+ default: E(() => [m(C(M), {
169
172
  day: t,
170
173
  month: e.value,
171
- class: g($("cellTrigger"))
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
- ]), h.clearable ? (_(), u("div", {
196
+ ]), g.clearable ? (v(), d("div", {
194
197
  key: 0,
195
- class: g($("footer"))
196
- }, [d("button", {
198
+ class: _($("footer"))
199
+ }, [f("button", {
197
200
  type: "button",
198
- class: g($("action")),
199
- onClick: se
200
- }, x(h.clearLabel), 3)], 2)) : l("", !0)]),
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, 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";
5
- import { DropdownMenuContent as m, DropdownMenuPortal as h, DropdownMenuRoot as g, DropdownMenuTrigger as _ } from "reka-ui";
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 v = /*@__PURE__*/ o({
7
+ var b = /*@__PURE__*/ c({
8
8
  __name: "DropdownMenu",
9
- props: /*@__PURE__*/ s({
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(o) {
29
- let s = o, v = f(o, "open"), y = e(), b = r(() => s.unstyled ?? y.unstyled), x = r(() => s.items ?? []), S = r(() => b.value ? [s.ui?.content, s.class] : t().content({ class: [s.ui?.content, s.class] }));
30
- return (e, t) => (l(), i(d(g), {
31
- open: v.value,
32
- "onUpdate:open": t[0] ||= (e) => v.value = 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: p(() => [a(d(_), { "as-child": "" }, {
35
- default: p(() => [u(e.$slots, "trigger")]),
35
+ default: h(() => [s(p(y), { "as-child": "" }, {
36
+ default: h(() => [f(e.$slots, "trigger")]),
36
37
  _: 3
37
- }), a(d(h), null, {
38
- default: p(() => [a(d(m), {
39
- align: s.align,
40
- side: s.side,
41
- "side-offset": s.sideOffset,
42
- class: c(S.value)
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: p(() => [u(e.$slots, "default", {}, () => [a(n, {
45
- entries: x.value,
46
- unstyled: b.value,
47
- ui: s.ui
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 { v as default };
73
+ export { b as default };
@@ -0,0 +1,5 @@
1
+ import e from "./Editable.vue_vue_type_script_setup_true_lang.js";
2
+ //#region src/components/Editable.vue
3
+ var t = e;
4
+ //#endregion
5
+ export { t as default };