@kopexa/theme 2.1.0 → 13.0.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 (49) hide show
  1. package/dist/{chunk-NFOF75HQ.mjs → chunk-2N3PG3TK.mjs} +1 -1
  2. package/dist/{chunk-5DOB3IBE.mjs → chunk-6IZPAS4O.mjs} +5 -0
  3. package/dist/{chunk-GA6UOB2D.mjs → chunk-7POAXCN2.mjs} +1 -1
  4. package/dist/{chunk-M3GQ563Q.mjs → chunk-ARLLAC5V.mjs} +1 -1
  5. package/dist/{chunk-Z7D56R5U.mjs → chunk-CWAFYX5G.mjs} +2 -2
  6. package/dist/{chunk-IHITEH7V.mjs → chunk-IX46TOS3.mjs} +1 -1
  7. package/dist/{chunk-IHW4FWFB.mjs → chunk-K3EVZATS.mjs} +1 -1
  8. package/dist/{chunk-URGRCBNW.mjs → chunk-NNKYGAZC.mjs} +1 -1
  9. package/dist/{chunk-HHOMDBMZ.mjs → chunk-SYYY32OX.mjs} +1 -1
  10. package/dist/{chunk-DI54XTS5.mjs → chunk-TQVRNEIH.mjs} +1 -1
  11. package/dist/chunk-URVHE3OS.mjs +119 -0
  12. package/dist/{chunk-XRKUQMGU.mjs → chunk-UTCVHVWF.mjs} +1 -1
  13. package/dist/{chunk-YH6TDPK7.mjs → chunk-VDMXPFII.mjs} +1 -1
  14. package/dist/components/autocomplete.js +5 -0
  15. package/dist/components/autocomplete.mjs +3 -3
  16. package/dist/components/avatar.mjs +2 -2
  17. package/dist/components/button.mjs +2 -2
  18. package/dist/components/combobox.d.mts +142 -0
  19. package/dist/components/combobox.d.ts +142 -0
  20. package/dist/components/combobox.js +228 -0
  21. package/dist/components/combobox.mjs +8 -0
  22. package/dist/components/command.d.mts +3 -3
  23. package/dist/components/command.d.ts +3 -3
  24. package/dist/components/hover-card.mjs +2 -2
  25. package/dist/components/index.d.mts +1 -0
  26. package/dist/components/index.d.ts +1 -0
  27. package/dist/components/index.js +208 -89
  28. package/dist/components/index.mjs +29 -25
  29. package/dist/components/input.js +5 -0
  30. package/dist/components/input.mjs +2 -2
  31. package/dist/components/popover.mjs +2 -2
  32. package/dist/components/select.js +5 -0
  33. package/dist/components/select.mjs +2 -2
  34. package/dist/components/sidebar.js +1 -1
  35. package/dist/components/sidebar.mjs +1 -1
  36. package/dist/components/skeleton-avatar.mjs +3 -3
  37. package/dist/components/slash-dropdown-menu.mjs +2 -2
  38. package/dist/components/textarea.js +5 -0
  39. package/dist/components/textarea.mjs +2 -2
  40. package/dist/index.d.mts +1 -0
  41. package/dist/index.d.ts +1 -0
  42. package/dist/index.js +208 -89
  43. package/dist/index.mjs +29 -25
  44. package/dist/utils/classes.d.mts +5 -0
  45. package/dist/utils/classes.d.ts +5 -0
  46. package/dist/utils/classes.js +5 -0
  47. package/dist/utils/classes.mjs +1 -1
  48. package/package.json +2 -2
  49. /package/dist/{chunk-4I5ASWB3.mjs → chunk-XMLRBNOG.mjs} +0 -0
