@waveso/ui 0.0.10 → 0.1.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 (288) hide show
  1. package/dist/accordion.d.ts +24 -8
  2. package/dist/accordion.d.ts.map +1 -0
  3. package/dist/accordion.js +50 -73
  4. package/dist/accordion.js.map +1 -1
  5. package/dist/action-bar.d.ts +83 -0
  6. package/dist/action-bar.d.ts.map +1 -0
  7. package/dist/action-bar.js +264 -0
  8. package/dist/action-bar.js.map +1 -0
  9. package/dist/alert-dialog.d.ts +56 -21
  10. package/dist/alert-dialog.d.ts.map +1 -0
  11. package/dist/alert-dialog.js +75 -127
  12. package/dist/alert-dialog.js.map +1 -1
  13. package/dist/alert.d.ts +26 -11
  14. package/dist/alert.d.ts.map +1 -0
  15. package/dist/alert.js +37 -68
  16. package/dist/alert.js.map +1 -1
  17. package/dist/animate.d.ts +117 -75
  18. package/dist/animate.d.ts.map +1 -0
  19. package/dist/animate.js +259 -223
  20. package/dist/animate.js.map +1 -1
  21. package/dist/aspect-ratio.d.ts +11 -6
  22. package/dist/aspect-ratio.d.ts.map +1 -0
  23. package/dist/aspect-ratio.js +12 -14
  24. package/dist/aspect-ratio.js.map +1 -1
  25. package/dist/autocomplete.d.ts +91 -25
  26. package/dist/autocomplete.d.ts.map +1 -0
  27. package/dist/autocomplete.js +119 -181
  28. package/dist/autocomplete.js.map +1 -1
  29. package/dist/avatar.d.ts +32 -11
  30. package/dist/avatar.d.ts.map +1 -0
  31. package/dist/avatar.js +42 -89
  32. package/dist/avatar.js.map +1 -1
  33. package/dist/badge.d.ts +15 -8
  34. package/dist/badge.d.ts.map +1 -0
  35. package/dist/badge.js +34 -48
  36. package/dist/badge.js.map +1 -1
  37. package/dist/breadcrumb.d.ts +35 -11
  38. package/dist/breadcrumb.d.ts.map +1 -0
  39. package/dist/breadcrumb.js +60 -110
  40. package/dist/breadcrumb.js.map +1 -1
  41. package/dist/button-group.d.ts +26 -13
  42. package/dist/button-group.d.ts.map +1 -0
  43. package/dist/button-group.js +38 -76
  44. package/dist/button-group.js.map +1 -1
  45. package/dist/button.d.ts +17 -10
  46. package/dist/button.d.ts.map +1 -0
  47. package/dist/button.js +50 -3
  48. package/dist/button.js.map +1 -1
  49. package/dist/card.d.ts +35 -11
  50. package/dist/card.d.ts.map +1 -0
  51. package/dist/card.js +43 -82
  52. package/dist/card.js.map +1 -1
  53. package/dist/checkbox.d.ts +6 -4
  54. package/dist/checkbox.d.ts.map +1 -0
  55. package/dist/checkbox.js +21 -29
  56. package/dist/checkbox.js.map +1 -1
  57. package/dist/collapsible.d.ts +15 -7
  58. package/dist/collapsible.d.ts.map +1 -0
  59. package/dist/collapsible.js +19 -8
  60. package/dist/collapsible.js.map +1 -1
  61. package/dist/combobox.d.ts +83 -23
  62. package/dist/combobox.d.ts.map +1 -0
  63. package/dist/combobox.js +149 -247
  64. package/dist/combobox.js.map +1 -1
  65. package/dist/context-menu.d.ts +80 -26
  66. package/dist/context-menu.d.ts.map +1 -0
  67. package/dist/context-menu.js +108 -164
  68. package/dist/context-menu.js.map +1 -1
  69. package/dist/count.d.ts +45 -31
  70. package/dist/count.d.ts.map +1 -0
  71. package/dist/count.js +170 -165
  72. package/dist/count.js.map +1 -1
  73. package/dist/dialog.d.ts +61 -28
  74. package/dist/dialog.d.ts.map +1 -0
  75. package/dist/dialog.js +77 -120
  76. package/dist/dialog.js.map +1 -1
  77. package/dist/direction.d.ts +2 -1
  78. package/dist/direction.js +3 -3
  79. package/dist/drawer.d.ts +45 -15
  80. package/dist/drawer.d.ts.map +1 -0
  81. package/dist/drawer.js +93 -5
  82. package/dist/drawer.js.map +1 -1
  83. package/dist/encrypted-text.d.ts +25 -12
  84. package/dist/encrypted-text.d.ts.map +1 -0
  85. package/dist/encrypted-text.js +102 -134
  86. package/dist/encrypted-text.js.map +1 -1
  87. package/dist/field.d.ts +37 -21
  88. package/dist/field.d.ts.map +1 -0
  89. package/dist/field.js +52 -3
  90. package/dist/field.js.map +1 -1
  91. package/dist/film-grain-shader.d.ts +6 -0
  92. package/dist/film-grain-shader.d.ts.map +1 -0
  93. package/dist/film-grain-shader.js +88 -0
  94. package/dist/film-grain-shader.js.map +1 -0
  95. package/dist/film-grain-webgl.d.ts +20 -0
  96. package/dist/film-grain-webgl.d.ts.map +1 -0
  97. package/dist/film-grain-webgl.js +306 -0
  98. package/dist/film-grain-webgl.js.map +1 -0
  99. package/dist/film-grain.d.ts +21 -11
  100. package/dist/film-grain.d.ts.map +1 -0
  101. package/dist/film-grain.js +28 -420
  102. package/dist/film-grain.js.map +1 -1
  103. package/dist/form.d.ts +64 -49
  104. package/dist/form.d.ts.map +1 -0
  105. package/dist/form.js +112 -91
  106. package/dist/form.js.map +1 -1
  107. package/dist/gradient-reveal-text.d.ts +35 -22
  108. package/dist/gradient-reveal-text.d.ts.map +1 -0
  109. package/dist/gradient-reveal-text.js +238 -205
  110. package/dist/gradient-reveal-text.js.map +1 -1
  111. package/dist/hooks/use-mobile.d.ts +3 -1
  112. package/dist/hooks/use-mobile.d.ts.map +1 -0
  113. package/dist/hooks/use-mobile.js +28 -2
  114. package/dist/hooks/use-mobile.js.map +1 -1
  115. package/dist/infinite-scroll.d.ts +29 -15
  116. package/dist/infinite-scroll.d.ts.map +1 -0
  117. package/dist/infinite-scroll.js +69 -99
  118. package/dist/infinite-scroll.js.map +1 -1
  119. package/dist/input-group.d.ts +41 -18
  120. package/dist/input-group.d.ts.map +1 -0
  121. package/dist/input-group.js +80 -6
  122. package/dist/input-group.js.map +1 -1
  123. package/dist/input-otp.d.ts +26 -10
  124. package/dist/input-otp.d.ts.map +1 -0
  125. package/dist/input-otp.js +40 -70
  126. package/dist/input-otp.js.map +1 -1
  127. package/dist/input.d.ts +10 -4
  128. package/dist/input.d.ts.map +1 -0
  129. package/dist/input.js +16 -3
  130. package/dist/input.js.map +1 -1
  131. package/dist/item.d.ts +58 -23
  132. package/dist/item.d.ts.map +1 -0
  133. package/dist/item.js +102 -160
  134. package/dist/item.js.map +1 -1
  135. package/dist/kbd.d.ts +12 -4
  136. package/dist/kbd.d.ts.map +1 -0
  137. package/dist/kbd.js +15 -24
  138. package/dist/kbd.js.map +1 -1
  139. package/dist/label.d.ts +9 -4
  140. package/dist/label.d.ts.map +1 -0
  141. package/dist/label.js +12 -16
  142. package/dist/label.js.map +1 -1
  143. package/dist/lib/focus.d.ts +42 -0
  144. package/dist/lib/focus.d.ts.map +1 -0
  145. package/dist/lib/focus.js +21 -0
  146. package/dist/lib/focus.js.map +1 -0
  147. package/dist/lib/internal-icons.d.ts +32 -0
  148. package/dist/lib/internal-icons.d.ts.map +1 -0
  149. package/dist/lib/internal-icons.js +222 -0
  150. package/dist/lib/internal-icons.js.map +1 -0
  151. package/dist/lib/utils.d.ts +4 -2
  152. package/dist/lib/utils.d.ts.map +1 -0
  153. package/dist/lib/utils.js +12 -2
  154. package/dist/lib/utils.js.map +1 -1
  155. package/dist/masonry.d.ts +25 -11
  156. package/dist/masonry.d.ts.map +1 -0
  157. package/dist/masonry.js +188 -229
  158. package/dist/masonry.js.map +1 -1
  159. package/dist/menu.d.ts +84 -26
  160. package/dist/menu.d.ts.map +1 -0
  161. package/dist/menu.js +141 -4
  162. package/dist/menu.js.map +1 -1
  163. package/dist/menubar.d.ts +60 -22
  164. package/dist/menubar.d.ts.map +1 -0
  165. package/dist/menubar.js +80 -52
  166. package/dist/menubar.js.map +1 -1
  167. package/dist/pagination.d.ts +38 -17
  168. package/dist/pagination.d.ts.map +1 -0
  169. package/dist/pagination.js +68 -107
  170. package/dist/pagination.js.map +1 -1
  171. package/dist/popover.d.ts +56 -14
  172. package/dist/popover.d.ts.map +1 -0
  173. package/dist/popover.js +62 -87
  174. package/dist/popover.js.map +1 -1
  175. package/dist/preview-card.d.ts +28 -9
  176. package/dist/preview-card.d.ts.map +1 -0
  177. package/dist/preview-card.js +40 -60
  178. package/dist/preview-card.js.map +1 -1
  179. package/dist/progress.d.ts +28 -9
  180. package/dist/progress.d.ts.map +1 -0
  181. package/dist/progress.js +35 -60
  182. package/dist/progress.js.map +1 -1
  183. package/dist/radio-group.d.ts +14 -8
  184. package/dist/radio-group.d.ts.map +1 -0
  185. package/dist/radio-group.js +18 -22
  186. package/dist/radio-group.js.map +1 -1
  187. package/dist/radio.d.ts +14 -6
  188. package/dist/radio.d.ts.map +1 -0
  189. package/dist/radio.js +24 -3
  190. package/dist/radio.js.map +1 -1
  191. package/dist/scroll-area.d.ts +16 -6
  192. package/dist/scroll-area.d.ts.map +1 -0
  193. package/dist/scroll-area.js +34 -55
  194. package/dist/scroll-area.js.map +1 -1
  195. package/dist/select.d.ts +66 -18
  196. package/dist/select.d.ts.map +1 -0
  197. package/dist/select.js +105 -185
  198. package/dist/select.js.map +1 -1
  199. package/dist/separator.d.ts +11 -5
  200. package/dist/separator.d.ts.map +1 -0
  201. package/dist/separator.js +17 -3
  202. package/dist/separator.js.map +1 -1
  203. package/dist/sidebar.d.ts +172 -79
  204. package/dist/sidebar.d.ts.map +1 -0
  205. package/dist/sidebar.js +363 -585
  206. package/dist/sidebar.js.map +1 -1
  207. package/dist/skeleton.d.ts +8 -3
  208. package/dist/skeleton.d.ts.map +1 -0
  209. package/dist/skeleton.js +13 -3
  210. package/dist/skeleton.js.map +1 -1
  211. package/dist/slider.d.ts +16 -6
  212. package/dist/slider.d.ts.map +1 -0
  213. package/dist/slider.js +40 -67
  214. package/dist/slider.js.map +1 -1
  215. package/dist/spinner.d.ts +8 -3
  216. package/dist/spinner.d.ts.map +1 -0
  217. package/dist/spinner.js +15 -4
  218. package/dist/spinner.js.map +1 -1
  219. package/dist/switch.d.ts +12 -6
  220. package/dist/switch.d.ts.map +1 -0
  221. package/dist/switch.js +18 -25
  222. package/dist/switch.js.map +1 -1
  223. package/dist/table.d.ts +37 -11
  224. package/dist/table.d.ts.map +1 -0
  225. package/dist/table.js +51 -88
  226. package/dist/table.js.map +1 -1
  227. package/dist/tabs.d.ts +28 -12
  228. package/dist/tabs.d.ts.map +1 -0
  229. package/dist/tabs.js +40 -74
  230. package/dist/tabs.js.map +1 -1
  231. package/dist/textarea.d.ts +13 -6
  232. package/dist/textarea.d.ts.map +1 -0
  233. package/dist/textarea.js +19 -3
  234. package/dist/textarea.js.map +1 -1
  235. package/dist/toast.d.ts +63 -39
  236. package/dist/toast.d.ts.map +1 -0
  237. package/dist/toast.js +177 -215
  238. package/dist/toast.js.map +1 -1
  239. package/dist/toggle-group.d.ts +26 -12
  240. package/dist/toggle-group.d.ts.map +1 -0
  241. package/dist/toggle-group.js +49 -73
  242. package/dist/toggle-group.js.map +1 -1
  243. package/dist/toggle.d.ts +17 -10
  244. package/dist/toggle.d.ts.map +1 -0
  245. package/dist/toggle.js +38 -3
  246. package/dist/toggle.js.map +1 -1
  247. package/dist/tooltip.d.ts +35 -14
  248. package/dist/tooltip.d.ts.map +1 -0
  249. package/dist/tooltip.js +52 -3
  250. package/dist/tooltip.js.map +1 -1
  251. package/dist/typewriter.d.ts +44 -31
  252. package/dist/typewriter.d.ts.map +1 -0
  253. package/dist/typewriter.js +185 -185
  254. package/dist/typewriter.js.map +1 -1
  255. package/package.json +6 -6
  256. package/dist/chunk-45VQAWIM.js +0 -228
  257. package/dist/chunk-45VQAWIM.js.map +0 -1
  258. package/dist/chunk-6Y7LPQMO.js +0 -11
  259. package/dist/chunk-6Y7LPQMO.js.map +0 -1
  260. package/dist/chunk-76UQO56T.js +0 -19
  261. package/dist/chunk-76UQO56T.js.map +0 -1
  262. package/dist/chunk-7F4MPMLJ.js +0 -17
  263. package/dist/chunk-7F4MPMLJ.js.map +0 -1
  264. package/dist/chunk-BKTJYX4M.js +0 -143
  265. package/dist/chunk-BKTJYX4M.js.map +0 -1
  266. package/dist/chunk-D5XPEJ6T.js +0 -36
  267. package/dist/chunk-D5XPEJ6T.js.map +0 -1
  268. package/dist/chunk-DIGOLJIR.js +0 -105
  269. package/dist/chunk-DIGOLJIR.js.map +0 -1
  270. package/dist/chunk-IQ7YQ5XA.js +0 -141
  271. package/dist/chunk-IQ7YQ5XA.js.map +0 -1
  272. package/dist/chunk-NCHHHWTB.js +0 -85
  273. package/dist/chunk-NCHHHWTB.js.map +0 -1
  274. package/dist/chunk-OUFYQLVN.js +0 -56
  275. package/dist/chunk-OUFYQLVN.js.map +0 -1
  276. package/dist/chunk-QFSEK4M6.js +0 -22
  277. package/dist/chunk-QFSEK4M6.js.map +0 -1
  278. package/dist/chunk-QRW37LRP.js +0 -25
  279. package/dist/chunk-QRW37LRP.js.map +0 -1
  280. package/dist/chunk-RPQHL6C5.js +0 -26
  281. package/dist/chunk-RPQHL6C5.js.map +0 -1
  282. package/dist/chunk-V4ZX4YCP.js +0 -66
  283. package/dist/chunk-V4ZX4YCP.js.map +0 -1
  284. package/dist/chunk-YTSQQTSF.js +0 -44
  285. package/dist/chunk-YTSQQTSF.js.map +0 -1
  286. package/dist/chunk-ZZZH3JGW.js +0 -23
  287. package/dist/chunk-ZZZH3JGW.js.map +0 -1
  288. package/dist/direction.js.map +0 -1
