@bzync/rui 0.0.5 → 0.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (240) hide show
  1. package/README.md +476 -57
  2. package/dist/autocomplete-D6z5B-WU.cjs +1 -0
  3. package/dist/{autocomplete-BgKbj6M4.js → autocomplete-bgySuP8X.js} +149 -142
  4. package/dist/calendar-CQumLNgS.cjs +1 -0
  5. package/dist/{calendar-j2_zvum1.js → calendar-nkYCMEy3.js} +9 -9
  6. package/dist/charts-Cot5lCgC.cjs +1 -0
  7. package/dist/{charts-CxEy2c3M.js → charts-Dscl6UC3.js} +122 -145
  8. package/dist/cn-B6R3HKzx.cjs +1 -0
  9. package/dist/{cn-DpgY2leY.js → cn-BJyZJP-y.js} +389 -389
  10. package/dist/{component-styles-Bgy44fc8.js → component-styles-C2CbHEEA.js} +2 -2
  11. package/dist/component-styles-DY4wigiq.cjs +1 -0
  12. package/dist/components/accordion.cjs +1 -1
  13. package/dist/components/accordion.js +2 -2
  14. package/dist/components/alert.cjs +1 -1
  15. package/dist/components/alert.js +3 -3
  16. package/dist/components/aspect-ratio.cjs +1 -1
  17. package/dist/components/aspect-ratio.js +1 -1
  18. package/dist/components/auth-backdrop.cjs +1 -1
  19. package/dist/components/auth-backdrop.d.ts +4 -1
  20. package/dist/components/auth-backdrop.js +12 -8
  21. package/dist/components/autocomplete/dropdown.d.ts +4 -1
  22. package/dist/components/autocomplete/multi-trigger.d.ts +3 -1
  23. package/dist/components/autocomplete/single-trigger.d.ts +3 -1
  24. package/dist/components/autocomplete/types.d.ts +15 -0
  25. package/dist/components/autocomplete.cjs +1 -1
  26. package/dist/components/autocomplete.js +1 -1
  27. package/dist/components/avatar-group.cjs +1 -1
  28. package/dist/components/avatar-group.js +1 -1
  29. package/dist/components/avatar.cjs +1 -1
  30. package/dist/components/avatar.js +2 -2
  31. package/dist/components/badge.cjs +1 -1
  32. package/dist/components/badge.js +1 -1
  33. package/dist/components/billing-interval-toggle.cjs +1 -1
  34. package/dist/components/billing-interval-toggle.d.ts +4 -6
  35. package/dist/components/billing-interval-toggle.js +26 -19
  36. package/dist/components/blockquote.cjs +1 -1
  37. package/dist/components/blockquote.js +3 -3
  38. package/dist/components/breadcrumb.cjs +1 -1
  39. package/dist/components/breadcrumb.js +2 -2
  40. package/dist/components/button-group.cjs +1 -1
  41. package/dist/components/button-group.js +1 -1
  42. package/dist/components/button.cjs +1 -1
  43. package/dist/components/button.d.ts +2 -0
  44. package/dist/components/button.js +79 -36
  45. package/dist/components/calendar.cjs +1 -1
  46. package/dist/components/calendar.js +1 -1
  47. package/dist/components/callout.cjs +1 -1
  48. package/dist/components/callout.js +14 -14
  49. package/dist/components/card.cjs +1 -1
  50. package/dist/components/card.js +1 -1
  51. package/dist/components/charts/shared.d.ts +15 -0
  52. package/dist/components/charts.cjs +1 -1
  53. package/dist/components/charts.js +1 -1
  54. package/dist/components/checkbox.cjs +1 -1
  55. package/dist/components/checkbox.js +3 -3
  56. package/dist/components/code.cjs +3 -3
  57. package/dist/components/code.js +4 -4
  58. package/dist/components/command.cjs +1 -1
  59. package/dist/components/command.d.ts +8 -1
  60. package/dist/components/command.js +84 -83
  61. package/dist/components/confirm-dialog.cjs +1 -1
  62. package/dist/components/confirm-dialog.d.ts +8 -1
  63. package/dist/components/confirm-dialog.js +37 -31
  64. package/dist/components/copy-button.cjs +1 -1
  65. package/dist/components/copy-button.js +3 -2
  66. package/dist/components/currency.cjs +1 -1
  67. package/dist/components/currency.js +1 -1
  68. package/dist/components/datatable/types.d.ts +4 -0
  69. package/dist/components/datatable.cjs +1 -1
  70. package/dist/components/datatable.d.ts +1 -5
  71. package/dist/components/datatable.js +1 -1
  72. package/dist/components/datepicker.cjs +1 -1
  73. package/dist/components/datepicker.d.ts +3 -3
  74. package/dist/components/datepicker.js +234 -105
  75. package/dist/components/description-list.cjs +1 -1
  76. package/dist/components/description-list.js +1 -1
  77. package/dist/components/divider.cjs +1 -1
  78. package/dist/components/divider.js +1 -1
  79. package/dist/components/drawer.cjs +1 -1
  80. package/dist/components/drawer.d.ts +6 -1
  81. package/dist/components/drawer.js +128 -2
  82. package/dist/components/dropdown-menu-panel.cjs +1 -0
  83. package/dist/components/dropdown-menu-panel.d.ts +24 -0
  84. package/dist/components/dropdown-menu-panel.js +84 -0
  85. package/dist/components/dropdown-menu.cjs +1 -1
  86. package/dist/components/dropdown-menu.d.ts +5 -1
  87. package/dist/components/dropdown-menu.js +38 -93
  88. package/dist/components/empty-state.cjs +1 -1
  89. package/dist/components/empty-state.d.ts +5 -1
  90. package/dist/components/empty-state.js +9 -9
  91. package/dist/components/error-state.cjs +1 -1
  92. package/dist/components/error-state.js +2 -2
  93. package/dist/components/file-upload.cjs +1 -1
  94. package/dist/components/file-upload.js +4 -4
  95. package/dist/components/form-field.cjs +1 -1
  96. package/dist/components/form-field.d.ts +9 -0
  97. package/dist/components/form-field.js +49 -14
  98. package/dist/components/info-button.cjs +1 -1
  99. package/dist/components/info-button.d.ts +5 -3
  100. package/dist/components/info-button.js +33 -29
  101. package/dist/components/input.cjs +1 -1
  102. package/dist/components/input.js +3 -3
  103. package/dist/components/kbd.cjs +1 -1
  104. package/dist/components/kbd.js +1 -1
  105. package/dist/components/label.cjs +1 -1
  106. package/dist/components/label.js +2 -2
  107. package/dist/components/layout.cjs +1 -1
  108. package/dist/components/layout.js +1 -1
  109. package/dist/components/link.cjs +1 -1
  110. package/dist/components/link.js +1 -1
  111. package/dist/components/list.cjs +1 -1
  112. package/dist/components/list.js +1 -1
  113. package/dist/components/modal.cjs +1 -1
  114. package/dist/components/modal.d.ts +8 -1
  115. package/dist/components/modal.js +74 -120
  116. package/dist/components/navigation.cjs +1 -1
  117. package/dist/components/navigation.js +2 -2
  118. package/dist/components/number-input.cjs +1 -1
  119. package/dist/components/number-input.js +3 -3
  120. package/dist/components/otp-input.cjs +1 -1
  121. package/dist/components/otp-input.js +2 -2
  122. package/dist/components/overlay.cjs +1 -0
  123. package/dist/components/overlay.d.ts +52 -0
  124. package/dist/components/overlay.js +87 -0
  125. package/dist/components/pagination.cjs +1 -1
  126. package/dist/components/pagination.js +2 -2
  127. package/dist/components/popover.cjs +1 -1
  128. package/dist/components/popover.d.ts +2 -1
  129. package/dist/components/popover.js +41 -40
  130. package/dist/components/progressbar.cjs +1 -1
  131. package/dist/components/progressbar.js +1 -1
  132. package/dist/components/radio.cjs +1 -1
  133. package/dist/components/radio.js +3 -3
  134. package/dist/components/rating.cjs +1 -1
  135. package/dist/components/rating.js +3 -3
  136. package/dist/components/richtext.cjs +1 -1
  137. package/dist/components/richtext.js +45 -18
  138. package/dist/components/scroll-area.cjs +1 -1
  139. package/dist/components/scroll-area.js +3 -3
  140. package/dist/components/select/option-list.d.ts +3 -1
  141. package/dist/components/select/types.d.ts +4 -0
  142. package/dist/components/select.cjs +1 -1
  143. package/dist/components/select.js +1 -1
  144. package/dist/components/seo.cjs +1 -1
  145. package/dist/components/seo.js +1 -1
  146. package/dist/components/separator.cjs +1 -1
  147. package/dist/components/separator.js +1 -1
  148. package/dist/components/skeleton.cjs +1 -1
  149. package/dist/components/skeleton.d.ts +14 -1
  150. package/dist/components/skeleton.js +56 -4
  151. package/dist/components/slider.cjs +1 -1
  152. package/dist/components/slider.js +2 -2
  153. package/dist/components/slot.cjs +1 -0
  154. package/dist/components/slot.d.ts +12 -0
  155. package/dist/components/slot.js +16 -0
  156. package/dist/components/snackbar-viewport.cjs +1 -0
  157. package/dist/components/snackbar-viewport.d.ts +27 -0
  158. package/dist/components/snackbar-viewport.js +181 -0
  159. package/dist/components/snackbar.cjs +1 -1
  160. package/dist/components/snackbar.d.ts +5 -1
  161. package/dist/components/snackbar.js +36 -200
  162. package/dist/components/spinner.cjs +1 -1
  163. package/dist/components/spinner.js +1 -1
  164. package/dist/components/stat.cjs +1 -1
  165. package/dist/components/stat.js +1 -1
  166. package/dist/components/status-dot.cjs +1 -1
  167. package/dist/components/status-dot.js +1 -1
  168. package/dist/components/stepper.cjs +1 -1
  169. package/dist/components/stepper.js +5 -5
  170. package/dist/components/switch.cjs +1 -1
  171. package/dist/components/switch.js +37 -43
  172. package/dist/components/table.cjs +1 -1
  173. package/dist/components/table.js +1 -1
  174. package/dist/components/tabs.cjs +1 -1
  175. package/dist/components/tabs.d.ts +6 -4
  176. package/dist/components/tabs.js +51 -81
  177. package/dist/components/tag.cjs +1 -1
  178. package/dist/components/tag.js +1 -1
  179. package/dist/components/terminal.cjs +1 -1
  180. package/dist/components/terminal.js +1 -1
  181. package/dist/components/textarea.cjs +1 -1
  182. package/dist/components/textarea.js +3 -3
  183. package/dist/components/theme-provider.cjs +1 -1
  184. package/dist/components/theme-provider.js +1 -1
  185. package/dist/components/theme-toggle.cjs +1 -1
  186. package/dist/components/theme-toggle.js +27 -3
  187. package/dist/components/time-picker.cjs +1 -1
  188. package/dist/components/time-picker.d.ts +2 -0
  189. package/dist/components/time-picker.js +206 -148
  190. package/dist/components/timeline.cjs +1 -1
  191. package/dist/components/timeline.js +1 -1
  192. package/dist/components/toggle.cjs +1 -1
  193. package/dist/components/toggle.js +2 -2
  194. package/dist/components/tooltip.cjs +1 -1
  195. package/dist/components/tooltip.d.ts +2 -1
  196. package/dist/components/tooltip.js +37 -36
  197. package/dist/components/tree.cjs +1 -1
  198. package/dist/components/tree.js +1 -1
  199. package/dist/components/typography.cjs +1 -1
  200. package/dist/components/typography.d.ts +2 -3
  201. package/dist/components/typography.js +37 -24
  202. package/dist/components/visually-hidden.cjs +1 -0
  203. package/dist/components/visually-hidden.d.ts +16 -0
  204. package/dist/components/visually-hidden.js +13 -0
  205. package/dist/{datatable-yBN4M3UV.js → datatable-BJoZMrKI.js} +6 -6
  206. package/dist/datatable-t0U7t_xh.cjs +1 -0
  207. package/dist/icons-Dfetr1L2.cjs +1 -0
  208. package/dist/icons-Dk7VZ4Ph.js +51 -0
  209. package/dist/index.cjs +1 -1
  210. package/dist/index.d.ts +4 -0
  211. package/dist/index.js +126 -99
  212. package/dist/lib/cn.d.ts +13 -1
  213. package/dist/lib/component-styles.d.ts +14 -2
  214. package/dist/lib/icons.d.ts +12 -0
  215. package/dist/lib/motion.d.ts +58 -0
  216. package/dist/motion-B2shivEB.cjs +1 -0
  217. package/dist/motion-gnRzFS5f.js +62 -0
  218. package/dist/select-ByjnuEcE.cjs +1 -0
  219. package/dist/{select-ClWrcj3R.js → select-CiMzLhUK.js} +128 -122
  220. package/dist/styles.css +1 -1
  221. package/dist/{terminal-CpraMs50.cjs → terminal-1U0ftG3i.cjs} +2 -2
  222. package/dist/{terminal-BOR2cFi1.js → terminal-VXdxVoAv.js} +4 -4
  223. package/dist/use-focus-trap-CPLT49gN.cjs +1 -0
  224. package/dist/use-focus-trap-CS6BXJAB.js +77 -0
  225. package/dist/{utils-CQ8pvCtk.js → utils-DEw5mQrH.js} +1 -1
  226. package/dist/{utils-DOFJTw8o.cjs → utils-MnnCTelh.cjs} +1 -1
  227. package/package.json +56 -9
  228. package/dist/autocomplete-Bk4pRQ2R.cjs +0 -1
  229. package/dist/calendar-CUXpVrVE.cjs +0 -1
  230. package/dist/charts-UDqS1BH1.cjs +0 -1
  231. package/dist/cn-BdjraxxU.cjs +0 -1
  232. package/dist/component-styles-DOUctc8_.cjs +0 -1
  233. package/dist/createLucideIcon-DDY8HuQR.js +0 -42
  234. package/dist/createLucideIcon-b_X_3fj-.cjs +0 -1
  235. package/dist/datatable-rzDgQ3r6.cjs +0 -1
  236. package/dist/drawer-CTeBsYrO.cjs +0 -1
  237. package/dist/drawer-ixuzyLVS.js +0 -189
  238. package/dist/select-BFwx--uK.cjs +0 -1
  239. package/dist/theme-toggle-Bb0BYo51.js +0 -71
  240. package/dist/theme-toggle-Cld8tktJ.cjs +0 -1