@@ -0,0 +1,228 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/components/combobox.ts
21
+ var combobox_exports = {};
22
+ __export(combobox_exports, {
23
+ combobox: () => combobox
24
+ });
25
+ module.exports = __toCommonJS(combobox_exports);
26
+ var import_tailwind_variants2 = require("tailwind-variants");
27
+
28
+ // src/components/input.ts
29
+ var import_tailwind_variants = require("tailwind-variants");
30
+
31
+ // src/utils/classes.ts
32
+ var focusVisibleClasses = [
33
+ "focus-visible:outline-2 focus-visible:outline-ring focus-visible:outline-offset-2"
34
+ //"focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
35
+ ];
36
+ var inputClasses = {
37
+ radius: {
38
+ sm: "rounded-sm",
39
+ md: "rounded-md",
40
+ lg: "rounded-lg"
41
+ },
42
+ height: {
43
+ sm: "h-7 min-h-7",
44
+ md: "h-8.5 min-h-8.5",
45
+ lg: "h-10 min-h-10"
46
+ },
47
+ text: {
48
+ sm: "text-sm",
49
+ md: "text-base md:text-sm",
50
+ lg: "text-base"
51
+ }
52
+ };
53
+
54
+ // src/components/input.ts
55
+ var passwordInput = (0, import_tailwind_variants.tv)({
56
+ slots: {
57
+ button: "focus:outline-hidden",
58
+ icon: "pointer-events-none text-muted-foreground"
59
+ }
60
+ });
61
+ var input = (0, import_tailwind_variants.tv)({
62
+ base: [
63
+ "w-full inline-flex bg-background text-foreground",
64
+ "border-input border",
65
+ "shadow-xs placeholder:text-muted-foreground",
66
+ ...focusVisibleClasses,
67
+ "disabled:cursor-not-allowed disabled:opacity-60",
68
+ "[&[readonly]]:bg-muted/80 [&[readonly]]:cursor-not-allowed",
69
+ "w-full font-normal outline-hidden focus-visible:outline-hidden",
70
+ "data-[has-start-content=true]:ps-1.5",
71
+ "data-[has-end-content=true]:pe-1.5",
72
+ "file:cursor-pointer file:bg-transparent file:border-0",
73
+ "autofill:bg-transparent bg-clip-text",
74
+ // legacy
75
+ "selection:bg-primary selection:text-primary-foreground placeholder:text-muted-foreground",
76
+ "flex",
77
+ // file
78
+ "file:text-foreground file:inline-flex file:text-sm file:font-medium",
79
+ "aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive"
80
+ ],
81
+ variants: {
82
+ size: {
83
+ sm: [
84
+ inputClasses.radius.sm,
85
+ inputClasses.height.sm,
86
+ "px-2.5 [&_svg]:size-4",
87
+ "text-sm file:h-6"
88
+ ],
89
+ md: [
90
+ inputClasses.radius.md,
91
+ inputClasses.height.md,
92
+ "px-3 [&_svg]:size-4",
93
+ "text-base md:text-sm file:h-8"
94
+ ],
95
+ lg: [
96
+ inputClasses.radius.lg,
97
+ inputClasses.height.md,
98
+ "px-4 [&_svg]:size-4",
99
+ "text-base file:h-10"
100
+ ]
101
+ },
102
+ radius: {
103
+ none: "rounded-none",
104
+ sm: "rounded-sm",
105
+ md: "rounded-md",
106
+ lg: "rounded-lg",
107
+ full: "rounded-full"
108
+ }
109
+ },
110
+ defaultVariants: {
111
+ size: "md"
112
+ }
113
+ });
114
+
115
+ // src/components/combobox.ts
116
+ var combobox = (0, import_tailwind_variants2.tv)({
117
+ slots: {
118
+ root: [],
119
+ control: "relative",
120
+ value: "",
121
+ input: [
122
+ ...input.base,
123
+ "has-[[data-slot=combobox-input]:focus-visible]:ring-ring",
124
+ "has-[[data-slot=combobox-input]:focus-visible]:border-ring",
125
+ "has-[[data-slot=combobox-input]:focus-visible]:outline-none",
126
+ "has-[[data-slot=combobox-input]:focus-visible]:ring-2",
127
+ "[&_[data-slot=combobox-input]]:grow",
128
+ "[&[readonly]]:bg-muted/80 [&[readonly]]:cursor-not-allowed"
129
+ ],
130
+ status: "text-muted-foreground text-sm",
131
+ positioner: "outline-none",
132
+ popup: [
133
+ "py-1 w-[var(--anchor-width)] max-h-[min(var(--available-height),23rem)] max-w-[var(--available-width)]",
134
+ "overflow-y-auto scroll-pt-2 scroll-pb-2 overscroll-contain bg-[canvas]",
135
+ "rounded-md border border-border bg-popover text-popover-foreground shadow-md shadow-black/5",
136
+ "origin-[var(--transform-origin)] transition-[transform,scale,opacity] data-[ending-style]:scale-90",
137
+ "data-[ending-style]:opacity-0 data-[starting-style]:scale-90 data-[starting-style]:opacity-0"
138
+ ],
139
+ list: "space-y-0.5",
140
+ row: "flex items-center gap-2",
141
+ item: [
142
+ "relative cursor-default flex items-center",
143
+ "text-foreground relative select-none items-center gap-2 rounded-md ps-7 pe-2 py-1.5 text-sm outline-hidden transition-colors data-disabled:pointer-events-none data-disabled:opacity-50",
144
+ "[&_svg]:pointer-events-none [&_svg:not([role=img]):not([class*=text-])]:opacity-60 [&_svg:not([class*=size-])]:size-4 [&_svg]:shrink-0",
145
+ "data-[highlighted]:relative data-[highlighted]:z-0 data-[highlighted]:text-foreground data-[highlighted]:before:absolute data-[highlighted]:before:inset-x-1 data-[highlighted]:before:inset-y-0 data-[highlighted]:before:z-[-1] data-[highlighted]:before:rounded-sm data-[highlighted]:before:bg-accent"
146
+ ],
147
+ itemIndicator: [
148
+ "absolute flex top-1/2 -translate-y-1/2 items-center justify-center start-2.5",
149
+ "[&_svg]:size-4 [&_svg]:text-primary"
150
+ ],
151
+ groupLabel: "px-2 py-1.5 text-xs text-muted-foreground font-medium",
152
+ empty: "px-2 py-1.5 text-sm text-muted-foreground empty:m-0 empty:p-0",
153
+ clear: [
154
+ "absolute cursor-pointer end-6 top-1/2 -translate-y-1/2 rounded-sm opacity-70 ring-offset-background",
155
+ "transition-opacity opacity-60 hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",
156
+ "data-[disabled]:pointer-events-none",
157
+ "[&_svg]:size-3.5"
158
+ ],
159
+ icon: [
160
+ "absolute cursor-pointer end-2 top-1/2 -translate-y-1/2 rounded-sm opacity-70 ring-offset-background transition-opacity",
161
+ "opacity-60 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none",
162
+ "data-[disabled]:pointer-events-none",
163
+ "[&_svg]:size-3.5"
164
+ ],
165
+ trigger: "relative",
166
+ // note: chips receive "input" and the following styles
167
+ chips: [
168
+ "flex items-center flex-wrap gap-1",
169
+ "[&_[data-slot=combobox-input]]:py-0 [&_[data-slot=combobox-input]]:px-1.5 has-[[data-slot=combobox-chip]]:[&_[data-slot=combobox-input]]:px-0",
170
+ "[&_[data-slot=combobox-input]]:min-h-0 [&_[data-slot=combobox-input]]:flex-1",
171
+ "[&_[data-slot=combobox-input]]:border-0 [&_[data-slot=combobox-input]]:shadow-none [&_[data-slot=combobox-input]]:rounded-none",
172
+ "[&_[data-slot=combobox-input]]:outline-none [&_[data-slot=combobox-input]]:ring-0"
173
+ ],
174
+ chip: [
175
+ "inline-flex items-center gap-1 rounded-md bg-muted px-2 py-1 text-xs font-medium text-foreground"
176
+ ],
177
+ chipRemove: [
178
+ "cursor-pointer ms-1 rounded-sm [&_svg]:opacity-60 hover:bg-muted-foreground/20 hover:[&_svg]:opacity-100",
179
+ "[&_svg]:size-3.5"
180
+ ],
181
+ separator: "my-1.5 h-px bg-muted",
182
+ header: ["flex flex-col items-start justify-between px-3 py-2 border-b"],
183
+ title: "text-sm font-semibold",
184
+ description: "text-xs text-muted-foreground"
185
+ },
186
+ variants: {
187
+ size: {
188
+ sm: {
189
+ input: [
190
+ ...input.variants.size.sm,
191
+ "h-auto py-0.5",
192
+ "[&~[data-slot=combobox-icon]]:end-2.5 [&~[data-slot=combobox-clear]]:end-7"
193
+ ],
194
+ chips: "px-0.75"
195
+ },
196
+ md: {
197
+ input: [
198
+ ...input.variants.size.md,
199
+ "h-auto py-1",
200
+ "[&~[data-slot=combobox-icon]]:end-2 [&~[data-slot=combobox-clear]]:end-6"
201
+ ],
202
+ chips: "px-1"
203
+ },
204
+ lg: {
205
+ input: [
206
+ ...input.variants.size.lg,
207
+ "h-auto py-1",
208
+ "[&~[data-slot=combobox-icon]]:end-1.75 [&~[data-slot=combobox-clear]]:end-5.75"
209
+ ],
210
+ chips: "px-1.5"
211
+ }
212
+ },
213
+ fullWidth: {
214
+ true: {
215
+ input: "w-full",
216
+ chips: "w-full"
217
+ }
218
+ }
219
+ },
220
+ defaultVariants: {
221
+ size: "md",
222
+ fullWidth: true
223
+ }
224
+ });
225
+ // Annotate the CommonJS export names for ESM import in node:
226
+ 0 && (module.exports = {
227
+ combobox
228
+ });
@@ -0,0 +1,8 @@
1
+ import {
2
+ combobox
3
+ } from "../chunk-URVHE3OS.mjs";
4
+ import "../chunk-K3EVZATS.mjs";
5
+ import "../chunk-6IZPAS4O.mjs";
6
+ export {
7
+ combobox
8
+ };
@@ -14,9 +14,9 @@ declare const command: tailwind_variants.TVReturnType<{
14
14
  list?: tailwind_merge.ClassNameValue;
15
15
  empty?: tailwind_merge.ClassNameValue;
16
16
  group?: tailwind_merge.ClassNameValue;
17
+ separator?: tailwind_merge.ClassNameValue;
17
18
  inputWrapper?: tailwind_merge.ClassNameValue;
18
19
  inputIcon?: tailwind_merge.ClassNameValue;
19
- separator?: tailwind_merge.ClassNameValue;
20
20
  shortcut?: tailwind_merge.ClassNameValue;
21
21
  };