package/dist/dialog.js CHANGED
@@ -1,138 +1,95 @@
1
- import { CloseIcon } from './chunk-DIGOLJIR.js';
2
- import { Button } from './chunk-OUFYQLVN.js';
3
- import { cn } from './chunk-76UQO56T.js';
4
- import { Dialog as Dialog$1 } from '@base-ui/react/dialog';
5
- import { jsx, jsxs } from 'react/jsx-runtime';
6
-
1
+ "use client";
2
+ import { cn } from "./lib/utils.js";
3
+ import { CloseIcon } from "./lib/internal-icons.js";
4
+ import { Button } from "./button.js";
5
+ import "react";
6
+ import { jsx, jsxs } from "react/jsx-runtime";
7
+ import { Dialog as Dialog$1 } from "@base-ui/react/dialog";
8
+ //#region src/dialog.tsx
7
9
  function Dialog({ disablePointerDismissal, ...props }) {
8
- return /* @__PURE__ */ jsx(Dialog$1.Root, { "data-slot": "dialog", disablePointerDismissal, ...props });
10
+ return /* @__PURE__ */ jsx(Dialog$1.Root, {
11
+ "data-slot": "dialog",
12
+ disablePointerDismissal,
13
+ ...props
14
+ });
9
15
  }
10
16
  function DialogTrigger({ ...props }) {
11
- return /* @__PURE__ */ jsx(Dialog$1.Trigger, { "data-slot": "dialog-trigger", ...props });
17
+ return /* @__PURE__ */ jsx(Dialog$1.Trigger, {
18
+ "data-slot": "dialog-trigger",
19
+ ...props
20
+ });
12
21
  }