package/dist/index.js CHANGED
@@ -1,10 +1,10 @@
1
- import { t as e } from "./cn-DpgY2leY.js";
1
+ import { t as e } from "./cn-BJyZJP-y.js";
2
2
  import { Accordion as t, Collapsible as n } from "./components/accordion.js";
3
3
  import { AspectRatio as r } from "./components/aspect-ratio.js";
4
- import { t as i } from "./calendar-j2_zvum1.js";
4
+ import { t as i } from "./calendar-nkYCMEy3.js";
5
5
  import { Alert as a } from "./components/alert.js";
6
6
  import { AuthBackdrop as ee } from "./components/auth-backdrop.js";
7
- import { t as te } from "./autocomplete-BgKbj6M4.js";
7
+ import { t as te } from "./autocomplete-bgySuP8X.js";
8
8
  import { t as o } from "./use-event-callback-DGkfO_uu.js";
9
9
  import { Avatar as ne } from "./components/avatar.js";
10
10
  import { AvatarGroup as re, AvatarGroupOverflow as ie } from "./components/avatar-group.js";
@@ -12,95 +12,100 @@ import { Badge as ae, badgeVariants as oe } from "./components/badge.js";
12
12
  import { BillingIntervalToggle as s } from "./components/billing-interval-toggle.js";
13
13
  import { Blockquote as c } from "./components/blockquote.js";
14
14
  import { Breadcrumb as l } from "./components/breadcrumb.js";