22
22
  };
@@ -32,9 +32,9 @@ declare const command: tailwind_variants.TVReturnType<{
32
32
  list?: tailwind_merge.ClassNameValue;
33
33
  empty?: tailwind_merge.ClassNameValue;
34
34
  group?: tailwind_merge.ClassNameValue;
35
+ separator?: tailwind_merge.ClassNameValue;
35
36
  inputWrapper?: tailwind_merge.ClassNameValue;
36
37
  inputIcon?: tailwind_merge.ClassNameValue;
37
- separator?: tailwind_merge.ClassNameValue;
38
38
  shortcut?: tailwind_merge.ClassNameValue;
39
39
  };
40
40
  };
@@ -64,9 +64,9 @@ declare const command: tailwind_variants.TVReturnType<{
64
64
  list?: tailwind_merge.ClassNameValue;
65
65
  empty?: tailwind_merge.ClassNameValue;
66
66
  group?: tailwind_merge.ClassNameValue;
67
+ separator?: tailwind_merge.ClassNameValue;
67
68
  inputWrapper?: tailwind_merge.ClassNameValue;
68
69
  inputIcon?: tailwind_merge.ClassNameValue;
69
- separator?: tailwind_merge.ClassNameValue;
70
70
  shortcut?: tailwind_merge.ClassNameValue;
71
71
  };
