vlite3 1.1.2 → 1.1.4

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/components/AttachmentsList/AttachmentsList.vue.d.ts +1 -1
  2. package/components/AttachmentsList/AttachmentsList.vue.js +237 -163
  3. package/components/Avatar.vue.js +1 -1
  4. package/components/AvatarUploader/AvatarUploader.vue.js +40 -37
  5. package/components/Button.vue.js +30 -28
  6. package/components/Carousel/Carousel.vue.d.ts +2 -2
  7. package/components/CategoryManager/CategoryManager.vue.d.ts +10 -2
  8. package/components/CategoryManager/CategoryManager.vue.js +137 -118
  9. package/components/CategoryManager/CategoryNode.vue.d.ts +2 -0
  10. package/components/CategoryManager/CategoryNode.vue.js +93 -88
  11. package/components/Chat/ChatBubble.vue.js +22 -22
  12. package/components/CheckBox.vue.js +29 -28
  13. package/components/CommandPalette/CommandPaletteContent.vue2.js +1 -1
  14. package/components/CommandPalette/{CommandPaletteItem.vue.js → CommandPaletteItem.vue2.js} +1 -1
  15. package/components/ConfirmationModal.vue.js +30 -28
  16. package/components/CopyButton.vue.d.ts +50 -0
  17. package/components/CopyButton.vue.js +69 -0
  18. package/components/CopyButton.vue2.js +4 -0
  19. package/components/DataTable/DataTable.vue.js +44 -44
  20. package/components/DatePicker.vue.js +41 -35
  21. package/components/DateRangePicker.vue.js +18 -17
  22. package/components/Dropdown/Dropdown.vue.d.ts +3 -0
  23. package/components/Dropdown/Dropdown.vue.js +117 -115
  24. package/components/Dropdown/DropdownBooleanItem.vue.js +16 -15
  25. package/components/Dropdown/DropdownItem.vue.js +21 -20
  26. package/components/Dropdown/DropdownMenu.vue.js +1 -1
  27. package/components/Dropdown/DropdownMenu.vue2.js +13 -12
  28. package/components/Dropdown/DropdownTrigger.vue.d.ts +2 -0
  29. package/components/Dropdown/DropdownTrigger.vue.js +10 -6
  30. package/components/Dropdown/composables/useDropdownHydration.d.ts +2 -0
  31. package/components/Dropdown/composables/useDropdownSelection.d.ts +1 -0
  32. package/components/Dropdown/composables/useDropdownSelection.js +46 -31
  33. package/components/FilePicker/FilePicker.vue.js +93 -90
  34. package/components/Form/CustomFields.vue.js +2 -2
  35. package/components/Form/Form.vue.js +2 -2
  36. package/components/Form/Form.vue2.js +68 -64
  37. package/components/Form/FormField.vue.js +204 -148
  38. package/components/Form/FormFields.vue.js +2 -2
  39. package/components/Form/FormFields.vue2.js +28 -27
  40. package/components/Form/types.d.ts +2 -2
  41. package/components/Form/utils/form.utils.d.ts +3 -3
  42. package/components/Form/utils/form.utils.js +37 -37
  43. package/components/Input.vue.js +64 -62
  44. package/components/Invoice/Invoice.vue.js +9 -7
  45. package/components/Invoice/InvoiceTotals.vue.d.ts +14 -0
  46. package/components/Invoice/InvoiceTotals.vue.js +86 -0
  47. package/components/Invoice/InvoiceTotals.vue2.js +4 -0
  48. package/components/Invoice/InvoiceVariant1.vue.d.ts +3 -1
  49. package/components/Invoice/InvoiceVariant1.vue.js +194 -207
  50. package/components/Invoice/InvoiceVariant2.vue.d.ts +3 -1
  51. package/components/Invoice/InvoiceVariant2.vue.js +109 -118
  52. package/components/Invoice/InvoiceVariant3.vue.d.ts +3 -1
  53. package/components/Invoice/InvoiceVariant3.vue.js +157 -167
  54. package/components/Invoice/InvoiceVariant4.vue.d.ts +3 -1
  55. package/components/Invoice/InvoiceVariant4.vue.js +192 -202
  56. package/components/Invoice/index.d.ts +1 -0
  57. package/components/Invoice/types.d.ts +22 -0
  58. package/components/Masonry/Masonry.vue.d.ts +1 -1
  59. package/components/Modal.vue.js +1 -1
  60. package/components/Modal.vue2.js +60 -54
  61. package/components/MultiSelect/MultiSelect.vue.js +47 -46
  62. package/components/MultiSelect/composables/useMultiSelectHydration.d.ts +2 -0
  63. package/components/NavbarCommandPalette.vue.js +1 -1
  64. package/components/NumberInput.vue.js +2 -2
  65. package/components/NumberInput.vue2.js +121 -116
  66. package/components/PricingPlan/PricingPlan.vue.d.ts +1 -1
  67. package/components/SidePanel.vue.js +2 -2
  68. package/components/SidePanel.vue2.js +58 -52
  69. package/components/Stats/StatItem.vue.js +96 -91
  70. package/components/Stats/types.d.ts +1 -0
  71. package/components/Switch.vue.d.ts +6 -1
  72. package/components/Switch.vue.js +61 -24
  73. package/components/TagInput/TagInput.vue.d.ts +187 -0
  74. package/components/TagInput/TagInput.vue.js +113 -0
  75. package/components/TagInput/TagInput.vue2.js +4 -0
  76. package/components/TagInput/index.d.ts +1 -0
  77. package/components/Textarea.vue.js +19 -18
  78. package/components/ThumbnailSelector/ThumbnailSelector.vue.js +2 -2
  79. package/components/ThumbnailSelector/ThumbnailSelector.vue2.js +19 -16
  80. package/core/config.d.ts +36 -0
  81. package/index.d.ts +2 -0
  82. package/index.js +130 -124
  83. package/package.json +1 -1
  84. package/style.css +616 -1
  85. package/types/button.d.ts +1 -1
  86. package/types/styles.d.ts +1 -0
  87. package/utils/functions.js +9 -9
