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
@@ -3,5 +3,5 @@
3
3
  * Consumed by the Vue plugin (global registration) and the Nuxt module
4
4
  * (auto-imports). Keep in sync with `src/components/index.ts`.
5
5
  */
6
- export declare const componentNames: readonly ["Accordion", "Alert", "App", "AppShell", "AspectRatio", "Avatar", "AvatarGroup", "Badge", "BarChart", "Banner", "Breadcrumb", "Button", "ButtonGroup", "Card", "ChartLegend", "Checkbox", "ColorPicker", "Combobox", "Collapsible", "CommandPalette", "Container", "ConfirmDialog", "ContextMenu", "DatePicker", "DateRangePicker", "Dialog", "DonutChart", "Drawer", "DropdownMenu", "EmptyState", "FileUpload", "Form", "FormField", "Icon", "Input", "Kbd", "Label", "LineChart", "NavigationMenu", "NumberInput", "Menubar", "PageHeader", "Pagination", "PasswordInput", "PinInput", "Popover", "Progress", "RadioGroup", "ScrollArea", "ScrollFade", "Select", "Separator", "Sidebar", "SignaturePad", "Skeleton", "Slider", "Sparkline", "Splitter", "Stat", "Stepper", "Switch", "Table", "Tabs", "TagsInput", "Textarea", "Toaster", "Toggle", "ToggleGroup", "TimeField", "Timeline", "Toolbar", "Tooltip", "Tree"];
6
+ export declare const componentNames: readonly ["Accordion", "Alert", "App", "AppShell", "AspectRatio", "Avatar", "AvatarGroup", "Badge", "BarChart", "Banner", "Breadcrumb", "Button", "ButtonGroup", "Calendar", "Card", "ChartLegend", "Checkbox", "ColorPicker", "Combobox", "Collapsible", "CommandPalette", "Container", "ConfirmDialog", "ContextMenu", "DateField", "DatePicker", "DateRangePicker", "Dialog", "DonutChart", "Drawer", "DropdownMenu", "Editable", "EmptyState", "FileUpload", "Form", "FormField", "HoverCard", "Icon", "Input", "Kbd", "Label", "LineChart", "NavigationMenu", "NumberInput", "Menubar", "PageHeader", "Pagination", "PasswordInput", "PinInput", "Popover", "Progress", "RadioGroup", "ScrollArea", "ScrollFade", "Select", "Separator", "Sidebar", "SignaturePad", "Skeleton", "Slider", "Sparkline", "Splitter", "Stat", "Stepper", "Switch", "Table", "Tabs", "TagsInput", "Textarea", "Toaster", "Toggle", "ToggleGroup", "TimeField", "Timeline", "Toolbar", "Tooltip", "Tree"];
7
7
  export type ComponentName = (typeof componentNames)[number];
@@ -1,4 +1,4 @@
1
1
  //#region src/component-names.ts
2
- var e = /* @__PURE__ */ "Accordion.Alert.App.AppShell.AspectRatio.Avatar.AvatarGroup.Badge.BarChart.Banner.Breadcrumb.Button.ButtonGroup.Card.ChartLegend.Checkbox.ColorPicker.Combobox.Collapsible.CommandPalette.Container.ConfirmDialog.ContextMenu.DatePicker.DateRangePicker.Dialog.DonutChart.Drawer.DropdownMenu.EmptyState.FileUpload.Form.FormField.Icon.Input.Kbd.Label.LineChart.NavigationMenu.NumberInput.Menubar.PageHeader.Pagination.PasswordInput.PinInput.Popover.Progress.RadioGroup.ScrollArea.ScrollFade.Select.Separator.Sidebar.SignaturePad.Skeleton.Slider.Sparkline.Splitter.Stat.Stepper.Switch.Table.Tabs.TagsInput.Textarea.Toaster.Toggle.ToggleGroup.TimeField.Timeline.Toolbar.Tooltip.Tree".split(".");
2
+ var e = /* @__PURE__ */ "Accordion.Alert.App.AppShell.AspectRatio.Avatar.AvatarGroup.Badge.BarChart.Banner.Breadcrumb.Button.ButtonGroup.Calendar.Card.ChartLegend.Checkbox.ColorPicker.Combobox.Collapsible.CommandPalette.Container.ConfirmDialog.ContextMenu.DateField.DatePicker.DateRangePicker.Dialog.DonutChart.Drawer.DropdownMenu.Editable.EmptyState.FileUpload.Form.FormField.HoverCard.Icon.Input.Kbd.Label.LineChart.NavigationMenu.NumberInput.Menubar.PageHeader.Pagination.PasswordInput.PinInput.Popover.Progress.RadioGroup.ScrollArea.ScrollFade.Select.Separator.Sidebar.SignaturePad.Skeleton.Slider.Sparkline.Splitter.Stat.Stepper.Switch.Table.Tabs.TagsInput.Textarea.Toaster.Toggle.ToggleGroup.TimeField.Timeline.Toolbar.Tooltip.Tree".split(".");
3
3
  //#endregion
