iryx-ui 0.10.2 → 0.12.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 (54) hide show
  1. package/README.md +593 -496
  2. package/dist/component-names.d.ts +1 -1
  3. package/dist/component-names.js +1 -1
  4. package/dist/components/Alert.vue_vue_type_script_setup_true_lang.js +42 -42
  5. package/dist/components/Banner.vue_vue_type_script_setup_true_lang.js +40 -40
  6. package/dist/components/BarChart.vue.d.ts +13 -0
  7. package/dist/components/BarChart.vue_vue_type_script_setup_true_lang.js +174 -132
  8. package/dist/components/Breadcrumb.vue_vue_type_script_setup_true_lang.js +28 -28
  9. package/dist/components/Button.vue_vue_type_script_setup_true_lang.js +14 -14
  10. package/dist/components/Checkbox.vue_vue_type_script_setup_true_lang.js +37 -30
  11. package/dist/components/Combobox.vue_vue_type_script_setup_true_lang.js +62 -60
  12. package/dist/components/DatePicker.vue_vue_type_script_setup_true_lang.js +65 -65
  13. package/dist/components/DateRangePicker.vue_vue_type_script_setup_true_lang.js +74 -74
  14. package/dist/components/Dialog.vue_vue_type_script_setup_true_lang.js +34 -34
  15. package/dist/components/Drawer.js +5 -0
  16. package/dist/components/Drawer.vue.d.ts +94 -0
  17. package/dist/components/Drawer.vue_vue_type_script_setup_true_lang.js +144 -0
  18. package/dist/components/DropdownMenuItems.vue_vue_type_script_setup_true_lang.js +42 -42
  19. package/dist/components/FileUpload.vue_vue_type_script_setup_true_lang.js +77 -77
  20. package/dist/components/Icon.vue_vue_type_script_setup_true_lang.js +11 -11
  21. package/dist/components/Input.vue_vue_type_script_setup_true_lang.js +33 -33
  22. package/dist/components/NumberInput.vue_vue_type_script_setup_true_lang.js +68 -66
  23. package/dist/components/Pagination.vue.d.ts +1 -1
  24. package/dist/components/Pagination.vue_vue_type_script_setup_true_lang.js +37 -37
  25. package/dist/components/PasswordInput.vue_vue_type_script_setup_true_lang.js +37 -37
  26. package/dist/components/Progress.vue_vue_type_script_setup_true_lang.js +34 -31
  27. package/dist/components/Select.vue_vue_type_script_setup_true_lang.js +47 -45
  28. package/dist/components/Stat.vue_vue_type_script_setup_true_lang.js +27 -27
  29. package/dist/components/Stepper.vue_vue_type_script_setup_true_lang.js +38 -38
  30. package/dist/components/Switch.vue_vue_type_script_setup_true_lang.js +9 -2
  31. package/dist/components/Table.vue_vue_type_script_setup_true_lang.js +87 -87
  32. package/dist/components/Toaster.vue_vue_type_script_setup_true_lang.js +41 -41
  33. package/dist/components/index.d.ts +1 -0
  34. package/dist/components/index.js +54 -52
  35. package/dist/composables/date.js +12 -15
  36. package/dist/index.d.ts +1 -0
  37. package/dist/index.js +55 -54
  38. package/dist/theme/drawer.d.ts +110 -0
  39. package/dist/theme/drawer.js +100 -0
  40. package/dist/theme/index.d.ts +1 -0
  41. package/package.json +3 -2
  42. package/theme.css +114 -0
  43. package/dist/node_modules/.pnpm/@hugeicons_core-free-icons@4.2.3/node_modules/@hugeicons/core-free-icons/dist/esm/index.js +0 -377
  44. package/dist/node_modules/.pnpm/@hugeicons_vue@1.0.7_vue@3.5.35_typescript@6.0.3_/node_modules/@hugeicons/vue/dist/esm/_virtual/_plugin-vue_export-helper.js +0 -8
  45. package/dist/node_modules/.pnpm/@hugeicons_vue@1.0.7_vue@3.5.35_typescript@6.0.3_/node_modules/@hugeicons/vue/dist/esm/components/HugeiconsIcon.vue.js +0 -25
  46. package/dist/node_modules/.pnpm/@hugeicons_vue@1.0.7_vue@3.5.35_typescript@6.0.3_/node_modules/@hugeicons/vue/dist/esm/components/HugeiconsIcon.vue2.js +0 -63
  47. package/dist/node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/CalendarDate.js +0 -122
  48. package/dist/node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/DateFormatter.js +0 -84
  49. package/dist/node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/calendars/GregorianCalendar.js +0 -91
  50. package/dist/node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/conversion.js +0 -107
  51. package/dist/node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/manipulation.js +0 -159
  52. package/dist/node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/queries.js +0 -29
  53. package/dist/node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/string.js +0 -37
  54. package/dist/node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/utils.js +0 -6