@@ -1,9 +1,9 @@
1
- import { defineComponent as E, ref as k, watch as q, computed as a, onBeforeUnmount as L, openBlock as v, createElementBlock as y, normalizeClass as u, withModifiers as i, createVNode as h, createCommentVNode as P, createElementVNode as p, withKeys as z } from "vue";
2
- import g from "./Icon.vue.js";
3
- const M = ["disabled"], U = ["value", "min", "max", "step", "placeholder", "disabled", "readonly", "onKeydown"], $ = ["disabled"], A = {
1
+ import { defineComponent as E, ref as k, watch as q, computed as u, onBeforeUnmount as L, openBlock as v, createElementBlock as y, normalizeClass as i, withModifiers as r, createVNode as h, createCommentVNode as P, createElementVNode as g, withKeys as z } from "vue";
2
+ import w from "./Icon.vue.js";
3
+ const M = ["disabled", "data-testid"], U = ["value", "min", "max", "step", "placeholder", "disabled", "readonly", "onKeydown", "data-testid"], A = ["disabled", "data-testid"], D = {
4
4
  key: 2,
5
5
  class: "flex flex-col justify-center h-full py-[3px] pr-[3px]"
6
- }, D = { class: "flex flex-col h-full w-6 scale-80" }, G = ["disabled"], H = ["disabled"], Q = /* @__PURE__ */ E({
6
+ }, G = { class: "flex flex-col h-full w-6 scale-80" }, H = ["disabled", "data-testid"], J = ["disabled", "data-testid"], W = /* @__PURE__ */ E({
7
7
  __name: "NumberInput",
8
8
  props: {
9
9
  modelValue: { default: void 0 },
@@ -21,24 +21,24 @@ const M = ["disabled"], U = ["value", "min", "max", "step", "placeholder", "disa
21
21
  rounded: { default: "md" }
22
22
  },
23
23
  emits: ["update:modelValue", "change", "focus", "blur"],
24
- setup(t, { emit: V }) {
25
- const n = t, m = V, d = k(n.modelValue ?? "");
24
+ setup(e, { emit: V }) {
25
+ const n = e, m = V, a = k(n.modelValue ?? "");
26
26
  q(
27
27
  () => n.modelValue,
28
- (l) => {
29
- l !== void 0 && (d.value = l);
28
+ (d) => {
29
+ d !== void 0 && (a.value = d);
30
30
  }
31
31
  );
32
- const B = k(null), c = a(() => {
33
- const l = {
32
+ const B = k(null), c = u(() => {
33
+ const d = {
34
34
  xs: { h: "h-7", text: "text-xs", px: "px-2", icon: "w-3 h-3" },
35
35
  sm: { h: "h-8", text: "text-xs", px: "px-2", icon: "w-3.5 h-3.5" },
36
36
  md: { h: "h-9", text: "text-sm", px: "px-3", icon: "w-4 h-4" },
37
37
  lg: { h: "h-10", text: "text-sm", px: "px-4", icon: "w-5 h-5" },
38
38
  xl: { h: "h-12", text: "text-lg", px: "px-5", icon: "w-6 h-6" }
39
39
  };
40
- return l[n.size] || l.md;
41
- }), j = a(() => ({
40
+ return d[n.size] || d.md;
41
+ }), j = u(() => ({
42
42
  none: "rounded-none",
43
43
  sm: "rounded-sm",
44
44
  md: "rounded-md",
@@ -46,7 +46,7 @@ const M = ["disabled"], U = ["value", "min", "max", "step", "placeholder", "disa
46
46
  xl: "rounded-xl",
47
47
  "2xl": "rounded-2xl",
48
48
  full: "rounded-full"
49
- })[n.rounded] || "rounded-md"), I = a(() => ({
49
+ })[n.rounded] || "rounded-md"), I = u(() => ({
50
50
  none: "rounded-l-none",
51
51
  sm: "rounded-l-sm",
52
52
  md: "rounded-l-md",
@@ -54,7 +54,7 @@ const M = ["disabled"], U = ["value", "min", "max", "step", "placeholder", "disa
54
54
  xl: "rounded-l-xl",
55
55
  "2xl": "rounded-l-2xl",
56
56
  full: "rounded-l-full"
57
- })[n.rounded] || "rounded-l-md"), S = a(() => ({
57
+ })[n.rounded] || "rounded-l-md"), S = u(() => ({
58
58
  none: "rounded-r-none",
59
59
  sm: "rounded-r-sm",
60
60
  md: "rounded-r-md",
@@ -62,7 +62,7 @@ const M = ["disabled"], U = ["value", "min", "max", "step", "placeholder", "disa
62
62
  xl: "rounded-r-xl",
63
63
  "2xl": "rounded-r-2xl",
64
64
  full: "rounded-r-full"
65
- })[n.rounded] || "rounded-r-md"), F = a(() => [
65
+ })[n.rounded] || "rounded-r-md"), F = u(() => [
66
66
  "flex items-center w-full relative transition-all duration-200",
67
67
  n.disabled ? "opacity-50 cursor-not-allowed" : "",
68
68
  n.mode === "solid" ? "bg-muted" : "",
@@ -70,169 +70,174 @@ const M = ["disabled"], U = ["value", "min", "max", "step", "placeholder", "disa
70
70
  n.mode === "ghost" ? "bg-transparent" : "",
71
71
  c.value.h,
72
72
  j.value
73
- ]), K = a(() => [
73
+ ]), K = u(() => [
74
74
  "flex-1 w-full bg-transparent focus:outline-none appearance-none",
75
75
  n.variant === "split" ? "text-center" : "text-left pl-3 pr-2",
76
76
  "placeholder:text-muted-foreground/50",
77
77
  c.value.text,
78
78
  n.disabled ? "cursor-not-allowed" : ""
79
- ]), C = a(() => {
80
- const l = "flex items-center justify-center transition-colors active:scale-95 shrink-0 select-none", e = n.disabled ? "" : "hover:text-primary hover:bg-muted/50";
79
+ ]), C = u(() => {
80
+ const d = "flex items-center justify-center transition-colors active:scale-95 shrink-0 select-none", t = n.disabled ? "" : "hover:text-primary hover:bg-muted/50";
81
81
  return n.size === "xs" || n.size, n.variant === "split" ? n.mode === "solid" ? [
82
- l,
82
+ d,
83
83
  n.disabled ? "" : "hover:text-primary hover:bg-background/80",
84
84
  "bg-background shadow-sm rounded-full mx-1 my-0.5 aspect-square self-center h-[calc(100%-12px)] w-auto max-w-[calc(100%-12px)] flex items-center justify-center"
85
- ] : [l, e, "h-full", "px-2"] : [l, e, "h-1/2 w-8 border-l border-input/50"];
86
- }), s = (l) => {
85
+ ] : [d, t, "h-full", "px-2"] : [d, t, "h-1/2 w-8 border-l border-input/50"];
86
+ }), s = (d) => {
87
87
  if (n.disabled || n.readonly) return;
88
- let e = l;
89
- n.min !== void 0 && e < n.min && (e = n.min), n.max !== void 0 && e > n.max && (e = n.max), d.value = e, m("update:modelValue", e), m("change", e);
88
+ let t = d;
89
+ n.min !== void 0 && t < n.min && (t = n.min), n.max !== void 0 && t > n.max && (t = n.max), a.value = t, m("update:modelValue", t), m("change", t);
90
90
  };
91
- let x = null, f = null;
92
- const o = () => {
93
- x && clearTimeout(x), f && clearInterval(f), x = null, f = null;
94
- }, w = () => {
95
- if (n.disabled || n.readonly || n.max !== void 0 && Number(d.value) >= n.max) {
96
- o();
91
+ let b = null, x = null;
92
+ const l = () => {
93
+ b && clearTimeout(b), x && clearInterval(x), b = null, x = null;
94
+ }, $ = () => {
95
+ if (n.disabled || n.readonly || n.max !== void 0 && Number(a.value) >= n.max) {
96
+ l();
97
97
  return;
98
98
  }
99
- const l = Number(d.value) || 0;
100
- s(l + n.step);
99
+ const d = Number(a.value) || 0;
100
+ s(d + n.step);
101
101
  }, N = () => {
102
- if (n.disabled || n.readonly || n.min !== void 0 && Number(d.value) <= n.min) {
103
- o();
102
+ if (n.disabled || n.readonly || n.min !== void 0 && Number(a.value) <= n.min) {
103
+ l();
104
104
  return;
105
105
  }
106
- const l = Number(d.value) || 0;
107
- s(l - n.step);
108
- }, b = (l, e) => {
109
- e.button !== 0 && e.pointerType === "mouse" || (o(), l === "inc" ? w() : N(), x = setTimeout(() => {
110
- f = setInterval(() => {
111
- l === "inc" ? w() : N();
106
+ const d = Number(a.value) || 0;
107
+ s(d - n.step);
108
+ }, f = (d, t) => {
109
+ t.button !== 0 && t.pointerType === "mouse" || (l(), d === "inc" ? $() : N(), b = setTimeout(() => {
110
+ x = setInterval(() => {
111
+ d === "inc" ? $() : N();
112
112
  }, 50);
113
113
  }, 400));
114
- }, R = (l) => {
115
- const e = l.target, r = parseFloat(e.value);
116
- if (isNaN(r)) {
117
- d.value = e.value;
114
+ }, R = (d) => {
115
+ const t = d.target, o = parseFloat(t.value);
116
+ if (isNaN(o)) {
117
+ a.value = t.value;
118
118
  return;
119
119
  }
120
- s(r);
121
- }, T = (l) => {
122
- m("blur", l);
123
- const e = parseFloat(String(d.value));
124
- isNaN(e) ? s(n.min || 0) : s(e);
120
+ s(o);
121
+ }, T = (d) => {
122
+ m("blur", d);
123
+ const t = parseFloat(String(a.value));
124
+ isNaN(t) ? s(n.min || 0) : s(t);
125
125
  };
126
126
  return L(() => {
127
- o();
128
- }), (l, e) => (v(), y("div", {
129
- class: u([F.value, "overflow-hidden"])
127
+ l();
128
+ }), (d, t) => (v(), y("div", {
129
+ class: i([F.value, "overflow-hidden"])
130
130
  }, [
131
- t.variant === "split" ? (v(), y("button", {
131
+ e.variant === "split" && !e.disabled && !e.readonly ? (v(), y("button", {
132
132
  key: 0,
133
133
  tabindex: "-1",
134
134
  type: "button",
135
- class: u([
135
+ class: i([
136
136
  C.value,
137
- t.mode === "outline" ? "border-r border-input" : "",
138
- t.variant === "split" && t.mode !== "solid" ? I.value : ""
137
+ e.mode === "outline" ? "border-r border-input" : "",
138
+ e.variant === "split" && e.mode !== "solid" ? I.value : ""
139
139
  ]),
140
- disabled: t.disabled || t.min !== void 0 && Number(d.value) <= t.min,
141
- onPointerdown: e[0] || (e[0] = (r) => b("dec", r)),
142
- onPointerup: o,
143
- onPointerleave: o,
144
- onPointercancel: o,
145
- onContextmenu: e[1] || (e[1] = i(() => {
146
- }, ["prevent"]))
140
+ disabled: e.disabled || e.min !== void 0 && Number(a.value) <= e.min,
141
+ onPointerdown: t[0] || (t[0] = (o) => f("dec", o)),
142
+ onPointerup: l,
143
+ onPointerleave: l,
144
+ onPointercancel: l,
145
+ onContextmenu: t[1] || (t[1] = r(() => {
146
+ }, ["prevent"])),
147
+ "data-testid": d.$attrs["data-testid"] ? `${d.$attrs["data-testid"]}-dec` : e.name ? `number-${e.name}-dec` : e.id ? `number-${e.id}-dec` : "number-input-dec"
147
148
  }, [
148
- h(g, {
149
+ h(w, {
149
150
  icon: "lucide:minus",
150
- class: u(c.value.icon)
151
+ class: i(c.value.icon)
151
152
  }, null, 8, ["class"])
152
153
  ], 42, M)) : P("", !0),
153
- p("input", {
154
+ g("input", {
154
155
  ref_key: "inputRef",
155
156
  ref: B,
156
157
  type: "number",
157
- value: d.value,
158
- min: t.min,
159
- max: t.max,
160
- step: t.step,
161
- placeholder: t.placeholder,
162
- disabled: t.disabled,
163
- readonly: t.readonly,
164
- class: u(K.value),
158
+ value: a.value,
159
+ min: e.min,
160
+ max: e.max,
161
+ step: e.step,
162
+ placeholder: e.placeholder,
163
+ disabled: e.disabled,
164
+ readonly: e.readonly,
165
+ class: i(K.value),
165
166
  onInput: R,
166
- onFocus: e[2] || (e[2] = (r) => m("focus", r)),
167
+ onFocus: t[2] || (t[2] = (o) => m("focus", o)),
167
168
  onBlur: T,
168
169
  onKeydown: [
169
- z(i(w, ["prevent"]), ["up"]),
170
- z(i(N, ["prevent"]), ["down"])
171
- ]
170
+ z(r($, ["prevent"]), ["up"]),
171
+ z(r(N, ["prevent"]), ["down"])
172
+ ],
173
+ "data-testid": d.$attrs["data-testid"] || (e.name ? `number-${e.name}` : e.id ? `number-${e.id}` : "number-input")
172
174
  }, null, 42, U),
173
- t.variant === "split" ? (v(), y("button", {
175
+ e.variant === "split" && !e.disabled && !e.readonly ? (v(), y("button", {
174
176
  key: 1,
175
177
  tabindex: "-1",
176
178
  type: "button",
177
- class: u([
179
+ class: i([
178
180
  C.value,
179
- t.mode === "outline" ? "border-l border-input" : "",
180
- t.variant === "split" && t.mode !== "solid" ? S.value : ""
181
+ e.mode === "outline" ? "border-l border-input" : "",
182
+ e.variant === "split" && e.mode !== "solid" ? S.value : ""
181
183
  ]),
182
- disabled: t.disabled || t.max !== void 0 && Number(d.value) >= t.max,
183
- onPointerdown: e[3] || (e[3] = (r) => b("inc", r)),
184
- onPointerup: o,
185
- onPointerleave: o,
186
- onPointercancel: o,
187
- onContextmenu: e[4] || (e[4] = i(() => {
188
- }, ["prevent"]))
184
+ disabled: e.disabled || e.max !== void 0 && Number(a.value) >= e.max,
185
+ onPointerdown: t[3] || (t[3] = (o) => f("inc", o)),
186
+ onPointerup: l,
187
+ onPointerleave: l,
188
+ onPointercancel: l,
189
+ onContextmenu: t[4] || (t[4] = r(() => {
190
+ }, ["prevent"])),
191
+ "data-testid": d.$attrs["data-testid"] ? `${d.$attrs["data-testid"]}-inc` : e.name ? `number-${e.name}-inc` : e.id ? `number-${e.id}-inc` : "number-input-inc"
189
192
  }, [
190
- h(g, {
193
+ h(w, {
191
194
  icon: "lucide:plus",
192
- class: u(c.value.icon)
195
+ class: i(c.value.icon)
193
196
  }, null, 8, ["class"])
194
- ], 42, $)) : P("", !0),
195
- t.variant === "stacked" ? (v(), y("div", A, [
196
- p("div", D, [
197
- p("button", {
197
+ ], 42, A)) : P("", !0),
198
+ e.variant === "stacked" && !e.disabled && !e.readonly ? (v(), y("div", D, [
199
+ g("div", G, [
200
+ g("button", {
198
201
  tabindex: "-1",
199
202
  type: "button",
200
203
  class: "flex-1 flex items-center justify-center bg-gray-100 hover:bg-gray-200 text-muted-foreground hover:text-foreground rounded-t-[3px] border-b border-gray-300 transition-colors disabled:cursor-not-allowed",
201
- disabled: t.disabled || t.max !== void 0 && Number(d.value) >= t.max,
202
- onPointerdown: e[5] || (e[5] = (r) => b("inc", r)),
203
- onPointerup: o,
204
- onPointerleave: o,
205
- onPointercancel: o,
206
- onContextmenu: e[6] || (e[6] = i(() => {
207
- }, ["prevent"]))
204
+ disabled: e.disabled || e.max !== void 0 && Number(a.value) >= e.max,
205
+ onPointerdown: t[5] || (t[5] = (o) => f("inc", o)),
206
+ onPointerup: l,
207
+ onPointerleave: l,
208
+ onPointercancel: l,
209
+ onContextmenu: t[6] || (t[6] = r(() => {
210
+ }, ["prevent"])),
211
+ "data-testid": d.$attrs["data-testid"] ? `${d.$attrs["data-testid"]}-inc` : e.name ? `number-${e.name}-inc` : e.id ? `number-${e.id}-inc` : "number-input-inc"
208
212
  }, [
209
- h(g, {
210
- class: u(["text-gray-700/85!", t.size === "xs" || t.size === "sm" ? "w-3 h-3" : "w-3.5 h-3.5"]),
213
+ h(w, {
214
+ class: i(["text-gray-700/85!", e.size === "xs" || e.size === "sm" ? "w-3 h-3" : "w-3.5 h-3.5"]),
211
215
  icon: "mynaui:chevron-up-solid"
212
216
  }, null, 8, ["class"])
213
- ], 40, G),
214
- p("button", {
217
+ ], 40, H),
218
+ g("button", {
215
219
  tabindex: "-1",
216
220
  type: "button",
217
221
  class: "flex-1 flex items-center justify-center bg-gray-100 hover:bg-gray-200 text-muted-foreground hover:text-foreground rounded-b-[3px] transition-colors disabled:cursor-not-allowed",
218
- disabled: t.disabled || t.min !== void 0 && Number(d.value) <= t.min,
219
- onPointerdown: e[7] || (e[7] = (r) => b("dec", r)),
220
- onPointerup: o,
221
- onPointerleave: o,
222
- onPointercancel: o,
223
- onContextmenu: e[8] || (e[8] = i(() => {
224
- }, ["prevent"]))
222
+ disabled: e.disabled || e.min !== void 0 && Number(a.value) <= e.min,
223
+ onPointerdown: t[7] || (t[7] = (o) => f("dec", o)),
224
+ onPointerup: l,
225
+ onPointerleave: l,
226
+ onPointercancel: l,
227
+ onContextmenu: t[8] || (t[8] = r(() => {
228
+ }, ["prevent"])),
229
+ "data-testid": d.$attrs["data-testid"] ? `${d.$attrs["data-testid"]}-dec` : e.name ? `number-${e.name}-dec` : e.id ? `number-${e.id}-dec` : "number-input-dec"
225
230
  }, [
226
- h(g, {
227
- class: u(["text-gray-700/85!", t.size === "xs" || t.size === "sm" ? "w-3 h-3" : "w-3.5 h-3.5"]),
231
+ h(w, {
232
+ class: i(["text-gray-700/85!", e.size === "xs" || e.size === "sm" ? "w-3 h-3" : "w-3.5 h-3.5"]),
228
233
  icon: "mynaui:chevron-down-solid"
229
234
  }, null, 8, ["class"])
230
- ], 40, H)
235
+ ], 40, J)
231
236
  ])
232
237
  ])) : P("", !0)
233
238
  ], 2));
234
239
  }
235
240
  });
236
241
  export {
237
- Q as default
242
+ W as default
238
243
  };
@@ -16,7 +16,7 @@ declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, imp
16
16
  variant: PricingPlanVariant;
17
17
  columns: number | string;
18
18
  modelValue: string | number | null;
19
- items: PricingPlanItemSchema[];
20
19
  gap: number;
20
+ items: PricingPlanItemSchema[];
21
21
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
22
22
  export default _default;
@@ -1,7 +1,7 @@
1
1
  import o from "./SidePanel.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../_virtual/_plugin-vue_export-helper.js";
4
- const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-00b21f72"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-3446a690"]]);
5
5
  export {
6
- f as default
6
+ m as default
7
7
  };
@@ -1,11 +1,11 @@
1
- import { defineComponent as D, ref as V, inject as j, computed as u, markRaw as K, watch as h, onMounted as M, onUnmounted as F, openBlock as l, createElementBlock as r, Fragment as L, createElementVNode as y, mergeProps as w, withModifiers as R, renderSlot as f, createCommentVNode as a, createBlock as v, Teleport as U, createVNode as k, Transition as x, withCtx as $, normalizeClass as c, toDisplayString as B, resolveDynamicComponent as q } from "vue";
1
+ import { defineComponent as D, ref as L, inject as V, computed as f, markRaw as j, watch as h, onMounted as K, onUnmounted as M, openBlock as l, createElementBlock as d, Fragment as F, createElementVNode as y, mergeProps as w, withModifiers as R, renderSlot as c, createCommentVNode as a, createBlock as g, Teleport as U, createVNode as $, Transition as k, withCtx as x, normalizeClass as m, toDisplayString as B, resolveDynamicComponent as q } from "vue";
2
2
  import G from "./Button.vue.js";
3
3
  import { useKeyStroke as H } from "../composables/useKeyStroke.js";
4
4
  import { $t as T } from "../utils/i18n.js";
5
- const J = { class: "text-lg font-bold text-foreground" }, Q = {
5
+ const J = ["data-testid"], Q = ["data-testid"], W = { class: "text-lg font-bold text-foreground" }, X = {
6
6
  key: 0,
7
7
  class: "mt-1 text-sm text-muted-foreground"
8
- }, _ = /* @__PURE__ */ D({
8
+ }, te = /* @__PURE__ */ D({
9
9
  inheritAttrs: !1,
10
10
  __name: "SidePanel",
11
11
  props: {
@@ -30,51 +30,53 @@ const J = { class: "text-lg font-bold text-foreground" }, Q = {
30
30
  },
31
31
  emits: ["close", "update:show", "onOpen", "onAfterOpen", "onAfterClose"],
32
32
  setup(o, { emit: z }) {
33
- const t = o, p = z, s = V(t.show);
34
- let d = null;
35
- const n = j("dropdown-context", null), b = u(() => t.body ? K(t.body) : void 0);
33
+ const t = o, v = z, s = L(t.show);
34
+ let u = null;
35
+ const i = V("dropdown-context", null), C = f(() => t.body ? j(t.body) : void 0);
36
36
  h(
37
37
  () => t.show,
38
38
  (e) => {
39
- s.value = e, e && (p("onOpen"), n?.close());
39
+ s.value = e, e && (v("onOpen"), i?.close());
40
40
  }
41
41
  );
42
42
  const A = () => {
43
- s.value = !0, n?.close();
44
- }, i = () => {
45
- s.value = !1, p("update:show", !1), p("close");
43
+ s.value = !0, i?.close();
44
+ }, n = () => {
45
+ s.value = !1, v("update:show", !1), v("close");
46
46
  }, O = () => {
47
- t.closeOutside && i();
48
- }, { onKeyStroke: I } = H();
49
- I("Escape", i), h(s, (e) => {
50
- d && clearTimeout(d), e ? (n?.onChildToggle?.(!0), document.body.style.overflow = "hidden") : (document.body.style.overflow = "", d = setTimeout(() => {
51
- n?.onChildToggle?.(!1);
47
+ t.closeOutside && n();
48
+ }, { onKeyStroke: S } = H();
49
+ S("Escape", n), h(s, (e) => {
50
+ u && clearTimeout(u), e ? (i?.onChildToggle?.(!0), document.body.style.overflow = "hidden") : (document.body.style.overflow = "", u = setTimeout(() => {
51
+ i?.onChildToggle?.(!1);
52
52
  }, 300));
53
+ }), K(() => {
54
+ s.value && i?.onChildToggle?.(!0);
53
55
  }), M(() => {
54
- s.value && n?.onChildToggle?.(!0);
55
- }), F(() => {
56
- d && clearTimeout(d), s.value && n?.onChildToggle?.(!1), document.body.style.overflow = "";
56
+ u && clearTimeout(u), s.value && i?.onChildToggle?.(!1), document.body.style.overflow = "";
57
57
  });
58
- const S = {
58
+ const I = {
59
59
  sm: "max-w-sm",
60
60
  md: "max-w-md",
61
61
  lg: "max-w-lg",
62
62
  xl: "max-w-xl",
63
63
  full: "max-w-full"
64
- }, E = u(() => t.position === "left" ? "left-0" : "right-0"), N = u(() => t.position === "left" ? "slide-left" : "slide-right"), C = u(() => t.titleI18n ? T(t.titleI18n) : t.title), g = u(
64
+ }, E = f(() => t.position === "left" ? "left-0" : "right-0"), N = f(() => t.position === "left" ? "slide-left" : "slide-right"), r = f(() => t.titleI18n ? T(t.titleI18n) : t.title), b = f(
65
65
  () => t.descriptionI18n ? T(t.descriptionI18n) : t.description
66
66
  );
67
- return (e, m) => (l(), r(L, null, [
67
+ return (e, p) => (l(), d(F, null, [
68
68
  y("span", w({
69
69
  onClick: R(A, ["stop"]),
70
70
  class: `${o.triggerClass}`
71
- }, e.$attrs), [
72
- f(e.$slots, "trigger", {}, () => [
73
- o.body ? f(e.$slots, "default", { key: 0 }, void 0, !0) : a("", !0)
71
+ }, e.$attrs, {
72
+ "data-testid": e.$attrs["data-testid"] ? `${e.$attrs["data-testid"]}-trigger` : r.value ? `sidepanel-trigger-${r.value.toString().toLowerCase().replace(/[^a-z0-9]+/g, "-")}` : "sidepanel-trigger"
73
+ }), [
74
+ c(e.$slots, "trigger", {}, () => [
75
+ o.body ? c(e.$slots, "default", { key: 0 }, void 0, !0) : a("", !0)
74
76
  ], !0)
75
- ], 16),
76
- (l(), v(U, { to: "body" }, [
77
- k(x, {
77
+ ], 16, J),
78
+ (l(), g(U, { to: "body" }, [
79
+ $(k, {
78
80
  "enter-active-class": "transition-opacity duration-300 ease-out",
79
81
  "enter-from-class": "opacity-0",
80
82
  "enter-to-class": "opacity-100",
@@ -82,60 +84,64 @@ const J = { class: "text-lg font-bold text-foreground" }, Q = {
82
84
  "leave-from-class": "opacity-100",
83
85
  "leave-to-class": "opacity-0"
84
86
  }, {
85
- default: $(() => [
86
- s.value ? (l(), r("div", {
87
+ default: x(() => [
88
+ s.value ? (l(), d("div", {
87
89
  key: 0,
88
- class: c(["fixed inset-0 z-50 v-sidepanel-overlay", o.overlayClass]),
90
+ class: m(["fixed inset-0 z-50 v-sidepanel-overlay", o.overlayClass]),
89
91
  onClick: O
90
92
  }, null, 2)) : a("", !0)
91
93
  ]),
92
94
  _: 1
93
95
  }),
94
- k(x, {
96
+ $(k, {
95
97
  name: N.value,
96
- onAfterEnter: m[0] || (m[0] = (P) => e.$emit("onAfterOpen")),
97
- onAfterLeave: m[1] || (m[1] = (P) => e.$emit("onAfterClose"))
98
+ onAfterEnter: p[0] || (p[0] = (P) => e.$emit("onAfterOpen")),
99
+ onAfterLeave: p[1] || (p[1] = (P) => e.$emit("onAfterClose"))
98
100
  }, {
99
- default: $(() => [
100
- s.value ? (l(), r("div", {
101
+ default: x(() => [
102
+ s.value ? (l(), d("div", {
101
103
  key: 0,
102
- class: c(["sidepanel-body fixed inset-y-0 z-50 flex flex-col bg-body shadow-sm border transition-transform duration-300 ease-in-out w-full", [S[o.size], E.value, t.class]])
104
+ role: "dialog",
105
+ "aria-modal": "true",
106
+ class: m(["sidepanel-body fixed inset-y-0 z-50 flex flex-col bg-body shadow-sm border transition-transform duration-300 ease-in-out w-full", [I[o.size], E.value, t.class]]),
107
+ "data-testid": e.$attrs["data-testid"] || (r.value ? `sidepanel-${r.value.toString().toLowerCase().replace(/[^a-z0-9]+/g, "-")}` : "sidepanel")
103
108
  }, [
104
- C.value || e.$slots.header ? (l(), r("div", {
109
+ r.value || e.$slots.header ? (l(), d("div", {
105
110
  key: 0,
106
- class: c([o.headerClass, "flex-none flex items-center justify-between px-5 py-2 border-b border-border"])
111
+ class: m([o.headerClass, "flex-none flex items-center justify-between px-5 py-2 border-b border-border"])
107
112
  }, [
108
- f(e.$slots, "header", {}, () => [
113
+ c(e.$slots, "header", {}, () => [
109
114
  y("div", null, [
110
- y("h3", J, B(C.value), 1),
111
- g.value ? (l(), r("p", Q, B(g.value), 1)) : a("", !0)
115
+ y("h3", W, B(r.value), 1),
116
+ b.value ? (l(), d("p", X, B(b.value), 1)) : a("", !0)
112
117
  ])
113
118
  ], !0),
114
- o.hideCloseButton ? a("", !0) : (l(), v(G, {
119
+ o.hideCloseButton ? a("", !0) : (l(), g(G, {
115
120
  key: 0,
116
121
  rounded: "full",
117
122
  size: "sm",
118
123
  variant: "ghost",
119
124
  icon: "lucide:x",
120
- onClick: i,
121
- class: "-mr-2"
125
+ onClick: n,
126
+ class: "-mr-2",
127
+ "data-testid": "sidepanel-close-btn"
122
128
  }))
123
129
  ], 2)) : a("", !0),
124
130
  y("div", {
125
- class: c(["flex-1 overflow-y-auto px-6 py-4 scrollbar-thin scrollbar-stable", o.bodyClass])
131
+ class: m(["flex-1 overflow-y-auto px-6 py-4 scrollbar-thin scrollbar-stable", o.bodyClass])
126
132
  }, [
127
- b.value ? (l(), v(q(b.value), w({ key: 0 }, { ...o.bodyProps, ...e.$attrs }, { close: i }), null, 16)) : f(e.$slots, "default", {
133
+ C.value ? (l(), g(q(C.value), w({ key: 0 }, { ...o.bodyProps, ...e.$attrs }, { close: n }), null, 16)) : c(e.$slots, "default", {
128
134
  key: 1,
129
- close: i
135
+ close: n
130
136
  }, void 0, !0)
131
137
  ], 2),
132
- e.$slots.footer ? (l(), r("div", {
138
+ e.$slots.footer ? (l(), d("div", {
133
139
  key: 1,
134
- class: c(["flex-none px-6 py-3 border-t border-border", o.footerClass])
140
+ class: m(["flex-none px-6 py-3 border-t border-border", o.footerClass])
135
141
  }, [
136
- f(e.$slots, "footer", { close: i }, void 0, !0)
142
+ c(e.$slots, "footer", { close: n }, void 0, !0)
137
143
  ], 2)) : a("", !0)
138
- ], 2)) : a("", !0)
144
+ ], 10, Q)) : a("", !0)
139
145
  ]),
140
146
  _: 3
141
147
  }, 8, ["name"])
@@ -144,5 +150,5 @@ const J = { class: "text-lg font-bold text-foreground" }, Q = {
144
150
  }
145
151
  });
146
152
  export {
147
- _ as default
153
+ te as default
148
154
  };