72
72
  };
@@ -14,9 +14,9 @@ declare const command: tailwind_variants.TVReturnType<{
14
14
  list?: tailwind_merge.ClassNameValue;
15
15
  empty?: tailwind_merge.ClassNameValue;
16
16
  group?: tailwind_merge.ClassNameValue;
17
+ separator?: tailwind_merge.ClassNameValue;
17
18
  inputWrapper?: tailwind_merge.ClassNameValue;
18
19
  inputIcon?: tailwind_merge.ClassNameValue;
19
- separator?: tailwind_merge.ClassNameValue;
20
20
  shortcut?: tailwind_merge.ClassNameValue;
21
21
  };
22
22
  };
@@ -32,9 +32,9 @@ declare const command: tailwind_variants.TVReturnType<{
32
32
  list?: tailwind_merge.ClassNameValue;
33
33
  empty?: tailwind_merge.ClassNameValue;
34
34
  group?: tailwind_merge.ClassNameValue;
35
+ separator?: tailwind_merge.ClassNameValue;
35
36
  inputWrapper?: tailwind_merge.ClassNameValue;
36
37
  inputIcon?: tailwind_merge.ClassNameValue;
37
- separator?: tailwind_merge.ClassNameValue;
38
38
  shortcut?: tailwind_merge.ClassNameValue;
39
39
  };
