vlite3 0.0.7 → 0.0.9

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 (100) hide show
  1. package/README.md +156 -17
  2. package/components/Accordion/AccordionContent.vue.js +2 -2
  3. package/components/Accordion/AccordionItem.vue.js +1 -1
  4. package/components/Accordion/AccordionTrigger.vue.js +1 -4
  5. package/components/Alert.vue.js +1 -4
  6. package/components/AvatarUploader/AvatarUploader.vue.d.ts +2 -2
  7. package/components/AvatarUploader/AvatarUploader.vue.js +14 -20
  8. package/components/Badge.vue.js +9 -13
  9. package/components/Button.vue.js +32 -32
  10. package/components/ButtonGroup.vue.js +1 -1
  11. package/components/ButtonGroup.vue2.js +0 -3
  12. package/components/Carousel/Carousel.vue.d.ts +847 -0
  13. package/components/Carousel/Carousel.vue.js +7 -0
  14. package/components/Carousel/Carousel.vue2.js +68 -0
  15. package/components/Carousel/index.d.ts +2 -0
  16. package/components/Carousel/types.d.ts +24 -0
  17. package/components/CheckBox.vue.d.ts +0 -1
  18. package/components/CheckBox.vue.js +24 -23
  19. package/components/Chip/Chip.vue.js +1 -6
  20. package/components/ChoiceBox/ChoiceBox.vue.d.ts +1 -1
  21. package/components/ChoiceBox/ChoiceBox.vue.js +8 -8
  22. package/components/DataTable/DataTable.vue.d.ts +60 -0
  23. package/components/DataTable/DataTable.vue.js +7 -0
  24. package/components/DataTable/DataTable.vue2.js +310 -0
  25. package/components/DataTable/DataTableHeader.vue.d.ts +14 -0
  26. package/components/DataTable/DataTableHeader.vue.js +49 -0
  27. package/components/DataTable/DataTableHeader.vue2.js +4 -0
  28. package/components/DataTable/DataTableRow.vue.d.ts +51 -0
  29. package/components/DataTable/DataTableRow.vue.js +114 -0
  30. package/components/DataTable/DataTableRow.vue2.js +4 -0
  31. package/components/DataTable/DataTableToolbar.vue.d.ts +31 -0
  32. package/components/DataTable/DataTableToolbar.vue.js +45 -0
  33. package/components/DataTable/DataTableToolbar.vue2.js +4 -0
  34. package/components/DataTable/index.d.ts +4 -0
  35. package/components/DataTable/types.d.ts +75 -0
  36. package/components/DatePicker.vue.js +20 -24
  37. package/components/Dropdown/DropdownGroupedLayout.vue.js +1 -1
  38. package/components/Dropdown/DropdownMenu.vue.js +1 -3
  39. package/components/Dropdown/DropdownTrigger.vue.js +6 -6
  40. package/components/Dropdown/composables/useDropdownNavigation.js +2 -6
  41. package/components/FilePicker/FilePicker.vue.d.ts +9 -1
  42. package/components/FilePicker/FilePicker.vue.js +192 -113
  43. package/components/FileTree/FileTree.vue.js +2 -4
  44. package/components/FileTree/FileTreeNode.vue.js +1 -3
  45. package/components/Form/CustomFields.vue.d.ts +38 -0
  46. package/components/Form/CustomFields.vue.js +7 -0
  47. package/components/Form/CustomFields.vue2.js +161 -0
  48. package/components/Form/Form.vue.d.ts +94 -0
  49. package/components/Form/Form.vue.js +7 -0
  50. package/components/Form/Form.vue2.js +238 -0
  51. package/components/Form/FormField.vue.d.ts +28 -0
  52. package/components/Form/FormField.vue.js +212 -0
  53. package/components/Form/FormField.vue2.js +4 -0
  54. package/components/Form/FormFields.vue.d.ts +29 -0
  55. package/components/Form/FormFields.vue.js +7 -0
  56. package/components/Form/FormFields.vue2.js +95 -0
  57. package/components/Form/composables/useFileUpload.d.ts +24 -0
  58. package/components/Form/composables/useFileUpload.js +40 -0
  59. package/components/Form/composables/useForm.d.ts +48 -0
  60. package/components/Form/composables/useForm.js +109 -0
  61. package/components/Form/index.d.ts +9 -0
  62. package/components/Form/types.d.ts +167 -0
  63. package/components/Form/utils/form.utils.d.ts +44 -0
  64. package/components/Form/utils/form.utils.js +97 -0
  65. package/components/Heatmap/Heatmap.vue.js +2 -2
  66. package/components/Heatmap/Heatmap.vue2.js +4 -16
  67. package/components/Icon.vue.js +1 -10
  68. package/components/Input.vue.js +118 -109
  69. package/components/Masonry/Masonry.vue.d.ts +1 -1
  70. package/components/Masonry/Masonry.vue.js +2 -2
  71. package/components/Navbar/Navbar.vue.js +1 -7
  72. package/components/Navbar/NavbarItem.vue.js +1 -4
  73. package/components/OTPInput/OTPInput.vue.js +2 -10
  74. package/components/Pagination/Pagination.vue.d.ts +1 -1
  75. package/components/Pagination/Pagination.vue.js +2 -4
  76. package/components/PricingPlan/PricingPlanItem.vue.js +3 -1
  77. package/components/SidePanel.vue.js +1 -1
  78. package/components/SidebarMenu/SidebarMenu.vue.js +13 -5
  79. package/components/SidebarMenu/SidebarMenuItem.vue.js +1 -1
  80. package/components/SidebarMenu/SidebarMenuItem.vue2.js +6 -23
  81. package/components/Switch.vue.js +1 -4
  82. package/components/Tabes/Tabes.vue.d.ts +1 -0
  83. package/components/Tabes/Tabes.vue.js +43 -54
  84. package/components/ToastNotification.vue.js +2 -2
  85. package/components/ToastNotification.vue2.js +75 -76
  86. package/components/Workbook/Workbook.vue.d.ts +1 -1
  87. package/components/Workbook/Workbook.vue.js +2 -2
  88. package/composables/useKeyStroke.js +84 -28
  89. package/composables/useNotifications.js +5 -1
  90. package/core/config.d.ts +29 -0
  91. package/core/config.js +12 -0
  92. package/core/index.d.ts +31 -0
  93. package/core/index.js +15 -0
  94. package/index.d.ts +9 -0
  95. package/index.js +129 -94
  96. package/package.json +27 -6
  97. package/style.css +109 -85
  98. package/types/config.type.d.ts +28 -0
  99. package/types/form.type.d.ts +1 -1
  100. package/types/index.d.ts +1 -0
