@stoa-dev/kit 0.0.0-stage → 0.1.1

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 (217) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +80 -2
  3. package/dist/hooks/index.js +7 -0
  4. package/dist/hooks/index.js.map +1 -0
  5. package/dist/hooks/useOnlineStatus/index.js +14 -0
  6. package/dist/hooks/useOnlineStatus/index.js.map +1 -0
  7. package/dist/hooks/useRouting/index.js +17 -0
  8. package/dist/hooks/useRouting/index.js.map +1 -0
  9. package/dist/i18n/index.js +30 -0
  10. package/dist/i18n/index.js.map +1 -0
  11. package/dist/i18n/locales/at.json.js +16 -0
  12. package/dist/i18n/locales/at.json.js.map +1 -0
  13. package/dist/i18n/locales/de.json.js +16 -0
  14. package/dist/i18n/locales/de.json.js.map +1 -0
  15. package/dist/i18n/locales/en.json.js +16 -0
  16. package/dist/i18n/locales/en.json.js.map +1 -0
  17. package/dist/i18n/locales/it.json.js +16 -0
  18. package/dist/i18n/locales/it.json.js.map +1 -0
  19. package/dist/i18n/namespace.js +5 -0
  20. package/dist/i18n/namespace.js.map +1 -0
  21. package/dist/kit.css +1 -0
  22. package/dist/licensing/LicenseActivation/index.js +101 -0
  23. package/dist/licensing/LicenseActivation/index.js.map +1 -0
  24. package/dist/licensing/LicenseCard/index.js +149 -0
  25. package/dist/licensing/LicenseCard/index.js.map +1 -0
  26. package/dist/licensing/LicenseGate/index.js +72 -0
  27. package/dist/licensing/LicenseGate/index.js.map +1 -0
  28. package/dist/licensing/LicenseProvider/index.js +137 -0
  29. package/dist/licensing/LicenseProvider/index.js.map +1 -0
  30. package/dist/licensing/LicenseStatusBanner/index.js +135 -0
  31. package/dist/licensing/LicenseStatusBanner/index.js.map +1 -0
  32. package/dist/licensing/api.js +57 -0
  33. package/dist/licensing/api.js.map +1 -0
  34. package/dist/licensing/index.js +23 -0
  35. package/dist/licensing/index.js.map +1 -0
  36. package/dist/shell/AppNavigation/AppNavigation.module.scss.js +16 -0
  37. package/dist/shell/AppNavigation/AppNavigation.module.scss.js.map +1 -0
  38. package/dist/shell/AppNavigation/index.js +136 -0
  39. package/dist/shell/AppNavigation/index.js.map +1 -0
  40. package/dist/shell/BackHomeButton/index.js +23 -0
  41. package/dist/shell/BackHomeButton/index.js.map +1 -0
  42. package/dist/shell/BrandLines/BrandLines.module.scss.js +10 -0
  43. package/dist/shell/BrandLines/BrandLines.module.scss.js.map +1 -0
  44. package/dist/shell/BrandLines/index.js +25 -0
  45. package/dist/shell/BrandLines/index.js.map +1 -0
  46. package/dist/shell/ConfirmDialog/index.js +53 -0
  47. package/dist/shell/ConfirmDialog/index.js.map +1 -0
  48. package/dist/shell/DatePicker/index.js +219 -0
  49. package/dist/shell/DatePicker/index.js.map +1 -0
  50. package/dist/shell/ErrorBoundary/index.js +29 -0
  51. package/dist/shell/ErrorBoundary/index.js.map +1 -0
  52. package/dist/shell/NativeSelect/index.js +24 -0
  53. package/dist/shell/NativeSelect/index.js.map +1 -0
  54. package/dist/shell/PageHeading/PageHeading.module.scss.js +8 -0
  55. package/dist/shell/PageHeading/PageHeading.module.scss.js.map +1 -0
  56. package/dist/shell/PageHeading/index.js +14 -0
  57. package/dist/shell/PageHeading/index.js.map +1 -0
  58. package/dist/shell/SectionNavigation/index.js +116 -0
  59. package/dist/shell/SectionNavigation/index.js.map +1 -0
  60. package/dist/shell/Spinner/index.js +16 -0
  61. package/dist/shell/Spinner/index.js.map +1 -0
  62. package/dist/shell/UploadButton/index.js +44 -0
  63. package/dist/shell/UploadButton/index.js.map +1 -0
  64. package/dist/shell/index.js +29 -0
  65. package/dist/shell/index.js.map +1 -0
  66. package/dist/types/hooks/index.d.ts +3 -0
  67. package/dist/types/hooks/index.d.ts.map +1 -0
  68. package/dist/types/hooks/useOnlineStatus/index.d.ts +2 -0
  69. package/dist/types/hooks/useOnlineStatus/index.d.ts.map +1 -0
  70. package/dist/types/hooks/useRouting/index.d.ts +14 -0
  71. package/dist/types/hooks/useRouting/index.d.ts.map +1 -0
  72. package/dist/types/i18n/index.d.ts +582 -0
  73. package/dist/types/i18n/index.d.ts.map +1 -0
  74. package/dist/types/i18n/namespace.d.ts +3 -0
  75. package/dist/types/i18n/namespace.d.ts.map +1 -0
  76. package/dist/types/licensing/LicenseActivation/index.d.ts +8 -0
  77. package/dist/types/licensing/LicenseActivation/index.d.ts.map +1 -0
  78. package/dist/types/licensing/LicenseCard/index.d.ts +2 -0
  79. package/dist/types/licensing/LicenseCard/index.d.ts.map +1 -0
  80. package/dist/types/licensing/LicenseGate/index.d.ts +11 -0
  81. package/dist/types/licensing/LicenseGate/index.d.ts.map +1 -0
  82. package/dist/types/licensing/LicenseProvider/index.d.ts +20 -0
  83. package/dist/types/licensing/LicenseProvider/index.d.ts.map +1 -0
  84. package/dist/types/licensing/LicenseStatusBanner/index.d.ts +4 -0
  85. package/dist/types/licensing/LicenseStatusBanner/index.d.ts.map +1 -0
  86. package/dist/types/licensing/api.d.ts +28 -0
  87. package/dist/types/licensing/api.d.ts.map +1 -0
  88. package/dist/types/licensing/index.d.ts +7 -0
  89. package/dist/types/licensing/index.d.ts.map +1 -0
  90. package/dist/types/shell/AppNavigation/index.d.ts +45 -0
  91. package/dist/types/shell/AppNavigation/index.d.ts.map +1 -0
  92. package/dist/types/shell/BackHomeButton/index.d.ts +7 -0
  93. package/dist/types/shell/BackHomeButton/index.d.ts.map +1 -0
  94. package/dist/types/shell/BrandLines/index.d.ts +6 -0
  95. package/dist/types/shell/BrandLines/index.d.ts.map +1 -0
  96. package/dist/types/shell/ConfirmDialog/index.d.ts +21 -0
  97. package/dist/types/shell/ConfirmDialog/index.d.ts.map +1 -0
  98. package/dist/types/shell/DatePicker/index.d.ts +14 -0
  99. package/dist/types/shell/DatePicker/index.d.ts.map +1 -0
  100. package/dist/types/shell/ErrorBoundary/index.d.ts +20 -0
  101. package/dist/types/shell/ErrorBoundary/index.d.ts.map +1 -0
  102. package/dist/types/shell/NativeSelect/index.d.ts +3 -0
  103. package/dist/types/shell/NativeSelect/index.d.ts.map +1 -0
  104. package/dist/types/shell/PageHeading/index.d.ts +9 -0
  105. package/dist/types/shell/PageHeading/index.d.ts.map +1 -0
  106. package/dist/types/shell/SectionNavigation/index.d.ts +12 -0
  107. package/dist/types/shell/SectionNavigation/index.d.ts.map +1 -0
  108. package/dist/types/shell/Spinner/index.d.ts +6 -0
  109. package/dist/types/shell/Spinner/index.d.ts.map +1 -0
  110. package/dist/types/shell/UploadButton/index.d.ts +6 -0
  111. package/dist/types/shell/UploadButton/index.d.ts.map +1 -0
  112. package/dist/types/shell/index.d.ts +12 -0
  113. package/dist/types/shell/index.d.ts.map +1 -0
  114. package/dist/types/ui/accordion/index.d.ts +8 -0
  115. package/dist/types/ui/accordion/index.d.ts.map +1 -0
  116. package/dist/types/ui/button/index.d.ts +11 -0
  117. package/dist/types/ui/button/index.d.ts.map +1 -0
  118. package/dist/types/ui/calendar/index.d.ts +11 -0
  119. package/dist/types/ui/calendar/index.d.ts.map +1 -0
  120. package/dist/types/ui/card/index.d.ts +12 -0
  121. package/dist/types/ui/card/index.d.ts.map +1 -0
  122. package/dist/types/ui/dialog/index.d.ts +18 -0
  123. package/dist/types/ui/dialog/index.d.ts.map +1 -0
  124. package/dist/types/ui/dropdown-menu/index.d.ts +30 -0
  125. package/dist/types/ui/dropdown-menu/index.d.ts.map +1 -0
  126. package/dist/types/ui/field/index.d.ts +25 -0
  127. package/dist/types/ui/field/index.d.ts.map +1 -0
  128. package/dist/types/ui/index.d.ts +21 -0
  129. package/dist/types/ui/index.d.ts.map +1 -0
  130. package/dist/types/ui/input/index.d.ts +4 -0
  131. package/dist/types/ui/input/index.d.ts.map +1 -0
  132. package/dist/types/ui/input-group/index.d.ts +17 -0
  133. package/dist/types/ui/input-group/index.d.ts.map +1 -0
  134. package/dist/types/ui/label/index.d.ts +5 -0
  135. package/dist/types/ui/label/index.d.ts.map +1 -0
  136. package/dist/types/ui/popover/index.d.ts +11 -0
  137. package/dist/types/ui/popover/index.d.ts.map +1 -0
  138. package/dist/types/ui/radio-group/index.d.ts +6 -0
  139. package/dist/types/ui/radio-group/index.d.ts.map +1 -0
  140. package/dist/types/ui/scroll-area/index.d.ts +6 -0
  141. package/dist/types/ui/scroll-area/index.d.ts.map +1 -0
  142. package/dist/types/ui/select/index.d.ts +16 -0
  143. package/dist/types/ui/select/index.d.ts.map +1 -0
  144. package/dist/types/ui/separator/index.d.ts +5 -0
  145. package/dist/types/ui/separator/index.d.ts.map +1 -0
  146. package/dist/types/ui/sonner/index.d.ts +4 -0
  147. package/dist/types/ui/sonner/index.d.ts.map +1 -0
  148. package/dist/types/ui/switch/index.d.ts +7 -0
  149. package/dist/types/ui/switch/index.d.ts.map +1 -0
  150. package/dist/types/ui/textarea/index.d.ts +4 -0
  151. package/dist/types/ui/textarea/index.d.ts.map +1 -0
  152. package/dist/types/ui/toggle/index.d.ts +10 -0
  153. package/dist/types/ui/toggle/index.d.ts.map +1 -0
  154. package/dist/types/ui/tooltip/index.d.ts +8 -0
  155. package/dist/types/ui/tooltip/index.d.ts.map +1 -0
  156. package/dist/types/utils/cn.d.ts +3 -0
  157. package/dist/types/utils/cn.d.ts.map +1 -0
  158. package/dist/types/utils/colors.d.ts +3 -0
  159. package/dist/types/utils/colors.d.ts.map +1 -0
  160. package/dist/types/utils/dates.d.ts +9 -0
  161. package/dist/types/utils/dates.d.ts.map +1 -0
  162. package/dist/types/utils/index.d.ts +4 -0
  163. package/dist/types/utils/index.d.ts.map +1 -0
  164. package/dist/ui/accordion/index.js +65 -0
  165. package/dist/ui/accordion/index.js.map +1 -0
  166. package/dist/ui/button/index.js +57 -0
  167. package/dist/ui/button/index.js.map +1 -0
  168. package/dist/ui/calendar/index.js +179 -0
  169. package/dist/ui/calendar/index.js.map +1 -0
  170. package/dist/ui/card/index.js +102 -0
  171. package/dist/ui/card/index.js.map +1 -0
  172. package/dist/ui/dialog/index.js +158 -0
  173. package/dist/ui/dialog/index.js.map +1 -0
  174. package/dist/ui/dropdown-menu/index.js +252 -0
  175. package/dist/ui/dropdown-menu/index.js.map +1 -0
  176. package/dist/ui/field/index.js +209 -0
  177. package/dist/ui/field/index.js.map +1 -0
  178. package/dist/ui/index.js +112 -0
  179. package/dist/ui/index.js.map +1 -0
  180. package/dist/ui/input/index.js +20 -0
  181. package/dist/ui/input/index.js.map +1 -0
  182. package/dist/ui/input-group/index.js +143 -0
  183. package/dist/ui/input-group/index.js.map +1 -0
  184. package/dist/ui/label/index.js +23 -0
  185. package/dist/ui/label/index.js.map +1 -0
  186. package/dist/ui/popover/index.js +81 -0
  187. package/dist/ui/popover/index.js.map +1 -0
  188. package/dist/ui/radio-group/index.js +45 -0
  189. package/dist/ui/radio-group/index.js.map +1 -0
  190. package/dist/ui/scroll-area/index.js +60 -0
  191. package/dist/ui/scroll-area/index.js.map +1 -0
  192. package/dist/ui/select/index.js +182 -0
  193. package/dist/ui/select/index.js.map +1 -0
  194. package/dist/ui/separator/index.js +27 -0
  195. package/dist/ui/separator/index.js.map +1 -0
  196. package/dist/ui/sonner/index.js +37 -0
  197. package/dist/ui/sonner/index.js.map +1 -0
  198. package/dist/ui/switch/index.js +32 -0
  199. package/dist/ui/switch/index.js.map +1 -0
  200. package/dist/ui/textarea/index.js +19 -0
  201. package/dist/ui/textarea/index.js.map +1 -0
  202. package/dist/ui/toggle/index.js +44 -0
  203. package/dist/ui/toggle/index.js.map +1 -0
  204. package/dist/ui/tooltip/index.js +56 -0
  205. package/dist/ui/tooltip/index.js.map +1 -0
  206. package/dist/utils/cn.js +9 -0
  207. package/dist/utils/cn.js.map +1 -0
  208. package/dist/utils/colors.js +8 -0
  209. package/dist/utils/colors.js.map +1 -0
  210. package/dist/utils/dates.js +28 -0
  211. package/dist/utils/dates.js.map +1 -0
  212. package/dist/utils/index.js +12 -0
  213. package/dist/utils/index.js.map +1 -0
  214. package/package.json +121 -4
  215. package/scss/_index.scss +4 -0
  216. package/scss/_tools.scss +21 -0
  217. package/styles/theme.css +192 -0