40
40
  };
@@ -64,9 +64,9 @@ declare const command: tailwind_variants.TVReturnType<{
64
64
  list?: tailwind_merge.ClassNameValue;
65
65
  empty?: tailwind_merge.ClassNameValue;
66
66
  group?: tailwind_merge.ClassNameValue;
67
+ separator?: tailwind_merge.ClassNameValue;
67
68
  inputWrapper?: tailwind_merge.ClassNameValue;
68
69
  inputIcon?: tailwind_merge.ClassNameValue;
69
- separator?: tailwind_merge.ClassNameValue;
70
70
  shortcut?: tailwind_merge.ClassNameValue;
71
71
  };
72
72
  };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  hoverCard
3
- } from "../chunk-XRKUQMGU.mjs";
4
- import "../chunk-5DOB3IBE.mjs";
3
+ } from "../chunk-UTCVHVWF.mjs";
4
+ import "../chunk-6IZPAS4O.mjs";
5
5
  export {
6
6
  hoverCard
7
7
  };
@@ -12,6 +12,7 @@ export { CheckboxVariantProps, checkbox } from './checkbox.mjs';
12
12
  export { ChipSlots, ChipVariantProps, chip } from './chip.mjs';
13
13
  export { CodeVariantProps, code } from './code.mjs';
14
14
  export { colorHighlightButton } from './color-highlight-button.mjs';
15
+ export { ComboboxVariantProps, combobox } from './combobox.mjs';
15
16
  export { CommandVariants, command } from './command.mjs';
16
17
  export { controlExtension } from './control-extension.mjs';
17
18
  export { DataGridVariants, datagrid } from './data-grid.mjs';
@@ -12,6 +12,7 @@ export { CheckboxVariantProps, checkbox } from './checkbox.js';
12
12
  export { ChipSlots, ChipVariantProps, chip } from './chip.js';
13
13
  export { CodeVariantProps, code } from './code.js';
14
14
  export { colorHighlightButton } from './color-highlight-button.js';
15
+ export { ComboboxVariantProps, combobox } from './combobox.js';
15
16
  export { CommandVariants, command } from './command.js';
16
17
  export { controlExtension } from './control-extension.js';
17
18
  export { DataGridVariants, datagrid } from './data-grid.js';