15
- import { Button as u, buttonSizes as d, buttonVariants as f } from "./components/button.js";
16
- import { ButtonGroup as p } from "./components/button-group.js";
17
- import { Callout as m } from "./components/callout.js";
18
- import { Card as h, CardBody as g, CardDescription as _, CardFooter as v, CardHeader as y, CardTitle as b, cardVariants as x } from "./components/card.js";
19
- import { a as S, c as C, i as w, l as T, n as E, o as D, r as O, s as k, t as A, u as j } from "./charts-CxEy2c3M.js";
20
- import { Checkbox as M } from "./components/checkbox.js";
21
- import { CodeBlock as N, CodeEditor as P, InlineCode as F } from "./components/code.js";
22
- import { a as I, i as L, n as R, r as z, t as B } from "./focus-Dk1YWVPN.js";
23
- import { CommandPalette as V, CommandProvider as H, useCommand as U } from "./components/command.js";
24
- import { Modal as W, ModalBody as G, ModalDescription as K, ModalFooter as q, ModalHeader as se, ModalTitle as ce } from "./components/modal.js";
25
- import { ConfirmDialog as le } from "./components/confirm-dialog.js";
26
- import { CopyButton as ue } from "./components/copy-button.js";
27
- import { Currency as de, formatCurrency as fe } from "./components/currency.js";
28
- import { t as pe } from "./datatable-yBN4M3UV.js";
29
- import { DatePicker as me } from "./components/datepicker.js";
30
- import { DescriptionDetails as he, DescriptionItem as ge, DescriptionList as _e, DescriptionTerm as ve } from "./components/description-list.js";
31
- import { Divider as ye } from "./components/divider.js";
32
- import { t as be } from "./theme-toggle-Bb0BYo51.js";
33
- import { t as xe } from "./drawer-ixuzyLVS.js";
34
- import { DropdownMenu as Se } from "./components/dropdown-menu.js";
35
- import { EmptyState as Ce } from "./components/empty-state.js";
36
- import { ErrorState as we } from "./components/error-state.js";
37
- import { FileUpload as Te } from "./components/file-upload.js";
38
- import { FormField as Ee } from "./components/form-field.js";
39
- import { Input as De } from "./components/input.js";
40
- import { InfoButton as Oe } from "./components/info-button.js";
41
- import { Kbd as ke } from "./components/kbd.js";
42
- import { Label as Ae } from "./components/label.js";
43
- import { Link as je } from "./components/link.js";
44
- import { List as Me, ListItem as Ne } from "./components/list.js";
45
- import { AppShell as Pe, AppShellBody as Fe, AppShellHeader as Ie, AppShellMain as Le, Container as Re, Footer as ze, Inline as Be, PageHeader as Ve, Stack as He } from "./components/layout.js";
46
- import { BottomBar as Ue, BrandLink as We, IconButton as Ge, Navbar as Ke, NavigationLink as qe, Sidebar as Je, Topbar as Ye, TopbarTitle as Xe } from "./components/navigation.js";
47
- import { NumberInput as Ze } from "./components/number-input.js";
48
- import { OtpInput as Qe } from "./components/otp-input.js";
49
- import { Pagination as $e } from "./components/pagination.js";
50
- import { Popover as et, PopoverContent as tt } from "./components/popover.js";
51
- import { Progressbar as nt } from "./components/progressbar.js";
52
- import { Radio as rt, RadioGroup as it } from "./components/radio.js";
53
- import { Rating as at } from "./components/rating.js";
54
- import { RichTextEditor as ot } from "./components/richtext.js";
55
- import { ScrollArea as st } from "./components/scroll-area.js";
56
- import { t as ct } from "./select-ClWrcj3R.js";
57
- import { Separator as lt } from "./components/separator.js";
58
- import { Skeleton as ut, SkeletonAvatar as dt, SkeletonCard as ft, SkeletonTable as pt, SkeletonText as mt, SkeletonTopbar as ht } from "./components/skeleton.js";
59
- import { Slider as gt } from "./components/slider.js";
60
- import { SnackbarProvider as _t, useSnackbar as vt } from "./components/snackbar.js";
61
- import { Spinner as yt } from "./components/spinner.js";
62
- import { Stat as bt } from "./components/stat.js";
63
- import { StatusDot as xt } from "./components/status-dot.js";
64
- import { Stepper as St } from "./components/stepper.js";
65
- import { Switch as Ct } from "./components/switch.js";
66
- import { Table as wt, TableBody as Tt, TableCell as Et, TableHead as Dt, TableHeader as Ot, TableRow as kt } from "./components/table.js";
67
- import { Tabs as At, TabsContent as jt, TabsList as Mt, TabsTrigger as Nt } from "./components/tabs.js";
68
- import { Tag as Pt } from "./components/tag.js";
69
- import { n as Ft, t as It } from "./terminal-BOR2cFi1.js";
70
- import { Textarea as Lt } from "./components/textarea.js";
71
- import { Timeline as Rt } from "./components/timeline.js";
72
- import { Toggle as zt, ToggleGroup as Bt, ToggleGroupItem as Vt, toggleSizes as Ht, toggleVariants as Ut } from "./components/toggle.js";
73
- import { Tooltip as Wt } from "./components/tooltip.js";
74
- import { ThemeProvider as Gt, useTheme as Kt } from "./components/theme-provider.js";
75
- import { TimePicker as qt } from "./components/time-picker.js";
76
- import { Tree as Jt } from "./components/tree.js";
77
- import { Heading as Yt, Prose as Xt, Text as Zt, Time as Qt } from "./components/typography.js";
78
- import { ArticleJsonLd as $t, BreadcrumbJsonLd as en, SeoImage as tn, StructuredData as nn } from "./components/seo.js";
79
- import { Component as rn, useCallback as J, useEffect as Y, useLayoutEffect as X, useRef as Z, useState as Q } from "react";
80
- import { jsx as $, jsxs as an } from "react/jsx-runtime";
15
+ import { Slot as u } from "./components/slot.js";
16
+ import { Button as d, buttonSizes as f, buttonVariants as p } from "./components/button.js";
17
+ import { ButtonGroup as m } from "./components/button-group.js";
18
+ import { Callout as h } from "./components/callout.js";
19
+ import { Card as g, CardBody as _, CardDescription as v, CardFooter as y, CardHeader as b, CardTitle as x, cardVariants as S } from "./components/card.js";
20
+ import { a as C, c as w, i as T, l as E, n as D, o as O, r as k, s as A, t as j, u as M } from "./charts-Dscl6UC3.js";
21
+ import { Checkbox as N } from "./components/checkbox.js";
22
+ import { CodeBlock as P, CodeEditor as F, InlineCode as I } from "./components/code.js";
23
+ import { a as L, i as R, n as z, r as B, t as V } from "./focus-Dk1YWVPN.js";
24
+ import { n as H, t as U } from "./motion-gnRzFS5f.js";
25
+ import { CommandPalette as W, CommandProvider as G, useCommand as K } from "./components/command.js";
26
+ import { n as q, r as se, t as ce } from "./use-focus-trap-CS6BXJAB.js";
27
+ import { Modal as le, ModalBody as ue, ModalDescription as de, ModalFooter as fe, ModalHeader as pe, ModalTitle as me } from "./components/modal.js";
28
+ import { ConfirmDialog as he } from "./components/confirm-dialog.js";
29
+ import { CopyButton as ge } from "./components/copy-button.js";
30
+ import { Currency as _e, formatCurrency as ve } from "./components/currency.js";
31
+ import { t as ye } from "./datatable-BJoZMrKI.js";
32
+ import { DatePicker as be } from "./components/datepicker.js";
33
+ import { DescriptionDetails as xe, DescriptionItem as Se, DescriptionList as Ce, DescriptionTerm as we } from "./components/description-list.js";
34
+ import { Divider as Te } from "./components/divider.js";
35
+ import { Drawer as Ee } from "./components/drawer.js";
36
+ import { DropdownMenu as De } from "./components/dropdown-menu.js";
37
+ import { EmptyState as Oe } from "./components/empty-state.js";
38
+ import { ErrorState as ke } from "./components/error-state.js";
39
+ import { FileUpload as Ae } from "./components/file-upload.js";
40
+ import { Field as je, FieldContent as Me, FieldDescription as Ne, FieldError as Pe, FieldLabel as Fe, FormField as Ie } from "./components/form-field.js";
41
+ import { Input as Le } from "./components/input.js";
42
+ import { InfoButton as Re } from "./components/info-button.js";
43
+ import { Kbd as ze } from "./components/kbd.js";
44
+ import { Label as Be } from "./components/label.js";
45
+ import { Link as Ve } from "./components/link.js";
46
+ import { List as He, ListItem as Ue } from "./components/list.js";
47
+ import { AppShell as We, AppShellBody as Ge, AppShellHeader as Ke, AppShellMain as qe, Container as Je, Footer as Ye, Inline as Xe, PageHeader as Ze, Stack as Qe } from "./components/layout.js";
48
+ import { BottomBar as $e, BrandLink as et, IconButton as tt, Navbar as nt, NavigationLink as rt, Sidebar as it, Topbar as at, TopbarTitle as J } from "./components/navigation.js";
49
+ import { NumberInput as ot } from "./components/number-input.js";
50
+ import { OtpInput as st } from "./components/otp-input.js";
51
+ import { Pagination as ct } from "./components/pagination.js";
52
+ import { Popover as lt, PopoverContent as ut } from "./components/popover.js";
53
+ import { Progressbar as dt } from "./components/progressbar.js";
54
+ import { Radio as ft, RadioGroup as pt } from "./components/radio.js";
55
+ import { Rating as mt } from "./components/rating.js";
56
+ import { RichTextEditor as ht } from "./components/richtext.js";
57
+ import { ScrollArea as gt } from "./components/scroll-area.js";
58
+ import { t as _t } from "./select-CiMzLhUK.js";
59
+ import { Separator as vt } from "./components/separator.js";
60
+ import { Skeleton as yt, SkeletonAvatar as bt, SkeletonCard as xt, SkeletonList as St, SkeletonStat as Ct, SkeletonTable as wt, SkeletonText as Tt, SkeletonTopbar as Et } from "./components/skeleton.js";
61
+ import { Slider as Dt } from "./components/slider.js";
62
+ import { SnackbarProvider as Ot, useSnackbar as kt } from "./components/snackbar.js";
63
+ import { Spinner as At } from "./components/spinner.js";
64
+ import { Stat as jt } from "./components/stat.js";
65
+ import { StatusDot as Mt } from "./components/status-dot.js";
66
+ import { Stepper as Nt } from "./components/stepper.js";
67
+ import { Switch as Pt } from "./components/switch.js";
68
+ import { Table as Ft, TableBody as It, TableCell as Lt, TableHead as Rt, TableHeader as zt, TableRow as Bt } from "./components/table.js";
69
+ import { Tabs as Vt, TabsContent as Ht, TabsList as Ut, TabsTrigger as Wt } from "./components/tabs.js";
70
+ import { Tag as Gt } from "./components/tag.js";
71
+ import { n as Kt, t as qt } from "./terminal-VXdxVoAv.js";
72
+ import { Textarea as Jt } from "./components/textarea.js";
73
+ import { Timeline as Yt } from "./components/timeline.js";
74
+ import { Toggle as Xt, ToggleGroup as Zt, ToggleGroupItem as Qt, toggleSizes as $t, toggleVariants as en } from "./components/toggle.js";
75
+ import { Tooltip as tn } from "./components/tooltip.js";
76
+ import { ThemeProvider as nn, useTheme as rn } from "./components/theme-provider.js";
77
+ import { ThemeToggle as an } from "./components/theme-toggle.js";
78
+ import { TimePicker as on } from "./components/time-picker.js";
79
+ import { Tree as sn } from "./components/tree.js";
80
+ import { Heading as cn, Prose as ln, Text as un } from "./components/typography.js";
81
+ import { ArticleJsonLd as dn, BreadcrumbJsonLd as fn, SeoImage as pn, StructuredData as mn } from "./components/seo.js";
82
+ import { VisuallyHidden as hn } from "./components/visually-hidden.js";
83
+ import { Overlay as gn, OverlayBackdrop as _n } from "./components/overlay.js";
84
+ import { Component as vn, useCallback as Y, useEffect as X, useLayoutEffect as yn, useRef as Z, useState as Q } from "react";
85
+ import { jsx as $, jsxs as bn } from "react/jsx-runtime";
81
86
  //#region src/hooks/use-is-mounted.ts