4
4
  export { e as componentNames };
@@ -0,0 +1,5 @@
1
+ import e from "./Calendar.vue_vue_type_script_setup_true_lang.js";
2
+ //#region src/components/Calendar.vue
3
+ var t = e;
4
+ //#endregion
5
+ export { t as default };
@@ -0,0 +1,69 @@
1
+ export interface CalendarProps {
2
+ /** Earliest selectable date, as an ISO `YYYY-MM-DD` string. */
3
+ min?: string;
4
+ /** Latest selectable date, as an ISO `YYYY-MM-DD` string. */
5
+ max?: string;
6
+ /** Locale for the month names and weekday initials. */
7
+ locale?: string;
8
+ /** 0 is Sunday. Defaults to the locale's own convention. */
9
+ weekStartsOn?: 0 | 1 | 2 | 3 | 4 | 5 | 6;
10
+ /** How the weekday headings read — `narrow` is `M`, `short` is `Mon`. */
11
+ weekdayFormat?: 'narrow' | 'short' | 'long';
12
+ /** Months shown side by side. */
13
+ months?: number;
14
+ /** Page a month at a time rather than a full view. Only matters past one month. */
15
+ pagedNavigation?: boolean;
16
+ /**
17
+ * Keep every month six rows tall. On by default: without it the calendar
18
+ * changes height as you page through, which moves everything below it.
19
+ */
20
+ fixedWeeks?: boolean;
21
+ /** Grey out the days that belong to the neighbouring months. */
22
+ disableDaysOutsideCurrentView?: boolean;
23
+ disabled?: boolean;
24
+ /** Selectable but not changeable. */
25
+ readonly?: boolean;
26
+ /** Move focus to the selected day, or today, on mount. */
27
+ initialFocus?: boolean;
28
+ /**
29
+ * Refuse a date — a taken slot, a closed day. Given an ISO `YYYY-MM-DD`
30
+ * string. Unavailable days are struck through rather than hidden, so the
31
+ * reader can see the day exists and is spoken for.
32
+ */
33
+ isUnavailable?: (date: string) => boolean;
34
+ /** Keep a date selected when it is clicked a second time. */
35
+ preventDeselect?: boolean;
36
+ /** Names the whole calendar for a screen reader. */
37
+ label?: string;
38
+ /** Navigation labels — override for non-English apps. */
39
+ previousLabel?: string;
40
+ nextLabel?: string;
41
+ /** Skip built-in classes; you take over styling entirely. */
42
+ unstyled?: boolean;
43
+ class?: string;
44
+ /** Override classes per slot, e.g. `{ cellTrigger: 'rounded-full' }`. */
45
+ ui?: Partial<Record<'root' | 'header' | 'heading' | 'nav' | 'months' | 'grid' | 'headCell' | 'cell' | 'cellTrigger', string>>;
46
+ }
47
+ /**
48
+ * A month grid that is always on screen, for the cases a popover is wrong for:
49
+ * a booking page, an availability view, a date beside the thing it applies to.
50
+ * [`IDatePicker`](/components/date-picker) is this same grid behind a field.
51
+ */
52
+ type __VLS_Props = CalendarProps;
53
+ type __VLS_ModelProps = {
54
+ /** ISO `YYYY-MM-DD`, never a `Date`. See `composables/date.ts` for why. */
55
+ modelValue?: string | null;
56
+ };
57
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
58
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
59
+ "update:modelValue": (value: string | null) => any;
60
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
61
+ "onUpdate:modelValue"?: ((value: string | null) => any) | undefined;
62
+ }>, {
63
+ unstyled: boolean;
64
+ fixedWeeks: boolean;
65
+ previousLabel: string;
66
+ nextLabel: string;
67
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
68
+ declare const _default: typeof __VLS_export;
69
+ export default _default;
@@ -0,0 +1,168 @@
1
+ import { useIryxUiConfig as e } from "../config.js";
2
+ import t from "./Icon.js";
3
+ import { isoToday as n, toCalendarDate as r, toIsoDate as i } from "../composables/date.js";
4
+ import { calendarTheme as a } from "../theme/calendar.js";
5
+ import { Fragment as o, computed as s, createBlock as c, createElementBlock as l, createElementVNode as u, createTextVNode as d, createVNode as f, defineComponent as p, mergeModels as m, normalizeClass as h, openBlock as g, renderList as _, toDisplayString as v, unref as y, useModel as b, withCtx as x } from "vue";
6
+ import { ArrowLeft01Icon as S, ArrowRight01Icon as C } from "@hugeicons/core-free-icons";
7
+ import { CalendarCell as w, CalendarCellTrigger as T, CalendarGrid as E, CalendarGridBody as D, CalendarGridHead as O, CalendarGridRow as k, CalendarHeadCell as A, CalendarHeader as j, CalendarHeading as M, CalendarNext as N, CalendarPrev as P, CalendarRoot as F } from "reka-ui";
8
+ //#region src/components/Calendar.vue?vue&type=script&setup=true&lang.ts
9
+ var I = /*@__PURE__*/ p({
10
+ __name: "Calendar",
11
+ props: /*@__PURE__*/ m({
12
+ min: {},
13
+ max: {},
14
+ locale: {},
15
+ weekStartsOn: {},
16
+ weekdayFormat: {},
17
+ months: {},
18
+ pagedNavigation: { type: Boolean },
19
+ fixedWeeks: {
20
+ type: Boolean,
21
+ default: !0
22
+ },
23
+ disableDaysOutsideCurrentView: { type: Boolean },
24
+ disabled: { type: Boolean },
25
+ readonly: { type: Boolean },
26
+ initialFocus: { type: Boolean },
27
+ isUnavailable: {},
28
+ preventDeselect: { type: Boolean },
29
+ label: {},
30
+ previousLabel: { default: "Previous month" },
31
+ nextLabel: { default: "Next month" },
32
+ unstyled: {
33
+ type: Boolean,
34
+ default: void 0
35
+ },
36
+ class: {},
37
+ ui: {}
38
+ }, {
39
+ modelValue: { default: null },
40
+ modelModifiers: {}
41
+ }),
42
+ emits: ["update:modelValue"],
43
+ setup(p) {
44
+ let m = p, I = b(p, "modelValue"), L = e(), R = s(() => m.unstyled ?? L.unstyled), z = s({
45
+ get: () => r(I.value),
46
+ set: (e) => {
47
+ I.value = i(e);
48
+ }
49
+ }), B = s(() => r(m.min)), V = s(() => r(m.max)), H = s(() => {
50
+ let e = n();
51
+ if (m.min && e < m.min) return r(m.min);
52
+ if (m.max && e > m.max) return r(m.max);
53
+ }), U = s(() => {
54
+ let e = m.isUnavailable;
55
+ if (e) return (t) => {
56
+ let n = i(t);
57
+ return n ? e(n) : !1;
58
+ };
59
+ }), W = s(() => a());
60
+ function G(e, t) {
61
+ let n = m.ui?.[e];
62
+ return R.value ? [n, t] : W.value[e]({ class: [n, t] });
63
+ }
64
+ return (e, n) => (g(), c(y(F), {
65
+ modelValue: z.value,
66
+ "onUpdate:modelValue": n[0] ||= (e) => z.value = e,
67
+ "min-value": B.value,
68
+ "max-value": V.value,
69
+ locale: m.locale,
70
+ "week-starts-on": m.weekStartsOn,
71
+ "weekday-format": m.weekdayFormat,
72
+ "number-of-months": m.months,
73
+ "paged-navigation": m.pagedNavigation,
74
+ "fixed-weeks": m.fixedWeeks,
75
+ "disable-days-outside-current-view": m.disableDaysOutsideCurrentView,
76
+ disabled: m.disabled,
77
+ readonly: m.readonly,
78
+ "initial-focus": m.initialFocus,
79
+ "default-placeholder": H.value,
80
+ "is-date-unavailable": U.value,
81
+ "prevent-deselect": m.preventDeselect,
82
+ "calendar-label": m.label,
83
+ class: h(G("root", m.class))
84
+ }, {
85
+ default: x(({ grid: e, weekDays: n }) => [f(y(j), { class: h(G("header")) }, {
86
+ default: x(() => [
87
+ f(y(P), {
88
+ "aria-label": m.previousLabel,
89
+ class: h(G("nav"))
90
+ }, {
91
+ default: x(() => [f(t, { icon: y(S) }, null, 8, ["icon"])]),
92
+ _: 1
93
+ }, 8, ["aria-label", "class"]),
94
+ f(y(M), { class: h(G("heading")) }, null, 8, ["class"]),
95
+ f(y(N), {
96
+ "aria-label": m.nextLabel,
97
+ class: h(G("nav"))
98
+ }, {
99
+ default: x(() => [f(t, { icon: y(C) }, null, 8, ["icon"])]),
100
+ _: 1
101
+ }, 8, ["aria-label", "class"])
102
+ ]),
103
+ _: 1
104
+ }, 8, ["class"]), u("div", { class: h(G("months")) }, [(g(!0), l(o, null, _(e, (e) => (g(), c(y(E), {
105
+ key: e.value.toString(),
106
+ class: h(G("grid"))
107
+ }, {
108
+ default: x(() => [f(y(O), null, {
109
+ default: x(() => [f(y(k), null, {
110
+ default: x(() => [(g(!0), l(o, null, _(n, (e) => (g(), c(y(A), {
111
+ key: e,
112
+ class: h(G("headCell"))
113
+ }, {
114
+ default: x(() => [d(v(e), 1)]),
115
+ _: 2
116
+ }, 1032, ["class"]))), 128))]),
117
+ _: 2
118
+ }, 1024)]),
119
+ _: 2
120
+ }, 1024), f(y(D), null, {
121
+ default: x(() => [(g(!0), l(o, null, _(e.rows, (t, n) => (g(), c(y(k), { key: `week-${n}` }, {
122
+ default: x(() => [(g(!0), l(o, null, _(t, (t) => (g(), c(y(w), {
123
+ key: t.toString(),
124
+ date: t,
125
+ class: h(G("cell"))
126
+ }, {
127
+ default: x(() => [f(y(T), {
128
+ day: t,
129
+ month: e.value,
130
+ class: h(G("cellTrigger"))
131
+ }, null, 8, [
132
+ "day",
133
+ "month",
134
+ "class"
135
+ ])]),
136
+ _: 2
137
+ }, 1032, ["date", "class"]))), 128))]),
138
+ _: 2
139
+ }, 1024))), 128))]),
140
+ _: 2
141
+ }, 1024)]),
142
+ _: 2
143
+ }, 1032, ["class"]))), 128))], 2)]),
144
+ _: 1
145
+ }, 8, [
146
+ "modelValue",
147
+ "min-value",
148
+ "max-value",
149
+ "locale",
150
+ "week-starts-on",
151
+ "weekday-format",
152
+ "number-of-months",
153
+ "paged-navigation",
154
+ "fixed-weeks",
155
+ "disable-days-outside-current-view",
156
+ "disabled",
157
+ "readonly",
158
+ "initial-focus",
159
+ "default-placeholder",
160
+ "is-date-unavailable",
161
+ "prevent-deselect",
162
+ "calendar-label",
163
+ "class"
164
+ ]));
165
+ }
166
+ });
167
+ //#endregion
168
+ export { I as default };
@@ -75,26 +75,26 @@ export interface ComboboxProps extends ComboboxRootProps {
75
75
  groupLabel?: string;
76
76
  };
77
77
  }