package/README.md CHANGED
@@ -16,23 +16,19 @@ npm install vlite3
16
16
  yarn add vlite3
17
17
  ```
18
18
 
19
- ## Configuration
19
+ ## 2. Tailwind CSS Setup (Tailwind v4)
20
20
 
21
- ### 1. Import Styles
22
-
23
- Import the library's base styles (for custom component styles) in your main entry file (e.g., `main.ts` or `App.vue`):
21
+ `vite.config.ts`
24
22
 
25
23
  ```ts
26
- import 'vlite3/style.css'
27
- ```
28
-
29
- ### 2. Tailwind CSS Setup
30
-
31
- This library relies on Tailwind CSS for utility classes. You must configure your project to scan the library's files so that the necessary classes are generated.
24
+ import tailwindcss from '@tailwindcss/vite'
32
25
 
33
- #### Tailwind CSS v4
26
+ export default defineConfig({
27
+ plugins: [vue(), tailwindcss()],
28
+ })
29
+ ```
34
30
 
35
- If you are using the new CSS-first configuration, add the source path:
31
+ `style.css`
36
32
 
37
33
  ```css
38
34
  @import 'tailwindcss';
@@ -42,7 +38,7 @@ If you are using the new CSS-first configuration, add the source path:
42
38
  @source "../node_modules/vlite3";
43
39
  ```
44
40
 
45
- ## Usage
41
+ ## 3. Usage
46
42
 
47
43
  Import components directly in your Vue files:
48
44
 
@@ -52,9 +48,152 @@ import { Button, Input } from 'vlite3'
52
48
  </script>
53
49
 
54
50
  <template>
55
- <div class="p-4 space-y-4">
56
- <Button>Click Me</Button>
57
- <Input placeholder="Type here..." />
58
- </div>
51
+ <div class="p-4 space-y-4">
52
+ <Button>Click Me</Button>
53
+ <Input placeholder="Type here..." />
54
+ </div>
59
55
  </template>