@@ -0,0 +1,182 @@
1
+ import { jsx as t, jsxs as i } from "react/jsx-runtime";
2
+ import { CheckIcon as c, ChevronDownIcon as l, ChevronUpIcon as u } from "lucide-react";
3
+ import { Select as r } from "radix-ui";
4
+ import { cn as o } from "../../utils/cn.js";
5
+ function b({
6
+ ...e
7
+ }) {
8
+ return /* @__PURE__ */ t(r.Root, { "data-slot": "select", ...e });
9
+ }
10
+ function x({
11
+ className: e,
12
+ ...a
13
+ }) {
14
+ return /* @__PURE__ */ t(
15
+ r.Group,
16
+ {
17
+ "data-slot": "select-group",
18
+ className: o("scroll-my-1 p-1", e),
19
+ ...a
20
+ }
21
+ );
22
+ }
23
+ function z({
24
+ ...e
25
+ }) {
26
+ return /* @__PURE__ */ t(r.Value, { "data-slot": "select-value", ...e });
27
+ }
28
+ function w({
29
+ className: e,
30
+ size: a = "default",
31
+ children: n,
32
+ ...s
33
+ }) {
34
+ return /* @__PURE__ */ i(
35
+ r.Trigger,
36
+ {
37
+ "data-slot": "select-trigger",
38
+ "data-size": a,
39
+ className: o(
40
+ "flex w-fit items-center justify-between gap-1.5 rounded-lg border border-input bg-background/70 py-2 pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-12 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-background/40 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
41
+ e
42
+ ),
43
+ ...s,
44
+ children: [
45
+ n,
46
+ /* @__PURE__ */ t(r.Icon, { asChild: !0, children: /* @__PURE__ */ t(l, { className: "pointer-events-none size-4 text-muted-foreground" }) })
47
+ ]
48
+ }
49
+ );
50
+ }
51
+ function S({
52
+ className: e,
53
+ children: a,
54
+ position: n = "item-aligned",
55
+ align: s = "center",
56
+ ...d
57
+ }) {
58
+ return /* @__PURE__ */ t(r.Portal, { children: /* @__PURE__ */ i(
59
+ r.Content,
60
+ {
61
+ "data-slot": "select-content",
62
+ "data-align-trigger": n === "item-aligned",
63
+ className: o(
64
+ "relative z-50 max-h-(--radix-select-content-available-height) min-w-36 origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
65
+ n === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
66
+ e
67
+ ),
68
+ position: n,
69
+ align: s,
70
+ ...d,
71
+ children: [
72
+ /* @__PURE__ */ t(p, {}),
73
+ /* @__PURE__ */ t(
74
+ r.Viewport,
75
+ {
76
+ "data-position": n,
77
+ className: o(
78
+ "data-[position=popper]:h-(--radix-select-trigger-height) data-[position=popper]:w-full data-[position=popper]:min-w-(--radix-select-trigger-width)",
79
+ n === "popper" && ""
80
+ ),
81
+ children: a
82
+ }
83
+ ),
84
+ /* @__PURE__ */ t(g, {})
85
+ ]
86
+ }
87
+ ) });
88
+ }
89
+ function y({
90
+ className: e,
91
+ ...a
92
+ }) {
93
+ return /* @__PURE__ */ t(
94
+ r.Label,
95
+ {
96
+ "data-slot": "select-label",
97
+ className: o("px-1.5 py-1 text-xs text-muted-foreground", e),
98
+ ...a
99
+ }
100
+ );
101
+ }
102
+ function N({
103
+ className: e,
104
+ children: a,
105
+ ...n
106
+ }) {
107
+ return /* @__PURE__ */ i(
108
+ r.Item,
109
+ {
110
+ "data-slot": "select-item",
111
+ className: o(
112
+ "relative flex w-full cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
113
+ e
114
+ ),
115
+ ...n,
116
+ children: [
117
+ /* @__PURE__ */ t("span", { className: "pointer-events-none absolute right-2 flex size-4 items-center justify-center", children: /* @__PURE__ */ t(r.ItemIndicator, { children: /* @__PURE__ */ t(c, { className: "pointer-events-none" }) }) }),
118
+ /* @__PURE__ */ t(r.ItemText, { children: a })
119
+ ]
120
+ }
121
+ );
122
+ }
123
+ function k({
124
+ className: e,
125
+ ...a
126
+ }) {
127
+ return /* @__PURE__ */ t(
128
+ r.Separator,
129
+ {
130
+ "data-slot": "select-separator",
131
+ className: o("pointer-events-none -mx-1 my-2 h-px bg-border", e),
132
+ ...a
133
+ }
134
+ );
135
+ }
136
+ function p({
137
+ className: e,
138
+ ...a
139
+ }) {
140
+ return /* @__PURE__ */ t(
141
+ r.ScrollUpButton,
142
+ {
143
+ "data-slot": "select-scroll-up-button",
144
+ className: o(
145
+ "z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",
146
+ e
147
+ ),
148
+ ...a,
149
+ children: /* @__PURE__ */ t(u, {})
150
+ }
151
+ );
152
+ }
153
+ function g({
154
+ className: e,
155
+ ...a
156
+ }) {
157
+ return /* @__PURE__ */ t(
158
+ r.ScrollDownButton,
159
+ {
160
+ "data-slot": "select-scroll-down-button",
161
+ className: o(
162
+ "z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4",
163
+ e
164
+ ),
165
+ ...a,
166
+ children: /* @__PURE__ */ t(l, {})
167
+ }
168
+ );
169
+ }
170
+ export {
171
+ b as Select,
172
+ S as SelectContent,
173
+ x as SelectGroup,
174
+ N as SelectItem,
175
+ y as SelectLabel,
176
+ g as SelectScrollDownButton,
177
+ p as SelectScrollUpButton,
178
+ k as SelectSeparator,
179
+ w as SelectTrigger,
180
+ z as SelectValue
181
+ };
182
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../src/ui/select/index.tsx"],"sourcesContent":["import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from 'lucide-react'\nimport { Select as SelectPrimitive } from 'radix-ui'\nimport type * as React from 'react'\nimport { cn } from '../../utils/cn'\n\nfunction Select({\n\t...props\n}: React.ComponentProps<typeof SelectPrimitive.Root>) {\n\treturn <SelectPrimitive.Root data-slot='select' {...props} />\n}\n\nfunction SelectGroup({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof SelectPrimitive.Group>) {\n\treturn (\n\t\t<SelectPrimitive.Group\n\t\t\tdata-slot='select-group'\n\t\t\tclassName={cn('scroll-my-1 p-1', className)}\n\t\t\t{...props}\n\t\t/>\n\t)\n}\n\nfunction SelectValue({\n\t...props\n}: React.ComponentProps<typeof SelectPrimitive.Value>) {\n\treturn <SelectPrimitive.Value data-slot='select-value' {...props} />\n}\n\nfunction SelectTrigger({\n\tclassName,\n\tsize = 'default',\n\tchildren,\n\t...props\n}: React.ComponentProps<typeof SelectPrimitive.Trigger> & {\n\tsize?: 'sm' | 'default'\n}) {\n\treturn (\n\t\t<SelectPrimitive.Trigger\n\t\t\tdata-slot='select-trigger'\n\t\t\tdata-size={size}\n\t\t\tclassName={cn(\n\t\t\t\t\"flex w-fit items-center justify-between gap-1.5 rounded-lg border border-input bg-background/70 py-2 pr-2 pl-2.5 text-sm whitespace-nowrap transition-colors outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-12 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-background/40 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{children}\n\t\t\t<SelectPrimitive.Icon asChild>\n\t\t\t\t<ChevronDownIcon className='pointer-events-none size-4 text-muted-foreground' />\n\t\t\t</SelectPrimitive.Icon>\n\t\t</SelectPrimitive.Trigger>\n\t)\n}\n\nfunction SelectContent({\n\tclassName,\n\tchildren,\n\tposition = 'item-aligned',\n\talign = 'center',\n\t...props\n}: React.ComponentProps<typeof SelectPrimitive.Content>) {\n\treturn (\n\t\t<SelectPrimitive.Portal>\n\t\t\t<SelectPrimitive.Content\n\t\t\t\tdata-slot='select-content'\n\t\t\t\tdata-align-trigger={position === 'item-aligned'}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'relative z-50 max-h-(--radix-select-content-available-height) min-w-36 origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95',\n\t\t\t\t\tposition === 'popper' &&\n\t\t\t\t\t\t'data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1',\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\tposition={position}\n\t\t\t\talign={align}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t<SelectScrollUpButton />\n\t\t\t\t<SelectPrimitive.Viewport\n\t\t\t\t\tdata-position={position}\n\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t'data-[position=popper]:h-(--radix-select-trigger-height) data-[position=popper]:w-full data-[position=popper]:min-w-(--radix-select-trigger-width)',\n\t\t\t\t\t\tposition === 'popper' && '',\n\t\t\t\t\t)}\n\t\t\t\t>\n\t\t\t\t\t{children}\n\t\t\t\t</SelectPrimitive.Viewport>\n\t\t\t\t<SelectScrollDownButton />\n\t\t\t</SelectPrimitive.Content>\n\t\t</SelectPrimitive.Portal>\n\t)\n}\n\nfunction SelectLabel({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof SelectPrimitive.Label>) {\n\treturn (\n\t\t<SelectPrimitive.Label\n\t\t\tdata-slot='select-label'\n\t\t\tclassName={cn('px-1.5 py-1 text-xs text-muted-foreground', className)}\n\t\t\t{...props}\n\t\t/>\n\t)\n}\n\nfunction SelectItem({\n\tclassName,\n\tchildren,\n\t...props\n}: React.ComponentProps<typeof SelectPrimitive.Item>) {\n\treturn (\n\t\t<SelectPrimitive.Item\n\t\t\tdata-slot='select-item'\n\t\t\tclassName={cn(\n\t\t\t\t\"relative flex w-full cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<span className='pointer-events-none absolute right-2 flex size-4 items-center justify-center'>\n\t\t\t\t<SelectPrimitive.ItemIndicator>\n\t\t\t\t\t<CheckIcon className='pointer-events-none' />\n\t\t\t\t</SelectPrimitive.ItemIndicator>\n\t\t\t</span>\n\t\t\t<SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n\t\t</SelectPrimitive.Item>\n\t)\n}\n\nfunction SelectSeparator({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof SelectPrimitive.Separator>) {\n\treturn (\n\t\t<SelectPrimitive.Separator\n\t\t\tdata-slot='select-separator'\n\t\t\tclassName={cn('pointer-events-none -mx-1 my-2 h-px bg-border', className)}\n\t\t\t{...props}\n\t\t/>\n\t)\n}\n\nfunction SelectScrollUpButton({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>) {\n\treturn (\n\t\t<SelectPrimitive.ScrollUpButton\n\t\t\tdata-slot='select-scroll-up-button'\n\t\t\tclassName={cn(\n\t\t\t\t\"z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<ChevronUpIcon />\n\t\t</SelectPrimitive.ScrollUpButton>\n\t)\n}\n\nfunction SelectScrollDownButton({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof SelectPrimitive.ScrollDownButton>) {\n\treturn (\n\t\t<SelectPrimitive.ScrollDownButton\n\t\t\tdata-slot='select-scroll-down-button'\n\t\t\tclassName={cn(\n\t\t\t\t\"z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<ChevronDownIcon />\n\t\t</SelectPrimitive.ScrollDownButton>\n\t)\n}\n\nexport {\n\tSelect,\n\tSelectContent,\n\tSelectGroup,\n\tSelectItem,\n\tSelectLabel,\n\tSelectScrollDownButton,\n\tSelectScrollUpButton,\n\tSelectSeparator,\n\tSelectTrigger,\n\tSelectValue,\n}\n"],"names":["Select","props","SelectPrimitive","SelectGroup","className","jsx","cn","SelectValue","SelectTrigger","size","children","jsxs","ChevronDownIcon","SelectContent","position","align","SelectScrollUpButton","SelectScrollDownButton","SelectLabel","SelectItem","CheckIcon","SelectSeparator","ChevronUpIcon"],"mappings":"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"}
@@ -0,0 +1,27 @@
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import { Separator as i } from "radix-ui";
3
+ import { cn as d } from "../../utils/cn.js";
4
+ function n({
5
+ className: r,
6
+ orientation: a = "horizontal",
7
+ decorative: t = !0,
8
+ ...o
9
+ }) {
10
+ return /* @__PURE__ */ e(
11
+ i.Root,
12
+ {
13
+ "data-slot": "separator",
14
+ decorative: t,
15
+ orientation: a,
16
+ className: d(
17
+ "shrink-0 bg-border data-horizontal:my-2 data-vertical:mx-2 data-horizontal:h-(--ui-border-width) data-horizontal:w-full data-vertical:w-(--ui-border-width) data-vertical:self-stretch",
18
+ r
19
+ ),
20
+ ...o
21
+ }
22
+ );
23
+ }
24
+ export {
25
+ n as Separator
26
+ };
27
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../src/ui/separator/index.tsx"],"sourcesContent":["'use client'\n\nimport { Separator as SeparatorPrimitive } from 'radix-ui'\nimport type * as React from 'react'\n\nimport { cn } from '../../utils/cn'\n\nfunction Separator({\n\tclassName,\n\torientation = 'horizontal',\n\tdecorative = true,\n\t...props\n}: React.ComponentProps<typeof SeparatorPrimitive.Root>) {\n\treturn (\n\t\t<SeparatorPrimitive.Root\n\t\t\tdata-slot='separator'\n\t\t\tdecorative={decorative}\n\t\t\torientation={orientation}\n\t\t\tclassName={cn(\n\t\t\t\t'shrink-0 bg-border data-horizontal:my-2 data-vertical:mx-2 data-horizontal:h-(--ui-border-width) data-horizontal:w-full data-vertical:w-(--ui-border-width) data-vertical:self-stretch',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t)\n}\n\nexport { Separator }\n"],"names":["Separator","className","orientation","decorative","props","jsx","SeparatorPrimitive","cn"],"mappings":";;;AAOA,SAASA,EAAU;AAAA,EAClB,WAAAC;AAAA,EACA,aAAAC,IAAc;AAAA,EACd,YAAAC,IAAa;AAAA,EACb,GAAGC;AACJ,GAAyD;AACxD,SACC,gBAAAC;AAAA,IAACC,EAAmB;AAAA,IAAnB;AAAA,MACA,aAAU;AAAA,MACV,YAAAH;AAAA,MACA,aAAAD;AAAA,MACA,WAAWK;AAAA,QACV;AAAA,QACAN;AAAA,MAAA;AAAA,MAEA,GAAGG;AAAA,IAAA;AAAA,EAAA;AAGP;"}
@@ -0,0 +1,37 @@
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import { Loader2Icon as e, OctagonXIcon as a, TriangleAlertIcon as t, InfoIcon as n, CircleCheckIcon as m } from "lucide-react";
3
+ import { useTheme as c } from "next-themes";
4
+ import { Toaster as i } from "sonner";
5
+ const g = ({ ...r }) => {
6
+ const { theme: s = "system" } = c();
7
+ return /* @__PURE__ */ o(
8
+ i,
9
+ {
10
+ theme: s,
11
+ className: "toaster group",
12
+ icons: {
13
+ success: /* @__PURE__ */ o(m, { className: "size-4" }),
14
+ info: /* @__PURE__ */ o(n, { className: "size-4" }),
15
+ warning: /* @__PURE__ */ o(t, { className: "size-4" }),
16
+ error: /* @__PURE__ */ o(a, { className: "size-4" }),
17
+ loading: /* @__PURE__ */ o(e, { className: "size-4 animate-spin" })
18
+ },
19
+ style: {
20
+ "--normal-bg": "var(--popover)",
21
+ "--normal-text": "var(--popover-foreground)",
22
+ "--normal-border": "var(--border)",
23
+ "--border-radius": "var(--radius)"
24
+ },
25
+ toastOptions: {
26
+ classNames: {
27
+ toast: "cn-toast"
28
+ }
29
+ },
30
+ ...r
31
+ }
32
+ );
33
+ };
34
+ export {
35
+ g as Toaster
36
+ };
37
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../src/ui/sonner/index.tsx"],"sourcesContent":["import {\n\tCircleCheckIcon,\n\tInfoIcon,\n\tLoader2Icon,\n\tOctagonXIcon,\n\tTriangleAlertIcon,\n} from 'lucide-react'\nimport { useTheme } from 'next-themes'\nimport { Toaster as Sonner, type ToasterProps } from 'sonner'\n\nconst Toaster = ({ ...props }: ToasterProps) => {\n\tconst { theme = 'system' } = useTheme()\n\n\treturn (\n\t\t<Sonner\n\t\t\ttheme={theme as ToasterProps['theme']}\n\t\t\tclassName='toaster group'\n\t\t\ticons={{\n\t\t\t\tsuccess: <CircleCheckIcon className='size-4' />,\n\t\t\t\tinfo: <InfoIcon className='size-4' />,\n\t\t\t\twarning: <TriangleAlertIcon className='size-4' />,\n\t\t\t\terror: <OctagonXIcon className='size-4' />,\n\t\t\t\tloading: <Loader2Icon className='size-4 animate-spin' />,\n\t\t\t}}\n\t\t\tstyle={\n\t\t\t\t{\n\t\t\t\t\t'--normal-bg': 'var(--popover)',\n\t\t\t\t\t'--normal-text': 'var(--popover-foreground)',\n\t\t\t\t\t'--normal-border': 'var(--border)',\n\t\t\t\t\t'--border-radius': 'var(--radius)',\n\t\t\t\t} as React.CSSProperties\n\t\t\t}\n\t\t\ttoastOptions={{\n\t\t\t\tclassNames: {\n\t\t\t\t\ttoast: 'cn-toast',\n\t\t\t\t},\n\t\t\t}}\n\t\t\t{...props}\n\t\t/>\n\t)\n}\n\nexport { Toaster }\n"],"names":["Toaster","props","theme","useTheme","jsx","Sonner","CircleCheckIcon","InfoIcon","TriangleAlertIcon","OctagonXIcon","Loader2Icon"],"mappings":";;;;AAUA,MAAMA,IAAU,CAAC,EAAE,GAAGC,QAA0B;AAC/C,QAAM,EAAE,OAAAC,IAAQ,SAAA,IAAaC,EAAA;AAE7B,SACC,gBAAAC;AAAA,IAACC;AAAAA,IAAA;AAAA,MACA,OAAAH;AAAA,MACA,WAAU;AAAA,MACV,OAAO;AAAA,QACN,SAAS,gBAAAE,EAACE,GAAA,EAAgB,WAAU,SAAA,CAAS;AAAA,QAC7C,MAAM,gBAAAF,EAACG,GAAA,EAAS,WAAU,SAAA,CAAS;AAAA,QACnC,SAAS,gBAAAH,EAACI,GAAA,EAAkB,WAAU,SAAA,CAAS;AAAA,QAC/C,OAAO,gBAAAJ,EAACK,GAAA,EAAa,WAAU,SAAA,CAAS;AAAA,QACxC,SAAS,gBAAAL,EAACM,GAAA,EAAY,WAAU,sBAAA,CAAsB;AAAA,MAAA;AAAA,MAEvD,OACC;AAAA,QACC,eAAe;AAAA,QACf,iBAAiB;AAAA,QACjB,mBAAmB;AAAA,QACnB,mBAAmB;AAAA,MAAA;AAAA,MAGrB,cAAc;AAAA,QACb,YAAY;AAAA,UACX,OAAO;AAAA,QAAA;AAAA,MACR;AAAA,MAEA,GAAGT;AAAA,IAAA;AAAA,EAAA;AAGP;"}
@@ -0,0 +1,32 @@
1
+ import { jsx as a } from "react/jsx-runtime";
2
+ import { Switch as t } from "radix-ui";
3
+ import { cn as d } from "../../utils/cn.js";
4
+ function o({
5
+ className: e,
6
+ size: i = "default",
7
+ ...r
8
+ }) {
9
+ return /* @__PURE__ */ a(
10
+ t.Root,
11
+ {
12
+ "data-slot": "switch",
13
+ "data-size": i,
14
+ className: d(
15
+ "peer group/switch relative inline-flex shrink-0 items-center rounded-full border border-transparent transition-all outline-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=default]:h-[18.4px] data-[size=default]:w-8 data-[size=sm]:h-3.5 data-[size=sm]:w-6 data-[size=lg]:h-[23.5px] data-[size=lg]:w-[41px] dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:bg-primary data-unchecked:bg-input dark:data-unchecked:bg-input/80 data-disabled:cursor-not-allowed data-disabled:opacity-50",
16
+ e
17
+ ),
18
+ ...r,
19
+ children: /* @__PURE__ */ a(
20
+ t.Thumb,
21
+ {
22
+ "data-slot": "switch-thumb",
23
+ className: "pointer-events-none block rounded-full bg-background ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=lg]/switch:size-5 group-data-[size=default]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=sm]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=lg]/switch:data-checked:translate-x-[calc(100%-2px)] dark:data-checked:bg-primary-foreground group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0 dark:data-unchecked:bg-foreground"
24
+ }
25
+ )
26
+ }
27
+ );
28
+ }
29
+ export {
30
+ o as Switch
31
+ };
32
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../src/ui/switch/index.tsx"],"sourcesContent":["'use client'\n\nimport { Switch as SwitchPrimitive } from 'radix-ui'\nimport type * as React from 'react'\n\nimport { cn } from '../../utils/cn'\n\nfunction Switch({\n\tclassName,\n\tsize = 'default',\n\t...props\n}: React.ComponentProps<typeof SwitchPrimitive.Root> & {\n\tsize?: 'sm' | 'lg' | 'default'\n}) {\n\treturn (\n\t\t<SwitchPrimitive.Root\n\t\t\tdata-slot='switch'\n\t\t\tdata-size={size}\n\t\t\tclassName={cn(\n\t\t\t\t'peer group/switch relative inline-flex shrink-0 items-center rounded-full border border-transparent transition-all outline-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=default]:h-[18.4px] data-[size=default]:w-8 data-[size=sm]:h-3.5 data-[size=sm]:w-6 data-[size=lg]:h-[23.5px] data-[size=lg]:w-[41px] dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:bg-primary data-unchecked:bg-input dark:data-unchecked:bg-input/80 data-disabled:cursor-not-allowed data-disabled:opacity-50',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<SwitchPrimitive.Thumb\n\t\t\t\tdata-slot='switch-thumb'\n\t\t\t\tclassName='pointer-events-none block rounded-full bg-background ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=lg]/switch:size-5 group-data-[size=default]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=sm]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=lg]/switch:data-checked:translate-x-[calc(100%-2px)] dark:data-checked:bg-primary-foreground group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0 dark:data-unchecked:bg-foreground'\n\t\t\t/>\n\t\t</SwitchPrimitive.Root>\n\t)\n}\n\nexport { Switch }\n"],"names":["Switch","className","size","props","jsx","SwitchPrimitive","cn"],"mappings":";;;AAOA,SAASA,EAAO;AAAA,EACf,WAAAC;AAAA,EACA,MAAAC,IAAO;AAAA,EACP,GAAGC;AACJ,GAEG;AACF,SACC,gBAAAC;AAAA,IAACC,EAAgB;AAAA,IAAhB;AAAA,MACA,aAAU;AAAA,MACV,aAAWH;AAAA,MACX,WAAWI;AAAA,QACV;AAAA,QACAL;AAAA,MAAA;AAAA,MAEA,GAAGE;AAAA,MAEJ,UAAA,gBAAAC;AAAA,QAACC,EAAgB;AAAA,QAAhB;AAAA,UACA,aAAU;AAAA,UACV,WAAU;AAAA,QAAA;AAAA,MAAA;AAAA,IACX;AAAA,EAAA;AAGH;"}
@@ -0,0 +1,19 @@
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import { cn as a } from "../../utils/cn.js";
3
+ function n({ className: i, ...r }) {
4
+ return /* @__PURE__ */ e(
5
+ "textarea",
6
+ {
7
+ "data-slot": "textarea",
8
+ className: a(
9
+ "flex field-sizing-content min-h-16 w-full rounded-lg border border-input bg-background/70 px-3 py-2 text-sm transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:bg-background/40 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",
10
+ i
11
+ ),
12
+ ...r
13
+ }
14
+ );
15
+ }
16
+ export {
17
+ n as Textarea
18
+ };
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../src/ui/textarea/index.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { cn } from '../../utils/cn'\n\nfunction Textarea({ className, ...props }: React.ComponentProps<'textarea'>) {\n\treturn (\n\t\t<textarea\n\t\t\tdata-slot='textarea'\n\t\t\tclassName={cn(\n\t\t\t\t'flex field-sizing-content min-h-16 w-full rounded-lg border border-input bg-background/70 px-3 py-2 text-sm transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:bg-background/40 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t)\n}\n\nexport { Textarea }\n"],"names":["Textarea","className","props","jsx","cn"],"mappings":";;AAIA,SAASA,EAAS,EAAE,WAAAC,GAAW,GAAGC,KAA2C;AAC5E,SACC,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACA,aAAU;AAAA,MACV,WAAWC;AAAA,QACV;AAAA,QACAH;AAAA,MAAA;AAAA,MAEA,GAAGC;AAAA,IAAA;AAAA,EAAA;AAGP;"}
@@ -0,0 +1,44 @@
1
+ import { jsx as n } from "react/jsx-runtime";
2
+ import { cva as r } from "class-variance-authority";
3
+ import { Toggle as s } from "radix-ui";
4
+ import { cn as o } from "../../utils/cn.js";
5
+ const d = r(
6
+ "group/toggle inline-flex items-center justify-center gap-1 rounded-full text-sm font-medium whitespace-nowrap transition-all outline-none hover:bg-muted hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-pressed:bg-(--accent-wash) data-[state=on]:bg-(--accent-wash) dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
7
+ {
8
+ variants: {
9
+ variant: {
10
+ default: "bg-transparent",
11
+ outline: "border border-input bg-transparent hover:bg-muted"
12
+ },
13
+ size: {
14
+ default: "h-8 min-w-8 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",
15
+ sm: "h-7 min-w-7 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",
16
+ lg: "h-9 min-w-9 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2"
17
+ }
18
+ },
19
+ defaultVariants: {
20
+ variant: "default",
21
+ size: "default"
22
+ }
23
+ }
24
+ );
25
+ function p({
26
+ className: e,
27
+ variant: i = "default",
28
+ size: a = "default",
29
+ ...t
30
+ }) {
31
+ return /* @__PURE__ */ n(
32
+ s.Root,
33
+ {
34
+ "data-slot": "toggle",
35
+ className: o(d({ variant: i, size: a, className: e })),
36
+ ...t
37
+ }
38
+ );
39
+ }
40
+ export {
41
+ p as Toggle,
42
+ d as toggleVariants
43
+ };
44
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../src/ui/toggle/index.tsx"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority'\nimport { Toggle as TogglePrimitive } from 'radix-ui'\nimport type * as React from 'react'\n\nimport { cn } from '../../utils/cn'\n\nconst toggleVariants = cva(\n\t\"group/toggle inline-flex items-center justify-center gap-1 rounded-full text-sm font-medium whitespace-nowrap transition-all outline-none hover:bg-muted hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-pressed:bg-(--accent-wash) data-[state=on]:bg-(--accent-wash) dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n\t{\n\t\tvariants: {\n\t\t\tvariant: {\n\t\t\t\tdefault: 'bg-transparent',\n\t\t\t\toutline: 'border border-input bg-transparent hover:bg-muted',\n\t\t\t},\n\t\t\tsize: {\n\t\t\t\tdefault:\n\t\t\t\t\t'h-8 min-w-8 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2',\n\t\t\t\tsm: \"h-7 min-w-7 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5\",\n\t\t\t\tlg: 'h-9 min-w-9 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2',\n\t\t\t},\n\t\t},\n\t\tdefaultVariants: {\n\t\t\tvariant: 'default',\n\t\t\tsize: 'default',\n\t\t},\n\t},\n)\n\nfunction Toggle({\n\tclassName,\n\tvariant = 'default',\n\tsize = 'default',\n\t...props\n}: React.ComponentProps<typeof TogglePrimitive.Root> &\n\tVariantProps<typeof toggleVariants>) {\n\treturn (\n\t\t<TogglePrimitive.Root\n\t\t\tdata-slot='toggle'\n\t\t\tclassName={cn(toggleVariants({ variant, size, className }))}\n\t\t\t{...props}\n\t\t/>\n\t)\n}\n\nexport { Toggle, toggleVariants }\n"],"names":["toggleVariants","cva","Toggle","className","variant","size","props","jsx","TogglePrimitive","cn"],"mappings":";;;;AAMA,MAAMA,IAAiBC;AAAA,EACtB;AAAA,EACA;AAAA,IACC,UAAU;AAAA,MACT,SAAS;AAAA,QACR,SAAS;AAAA,QACT,SAAS;AAAA,MAAA;AAAA,MAEV,MAAM;AAAA,QACL,SACC;AAAA,QACD,IAAI;AAAA,QACJ,IAAI;AAAA,MAAA;AAAA,IACL;AAAA,IAED,iBAAiB;AAAA,MAChB,SAAS;AAAA,MACT,MAAM;AAAA,IAAA;AAAA,EACP;AAEF;AAEA,SAASC,EAAO;AAAA,EACf,WAAAC;AAAA,EACA,SAAAC,IAAU;AAAA,EACV,MAAAC,IAAO;AAAA,EACP,GAAGC;AACJ,GACsC;AACrC,SACC,gBAAAC;AAAA,IAACC,EAAgB;AAAA,IAAhB;AAAA,MACA,aAAU;AAAA,MACV,WAAWC,EAAGT,EAAe,EAAE,SAAAI,GAAS,MAAAC,GAAM,WAAAF,EAAA,CAAW,CAAC;AAAA,MACzD,GAAGG;AAAA,IAAA;AAAA,EAAA;AAGP;"}
@@ -0,0 +1,56 @@
1
+ import { jsx as a, jsxs as r } from "react/jsx-runtime";
2
+ import { Tooltip as o } from "radix-ui";
3
+ import { cn as n } from "../../utils/cn.js";
4
+ function m({
5
+ delayDuration: t = 0,
6
+ ...e
7
+ }) {
8
+ return /* @__PURE__ */ a(
9
+ o.Provider,
10
+ {
11
+ "data-slot": "tooltip-provider",
12
+ delayDuration: t,
13
+ ...e
14
+ }
15
+ );
16
+ }
17
+ function f({
18
+ ...t
19
+ }) {
20
+ return /* @__PURE__ */ a(o.Root, { "data-slot": "tooltip", ...t });
21
+ }
22
+ function c({
23
+ ...t
24
+ }) {
25
+ return /* @__PURE__ */ a(o.Trigger, { "data-slot": "tooltip-trigger", ...t });
26
+ }
27
+ function u({
28
+ className: t,
29
+ sideOffset: e = 0,
30
+ children: d,
31
+ ...i
32
+ }) {
33
+ return /* @__PURE__ */ a(o.Portal, { children: /* @__PURE__ */ r(
34
+ o.Content,
35
+ {
36
+ "data-slot": "tooltip-content",
37
+ sideOffset: e,
38
+ className: n(
39
+ "z-50 inline-flex w-fit max-w-xs origin-(--radix-tooltip-content-transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
40
+ t
41
+ ),
42
+ ...i,
43
+ children: [
44
+ d,
45
+ /* @__PURE__ */ a(o.Arrow, { className: "z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground" })
46
+ ]
47
+ }
48
+ ) });
49
+ }
50
+ export {
51
+ f as Tooltip,
52
+ u as TooltipContent,
53
+ m as TooltipProvider,
54
+ c as TooltipTrigger
55
+ };
56
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../src/ui/tooltip/index.tsx"],"sourcesContent":["import { Tooltip as TooltipPrimitive } from 'radix-ui'\nimport type * as React from 'react'\n\nimport { cn } from '../../utils/cn'\n\nfunction TooltipProvider({\n\tdelayDuration = 0,\n\t...props\n}: React.ComponentProps<typeof TooltipPrimitive.Provider>) {\n\treturn (\n\t\t<TooltipPrimitive.Provider\n\t\t\tdata-slot='tooltip-provider'\n\t\t\tdelayDuration={delayDuration}\n\t\t\t{...props}\n\t\t/>\n\t)\n}\n\nfunction Tooltip({\n\t...props\n}: React.ComponentProps<typeof TooltipPrimitive.Root>) {\n\treturn <TooltipPrimitive.Root data-slot='tooltip' {...props} />\n}\n\nfunction TooltipTrigger({\n\t...props\n}: React.ComponentProps<typeof TooltipPrimitive.Trigger>) {\n\treturn <TooltipPrimitive.Trigger data-slot='tooltip-trigger' {...props} />\n}\n\nfunction TooltipContent({\n\tclassName,\n\tsideOffset = 0,\n\tchildren,\n\t...props\n}: React.ComponentProps<typeof TooltipPrimitive.Content>) {\n\treturn (\n\t\t<TooltipPrimitive.Portal>\n\t\t\t<TooltipPrimitive.Content\n\t\t\t\tdata-slot='tooltip-content'\n\t\t\t\tsideOffset={sideOffset}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t'z-50 inline-flex w-fit max-w-xs origin-(--radix-tooltip-content-transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95',\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t\t<TooltipPrimitive.Arrow className='z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground' />\n\t\t\t</TooltipPrimitive.Content>\n\t\t</TooltipPrimitive.Portal>\n\t)\n}\n\nexport { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger }\n"],"names":["TooltipProvider","delayDuration","props","jsx","TooltipPrimitive","Tooltip","TooltipTrigger","TooltipContent","className","sideOffset","children","jsxs","cn"],"mappings":";;;AAKA,SAASA,EAAgB;AAAA,EACxB,eAAAC,IAAgB;AAAA,EAChB,GAAGC;AACJ,GAA2D;AAC1D,SACC,gBAAAC;AAAA,IAACC,EAAiB;AAAA,IAAjB;AAAA,MACA,aAAU;AAAA,MACV,eAAAH;AAAA,MACC,GAAGC;AAAA,IAAA;AAAA,EAAA;AAGP;AAEA,SAASG,EAAQ;AAAA,EAChB,GAAGH;AACJ,GAAuD;AACtD,2BAAQE,EAAiB,MAAjB,EAAsB,aAAU,WAAW,GAAGF,GAAO;AAC9D;AAEA,SAASI,EAAe;AAAA,EACvB,GAAGJ;AACJ,GAA0D;AACzD,2BAAQE,EAAiB,SAAjB,EAAyB,aAAU,mBAAmB,GAAGF,GAAO;AACzE;AAEA,SAASK,EAAe;AAAA,EACvB,WAAAC;AAAA,EACA,YAAAC,IAAa;AAAA,EACb,UAAAC;AAAA,EACA,GAAGR;AACJ,GAA0D;AACzD,SACC,gBAAAC,EAACC,EAAiB,QAAjB,EACA,UAAA,gBAAAO;AAAA,IAACP,EAAiB;AAAA,IAAjB;AAAA,MACA,aAAU;AAAA,MACV,YAAAK;AAAA,MACA,WAAWG;AAAA,QACV;AAAA,QACAJ;AAAA,MAAA;AAAA,MAEA,GAAGN;AAAA,MAEH,UAAA;AAAA,QAAAQ;AAAA,QACD,gBAAAP,EAACC,EAAiB,OAAjB,EAAuB,WAAU,qGAAA,CAAqG;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA,GAEzI;AAEF;"}
@@ -0,0 +1,9 @@
1
+ import { clsx as o } from "clsx";
2
+ import { twMerge as t } from "tailwind-merge";
3
+ function n(...r) {
4
+ return t(o(r));
5
+ }
6
+ export {
7
+ n as cn
8
+ };
9
+ //# sourceMappingURL=cn.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cn.js","sources":["../../src/utils/cn.ts"],"sourcesContent":["import { type ClassValue, clsx } from 'clsx'\nimport { twMerge } from 'tailwind-merge'\n\nexport function cn(...inputs: ClassValue[]) {\n\treturn twMerge(clsx(inputs))\n}\n"],"names":["cn","inputs","twMerge","clsx"],"mappings":";;AAGO,SAASA,KAAMC,GAAsB;AAC3C,SAAOC,EAAQC,EAAKF,CAAM,CAAC;AAC5B;"}
@@ -0,0 +1,8 @@
1
+ function n(r) {
2
+ const e = r.trim().replace(/^#/, "");
3
+ return /^[\da-f]{3}$/i.test(e) ? `#${[...e].map((t) => t + t).join("")}`.toUpperCase() : /^[\da-f]{6}$/i.test(e) ? `#${e}`.toUpperCase() : null;
4
+ }
5
+ export {
6
+ n as parseHexColor
7
+ };
8
+ //# sourceMappingURL=colors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"colors.js","sources":["../../src/utils/colors.ts"],"sourcesContent":["/** Accepts `#rgb`, `#rrggbb`, with or without `#`; returns `#RRGGBB` or null. */\nexport function parseHexColor(value: string) {\n\tconst hex = value.trim().replace(/^#/, '')\n\tif (/^[\\da-f]{3}$/i.test(hex))\n\t\treturn `#${[...hex].map((char) => char + char).join('')}`.toUpperCase()\n\tif (/^[\\da-f]{6}$/i.test(hex)) return `#${hex}`.toUpperCase()\n\treturn null\n}\n"],"names":["parseHexColor","value","hex","char"],"mappings":"AACO,SAASA,EAAcC,GAAe;AAC5C,QAAMC,IAAMD,EAAM,KAAA,EAAO,QAAQ,MAAM,EAAE;AACzC,SAAI,gBAAgB,KAAKC,CAAG,IACpB,IAAI,CAAC,GAAGA,CAAG,EAAE,IAAI,CAACC,MAASA,IAAOA,CAAI,EAAE,KAAK,EAAE,CAAC,GAAG,YAAA,IACvD,gBAAgB,KAAKD,CAAG,IAAU,IAAIA,CAAG,GAAG,YAAA,IACzC;AACR;"}
@@ -0,0 +1,28 @@
1
+ import o from "i18next";
2
+ function a() {
3
+ return o.resolvedLanguage ?? navigator.language ?? "de";
4
+ }
5
+ function i(t) {
6
+ return t instanceof Date && Number.isFinite(t.getTime());
7
+ }
8
+ function m(t, e) {
9
+ return i(t) ? new Intl.DateTimeFormat(e?.locale ?? a(), {
10
+ day: "2-digit",
11
+ month: "long",
12
+ year: "numeric"
13
+ }).format(t) : "";
14
+ }
15
+ function u(t, e) {
16
+ const n = new Date(t);
17
+ return i(n) ? new Intl.DateTimeFormat(e?.locale ?? a(), {
18
+ dateStyle: "medium",
19
+ timeStyle: "short"
20
+ }).format(n) : "";
21
+ }
22
+ export {
23
+ m as formatDate,
24
+ u as formatTimestamp,
25
+ a as getRuntimeLocale,
26
+ i as isValidDate
27
+ };
28
+ //# sourceMappingURL=dates.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dates.js","sources":["../../src/utils/dates.ts"],"sourcesContent":["import i18next from 'i18next'\n\nexport function getRuntimeLocale() {\n\treturn i18next.resolvedLanguage ?? navigator.language ?? 'de'\n}\n\nexport function isValidDate(value: unknown): value is Date {\n\treturn value instanceof Date && Number.isFinite(value.getTime())\n}\n\nexport function formatDate(\n\tvalue: Date | undefined,\n\toptions?: { locale?: string },\n) {\n\treturn isValidDate(value)\n\t\t? new Intl.DateTimeFormat(options?.locale ?? getRuntimeLocale(), {\n\t\t\t\tday: '2-digit',\n\t\t\t\tmonth: 'long',\n\t\t\t\tyear: 'numeric',\n\t\t\t}).format(value)\n\t\t: ''\n}\n\nexport function formatTimestamp(value: string, options?: { locale?: string }) {\n\tconst date = new Date(value)\n\treturn isValidDate(date)\n\t\t? new Intl.DateTimeFormat(options?.locale ?? getRuntimeLocale(), {\n\t\t\t\tdateStyle: 'medium',\n\t\t\t\ttimeStyle: 'short',\n\t\t\t}).format(date)\n\t\t: ''\n}\n"],"names":["getRuntimeLocale","i18next","isValidDate","value","formatDate","options","formatTimestamp","date"],"mappings":";AAEO,SAASA,IAAmB;AAClC,SAAOC,EAAQ,oBAAoB,UAAU,YAAY;AAC1D;AAEO,SAASC,EAAYC,GAA+B;AAC1D,SAAOA,aAAiB,QAAQ,OAAO,SAASA,EAAM,SAAS;AAChE;AAEO,SAASC,EACfD,GACAE,GACC;AACD,SAAOH,EAAYC,CAAK,IACrB,IAAI,KAAK,eAAeE,GAAS,UAAUL,KAAoB;AAAA,IAC/D,KAAK;AAAA,IACL,OAAO;AAAA,IACP,MAAM;AAAA,EAAA,CACN,EAAE,OAAOG,CAAK,IACd;AACJ;AAEO,SAASG,EAAgBH,GAAeE,GAA+B;AAC7E,QAAME,IAAO,IAAI,KAAKJ,CAAK;AAC3B,SAAOD,EAAYK,CAAI,IACpB,IAAI,KAAK,eAAeF,GAAS,UAAUL,KAAoB;AAAA,IAC/D,WAAW;AAAA,IACX,WAAW;AAAA,EAAA,CACX,EAAE,OAAOO,CAAI,IACb;AACJ;"}
@@ -0,0 +1,12 @@
1
+ import { cn as r } from "./cn.js";
2
+ import { parseHexColor as a } from "./colors.js";
3
+ import { formatDate as f, formatTimestamp as p, getRuntimeLocale as i, isValidDate as x } from "./dates.js";
4
+ export {
5
+ r as cn,
6
+ f as formatDate,
7
+ p as formatTimestamp,
8
+ i as getRuntimeLocale,
9
+ x as isValidDate,
10
+ a as parseHexColor
11
+ };
12
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}