82
- function on() {
87
+ function xn() {
83
88
  let e = Z(!1);
84
- return Y(() => (e.current = !0, () => {
89
+ return X(() => (e.current = !0, () => {
85
90
  e.current = !1;
86
- }), []), J(() => e.current, []);
91
+ }), []), Y(() => e.current, []);
87
92
  }
88
93
  //#endregion
89
94
  //#region src/hooks/use-isomorphic-layout-effect.ts
90
- var sn = typeof window < "u" ? X : Y;
95
+ var Sn = typeof window < "u" ? yn : X;
91
96
  //#endregion
92
97
  //#region src/hooks/use-previous.ts
93
- function cn(e) {
98
+ function Cn(e) {
94
99
  let t = Z(void 0);
95
- return Y(() => {
100
+ return X(() => {
96
101
  t.current = e;
97
102
  }, [e]), t.current;
98
103
  }
99
104
  //#endregion
100
105
  //#region src/hooks/use-update-effect.ts
101
- function ln(e, t) {
106
+ function wn(e, t) {
102
107
  let n = Z(!1);
103
- Y(() => {
108
+ X(() => {
104
109
  if (!n.current) {
105
110
  n.current = !0;
106
111
  return;
@@ -110,17 +115,17 @@ function ln(e, t) {
110
115
  }
111
116
  //#endregion
112
117
  //#region src/hooks/use-controllable-state.ts
113
- function un({ value: e, defaultValue: t, onChange: n }) {
118
+ function Tn({ value: e, defaultValue: t, onChange: n }) {
114
119
  let [r, i] = Q(t), a = e !== void 0;
115
- return [a ? e : r, J((e) => {
120
+ return [a ? e : r, Y((e) => {
116
121
  a || i(e), n?.(e);
117
122
  }, [a, n])];
118
123
  }
119
124
  //#endregion
120
125
  //#region src/hooks/use-media-query.ts
121
- function dn(e) {
126
+ function En(e) {
122
127
  let [t, n] = Q(() => typeof window > "u" || window.matchMedia === void 0 ? !1 : window.matchMedia(e).matches);
123
- return Y(() => {
128
+ return X(() => {
124
129
  let t = window.matchMedia(e), r = () => n(t.matches);
125
130
  return t.addEventListener ? t.addEventListener("change", r) : t.addListener(r), () => {
126
131
  t.removeEventListener ? t.removeEventListener("change", r) : t.removeListener(r);
@@ -129,28 +134,50 @@ function dn(e) {
129
134
  }
130
135
  //#endregion
131
136
  //#region src/hooks/use-abort-signal.ts
132
- function fn(e = []) {
137
+ function Dn(e = []) {
133
138
  let t = Z(null);
134
- return t.current === null && (t.current = new AbortController()), Y(() => {
139
+ return t.current === null && (t.current = new AbortController()), X(() => {
135
140
  let e = new AbortController();
136
141
  return t.current = e, () => e.abort();
137
142
  }, e), t.current.signal;
138
143
  }
139
144
  //#endregion
145
+ //#region src/hooks/use-outside-click.ts
146
+ function On(e, t, n, r = {}) {
147
+ let i = o(n);
148
+ X(() => {
149
+ if (!t) return;
150
+ function n(t) {
151
+ e.current?.contains(t.target) || i();
152
+ }
153
+ function a(e) {
154
+ r.escape !== !1 && e.key === "Escape" && (e.preventDefault(), i());
155
+ }
156
+ return document.addEventListener("mousedown", n), r.escape !== !1 && document.addEventListener("keydown", a), () => {
157
+ document.removeEventListener("mousedown", n), document.removeEventListener("keydown", a);
158
+ };
159
+ }, [
160
+ t,
161
+ e,
162
+ i,
163
+ r.escape
164
+ ]);
165
+ }
166
+ //#endregion
140
167
  //#region src/utils/portal.ts
141
- function pn(e = "rui-portal") {
168
+ function kn(e = "rui-portal") {
142
169
  if (typeof document > "u") return null;
143
170
  let t = document.getElementById(e);
144
171
  return t || (t = document.createElement("div"), t.id = e, document.body.appendChild(t)), t;
145
172
  }
146
173
  //#endregion
147
174
  //#region src/utils/assert.ts
148
- function mn(e, t) {
175
+ function An(e, t) {
149
176
  if (!e) throw Error(t);
150
177
  }
151
178
  //#endregion
152
179
  //#region src/errors/error-boundary.tsx
153
- var hn = class extends rn {
180
+ var jn = class extends vn {
154
181
  state = {
155
182
  hasError: !1,
156
183
  error: null
@@ -172,23 +199,23 @@ var hn = class extends rn {
172
199
  };
173
200
  render() {
174
201
  if (this.state.hasError) {
175
- let { fallback: e } = this.props;
176
- return typeof e == "function" ? e(this.state.error, this.reset) : e || /* @__PURE__ */ an("div", {
202
+ let { fallback: t } = this.props;
203
+ return typeof t == "function" ? t(this.state.error, this.reset) : t || /* @__PURE__ */ bn("div", {
177
204
  role: "alert",
178
- className: "rounded-lg border border-red-500/20 bg-red-500/[0.06] p-4 text-sm text-red-700 dark:text-red-300",
205
+ className: e("rounded-lg border border-red-500/20 bg-red-500/[0.06] p-4 text-sm text-red-700 dark:text-red-300", this.props.className),
179
206
  children: [
180
207
  /* @__PURE__ */ $("p", {
181
- className: "font-medium",
208
+ className: e("font-medium", this.props.titleClassName),
182
209
  children: "Something went wrong."
183
210
  }),
184
211
  /* @__PURE__ */ $("p", {
185
- className: "mt-1 text-xs opacity-80",
212
+ className: e("mt-1 text-xs opacity-80", this.props.descriptionClassName),
186
213
  children: this.state.error?.message
187
214
  }),
188
215
  /* @__PURE__ */ $("button", {
189
216
  type: "button",
190
217
  onClick: this.reset,
191
- className: "mt-3 rounded-md bg-red-600 px-3 py-1.5 text-xs font-medium text-white hover:bg-red-500",
218
+ className: e("mt-3 rounded-md bg-red-600 px-3 py-1.5 text-xs font-medium text-white hover:bg-red-500", this.props.retryButtonClassName),
192
219
  children: "Try again"
193
220
  })
194
221
  ]
@@ -199,9 +226,9 @@ var hn = class extends rn {
199
226
  };
200
227
  //#endregion
201
228
  //#region src/lifecycle/create-safe-effect.ts
202
- function gn(e, t) {
229
+ function Mn(e, t) {
203
230
  let n = Z(null);
204
- Y(() => {
231
+ X(() => {
205
232
  let t = new AbortController();
206
233
  n.current = t;
207
234
  let r = !0, i = e({
@@ -215,13 +242,13 @@ function gn(e, t) {
215
242
  }
216
243
  //#endregion
217
244
  //#region src/lifecycle/mount.ts
218
- function _n(e) {
245
+ function Nn(e) {
219
246
  let t = o(e);
220
- Y(() => t(), [t]);
247
+ X(() => t(), [t]);
221
248
  }
222
- function vn(e) {
249
+ function Pn(e) {
223
250
  let t = o(e);
224
- Y(() => () => t(), [t]);
251
+ X(() => () => t(), [t]);
225
252
  }
226
253
  //#endregion
227
- export { t as Accordion, a as Alert, Pe as AppShell, Fe as AppShellBody, Ie as AppShellHeader, Le as AppShellMain, $t as ArticleJsonLd, r as AspectRatio, ee as AuthBackdrop, te as Autocomplete, ne as Avatar, re as AvatarGroup, ie as AvatarGroupOverflow, ae as Badge, j as BarChart, s as BillingIntervalToggle, c as Blockquote, Ue as BottomBar, We as BrandLink, l as Breadcrumb, en as BreadcrumbJsonLd, u as Button, p as ButtonGroup, i as Calendar, m as Callout, h as Card, g as CardBody, _ as CardDescription, v as CardFooter, y as CardHeader, b as CardTitle, M as Checkbox, N as CodeBlock, P as CodeEditor, n as Collapsible, V as CommandPalette, H as CommandProvider, le as ConfirmDialog, Re as Container, ue as CopyButton, de as Currency, z as DURATIONS, pe as DataTable, me as DatePicker, he as DescriptionDetails, ge as DescriptionItem, _e as DescriptionList, ve as DescriptionTerm, ye as Divider, k as DonutChart, xe as Drawer, Se as DropdownMenu, Ce as EmptyState, hn as ErrorBoundary, we as ErrorState, L as FOCUSABLE_SELECTOR, Te as FileUpload, ze as Footer, Ee as FormField, E as FunnelChart, S as GanttChart, Yt as Heading, w as HeatmapChart, Ge as IconButton, Oe as InfoButton, Be as Inline, F as InlineCode, De as Input, I as KEY, ke as Kbd, Ae as Label, T as LineChart, je as Link, Me as List, Ne as ListItem, W as Modal, G as ModalBody, K as ModalDescription, q as ModalFooter, se as ModalHeader, ce as ModalTitle, C as MultiLineChart, Ke as Navbar, qe as NavigationLink, Ze as NumberInput, Qe as OtpInput, Ve as PageHeader, $e as Pagination, et as Popover, tt as PopoverContent, nt as Progressbar, Xt as Prose, O as RadarChart, rt as Radio, it as RadioGroup, at as Rating, ot as RichTextEditor, D as ScatterChart, st as ScrollArea, ct as Select, tn as SeoImage, lt as Separator, Je as Sidebar, ut as Skeleton, dt as SkeletonAvatar, ft as SkeletonCard, pt as SkeletonTable, mt as SkeletonText, ht as SkeletonTopbar, gt as Slider, _t as SnackbarProvider, yt as Spinner, He as Stack, bt as Stat, xt as StatusDot, St as Stepper, nn as StructuredData, Ct as Switch, wt as Table, Tt as TableBody, Et as TableCell, Dt as TableHead, Ot as TableHeader, kt as TableRow, At as Tabs, jt as TabsContent, Mt as TabsList, Nt as TabsTrigger, Pt as Tag, Ft as TerminalBlock, It as TerminalEmulator, Zt as Text, Lt as Textarea, Gt as ThemeProvider, be as ThemeToggle, Qt as Time, qt as TimePicker, Rt as Timeline, zt as Toggle, Bt as ToggleGroup, Vt as ToggleGroupItem, Wt as Tooltip, Ye as Topbar, Xe as TopbarTitle, Jt as Tree, A as WaterfallChart, oe as badgeVariants, d as buttonSizes, f as buttonVariants, x as cardVariants, e as cn, fe as formatCurrency, B as getFocusable, mn as invariant, pn as portalTarget, Ht as toggleSizes, Ut as toggleVariants, R as trapFocus, fn as useAbortSignal, U as useCommand, un as useControllableState, o as useEventCallback, on as useIsMounted, sn as useIsomorphicLayoutEffect, dn as useMediaQuery, _n as useMountEffect, cn as usePrevious, gn as useSafeEffect, vt as useSnackbar, Kt as useTheme, vn as useUnmountEffect, ln as useUpdateEffect };
254
+ export { t as Accordion, a as Alert, We as AppShell, Ge as AppShellBody, Ke as AppShellHeader, qe as AppShellMain, dn as ArticleJsonLd, r as AspectRatio, ee as AuthBackdrop, te as Autocomplete, ne as Avatar, re as AvatarGroup, ie as AvatarGroupOverflow, ae as Badge, M as BarChart, s as BillingIntervalToggle, c as Blockquote, $e as BottomBar, et as BrandLink, l as Breadcrumb, fn as BreadcrumbJsonLd, d as Button, m as ButtonGroup, i as Calendar, h as Callout, g as Card, _ as CardBody, v as CardDescription, y as CardFooter, b as CardHeader, x as CardTitle, N as Checkbox, P as CodeBlock, F as CodeEditor, n as Collapsible, W as CommandPalette, G as CommandProvider, he as ConfirmDialog, Je as Container, ge as CopyButton, _e as Currency, B as DURATIONS, ye as DataTable, be as DatePicker, xe as DescriptionDetails, Se as DescriptionItem, Ce as DescriptionList, we as DescriptionTerm, Te as Divider, A as DonutChart, Ee as Drawer, De as DropdownMenu, Oe as EmptyState, jn as ErrorBoundary, ke as ErrorState, R as FOCUSABLE_SELECTOR, je as Field, Me as FieldContent, Ne as FieldDescription, Pe as FieldError, Fe as FieldLabel, Ae as FileUpload, Ye as Footer, Ie as FormField, D as FunnelChart, C as GanttChart, cn as Heading, T as HeatmapChart, tt as IconButton, Re as InfoButton, Xe as Inline, I as InlineCode, Le as Input, L as KEY, ze as Kbd, Be as Label, E as LineChart, Ve as Link, He as List, Ue as ListItem, le as Modal, ue as ModalBody, de as ModalDescription, fe as ModalFooter, pe as ModalHeader, me as ModalTitle, w as MultiLineChart, nt as Navbar, rt as NavigationLink, ot as NumberInput, st as OtpInput, gn as Overlay, _n as OverlayBackdrop, Ze as PageHeader, ct as Pagination, lt as Popover, ut as PopoverContent, dt as Progressbar, ln as Prose, k as RadarChart, ft as Radio, pt as RadioGroup, mt as Rating, ht as RichTextEditor, O as ScatterChart, gt as ScrollArea, _t as Select, pn as SeoImage, vt as Separator, it as Sidebar, yt as Skeleton, bt as SkeletonAvatar, xt as SkeletonCard, St as SkeletonList, Ct as SkeletonStat, wt as SkeletonTable, Tt as SkeletonText, Et as SkeletonTopbar, Dt as Slider, u as Slot, Ot as SnackbarProvider, At as Spinner, Qe as Stack, jt as Stat, Mt as StatusDot, Nt as Stepper, mn as StructuredData, Pt as Switch, Ft as Table, It as TableBody, Lt as TableCell, Rt as TableHead, zt as TableHeader, Bt as TableRow, Vt as Tabs, Ht as TabsContent, Ut as TabsList, Wt as TabsTrigger, Gt as Tag, Kt as TerminalBlock, qt as TerminalEmulator, un as Text, Jt as Textarea, nn as ThemeProvider, an as ThemeToggle, on as TimePicker, Yt as Timeline, Xt as Toggle, Zt as ToggleGroup, Qt as ToggleGroupItem, tn as Tooltip, at as Topbar, J as TopbarTitle, sn as Tree, hn as VisuallyHidden, j as WaterfallChart, oe as badgeVariants, f as buttonSizes, p as buttonVariants, S as cardVariants, e as cn, ve as formatCurrency, V as getFocusable, An as invariant, U as motionTokens, kn as portalTarget, $t as toggleSizes, en as toggleVariants, H as transitions, z as trapFocus, Dn as useAbortSignal, K as useCommand, Tn as useControllableState, o as useEventCallback, ce as useFocusTrap, xn as useIsMounted, Sn as useIsomorphicLayoutEffect, En as useMediaQuery, Nn as useMountEffect, On as useOutsideClick, Cn as usePrevious, q as useRestoreFocus, Mn as useSafeEffect, se as useScrollLock, kt as useSnackbar, rn as useTheme, Pn as useUnmountEffect, wn as useUpdateEffect };
package/dist/lib/cn.d.ts CHANGED
@@ -1,2 +1,14 @@
1
- import { ClassValue } from 'clsx';
1
+ /**
2
+ * Accepted by {@link cn} — strings, numbers, nested arrays, or
3
+ * `{ "class": boolean }` maps. Mirrors clsx's `ClassValue`.
4
+ */
5
+ export type ClassValue = string | number | bigint | null | boolean | undefined | ClassValue[] | {
6
+ [key: string]: unknown;
7
+ };
8
+ /**
9
+ * Join conditional class values and resolve conflicting Tailwind utilities so a
10
+ * caller's `className` reliably wins over a component's defaults
11
+ * (`cn("px-2", "px-4")` → `"px-4"`). `tailwind-merge` is bundled into the
12
+ * published package — @bzync/rui ships with no runtime dependencies.
13
+ */
2
14
  export declare function cn(...inputs: ClassValue[]): string;
@@ -4,7 +4,19 @@ export declare const fieldRootStyles = "flex w-full flex-col gap-1.5";
4
4
  export declare const fieldLabelStyles = "text-xs font-semibold leading-5 text-foreground";
5
5
  export declare const fieldDescriptionStyles = "text-xs leading-5 text-muted-foreground";
6
6
  export declare const fieldErrorStyles = "text-xs leading-5 text-destructive";
7
+ /** Text inputs / selects / textareas: the ring hugs the border (no offset gap)
8
+ * and the border itself turns cobalt — that colored edge is this system's
9
+ * "inset line", the field-shaped counterpart to the focus halo on buttons. */
7
10
  export declare const controlBaseStyles: string;
8
- export declare const controlInvalidStyles = "border-destructive/60 hover:border-destructive/70 focus-within:border-destructive focus-within:ring-destructive/20";
9
- export declare const focusRingStyles = "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring/35 focus-visible:ring-offset-2 focus-visible:ring-offset-bg";
11
+ export declare const controlInvalidStyles = "border-destructive/60 hover:border-destructive/70 focus-within:border-destructive focus-within:ring-destructive/25";
12
+ /** The library's signature focus treatment. Routes through the `.focus-ring`
13
+ * utility in globals.css (1px inset hairline + 3px cobalt halo with a 2px gap),
14
+ * so every button, tab, menu item, link, and toggle that opts in shares one
15
+ * byte-identical focus state. Requires the element to sit inside a
16
+ * `ThemeProvider` (`.rui-theme`) scope — always true for library consumers. */
17
+ export declare const focusRingStyles = "focus-ring";
18
+ /** For controls whose focusable element is a sibling (checkbox/radio/switch
19
+ * inputs visually hidden behind a styled proxy). Mirrors the halo geometry with
20
+ * peer-* utilities since the box-shadow utility can't reach across elements. */
21
+ export declare const peerFocusRingStyles = "peer-focus-visible:ring-[3px] peer-focus-visible:ring-focus-ring/35 peer-focus-visible:ring-offset-2 peer-focus-visible:ring-offset-bg";
10
22
  export declare const iconButtonStyles: string;
@@ -0,0 +1,12 @@
1
+ import { SVGProps } from 'react';
2
+ /**
3
+ * The three glyphs the library itself renders (Drawer close, ThemeToggle
4
+ * sun/moon). Inlined so `lucide-react` is not a runtime dependency — consumers
5
+ * still pass their own icons everywhere else. Paths are lucide's (ISC).
6
+ */
7
+ export type IconProps = Omit<SVGProps<SVGSVGElement>, "size"> & {
8
+ size?: number | string;
9
+ };
10
+ export declare function CloseIcon(props: IconProps): import("react").JSX.Element;
11
+ export declare function SunIcon(props: IconProps): import("react").JSX.Element;
12
+ export declare function MoonIcon(props: IconProps): import("react").JSX.Element;
@@ -0,0 +1,58 @@
1
+ /**
2
+ * Motion tokens — single source for framer-motion transitions.
3
+ * Maps CSS variables to JS durations/easings so code and stylesheet agree.
4
+ */
5
+ export declare const motionTokens: {
6
+ readonly duration: {
7
+ readonly instant: 0;
8
+ readonly fast: 0.12;
9
+ readonly normal: 0.2;
10
+ readonly slow: 0.32;
11
+ };
12
+ readonly ease: {
13
+ readonly standard: readonly [0.2, 0, 0, 1];
14
+ readonly enter: readonly [0.16, 1, 0.3, 1];
15
+ readonly exit: readonly [0.4, 0, 1, 1];
16
+ };
17
+ readonly spring: {
18
+ readonly snappy: {
19
+ readonly type: "spring";
20
+ readonly stiffness: 450;
21
+ readonly damping: 32;
22
+ };
23
+ readonly gentle: {
24
+ readonly type: "spring";
25
+ readonly stiffness: 600;
26
+ readonly damping: 35;
27
+ };
28
+ };
29
+ };
30
+ /** Common transitions */
31
+ export declare const transitions: {
32
+ readonly overlay: {
33
+ readonly duration: 0.2;
34
+ readonly ease: readonly [0.2, 0, 0, 1];
35
+ };
36
+ readonly panelEnter: {
37
+ readonly duration: 0.22;
38
+ readonly ease: readonly [0.16, 1, 0.3, 1];
39
+ };
40
+ readonly panelExit: {
41
+ readonly duration: 0.2;
42
+ readonly ease: readonly [0.4, 0, 1, 1];
43
+ };
44
+ readonly fade: {
45
+ readonly duration: 0.12;
46
+ readonly ease: readonly [0.2, 0, 0, 1];
47
+ };
48
+ readonly tabIndicator: {
49
+ readonly type: "spring";
50
+ readonly stiffness: 450;
51
+ readonly damping: 32;
52
+ };
53
+ readonly switchThumb: {
54
+ readonly type: "spring";
55
+ readonly stiffness: 600;
56
+ readonly damping: 35;
57
+ };
58
+ };
@@ -0,0 +1 @@
1
+ var e={duration:{instant:0,fast:.12,normal:.2,slow:.32},ease:{standard:[.2,0,0,1],enter:[.16,1,.3,1],exit:[.4,0,1,1]},spring:{snappy:{type:`spring`,stiffness:450,damping:32},gentle:{type:`spring`,stiffness:600,damping:35}}},t={overlay:{duration:e.duration.normal,ease:e.ease.standard},panelEnter:{duration:.22,ease:e.ease.enter},panelExit:{duration:.2,ease:e.ease.exit},fade:{duration:e.duration.fast,ease:e.ease.standard},tabIndicator:e.spring.snappy,switchThumb:e.spring.gentle};Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return t}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return e}});
@@ -0,0 +1,62 @@
1
+ //#region src/lib/motion.ts
2
+ var e = {
3
+ duration: {
4
+ instant: 0,
5
+ fast: .12,
6
+ normal: .2,
7
+ slow: .32
8
+ },
9
+ ease: {
10
+ standard: [
11
+ .2,
12
+ 0,
13
+ 0,
14
+ 1
15
+ ],
16
+ enter: [
17
+ .16,
18
+ 1,
19
+ .3,
20
+ 1
21
+ ],
22
+ exit: [
23
+ .4,
24
+ 0,
25
+ 1,
26
+ 1
27
+ ]
28
+ },
29
+ spring: {
30
+ snappy: {
31
+ type: "spring",
32
+ stiffness: 450,
33
+ damping: 32
34
+ },
35
+ gentle: {
36
+ type: "spring",
37
+ stiffness: 600,
38
+ damping: 35
39
+ }
40
+ }
41
+ }, t = {
42
+ overlay: {
43
+ duration: e.duration.normal,
44
+ ease: e.ease.standard
45
+ },
46
+ panelEnter: {
47
+ duration: .22,
48
+ ease: e.ease.enter
49
+ },
50
+ panelExit: {
51
+ duration: .2,
52
+ ease: e.ease.exit
53
+ },
54
+ fade: {
55
+ duration: e.duration.fast,
56
+ ease: e.ease.standard
57
+ },
58
+ tabIndicator: e.spring.snappy,
59
+ switchThumb: e.spring.gentle
60
+ };
61
+ //#endregion
62
+ export { t as n, e as t };
@@ -0,0 +1 @@
1
+ const e=require("./cn-B6R3HKzx.cjs"),t=require("./component-styles-DY4wigiq.cjs"),n=require("./utils-MnnCTelh.cjs"),r=require("./use-event-callback-Du9_9eAi.cjs");let i=require("framer-motion"),a=require("react"),o=require("react/jsx-runtime"),s=require("react-dom");function c({listId:t,listRef:r,open:a,pos:c,options:u,flat:d,activeIdx:f,setActiveIdx:p,isSelected:m,onSelect:h,colorDot:g,multiselectable:_=!1,className:v,optionClassName:y,groupLabelClassName:b}){return typeof document>`u`?null:(0,s.createPortal)((0,o.jsx)(i.AnimatePresence,{children:a&&c&&(0,o.jsx)(i.motion.ul,{ref:r,id:t,role:`listbox`,"aria-multiselectable":_,initial:{opacity:0,y:c.placement===`bottom`?-4:4,scaleY:.97},animate:{opacity:1,y:0,scaleY:1},exit:{opacity:0,y:c.placement===`bottom`?-4:4,scaleY:.97},transition:{duration:.13},style:{originY:c.placement===`bottom`?0:1,position:`fixed`,top:c.top,left:c.left,width:c.width,maxHeight:c.maxHeight},className:e.t(`z-[110] overflow-y-auto rounded-[var(--radius-lg)] border border-border bg-surface-raised py-1 shadow-floating`,v),children:u.map((r,i)=>n.a(r)?(0,o.jsxs)(`li`,{children:[(0,o.jsx)(`p`,{className:e.t(`px-3 pt-2 pb-1 text-xs font-semibold text-slate-600 uppercase tracking-widest`,b),children:r.group}),(0,o.jsx)(`ul`,{children:r.options.map(e=>{let n=d.find(t=>t.value===e.value);return(0,o.jsx)(l,{opt:e,listId:t,flatIdx:n.flatIdx,isActive:n.flatIdx===f,isSelected:m(e.value),onSelect:h,onHover:p,colorDot:g,className:y},e.value)})})]},i):(0,o.jsx)(l,{opt:r,listId:t,flatIdx:d.find(e=>e.value===r.value).flatIdx,isActive:d.find(e=>e.value===r.value).flatIdx===f,isSelected:m(r.value),onSelect:h,onHover:p,colorDot:g,className:y},r.value))})}),document.body)}function l({opt:t,listId:n,flatIdx:r,isActive:i,isSelected:a,onSelect:s,onHover:c,colorDot:l,className:u}){return(0,o.jsxs)(`li`,{id:`${n}-opt-${r}`,role:`option`,"aria-selected":a,"aria-disabled":t.disabled,"data-idx":r,onMouseDown:e=>e.preventDefault(),onClick:()=>!t.disabled&&s(t),onMouseEnter:()=>!t.disabled&&c(r),className:e.t(`flex min-h-9 items-center gap-3 px-3 py-2 cursor-pointer transition-colors select-none`,i&&`bg-surface-muted`,a&&!i&&`bg-accent-50 dark:bg-accent-500/10`,t.disabled&&`opacity-40 cursor-not-allowed pointer-events-none`,u),children:[t.icon&&(0,o.jsx)(`span`,{className:`shrink-0 text-slate-500 dark:text-slate-400`,children:t.icon}),t.color&&t.color!=="default"&&(0,o.jsx)(`span`,{className:e.t(`w-2 h-2 rounded-full shrink-0`,l[t.color])}),(0,o.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,o.jsx)(`p`,{className:e.t(`text-sm leading-snug truncate`,a?`text-accent-700 dark:text-accent-300 font-medium`:`text-foreground`),children:t.label}),t.description&&(0,o.jsx)(`p`,{className:`mt-0.5 truncate text-xs text-muted-foreground`,children:t.description})]}),a&&(0,o.jsx)(`svg`,{"aria-hidden":`true`,width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,className:`text-accent-600 shrink-0`,children:(0,o.jsx)(`path`,{d:`m20 6-11 11-5-5`})})]})}var u=(0,a.forwardRef)(({options:i,value:s,defaultValue:l,onChange:u,placeholder:d=`Select…`,label:f,hint:p,error:m,disabled:h,required:g,clearable:_=!1,className:v,wrapperClassName:y,triggerClassName:b,listClassName:x,labelClassName:S,messageClassName:C,optionClassName:w,groupLabelClassName:T,id:E,unstyled:D=!1},O)=>{let k=(0,a.useId)(),A=E??k,j=`${A}-list`,M=`${A}-message`,[N,P]=(0,a.useState)(!1),[F,I]=(0,a.useState)(l??``),[L,R]=(0,a.useState)(-1),z=(0,a.useRef)(null),B=(0,a.useRef)(null),V=r.t(e=>u?.(e)),H=s===void 0?F:s,U=(0,a.useMemo)(()=>n.i(i),[i]),W=(0,a.useMemo)(()=>U.find(e=>e.value===H),[U,H]),G=(0,a.useCallback)(e=>{s===void 0&&I(e.value),V(e.value),P(!1),R(-1)},[s,V]),K=(0,a.useCallback)(e=>{e.stopPropagation(),s===void 0&&I(``),V(``)},[s,V]),q=(0,a.useCallback)(e=>{if(!N){if([`Enter`,` `,`ArrowDown`,`ArrowUp`].includes(e.key)){e.preventDefault(),P(!0);let t=U.find(e=>e.value===H&&e.flatIdx>=0)?.flatIdx??-1,n=U.filter(e=>e.flatIdx>=0);R(t>=0?t:e.key===`ArrowUp`?n[n.length-1]?.flatIdx??-1:n[0]?.flatIdx??-1)}return}if(e.key===`ArrowDown`)e.preventDefault(),R(e=>{let t=U.filter(e=>e.flatIdx>=0),n=t.findIndex(t=>t.flatIdx===e);return t[Math.min(n+1,t.length-1)]?.flatIdx??e});else if(e.key===`ArrowUp`)e.preventDefault(),R(e=>{let t=U.filter(e=>e.flatIdx>=0),n=t.findIndex(t=>t.flatIdx===e);return t[Math.max(n-1,0)]?.flatIdx??e});else if(e.key===`Enter`||e.key===` `){e.preventDefault();let t=U.find(e=>e.flatIdx===L);t&&G(t)}else(e.key===`Escape`||e.key===`Tab`)&&(P(!1),R(-1))},[N,U,H,L,G]);(0,a.useEffect)(()=>{L<0||!B.current||B.current.querySelector(`[data-idx="${L}"]`)?.scrollIntoView({block:`nearest`})},[L]),(0,a.useEffect)(()=>{function e(e){let t=e.target;z.current?.contains(t)||B.current?.contains(t)||P(!1)}return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[]);let J=n.o(N,z);return D?(0,o.jsxs)(`div`,{ref:z,className:e.t(v,y),children:[(0,o.jsx)(`button`,{ref:O,id:A,type:`button`,role:`combobox`,"aria-expanded":N,onClick:()=>P(e=>!e),className:b,children:W?.label??d}),N&&(0,o.jsx)(`ul`,{ref:B,id:j,className:x,children:U.map(e=>(0,o.jsx)(`li`,{"data-idx":e.flatIdx,onClick:()=>G(e),children:e.label},e.value))})]}):(0,o.jsxs)(`div`,{ref:z,className:e.t(`relative`,t.o,y,v),children:[f&&(0,o.jsxs)(`label`,{htmlFor:A,className:e.t(`text-xs font-semibold leading-5 text-foreground`,S),children:[f,g&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(`span`,{"aria-hidden":`true`,className:`ml-1 text-destructive`,children:`*`}),(0,o.jsx)(`span`,{className:`sr-only`,children:` (required)`})]})]}),(0,o.jsxs)(`button`,{ref:O,id:A,type:`button`,role:`combobox`,"aria-haspopup":`listbox`,"aria-expanded":N,"aria-controls":j,"aria-activedescendant":N&&L>=0?`${j}-opt-${L}`:void 0,"aria-invalid":m?!0:void 0,"aria-required":g||void 0,"aria-describedby":m||p?M:void 0,disabled:h,onKeyDown:q,onClick:()=>{h||(P(e=>!e),N||R(U.find(e=>e.value===H&&e.flatIdx>=0)?.flatIdx??-1))},className:e.t(`flex h-9 w-full items-center gap-2 rounded-[var(--radius-md)] px-3 text-left outline-none`,t.t,`focus:border-accent-500 focus:ring-[3px] focus:ring-focus-ring/25`,m&&`border-destructive/60 hover:border-destructive/70 focus-within:border-destructive focus-within:ring-destructive/25`,h&&`opacity-50 cursor-not-allowed`,b),children:[W?.icon&&(0,o.jsx)(`span`,{className:`shrink-0 text-slate-500 dark:text-slate-400`,children:W.icon}),W?.color&&W.color!=="default"&&(0,o.jsx)(`span`,{className:e.t(`w-2 h-2 rounded-full shrink-0`,n.r[W.color])}),(0,o.jsx)(`span`,{className:e.t(`flex-1 min-w-0 text-sm truncate`,W?`text-foreground`:`text-muted-foreground`),children:W?.label??d}),_&&H&&!h&&(0,o.jsx)(`span`,{role:`button`,tabIndex:-1,onClick:K,className:`shrink-0 text-slate-400 hover:text-slate-600 dark:hover:text-slate-300 transition-colors`,children:(0,o.jsx)(n.n,{})}),(0,o.jsx)(n.t,{open:N})]}),(0,o.jsx)(c,{listId:j,listRef:B,open:N,pos:J,options:i,flat:U,activeIdx:L,setActiveIdx:R,isSelected:e=>e===H,onSelect:G,colorDot:n.r,className:x,optionClassName:w,groupLabelClassName:T}),m&&(0,o.jsx)(`p`,{id:M,"aria-live":`polite`,className:e.t(`text-xs leading-5 text-destructive`,C),children:m}),p&&!m&&(0,o.jsx)(`p`,{id:M,className:e.t(`text-xs leading-5 text-muted-foreground`,C),children:p})]})});u.displayName=`SelectSingle`;var d=(0,a.forwardRef)(({options:r,value:i,defaultValue:s,onChange:l,placeholder:u=`Select…`,label:d,hint:f,error:p,disabled:m,required:h,clearable:g=!1,className:_,wrapperClassName:v,triggerClassName:y,listClassName:b,labelClassName:x,messageClassName:S,optionClassName:C,groupLabelClassName:w,id:T,unstyled:E=!1},D)=>{let O=(0,a.useId)(),k=T??O,A=`${k}-list`,j=`${k}-message`,[M,N]=(0,a.useState)(!1),[P,F]=(0,a.useState)(s??[]),[I,L]=(0,a.useState)(-1),R=(0,a.useRef)(null),z=(0,a.useRef)(null),B=i===void 0?P:i,V=n.i(r),H=V.filter(e=>B.includes(e.value));function U(e){let t=B.includes(e.value)?B.filter(t=>t!==e.value):[...B,e.value];i===void 0&&F(t),l?.(t)}function W(e,t){t.stopPropagation();let n=B.filter(t=>t!==e);i===void 0&&F(n),l?.(n)}function G(e){e.stopPropagation(),i===void 0&&F([]),l?.([])}function K(e){if(!M){[`Enter`,` `,`ArrowDown`,`ArrowUp`].includes(e.key)&&(e.preventDefault(),N(!0));return}if(e.key===`ArrowDown`)e.preventDefault(),L(e=>{let t=V.filter(e=>e.flatIdx>=0),n=t.findIndex(t=>t.flatIdx===e);return t[Math.min(n+1,t.length-1)]?.flatIdx??e});else if(e.key===`ArrowUp`)e.preventDefault(),L(e=>{let t=V.filter(e=>e.flatIdx>=0),n=t.findIndex(t=>t.flatIdx===e);return t[Math.max(n-1,0)]?.flatIdx??e});else if(e.key===`Enter`||e.key===` `){e.preventDefault();let t=V.find(e=>e.flatIdx===I);t&&U(t)}else(e.key===`Escape`||e.key===`Tab`)&&(N(!1),L(-1))}(0,a.useEffect)(()=>{I<0||!z.current||z.current.querySelector(`[data-idx="${I}"]`)?.scrollIntoView({block:`nearest`})},[I]),(0,a.useEffect)(()=>{function e(e){let t=e.target;R.current?.contains(t)||z.current?.contains(t)||N(!1)}return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[]);let q=n.o(M,R);return E?(0,o.jsxs)(`div`,{ref:R,className:e.t(_,v),children:[(0,o.jsx)(`button`,{ref:D,id:k,type:`button`,role:`combobox`,"aria-expanded":M,"aria-controls":A,onKeyDown:K,onClick:()=>N(e=>!e),className:y,children:H.length>0?H.map(e=>e.label).join(`, `):u}),(0,o.jsx)(c,{listId:A,listRef:z,open:M,pos:q,options:r,flat:V,activeIdx:I,setActiveIdx:L,isSelected:e=>B.includes(e),onSelect:U,multiselectable:!0,colorDot:n.r,className:b})]}):(0,o.jsxs)(`div`,{ref:R,className:e.t(`relative`,t.o,v,_),children:[d&&(0,o.jsxs)(`label`,{htmlFor:k,className:e.t(`text-xs font-semibold leading-5 text-foreground`,x),children:[d,h&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(`span`,{"aria-hidden":`true`,className:`ml-1 text-destructive`,children:`*`}),(0,o.jsx)(`span`,{className:`sr-only`,children:` (required)`})]})]}),(0,o.jsxs)(`button`,{ref:D,id:k,type:`button`,role:`combobox`,"aria-haspopup":`listbox`,"aria-expanded":M,"aria-controls":A,"aria-activedescendant":M&&I>=0?`${A}-opt-${I}`:void 0,"aria-invalid":p?!0:void 0,"aria-required":h||void 0,"aria-describedby":p||f?j:void 0,disabled:m,onKeyDown:K,onClick:()=>{m||N(e=>!e)},className:e.t(`flex min-h-9 w-full flex-wrap items-center gap-1.5 rounded-[var(--radius-md)] px-2.5 py-1.5 text-left outline-none`,t.t,`focus:border-accent-500 focus:ring-[3px] focus:ring-focus-ring/25`,p&&`border-destructive/60 hover:border-destructive/70 focus-within:border-destructive focus-within:ring-destructive/25`,m&&`opacity-50 cursor-not-allowed`,y),children:[H.length===0?(0,o.jsx)(`span`,{className:`flex-1 text-sm text-slate-500 truncate`,children:u}):H.map(t=>(0,o.jsxs)(`span`,{className:`inline-flex max-w-[160px] items-center gap-1 rounded-md border border-border bg-surface-muted px-2 py-0.5 text-xs font-medium text-foreground`,children:[t.color&&t.color!=="default"&&(0,o.jsx)(`span`,{className:e.t(`w-1.5 h-1.5 rounded-full shrink-0`,n.r[t.color])}),(0,o.jsx)(`span`,{className:`truncate`,children:t.label}),(0,o.jsx)(`span`,{role:`button`,tabIndex:-1,onMouseDown:e=>e.stopPropagation(),onClick:e=>W(t.value,e),className:`shrink-0 text-slate-500 dark:text-slate-400 hover:text-foreground transition-colors cursor-pointer ml-0.5`,"aria-label":`Remove ${t.label}`,children:(0,o.jsx)(n.n,{})})]},t.value)),(0,o.jsxs)(`span`,{className:`ml-auto flex items-center gap-1.5 shrink-0 pl-1`,children:[g&&B.length>0&&!m&&(0,o.jsx)(`span`,{role:`button`,tabIndex:-1,onClick:G,className:`text-slate-500 hover:text-slate-600 dark:hover:text-slate-300 transition-colors`,"aria-label":`Clear all`,children:(0,o.jsx)(n.n,{})}),B.length>0&&(0,o.jsx)(`span`,{className:`text-[10px] font-medium text-slate-500 tabular-nums`,children:B.length}),(0,o.jsx)(n.t,{open:M})]})]}),(0,o.jsx)(c,{listId:A,listRef:z,open:M,pos:q,options:r,flat:V,activeIdx:I,setActiveIdx:L,isSelected:e=>B.includes(e),onSelect:U,multiselectable:!0,colorDot:n.r,className:b,optionClassName:C,groupLabelClassName:w}),p&&(0,o.jsx)(`p`,{id:j,"aria-live":`polite`,className:e.t(`text-xs leading-5 text-destructive`,S),children:p}),f&&!p&&(0,o.jsx)(`p`,{id:j,className:e.t(`text-xs leading-5 text-muted-foreground`,S),children:f})]})});d.displayName=`SelectMulti`;var f=(0,a.forwardRef)((e,t)=>e.multiple?(0,o.jsx)(d,{...e,ref:t}):(0,o.jsx)(u,{...e,ref:t}));f.displayName=`Select`,Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return f}});