60
56
  ```
57
+
58
+ ## 🎨 Theming & Customization
59
+
60
+ vlite3 uses a semantic theming system inspired by **shadcn/ui** and compatible with **Tailwind CSS v4**. All colors are defined as CSS variables, making it easy to customize the look and feel of your application including Dark Mode support.
61
+
62
+ ### Semantic Colors
63
+
64
+ You can customize these colors in your CSS by overriding the variables in `:root` or `.dark` classes (if you are using a class-based dark mode switcher).
65
+
66
+ | Variable | Class Name | Description | Recommended Usage |
67
+ | :------------------------- | :---------------------------- | :----------------------- | :--------------------------------------------------------- |
68
+ | `--background` | `bg-background` | Default page background | The main background color of your app. |
69
+ | `--foreground` | `text-foreground` | Default text color | The primary text color for content. |
70
+ | `--card` | `bg-card` | Card background | Background for cards, panels, and dialogs. |
71
+ | `--card-foreground` | `text-card-foreground` | Card text color | Text color inside cards. |
72
+ | `--card-muted` | `bg-card-muted` | Muted card background | Secondary background area within cards. |
73
+ | `--popover` | `bg-popover` | Popover background | Background for popovers, tooltips, and dropdowns. |
74
+ | `--popover-foreground` | `text-popover-foreground` | Popover text color | Text color inside popovers. |
75
+ | `--popover-muted` | `bg-popover-muted` | Muted popover background | Secondary area within popovers (e.g., headers). |
76
+ | `--primary` | `bg-primary` | Primary brand color | Used for main actions (buttons, active states). |
77
+ | `--primary-foreground` | `text-primary-foreground` | Primary text color | Text color for content on top of primary background. |
78
+ | `--secondary` | `bg-secondary` | Secondary background | Used for secondary actions or muted sections. |
79
+ | `--secondary-foreground` | `text-secondary-foreground` | Secondary text color | Text color for content on top of secondary background. |
80
+ | `--muted` | `bg-muted` | Muted background | Subtle backgrounds (e.g., table headers, disabled states). |
81
+ | `--muted-foreground` | `text-muted-foreground` | Muted text color | Secondary text, hints, placeholders. |
82
+ | `--accent` | `bg-accent` | Accent background | Used for hover states, selection highlights. |
83
+ | `--accent-foreground` | `text-accent-foreground` | Accent text color | Text color on accent backgrounds. |
84
+ | `--destructive` | `bg-destructive` | Destructive color | Used for error states and destructive actions. |
85
+ | `--destructive-foreground` | `text-destructive-foreground` | Destructive text color | Text color on destructive backgrounds. |
86
+ | `--border` | `border` | Default border color | Borders for inputs, cards, and dividers. |
87
+ | `--input` | `border-input` | Input border color | Borders specifically for form inputs. |
88
+ | `--ring` | `ring-ring` | Focus ring color | Outline color for focused elements. |
89
+ | `--radius` | `rounded-radius` | Border radius | Global border radius for components. |
90
+
91
+ ### Extended Color Variants
92
+
93
+ For more complex components, vlite3 provides extended variants for main semantic colors (`primary`, `danger`, `warning`, `info`, `success`). These are useful for building nuanced UIs with subtle backgrounds, hover states, and accessible text.
94
+
95
+ | Base Color | Variant Variables | Usage Description |
96
+ | :---------- | :------------------------------------------------------------------------------------------------------ | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
97
+ | **Primary** | `--color-primary-light`<br>`--color-primary-dark`<br>`--color-primary-fg`<br>`--color-primary-fg-light` | **Light**: Subtle background (e.g., 10% opacity).<br>**Dark**: Hover state for the main color.<br>**Fg**: Text color on top of the _main_ color.<br>**Fg-Light**: Text color on top of the _light_ variant. |
98
+ | **Danger** | `--color-danger-light`<br>`--color-danger-dark`<br>`--color-danger-fg`<br>`--color-danger-fg-light` | **Light**: Error backgrounds (alerts).<br>**Dark**: Hover state for destructive buttons.<br>**Fg**: Text on destructive buttons.<br>**Fg-Light**: Text on error alerts. |
99
+ | **Warning** | `--color-warning-light`<br>`--color-warning-dark`<br>`--color-warning-fg`<br>`--color-warning-fg-light` | **Light**: Warning backgrounds.<br>**Dark**: Active/Determined warning states.<br>**Fg**: Text on warning badges.<br>**Fg-Light**: Text on warning backgrounds. |
100
+ | **Success** | `--color-success-light`<br>`--color-success-dark`<br>`--color-success-fg`<br>`--color-success-fg-light` | **Light**: Success backgrounds (toasts).<br>**Dark**: Hover/Active success actions.<br>**Fg**: Text on success buttons.<br>**Fg-Light**: Text on success backgrounds. |
101
+ | **Info** | `--color-info-light`<br>`--color-info-dark`<br>`--color-info-fg`<br>`--color-info-fg-light` | **Light**: Info backgrounds.<br>**Dark**: Hover/Active info actions.<br>**Fg**: Text on info buttons.<br>**Fg-Light**: Text on info backgrounds. |
102
+
103
+ **Example Usage:**
104
+
105
+ ```html
106
+ <!-- A success badge with subtle background and matching text -->
107
+ <div class="bg-success-light text-success-fg-light border border-success/20">
108
+ Operation Completed
109
+ </div>
110
+
111
+ <!-- A danger button with hover effect -->
112
+ <button class="bg-danger text-danger-fg hover:bg-danger-dark">Delete</button>
113
+ ```
114
+
115
+ ### Additional Colors
116
+
117
+ vlite3 also provides additional utility colors for specific feedback states:
118
+
119
+ | Variable | Class Name | Description |
120
+ | :---------------- | :--------------------------- | :-------------------------------------- |
121
+ | `--color-success` | `text-success`, `bg-success` | For success messages/badges. |
122
+ | `--color-warning` | `text-warning`, `bg-warning` | For warning messages/badges. |
123
+ | `--color-info` | `text-info`, `bg-info` | For informational messages/badges. |
124
+ | `--color-danger` | `text-danger`, `bg-danger` | Alias for destructive in some contexts. |
125
+
126
+ ### Example Customization
127
+
128
+ To customize the theme, simply override the CSS variables in your main CSS file:
129
+
130
+ ```css
131
+ @layer base {
132
+ :root {
133
+ --primary: #3b82f6; /* Blue-500 */
134
+ --primary-foreground: #ffffff;
135
+ --radius: 0.75rem;
136
+ }
137
+
138
+ .dark {
139
+ --primary: #60a5fa; /* Blue-400 */
140
+ --primary-foreground: #000000;
141
+ }
142
+ }
143
+ ```
144
+
145
+ ## ✅ Components
146
+
147
+ - **Button**
148
+ - **ButtonGroup**
149
+ - **Icon**
150
+ - **Label**
151
+ - **Badge**
152
+ - **Chip**
153
+ - **Logo**
154
+ - **Navbar**
155
+ - **SidebarMenu**
156
+ - **SidePanel**
157
+ - **Masonry Grid**
158
+ - **ThemeToggle**
159
+
160
+ ### Inputs & Forms
161
+
162
+ - **Input**
163
+ - **Textarea**
164
+ - **CheckBox**
165
+ - **Switch**
166
+ - **ChoiceBox**
167
+ - **Slider**
168
+ - **OTPInput**
169
+ - **DatePicker**
170
+ - **ColorPicker**
171
+ - **FilePicker**
172
+ - **AvatarUploader**
173
+ - **IconPicker**
174
+ - **MultiSelect**
175
+ - **Form**
176
+ - **CustomFields**
177
+
178
+ ### Data Display
179
+
180
+ - **Avatar**
181
+ - **Accordion**
182
+ - **Carousel**
183
+ - **DataTable**
184
+ - **Pagination**
185
+ - **Timeline**
186
+ - **Heatmap**
187
+ - **PricingPlan**
188
+ - **FileTree**
189
+ - **Workbook**
190
+ - **Tabes**
191
+
192
+ ### Feedback & Overlays
193
+
194
+ - **Alert**
195
+ - **Modal**
196
+ - **ConfirmationModal**
197
+ - **ToastNotification**
198
+ - **Tooltip**
199
+ - **Dropdown**
@@ -1,7 +1,7 @@
1
1
  import o from "./AccordionContent.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-d71e56f7"]]);
4
+ const c = /* @__PURE__ */ t(o, [["__scopeId", "data-v-66f45fa0"]]);
5
5
  export {
6
- f as default
6
+ c as default
7
7
  };
@@ -40,7 +40,7 @@ const T = {
40
40
  return t === "solid" ? `${a} px-4 bg-muted transition-colors` : !i && (t === "ghost" || t === "default") ? `${a} px-0 hover:no-underline` : `${a} px-4 hover:bg-accent`;
41
41
  }), $ = s(() => {
42
42
  const { variant: t, attached: i } = n, o = n.contentClass || "";
43
- return t === "solid" ? `${o} px-4 pt-2` : !i && (t === "ghost" || t === "default") ? `${o} px-0` : `${o} px-4`;
43
+ return t === "solid" ? `${o} px-4 pt-4` : !i && (t === "ghost" || t === "default") ? `${o} px-0` : `${o} px-4`;
44
44
  });
45
45
  return (t, i) => (l(), d("div", {
46
46
  class: c([x.value, n.class, n.itemClass])
@@ -34,10 +34,7 @@ const V = ["data-state", "disabled"], $ = { class: "flex items-center gap-3" },
34
34
  });
35
35
  return (n, u) => (r(), s("button", {
36
36
  type: "button",
37
- class: a(["group flex flex-1 w-full items-center justify-between py-3 text-left font-medium transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2", [
38
- e.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer",
39
- e.class
40
- ]]),
37
+ class: a(["group flex flex-1 w-full items-center justify-between py-3 text-left font-medium transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2", [e.disabled ? "opacity-50 cursor-not-allowed" : "cursor-pointer", e.class]]),
41
38
  "data-state": e.open ? "open" : "closed",
42
39
  disabled: e.disabled,
43
40
  onClick: h
@@ -35,10 +35,7 @@ const j = ["role"], E = {
35
35
  l.value ? "[&>svg]:top-1/2 [&>svg]:-translate-y-1/2" : "[&>svg]:top-4 top-4 [&>svg+div]:translate-y-[-3px]",
36
36
  b.value,
37
37
  t.class
38
- ].join(" ")), h = a(() => [
39
- "font-medium leading-none tracking-tight",
40
- l.value ? "" : "mb-1"
41
- ].join(" ")), w = a(() => t.role ? t.role : ["danger", "warning"].includes(t.variant) ? "alert" : "status");
38
+ ].join(" ")), h = a(() => ["font-medium leading-none tracking-tight", l.value ? "" : "mb-1"].join(" ")), w = a(() => t.role ? t.role : ["danger", "warning"].includes(t.variant) ? "alert" : "status");
42
39
  return (s, u) => c.value ? (n(), i("div", {
43
40
  key: 0,
44
41
  class: r(x.value),
@@ -1,7 +1,7 @@
1
1
  import { FilePickerValue } from '../FilePicker';
2
2
  import { AvatarSize, AvatarRounded } from '../../types';
3
3
  export interface Props {
4
- modelValue?: string | null;
4
+ modelValue?: any;
5
5
  size?: AvatarSize;
6
6
  rounded?: AvatarRounded;
7
7
  editable?: boolean;
@@ -23,7 +23,7 @@ declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, imp
23
23
  }>, {
24
24
  disabled: boolean;
25
25
  alt: string;
26
- modelValue: string | null;
26
+ modelValue: any;
27
27
  size: AvatarSize;
28
28
  loading: boolean;
29
29
  rounded: AvatarRounded;
@@ -1,4 +1,4 @@
1
- import { defineComponent as w, ref as z, computed as f, openBlock as r, createElementBlock as n, normalizeClass as l, createVNode as o, unref as C, withCtx as A, createElementVNode as B, createCommentVNode as g, withModifiers as N } from "vue";
1
+ import { defineComponent as w, ref as z, computed as f, openBlock as n, createElementBlock as r, normalizeClass as l, createVNode as o, unref as C, withCtx as A, createElementVNode as B, createCommentVNode as g, withModifiers as N } from "vue";
2
2
  import u from "../Icon.vue.js";
3
3
  import j from "../FilePicker/FilePicker.vue.js";
4
4
  import E from "../Avatar.vue.js";
@@ -18,22 +18,22 @@ const $ = ["onClick"], I = /* @__PURE__ */ w({
18
18
  },
19
19
  emits: ["update:modelValue", "change", "error"],
20
20
  setup(e, { emit: v }) {
21
- const s = e, t = v, d = z(null), c = f(() => d.value || s.modelValue), h = (a) => {
21
+ const s = e, t = v, i = z(null), c = f(() => i.value || s.modelValue), h = (a) => {
22
22
  if (!a || Array.isArray(a)) {
23
23
  Array.isArray(a) && a.length === 0 && m();
24
24
  return;
25
25
  }
26
- a.base64 && (d.value = a.base64, t("update:modelValue", a.base64)), t("change", a);
26
+ a.base64 && (i.value = a.base64, t("update:modelValue", a.base64)), t("change", a);
27
27
  }, y = (a) => {
28
28
  t("error", a);
29
29
  }, m = () => {
30
- d.value = null, t("update:modelValue", null), t("change", null);
30
+ i.value = null, t("update:modelValue", null), t("change", null);
31
31
  }, k = f(() => [
32
32
  "group relative inline-block",
33
33
  // If rounded is full, we need overflow hidden on the container to clip the overlay
34
34
  s.rounded === "full" ? "rounded-full" : ""
35
35
  ].join(" "));
36
- return (a, b) => (r(), n("div", {
36
+ return (a, b) => (n(), r("div", {
37
37
  class: l(k.value)
38
38
  }, [
39
39
  o(C(j), {
@@ -42,13 +42,13 @@ const $ = ["onClick"], I = /* @__PURE__ */ w({
42
42
  "file-types": ["image/jpeg", "image/png", "image/webp", "image/gif"],
43
43
  "max-size": e.maxSize,
44
44
  class: "w-auto h-auto block",
45
- onChange: b[0] || (b[0] = (i) => h(i)),
45
+ onChange: b[0] || (b[0] = (d) => h(d)),
46
46
  onError: y
47
47
  }, {
48
- trigger: A(({ trigger: i, isLoading: x }) => [
48
+ trigger: A(({ trigger: d, isLoading: x }) => [
49
49
  B("div", {
50
- class: l(["relative cursor-pointer transition-transform active:scale-95", { "cursor-default": !e.editable || e.disabled }]),
51
- onClick: (R) => e.editable && !e.disabled ? i() : null
50
+ class: l(["relative cursor-pointer transition-transform active:scale-95 inline-block", { "cursor-default": !e.editable || e.disabled }]),
51
+ onClick: (R) => e.editable && !e.disabled ? d() : null
52
52
  }, [
53
53
  o(E, {
54
54
  src: c.value || void 0,
@@ -58,23 +58,17 @@ const $ = ["onClick"], I = /* @__PURE__ */ w({
58
58
  rounded: e.rounded,
59
59
  class: l(e.className)
60
60
  }, null, 8, ["src", "fallback", "alt", "size", "rounded", "class"]),
61
- e.loading || x ? (r(), n("div", {
61
+ e.loading || x ? (n(), r("div", {
62
62
  key: 0,
63
- class: l([
64
- "absolute inset-0 flex items-center justify-center bg-black/40 backdrop-blur-[1px] text-white transition-opacity",
65
- e.rounded === "full" ? "rounded-full" : "rounded-md"
66
- ])
63
+ class: l(["absolute inset-0 flex items-center justify-center bg-black/40 backdrop-blur-[1px] text-white transition-opacity", e.rounded === "full" ? "rounded-full" : "rounded-md"])
67
64
  }, [
68
65
  o(u, {
69
66
  icon: "lucide:loader-2",
70
67
  class: "animate-spin w-1/3 h-1/3"
71
68
  })
72
- ], 2)) : e.editable && !e.disabled ? (r(), n("div", {
69
+ ], 2)) : e.editable && !e.disabled ? (n(), r("div", {
73
70
  key: 1,
74
- class: l([
75
- "absolute inset-0 flex items-center justify-center bg-black/40 text-white opacity-0 transition-opacity duration-200 group-hover:opacity-100",
76
- e.rounded === "full" ? "rounded-full" : "rounded-md"
77
- ])
71
+ class: l(["absolute inset-0 flex items-center justify-center bg-black/40 text-white opacity-0 transition-opacity duration-200 group-hover:opacity-100", e.rounded === "full" ? "rounded-full" : "rounded-md"])
78
72
  }, [
79
73
  o(u, {
80
74
  icon: "lucide:camera",
@@ -85,7 +79,7 @@ const $ = ["onClick"], I = /* @__PURE__ */ w({
85
79
  ]),
86
80
  _: 1
87
81
  }, 8, ["disabled", "max-size"]),
88
- c.value && e.editable && !e.disabled && !e.loading ? (r(), n("button", {
82
+ c.value && e.editable && !e.disabled && !e.loading ? (n(), r("button", {
89
83
  key: 0,
90
84
  type: "button",
91
85
  class: "absolute -top-1 -right-1 z-10 p-1 bg-background border border-border rounded-full text-muted-foreground shadow-sm hover:text-destructive hover:border-destructive transition-colors opacity-0 group-hover:opacity-100 scale-75 group-hover:scale-100 duration-200 transform",
@@ -6,19 +6,15 @@ const g = /* @__PURE__ */ o({
6
6
  class: { default: "" }
7
7
  },
8
8
  setup(n) {
9
- const e = n, t = a(() => [
10
- "inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
11
- {
12
- default: "border-transparent bg-primary text-primary-foreground hover:bg-primary/80",
13
- secondary: "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
14
- danger: "border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",
15
- warning: "border-transparent bg-warning text-warning-fg hover:bg-warning/80",
16
- info: "border-transparent bg-info text-info-fg hover:bg-info/80",
17
- success: "border-transparent bg-success text-success-fg hover:bg-success/80",
18
- outline: "text-foreground border-border"
19
- }[e.variant],
20
- e.class
21
- ].join(" "));
9
+ const e = n, t = a(() => ["inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2", {
10
+ default: "border-transparent bg-primary text-primary-foreground hover:bg-primary/80",
11
+ secondary: "border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",
12
+ danger: "border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",
13
+ warning: "border-transparent bg-warning text-warning-fg hover:bg-warning/80",
14
+ info: "border-transparent bg-info text-info-fg hover:bg-info/80",
15
+ success: "border-transparent bg-success text-success-fg hover:bg-success/80",
16
+ outline: "text-foreground border-border"
17
+ }[e.variant], e.class].join(" "));
22
18
  return (r, s) => (c(), i("div", {
23
19
  class: d(t.value)
24
20
  }, [
@@ -1,7 +1,7 @@
1
- import { defineComponent as m, computed as a, withDirectives as v, openBlock as n, createElementBlock as x, normalizeClass as o, createBlock as l, createCommentVNode as u, renderSlot as y, createTextVNode as p, toDisplayString as w, unref as k } from "vue";
1
+ import { defineComponent as v, useSlots as x, computed as a, withDirectives as y, openBlock as r, createElementBlock as w, normalizeClass as i, createBlock as l, createCommentVNode as u, renderSlot as p, createTextVNode as k, toDisplayString as z, unref as B } from "vue";
2
2
  import c from "./Icon.vue.js";
3
- import { vRipple as z } from "../directives/vRipple.js";
4
- const B = ["type", "disabled"], V = /* @__PURE__ */ m({
3
+ import { vRipple as C } from "../directives/vRipple.js";
4
+ const R = ["type", "disabled"], j = /* @__PURE__ */ v({
5
5
  __name: "Button",
6
6
  props: {
7
7
  variant: { default: "primary" },
@@ -16,8 +16,8 @@ const B = ["type", "disabled"], V = /* @__PURE__ */ m({
16
16
  rounded: { default: "md" }
17
17
  },
18
18
  setup(e) {
19
- const t = e, i = a(() => t.icon && !t.text), g = a(() => {
20
- const r = "inline-flex items-center justify-center whitespace-nowrap text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 active:scale-95 cursor-pointer", d = {
19
+ const t = e, g = x(), o = a(() => t.icon && !t.text && !g.default), h = a(() => {
20
+ const n = "inline-flex items-center justify-center whitespace-nowrap text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 active:scale-95 cursor-pointer", d = {
21
21
  primary: "bg-primary text-primary-foreground hover:bg-primary/90",
22
22
  "primary-light": "bg-primary-light text-primary-fg-light hover:bg-primary/20",
23
23
  secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
@@ -38,17 +38,17 @@ const B = ["type", "disabled"], V = /* @__PURE__ */ m({
38
38
  ghost: "hover:bg-accent hover:text-accent-foreground text-foreground",
39
39
  link: "text-primary underline-offset-4 hover:underline"
40
40
  }, f = {
41
- xs: "h-6 px-2",
42
- md: "h-10 px-4 py-2",
43
- sm: "h-9 px-3",
44
- lg: "h-11 px-8",
41
+ xs: "h-6.5 px-2",
42
+ sm: "h-8 px-3",
43
+ md: "h-9 px-4 py-2",
44
+ lg: "h-10 px-8",
45
45
  xl: "h-12 px-10"
46
- }, h = {
47
- xs: "h-7 w-7",
48
- md: "h-10 w-10",
49
- sm: "h-9 w-9",
50
- lg: "h-11 w-11",
51
- xl: "h-12 w-12"
46
+ }, m = {
47
+ xs: "h-6.5 w-6.5 min-h-6.5 min-w-6.5",
48
+ sm: "h-8 w-8 min-h-9 min-w-9",
49
+ md: "h-9 w-9 min-h-9 min-w-9",
50
+ lg: "h-10 w-10 min-h-11 min-w-11",
51
+ xl: "h-12 w-12 min-h-12 min-w-12"
52
52
  }, b = {
53
53
  none: "rounded-none",
54
54
  sm: "rounded-sm",
@@ -59,10 +59,10 @@ const B = ["type", "disabled"], V = /* @__PURE__ */ m({
59
59
  full: "rounded-full"
60
60
  };
61
61
  return [
62
- r,
62
+ n,
63
63
  d[t.variant],
64
64
  b[t.rounded],
65
- i.value ? h[t.size] : f[t.size],
65
+ o.value ? m[t.size] : f[t.size],
66
66
  t.class
67
67
  ].join(" ");
68
68
  }), s = a(() => ({
@@ -72,37 +72,37 @@ const B = ["type", "disabled"], V = /* @__PURE__ */ m({
72
72
  lg: "w-4 h-4",
73
73
  xl: "w-4 h-4"
74
74
  })[t.size]);
75
- return (r, d) => v((n(), x("button", {
75
+ return (n, d) => y((r(), w("button", {
76
76
  type: e.type,
77
- class: o(g.value),
77
+ class: i(h.value),
78
78
  disabled: e.disabled || e.loading
79
79
  }, [
80
- e.loading ? (n(), l(c, {
80
+ e.loading ? (r(), l(c, {
81
81
  key: 0,
82
82
  icon: "lucide:loader-2",
83
- class: o(["mr-2 animate-spin", { "mr-0": i.value, [s.value]: !0 }])
84
- }, null, 8, ["class"])) : e.icon ? (n(), l(c, {
83
+ class: i(["mr-2 animate-spin", { "mr-0": o.value, [s.value]: !0 }])
84
+ }, null, 8, ["class"])) : e.icon ? (r(), l(c, {
85
85
  key: 1,
86
86
  icon: e.icon,
87
- class: o({
88
- "mr-2": r.$slots.default || e.text,
89
- "mx-auto": i.value,
87
+ class: i({
88
+ "mr-2": n.$slots.default || e.text,
89
+ "mx-auto": o.value,
90
90
  [s.value]: !0
91
91
  })
92
92
  }, null, 8, ["icon", "class"])) : u("", !0),
93
- y(r.$slots, "default", {}, () => [
94
- p(w(e.text), 1)
93
+ p(n.$slots, "default", {}, () => [
94
+ k(z(e.text), 1)
95
95
  ]),
96
- e.iconRight && !e.loading ? (n(), l(c, {
96
+ e.iconRight && !e.loading ? (r(), l(c, {
97
97
  key: 2,
98
98
  icon: e.iconRight,
99
- class: o([s.value, "ml-2 h-4 w-4"])
99
+ class: i([s.value, "ml-2 h-4 w-4"])
100
100
  }, null, 8, ["icon", "class"])) : u("", !0)
101
- ], 10, B)), [
102
- [k(z)]
101
+ ], 10, R)), [
102
+ [B(C)]
103
103
  ]);
104
104
  }
105
105
  });
106
106
  export {
107
- V as default
107
+ j as default
108
108
  };
@@ -1,7 +1,7 @@
1
1
  import o from "./ButtonGroup.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-1a20a82d"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-8c9add3e"]]);
5
5
  export {
6
6
  m as default
7
7
  };
@@ -16,9 +16,6 @@ const p = /* @__PURE__ */ l({
16
16
  "inline-flex",
17
17
  a.value ? "flex-col" : "flex-row",
18
18
  t.class,
19
- // Attached Mode logic for Deep Selectors
20
- // We target direct children buttons. Assuming standard <button> or .btn class structure if possible,
21
- // but since we wrap `Button`, targeting `button` tag is safe.
22
19
  e.attached ? "attached-group" : "gap-2",
23
20
  // Vertical Attached
24
21
  e.attached && a.value ? "vertical-group" : ""