@@ -1,15 +1,15 @@
1
- import { ArrowDown01Icon as e, ArrowRight01Icon as t, ArrowUp01Icon as n, UnfoldMoreIcon as r } from "../node_modules/.pnpm/@hugeicons_core-free-icons@4.2.3/node_modules/@hugeicons/core-free-icons/dist/esm/index.js";
2
- import { useIryxUiConfig as i } from "../config.js";
3
- import a from "./Icon.js";
4
- import o from "./Checkbox.js";
5
- import s from "./Skeleton.js";
6
- import { useDataTable as c } from "../composables/data-table.js";
7
- import { tableTheme as l } from "../theme/table.js";
8
- import { Fragment as u, computed as d, createBlock as f, createCommentVNode as p, createElementBlock as m, createElementVNode as h, createTextVNode as g, createVNode as _, defineComponent as v, mergeModels as y, normalizeClass as b, normalizeStyle as x, openBlock as S, renderList as C, renderSlot as w, toDisplayString as T, unref as E, useModel as D, withModifiers as O } from "vue";
1
+ import { useIryxUiConfig as e } from "../config.js";
2
+ import t from "./Icon.js";
3
+ import n from "./Checkbox.js";
4
+ import r from "./Skeleton.js";
5
+ import { useDataTable as i } from "../composables/data-table.js";
6
+ import { tableTheme as a } from "../theme/table.js";
7
+ import { Fragment as o, computed as s, createBlock as c, createCommentVNode as l, createElementBlock as u, createElementVNode as d, createTextVNode as f, createVNode as p, defineComponent as m, mergeModels as h, normalizeClass as g, normalizeStyle as _, openBlock as v, renderList as y, renderSlot as b, toDisplayString as x, unref as S, useModel as C, withModifiers as w } from "vue";
8
+ import { ArrowDown01Icon as T, ArrowRight01Icon as E, ArrowUp01Icon as D, UnfoldMoreIcon as O } from "@hugeicons/core-free-icons";
9
9
  //#region src/components/Table.vue?vue&type=script&setup=true&lang.ts