78
- declare var __VLS_16: {
78
+ declare var __VLS_28: {
79
79
  option: ComboboxItemOption;
80
80
  remove: () => void;
81
- }, __VLS_70: {
81
+ }, __VLS_107: {
82
82
  query: string;
83
- }, __VLS_78: {
83
+ }, __VLS_115: {
84
84
  query: string;
85
- }, __VLS_80: {}, __VLS_159: {
85
+ }, __VLS_117: {}, __VLS_196: {
86
86
  query: string;
87
87
  };
88
88
  type __VLS_Slots = {} & {
89
- tag?: (props: typeof __VLS_16) => any;
89
+ tag?: (props: typeof __VLS_28) => any;
90
90
  } & {
91
- empty?: (props: typeof __VLS_70) => any;
91
+ empty?: (props: typeof __VLS_107) => any;
92
92
  } & {
93
- empty?: (props: typeof __VLS_78) => any;
93
+ empty?: (props: typeof __VLS_115) => any;
94
94
  } & {
95
- default?: (props: typeof __VLS_80) => any;
95
+ default?: (props: typeof __VLS_117) => any;
96
96
  } & {
97
- create?: (props: typeof __VLS_159) => any;
97
+ create?: (props: typeof __VLS_196) => any;
98
98
  };
99
99
  declare const __VLS_base: import("vue").DefineComponent<ComboboxProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
100
100
  "update:modelValue": (value: AcceptableValue) => any;