13
22
  function DialogPortal({ ...props }) {
14
- return /* @__PURE__ */ jsx(Dialog$1.Portal, { "data-slot": "dialog-portal", ...props });
23
+ return /* @__PURE__ */ jsx(Dialog$1.Portal, {
24
+ "data-slot": "dialog-portal",
25
+ ...props
26
+ });
15
27
  }
16
28
  function DialogClose({ ...props }) {
17
- return /* @__PURE__ */ jsx(Dialog$1.Close, { "data-slot": "dialog-close", ...props });
29
+ return /* @__PURE__ */ jsx(Dialog$1.Close, {
30
+ "data-slot": "dialog-close",
31
+ ...props
32
+ });
18
33
  }
19
- function DialogOverlay({
20
- className,
21
- ...props
22
- }) {
23
- return /* @__PURE__ */ jsx(
24
- Dialog$1.Backdrop,
25
- {
26
- "data-slot": "dialog-overlay",
27
- className: cn(
28
- "data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs",
29
- className
30
- ),
31
- ...props
32
- }
33
- );
34
+ function DialogOverlay({ className, ...props }) {
35
+ return /* @__PURE__ */ jsx(Dialog$1.Backdrop, {
36
+ "data-slot": "dialog-overlay",
37
+ className: cn("data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs", className),
38
+ ...props
39
+ });
34
40
  }
35
- function DialogContent({
36
- className,
37
- children,
38
- showCloseButton = true,
39
- ...props
40
- }) {
41
- return /* @__PURE__ */ jsxs(DialogPortal, { children: [
42
- /* @__PURE__ */ jsx(DialogOverlay, {}),
43
- /* @__PURE__ */ jsxs(
44
- Dialog$1.Popup,
45
- {
46
- "data-slot": "dialog-content",
47
- className: cn(
48
- "bg-background data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 ring-foreground/10 fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl p-4 text-sm ring-1 duration-100 outline-none sm:max-w-sm",
49
- className
50
- ),
51
- ...props,
52
- children: [
53
- children,
54
- showCloseButton && /* @__PURE__ */ jsxs(
55
- Dialog$1.Close,
56
- {
57
- "data-slot": "dialog-close",
58
- render: /* @__PURE__ */ jsx(
59
- Button,
60
- {
61
- variant: "ghost",
62
- className: "absolute top-2 right-2",
63
- size: "icon-sm"
64
- }
65
- ),
66
- children: [
67
- /* @__PURE__ */ jsx(CloseIcon, {}),
68
- /* @__PURE__ */ jsx("span", { className: "sr-only", children: "Close" })
69
- ]
70
- }
71
- )
72
- ]
73
- }
74
- )
75
- ] });
41
+ function DialogContent({ className, children, showCloseButton = true, ...props }) {
42
+ return /* @__PURE__ */ jsxs(DialogPortal, { children: [/* @__PURE__ */ jsx(DialogOverlay, {}), /* @__PURE__ */ jsxs(Dialog$1.Popup, {
43
+ "data-slot": "dialog-content",
44
+ className: cn("bg-background data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 ring-foreground/10 fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl p-4 text-sm ring-1 duration-100 outline-none sm:max-w-sm", className),
45
+ ...props,
46
+ children: [children, showCloseButton && /* @__PURE__ */ jsxs(Dialog$1.Close, {
47
+ "data-slot": "dialog-close",
48
+ render: /* @__PURE__ */ jsx(Button, {
49
+ variant: "ghost",
50
+ className: "absolute top-2 right-2",
51
+ size: "icon-sm"
52
+ }),
53
+ children: [/* @__PURE__ */ jsx(CloseIcon, {}), /* @__PURE__ */ jsx("span", {
54
+ className: "sr-only",
55
+ children: "Close"
56
+ })]
57
+ })]
58
+ })] });
76
59
  }
77
60
  function DialogHeader({ className, ...props }) {
78
- return /* @__PURE__ */ jsx(
79
- "div",
80
- {
81
- "data-slot": "dialog-header",
82
- className: cn("flex flex-col gap-2", className),
83
- ...props
84
- }
85
- );
61
+ return /* @__PURE__ */ jsx("div", {
62
+ "data-slot": "dialog-header",
63
+ className: cn("flex flex-col gap-2", className),
64
+ ...props
65
+ });
86
66
  }
87
- function DialogFooter({
88
- className,
89
- showCloseButton = false,
90
- children,
91
- ...props
92
- }) {
93
- return /* @__PURE__ */ jsxs(
94
- "div",
95
- {
96
- "data-slot": "dialog-footer",
97
- className: cn(
98
- "bg-muted/50 -mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t p-4 sm:flex-row sm:justify-end",
99
- className
100
- ),
101
- ...props,
102
- children: [
103
- children,
104
- showCloseButton && /* @__PURE__ */ jsx(Dialog$1.Close, { render: /* @__PURE__ */ jsx(Button, { variant: "outline" }), children: "Close" })
105
- ]
106
- }
107
- );
67
+ function DialogFooter({ className, showCloseButton = false, children, ...props }) {
68
+ return /* @__PURE__ */ jsxs("div", {
69
+ "data-slot": "dialog-footer",
70
+ className: cn("bg-muted/50 -mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t p-4 sm:flex-row sm:justify-end", className),
71
+ ...props,
72
+ children: [children, showCloseButton && /* @__PURE__ */ jsx(Dialog$1.Close, {
73
+ render: /* @__PURE__ */ jsx(Button, { variant: "outline" }),
74
+ children: "Close"
75
+ })]
76
+ });
108
77
  }
109
78
  function DialogTitle({ className, ...props }) {
110
- return /* @__PURE__ */ jsx(
111
- Dialog$1.Title,
112
- {
113
- "data-slot": "dialog-title",
114
- className: cn("text-base leading-none font-medium", className),
115
- ...props
116
- }
117
- );
79
+ return /* @__PURE__ */ jsx(Dialog$1.Title, {
80
+ "data-slot": "dialog-title",
81
+ className: cn("text-base leading-none font-medium", className),
82
+ ...props
83
+ });
118
84
  }
119
- function DialogDescription({
120
- className,
121
- ...props
122
- }) {
123
- return /* @__PURE__ */ jsx(
124
- Dialog$1.Description,
125
- {
126
- "data-slot": "dialog-description",
127
- className: cn(
128
- "text-muted-foreground *:[a]:hover:text-foreground text-sm *:[a]:underline *:[a]:underline-offset-3",
129
- className
130
- ),
131
- ...props
132
- }
133
- );
85
+ function DialogDescription({ className, ...props }) {
86
+ return /* @__PURE__ */ jsx(Dialog$1.Description, {
87
+ "data-slot": "dialog-description",
88
+ className: cn("text-muted-foreground *:[a]:hover:text-foreground text-sm *:[a]:underline *:[a]:underline-offset-3", className),
89
+ ...props
90
+ });
134
91
  }
135
-
92
+ //#endregion
136
93
  export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger };
137
- //# sourceMappingURL=dialog.js.map
94
+
138
95
  //# sourceMappingURL=dialog.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/dialog.tsx"],"names":["DialogPrimitive"],"mappings":";;;;;;AAuCA,SAAS,MAAA,CAAO,EAAE,uBAAA,EAAyB,GAAG,OAAM,EAAgB;AAClE,EAAA,uBAAO,GAAA,CAACA,SAAgB,IAAA,EAAhB,EAAqB,aAAU,QAAA,EAAS,uBAAA,EAAmD,GAAG,KAAA,EAAO,CAAA;AAC/G;AAEA,SAAS,aAAA,CAAc,EAAE,GAAG,KAAA,EAAM,EAAuB;AACvD,EAAA,2BAAQA,QAAA,CAAgB,OAAA,EAAhB,EAAwB,WAAA,EAAU,gBAAA,EAAkB,GAAG,KAAA,EAAO,CAAA;AACxE;AAEA,SAAS,YAAA,CAAa,EAAE,GAAG,KAAA,EAAM,EAAsB;AACrD,EAAA,2BAAQA,QAAA,CAAgB,MAAA,EAAhB,EAAuB,WAAA,EAAU,eAAA,EAAiB,GAAG,KAAA,EAAO,CAAA;AACtE;AAEA,SAAS,WAAA,CAAY,EAAE,GAAG,KAAA,EAAM,EA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,GAAG;AACL,CAAA,EAA2B;AACzB,EAAA,uBACE,GAAA;AAAA,IAACA,QAAA,CAAgB,WAAA;AAAA,IAAhB;AAAA,MACC,WAAA,EAAU,oBAAA;AAAA,MACV,SAAA,EAAW,EAAA;AAAA,QACT,oGAAA;AAAA,QACA;AAAA,OACF;AAAA,MACC,GAAG;AAAA;AAAA,GACN;AAEJ","file":"dialog.js","sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport { Dialog as DialogPrimitive } from \"@base-ui/react/dialog\"\n\nimport { cn } from \"./lib/utils\"\nimport { Button } from \"./button\"\nimport { CloseIcon } from \"./lib/internal-icons\"\n\ntype DialogProps = React.ComponentProps<typeof DialogPrimitive.Root> & {\n /**\n * When `true`, clicking outside the dialog does not close it and\n * `FloatingFocusManager` sets `closeOnFocusOut: false`.\n * This prevents the focus-manager from swallowing click events on\n * interactive elements inside the popup (buttons, switches, etc.).\n *\n * Use this for dialogs that contain forms, wizards, or other complex\n * interactive content.\n *\n * @default false\n */\n disablePointerDismissal?: boolean\n}\ntype DialogTriggerProps = React.ComponentProps<typeof DialogPrimitive.Trigger>\ntype DialogPortalProps = React.ComponentProps<typeof DialogPrimitive.Portal>\ntype DialogCloseProps = React.ComponentProps<typeof DialogPrimitive.Close>\ntype DialogOverlayProps = React.ComponentProps<typeof DialogPrimitive.Backdrop>\ntype DialogPopupProps = React.ComponentProps<typeof DialogPrimitive.Popup>\ntype DialogTitleProps = React.ComponentProps<typeof DialogPrimitive.Title>\ntype DialogDescriptionProps = React.ComponentProps<typeof DialogPrimitive.Description>\n\ntype DialogContentProps = DialogPopupProps & {\n showCloseButton?: boolean\n}\n\ntype DialogFooterProps = React.ComponentProps<\"div\"> & {\n showCloseButton?: boolean\n}\n\nfunction Dialog({ disablePointerDismissal, ...props }: DialogProps) {\n return <DialogPrimitive.Root data-slot=\"dialog\" disablePointerDismissal={disablePointerDismissal} {...props} />\n}\n\nfunction DialogTrigger({ ...props }: DialogTriggerProps) {\n return <DialogPrimitive.Trigger data-slot=\"dialog-trigger\" {...props} />\n}\n\nfunction DialogPortal({ ...props }: DialogPortalProps) {\n return <DialogPrimitive.Portal data-slot=\"dialog-portal\" {...props} />\n}\n\nfunction DialogClose({ ...props }: DialogCloseProps) {\n return <DialogPrimitive.Close data-slot=\"dialog-close\" {...props} />\n}\n\nfunction DialogOverlay({\n className,\n ...props\n}: DialogOverlayProps) {\n return (\n <DialogPrimitive.Backdrop\n data-slot=\"dialog-overlay\"\n className={cn(\n \"data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction DialogContent({\n className,\n children,\n showCloseButton = true,\n ...props\n}: DialogContentProps) {\n return (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Popup\n data-slot=\"dialog-content\"\n className={cn(\n \"bg-background data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 ring-foreground/10 fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl p-4 text-sm ring-1 duration-100 outline-none sm:max-w-sm\",\n className\n )}\n {...props}\n >\n {children}\n {showCloseButton && (\n <DialogPrimitive.Close\n data-slot=\"dialog-close\"\n render={\n <Button\n variant=\"ghost\"\n className=\"absolute top-2 right-2\"\n size=\"icon-sm\"\n />\n }\n >\n <CloseIcon />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n )}\n </DialogPrimitive.Popup>\n </DialogPortal>\n )\n}\n\nfunction DialogHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"dialog-header\"\n className={cn(\"flex flex-col gap-2\", className)}\n {...props}\n />\n )\n}\n\nfunction DialogFooter({\n className,\n showCloseButton = false,\n children,\n ...props\n}: DialogFooterProps) {\n return (\n <div\n data-slot=\"dialog-footer\"\n className={cn(\n \"bg-muted/50 -mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t p-4 sm:flex-row sm:justify-end\",\n className\n )}\n {...props}\n >\n {children}\n {showCloseButton && (\n <DialogPrimitive.Close render={<Button variant=\"outline\" />}>\n Close\n </DialogPrimitive.Close>\n )}\n </div>\n )\n}\n\nfunction DialogTitle({ className, ...props }: DialogTitleProps) {\n return (\n <DialogPrimitive.Title\n data-slot=\"dialog-title\"\n className={cn(\"text-base leading-none font-medium\", className)}\n {...props}\n />\n )\n}\n\nfunction DialogDescription({\n className,\n ...props\n}: DialogDescriptionProps) {\n return (\n <DialogPrimitive.Description\n data-slot=\"dialog-description\"\n className={cn(\n \"text-muted-foreground *:[a]:hover:text-foreground text-sm *:[a]:underline *:[a]:underline-offset-3\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport {\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n}\n"]}
1
+ {"version":3,"file":"dialog.js","names":["DialogPrimitive"],"sources":["../src/dialog.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport { Dialog as DialogPrimitive } from \"@base-ui/react/dialog\"\n\nimport { cn } from \"./lib/utils\"\nimport { Button } from \"./button\"\nimport { CloseIcon } from \"./lib/internal-icons\"\n\ntype DialogProps = React.ComponentProps<typeof DialogPrimitive.Root> & {\n /**\n * When `true`, clicking outside the dialog does not close it and\n * `FloatingFocusManager` sets `closeOnFocusOut: false`.\n * This prevents the focus-manager from swallowing click events on\n * interactive elements inside the popup (buttons, switches, etc.).\n *\n * Use this for dialogs that contain forms, wizards, or other complex\n * interactive content.\n *\n * @default false\n */\n disablePointerDismissal?: boolean\n}\ntype DialogTriggerProps = React.ComponentProps<typeof DialogPrimitive.Trigger>\ntype DialogPortalProps = React.ComponentProps<typeof DialogPrimitive.Portal>\ntype DialogCloseProps = React.ComponentProps<typeof DialogPrimitive.Close>\ntype DialogOverlayProps = React.ComponentProps<typeof DialogPrimitive.Backdrop>\ntype DialogPopupProps = React.ComponentProps<typeof DialogPrimitive.Popup>\ntype DialogTitleProps = React.ComponentProps<typeof DialogPrimitive.Title>\ntype DialogDescriptionProps = React.ComponentProps<typeof DialogPrimitive.Description>\n\ntype DialogContentProps = DialogPopupProps & {\n showCloseButton?: boolean\n}\n\ntype DialogFooterProps = React.ComponentProps<\"div\"> & {\n showCloseButton?: boolean\n}\n\nfunction Dialog({ disablePointerDismissal, ...props }: DialogProps) {\n return <DialogPrimitive.Root data-slot=\"dialog\" disablePointerDismissal={disablePointerDismissal} {...props} />\n}\n\nfunction DialogTrigger({ ...props }: DialogTriggerProps) {\n return <DialogPrimitive.Trigger data-slot=\"dialog-trigger\" {...props} />\n}\n\nfunction DialogPortal({ ...props }: DialogPortalProps) {\n return <DialogPrimitive.Portal data-slot=\"dialog-portal\" {...props} />\n}\n\nfunction DialogClose({ ...props }: DialogCloseProps) {\n return <DialogPrimitive.Close data-slot=\"dialog-close\" {...props} />\n}\n\nfunction DialogOverlay({\n className,\n ...props\n}: DialogOverlayProps) {\n return (\n <DialogPrimitive.Backdrop\n data-slot=\"dialog-overlay\"\n className={cn(\n \"data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction DialogContent({\n className,\n children,\n showCloseButton = true,\n ...props\n}: DialogContentProps) {\n return (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Popup\n data-slot=\"dialog-content\"\n className={cn(\n \"bg-background data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 ring-foreground/10 fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl p-4 text-sm ring-1 duration-100 outline-none sm:max-w-sm\",\n className\n )}\n {...props}\n >\n {children}\n {showCloseButton && (\n <DialogPrimitive.Close\n data-slot=\"dialog-close\"\n render={\n <Button\n variant=\"ghost\"\n className=\"absolute top-2 right-2\"\n size=\"icon-sm\"\n />\n }\n >\n <CloseIcon />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n )}\n </DialogPrimitive.Popup>\n </DialogPortal>\n )\n}\n\nfunction DialogHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"dialog-header\"\n className={cn(\"flex flex-col gap-2\", className)}\n {...props}\n />\n )\n}\n\nfunction DialogFooter({\n className,\n showCloseButton = false,\n children,\n ...props\n}: DialogFooterProps) {\n return (\n <div\n data-slot=\"dialog-footer\"\n className={cn(\n \"bg-muted/50 -mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t p-4 sm:flex-row sm:justify-end\",\n className\n )}\n {...props}\n >\n {children}\n {showCloseButton && (\n <DialogPrimitive.Close render={<Button variant=\"outline\" />}>\n Close\n </DialogPrimitive.Close>\n )}\n </div>\n )\n}\n\nfunction DialogTitle({ className, ...props }: DialogTitleProps) {\n return (\n <DialogPrimitive.Title\n data-slot=\"dialog-title\"\n className={cn(\"text-base leading-none font-medium\", className)}\n {...props}\n />\n )\n}\n\nfunction DialogDescription({\n className,\n ...props\n}: DialogDescriptionProps) {\n return (\n <DialogPrimitive.Description\n data-slot=\"dialog-description\"\n className={cn(\n \"text-muted-foreground *:[a]:hover:text-foreground text-sm *:[a]:underline *:[a]:underline-offset-3\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport {\n Dialog,\n DialogClose,\n DialogContent,\n DialogDescription,\n DialogFooter,\n DialogHeader,\n DialogOverlay,\n DialogPortal,\n DialogTitle,\n DialogTrigger,\n}\n"],"mappings":";;;;;;;;AAuCA,SAAS,OAAO,EAAE,yBAAyB,GAAG,SAAs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WAAW,GACT,4GACA,UACD;EACD,GAAI;YANN,CAQG,UACA,mBACC,oBAACA,SAAgB,OAAjB;GAAuB,QAAQ,oBAAC,QAAD,EAAQ,SAAQ,WAAY,CAAA;aAAE;GAErC,CAAA,CAEtB;;;AAIV,SAAS,YAAY,EAAE,WAAW,GAAG,SAA2B;AAC9D,QACE,oBAACA,SAAgB,OAAjB;EACE,aAAU;EACV,WAAW,GAAG,sCAAsC,UAAU;EAC9D,GAAI;EACJ,CAAA;;AAIN,SAAS,kBAAkB,EACzB,WACA,GAAG,SACsB;AACzB,QACE,oBAACA,SAAgB,aAAjB;EACE,aAAU;EACV,WAAW,GACT,sGACA,UACD;EACD,GAAI;EACJ,CAAA"}
@@ -1 +1,2 @@
1
- export { DirectionProvider, useDirection } from '@base-ui/react/direction-provider';
1
+ import { DirectionProvider, useDirection } from "@base-ui/react/direction-provider";
2
+ export { DirectionProvider, useDirection };
package/dist/direction.js CHANGED
@@ -1,3 +1,3 @@
1
- export { DirectionProvider, useDirection } from '@base-ui/react/direction-provider';
2
- //# sourceMappingURL=direction.js.map
3
- //# sourceMappingURL=direction.js.map
1
+ "use client";
2
+ import { DirectionProvider, useDirection } from "@base-ui/react/direction-provider";
3
+ export { DirectionProvider, useDirection };
package/dist/drawer.d.ts CHANGED
@@ -1,7 +1,8 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import * as React from 'react';
3
- import { Drawer as Drawer$1 } from '@base-ui/react/drawer';
1
+ import * as React from "react";
2
+ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
3
+ import { Drawer as Drawer$1 } from "@base-ui/react/drawer";
4
4
 
5
+ //#region src/drawer.d.ts
5
6
  type DrawerProps = React.ComponentProps<typeof Drawer$1.Root>;
6
7
  type DrawerTriggerProps = React.ComponentProps<typeof Drawer$1.Trigger>;
7
8
  type DrawerPortalProps = React.ComponentProps<typeof Drawer$1.Portal>;
@@ -13,17 +14,46 @@ type DrawerDescriptionProps = React.ComponentProps<typeof Drawer$1.Description>;
13
14
  type DrawerHeaderProps = React.ComponentProps<"div">;
14
15
  type DrawerFooterProps = React.ComponentProps<"div">;
15
16
  type DrawerContentProps = DrawerPopupProps & {
16
- showCloseButton?: boolean;
17
+ showCloseButton?: boolean;
17
18
  };
18
- declare function Drawer({ ...props }: DrawerProps): react_jsx_runtime.JSX.Element;
19
- declare function DrawerTrigger({ ...props }: DrawerTriggerProps): react_jsx_runtime.JSX.Element;
20
- declare function DrawerPortal({ ...props }: DrawerPortalProps): react_jsx_runtime.JSX.Element;
21
- declare function DrawerClose({ ...props }: DrawerCloseProps): react_jsx_runtime.JSX.Element;
22
- declare function DrawerOverlay({ className, ...props }: DrawerOverlayProps): react_jsx_runtime.JSX.Element;
23
- declare function DrawerContent({ className, children, showCloseButton, ...props }: DrawerContentProps): react_jsx_runtime.JSX.Element;
24
- declare function DrawerHeader({ className, ...props }: DrawerHeaderProps): react_jsx_runtime.JSX.Element;
25
- declare function DrawerFooter({ className, ...props }: DrawerFooterProps): react_jsx_runtime.JSX.Element;
26
- declare function DrawerTitle({ className, ...props }: DrawerTitleProps): react_jsx_runtime.JSX.Element;
27
- declare function DrawerDescription({ className, ...props }: DrawerDescriptionProps): react_jsx_runtime.JSX.Element;
28
-
19
+ declare function Drawer({
20
+ ...props
21
+ }: DrawerProps): _$react_jsx_runtime0.JSX.Element;
22
+ declare function DrawerTrigger({
23
+ ...props
24
+ }: DrawerTriggerProps): _$react_jsx_runtime0.JSX.Element;
25
+ declare function DrawerPortal({
26
+ ...props
27
+ }: DrawerPortalProps): _$react_jsx_runtime0.JSX.Element;
28
+ declare function DrawerClose({
29
+ ...props
30
+ }: DrawerCloseProps): _$react_jsx_runtime0.JSX.Element;
31
+ declare function DrawerOverlay({
32
+ className,
33
+ ...props
34
+ }: DrawerOverlayProps): _$react_jsx_runtime0.JSX.Element;
35
+ declare function DrawerContent({
36
+ className,
37
+ children,
38
+ showCloseButton,
39
+ ...props
40
+ }: DrawerContentProps): _$react_jsx_runtime0.JSX.Element;
41
+ declare function DrawerHeader({
42
+ className,
43
+ ...props
44
+ }: DrawerHeaderProps): _$react_jsx_runtime0.JSX.Element;
45
+ declare function DrawerFooter({
46
+ className,
47
+ ...props
48
+ }: DrawerFooterProps): _$react_jsx_runtime0.JSX.Element;
49
+ declare function DrawerTitle({
50
+ className,
51
+ ...props
52
+ }: DrawerTitleProps): _$react_jsx_runtime0.JSX.Element;
53
+ declare function DrawerDescription({
54
+ className,
55
+ ...props
56
+ }: DrawerDescriptionProps): _$react_jsx_runtime0.JSX.Element;
57
+ //#endregion
29
58
  export { Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger };
59
+ //# sourceMappingURL=drawer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"drawer.d.ts","names":[],"sources":["../src/drawer.tsx"],"mappings":";;;;;KASK,WAAA,GAAc,KAAA,CAAM,cAAA,QAAsB,QAAA,CAAgB,IAAA;AAAA,KAC1D,kBAAA,GAAqB,KAAA,CAAM,cAAA,QAAsB,QAAA,CAAgB,OAAA;AAAA,KACjE,iBAAA,GAAoB,KAAA,CAAM,cAAA,QAAsB,QAAA,CAAgB,MAAA;AAAA,KAChE,gBAAA,GAAmB,KAAA,CAAM,cAAA,QAAsB,QAAA,CAAgB,KAAA;AAAA,KAC/D,kBAAA,GAAqB,KAAA,CAAM,cAAA,QAAsB,QAAA,CAAgB,QAAA;AAAA,KACjE,gBAAA,GAAmB,KAAA,CAAM,cAAA,QAAsB,QAAA,CAAgB,KAAA;AAAA,KAC/D,gBAAA,GAAmB,KAAA,CAAM,cAAA,QAAsB,QAAA,CAAgB,KAAA;AAAA,KAC/D,sBAAA,GAAyB,KAAA,CAAM,cAAA,QAAsB,QAAA,CAAgB,WAAA;AAAA,KACrE,iBAAA,GAAoB,KAAA,CAAM,cAAA;AAAA,KAC1B,iBAAA,GAAoB,KAAA,CAAM,cAAA;AAAA,KA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ger } from './chunk-BKTJYX4M.js';
2
- import './chunk-DIGOLJIR.js';
3
- import './chunk-OUFYQLVN.js';
4
- import './chunk-76UQO56T.js';
5
- //# sourceMappingURL=drawer.js.map
1
+ "use client";
2
+ import { cn } from "./lib/utils.js";
3
+ import { CloseIcon } from "./lib/internal-icons.js";
4
+ import { Button } from "./button.js";
5
+ import "react";
6
+ import { jsx, jsxs } from "react/jsx-runtime";
7
+ import { Drawer as Drawer$1 } from "@base-ui/react/drawer";
8
+ //#region src/drawer.tsx
9
+ function Drawer({ ...props }) {
10
+ return /* @__PURE__ */ jsx(Drawer$1.Root, {
11
+ "data-slot": "drawer",
12
+ ...props
13
+ });
14
+ }
15
+ function DrawerTrigger({ ...props }) {
16
+ return /* @__PURE__ */ jsx(Drawer$1.Trigger, {
17
+ "data-slot": "drawer-trigger",
18
+ ...props
19
+ });
20
+ }
21
+ function DrawerPortal({ ...props }) {
22
+ return /* @__PURE__ */ jsx(Drawer$1.Portal, {
23
+ "data-slot": "drawer-portal",
24
+ ...props
25
+ });
26
+ }
27
+ function DrawerClose({ ...props }) {
28
+ return /* @__PURE__ */ jsx(Drawer$1.Close, {
29
+ "data-slot": "drawer-close",
30
+ ...props
31
+ });
32
+ }
33
+ function DrawerOverlay({ className, ...props }) {
34
+ return /* @__PURE__ */ jsx(Drawer$1.Backdrop, {
35
+ "data-slot": "drawer-overlay",
36
+ className: cn("fixed inset-0 z-50 bg-black/10 transition-opacity duration-300 data-[starting-style]:opacity-0 data-[ending-style]:opacity-0 supports-backdrop-filter:backdrop-blur-xs", className),
37
+ ...props
38
+ });
39
+ }
40
+ function DrawerContent({ className, children, showCloseButton = false, ...props }) {
41
+ return /* @__PURE__ */ jsxs(DrawerPortal, { children: [/* @__PURE__ */ jsx(DrawerOverlay, {}), /* @__PURE__ */ jsxs(Drawer$1.Popup, {
42
+ "data-slot": "drawer-content",
43
+ className: cn("group/drawer-content bg-background fixed z-50 flex flex-col overflow-y-auto text-sm shadow-lg outline-none", "transition-[translate] duration-300 ease-out data-[swiping]:duration-0", "data-[swipe-direction=down]:inset-x-0 data-[swipe-direction=down]:bottom-0 data-[swipe-direction=down]:mt-24 data-[swipe-direction=down]:max-h-[80vh] data-[swipe-direction=down]:rounded-t-xl data-[swipe-direction=down]:border-t", "data-[swipe-direction=up]:inset-x-0 data-[swipe-direction=up]:top-0 data-[swipe-direction=up]:mb-24 data-[swipe-direction=up]:max-h-[80vh] data-[swipe-direction=up]:rounded-b-xl data-[swipe-direction=up]:border-b", "data-[swipe-direction=left]:inset-y-0 data-[swipe-direction=left]:left-0 data-[swipe-direction=left]:w-3/4 data-[swipe-direction=left]:rounded-r-xl data-[swipe-direction=left]:border-r data-[swipe-direction=left]:sm:max-w-sm", "data-[swipe-direction=right]:inset-y-0 data-[swipe-direction=right]:right-0 data-[swipe-direction=right]:w-3/4 data-[swipe-direction=right]:rounded-l-xl data-[swipe-direction=right]:border-l data-[swipe-direction=right]:sm:max-w-sm", "data-[swipe-direction=down]:data-[starting-style]:translate-y-full data-[swipe-direction=down]:data-[ending-style]:translate-y-full", "data-[swipe-direction=up]:data-[starting-style]:-translate-y-full data-[swipe-direction=up]:data-[ending-style]:-translate-y-full", "data-[swipe-direction=left]:data-[starting-style]:-translate-x-full data-[swipe-direction=left]:data-[ending-style]:-translate-x-full", "data-[swipe-direction=right]:data-[starting-style]:translate-x-full data-[swipe-direction=right]:data-[ending-style]:translate-x-full", className),
44
+ ...props,
45
+ children: [
46
+ /* @__PURE__ */ jsx("div", { className: "bg-muted mx-auto mt-4 hidden h-1 w-[100px] shrink-0 rounded-full group-data-[swipe-direction=down]/drawer-content:block" }),
47
+ children,
48
+ showCloseButton && /* @__PURE__ */ jsxs(Drawer$1.Close, {
49
+ "data-slot": "drawer-close",
50
+ render: /* @__PURE__ */ jsx(Button, {
51
+ variant: "ghost",
52
+ className: "absolute top-2 right-2",
53
+ size: "icon-sm"
54
+ }),
55
+ children: [/* @__PURE__ */ jsx(CloseIcon, {}), /* @__PURE__ */ jsx("span", {
56
+ className: "sr-only",
57
+ children: "Close"
58
+ })]
59
+ })
60
+ ]
61
+ })] });
62
+ }
63
+ function DrawerHeader({ className, ...props }) {
64
+ return /* @__PURE__ */ jsx("div", {
65
+ "data-slot": "drawer-header",
66
+ className: cn("flex flex-col gap-0.5 p-4 group-data-[swipe-direction=down]/drawer-content:text-center group-data-[swipe-direction=up]/drawer-content:text-center md:text-left", className),
67
+ ...props
68
+ });
69
+ }
70
+ function DrawerFooter({ className, ...props }) {
71
+ return /* @__PURE__ */ jsx("div", {
72
+ "data-slot": "drawer-footer",
73
+ className: cn("mt-auto flex flex-col gap-2 p-4", className),
74
+ ...props
75
+ });
76
+ }
77
+ function DrawerTitle({ className, ...props }) {
78
+ return /* @__PURE__ */ jsx(Drawer$1.Title, {
79
+ "data-slot": "drawer-title",
80
+ className: cn("text-foreground text-base font-medium", className),
81
+ ...props
82
+ });
83
+ }
84
+ function DrawerDescription({ className, ...props }) {
85
+ return /* @__PURE__ */ jsx(Drawer$1.Description, {
86
+ "data-slot": "drawer-description",
87
+ className: cn("text-muted-foreground text-sm", className),
88
+ ...props
89
+ });
90
+ }
91
+ //#endregion
92
+ export { Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger };
93
+
6
94
  //# sourceMappingURL=drawer.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"drawer.js"}
1
+ {"version":3,"file":"drawer.js","names":["DrawerPrimitive"],"sources":["../src/drawer.tsx"],"sourcesContent":["\"use client\"\n\nimport * as React from \"react\"\nimport { Drawer as DrawerPrimitive } from \"@base-ui/react/drawer\"\n\nimport { cn } from \"./lib/utils\"\nimport { Button } from \"./button\"\nimport { CloseIcon } from \"./lib/internal-icons\"\n\ntype DrawerProps = React.ComponentProps<typeof DrawerPrimitive.Root>\ntype DrawerTriggerProps = React.ComponentProps<typeof DrawerPrimitive.Trigger>\ntype DrawerPortalProps = React.ComponentProps<typeof DrawerPrimitive.Portal>\ntype DrawerCloseProps = React.ComponentProps<typeof DrawerPrimitive.Close>\ntype DrawerOverlayProps = React.ComponentProps<typeof DrawerPrimitive.Backdrop>\ntype DrawerPopupProps = React.ComponentProps<typeof DrawerPrimitive.Popup>\ntype DrawerTitleProps = React.ComponentProps<typeof DrawerPrimitive.Title>\ntype DrawerDescriptionProps = React.ComponentProps<typeof DrawerPrimitive.Description>\ntype DrawerHeaderProps = React.ComponentProps<\"div\">\ntype DrawerFooterProps = React.ComponentProps<\"div\">\n\ntype DrawerContentProps = DrawerPopupProps & {\n showCloseButton?: boolean\n}\n\nfunction Drawer({ ...props }: DrawerProps) {\n return <DrawerPrimitive.Root data-slot=\"drawer\" {...props} />\n}\n\nfunction DrawerTrigger({ ...props }: DrawerTriggerProps) {\n return <DrawerPrimitive.Trigger data-slot=\"drawer-trigger\" {...props} />\n}\n\nfunction DrawerPortal({ ...props }: DrawerPortalProps) {\n return <DrawerPrimitive.Portal data-slot=\"drawer-portal\" {...props} />\n}\n\nfunction DrawerClose({ ...props }: DrawerCloseProps) {\n return <DrawerPrimitive.Close data-slot=\"drawer-close\" {...props} />\n}\n\nfunction DrawerOverlay({ className, ...props }: DrawerOverlayProps) {\n return (\n <DrawerPrimitive.Backdrop\n data-slot=\"drawer-overlay\"\n className={cn(\n \"fixed inset-0 z-50 bg-black/10 transition-opacity duration-300 data-[starting-style]:opacity-0 data-[ending-style]:opacity-0 supports-backdrop-filter:backdrop-blur-xs\",\n className,\n )}\n {...props}\n />\n )\n}\n\nfunction DrawerContent({\n className,\n children,\n showCloseButton = false,\n ...props\n}: DrawerContentProps) {\n return (\n <DrawerPortal>\n <DrawerOverlay />\n <DrawerPrimitive.Popup\n data-slot=\"drawer-content\"\n className={cn(\n // Base layout & appearance\n \"group/drawer-content bg-background fixed z-50 flex flex-col overflow-y-auto text-sm shadow-lg outline-none\",\n // Transition — animate translate, disable during swipe\n \"transition-[translate] duration-300 ease-out data-[swiping]:duration-0\",\n // Bottom drawer (swipeDirection=\"down\")\n \"data-[swipe-direction=down]:inset-x-0 data-[swipe-direction=down]:bottom-0 data-[swipe-direction=down]:mt-24 data-[swipe-direction=down]:max-h-[80vh] data-[swipe-direction=down]:rounded-t-xl data-[swipe-direction=down]:border-t\",\n // Top drawer (swipeDirection=\"up\")\n \"data-[swipe-direction=up]:inset-x-0 data-[swipe-direction=up]:top-0 data-[swipe-direction=up]:mb-24 data-[swipe-direction=up]:max-h-[80vh] data-[swipe-direction=up]:rounded-b-xl data-[swipe-direction=up]:border-b\",\n // Left drawer (swipeDirection=\"left\")\n \"data-[swipe-direction=left]:inset-y-0 data-[swipe-direction=left]:left-0 data-[swipe-direction=left]:w-3/4 data-[swipe-direction=left]:rounded-r-xl data-[swipe-direction=left]:border-r data-[swipe-direction=left]:sm:max-w-sm\",\n // Right drawer (swipeDirection=\"right\")\n \"data-[swipe-direction=right]:inset-y-0 data-[swipe-direction=right]:right-0 data-[swipe-direction=right]:w-3/4 data-[swipe-direction=right]:rounded-l-xl data-[swipe-direction=right]:border-l data-[swipe-direction=right]:sm:max-w-sm\",\n // Enter/exit slide — bottom\n \"data-[swipe-direction=down]:data-[starting-style]:translate-y-full data-[swipe-direction=down]:data-[ending-style]:translate-y-full\",\n // Enter/exit slide — top\n \"data-[swipe-direction=up]:data-[starting-style]:-translate-y-full data-[swipe-direction=up]:data-[ending-style]:-translate-y-full\",\n // Enter/exit slide — left\n \"data-[swipe-direction=left]:data-[starting-style]:-translate-x-full data-[swipe-direction=left]:data-[ending-style]:-translate-x-full\",\n // Enter/exit slide — right\n \"data-[swipe-direction=right]:data-[starting-style]:translate-x-full data-[swipe-direction=right]:data-[ending-style]:translate-x-full\",\n className,\n )}\n {...props}\n >\n {/* Drag handle — visible only for bottom drawers */}\n <div className=\"bg-muted mx-auto mt-4 hidden h-1 w-[100px] shrink-0 rounded-full group-data-[swipe-direction=down]/drawer-content:block\" />\n {children}\n {showCloseButton && (\n <DrawerPrimitive.Close\n data-slot=\"drawer-close\"\n render={\n <Button\n variant=\"ghost\"\n className=\"absolute top-2 right-2\"\n size=\"icon-sm\"\n />\n }\n >\n <CloseIcon />\n <span className=\"sr-only\">Close</span>\n </DrawerPrimitive.Close>\n )}\n </DrawerPrimitive.Popup>\n </DrawerPortal>\n )\n}\n\nfunction DrawerHeader({ className, ...props }: DrawerHeaderProps) {\n return (\n <div\n data-slot=\"drawer-header\"\n className={cn(\n \"flex flex-col gap-0.5 p-4 group-data-[swipe-direction=down]/drawer-content:text-center group-data-[swipe-direction=up]/drawer-content:text-center md:text-left\",\n className,\n )}\n {...props}\n />\n )\n}\n\nfunction DrawerFooter({ className, ...props }: DrawerFooterProps) {\n return (\n <div\n data-slot=\"drawer-footer\"\n className={cn(\"mt-auto flex flex-col gap-2 p-4\", className)}\n {...props}\n />\n )\n}\n\nfunction DrawerTitle({ className, ...props }: DrawerTitleProps) {\n return (\n <DrawerPrimitive.Title\n data-slot=\"drawer-title\"\n className={cn(\"text-foreground text-base font-medium\", className)}\n {...props}\n />\n )\n}\n\nfunction DrawerDescription({\n className,\n ...props\n}: DrawerDescriptionProps) {\n return (\n <DrawerPrimitive.Description\n data-slot=\"drawer-description\"\n className={cn(\"text-muted-foreground text-sm\", className)}\n {...props}\n />\n )\n}\n\nexport {\n Drawer,\n DrawerPortal,\n DrawerOverlay,\n DrawerTrigger,\n DrawerClose,\n DrawerContent,\n DrawerHeader,\n DrawerFooter,\n DrawerTitle,\n DrawerDescription,\n}\n"],"mappings":";;;;;;;;AAwBA,SAAS,OAAO,EAAE,GAAG,SAAsB;AACzC,QAAO,oBAACA,SAAgB,MAAjB;EAAsB,aAAU;EAAS,GAAI;EAAS,CAAA;;AAG/D,SAAS,cAAc,EAAE,GAAG,SAA6B;AACvD,QAAO,oBAACA,SAAgB,SAAjB;EAAyB,aAAU;EAAiB,GAAI;EAAS,CAAA;;AAG1E,SAAS,aAAa,EAAE,GAAG,SAA4B;AACrD,QAAO,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GAAG,yCAAyC,UAAU;EACjE,GAAI;EACJ,CAAA;;AAIN,SAAS,kBAAkB,EACzB,WACA,GAAG,SACsB;AACzB,QACE,oBAACA,SAAgB,aAAjB;EACE,aAAU;EACV,WAAW,GAAG,iCAAiC,UAAU;EACzD,GAAI;EACJ,CAAA"}
@@ -1,16 +1,29 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import * as React from 'react';
1
+ import * as React from "react";
2
+ import * as _$react_jsx_runtime0 from "react/jsx-runtime";
3
3
 
4
+ //#region src/encrypted-text.d.ts
4
5
  type EncryptedTextProps = React.ComponentProps<"span"> & {
5
- text: string;
6
- revealDelayMs?: number;
7
- charset?: string;
8
- flipDelayMs?: number;
9
- encryptedClassName?: string;
10
- revealedClassName?: string;
11
- scrambleOnly?: boolean;
12
- scrambleOneChar?: boolean;
6
+ text: string;
7
+ revealDelayMs?: number;
8
+ charset?: string;
9
+ flipDelayMs?: number;
10
+ encryptedClassName?: string;
11
+ revealedClassName?: string;
12
+ scrambleOnly?: boolean;
13
+ scrambleOneChar?: boolean;
13
14
  };
14
- declare function EncryptedText({ text, className, revealDelayMs, charset, flipDelayMs, encryptedClassName, revealedClassName, scrambleOnly, scrambleOneChar, ...props }: EncryptedTextProps): react_jsx_runtime.JSX.Element | null;
15
-
15
+ declare function EncryptedText({
16
+ text,
17
+ className,
18
+ revealDelayMs,
19
+ charset,
20
+ flipDelayMs,
21
+ encryptedClassName,
22
+ revealedClassName,
23
+ scrambleOnly,
24
+ scrambleOneChar,
25
+ ...props
26
+ }: EncryptedTextProps): _$react_jsx_runtime0.JSX.Element | null;
27
+ //#endregion
16
28
  export { EncryptedText };
29
+ //# sourceMappingURL=encrypted-text.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"encrypted-text.d.ts","names":[],"sources":["../src/encrypted-text.tsx"],"mappings":";;;;KAMK,kBAAA,GAAqB,KAAA,CAAM,cAAA;EAC9B,IAAA;EACA,aAAA;EACA,OAAA;EACA,WAAA;EACA,kBAAA;EACA,iBAAA;EACA,YAAA;EACA,eAAA;AAAA;AAAA,iBAmBO,aAAA,CAAA;EACP,IAAA;EACA,SAAA;EACA,aAAA;EACA,OAAA;EACA,WAAA;EACA,kBAAA;EACA,iBAAA;EACA,YAAA;EACA,eAAA;EAAA,GACG;AAAA,GACF,kBAAA,GAAkB,oBAAA,CAAA,GAAA,CAAA,OAAA"}