10
- var k = ["aria-label", "aria-busy"], A = ["aria-sort"], j = ["onClick"], M = { key: 1 }, N = ["colspan"], ee = ["data-selected", "onClick"], P = ["aria-expanded", "onClick"], F = ["colspan"], I = /*@__PURE__*/ v({
10
+ var k = ["aria-label", "aria-busy"], A = ["aria-sort"], ee = ["onClick"], j = { key: 1 }, M = ["colspan"], N = ["data-selected", "onClick"], P = ["aria-expanded", "onClick"], F = ["colspan"], I = /*@__PURE__*/ m({
11
11
  __name: "Table",
12
- props: /*@__PURE__*/ y({
12
+ props: /*@__PURE__*/ h({
13
13
  rows: { default: () => [] },
14
14
  columns: { default: () => [] },
15
15
  total: { default: void 0 },
@@ -49,15 +49,15 @@ var k = ["aria-label", "aria-busy"], A = ["aria-sort"], j = ["onClick"], M = { k
49
49
  expanded: { default: () => [] },
50
50
  expandedModifiers: {}
51
51
  }),
52
- emits: /*@__PURE__*/ y(["rowClick"], [
52
+ emits: /*@__PURE__*/ h(["rowClick"], [
53
53
  "update:sort",
54
54
  "update:page",
55
55
  "update:perPage",
56
56
  "update:selection",
57
57
  "update:expanded"
58
58
  ]),
59
- setup(v, { expose: y, emit: I }) {
60
- let L = v, R = I, z = D(v, "sort"), B = D(v, "page"), V = D(v, "perPage"), H = D(v, "selection"), U = D(v, "expanded"), W = c({
59
+ setup(m, { expose: h, emit: I }) {
60
+ let L = m, R = I, z = C(m, "sort"), B = C(m, "page"), V = C(m, "perPage"), H = C(m, "selection"), U = C(m, "expanded"), W = i({
61
61
  rows: () => L.rows,
62
62
  columns: () => L.columns,
63
63
  total: () => L.total,
@@ -68,7 +68,7 @@ var k = ["aria-label", "aria-busy"], A = ["aria-sort"], j = ["onClick"], M = { k
68
68
  perPage: V,
69
69
  selection: H,
70
70
  expanded: U
71
- }), G = i(), K = d(() => L.unstyled ?? G.unstyled), q = d(() => l({
71
+ }), G = e(), K = s(() => L.unstyled ?? G.unstyled), q = s(() => a({
72
72
  size: L.size,
73
73
  striped: L.striped,
74
74
  hoverable: L.hoverable ?? !0,
@@ -82,7 +82,7 @@ var k = ["aria-label", "aria-busy"], A = ["aria-sort"], j = ["onClick"], M = { k
82
82
  function Y(e) {
83
83
  return K.value ? void 0 : q.value[e]();
84
84
  }
85
- let X = d(() => K.value ? [L.ui?.root, L.class] : q.value.root({ class: [L.ui?.root, L.class] }));
85
+ let X = s(() => K.value ? [L.ui?.root, L.class] : q.value.root({ class: [L.ui?.root, L.class] }));
86
86
  function Z(e) {
87
87
  if (K.value) return;
88
88
  let t = e.align ?? (e.numeric ? "end" : "start");
@@ -97,7 +97,7 @@ var k = ["aria-label", "aria-busy"], A = ["aria-sort"], j = ["onClick"], M = { k
97
97
  function ne(e, t) {
98
98
  return typeof t.hidden == "function" ? t.hidden(e) : !1;
99
99
  }
100
- let $ = d(() => W.visibleColumns.value.length + +!!L.selectable + +!!L.expandable), re = d(() => L.loading && W.pageRows.value.length === 0), ie = d(() => !L.loading && W.pageRows.value.length === 0);
100
+ let $ = s(() => W.visibleColumns.value.length + +!!L.selectable + +!!L.expandable), re = s(() => L.loading && W.pageRows.value.length === 0), ie = s(() => !L.loading && W.pageRows.value.length === 0);
101
101
  function ae(e) {
102
102
  if (!e.sortable) return;
103
103
  let t = W.sortOrderFor(e);
@@ -106,110 +106,110 @@ var k = ["aria-label", "aria-busy"], A = ["aria-sort"], j = ["onClick"], M = { k
106
106
  function oe(e) {
107
107
  L.clickableRows && R("rowClick", e);
108
108
  }
109
- return y({ table: W }), (i, c) => (S(), m("div", { class: b(X.value) }, [h("table", {
110
- class: b(J("table")),
109
+ return h({ table: W }), (e, i) => (v(), u("div", { class: g(X.value) }, [d("table", {
110
+ class: g(J("table")),
111
111
  "aria-label": L.label,
112
112
  "aria-busy": L.loading || void 0
113
113
  }, [
114
- L.caption || i.$slots.caption ? (S(), m("caption", {
114
+ L.caption || e.$slots.caption ? (v(), u("caption", {
115
115
  key: 0,
116
- class: b(J("caption"))
117
- }, [w(i.$slots, "caption", {}, () => [g(T(L.caption), 1)])], 2)) : p("", !0),
118
- h("thead", { class: b(J("thead")) }, [h("tr", null, [
119
- L.expandable ? (S(), m("th", {
116
+ class: g(J("caption"))
117
+ }, [b(e.$slots, "caption", {}, () => [f(x(L.caption), 1)])], 2)) : l("", !0),
118
+ d("thead", { class: g(J("thead")) }, [d("tr", null, [
119
+ L.expandable ? (v(), u("th", {
120
120
  key: 0,
121
- class: b(Y("headGutter"))
122
- }, null, 2)) : p("", !0),
123
- L.selectable ? (S(), m("th", {
121
+ class: g(Y("headGutter"))
122
+ }, null, 2)) : l("", !0),
123
+ L.selectable ? (v(), u("th", {
124
124
  key: 1,
125
- class: b(Y("headGutter"))
126
- }, [_(o, {
127
- "model-value": E(W).headerSelection.value,
125
+ class: g(Y("headGutter"))
126
+ }, [p(n, {
127
+ "model-value": S(W).headerSelection.value,
128
128
  "aria-label": "Select all rows on this page",
129
- "onUpdate:modelValue": E(W).toggleAll
130
- }, null, 8, ["model-value", "onUpdate:modelValue"])], 2)) : p("", !0),
131
- (S(!0), m(u, null, C(E(W).visibleColumns.value, (t) => (S(), m("th", {
132
- key: t.key,
133
- class: b(J("th", Z(t))),
134
- style: x(t.width ? { width: t.width } : void 0),
135
- "aria-sort": ae(t),
129
+ "onUpdate:modelValue": S(W).toggleAll
130
+ }, null, 8, ["model-value", "onUpdate:modelValue"])], 2)) : l("", !0),
131
+ (v(!0), u(o, null, y(S(W).visibleColumns.value, (n) => (v(), u("th", {
132
+ key: n.key,
133
+ class: g(J("th", Z(n))),
134
+ style: _(n.width ? { width: n.width } : void 0),
135
+ "aria-sort": ae(n),
136
136
  scope: "col"
137
- }, [w(i.$slots, `header-${t.key}`, { column: t }, () => [t.sortable ? (S(), m("button", {
137
+ }, [b(e.$slots, `header-${n.key}`, { column: n }, () => [n.sortable ? (v(), u("button", {
138
138
  key: 0,
139
139
  type: "button",
140
- class: b(Y("sortButton")),
141
- onClick: (e) => E(W).toggleSort(t)
142
- }, [g(T(t.label ?? t.key) + " ", 1), _(a, {
143
- icon: E(W).sortOrderFor(t) === "asc" ? E(n) : E(W).sortOrderFor(t) === "desc" ? E(e) : E(r),
144
- class: b(Y("sortIcon"))
145
- }, null, 8, ["icon", "class"])], 10, j)) : (S(), m(u, { key: 1 }, [g(T(t.label ?? t.key), 1)], 64))])], 14, A))), 128))
140
+ class: g(Y("sortButton")),
141
+ onClick: (e) => S(W).toggleSort(n)
142
+ }, [f(x(n.label ?? n.key) + " ", 1), p(t, {
143
+ icon: S(W).sortOrderFor(n) === "asc" ? S(D) : S(W).sortOrderFor(n) === "desc" ? S(T) : S(O),
144
+ class: g(Y("sortIcon"))
145
+ }, null, 8, ["icon", "class"])], 10, ee)) : (v(), u(o, { key: 1 }, [f(x(n.label ?? n.key), 1)], 64))])], 14, A))), 128))
146
146
  ])], 2),
147
- h("tbody", { class: b(J("tbody")) }, [re.value ? (S(!0), m(u, { key: 0 }, C(L.loadingRows, (e) => (S(), m("tr", {
147
+ d("tbody", { class: g(J("tbody")) }, [re.value ? (v(!0), u(o, { key: 0 }, y(L.loadingRows, (e) => (v(), u("tr", {
148
148
  key: `skeleton-${e}`,
149
- class: b(J("tr"))
149
+ class: g(J("tr"))
150
150
  }, [
151
- L.expandable ? (S(), m("td", {
151
+ L.expandable ? (v(), u("td", {
152
152
  key: 0,
153
- class: b(Y("gutter"))
154
- }, [_(s, { class: "size-4" })], 2)) : p("", !0),
155
- L.selectable ? (S(), m("td", {
153
+ class: g(Y("gutter"))
154
+ }, [p(r, { class: "size-4" })], 2)) : l("", !0),
155
+ L.selectable ? (v(), u("td", {
156
156
  key: 1,
157
- class: b(Y("gutter"))
158
- }, [_(s, { class: "size-4" })], 2)) : p("", !0),
159
- (S(!0), m(u, null, C(E(W).visibleColumns.value, (e) => (S(), m("td", {
157
+ class: g(Y("gutter"))
158
+ }, [p(r, { class: "size-4" })], 2)) : l("", !0),
159
+ (v(!0), u(o, null, y(S(W).visibleColumns.value, (e) => (v(), u("td", {
160
160
  key: e.key,
161
- class: b(J("td"))
162
- }, [_(s, { class: "h-4 w-24" })], 2))), 128))
163
- ], 2))), 128)) : ie.value ? (S(), m("tr", M, [h("td", {
161
+ class: g(J("td"))
162
+ }, [p(r, { class: "h-4 w-24" })], 2))), 128))
163
+ ], 2))), 128)) : ie.value ? (v(), u("tr", j, [d("td", {
164
164
  colspan: $.value,
165
- class: b(J("empty"))
166
- }, [w(i.$slots, "empty", {}, () => [g(T(L.emptyText), 1)])], 10, N)])) : (S(!0), m(u, { key: 2 }, C(E(W).pageRows.value, (e) => (S(), m(u, { key: E(W).keyOf(e) }, [h("tr", {
167
- class: b([J("tr"), !K.value && E(W).isSelected(e) ? "bg-primary/5" : void 0]),
168
- "data-selected": E(W).isSelected(e) || void 0,
169
- onClick: (t) => oe(e)
165
+ class: g(J("empty"))
166
+ }, [b(e.$slots, "empty", {}, () => [f(x(L.emptyText), 1)])], 10, M)])) : (v(!0), u(o, { key: 2 }, y(S(W).pageRows.value, (r) => (v(), u(o, { key: S(W).keyOf(r) }, [d("tr", {
167
+ class: g([J("tr"), !K.value && S(W).isSelected(r) ? "bg-primary/5" : void 0]),
168
+ "data-selected": S(W).isSelected(r) || void 0,
169
+ onClick: (e) => oe(r)
170
170
  }, [
171
- L.expandable ? (S(), m("td", {
171
+ L.expandable ? (v(), u("td", {
172
172
  key: 0,
173
- class: b(Y("gutter")),
174
- onClick: c[0] ||= O(() => {}, ["stop"])
175
- }, [!L.canExpandRow || L.canExpandRow(e) ? (S(), m("button", {
173
+ class: g(Y("gutter")),
174
+ onClick: i[0] ||= w(() => {}, ["stop"])
175
+ }, [!L.canExpandRow || L.canExpandRow(r) ? (v(), u("button", {
176
176
  key: 0,
177
177
  type: "button",
178
- class: b([Y("expandButton"), E(W).isExpanded(e) && !K.value ? "rotate-90" : void 0]),
179
- "aria-expanded": E(W).isExpanded(e),
178
+ class: g([Y("expandButton"), S(W).isExpanded(r) && !K.value ? "rotate-90" : void 0]),
179
+ "aria-expanded": S(W).isExpanded(r),
180
180
  "aria-label": "Toggle row details",
181
- onClick: (t) => E(W).toggleExpanded(e)
182
- }, [_(a, { icon: E(t) }, null, 8, ["icon"])], 10, P)) : p("", !0)], 2)) : p("", !0),
183
- L.selectable ? (S(), m("td", {
181
+ onClick: (e) => S(W).toggleExpanded(r)
182
+ }, [p(t, { icon: S(E) }, null, 8, ["icon"])], 10, P)) : l("", !0)], 2)) : l("", !0),
183
+ L.selectable ? (v(), u("td", {
184
184
  key: 1,
185
- class: b(Y("gutter")),
186
- onClick: c[1] ||= O(() => {}, ["stop"])
187
- }, [!L.isRowSelectable || L.isRowSelectable(e) ? (S(), f(o, {
185
+ class: g(Y("gutter")),
186
+ onClick: i[1] ||= w(() => {}, ["stop"])
187
+ }, [!L.isRowSelectable || L.isRowSelectable(r) ? (v(), c(n, {
188
188
  key: 0,
189
- "model-value": E(W).isSelected(e),
189
+ "model-value": S(W).isSelected(r),
190
190
  "aria-label": "Select row",
191
- "onUpdate:modelValue": (t) => E(W).toggleRow(e)
192
- }, null, 8, ["model-value", "onUpdate:modelValue"])) : p("", !0)], 2)) : p("", !0),
193
- (S(!0), m(u, null, C(E(W).visibleColumns.value, (t) => (S(), m("td", {
191
+ "onUpdate:modelValue": (e) => S(W).toggleRow(r)
192
+ }, null, 8, ["model-value", "onUpdate:modelValue"])) : l("", !0)], 2)) : l("", !0),
193
+ (v(!0), u(o, null, y(S(W).visibleColumns.value, (t) => (v(), u("td", {
194
194
  key: t.key,
195
- class: b(J("td", [
195
+ class: g(J("td", [
196
196
  Z(t),
197
197
  Q(t),
198
- te(e, t)
198
+ te(r, t)
199
199
  ].filter(Boolean).join(" ") || void 0))
200
- }, [ne(e, t) ? p("", !0) : w(i.$slots, `cell-${t.key}`, {
200
+ }, [ne(r, t) ? l("", !0) : b(e.$slots, `cell-${t.key}`, {
201
201
  key: 0,
202
- row: e,
202
+ row: r,
203
203
  column: t,
204
- value: E(W).getRowValue(e, t.key)
205
- }, () => [g(T(E(W).getRowValue(e, t.key)), 1)])], 2))), 128))
206
- ], 10, ee), L.expandable && E(W).isExpanded(e) ? (S(), m("tr", {
204
+ value: S(W).getRowValue(r, t.key)
205
+ }, () => [f(x(S(W).getRowValue(r, t.key)), 1)])], 2))), 128))
206
+ ], 10, N), L.expandable && S(W).isExpanded(r) ? (v(), u("tr", {
207
207
  key: 0,
208
- class: b([J("tr"), Y("expandedRow")])
209
- }, [h("td", {
208
+ class: g([J("tr"), Y("expandedRow")])
209
+ }, [d("td", {
210
210
  colspan: $.value,
211
- class: b(Y("expandedCell"))
212
- }, [w(i.$slots, "expanded", { row: e })], 10, F)], 2)) : p("", !0)], 64))), 128))], 2)
211
+ class: g(Y("expandedCell"))
212
+ }, [b(e.$slots, "expanded", { row: r })], 10, F)], 2)) : l("", !0)], 64))), 128))], 2)
213
213
  ], 10, k)], 2));
214
214
  }
215
215
  });
@@ -1,12 +1,12 @@
1
- import { Alert02Icon as e, AlertCircleIcon as t, Cancel01Icon as n, CheckmarkCircle02Icon as r, InformationCircleIcon as i } from "../node_modules/.pnpm/@hugeicons_core-free-icons@4.2.3/node_modules/@hugeicons/core-free-icons/dist/esm/index.js";
2
- import { useIryxUiConfig as a } from "../config.js";
3
- import o from "./Icon.js";
4
- import { useToast as s, useToastState as c } from "../composables/toast.js";
5
- import { toastTheme as l } from "../theme/toast.js";
6
- import { Fragment as u, computed as d, createBlock as f, createCommentVNode as p, createElementBlock as m, createElementVNode as h, createTextVNode as g, createVNode as _, defineComponent as v, normalizeClass as y, openBlock as b, renderList as x, toDisplayString as S, unref as C, withCtx as w } from "vue";
1
+ import { useIryxUiConfig as e } from "../config.js";
2
+ import t from "./Icon.js";
3
+ import { useToast as n, useToastState as r } from "../composables/toast.js";
4
+ import { toastTheme as i } from "../theme/toast.js";
5
+ import { Fragment as a, computed as o, createBlock as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, createTextVNode as d, createVNode as f, defineComponent as p, normalizeClass as m, openBlock as h, renderList as g, toDisplayString as _, unref as v, withCtx as y } from "vue";
6
+ import { Alert02Icon as b, AlertCircleIcon as x, Cancel01Icon as S, CheckmarkCircle02Icon as C, InformationCircleIcon as w } from "@hugeicons/core-free-icons";
7
7
  import { ToastAction as T, ToastClose as E, ToastDescription as D, ToastPortal as O, ToastProvider as k, ToastRoot as A, ToastTitle as j, ToastViewport as M } from "reka-ui";
8
8
  //#region src/components/Toaster.vue?vue&type=script&setup=true&lang.ts
9
- var N = /*@__PURE__*/ v({
9
+ var N = /*@__PURE__*/ p({
10
10
  __name: "Toaster",
11
11
  props: {
12
12
  position: {},
@@ -19,12 +19,12 @@ var N = /*@__PURE__*/ v({
19
19
  class: {},
20
20
  ui: {}
21
21
  },
22
- setup(v) {
23
- let N = v, P = c(), { dismiss: F } = s(), I = {
24
- success: r,
25
- warning: e,
26
- danger: t,
27
- info: i
22
+ setup(p) {
23
+ let N = p, P = r(), { dismiss: F } = n(), I = {
24
+ success: C,
25
+ warning: b,
26
+ danger: x,
27
+ info: w
28
28
  };
29
29
  function L(e) {
30
30
  return e.variant && e.variant !== "neutral" ? I[e.variant] : void 0;
@@ -33,16 +33,16 @@ var N = /*@__PURE__*/ v({
33
33
  let t = e.duration ?? N.duration;
34
34
  return t === 0 ? Infinity : t;
35
35
  }
36
- let z = a(), B = d(() => N.unstyled ?? z.unstyled);
36
+ let z = e(), B = o(() => N.unstyled ?? z.unstyled);
37
37
  function V(e) {
38
- return l({
38
+ return i({
39
39
  variant: e.variant,
40
40
  position: N.position,
41
41
  withTitle: !!e.title
42
42
  });
43
43
  }
44
- let H = d(() => {
45
- let e = l({ position: N.position });
44
+ let H = o(() => {
45
+ let e = i({ position: N.position });
46
46
  return B.value ? [N.ui?.viewport, N.class] : e.viewport({ class: [N.ui?.viewport, N.class] });
47
47
  });
48
48
  function U(e, t) {
@@ -52,49 +52,49 @@ var N = /*@__PURE__*/ v({
52
52
  function W(e) {
53
53
  e.action?.onClick(), F(e.id);
54
54
  }
55
- return (e, t) => (b(), f(C(k), null, {
56
- default: w(() => [(b(!0), m(u, null, x(C(P), (e) => (b(), f(C(A), {
55
+ return (e, n) => (h(), s(v(k), null, {
56
+ default: y(() => [(h(!0), l(a, null, g(v(P), (e) => (h(), s(v(A), {
57
57
  key: e.id,
58
58
  duration: R(e),
59
- class: y(U(e, "root")),
60
- "onUpdate:open": (t) => !t && C(F)(e.id)
59
+ class: m(U(e, "root")),
60
+ "onUpdate:open": (t) => !t && v(F)(e.id)
61
61
  }, {
62
- default: w(() => [
63
- L(e) ? (b(), m("div", {
62
+ default: y(() => [
63
+ L(e) ? (h(), l("div", {
64
64
  key: 0,
65
- class: y(U(e, "icon"))
66
- }, [_(o, { icon: L(e) }, null, 8, ["icon"])], 2)) : p("", !0),
67
- h("div", { class: y(U(e, "content")) }, [e.title ? (b(), f(C(j), {
65
+ class: m(U(e, "icon"))
66
+ }, [f(t, { icon: L(e) }, null, 8, ["icon"])], 2)) : c("", !0),
67
+ u("div", { class: m(U(e, "content")) }, [e.title ? (h(), s(v(j), {
68
68
  key: 0,
69
- class: y(U(e, "title"))
69
+ class: m(U(e, "title"))
70
70
  }, {
71
- default: w(() => [g(S(e.title), 1)]),
71
+ default: y(() => [d(_(e.title), 1)]),
72
72
  _: 2
73
- }, 1032, ["class"])) : p("", !0), e.description ? (b(), f(C(D), {
73
+ }, 1032, ["class"])) : c("", !0), e.description ? (h(), s(v(D), {
74
74
  key: 1,
75
- class: y(U(e, "description"))
75
+ class: m(U(e, "description"))
76
76
  }, {
77
- default: w(() => [g(S(e.description), 1)]),
77
+ default: y(() => [d(_(e.description), 1)]),
78
78
  _: 2
79
- }, 1032, ["class"])) : p("", !0)], 2),
80
- e.action ? (b(), f(C(T), {
79
+ }, 1032, ["class"])) : c("", !0)], 2),
80
+ e.action ? (h(), s(v(T), {
81
81
  key: 1,
82
82
  "alt-text": e.action.label,
83
- class: y(U(e, "action")),
83
+ class: m(U(e, "action")),
84
84
  onClick: (t) => W(e)
85
85
  }, {
86
- default: w(() => [g(S(e.action.label), 1)]),
86
+ default: y(() => [d(_(e.action.label), 1)]),
87
87
  _: 2
88
88
  }, 1032, [
89
89
  "alt-text",
90
90
  "class",
91
91
  "onClick"
92
- ])) : p("", !0),
93
- _(C(E), {
92
+ ])) : c("", !0),
93
+ f(v(E), {
94
94
  "aria-label": N.closeLabel,
95
- class: y(U(e, "close"))
95
+ class: m(U(e, "close"))
96
96
  }, {
97
- default: w(() => [_(o, { icon: C(n) }, null, 8, ["icon"])]),
97
+ default: y(() => [f(t, { icon: v(S) }, null, 8, ["icon"])]),
98
98
  _: 1
99
99
  }, 8, ["aria-label", "class"])
100
100
  ]),
@@ -103,8 +103,8 @@ var N = /*@__PURE__*/ v({
103
103
  "duration",
104
104
  "class",
105
105
  "onUpdate:open"
106
- ]))), 128)), _(C(O), null, {
107
- default: w(() => [_(C(M), { class: y(H.value) }, null, 8, ["class"])]),
106
+ ]))), 128)), f(v(O), null, {
107
+ default: y(() => [f(v(M), { class: m(H.value) }, null, 8, ["class"])]),
108
108
  _: 1
109
109
  })]),
110
110
  _: 1
@@ -14,6 +14,7 @@ export { default as ConfirmDialog } from './ConfirmDialog.vue';
14
14
  export { default as DatePicker } from './DatePicker.vue';
15
15
  export { default as DateRangePicker } from './DateRangePicker.vue';
16
16
  export { default as Dialog } from './Dialog.vue';
17
+ export { default as Drawer } from './Drawer.vue';
17
18
  export { default as DropdownMenu } from './DropdownMenu.vue';
18
19
  export { default as EmptyState } from './EmptyState.vue';
19
20
  export { default as FileUpload } from './FileUpload.vue';
@@ -15,33 +15,34 @@ import p from "./Dialog.js";
15
15
  import m from "./ConfirmDialog.js";
16
16
  import h from "./DatePicker.js";
17
17
  import g from "./DateRangePicker.js";
18
- import _ from "./DropdownMenu.js";
19
- import v from "./EmptyState.js";
20
- import y from "./FileUpload.js";
21
- import b from "./Form.js";
22
- import x from "./Label.js";
23
- import S from "./FormField.js";
24
- import C from "./Input.js";
25
- import w from "./LineChart.js";
26
- import T from "./NumberInput.js";
27
- import E from "./Pagination.js";
28
- import D from "./PasswordInput.js";
29
- import O from "./Progress.js";
30
- import k from "./RadioGroup.js";
31
- import A from "./Select.js";
32
- import j from "./Separator.js";
33
- import M from "./Skeleton.js";
34
- import N from "./Sparkline.js";
35
- import P from "./Stat.js";
36
- import F from "./Stepper.js";
37
- import I from "./Switch.js";
38
- import L from "./Table.js";
39
- import R from "./Tabs.js";
40
- import z from "./Textarea.js";
41
- import B from "./Toaster.js";
42
- import V from "./Tooltip.js";
18
+ import _ from "./Drawer.js";
19
+ import v from "./DropdownMenu.js";
20
+ import y from "./EmptyState.js";
21
+ import b from "./FileUpload.js";
22
+ import x from "./Form.js";
23
+ import S from "./Label.js";
24
+ import C from "./FormField.js";
25
+ import w from "./Input.js";
26
+ import T from "./LineChart.js";
27
+ import E from "./NumberInput.js";
28
+ import D from "./Pagination.js";
29
+ import O from "./PasswordInput.js";
30
+ import k from "./Progress.js";
31
+ import A from "./RadioGroup.js";
32
+ import j from "./Select.js";
33
+ import M from "./Separator.js";
34
+ import N from "./Skeleton.js";
35
+ import P from "./Sparkline.js";
36
+ import F from "./Stat.js";
37
+ import I from "./Stepper.js";
38
+ import L from "./Switch.js";
39
+ import R from "./Table.js";
40
+ import z from "./Tabs.js";
41
+ import B from "./Textarea.js";
42
+ import V from "./Toaster.js";
43
+ import H from "./Tooltip.js";
43
44
  //#region src/components/index.ts
44
- var H = /* @__PURE__ */ e({
45
+ var U = /* @__PURE__ */ e({
45
46
  Alert: () => t,
46
47
  App: () => n,
47
48
  Badge: () => r,
@@ -58,31 +59,32 @@ var H = /* @__PURE__ */ e({
58
59
  DatePicker: () => h,
59
60
  DateRangePicker: () => g,
60
61
  Dialog: () => p,
61
- DropdownMenu: () => _,
62
- EmptyState: () => v,
63
- FileUpload: () => y,
64
- Form: () => b,
65
- FormField: () => S,
66
- Input: () => C,
67
- Label: () => x,
68
- LineChart: () => w,
69
- NumberInput: () => T,
70
- Pagination: () => E,
71
- PasswordInput: () => D,
72
- Progress: () => O,
73
- RadioGroup: () => k,
74
- Select: () => A,
75
- Separator: () => j,
76
- Skeleton: () => M,
77
- Sparkline: () => N,
78
- Stat: () => P,
79
- Stepper: () => F,
80
- Switch: () => I,
81
- Table: () => L,
82
- Tabs: () => R,
83
- Textarea: () => z,
84
- Toaster: () => B,
85
- Tooltip: () => V
62
+ Drawer: () => _,
63
+ DropdownMenu: () => v,
64
+ EmptyState: () => y,
65
+ FileUpload: () => b,
66
+ Form: () => x,
67
+ FormField: () => C,
68
+ Input: () => w,
69
+ Label: () => S,
70
+ LineChart: () => T,
71
+ NumberInput: () => E,
72
+ Pagination: () => D,
73
+ PasswordInput: () => O,
74
+ Progress: () => k,
75
+ RadioGroup: () => A,
76
+ Select: () => j,
77
+ Separator: () => M,
78
+ Skeleton: () => N,
79
+ Sparkline: () => P,
80
+ Stat: () => F,
81
+ Stepper: () => I,
82
+ Switch: () => L,
83
+ Table: () => R,
84
+ Tabs: () => z,
85
+ Textarea: () => B,
86
+ Toaster: () => V,
87
+ Tooltip: () => H
86
88
  });
87
89
  //#endregion
88
- export { H as components_exports };
90
+ export { U as components_exports };
@@ -1,25 +1,22 @@
1
- import { $ad063034c8620db8$export$aa8b41735afcabd2 as e, $ad063034c8620db8$export$d0bdf45af03a6ea3 as t } from "../node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/queries.js";
2
- import { $58246871e4652552$export$6b862160d295c8e as n } from "../node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/string.js";
3
- import "../node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/CalendarDate.js";
4
- import { $12a3c853105e5a70$export$ad991b66133851cf as r } from "../node_modules/.pnpm/@internationalized_date@3.12.3/node_modules/@internationalized/date/dist/private/DateFormatter.js";
1
+ import { CalendarDate as e, DateFormatter as t, getLocalTimeZone as n, parseDate as r, today as i } from "@internationalized/date";
5
2
  //#region src/composables/date.ts
6
- var i = /^\d{4}-\d{2}-\d{2}$/;
7
- function a(e) {
8
- if (!(!e || !i.test(e))) try {
9
- return n(e);
3
+ var a = /^\d{4}-\d{2}-\d{2}$/;
4
+ function o(e) {
5
+ if (!(!e || !a.test(e))) try {
6
+ return r(e);
10
7
  } catch {
11
8
  return;
12
9
  }
13
10
  }
14
- function o(e) {
11
+ function s(e) {
15
12
  return e ? `${e.year.toString().padStart(4, "0")}-${e.month.toString().padStart(2, "0")}-${e.day.toString().padStart(2, "0")}` : null;
16
13
  }
17
- function s() {
18
- return o(t(e()));
14
+ function c() {
15
+ return s(i(n()));
19
16
  }
20
- function c(t, n, i = { dateStyle: "medium" }) {
21
- let o = a(t);
22
- return o ? new r(n ?? "en-US", i).format(o.toDate(e())) : "";
17
+ function l(e, r, i = { dateStyle: "medium" }) {
18
+ let a = o(e);
19
+ return a ? new t(r ?? "en-US", i).format(a.toDate(n())) : "";
23
20
  }
24
21
  //#endregion
25
- export { c as formatIsoDate, s as isoToday, a as toCalendarDate, o as toIsoDate };
22
+ export { e as CalendarDate, l as formatIsoDate, c as isoToday, o as toCalendarDate, s as toIsoDate };
package/dist/index.d.ts CHANGED
@@ -17,6 +17,7 @@ export type { ConfirmDialogProps } from './components/ConfirmDialog.vue';
17
17
  export type { DatePickerProps } from './components/DatePicker.vue';
18
18
  export type { DateRange, DateRangePickerProps } from './components/DateRangePicker.vue';
19
19
  export type { DialogProps } from './components/Dialog.vue';
20
+ export type { DrawerProps, DrawerSide, DrawerSnapPoint } from './components/Drawer.vue';
20
21
  export type { DropdownMenuProps } from './components/DropdownMenu.vue';
21
22
  export type { EmptyStateProps } from './components/EmptyState.vue';
22
23
  export type { FileRejection, FileUploadProps } from './components/FileUpload.vue';