@uselets/ui 2.0.1 → 2.0.2

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 (204) hide show
  1. package/dist/{as-child-Dxg3Xo1G.d.ts → as-child-T9W73ZYU.d.ts} +1 -3
  2. package/dist/{chart-B_6nC_ih.d.ts → chart-8rgtsk95.d.ts} +1 -3
  3. package/dist/cli/uselets.mjs.map +1 -1
  4. package/dist/components/accordion.d.ts +1 -3
  5. package/dist/components/accordion.js.map +1 -1
  6. package/dist/components/alert-dialog.d.ts +1 -3
  7. package/dist/components/alert-dialog.js.map +1 -1
  8. package/dist/components/alert.d.ts +0 -2
  9. package/dist/components/alert.js.map +1 -1
  10. package/dist/components/anchor.d.ts +1 -3
  11. package/dist/components/anchor.js.map +1 -1
  12. package/dist/components/area-chart.d.ts +1 -3
  13. package/dist/components/area-chart.js.map +1 -1
  14. package/dist/components/avatar.d.ts +1 -3
  15. package/dist/components/avatar.js.map +1 -1
  16. package/dist/components/badge.d.ts +1 -3
  17. package/dist/components/badge.js.map +1 -1
  18. package/dist/components/bar-chart.d.ts +1 -3
  19. package/dist/components/bar-chart.js.map +1 -1
  20. package/dist/components/bottom-nav.d.ts +1 -3
  21. package/dist/components/bottom-nav.js.map +1 -1
  22. package/dist/components/breadcrumb.d.ts +1 -3
  23. package/dist/components/breadcrumb.js.map +1 -1
  24. package/dist/components/button-group.d.ts +1 -3
  25. package/dist/components/button-group.js.map +1 -1
  26. package/dist/components/button.d.ts +1 -3
  27. package/dist/components/button.js.map +1 -1
  28. package/dist/components/calendar.d.ts +0 -2
  29. package/dist/components/calendar.js +1 -1
  30. package/dist/components/calendar.js.map +1 -1
  31. package/dist/components/card.d.ts +0 -2
  32. package/dist/components/card.js.map +1 -1
  33. package/dist/components/carousel.d.ts +0 -2
  34. package/dist/components/carousel.js.map +1 -1
  35. package/dist/components/center.d.ts +0 -2
  36. package/dist/components/center.js.map +1 -1
  37. package/dist/components/chart.d.ts +1 -1
  38. package/dist/components/chart.js.map +1 -1
  39. package/dist/components/checkbox.d.ts +0 -2
  40. package/dist/components/checkbox.js.map +1 -1
  41. package/dist/components/code.d.ts +0 -2
  42. package/dist/components/code.js.map +1 -1
  43. package/dist/components/collapsible.d.ts +1 -3
  44. package/dist/components/collapsible.js.map +1 -1
  45. package/dist/components/combobox.d.ts +1 -3
  46. package/dist/components/combobox.js.map +1 -1
  47. package/dist/components/command.d.ts +0 -2
  48. package/dist/components/command.js.map +1 -1
  49. package/dist/components/container.d.ts +0 -2
  50. package/dist/components/container.js.map +1 -1
  51. package/dist/components/data-table.d.ts +0 -2
  52. package/dist/components/data-table.js.map +1 -1
  53. package/dist/components/date-range-picker.d.ts +0 -2
  54. package/dist/components/date-range-picker.js.map +1 -1
  55. package/dist/components/dialog.d.ts +1 -3
  56. package/dist/components/dialog.js.map +1 -1
  57. package/dist/components/direction.d.ts +0 -2
  58. package/dist/components/donut-chart.d.ts +0 -2
  59. package/dist/components/donut-chart.js.map +1 -1
  60. package/dist/components/drawer.d.ts +1 -3
  61. package/dist/components/drawer.js.map +1 -1
  62. package/dist/components/dropdown-menu.d.ts +1 -3
  63. package/dist/components/dropdown-menu.js.map +1 -1
  64. package/dist/components/dropzone.d.ts +0 -2
  65. package/dist/components/dropzone.js.map +1 -1
  66. package/dist/components/empty.d.ts +0 -2
  67. package/dist/components/empty.js.map +1 -1
  68. package/dist/components/field.d.ts +0 -2
  69. package/dist/components/field.js.map +1 -1
  70. package/dist/components/flex.d.ts +0 -2
  71. package/dist/components/flex.js.map +1 -1
  72. package/dist/components/grid.d.ts +0 -2
  73. package/dist/components/grid.js.map +1 -1
  74. package/dist/components/group.d.ts +0 -2
  75. package/dist/components/group.js.map +1 -1
  76. package/dist/components/heading.d.ts +1 -3
  77. package/dist/components/heading.js.map +1 -1
  78. package/dist/components/hover-card.d.ts +1 -3
  79. package/dist/components/hover-card.js.map +1 -1
  80. package/dist/components/input-group.d.ts +0 -2
  81. package/dist/components/input-group.js.map +1 -1
  82. package/dist/components/input-otp.d.ts +0 -2
  83. package/dist/components/input-otp.js.map +1 -1
  84. package/dist/components/input.d.ts +0 -2
  85. package/dist/components/input.js.map +1 -1
  86. package/dist/components/kbd.d.ts +0 -2
  87. package/dist/components/kbd.js.map +1 -1
  88. package/dist/components/label.d.ts +1 -3
  89. package/dist/components/label.js.map +1 -1
  90. package/dist/components/list.d.ts +1 -3
  91. package/dist/components/list.js.map +1 -1
  92. package/dist/components/logo.d.ts +0 -2
  93. package/dist/components/marker.d.ts +1 -3
  94. package/dist/components/marker.js.map +1 -1
  95. package/dist/components/mask-input.d.ts +0 -2
  96. package/dist/components/mask-input.js.map +1 -1
  97. package/dist/components/native-select.d.ts +0 -2
  98. package/dist/components/native-select.js.map +1 -1
  99. package/dist/components/navigation-menu.d.ts +1 -3
  100. package/dist/components/navigation-menu.js.map +1 -1
  101. package/dist/components/number-field.d.ts +1 -3
  102. package/dist/components/number-field.js.map +1 -1
  103. package/dist/components/pagination.d.ts +0 -2
  104. package/dist/components/pagination.js.map +1 -1
  105. package/dist/components/phone-input.d.ts +0 -2
  106. package/dist/components/phone-input.js.map +1 -1
  107. package/dist/components/pie-chart.d.ts +1 -3
  108. package/dist/components/pie-chart.js.map +1 -1
  109. package/dist/components/popover.d.ts +1 -3
  110. package/dist/components/popover.js.map +1 -1
  111. package/dist/components/progress.d.ts +0 -2
  112. package/dist/components/progress.js.map +1 -1
  113. package/dist/components/radio-group.d.ts +0 -2
  114. package/dist/components/radio-group.js.map +1 -1
  115. package/dist/components/resizable.d.ts +0 -2
  116. package/dist/components/resizable.js.map +1 -1
  117. package/dist/components/ring-progress.d.ts +0 -2
  118. package/dist/components/ring-progress.js.map +1 -1
  119. package/dist/components/scroll-area.d.ts +0 -2
  120. package/dist/components/scroll-area.js.map +1 -1
  121. package/dist/components/select.d.ts +1 -3
  122. package/dist/components/select.js.map +1 -1
  123. package/dist/components/separator.d.ts +1 -3
  124. package/dist/components/separator.js.map +1 -1
  125. package/dist/components/sidebar.d.ts +1 -3
  126. package/dist/components/sidebar.js.map +1 -1
  127. package/dist/components/simple-grid.d.ts +0 -2
  128. package/dist/components/simple-grid.js.map +1 -1
  129. package/dist/components/skeleton.d.ts +0 -2
  130. package/dist/components/skeleton.js.map +1 -1
  131. package/dist/components/slider.d.ts +0 -2
  132. package/dist/components/slider.js.map +1 -1
  133. package/dist/components/sonner.d.ts +0 -2
  134. package/dist/components/sonner.js.map +1 -1
  135. package/dist/components/spinner.d.ts +0 -2
  136. package/dist/components/spinner.js.map +1 -1
  137. package/dist/components/stack.d.ts +0 -2
  138. package/dist/components/stack.js.map +1 -1
  139. package/dist/components/stepper.d.ts +1 -3
  140. package/dist/components/stepper.js.map +1 -1
  141. package/dist/components/switch.d.ts +0 -2
  142. package/dist/components/switch.js.map +1 -1
  143. package/dist/components/table.d.ts +0 -2
  144. package/dist/components/table.js.map +1 -1
  145. package/dist/components/tabs.d.ts +1 -3
  146. package/dist/components/tabs.js.map +1 -1
  147. package/dist/components/text.d.ts +1 -3
  148. package/dist/components/text.js.map +1 -1
  149. package/dist/components/textarea.d.ts +0 -2
  150. package/dist/components/textarea.js.map +1 -1
  151. package/dist/components/theme.d.ts +0 -2
  152. package/dist/components/theme.js.map +1 -1
  153. package/dist/components/timeline.d.ts +0 -2
  154. package/dist/components/timeline.js.map +1 -1
  155. package/dist/components/toggle-group.d.ts +1 -3
  156. package/dist/components/toggle-group.js.map +1 -1
  157. package/dist/components/toggle.d.ts +1 -3
  158. package/dist/components/toggle.js.map +1 -1
  159. package/dist/components/tooltip.d.ts +1 -3
  160. package/dist/components/tooltip.js.map +1 -1
  161. package/dist/components/unstyled-button.d.ts +1 -3
  162. package/dist/components/unstyled-button.js.map +1 -1
  163. package/dist/components/visibility.d.ts +0 -2
  164. package/dist/components/visibility.js.map +1 -1
  165. package/dist/hooks/use-breakpoint-value.d.ts +0 -2
  166. package/dist/hooks/use-breakpoint-value.js.map +1 -1
  167. package/dist/hooks/use-breakpoint.d.ts +0 -2
  168. package/dist/hooks/use-breakpoint.js.map +1 -1
  169. package/dist/hooks/use-disclosure.d.ts +0 -2
  170. package/dist/hooks/use-disclosure.js.map +1 -1
  171. package/dist/hooks/use-document-visibility.d.ts +0 -2
  172. package/dist/hooks/use-document-visibility.js.map +1 -1
  173. package/dist/hooks/use-hotkeys.d.ts +1 -1
  174. package/dist/hooks/use-idle.d.ts +0 -2
  175. package/dist/hooks/use-idle.js.map +1 -1
  176. package/dist/hooks/use-interval.d.ts +0 -2
  177. package/dist/hooks/use-interval.js.map +1 -1
  178. package/dist/hooks/use-local-storage.d.ts +0 -2
  179. package/dist/hooks/use-local-storage.js.map +1 -1
  180. package/dist/hooks/use-mask.d.ts +0 -2
  181. package/dist/hooks/use-mask.js.map +1 -1
  182. package/dist/hooks/use-mobile.d.ts +0 -2
  183. package/dist/hooks/use-mobile.js.map +1 -1
  184. package/dist/index.d.ts +3 -3
  185. package/dist/lib/as-child.d.ts +1 -1
  186. package/dist/lib/as-child.js.map +1 -1
  187. package/dist/lib/badge.d.ts +0 -2
  188. package/dist/lib/badge.js.map +1 -1
  189. package/dist/lib/button.d.ts +0 -2
  190. package/dist/lib/button.js.map +1 -1
  191. package/dist/lib/color.d.ts +0 -2
  192. package/dist/lib/color.js.map +1 -1
  193. package/dist/lib/compose-refs.d.ts +0 -2
  194. package/dist/lib/compose-refs.js.map +1 -1
  195. package/dist/lib/progress.d.ts +0 -2
  196. package/dist/lib/progress.js.map +1 -1
  197. package/dist/lib/utils.d.ts +0 -2
  198. package/dist/lib/utils.js.map +1 -1
  199. package/dist/logo--R3_XDgA.js.map +1 -1
  200. package/dist/postcss.config.js.map +1 -1
  201. package/dist/resolve-class-name-BurP8ngI.js.map +1 -1
  202. package/dist/{use-hotkeys-D1_TEIwN.d.ts → use-hotkeys-BVm0IGb8.d.ts} +1 -5
  203. package/dist/use-hotkeys-YDJmGWX6.js.map +1 -1
  204. package/package.json +9 -9
@@ -1 +1 @@
1
- {"version":3,"file":"use-breakpoint.js","names":["React","breakpointValues","matches","setMatches","breakpoint","mql"],"sources":["../../src/hooks/use-breakpoint.ts"],"sourcesContent":["import * as React from 'react'\n\nexport type Breakpoint = 'base' | 'sm' | 'md' | 'lg' | 'xl' | '2xl'\n\nexport const breakpointValues: Record<Exclude<Breakpoint, 'base'>, number> = {\n sm: 640,\n md: 768,\n lg: 1024,\n xl: 1280,\n '2xl': 1536\n}\n\n/** Returns whether the viewport is at or above the given Tailwind breakpoint. */\nexport function useBreakpoint(breakpoint: Breakpoint) {\n const [matches, setMatches] = React.useState(breakpoint === 'base')\n\n React.useEffect(() => {\n if (breakpoint === 'base') {\n setMatches(true)\n return\n }\n\n const mql = window.matchMedia(`(min-width: ${breakpointValues[breakpoint]}px)`)\n const onChange = () => {\n setMatches(mql.matches)\n }\n\n mql.addEventListener('change', onChange)\n setMatches(mql.matches)\n\n return () => mql.removeEventListener('change', onChange)\n }, [breakpoint])\n\n return breakpoint === 'base' || matches\n}\n"],"mappings":"gEAIA,MAAaC,EAAgE,CAC3E,GAAI,IACJ,GAAI,IACJ,GAAI,KACJ,GAAI,KACJ,MAAO,IACT,EAGA,SAAgB,cAAc,EAAwB,CACpD,GAAM,CAACC,EAASC,GAAcH,EAAM,SAASI,IAAe,MAAM,EAmBlE,OAjBAJ,EAAM,cAAgB,CACpB,GAAII,IAAe,OAAQ,CACzBD,EAAW,EAAI,EACf,MACF,CAEA,IAAME,EAAM,OAAO,WAAW,eAAeJ,EAAiBG,GAAY,IAAI,EACxE,aAAiB,CACrBD,EAAWE,EAAI,OAAO,CACxB,EAKA,OAHAA,EAAI,iBAAiB,SAAU,QAAQ,EACvCF,EAAWE,EAAI,OAAO,MAETA,EAAI,oBAAoB,SAAU,QAAQ,CACzD,EAAG,CAACD,CAAU,CAAC,EAERA,IAAe,QAAUF,CAClC"}
1
+ {"version":3,"file":"use-breakpoint.js","names":["React","breakpointValues","matches","setMatches","breakpoint","mql"],"sources":["../../src/hooks/use-breakpoint.ts"],"sourcesContent":["import * as React from 'react'\n\nexport type Breakpoint = 'base' | 'sm' | 'md' | 'lg' | 'xl' | '2xl'\n\nexport const breakpointValues: Record<Exclude<Breakpoint, 'base'>, number> = {\n sm: 640,\n md: 768,\n lg: 1024,\n xl: 1280,\n '2xl': 1536\n}\n\n/** Returns whether the viewport is at or above the given Tailwind breakpoint. */\nexport function useBreakpoint(breakpoint: Breakpoint) {\n const [matches, setMatches] = React.useState(breakpoint === 'base')\n\n React.useEffect(() => {\n if (breakpoint === 'base') {\n setMatches(true)\n return\n }\n\n const mql = window.matchMedia(`(min-width: ${breakpointValues[breakpoint]}px)`)\n const onChange = () => {\n setMatches(mql.matches)\n }\n\n mql.addEventListener('change', onChange)\n setMatches(mql.matches)\n\n return () => mql.removeEventListener('change', onChange)\n }, [breakpoint])\n\n return breakpoint === 'base' || matches\n}\n"],"mappings":"A,gEAIA,MAAaC,EAAgE,CAC3E,GAAI,IACJ,GAAI,IACJ,GAAI,KACJ,GAAI,KACJ,MAAO,IACT,EAGA,SAAgB,cAAc,EAAwB,CACpD,GAAM,CAACC,EAASC,GAAcH,EAAM,SAASI,IAAe,MAAM,EAmBlE,OAjBAJ,EAAM,cAAgB,CACpB,GAAII,IAAe,OAAQ,CACzBD,EAAW,EAAI,EACf,MACF,CAEA,IAAME,EAAM,OAAO,WAAW,eAAeJ,EAAiBG,GAAY,IAAI,EACxE,aAAiB,CACrBD,EAAWE,EAAI,OAAO,CACxB,EAKA,OAHAA,EAAI,iBAAiB,SAAU,QAAQ,EACvCF,EAAWE,EAAI,OAAO,MAETA,EAAI,oBAAoB,SAAU,QAAQ,CACzD,EAAG,CAACD,CAAU,CAAC,EAERA,IAAe,QAAUF,CAClC,C"}
@@ -1,5 +1,4 @@
1
1
  import { t as __name } from "../rolldown-runtime-BhWHdk3m.js";
2
- //#region src/hooks/use-disclosure.d.ts
3
2
  export type UseDisclosureOptions = {
4
3
  /** Called when the state changes to open. */
5
4
  onOpen?: () => void;
@@ -20,5 +19,4 @@ export declare namespace useDisclosure {
20
19
  type Handlers = UseDisclosureHandlers;
21
20
  type ReturnValue = UseDisclosureReturnValue;
22
21
  }
23
- //#endregion
24
22
  //# sourceMappingURL=use-disclosure.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"use-disclosure.js","names":["opened","setOpened","useState","initialState","openedRef","useRef","callbacksRef","options","set","useCallback","value","open","close"],"sources":["../../src/hooks/use-disclosure.ts"],"sourcesContent":["import { useCallback, useRef, useState } from 'react'\n\nexport type UseDisclosureOptions = {\n /** Called when the state changes to open. */\n onOpen?: () => void\n /** Called when the state changes to closed. */\n onClose?: () => void\n}\n\nexport type UseDisclosureHandlers = {\n set: (value: boolean) => void\n open: () => void\n close: () => void\n toggle: () => void\n}\n\nexport type UseDisclosureReturnValue = [boolean, UseDisclosureHandlers]\n\n/** Open/close state with `open`, `close`, `toggle` and `set` handlers. */\nexport function useDisclosure(initialState = false, options: UseDisclosureOptions = {}): UseDisclosureReturnValue {\n const [opened, setOpened] = useState(initialState)\n // The callbacks run outside the state updater (React runs updaters twice in StrictMode), so the current state\n // is tracked in a ref that every handler reads and writes synchronously.\n const openedRef = useRef(initialState)\n const callbacksRef = useRef(options)\n callbacksRef.current = options\n\n const set = useCallback((value: boolean) => {\n openedRef.current = value\n setOpened(value)\n }, [])\n\n const open = useCallback(() => {\n if (openedRef.current) return\n set(true)\n callbacksRef.current.onOpen?.()\n }, [set])\n\n const close = useCallback(() => {\n if (!openedRef.current) return\n set(false)\n callbacksRef.current.onClose?.()\n }, [set])\n\n const toggle = useCallback(() => {\n openedRef.current ? close() : open()\n }, [close, open])\n\n return [opened, { open, close, toggle, set }]\n}\n\nexport namespace useDisclosure {\n export type Options = UseDisclosureOptions\n export type Handlers = UseDisclosureHandlers\n export type ReturnValue = UseDisclosureReturnValue\n}\n"],"mappings":"sGAmBA,SAAgB,cAAc,EAAe,GAAO,EAAgC,CAAC,EAA6B,CAChH,GAAM,CAACA,EAAQC,GAAaC,EAASC,CAAY,EAG3CC,EAAYC,EAAOF,CAAY,EAC/BG,EAAeD,EAAOE,CAAO,EACnC,EAAa,QAAUA,EAEvB,IAAMC,EAAMC,EAAa,GAAmB,CAC1C,EAAU,QAAUC,EACpBT,EAAUS,CAAK,CACjB,EAAG,CAAC,CAAC,EAECC,EAAOF,MAAkB,CACzBL,EAAU,UACdI,EAAI,EAAI,EACRF,EAAa,QAAQ,SAAS,EAChC,EAAG,CAACE,CAAG,CAAC,EAEFI,EAAQH,MAAkB,CACzBL,EAAU,UACfI,EAAI,EAAK,EACTF,EAAa,QAAQ,UAAU,EACjC,EAAG,CAACE,CAAG,CAAC,EAMR,MAAO,CAACR,EAAQ,CAAE,OAAM,QAAO,OAJhBS,MAAkB,CAC/BL,EAAU,QAAUQ,EAAM,EAAID,EAAK,CACrC,EAAG,CAACC,EAAOD,CAAI,CAEqB,EAAG,KAAI,CAAC,CAC9C"}
1
+ {"version":3,"file":"use-disclosure.js","names":["opened","setOpened","useState","initialState","openedRef","useRef","callbacksRef","options","set","useCallback","value","open","close"],"sources":["../../src/hooks/use-disclosure.ts"],"sourcesContent":["import { useCallback, useRef, useState } from 'react'\n\nexport type UseDisclosureOptions = {\n /** Called when the state changes to open. */\n onOpen?: () => void\n /** Called when the state changes to closed. */\n onClose?: () => void\n}\n\nexport type UseDisclosureHandlers = {\n set: (value: boolean) => void\n open: () => void\n close: () => void\n toggle: () => void\n}\n\nexport type UseDisclosureReturnValue = [boolean, UseDisclosureHandlers]\n\n/** Open/close state with `open`, `close`, `toggle` and `set` handlers. */\nexport function useDisclosure(initialState = false, options: UseDisclosureOptions = {}): UseDisclosureReturnValue {\n const [opened, setOpened] = useState(initialState)\n // The callbacks run outside the state updater (React runs updaters twice in StrictMode), so the current state\n // is tracked in a ref that every handler reads and writes synchronously.\n const openedRef = useRef(initialState)\n const callbacksRef = useRef(options)\n callbacksRef.current = options\n\n const set = useCallback((value: boolean) => {\n openedRef.current = value\n setOpened(value)\n }, [])\n\n const open = useCallback(() => {\n if (openedRef.current) return\n set(true)\n callbacksRef.current.onOpen?.()\n }, [set])\n\n const close = useCallback(() => {\n if (!openedRef.current) return\n set(false)\n callbacksRef.current.onClose?.()\n }, [set])\n\n const toggle = useCallback(() => {\n openedRef.current ? close() : open()\n }, [close, open])\n\n return [opened, { open, close, toggle, set }]\n}\n\nexport namespace useDisclosure {\n export type Options = UseDisclosureOptions\n export type Handlers = UseDisclosureHandlers\n export type ReturnValue = UseDisclosureReturnValue\n}\n"],"mappings":"A,sGAmBA,SAAgB,cAAc,EAAe,GAAO,EAAgC,CAAC,EAA6B,CAChH,GAAM,CAACA,EAAQC,GAAaC,EAASC,CAAY,EAG3CC,EAAYC,EAAOF,CAAY,EAC/BG,EAAeD,EAAOE,CAAO,EACnC,EAAa,QAAUA,EAEvB,IAAMC,EAAMC,EAAa,GAAmB,CAC1C,EAAU,QAAUC,EACpBT,EAAUS,CAAK,CACjB,EAAG,CAAC,CAAC,EAECC,EAAOF,MAAkB,CACzBL,EAAU,UACdI,EAAI,EAAI,EACRF,EAAa,QAAQ,SAAS,EAChC,EAAG,CAACE,CAAG,CAAC,EAEFI,EAAQH,MAAkB,CACzBL,EAAU,UACfI,EAAI,EAAK,EACTF,EAAa,QAAQ,UAAU,EACjC,EAAG,CAACE,CAAG,CAAC,EAMR,MAAO,CAACR,EAAQ,CAAE,OAAM,QAAO,OAJhBS,MAAkB,CAC/BL,EAAU,QAAUQ,EAAM,EAAID,EAAK,CACrC,EAAG,CAACC,EAAOD,CAAI,CAEqB,EAAG,KAAI,CAAC,CAC9C,C"}
@@ -1,6 +1,4 @@
1
1
  import { t as __name } from "../rolldown-runtime-BhWHdk3m.js";
2
- //#region src/hooks/use-document-visibility.d.ts
3
2
  /** Returns the page visibility state (`visible` or `hidden`). */
4
3
  export declare function useDocumentVisibility(): DocumentVisibilityState;
5
- //#endregion
6
4
  //# sourceMappingURL=use-document-visibility.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"use-document-visibility.js","names":["documentVisibility","setDocumentVisibility","useState","useEffect"],"sources":["../../src/hooks/use-document-visibility.ts"],"sourcesContent":["import { useEffect, useState } from 'react'\n\n/** Returns the page visibility state (`visible` or `hidden`). */\nexport function useDocumentVisibility(): DocumentVisibilityState {\n const [documentVisibility, setDocumentVisibility] = useState<DocumentVisibilityState>('visible')\n\n useEffect(() => {\n setDocumentVisibility(document.visibilityState)\n const listener = () => setDocumentVisibility(document.visibilityState)\n document.addEventListener('visibilitychange', listener)\n return () => document.removeEventListener('visibilitychange', listener)\n }, [])\n\n return documentVisibility\n}\n"],"mappings":"wFAGA,SAAgB,uBAAiD,CAC/D,GAAM,CAACA,EAAoBC,GAAyBC,EAAkC,SAAS,EAS/F,OAPAC,MAAgB,CACdF,EAAsB,SAAS,eAAe,EAC9C,IAAM,aAAiBA,EAAsB,SAAS,eAAe,EAErE,OADA,SAAS,iBAAiB,mBAAoB,QAAQ,MACzC,SAAS,oBAAoB,mBAAoB,QAAQ,CACxE,EAAG,CAAC,CAAC,EAEED,CACT"}
1
+ {"version":3,"file":"use-document-visibility.js","names":["documentVisibility","setDocumentVisibility","useState","useEffect"],"sources":["../../src/hooks/use-document-visibility.ts"],"sourcesContent":["import { useEffect, useState } from 'react'\n\n/** Returns the page visibility state (`visible` or `hidden`). */\nexport function useDocumentVisibility(): DocumentVisibilityState {\n const [documentVisibility, setDocumentVisibility] = useState<DocumentVisibilityState>('visible')\n\n useEffect(() => {\n setDocumentVisibility(document.visibilityState)\n const listener = () => setDocumentVisibility(document.visibilityState)\n document.addEventListener('visibilitychange', listener)\n return () => document.removeEventListener('visibilitychange', listener)\n }, [])\n\n return documentVisibility\n}\n"],"mappings":"A,wFAGA,SAAgB,uBAAiD,CAC/D,GAAM,CAACA,EAAoBC,GAAyBC,EAAkC,SAAS,EAS/F,OAPAC,MAAgB,CACdF,EAAsB,SAAS,eAAe,EAC9C,IAAM,aAAiBA,EAAsB,SAAS,eAAe,EAErE,OADA,SAAS,iBAAiB,mBAAoB,QAAQ,MACzC,SAAS,oBAAoB,mBAAoB,QAAQ,CACxE,EAAG,CAAC,CAAC,EAEED,CACT,C"}
@@ -1,2 +1,2 @@
1
- import { i as getHotkeyHandler, n as useHotkeys, r as HotkeyItemOptions, t as HotkeyItem } from "../use-hotkeys-D1_TEIwN.js";
1
+ import { i as getHotkeyHandler, n as useHotkeys, r as HotkeyItemOptions, t as HotkeyItem } from "../use-hotkeys-BVm0IGb8.js";
2
2
  export { HotkeyItem, type HotkeyItemOptions, getHotkeyHandler, useHotkeys };
@@ -1,5 +1,4 @@
1
1
  import { t as __name } from "../rolldown-runtime-BhWHdk3m.js";
2
- //#region src/hooks/use-idle.d.ts
3
2
  export type UseIdleOptions = {
4
3
  /**
5
4
  * Events that count as activity.
@@ -17,5 +16,4 @@ export declare function useIdle(timeout: number, options?: UseIdleOptions): bool
17
16
  export declare namespace useIdle {
18
17
  type Options = UseIdleOptions;
19
18
  }
20
- //#endregion
21
19
  //# sourceMappingURL=use-idle.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"use-idle.js","names":["DEFAULT_OPTIONS","options","idle","setIdle","useState","initialState","timer","useRef","useEffect","timeout","event","events"],"sources":["../../src/hooks/use-idle.ts"],"sourcesContent":["import { useEffect, useRef, useState } from 'react'\n\nexport type UseIdleOptions = {\n /**\n * Events that count as activity.\n * @default ['keydown', 'mousemove', 'touchmove', 'click', 'scroll', 'wheel']\n */\n events?: (keyof DocumentEventMap)[]\n /**\n * Value before any activity.\n * @default true\n */\n initialState?: boolean\n}\n\nconst DEFAULT_OPTIONS: Required<UseIdleOptions> = {\n events: ['keydown', 'mousemove', 'touchmove', 'click', 'scroll', 'wheel'],\n initialState: true\n}\n\n/** Returns `true` after `timeout` ms without user activity. */\nexport function useIdle(timeout: number, options?: UseIdleOptions) {\n const { events, initialState } = { ...DEFAULT_OPTIONS, ...options }\n const [idle, setIdle] = useState(initialState)\n const timer = useRef(-1)\n\n // biome-ignore lint/correctness/useExhaustiveDependencies: should not re-execute the effect when `events` changes\n useEffect(() => {\n const handleEvents = () => {\n setIdle(false)\n\n if (timer.current) {\n window.clearTimeout(timer.current)\n }\n\n timer.current = window.setTimeout(() => {\n setIdle(true)\n }, timeout)\n }\n\n for (const event of events) {\n document.addEventListener(event, handleEvents)\n }\n\n // Start the timer immediately instead of waiting for the first event to happen\n timer.current = window.setTimeout(() => {\n setIdle(true)\n }, timeout)\n\n return () => {\n for (const event of events) {\n document.removeEventListener(event, handleEvents)\n }\n\n window.clearTimeout(timer.current)\n timer.current = -1\n }\n }, [timeout])\n\n return idle\n}\n\nexport namespace useIdle {\n export type Options = UseIdleOptions\n}\n"],"mappings":"oGAeA,MAAMA,EAA4C,CAChD,OAAQ,CAAC,UAAW,YAAa,YAAa,QAAS,SAAU,OAAO,EACxE,aAAc,EAChB,EAGA,SAAgB,QAAQ,EAAiB,EAA0B,CACjE,GAAM,CAAE,SAAQ,gBAAiB,CAAE,GAAGA,EAAiB,GAAGC,CAAQ,EAC5D,CAACC,EAAMC,GAAWC,EAASC,CAAY,EACvCC,EAAQC,EAAO,EAAE,EAmCvB,OAhCAC,MAAgB,CACd,IAAM,iBAAqB,CACzBL,EAAQ,EAAK,EAETG,EAAM,SACR,OAAO,aAAaA,EAAM,OAAO,EAGnC,EAAM,QAAU,OAAO,eAAiB,CACtCH,EAAQ,EAAI,CACd,EAAGM,CAAO,CACZ,EAEA,IAAK,IAAMC,KAASC,EAClB,SAAS,iBAAiBD,EAAO,YAAY,EAQ/C,MAJA,GAAM,QAAU,OAAO,eAAiB,CACtCP,EAAQ,EAAI,CACd,EAAGM,CAAO,MAEG,CACX,IAAK,IAAMC,KAASC,EAClB,SAAS,oBAAoBD,EAAO,YAAY,EAGlD,OAAO,aAAaJ,EAAM,OAAO,EACjC,EAAM,QAAU,EAClB,CACF,EAAG,CAACG,CAAO,CAAC,EAELP,CACT"}
1
+ {"version":3,"file":"use-idle.js","names":["DEFAULT_OPTIONS","options","idle","setIdle","useState","initialState","timer","useRef","useEffect","timeout","event","events"],"sources":["../../src/hooks/use-idle.ts"],"sourcesContent":["import { useEffect, useRef, useState } from 'react'\n\nexport type UseIdleOptions = {\n /**\n * Events that count as activity.\n * @default ['keydown', 'mousemove', 'touchmove', 'click', 'scroll', 'wheel']\n */\n events?: (keyof DocumentEventMap)[]\n /**\n * Value before any activity.\n * @default true\n */\n initialState?: boolean\n}\n\nconst DEFAULT_OPTIONS: Required<UseIdleOptions> = {\n events: ['keydown', 'mousemove', 'touchmove', 'click', 'scroll', 'wheel'],\n initialState: true\n}\n\n/** Returns `true` after `timeout` ms without user activity. */\nexport function useIdle(timeout: number, options?: UseIdleOptions) {\n const { events, initialState } = { ...DEFAULT_OPTIONS, ...options }\n const [idle, setIdle] = useState(initialState)\n const timer = useRef(-1)\n\n // biome-ignore lint/correctness/useExhaustiveDependencies: should not re-execute the effect when `events` changes\n useEffect(() => {\n const handleEvents = () => {\n setIdle(false)\n\n if (timer.current) {\n window.clearTimeout(timer.current)\n }\n\n timer.current = window.setTimeout(() => {\n setIdle(true)\n }, timeout)\n }\n\n for (const event of events) {\n document.addEventListener(event, handleEvents)\n }\n\n // Start the timer immediately instead of waiting for the first event to happen\n timer.current = window.setTimeout(() => {\n setIdle(true)\n }, timeout)\n\n return () => {\n for (const event of events) {\n document.removeEventListener(event, handleEvents)\n }\n\n window.clearTimeout(timer.current)\n timer.current = -1\n }\n }, [timeout])\n\n return idle\n}\n\nexport namespace useIdle {\n export type Options = UseIdleOptions\n}\n"],"mappings":"A,oGAeA,MAAMA,EAA4C,CAChD,OAAQ,CAAC,UAAW,YAAa,YAAa,QAAS,SAAU,OAAO,EACxE,aAAc,EAChB,EAGA,SAAgB,QAAQ,EAAiB,EAA0B,CACjE,GAAM,CAAE,SAAQ,gBAAiB,CAAE,GAAGA,EAAiB,GAAGC,CAAQ,EAC5D,CAACC,EAAMC,GAAWC,EAASC,CAAY,EACvCC,EAAQC,EAAO,EAAE,EAmCvB,OAhCAC,MAAgB,CACd,IAAM,iBAAqB,CACzBL,EAAQ,EAAK,EAETG,EAAM,SACR,OAAO,aAAaA,EAAM,OAAO,EAGnC,EAAM,QAAU,OAAO,eAAiB,CACtCH,EAAQ,EAAI,CACd,EAAGM,CAAO,CACZ,EAEA,IAAK,IAAMC,KAASC,EAClB,SAAS,iBAAiBD,EAAO,YAAY,EAQ/C,MAJA,GAAM,QAAU,OAAO,eAAiB,CACtCP,EAAQ,EAAI,CACd,EAAGM,CAAO,MAEG,CACX,IAAK,IAAMC,KAASC,EAClB,SAAS,oBAAoBD,EAAO,YAAY,EAGlD,OAAO,aAAaJ,EAAM,OAAO,EACjC,EAAM,QAAU,EAClB,CACF,EAAG,CAACG,CAAO,CAAC,EAELP,CACT,C"}
@@ -1,5 +1,4 @@
1
1
  import { t as __name } from "../rolldown-runtime-BhWHdk3m.js";
2
- //#region src/hooks/use-interval.d.ts
3
2
  export type UseIntervalOptions = {
4
3
  /** If set, the interval will start automatically when the component is mounted, `false` by default */
5
4
  autoInvoke?: boolean;
@@ -20,5 +19,4 @@ export declare namespace useInterval {
20
19
  type Options = UseIntervalOptions;
21
20
  type ReturnValue = UseIntervalReturnValue;
22
21
  }
23
- //#endregion
24
22
  //# sourceMappingURL=use-interval.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"use-interval.js","names":["intervalRef","useRef","fnRef","intervalValueRef","interval","active","setActive","useState","start","useCallback","old","stop","toggle","current","useEffect","fn","autoInvoke"],"sources":["../../src/hooks/use-interval.ts"],"sourcesContent":["import { useCallback, useEffect, useRef, useState } from 'react'\n\nexport type UseIntervalOptions = {\n /** If set, the interval will start automatically when the component is mounted, `false` by default */\n autoInvoke?: boolean\n}\n\nexport type UseIntervalReturnValue = {\n /** Starts the interval */\n start: () => void\n\n /** Stops the interval */\n stop: () => void\n\n /** Toggles the interval */\n toggle: () => void\n\n /** Indicates if the interval is active */\n active: boolean\n}\n\n/** Runs `fn` every `interval` ms, with `start`, `stop` and `toggle` controls. */\nexport function useInterval(\n fn: () => void,\n interval: number,\n { autoInvoke = false }: UseIntervalOptions = {}\n): UseIntervalReturnValue {\n const intervalRef = useRef<number | null>(null)\n const fnRef = useRef<() => void>(null)\n const intervalValueRef = useRef(interval)\n\n const [active, setActive] = useState(false)\n\n intervalValueRef.current = interval\n\n const start = useCallback(() => {\n setActive((old) => {\n if (!old && !intervalRef.current) {\n intervalRef.current = window.setInterval(fnRef.current!, intervalValueRef.current)\n }\n return true\n })\n }, [])\n\n const stop = useCallback(() => {\n setActive(false)\n if (intervalRef.current) {\n window.clearInterval(intervalRef.current)\n }\n intervalRef.current = null\n }, [])\n\n const toggle = useCallback(() => {\n setActive((current) => {\n if (current) {\n if (intervalRef.current) {\n window.clearInterval(intervalRef.current)\n }\n intervalRef.current = null\n return false\n }\n if (!intervalRef.current) {\n intervalRef.current = window.setInterval(fnRef.current!, intervalValueRef.current)\n }\n return true\n })\n }, [])\n\n // biome-ignore lint/correctness/useExhaustiveDependencies: should includes the 'interval'\n useEffect(() => {\n fnRef.current = fn\n active && start()\n return stop\n }, [fn, active, interval, start, stop])\n\n // biome-ignore lint/correctness/useExhaustiveDependencies: should execute only once\n useEffect(() => {\n if (autoInvoke) {\n start()\n }\n }, [start])\n\n return { start, stop, toggle, active }\n}\n\nexport namespace useInterval {\n export type Options = UseIntervalOptions\n export type ReturnValue = UseIntervalReturnValue\n}\n"],"mappings":"qHAsBA,SAAgB,YACd,EACA,EACA,CAAE,aAAa,IAA8B,CAAC,EACtB,CACxB,IAAMA,EAAcC,EAAsB,IAAI,EACxCC,EAAQD,EAAmB,IAAI,EAC/BE,EAAmBF,EAAOG,CAAQ,EAElC,CAACC,EAAQC,GAAaC,EAAS,EAAK,EAE1C,EAAiB,QAAUH,EAE3B,IAAMI,EAAQC,MAAkB,CAC9BH,EAAW,IACL,CAACI,GAAO,CAACV,EAAY,UACvB,EAAY,QAAU,OAAO,YAAYE,EAAM,QAAUC,EAAiB,OAAO,GAE5E,GACR,CACH,EAAG,CAAC,CAAC,EAECQ,EAAOF,MAAkB,CAC7BH,EAAU,EAAK,EACXN,EAAY,SACd,OAAO,cAAcA,EAAY,OAAO,EAE1C,EAAY,QAAU,IACxB,EAAG,CAAC,CAAC,EAECY,EAASH,MAAkB,CAC/BH,EAAW,GACLO,GACEb,EAAY,SACd,OAAO,cAAcA,EAAY,OAAO,EAE1C,EAAY,QAAU,KACf,KAET,AACEA,EAAY,UAAU,OAAO,YAAYE,EAAM,QAAUC,EAAiB,OAAO,EAE5E,GACR,CACH,EAAG,CAAC,CAAC,EAgBL,OAbAW,OACE,EAAM,QAAUC,EAChBV,GAAUG,EAAM,EACTG,GACN,CAACI,EAAIV,EAAQD,EAAUI,EAAOG,CAAI,CAAC,EAGtCG,MAAgB,CACVE,GACFR,EAAM,CAEV,EAAG,CAACA,CAAK,CAAC,EAEH,CAAE,QAAO,OAAM,SAAQ,QAAO,CACvC"}
1
+ {"version":3,"file":"use-interval.js","names":["intervalRef","useRef","fnRef","intervalValueRef","interval","active","setActive","useState","start","useCallback","old","stop","toggle","current","useEffect","fn","autoInvoke"],"sources":["../../src/hooks/use-interval.ts"],"sourcesContent":["import { useCallback, useEffect, useRef, useState } from 'react'\n\nexport type UseIntervalOptions = {\n /** If set, the interval will start automatically when the component is mounted, `false` by default */\n autoInvoke?: boolean\n}\n\nexport type UseIntervalReturnValue = {\n /** Starts the interval */\n start: () => void\n\n /** Stops the interval */\n stop: () => void\n\n /** Toggles the interval */\n toggle: () => void\n\n /** Indicates if the interval is active */\n active: boolean\n}\n\n/** Runs `fn` every `interval` ms, with `start`, `stop` and `toggle` controls. */\nexport function useInterval(\n fn: () => void,\n interval: number,\n { autoInvoke = false }: UseIntervalOptions = {}\n): UseIntervalReturnValue {\n const intervalRef = useRef<number | null>(null)\n const fnRef = useRef<() => void>(null)\n const intervalValueRef = useRef(interval)\n\n const [active, setActive] = useState(false)\n\n intervalValueRef.current = interval\n\n const start = useCallback(() => {\n setActive((old) => {\n if (!old && !intervalRef.current) {\n intervalRef.current = window.setInterval(fnRef.current!, intervalValueRef.current)\n }\n return true\n })\n }, [])\n\n const stop = useCallback(() => {\n setActive(false)\n if (intervalRef.current) {\n window.clearInterval(intervalRef.current)\n }\n intervalRef.current = null\n }, [])\n\n const toggle = useCallback(() => {\n setActive((current) => {\n if (current) {\n if (intervalRef.current) {\n window.clearInterval(intervalRef.current)\n }\n intervalRef.current = null\n return false\n }\n if (!intervalRef.current) {\n intervalRef.current = window.setInterval(fnRef.current!, intervalValueRef.current)\n }\n return true\n })\n }, [])\n\n // biome-ignore lint/correctness/useExhaustiveDependencies: should includes the 'interval'\n useEffect(() => {\n fnRef.current = fn\n active && start()\n return stop\n }, [fn, active, interval, start, stop])\n\n // biome-ignore lint/correctness/useExhaustiveDependencies: should execute only once\n useEffect(() => {\n if (autoInvoke) {\n start()\n }\n }, [start])\n\n return { start, stop, toggle, active }\n}\n\nexport namespace useInterval {\n export type Options = UseIntervalOptions\n export type ReturnValue = UseIntervalReturnValue\n}\n"],"mappings":"A,qHAsBA,SAAgB,YACd,EACA,EACA,CAAE,aAAa,IAA8B,CAAC,EACtB,CACxB,IAAMA,EAAcC,EAAsB,IAAI,EACxCC,EAAQD,EAAmB,IAAI,EAC/BE,EAAmBF,EAAOG,CAAQ,EAElC,CAACC,EAAQC,GAAaC,EAAS,EAAK,EAE1C,EAAiB,QAAUH,EAE3B,IAAMI,EAAQC,MAAkB,CAC9BH,EAAW,IACL,CAACI,GAAO,CAACV,EAAY,UACvB,EAAY,QAAU,OAAO,YAAYE,EAAM,QAAUC,EAAiB,OAAO,GAE5E,GACR,CACH,EAAG,CAAC,CAAC,EAECQ,EAAOF,MAAkB,CAC7BH,EAAU,EAAK,EACXN,EAAY,SACd,OAAO,cAAcA,EAAY,OAAO,EAE1C,EAAY,QAAU,IACxB,EAAG,CAAC,CAAC,EAECY,EAASH,MAAkB,CAC/BH,EAAW,GACLO,GACEb,EAAY,SACd,OAAO,cAAcA,EAAY,OAAO,EAE1C,EAAY,QAAU,KACf,KAET,AACEA,EAAY,UAAU,OAAO,YAAYE,EAAM,QAAUC,EAAiB,OAAO,EAE5E,GACR,CACH,EAAG,CAAC,CAAC,EAgBL,OAbAW,OACE,EAAM,QAAUC,EAChBV,GAAUG,EAAM,EACTG,GACN,CAACI,EAAIV,EAAQD,EAAUI,EAAOG,CAAI,CAAC,EAGtCG,MAAgB,CACVE,GACFR,EAAM,CAEV,EAAG,CAACA,CAAK,CAAC,EAEH,CAAE,QAAO,OAAM,SAAQ,QAAO,CACvC,C"}
@@ -1,5 +1,4 @@
1
1
  import { t as __name } from "../rolldown-runtime-BhWHdk3m.js";
2
- //#region src/hooks/use-local-storage.d.ts
3
2
  export type UseLocalStorageOptions<T> = {
4
3
  /** Value used when nothing is stored for the key. */
5
4
  defaultValue?: T;
@@ -17,5 +16,4 @@ export declare function useLocalStorage<T = undefined>(key: string, options?: Us
17
16
  export declare namespace useLocalStorage {
18
17
  type Options<T> = UseLocalStorageOptions<T>;
19
18
  }
20
- //#endregion
21
19
  //# sourceMappingURL=use-local-storage.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"use-local-storage.js","names":["LOCAL_STORAGE_EVENT","value","defaultValue","item","key","options","defaultValueRef","useRef","storedValue","setStoredValue","useState","storedValueRef","setValue","useCallback","nextValue","resolvedValue","useEffect","sync","event","eventKey"],"sources":["../../src/hooks/use-local-storage.ts"],"sourcesContent":["import { useCallback, useEffect, useRef, useState } from 'react'\n\nexport type UseLocalStorageOptions<T> = {\n /** Value used when nothing is stored for the key. */\n defaultValue?: T\n /**\n * Keeps the value in sync across tabs and components using the same key.\n * @default true\n */\n sync?: boolean\n}\n\ntype LocalStorageEventDetail<T> = {\n key: string\n value: T | undefined\n}\n\nconst LOCAL_STORAGE_EVENT = 'uselets-ui:local-storage'\n\nfunction parseStorageValue<T>(value: string) {\n try {\n return JSON.parse(value) as T\n } catch {\n return value as T\n }\n}\n\nfunction readStorageValue<T>(key: string, defaultValue: T | undefined) {\n if (typeof window === 'undefined') {\n return defaultValue\n }\n\n try {\n const item = window.localStorage.getItem(key)\n\n if (item === null) {\n return defaultValue\n }\n\n return parseStorageValue<T>(item)\n } catch {\n return defaultValue\n }\n}\n\nfunction writeStorageValue<T>(key: string, value: T) {\n if (typeof window === 'undefined') {\n return\n }\n\n try {\n // `undefined` has no JSON form (it would be stored as the string \"undefined\"), so it clears the key instead.\n if (value === undefined) {\n window.localStorage.removeItem(key)\n } else {\n window.localStorage.setItem(key, JSON.stringify(value))\n }\n } catch {}\n\n window.dispatchEvent(new CustomEvent<LocalStorageEventDetail<T>>(LOCAL_STORAGE_EVENT, { detail: { key, value } }))\n}\n\n/** `useState` persisted in `localStorage` as JSON, synced across tabs and components by default. */\nexport function useLocalStorage<T>(\n key: string,\n options: UseLocalStorageOptions<T> & { defaultValue: T }\n): [T, React.Dispatch<React.SetStateAction<T>>]\n\nexport function useLocalStorage<T = undefined>(\n key: string,\n options?: UseLocalStorageOptions<T>\n): [T | undefined, React.Dispatch<React.SetStateAction<T | undefined>>]\n\nexport function useLocalStorage<T>(key: string, options: UseLocalStorageOptions<T> = {}) {\n const { defaultValue, sync = true } = options\n const defaultValueRef = useRef(defaultValue)\n const [storedValue, setStoredValue] = useState<T | undefined>(() => readStorageValue<T>(key, defaultValue))\n const storedValueRef = useRef(storedValue)\n\n defaultValueRef.current = defaultValue\n storedValueRef.current = storedValue\n\n const setValue = useCallback<React.Dispatch<React.SetStateAction<T | undefined>>>(\n (value) => {\n const nextValue =\n typeof value === 'function'\n ? (value as (previousValue: T | undefined) => T | undefined)(storedValueRef.current)\n : value\n\n writeStorageValue(key, nextValue)\n const resolvedValue = nextValue === undefined ? defaultValueRef.current : nextValue\n storedValueRef.current = resolvedValue\n setStoredValue(resolvedValue)\n },\n [key]\n )\n\n useEffect(() => {\n if (!sync || typeof window === 'undefined') {\n return\n }\n\n const handleStorage = (event: StorageEvent) => {\n if (event.storageArea !== window.localStorage || event.key !== key) {\n return\n }\n\n const nextValue = event.newValue === null ? defaultValueRef.current : parseStorageValue<T>(event.newValue)\n\n storedValueRef.current = nextValue\n setStoredValue(nextValue)\n }\n\n const handleLocalStorageEvent = (event: Event) => {\n const { key: eventKey, value } = (event as CustomEvent<LocalStorageEventDetail<T>>).detail\n\n if (eventKey !== key) {\n return\n }\n\n const nextValue = value === undefined ? defaultValueRef.current : value\n\n storedValueRef.current = nextValue\n setStoredValue(nextValue)\n }\n\n window.addEventListener('storage', handleStorage)\n window.addEventListener(LOCAL_STORAGE_EVENT, handleLocalStorageEvent)\n\n return () => {\n window.removeEventListener('storage', handleStorage)\n window.removeEventListener(LOCAL_STORAGE_EVENT, handleLocalStorageEvent)\n }\n }, [key, sync])\n\n return [storedValue, setValue]\n}\n\nexport namespace useLocalStorage {\n export type Options<T> = UseLocalStorageOptions<T>\n}\n"],"mappings":"qHAiBA,MAAMA,EAAsB,2BAE5B,SAAS,kBAAqB,EAAe,CAC3C,GAAI,CACF,OAAO,KAAK,MAAMC,CAAK,CACzB,MAAQ,CACN,OAAOA,CACT,CACF,CAEA,SAAS,iBAAoB,EAAa,EAA6B,CACrE,GAAI,OAAO,OAAW,IACpB,OAAOC,EAGT,GAAI,CACF,IAAMC,EAAO,OAAO,aAAa,QAAQC,CAAG,EAM5C,OAJID,IAAS,KACJD,EAGF,kBAAqBC,CAAI,CAClC,MAAQ,CACN,OAAOD,CACT,CACF,CAEA,SAAS,kBAAqB,EAAa,EAAU,CACnD,GAAI,OAAO,OAAW,IAItB,IAAI,CAEED,IAAU,IAAA,GACZ,OAAO,aAAa,WAAWG,CAAG,EAElC,OAAO,aAAa,QAAQA,EAAK,KAAK,UAAUH,CAAK,CAAC,CAE1D,MAAQ,CAAC,CAET,OAAO,cAAc,IAAI,YAAwCD,EAAqB,CAAE,OAAQ,CAAE,MAAK,OAAM,CAAE,CAAC,CAAC,CAFxG,CAGX,CAaA,SAAgB,gBAAmB,EAAa,EAAqC,CAAC,EAAG,CACvF,GAAM,CAAE,eAAc,OAAO,IAASK,EAChCC,EAAkBC,EAAOL,CAAY,EACrC,CAACM,EAAaC,GAAkBC,MAA8B,iBAAoBN,EAAKF,CAAY,CAAC,EACpGS,EAAiBJ,EAAOC,CAAW,EAEzC,EAAgB,QAAUN,EAC1B,EAAe,QAAUM,EAEzB,IAAMI,EAAWC,EACd,GAAU,CACT,IAAMC,EACJ,OAAOb,GAAU,WACZA,EAA0DU,EAAe,OAAO,EACjFV,EAEN,kBAAkBG,EAAKU,CAAS,EAChC,IAAMC,EAAgBD,IAAc,IAAA,GAAYR,EAAgB,QAAUQ,EAC1E,EAAe,QAAUC,EACzBN,EAAeM,CAAa,CAC9B,EACA,CAACX,CAAG,CACN,EAwCA,OAtCAY,MAAgB,CACd,GAAI,CAACC,GAAQ,OAAO,OAAW,IAC7B,OAGF,IAAM,cAAiB,GAAwB,CAC7C,GAAIC,EAAM,cAAgB,OAAO,cAAgBA,EAAM,MAAQd,EAC7D,OAGF,IAAMU,EAAYI,EAAM,WAAa,KAAOZ,EAAgB,QAAU,kBAAqBY,EAAM,QAAQ,EAEzG,EAAe,QAAUJ,EACzBL,EAAeK,CAAS,CAC1B,EAEM,wBAA2B,GAAiB,CAChD,GAAM,CAAE,IAAKK,EAAU,SAAWD,EAAkD,OAEpF,GAAIC,IAAaf,EACf,OAGF,IAAMU,EAAYb,IAAU,IAAA,GAAYK,EAAgB,QAAUL,EAElE,EAAe,QAAUa,EACzBL,EAAeK,CAAS,CAC1B,EAKA,OAHA,OAAO,iBAAiB,UAAW,aAAa,EAChD,OAAO,iBAAiBd,EAAqB,uBAAuB,MAEvD,CACX,OAAO,oBAAoB,UAAW,aAAa,EACnD,OAAO,oBAAoBA,EAAqB,uBAAuB,CACzE,CACF,EAAG,CAACI,EAAKa,CAAI,CAAC,EAEP,CAACT,EAAaI,CAAQ,CAC/B"}
1
+ {"version":3,"file":"use-local-storage.js","names":["LOCAL_STORAGE_EVENT","value","defaultValue","item","key","options","defaultValueRef","useRef","storedValue","setStoredValue","useState","storedValueRef","setValue","useCallback","nextValue","resolvedValue","useEffect","sync","event","eventKey"],"sources":["../../src/hooks/use-local-storage.ts"],"sourcesContent":["import { useCallback, useEffect, useRef, useState } from 'react'\n\nexport type UseLocalStorageOptions<T> = {\n /** Value used when nothing is stored for the key. */\n defaultValue?: T\n /**\n * Keeps the value in sync across tabs and components using the same key.\n * @default true\n */\n sync?: boolean\n}\n\ntype LocalStorageEventDetail<T> = {\n key: string\n value: T | undefined\n}\n\nconst LOCAL_STORAGE_EVENT = 'uselets-ui:local-storage'\n\nfunction parseStorageValue<T>(value: string) {\n try {\n return JSON.parse(value) as T\n } catch {\n return value as T\n }\n}\n\nfunction readStorageValue<T>(key: string, defaultValue: T | undefined) {\n if (typeof window === 'undefined') {\n return defaultValue\n }\n\n try {\n const item = window.localStorage.getItem(key)\n\n if (item === null) {\n return defaultValue\n }\n\n return parseStorageValue<T>(item)\n } catch {\n return defaultValue\n }\n}\n\nfunction writeStorageValue<T>(key: string, value: T) {\n if (typeof window === 'undefined') {\n return\n }\n\n try {\n // `undefined` has no JSON form (it would be stored as the string \"undefined\"), so it clears the key instead.\n if (value === undefined) {\n window.localStorage.removeItem(key)\n } else {\n window.localStorage.setItem(key, JSON.stringify(value))\n }\n } catch {}\n\n window.dispatchEvent(new CustomEvent<LocalStorageEventDetail<T>>(LOCAL_STORAGE_EVENT, { detail: { key, value } }))\n}\n\n/** `useState` persisted in `localStorage` as JSON, synced across tabs and components by default. */\nexport function useLocalStorage<T>(\n key: string,\n options: UseLocalStorageOptions<T> & { defaultValue: T }\n): [T, React.Dispatch<React.SetStateAction<T>>]\n\nexport function useLocalStorage<T = undefined>(\n key: string,\n options?: UseLocalStorageOptions<T>\n): [T | undefined, React.Dispatch<React.SetStateAction<T | undefined>>]\n\nexport function useLocalStorage<T>(key: string, options: UseLocalStorageOptions<T> = {}) {\n const { defaultValue, sync = true } = options\n const defaultValueRef = useRef(defaultValue)\n const [storedValue, setStoredValue] = useState<T | undefined>(() => readStorageValue<T>(key, defaultValue))\n const storedValueRef = useRef(storedValue)\n\n defaultValueRef.current = defaultValue\n storedValueRef.current = storedValue\n\n const setValue = useCallback<React.Dispatch<React.SetStateAction<T | undefined>>>(\n (value) => {\n const nextValue =\n typeof value === 'function'\n ? (value as (previousValue: T | undefined) => T | undefined)(storedValueRef.current)\n : value\n\n writeStorageValue(key, nextValue)\n const resolvedValue = nextValue === undefined ? defaultValueRef.current : nextValue\n storedValueRef.current = resolvedValue\n setStoredValue(resolvedValue)\n },\n [key]\n )\n\n useEffect(() => {\n if (!sync || typeof window === 'undefined') {\n return\n }\n\n const handleStorage = (event: StorageEvent) => {\n if (event.storageArea !== window.localStorage || event.key !== key) {\n return\n }\n\n const nextValue = event.newValue === null ? defaultValueRef.current : parseStorageValue<T>(event.newValue)\n\n storedValueRef.current = nextValue\n setStoredValue(nextValue)\n }\n\n const handleLocalStorageEvent = (event: Event) => {\n const { key: eventKey, value } = (event as CustomEvent<LocalStorageEventDetail<T>>).detail\n\n if (eventKey !== key) {\n return\n }\n\n const nextValue = value === undefined ? defaultValueRef.current : value\n\n storedValueRef.current = nextValue\n setStoredValue(nextValue)\n }\n\n window.addEventListener('storage', handleStorage)\n window.addEventListener(LOCAL_STORAGE_EVENT, handleLocalStorageEvent)\n\n return () => {\n window.removeEventListener('storage', handleStorage)\n window.removeEventListener(LOCAL_STORAGE_EVENT, handleLocalStorageEvent)\n }\n }, [key, sync])\n\n return [storedValue, setValue]\n}\n\nexport namespace useLocalStorage {\n export type Options<T> = UseLocalStorageOptions<T>\n}\n"],"mappings":"A,qHAiBA,MAAMA,EAAsB,2BAE5B,SAAS,kBAAqB,EAAe,CAC3C,GAAI,CACF,OAAO,KAAK,MAAMC,CAAK,CACzB,MAAQ,CACN,OAAOA,CACT,CACF,CAEA,SAAS,iBAAoB,EAAa,EAA6B,CACrE,GAAI,OAAO,OAAW,IACpB,OAAOC,EAGT,GAAI,CACF,IAAMC,EAAO,OAAO,aAAa,QAAQC,CAAG,EAM5C,OAJID,IAAS,KACJD,EAGF,kBAAqBC,CAAI,CAClC,MAAQ,CACN,OAAOD,CACT,CACF,CAEA,SAAS,kBAAqB,EAAa,EAAU,CACnD,GAAI,OAAO,OAAW,IAItB,IAAI,CAEED,IAAU,IAAA,GACZ,OAAO,aAAa,WAAWG,CAAG,EAElC,OAAO,aAAa,QAAQA,EAAK,KAAK,UAAUH,CAAK,CAAC,CAE1D,MAAQ,CAAC,CAET,OAAO,cAAc,IAAI,YAAwCD,EAAqB,CAAE,OAAQ,CAAE,MAAK,OAAM,CAAE,CAAC,CAAC,CAFxG,CAGX,CAaA,SAAgB,gBAAmB,EAAa,EAAqC,CAAC,EAAG,CACvF,GAAM,CAAE,eAAc,OAAO,IAASK,EAChCC,EAAkBC,EAAOL,CAAY,EACrC,CAACM,EAAaC,GAAkBC,MAA8B,iBAAoBN,EAAKF,CAAY,CAAC,EACpGS,EAAiBJ,EAAOC,CAAW,EAEzC,EAAgB,QAAUN,EAC1B,EAAe,QAAUM,EAEzB,IAAMI,EAAWC,EACd,GAAU,CACT,IAAMC,EACJ,OAAOb,GAAU,WACZA,EAA0DU,EAAe,OAAO,EACjFV,EAEN,kBAAkBG,EAAKU,CAAS,EAChC,IAAMC,EAAgBD,IAAc,IAAA,GAAYR,EAAgB,QAAUQ,EAC1E,EAAe,QAAUC,EACzBN,EAAeM,CAAa,CAC9B,EACA,CAACX,CAAG,CACN,EAwCA,OAtCAY,MAAgB,CACd,GAAI,CAACC,GAAQ,OAAO,OAAW,IAC7B,OAGF,IAAM,cAAiB,GAAwB,CAC7C,GAAIC,EAAM,cAAgB,OAAO,cAAgBA,EAAM,MAAQd,EAC7D,OAGF,IAAMU,EAAYI,EAAM,WAAa,KAAOZ,EAAgB,QAAU,kBAAqBY,EAAM,QAAQ,EAEzG,EAAe,QAAUJ,EACzBL,EAAeK,CAAS,CAC1B,EAEM,wBAA2B,GAAiB,CAChD,GAAM,CAAE,IAAKK,EAAU,SAAWD,EAAkD,OAEpF,GAAIC,IAAaf,EACf,OAGF,IAAMU,EAAYb,IAAU,IAAA,GAAYK,EAAgB,QAAUL,EAElE,EAAe,QAAUa,EACzBL,EAAeK,CAAS,CAC1B,EAKA,OAHA,OAAO,iBAAiB,UAAW,aAAa,EAChD,OAAO,iBAAiBd,EAAqB,uBAAuB,MAEvD,CACX,OAAO,oBAAoB,UAAW,aAAa,EACnD,OAAO,oBAAoBA,EAAqB,uBAAuB,CACzE,CACF,EAAG,CAACI,EAAKa,CAAI,CAAC,EAEP,CAACT,EAAaI,CAAQ,CAC/B,C"}
@@ -1,9 +1,7 @@
1
1
  import { t as __name } from "../rolldown-runtime-BhWHdk3m.js";
2
2
  import { MaskOptions, MaskOptions as MaskOptions$1, ModifiedData, Modify, Replacement, Track, TrackingData } from "@react-input/mask";
3
- //#region src/hooks/use-mask.d.ts
4
3
  export type UseMaskOptions = MaskOptions$1;
5
4
  /** Masks the value of your own input. Returns a ref for the `<input>`. Default tokens: `_` digit, `#` letter, `*` any. */
6
5
  export declare function useMask(options?: UseMaskOptions): import("react").MutableRefObject<HTMLInputElement>;
7
- //#endregion
8
6
  export type { MaskOptions, ModifiedData, Modify, Replacement, Track, TrackingData };
9
7
  //# sourceMappingURL=use-mask.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"use-mask.js","names":["useReactInputMask","useMask$1","DEFAULT_REPLACEMENT","rest","options","safeMask","replacement","mask","token"],"sources":["../../src/hooks/use-mask.ts"],"sourcesContent":["import type { MaskOptions, Replacement } from '@react-input/mask'\nimport { useMask as useReactInputMask } from '@react-input/mask'\n\nexport type { MaskOptions, ModifiedData, Modify, Replacement, Track, TrackingData } from '@react-input/mask'\n\nconst DEFAULT_REPLACEMENT: Replacement = {\n _: /\\d/,\n '#': /[A-Za-z]/,\n '*': /./\n}\n\nexport type UseMaskOptions = MaskOptions\n\n/** Masks the value of your own input. Returns a ref for the `<input>`. Default tokens: `_` digit, `#` letter, `*` any. */\nexport function useMask(options: UseMaskOptions = {}) {\n const { replacement, mask, ...rest } = options\n\n // Legacy default tokens (9/a) collided with typed digits/letters; rewrite them to the safe tokens (_/#) when the default replacement is in effect.\n const safeMask = !replacement && mask ? mask.replace(/[9a]/g, (token) => (token === '9' ? '_' : '#')) : mask\n\n return useReactInputMask({\n mask: safeMask,\n ...rest,\n replacement: replacement ?? DEFAULT_REPLACEMENT\n })\n}\n"],"mappings":"oFAKA,MAAME,EAAmC,CACvC,EAAG,KACH,IAAK,WACL,IAAK,GACP,EAKA,SAAgB,QAAQ,EAA0B,CAAC,EAAG,CACpD,GAAM,CAAE,cAAa,OAAM,GAAGC,GAASC,EAGjCC,EAAW,CAACC,GAAeC,EAAOA,EAAK,QAAQ,QAAU,GAAWC,IAAU,IAAM,IAAM,GAAI,EAAID,EAExG,OAAOP,EAAkB,CACvB,KAAMK,EACN,GAAGF,EACH,YAAaG,GAAeJ,CAC9B,CAAC,CACH"}
1
+ {"version":3,"file":"use-mask.js","names":["useReactInputMask","useMask$1","DEFAULT_REPLACEMENT","rest","options","safeMask","replacement","mask","token"],"sources":["../../src/hooks/use-mask.ts"],"sourcesContent":["import type { MaskOptions, Replacement } from '@react-input/mask'\nimport { useMask as useReactInputMask } from '@react-input/mask'\n\nexport type { MaskOptions, ModifiedData, Modify, Replacement, Track, TrackingData } from '@react-input/mask'\n\nconst DEFAULT_REPLACEMENT: Replacement = {\n _: /\\d/,\n '#': /[A-Za-z]/,\n '*': /./\n}\n\nexport type UseMaskOptions = MaskOptions\n\n/** Masks the value of your own input. Returns a ref for the `<input>`. Default tokens: `_` digit, `#` letter, `*` any. */\nexport function useMask(options: UseMaskOptions = {}) {\n const { replacement, mask, ...rest } = options\n\n // Legacy default tokens (9/a) collided with typed digits/letters; rewrite them to the safe tokens (_/#) when the default replacement is in effect.\n const safeMask = !replacement && mask ? mask.replace(/[9a]/g, (token) => (token === '9' ? '_' : '#')) : mask\n\n return useReactInputMask({\n mask: safeMask,\n ...rest,\n replacement: replacement ?? DEFAULT_REPLACEMENT\n })\n}\n"],"mappings":"A,oFAKA,MAAME,EAAmC,CACvC,EAAG,KACH,IAAK,WACL,IAAK,GACP,EAKA,SAAgB,QAAQ,EAA0B,CAAC,EAAG,CACpD,GAAM,CAAE,cAAa,OAAM,GAAGC,GAASC,EAGjCC,EAAW,CAACC,GAAeC,EAAOA,EAAK,QAAQ,QAAU,GAAWC,IAAU,IAAM,IAAM,GAAI,EAAID,EAExG,OAAOP,EAAkB,CACvB,KAAMK,EACN,GAAGF,EACH,YAAaG,GAAeJ,CAC9B,CAAC,CACH,C"}
@@ -1,6 +1,4 @@
1
1
  import { t as __name } from "../rolldown-runtime-BhWHdk3m.js";
2
- //#region src/hooks/use-mobile.d.ts
3
2
  /** Returns whether the viewport is narrower than `768px`. */
4
3
  export declare function useIsMobile(): boolean;
5
- //#endregion
6
4
  //# sourceMappingURL=use-mobile.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"use-mobile.js","names":["React","isMobile","setIsMobile","mql"],"sources":["../../src/hooks/use-mobile.ts"],"sourcesContent":["import * as React from 'react'\n\nconst MOBILE_BREAKPOINT = 768\n\n/** Returns whether the viewport is narrower than `768px`. */\nexport function useIsMobile() {\n const [isMobile, setIsMobile] = React.useState<boolean | undefined>(undefined)\n\n React.useEffect(() => {\n const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`)\n const onChange = () => {\n setIsMobile(window.innerWidth < MOBILE_BREAKPOINT)\n }\n mql.addEventListener('change', onChange)\n setIsMobile(window.innerWidth < MOBILE_BREAKPOINT)\n return () => mql.removeEventListener('change', onChange)\n }, [])\n\n return !!isMobile\n}\n"],"mappings":"gEAKA,SAAgB,aAAc,CAC5B,GAAM,CAACC,EAAUC,GAAeF,EAAM,SAA8B,IAAA,EAAS,EAY7E,OAVAA,EAAM,cAAgB,CACpB,IAAMG,EAAM,OAAO,WAAW,oBAAyC,EACjE,aAAiB,CACrBD,EAAY,OAAO,WAAa,GAAiB,CACnD,EAGA,OAFAC,EAAI,iBAAiB,SAAU,QAAQ,EACvCD,EAAY,OAAO,WAAa,GAAiB,MACpCC,EAAI,oBAAoB,SAAU,QAAQ,CACzD,EAAG,CAAC,CAAC,EAEE,CAAC,CAACF,CACX"}
1
+ {"version":3,"file":"use-mobile.js","names":["React","isMobile","setIsMobile","mql"],"sources":["../../src/hooks/use-mobile.ts"],"sourcesContent":["import * as React from 'react'\n\nconst MOBILE_BREAKPOINT = 768\n\n/** Returns whether the viewport is narrower than `768px`. */\nexport function useIsMobile() {\n const [isMobile, setIsMobile] = React.useState<boolean | undefined>(undefined)\n\n React.useEffect(() => {\n const mql = window.matchMedia(`(max-width: ${MOBILE_BREAKPOINT - 1}px)`)\n const onChange = () => {\n setIsMobile(window.innerWidth < MOBILE_BREAKPOINT)\n }\n mql.addEventListener('change', onChange)\n setIsMobile(window.innerWidth < MOBILE_BREAKPOINT)\n return () => mql.removeEventListener('change', onChange)\n }, [])\n\n return !!isMobile\n}\n"],"mappings":"A,gEAKA,SAAgB,aAAc,CAC5B,GAAM,CAACC,EAAUC,GAAeF,EAAM,SAA8B,IAAA,EAAS,EAY7E,OAVAA,EAAM,cAAgB,CACpB,IAAMG,EAAM,OAAO,WAAW,oBAAyC,EACjE,aAAiB,CACrBD,EAAY,OAAO,WAAa,GAAiB,CACnD,EAGA,OAFAC,EAAI,iBAAiB,SAAU,QAAQ,EACvCD,EAAY,OAAO,WAAa,GAAiB,MACpCC,EAAI,oBAAoB,SAAU,QAAQ,CACzD,EAAG,CAAC,CAAC,EAEE,CAAC,CAACF,CACX,C"}
package/dist/index.d.ts CHANGED
@@ -1,10 +1,10 @@
1
- import { i as useAsChild, n as AsChildProps, r as toAsChildRenderProps, t as AsChildPrimitiveProps } from "./as-child-Dxg3Xo1G.js";
1
+ import { i as useAsChild, n as AsChildProps, r as toAsChildRenderProps, t as AsChildPrimitiveProps } from "./as-child-T9W73ZYU.js";
2
2
  import { Accordion, AccordionContent, AccordionContentProps, AccordionItem, AccordionItemProps, AccordionProps, AccordionTrigger, AccordionTriggerProps } from "./components/accordion.js";
3
3
  import { Button, ButtonProps, buttonVariants } from "./components/button.js";
4
4
  import { AlertDialog, AlertDialogAction, AlertDialogActionProps, AlertDialogCancel, AlertDialogCancelProps, AlertDialogContent, AlertDialogContentProps, AlertDialogDescription, AlertDialogDescriptionProps, AlertDialogFooter, AlertDialogFooterProps, AlertDialogHeader, AlertDialogHeaderProps, AlertDialogMedia, AlertDialogMediaProps, AlertDialogOverlay, AlertDialogOverlayProps, AlertDialogPortal, AlertDialogPortalProps, AlertDialogProps, AlertDialogTitle, AlertDialogTitleProps, AlertDialogTrigger, AlertDialogTriggerProps } from "./components/alert-dialog.js";
5
5
  import { Alert, AlertAction, AlertActionProps, AlertDescription, AlertDescriptionProps, AlertProps, AlertTitle, AlertTitleProps } from "./components/alert.js";
6
6
  import { Anchor, AnchorProps, anchorVariants } from "./components/anchor.js";
7
- import { _ as resolveChartColor, a as ChartContainerProps, c as ChartLegendContentProps, d as ChartStyleProps, f as ChartTooltip, g as DEFAULT_CHART_PALETTE, h as ChartTooltipProps, i as ChartContainer, l as ChartLegendProps, m as ChartTooltipContentProps, n as ChartColorKey, o as ChartLegend, p as ChartTooltipContent, r as ChartConfig, s as ChartLegendContent, t as CHART_COLOR_KEYS, u as ChartStyle } from "./chart-B_6nC_ih.js";
7
+ import { _ as resolveChartColor, a as ChartContainerProps, c as ChartLegendContentProps, d as ChartStyleProps, f as ChartTooltip, g as DEFAULT_CHART_PALETTE, h as ChartTooltipProps, i as ChartContainer, l as ChartLegendProps, m as ChartTooltipContentProps, n as ChartColorKey, o as ChartLegend, p as ChartTooltipContent, r as ChartConfig, s as ChartLegendContent, t as CHART_COLOR_KEYS, u as ChartStyle } from "./chart-8rgtsk95.js";
8
8
  import { AreaChart, AreaChartCurveType, AreaChartGridAxis, AreaChartProps, AreaChartSeries, AreaChartType } from "./components/area-chart.js";
9
9
  import { Avatar, AvatarBadge, AvatarBadgeProps, AvatarFallback, AvatarFallbackProps, AvatarGroup, AvatarGroupCount, AvatarGroupCountProps, AvatarGroupProps, AvatarImage, AvatarImageProps, AvatarProps } from "./components/avatar.js";
10
10
  import { Badge, BadgeProps, badgeVariants } from "./components/badge.js";
@@ -86,7 +86,7 @@ import { HiddenFrom, HiddenFromProps, VisibleFrom, VisibleFromProps } from "./co
86
86
  import { ResponsiveValueMap, useBreakpointValue } from "./hooks/use-breakpoint-value.js";
87
87
  import { UseDisclosureHandlers, UseDisclosureOptions, UseDisclosureReturnValue, useDisclosure } from "./hooks/use-disclosure.js";
88
88
  import { useDocumentVisibility } from "./hooks/use-document-visibility.js";
89
- import { i as getHotkeyHandler, n as useHotkeys, r as HotkeyItemOptions, t as HotkeyItem } from "./use-hotkeys-D1_TEIwN.js";
89
+ import { i as getHotkeyHandler, n as useHotkeys, r as HotkeyItemOptions, t as HotkeyItem } from "./use-hotkeys-BVm0IGb8.js";
90
90
  import { UseIdleOptions, useIdle } from "./hooks/use-idle.js";
91
91
  import { UseIntervalOptions, UseIntervalReturnValue, useInterval } from "./hooks/use-interval.js";
92
92
  import { UseLocalStorageOptions, useLocalStorage } from "./hooks/use-local-storage.js";
@@ -1,2 +1,2 @@
1
- import { i as useAsChild, n as AsChildProps, r as toAsChildRenderProps, t as AsChildPrimitiveProps } from "../as-child-Dxg3Xo1G.js";
1
+ import { i as useAsChild, n as AsChildProps, r as toAsChildRenderProps, t as AsChildPrimitiveProps } from "../as-child-T9W73ZYU.js";
2
2
  export { AsChildPrimitiveProps, AsChildProps, toAsChildRenderProps, useAsChild };
@@ -1 +1 @@
1
- {"version":3,"file":"as-child.js","names":["React","rest","props","useRender","asChild","children"],"sources":["../../src/lib/as-child.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { useRender } from '@base-ui/react/use-render'\n\ntype AsChildTag = keyof React.JSX.IntrinsicElements\n\nexport type AsChildProps<Tag extends AsChildTag> = React.ComponentProps<Tag> & {\n /** Renders the child element instead of the default one, passing this component's props and behavior to it. */\n asChild?: boolean\n}\n\n/**\n * Public props of a component built on a Base UI part: Base UI's own `render` prop is stripped, so\n * `asChild` stays the only polymorphism API exposed by this package.\n */\nexport type AsChildPrimitiveProps<Component extends React.ElementType> = Omit<\n React.ComponentProps<Component>,\n 'render'\n> & {\n /** Renders the child element instead of the default one, passing this component's props and behavior to it. */\n asChild?: boolean\n}\n\n// Deliberately loose (index signature): callers build this object by spreading the component's\n// own strongly-typed public props alongside extra internal `data-*` keys, which an object typed\n// only with the known `AsChildProps` keys would reject as excess properties outside JSX.\ntype UseAsChildProps<Tag extends AsChildTag> = Record<string, unknown> & {\n asChild?: boolean\n children?: React.ReactNode\n ref?: React.Ref<React.ComponentRef<Tag>>\n}\n\n/**\n * Drop-in replacement for the `const Comp = asChild ? Slot.Root : 'tag'` idiom, for components\n * with no Base UI primitive underneath. `asChild` stays the only public polymorphism API — Base\n * UI's own `render` prop never leaks out of this package.\n */\nfunction useAsChild<Tag extends AsChildTag>(defaultTagName: Tag, props: UseAsChildProps<Tag>) {\n const { asChild = false, children, ref, ...rest } = props\n\n return useRender<Record<string, unknown>, Element>({\n defaultTagName,\n ref: ref as React.Ref<Element>,\n render: asChild ? (React.Children.only(children) as React.ReactElement) : undefined,\n props: asChild ? rest : { ...rest, children }\n })\n}\n\n/**\n * For a component that wraps a real Base UI part (which natively accepts `render`) but exposes\n * `asChild` instead. Spread the result after the component's own props so it always wins.\n *\n * With `asChild`, the single child element becomes the rendered element and replaces the part's\n * content. Parts must not render their own content in that case (the child element is `children`).\n */\nfunction toAsChildRenderProps<Children>(\n asChild: boolean | undefined,\n children: Children\n): { render?: React.ReactElement; children?: Children } {\n if (!asChild) {\n return { children }\n }\n\n return { render: React.Children.only(children as React.ReactNode) as React.ReactElement }\n}\n\nexport { toAsChildRenderProps, useAsChild }\n"],"mappings":"sHAqCA,SAAS,WAAmC,EAAqB,EAA6B,CAC5F,GAAM,CAAE,UAAU,GAAO,WAAU,MAAK,GAAGC,GAASC,EAEpD,OAAOC,EAA4C,CACjD,iBACK,MACL,OAAQC,EAAWJ,EAAM,SAAS,KAAKK,CAAQ,EAA2B,IAAA,GAC1E,MAAOD,EAAUH,EAAO,CAAE,GAAGA,EAAM,UAAS,CAC9C,CAAC,CACH,CASA,SAAS,qBACP,EACA,EACsD,CAKtD,OAJKG,EAIE,CAAE,OAAQJ,EAAM,SAAS,KAAKK,CAA2B,CAAwB,EAH/E,CAAE,UAAS,CAItB"}
1
+ {"version":3,"file":"as-child.js","names":["React","rest","props","useRender","asChild","children"],"sources":["../../src/lib/as-child.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { useRender } from '@base-ui/react/use-render'\n\ntype AsChildTag = keyof React.JSX.IntrinsicElements\n\nexport type AsChildProps<Tag extends AsChildTag> = React.ComponentProps<Tag> & {\n /** Renders the child element instead of the default one, passing this component's props and behavior to it. */\n asChild?: boolean\n}\n\n/**\n * Public props of a component built on a Base UI part: Base UI's own `render` prop is stripped, so\n * `asChild` stays the only polymorphism API exposed by this package.\n */\nexport type AsChildPrimitiveProps<Component extends React.ElementType> = Omit<\n React.ComponentProps<Component>,\n 'render'\n> & {\n /** Renders the child element instead of the default one, passing this component's props and behavior to it. */\n asChild?: boolean\n}\n\n// Deliberately loose (index signature): callers build this object by spreading the component's\n// own strongly-typed public props alongside extra internal `data-*` keys, which an object typed\n// only with the known `AsChildProps` keys would reject as excess properties outside JSX.\ntype UseAsChildProps<Tag extends AsChildTag> = Record<string, unknown> & {\n asChild?: boolean\n children?: React.ReactNode\n ref?: React.Ref<React.ComponentRef<Tag>>\n}\n\n/**\n * Drop-in replacement for the `const Comp = asChild ? Slot.Root : 'tag'` idiom, for components\n * with no Base UI primitive underneath. `asChild` stays the only public polymorphism API — Base\n * UI's own `render` prop never leaks out of this package.\n */\nfunction useAsChild<Tag extends AsChildTag>(defaultTagName: Tag, props: UseAsChildProps<Tag>) {\n const { asChild = false, children, ref, ...rest } = props\n\n return useRender<Record<string, unknown>, Element>({\n defaultTagName,\n ref: ref as React.Ref<Element>,\n render: asChild ? (React.Children.only(children) as React.ReactElement) : undefined,\n props: asChild ? rest : { ...rest, children }\n })\n}\n\n/**\n * For a component that wraps a real Base UI part (which natively accepts `render`) but exposes\n * `asChild` instead. Spread the result after the component's own props so it always wins.\n *\n * With `asChild`, the single child element becomes the rendered element and replaces the part's\n * content. Parts must not render their own content in that case (the child element is `children`).\n */\nfunction toAsChildRenderProps<Children>(\n asChild: boolean | undefined,\n children: Children\n): { render?: React.ReactElement; children?: Children } {\n if (!asChild) {\n return { children }\n }\n\n return { render: React.Children.only(children as React.ReactNode) as React.ReactElement }\n}\n\nexport { toAsChildRenderProps, useAsChild }\n"],"mappings":"A,sHAqCA,SAAS,WAAmC,EAAqB,EAA6B,CAC5F,GAAM,CAAE,UAAU,GAAO,WAAU,MAAK,GAAGC,GAASC,EAEpD,OAAOC,EAA4C,CACjD,iBACK,MACL,OAAQC,EAAWJ,EAAM,SAAS,KAAKK,CAAQ,EAA2B,IAAA,GAC1E,MAAOD,EAAUH,EAAO,CAAE,GAAGA,EAAM,UAAS,CAC9C,CAAC,CACH,CASA,SAAS,qBACP,EACA,EACsD,CAKtD,OAJKG,EAIE,CAAE,OAAQJ,EAAM,SAAS,KAAKK,CAA2B,CAAwB,EAH/E,CAAE,UAAS,CAItB,C"}
@@ -1,6 +1,5 @@
1
1
  import { t as __name } from "../rolldown-runtime-BhWHdk3m.js";
2
2
  import { UIColor } from "./color.js";
3
- //#region src/lib/badge.d.ts
4
3
  export declare const badgeColorVariants: {
5
4
  readonly primary: readonly ["[--badge-solid:var(--primary)]", "[--badge-solid-foreground:var(--zinc-50)]", "[--badge-outline-border:var(--primary)]", "[--badge-outline-foreground:var(--primary)]", "[--badge-soft:var(--primary-50)]", "[--badge-soft-hover:var(--primary-100)]", "[--badge-soft-foreground:var(--primary)]", "dark:[--badge-solid:var(--primary)]", "dark:[--badge-outline-border:var(--primary)]", "dark:[--badge-outline-foreground:var(--primary)]", "dark:[--badge-soft:var(--primary-950)]", "dark:[--badge-soft-hover:var(--primary-900)]", "dark:[--badge-soft-foreground:var(--primary)]"];
6
5
  readonly brand: readonly ["[--badge-solid:var(--brand)]", "[--badge-solid-foreground:var(--zinc-50)]", "[--badge-outline-border:var(--brand)]", "[--badge-outline-foreground:var(--brand)]", "[--badge-soft:var(--brand-50)]", "[--badge-soft-hover:var(--brand-100)]", "[--badge-soft-foreground:var(--brand)]", "dark:[--badge-solid:var(--brand)]", "dark:[--badge-outline-border:var(--brand)]", "dark:[--badge-outline-foreground:var(--brand)]", "dark:[--badge-soft:var(--brand-950)]", "dark:[--badge-soft-hover:var(--brand-900)]", "dark:[--badge-soft-foreground:var(--brand)]"];
@@ -14,5 +13,4 @@ export declare const badgeColorVariants: {
14
13
  readonly green: readonly ["[--badge-solid:var(--green)]", "[--badge-solid-foreground:var(--zinc-50)]", "[--badge-outline-border:var(--green)]", "[--badge-outline-foreground:var(--green)]", "[--badge-soft:var(--green-50)]", "[--badge-soft-hover:var(--green-100)]", "[--badge-soft-foreground:var(--green)]", "dark:[--badge-solid:var(--green)]", "dark:[--badge-outline-border:var(--green)]", "dark:[--badge-outline-foreground:var(--green)]", "dark:[--badge-soft:var(--green-950)]", "dark:[--badge-soft-hover:var(--green-900)]", "dark:[--badge-soft-foreground:var(--green)]"];
15
14
  };
16
15
  export type BadgeColor = UIColor;
17
- //#endregion
18
16
  //# sourceMappingURL=badge.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"badge.js","names":["badgeColorVariants"],"sources":["../../src/lib/badge.ts"],"sourcesContent":["import type { UIColor } from './color'\n\nexport const badgeColorVariants = {\n primary: [\n '[--badge-solid:var(--primary)]',\n '[--badge-solid-foreground:var(--zinc-50)]',\n '[--badge-outline-border:var(--primary)]',\n '[--badge-outline-foreground:var(--primary)]',\n '[--badge-soft:var(--primary-50)]',\n '[--badge-soft-hover:var(--primary-100)]',\n '[--badge-soft-foreground:var(--primary)]',\n 'dark:[--badge-solid:var(--primary)]',\n 'dark:[--badge-outline-border:var(--primary)]',\n 'dark:[--badge-outline-foreground:var(--primary)]',\n 'dark:[--badge-soft:var(--primary-950)]',\n 'dark:[--badge-soft-hover:var(--primary-900)]',\n 'dark:[--badge-soft-foreground:var(--primary)]'\n ],\n brand: [\n '[--badge-solid:var(--brand)]',\n '[--badge-solid-foreground:var(--zinc-50)]',\n '[--badge-outline-border:var(--brand)]',\n '[--badge-outline-foreground:var(--brand)]',\n '[--badge-soft:var(--brand-50)]',\n '[--badge-soft-hover:var(--brand-100)]',\n '[--badge-soft-foreground:var(--brand)]',\n 'dark:[--badge-solid:var(--brand)]',\n 'dark:[--badge-outline-border:var(--brand)]',\n 'dark:[--badge-outline-foreground:var(--brand)]',\n 'dark:[--badge-soft:var(--brand-950)]',\n 'dark:[--badge-soft-hover:var(--brand-900)]',\n 'dark:[--badge-soft-foreground:var(--brand)]'\n ],\n gray: [\n '[--badge-solid:var(--gray)]',\n '[--badge-solid-foreground:var(--zinc-50)]',\n '[--badge-outline-border:var(--gray)]',\n '[--badge-outline-foreground:var(--gray)]',\n '[--badge-soft:var(--gray-100)]',\n '[--badge-soft-hover:var(--gray-200)]',\n '[--badge-soft-foreground:var(--gray)]',\n 'dark:[--badge-solid:var(--gray)]',\n 'dark:[--badge-outline-border:var(--gray)]',\n 'dark:[--badge-outline-foreground:var(--gray)]',\n 'dark:[--badge-soft:var(--gray-950)]',\n 'dark:[--badge-soft-hover:var(--gray-900)]',\n 'dark:[--badge-soft-foreground:var(--gray)]'\n ],\n zinc: [\n '[--badge-solid:var(--zinc)]',\n '[--badge-solid-foreground:var(--zinc-50)]',\n '[--badge-outline-border:var(--zinc)]',\n '[--badge-outline-foreground:var(--zinc)]',\n '[--badge-soft:var(--zinc-100)]',\n '[--badge-soft-hover:var(--zinc-200)]',\n '[--badge-soft-foreground:var(--zinc)]',\n 'dark:[--badge-solid:var(--zinc)]',\n 'dark:[--badge-outline-border:var(--zinc)]',\n 'dark:[--badge-outline-foreground:var(--zinc)]',\n 'dark:[--badge-soft:var(--zinc-950)]',\n 'dark:[--badge-soft-hover:var(--zinc-900)]',\n 'dark:[--badge-soft-foreground:var(--zinc)]'\n ],\n red: [\n '[--badge-solid:var(--red)]',\n '[--badge-solid-foreground:var(--zinc-50)]',\n '[--badge-outline-border:var(--red)]',\n '[--badge-outline-foreground:var(--red)]',\n '[--badge-soft:var(--red-50)]',\n '[--badge-soft-hover:var(--red-100)]',\n '[--badge-soft-foreground:var(--red)]',\n 'dark:[--badge-solid:var(--red)]',\n 'dark:[--badge-outline-border:var(--red)]',\n 'dark:[--badge-outline-foreground:var(--red)]',\n 'dark:[--badge-soft:var(--red-950)]',\n 'dark:[--badge-soft-hover:var(--red-900)]',\n 'dark:[--badge-soft-foreground:var(--red)]'\n ],\n yellow: [\n '[--badge-solid:var(--yellow)]',\n '[--badge-solid-foreground:var(--zinc-50)]',\n '[--badge-outline-border:var(--yellow)]',\n '[--badge-outline-foreground:var(--yellow)]',\n '[--badge-soft:var(--yellow-50)]',\n '[--badge-soft-hover:var(--yellow-100)]',\n '[--badge-soft-foreground:var(--yellow)]',\n 'dark:[--badge-solid:var(--yellow)]',\n 'dark:[--badge-outline-border:var(--yellow)]',\n 'dark:[--badge-outline-foreground:var(--yellow)]',\n 'dark:[--badge-soft:var(--yellow-950)]',\n 'dark:[--badge-soft-hover:var(--yellow-900)]',\n 'dark:[--badge-soft-foreground:var(--yellow)]'\n ],\n blue: [\n '[--badge-solid:var(--blue)]',\n '[--badge-solid-foreground:var(--zinc-50)]',\n '[--badge-outline-border:var(--blue)]',\n '[--badge-outline-foreground:var(--blue)]',\n '[--badge-soft:var(--blue-50)]',\n '[--badge-soft-hover:var(--blue-100)]',\n '[--badge-soft-foreground:var(--blue)]',\n 'dark:[--badge-solid:var(--blue)]',\n 'dark:[--badge-outline-border:var(--blue)]',\n 'dark:[--badge-outline-foreground:var(--blue)]',\n 'dark:[--badge-soft:var(--blue-950)]',\n 'dark:[--badge-soft-hover:var(--blue-900)]',\n 'dark:[--badge-soft-foreground:var(--blue)]'\n ],\n indigo: [\n '[--badge-solid:var(--indigo)]',\n '[--badge-solid-foreground:var(--zinc-50)]',\n '[--badge-outline-border:var(--indigo)]',\n '[--badge-outline-foreground:var(--indigo)]',\n '[--badge-soft:var(--indigo-50)]',\n '[--badge-soft-hover:var(--indigo-100)]',\n '[--badge-soft-foreground:var(--indigo)]',\n 'dark:[--badge-solid:var(--indigo)]',\n 'dark:[--badge-outline-border:var(--indigo)]',\n 'dark:[--badge-outline-foreground:var(--indigo)]',\n 'dark:[--badge-soft:var(--indigo-950)]',\n 'dark:[--badge-soft-hover:var(--indigo-900)]',\n 'dark:[--badge-soft-foreground:var(--indigo)]'\n ],\n pink: [\n '[--badge-solid:var(--pink)]',\n '[--badge-solid-foreground:var(--zinc-50)]',\n '[--badge-outline-border:var(--pink)]',\n '[--badge-outline-foreground:var(--pink)]',\n '[--badge-soft:var(--pink-50)]',\n '[--badge-soft-hover:var(--pink-100)]',\n '[--badge-soft-foreground:var(--pink)]',\n 'dark:[--badge-solid:var(--pink)]',\n 'dark:[--badge-outline-border:var(--pink)]',\n 'dark:[--badge-outline-foreground:var(--pink)]',\n 'dark:[--badge-soft:var(--pink-950)]',\n 'dark:[--badge-soft-hover:var(--pink-900)]',\n 'dark:[--badge-soft-foreground:var(--pink)]'\n ],\n green: [\n '[--badge-solid:var(--green)]',\n '[--badge-solid-foreground:var(--zinc-50)]',\n '[--badge-outline-border:var(--green)]',\n '[--badge-outline-foreground:var(--green)]',\n '[--badge-soft:var(--green-50)]',\n '[--badge-soft-hover:var(--green-100)]',\n '[--badge-soft-foreground:var(--green)]',\n 'dark:[--badge-solid:var(--green)]',\n 'dark:[--badge-outline-border:var(--green)]',\n 'dark:[--badge-outline-foreground:var(--green)]',\n 'dark:[--badge-soft:var(--green-950)]',\n 'dark:[--badge-soft-hover:var(--green-900)]',\n 'dark:[--badge-soft-foreground:var(--green)]'\n ]\n} as const satisfies Record<UIColor, readonly string[]>\n\nexport type BadgeColor = UIColor\n"],"mappings":"AAEA,MAAaA,EAAqB,CAChC,QAAS,CACP,iCACA,4CACA,0CACA,8CACA,mCACA,0CACA,2CACA,sCACA,+CACA,mDACA,yCACA,+CACA,+CACF,EACA,MAAO,CACL,+BACA,4CACA,wCACA,4CACA,iCACA,wCACA,yCACA,oCACA,6CACA,iDACA,uCACA,6CACA,6CACF,EACA,KAAM,CACJ,8BACA,4CACA,uCACA,2CACA,iCACA,uCACA,wCACA,mCACA,4CACA,gDACA,sCACA,4CACA,4CACF,EACA,KAAM,CACJ,8BACA,4CACA,uCACA,2CACA,iCACA,uCACA,wCACA,mCACA,4CACA,gDACA,sCACA,4CACA,4CACF,EACA,IAAK,CACH,6BACA,4CACA,sCACA,0CACA,+BACA,sCACA,uCACA,kCACA,2CACA,+CACA,qCACA,2CACA,2CACF,EACA,OAAQ,CACN,gCACA,4CACA,yCACA,6CACA,kCACA,yCACA,0CACA,qCACA,8CACA,kDACA,wCACA,8CACA,8CACF,EACA,KAAM,CACJ,8BACA,4CACA,uCACA,2CACA,gCACA,uCACA,wCACA,mCACA,4CACA,gDACA,sCACA,4CACA,4CACF,EACA,OAAQ,CACN,gCACA,4CACA,yCACA,6CACA,kCACA,yCACA,0CACA,qCACA,8CACA,kDACA,wCACA,8CACA,8CACF,EACA,KAAM,CACJ,8BACA,4CACA,uCACA,2CACA,gCACA,uCACA,wCACA,mCACA,4CACA,gDACA,sCACA,4CACA,4CACF,EACA,MAAO,CACL,+BACA,4CACA,wCACA,4CACA,iCACA,wCACA,yCACA,oCACA,6CACA,iDACA,uCACA,6CACA,6CACF,CACF"}
1
+ {"version":3,"file":"badge.js","names":["badgeColorVariants"],"sources":["../../src/lib/badge.ts"],"sourcesContent":["import type { UIColor } from './color'\n\nexport const badgeColorVariants = {\n primary: [\n '[--badge-solid:var(--primary)]',\n '[--badge-solid-foreground:var(--zinc-50)]',\n '[--badge-outline-border:var(--primary)]',\n '[--badge-outline-foreground:var(--primary)]',\n '[--badge-soft:var(--primary-50)]',\n '[--badge-soft-hover:var(--primary-100)]',\n '[--badge-soft-foreground:var(--primary)]',\n 'dark:[--badge-solid:var(--primary)]',\n 'dark:[--badge-outline-border:var(--primary)]',\n 'dark:[--badge-outline-foreground:var(--primary)]',\n 'dark:[--badge-soft:var(--primary-950)]',\n 'dark:[--badge-soft-hover:var(--primary-900)]',\n 'dark:[--badge-soft-foreground:var(--primary)]'\n ],\n brand: [\n '[--badge-solid:var(--brand)]',\n '[--badge-solid-foreground:var(--zinc-50)]',\n '[--badge-outline-border:var(--brand)]',\n '[--badge-outline-foreground:var(--brand)]',\n '[--badge-soft:var(--brand-50)]',\n '[--badge-soft-hover:var(--brand-100)]',\n '[--badge-soft-foreground:var(--brand)]',\n 'dark:[--badge-solid:var(--brand)]',\n 'dark:[--badge-outline-border:var(--brand)]',\n 'dark:[--badge-outline-foreground:var(--brand)]',\n 'dark:[--badge-soft:var(--brand-950)]',\n 'dark:[--badge-soft-hover:var(--brand-900)]',\n 'dark:[--badge-soft-foreground:var(--brand)]'\n ],\n gray: [\n '[--badge-solid:var(--gray)]',\n '[--badge-solid-foreground:var(--zinc-50)]',\n '[--badge-outline-border:var(--gray)]',\n '[--badge-outline-foreground:var(--gray)]',\n '[--badge-soft:var(--gray-100)]',\n '[--badge-soft-hover:var(--gray-200)]',\n '[--badge-soft-foreground:var(--gray)]',\n 'dark:[--badge-solid:var(--gray)]',\n 'dark:[--badge-outline-border:var(--gray)]',\n 'dark:[--badge-outline-foreground:var(--gray)]',\n 'dark:[--badge-soft:var(--gray-950)]',\n 'dark:[--badge-soft-hover:var(--gray-900)]',\n 'dark:[--badge-soft-foreground:var(--gray)]'\n ],\n zinc: [\n '[--badge-solid:var(--zinc)]',\n '[--badge-solid-foreground:var(--zinc-50)]',\n '[--badge-outline-border:var(--zinc)]',\n '[--badge-outline-foreground:var(--zinc)]',\n '[--badge-soft:var(--zinc-100)]',\n '[--badge-soft-hover:var(--zinc-200)]',\n '[--badge-soft-foreground:var(--zinc)]',\n 'dark:[--badge-solid:var(--zinc)]',\n 'dark:[--badge-outline-border:var(--zinc)]',\n 'dark:[--badge-outline-foreground:var(--zinc)]',\n 'dark:[--badge-soft:var(--zinc-950)]',\n 'dark:[--badge-soft-hover:var(--zinc-900)]',\n 'dark:[--badge-soft-foreground:var(--zinc)]'\n ],\n red: [\n '[--badge-solid:var(--red)]',\n '[--badge-solid-foreground:var(--zinc-50)]',\n '[--badge-outline-border:var(--red)]',\n '[--badge-outline-foreground:var(--red)]',\n '[--badge-soft:var(--red-50)]',\n '[--badge-soft-hover:var(--red-100)]',\n '[--badge-soft-foreground:var(--red)]',\n 'dark:[--badge-solid:var(--red)]',\n 'dark:[--badge-outline-border:var(--red)]',\n 'dark:[--badge-outline-foreground:var(--red)]',\n 'dark:[--badge-soft:var(--red-950)]',\n 'dark:[--badge-soft-hover:var(--red-900)]',\n 'dark:[--badge-soft-foreground:var(--red)]'\n ],\n yellow: [\n '[--badge-solid:var(--yellow)]',\n '[--badge-solid-foreground:var(--zinc-50)]',\n '[--badge-outline-border:var(--yellow)]',\n '[--badge-outline-foreground:var(--yellow)]',\n '[--badge-soft:var(--yellow-50)]',\n '[--badge-soft-hover:var(--yellow-100)]',\n '[--badge-soft-foreground:var(--yellow)]',\n 'dark:[--badge-solid:var(--yellow)]',\n 'dark:[--badge-outline-border:var(--yellow)]',\n 'dark:[--badge-outline-foreground:var(--yellow)]',\n 'dark:[--badge-soft:var(--yellow-950)]',\n 'dark:[--badge-soft-hover:var(--yellow-900)]',\n 'dark:[--badge-soft-foreground:var(--yellow)]'\n ],\n blue: [\n '[--badge-solid:var(--blue)]',\n '[--badge-solid-foreground:var(--zinc-50)]',\n '[--badge-outline-border:var(--blue)]',\n '[--badge-outline-foreground:var(--blue)]',\n '[--badge-soft:var(--blue-50)]',\n '[--badge-soft-hover:var(--blue-100)]',\n '[--badge-soft-foreground:var(--blue)]',\n 'dark:[--badge-solid:var(--blue)]',\n 'dark:[--badge-outline-border:var(--blue)]',\n 'dark:[--badge-outline-foreground:var(--blue)]',\n 'dark:[--badge-soft:var(--blue-950)]',\n 'dark:[--badge-soft-hover:var(--blue-900)]',\n 'dark:[--badge-soft-foreground:var(--blue)]'\n ],\n indigo: [\n '[--badge-solid:var(--indigo)]',\n '[--badge-solid-foreground:var(--zinc-50)]',\n '[--badge-outline-border:var(--indigo)]',\n '[--badge-outline-foreground:var(--indigo)]',\n '[--badge-soft:var(--indigo-50)]',\n '[--badge-soft-hover:var(--indigo-100)]',\n '[--badge-soft-foreground:var(--indigo)]',\n 'dark:[--badge-solid:var(--indigo)]',\n 'dark:[--badge-outline-border:var(--indigo)]',\n 'dark:[--badge-outline-foreground:var(--indigo)]',\n 'dark:[--badge-soft:var(--indigo-950)]',\n 'dark:[--badge-soft-hover:var(--indigo-900)]',\n 'dark:[--badge-soft-foreground:var(--indigo)]'\n ],\n pink: [\n '[--badge-solid:var(--pink)]',\n '[--badge-solid-foreground:var(--zinc-50)]',\n '[--badge-outline-border:var(--pink)]',\n '[--badge-outline-foreground:var(--pink)]',\n '[--badge-soft:var(--pink-50)]',\n '[--badge-soft-hover:var(--pink-100)]',\n '[--badge-soft-foreground:var(--pink)]',\n 'dark:[--badge-solid:var(--pink)]',\n 'dark:[--badge-outline-border:var(--pink)]',\n 'dark:[--badge-outline-foreground:var(--pink)]',\n 'dark:[--badge-soft:var(--pink-950)]',\n 'dark:[--badge-soft-hover:var(--pink-900)]',\n 'dark:[--badge-soft-foreground:var(--pink)]'\n ],\n green: [\n '[--badge-solid:var(--green)]',\n '[--badge-solid-foreground:var(--zinc-50)]',\n '[--badge-outline-border:var(--green)]',\n '[--badge-outline-foreground:var(--green)]',\n '[--badge-soft:var(--green-50)]',\n '[--badge-soft-hover:var(--green-100)]',\n '[--badge-soft-foreground:var(--green)]',\n 'dark:[--badge-solid:var(--green)]',\n 'dark:[--badge-outline-border:var(--green)]',\n 'dark:[--badge-outline-foreground:var(--green)]',\n 'dark:[--badge-soft:var(--green-950)]',\n 'dark:[--badge-soft-hover:var(--green-900)]',\n 'dark:[--badge-soft-foreground:var(--green)]'\n ]\n} as const satisfies Record<UIColor, readonly string[]>\n\nexport type BadgeColor = UIColor\n"],"mappings":"AAEA,MAAaA,EAAqB,CAChC,QAAS,CACP,iCACA,4CACA,0CACA,8CACA,mCACA,0CACA,2CACA,sCACA,+CACA,mDACA,yCACA,+CACA,+CACF,EACA,MAAO,CACL,+BACA,4CACA,wCACA,4CACA,iCACA,wCACA,yCACA,oCACA,6CACA,iDACA,uCACA,6CACA,6CACF,EACA,KAAM,CACJ,8BACA,4CACA,uCACA,2CACA,iCACA,uCACA,wCACA,mCACA,4CACA,gDACA,sCACA,4CACA,4CACF,EACA,KAAM,CACJ,8BACA,4CACA,uCACA,2CACA,iCACA,uCACA,wCACA,mCACA,4CACA,gDACA,sCACA,4CACA,4CACF,EACA,IAAK,CACH,6BACA,4CACA,sCACA,0CACA,+BACA,sCACA,uCACA,kCACA,2CACA,+CACA,qCACA,2CACA,2CACF,EACA,OAAQ,CACN,gCACA,4CACA,yCACA,6CACA,kCACA,yCACA,0CACA,qCACA,8CACA,kDACA,wCACA,8CACA,8CACF,EACA,KAAM,CACJ,8BACA,4CACA,uCACA,2CACA,gCACA,uCACA,wCACA,mCACA,4CACA,gDACA,sCACA,4CACA,4CACF,EACA,OAAQ,CACN,gCACA,4CACA,yCACA,6CACA,kCACA,yCACA,0CACA,qCACA,8CACA,kDACA,wCACA,8CACA,8CACF,EACA,KAAM,CACJ,8BACA,4CACA,uCACA,2CACA,gCACA,uCACA,wCACA,mCACA,4CACA,gDACA,sCACA,4CACA,4CACF,EACA,MAAO,CACL,+BACA,4CACA,wCACA,4CACA,iCACA,wCACA,yCACA,oCACA,6CACA,iDACA,uCACA,6CACA,6CACF,CACF,E"}
@@ -1,6 +1,5 @@
1
1
  import { t as __name } from "../rolldown-runtime-BhWHdk3m.js";
2
2
  import { UIColor } from "./color.js";
3
- //#region src/lib/button.d.ts
4
3
  export declare const buttonColorVariants: {
5
4
  readonly primary: readonly ["[--button-solid:var(--primary)]", "[--button-solid-hover:var(--primary-600)]", "[--button-solid-foreground:var(--zinc-50)]", "[--button-outline-border:var(--primary)]", "[--button-outline-foreground:var(--primary)]", "[--button-soft:var(--primary-50)]", "[--button-soft-hover:var(--primary-100)]", "[--button-soft-foreground:var(--primary)]", "[--button-ghost-hover:var(--primary-50)]", "[--button-ghost-foreground:var(--primary)]", "[--button-link-foreground:var(--primary)]", "dark:[--button-solid:var(--primary)]", "dark:[--button-solid-hover:var(--primary-600)]", "dark:[--button-outline-border:var(--primary)]", "dark:[--button-outline-foreground:var(--primary)]", "dark:[--button-soft:var(--primary-950)]", "dark:[--button-soft-hover:var(--primary-900)]", "dark:[--button-soft-foreground:var(--primary)]", "dark:[--button-ghost-hover:var(--primary-950)]", "dark:[--button-ghost-foreground:var(--primary)]", "dark:[--button-link-foreground:var(--primary)]"];
6
5
  readonly brand: readonly ["[--button-solid:var(--brand)]", "[--button-solid-hover:var(--brand-600)]", "[--button-solid-foreground:var(--zinc-50)]", "[--button-outline-border:var(--brand)]", "[--button-outline-foreground:var(--brand)]", "[--button-soft:var(--brand-50)]", "[--button-soft-hover:var(--brand-100)]", "[--button-soft-foreground:var(--brand)]", "[--button-ghost-hover:var(--brand-50)]", "[--button-ghost-foreground:var(--brand)]", "[--button-link-foreground:var(--brand)]", "dark:[--button-solid:var(--brand)]", "dark:[--button-solid-hover:var(--brand-600)]", "dark:[--button-outline-border:var(--brand)]", "dark:[--button-outline-foreground:var(--brand)]", "dark:[--button-soft:var(--brand-950)]", "dark:[--button-soft-hover:var(--brand-900)]", "dark:[--button-soft-foreground:var(--brand)]", "dark:[--button-ghost-hover:var(--brand-950)]", "dark:[--button-ghost-foreground:var(--brand)]", "dark:[--button-link-foreground:var(--brand)]"];
@@ -14,5 +13,4 @@ export declare const buttonColorVariants: {
14
13
  readonly green: readonly ["[--button-solid:var(--green)]", "[--button-solid-hover:var(--green-600)]", "[--button-solid-foreground:var(--zinc-50)]", "[--button-outline-border:var(--green)]", "[--button-outline-foreground:var(--green)]", "[--button-soft:var(--green-50)]", "[--button-soft-hover:var(--green-100)]", "[--button-soft-foreground:var(--green)]", "[--button-ghost-hover:var(--green-50)]", "[--button-ghost-foreground:var(--green)]", "[--button-link-foreground:var(--green)]", "dark:[--button-solid:var(--green)]", "dark:[--button-solid-hover:var(--green-600)]", "dark:[--button-outline-border:var(--green)]", "dark:[--button-outline-foreground:var(--green)]", "dark:[--button-soft:var(--green-950)]", "dark:[--button-soft-hover:var(--green-900)]", "dark:[--button-soft-foreground:var(--green)]", "dark:[--button-ghost-hover:var(--green-950)]", "dark:[--button-ghost-foreground:var(--green)]", "dark:[--button-link-foreground:var(--green)]"];
15
14
  };
16
15
  export type ButtonColor = UIColor;
17
- //#endregion
18
16
  //# sourceMappingURL=button.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"button.js","names":["buttonColorVariants"],"sources":["../../src/lib/button.ts"],"sourcesContent":["import type { UIColor } from './color'\n\nexport const buttonColorVariants = {\n primary: [\n '[--button-solid:var(--primary)]',\n '[--button-solid-hover:var(--primary-600)]',\n '[--button-solid-foreground:var(--zinc-50)]',\n '[--button-outline-border:var(--primary)]',\n '[--button-outline-foreground:var(--primary)]',\n '[--button-soft:var(--primary-50)]',\n '[--button-soft-hover:var(--primary-100)]',\n '[--button-soft-foreground:var(--primary)]',\n '[--button-ghost-hover:var(--primary-50)]',\n '[--button-ghost-foreground:var(--primary)]',\n '[--button-link-foreground:var(--primary)]',\n 'dark:[--button-solid:var(--primary)]',\n 'dark:[--button-solid-hover:var(--primary-600)]',\n 'dark:[--button-outline-border:var(--primary)]',\n 'dark:[--button-outline-foreground:var(--primary)]',\n 'dark:[--button-soft:var(--primary-950)]',\n 'dark:[--button-soft-hover:var(--primary-900)]',\n 'dark:[--button-soft-foreground:var(--primary)]',\n 'dark:[--button-ghost-hover:var(--primary-950)]',\n 'dark:[--button-ghost-foreground:var(--primary)]',\n 'dark:[--button-link-foreground:var(--primary)]'\n ],\n brand: [\n '[--button-solid:var(--brand)]',\n '[--button-solid-hover:var(--brand-600)]',\n '[--button-solid-foreground:var(--zinc-50)]',\n '[--button-outline-border:var(--brand)]',\n '[--button-outline-foreground:var(--brand)]',\n '[--button-soft:var(--brand-50)]',\n '[--button-soft-hover:var(--brand-100)]',\n '[--button-soft-foreground:var(--brand)]',\n '[--button-ghost-hover:var(--brand-50)]',\n '[--button-ghost-foreground:var(--brand)]',\n '[--button-link-foreground:var(--brand)]',\n 'dark:[--button-solid:var(--brand)]',\n 'dark:[--button-solid-hover:var(--brand-600)]',\n 'dark:[--button-outline-border:var(--brand)]',\n 'dark:[--button-outline-foreground:var(--brand)]',\n 'dark:[--button-soft:var(--brand-950)]',\n 'dark:[--button-soft-hover:var(--brand-900)]',\n 'dark:[--button-soft-foreground:var(--brand)]',\n 'dark:[--button-ghost-hover:var(--brand-950)]',\n 'dark:[--button-ghost-foreground:var(--brand)]',\n 'dark:[--button-link-foreground:var(--brand)]'\n ],\n gray: [\n '[--button-solid:var(--gray)]',\n '[--button-solid-hover:var(--gray-600)]',\n '[--button-solid-foreground:var(--zinc-50)]',\n '[--button-outline-border:var(--gray)]',\n '[--button-outline-foreground:var(--gray)]',\n '[--button-soft:var(--gray-100)]',\n '[--button-soft-hover:var(--gray-200)]',\n '[--button-soft-foreground:var(--gray)]',\n '[--button-ghost-hover:var(--gray-100)]',\n '[--button-ghost-foreground:var(--gray)]',\n '[--button-link-foreground:var(--gray)]',\n 'dark:[--button-solid:var(--gray)]',\n 'dark:[--button-solid-hover:var(--gray-600)]',\n 'dark:[--button-outline-border:var(--gray)]',\n 'dark:[--button-outline-foreground:var(--gray)]',\n 'dark:[--button-soft:var(--gray-950)]',\n 'dark:[--button-soft-hover:var(--gray-900)]',\n 'dark:[--button-soft-foreground:var(--gray)]',\n 'dark:[--button-ghost-hover:var(--gray-950)]',\n 'dark:[--button-ghost-foreground:var(--gray)]',\n 'dark:[--button-link-foreground:var(--gray)]'\n ],\n zinc: [\n '[--button-solid:var(--zinc)]',\n '[--button-solid-hover:var(--zinc-600)]',\n '[--button-solid-foreground:var(--zinc-50)]',\n '[--button-outline-border:var(--zinc)]',\n '[--button-outline-foreground:var(--zinc)]',\n '[--button-soft:var(--zinc-100)]',\n '[--button-soft-hover:var(--zinc-200)]',\n '[--button-soft-foreground:var(--zinc)]',\n '[--button-ghost-hover:var(--zinc-100)]',\n '[--button-ghost-foreground:var(--zinc)]',\n '[--button-link-foreground:var(--zinc)]',\n 'dark:[--button-solid:var(--zinc)]',\n 'dark:[--button-solid-hover:var(--zinc-600)]',\n 'dark:[--button-outline-border:var(--zinc)]',\n 'dark:[--button-outline-foreground:var(--zinc)]',\n 'dark:[--button-soft:var(--zinc-950)]',\n 'dark:[--button-soft-hover:var(--zinc-900)]',\n 'dark:[--button-soft-foreground:var(--zinc)]',\n 'dark:[--button-ghost-hover:var(--zinc-950)]',\n 'dark:[--button-ghost-foreground:var(--zinc)]',\n 'dark:[--button-link-foreground:var(--zinc)]'\n ],\n red: [\n '[--button-solid:var(--red)]',\n '[--button-solid-hover:var(--red-600)]',\n '[--button-solid-foreground:var(--zinc-50)]',\n '[--button-outline-border:var(--red)]',\n '[--button-outline-foreground:var(--red)]',\n '[--button-soft:var(--red-50)]',\n '[--button-soft-hover:var(--red-100)]',\n '[--button-soft-foreground:var(--red)]',\n '[--button-ghost-hover:var(--red-50)]',\n '[--button-ghost-foreground:var(--red)]',\n '[--button-link-foreground:var(--red)]',\n 'dark:[--button-solid:var(--red)]',\n 'dark:[--button-solid-hover:var(--red-600)]',\n 'dark:[--button-outline-border:var(--red)]',\n 'dark:[--button-outline-foreground:var(--red)]',\n 'dark:[--button-soft:var(--red-950)]',\n 'dark:[--button-soft-hover:var(--red-900)]',\n 'dark:[--button-soft-foreground:var(--red)]',\n 'dark:[--button-ghost-hover:var(--red-950)]',\n 'dark:[--button-ghost-foreground:var(--red)]',\n 'dark:[--button-link-foreground:var(--red)]'\n ],\n yellow: [\n '[--button-solid:var(--yellow)]',\n '[--button-solid-hover:var(--yellow-600)]',\n '[--button-solid-foreground:var(--zinc-50)]',\n '[--button-outline-border:var(--yellow)]',\n '[--button-outline-foreground:var(--yellow)]',\n '[--button-soft:var(--yellow-50)]',\n '[--button-soft-hover:var(--yellow-100)]',\n '[--button-soft-foreground:var(--yellow)]',\n '[--button-ghost-hover:var(--yellow-50)]',\n '[--button-ghost-foreground:var(--yellow)]',\n '[--button-link-foreground:var(--yellow)]',\n 'dark:[--button-solid:var(--yellow)]',\n 'dark:[--button-solid-hover:var(--yellow-600)]',\n 'dark:[--button-outline-border:var(--yellow)]',\n 'dark:[--button-outline-foreground:var(--yellow)]',\n 'dark:[--button-soft:var(--yellow-950)]',\n 'dark:[--button-soft-hover:var(--yellow-900)]',\n 'dark:[--button-soft-foreground:var(--yellow)]',\n 'dark:[--button-ghost-hover:var(--yellow-950)]',\n 'dark:[--button-ghost-foreground:var(--yellow)]',\n 'dark:[--button-link-foreground:var(--yellow)]'\n ],\n blue: [\n '[--button-solid:var(--blue)]',\n '[--button-solid-hover:var(--blue-600)]',\n '[--button-solid-foreground:var(--zinc-50)]',\n '[--button-outline-border:var(--blue)]',\n '[--button-outline-foreground:var(--blue)]',\n '[--button-soft:var(--blue-50)]',\n '[--button-soft-hover:var(--blue-100)]',\n '[--button-soft-foreground:var(--blue)]',\n '[--button-ghost-hover:var(--blue-50)]',\n '[--button-ghost-foreground:var(--blue)]',\n '[--button-link-foreground:var(--blue)]',\n 'dark:[--button-solid:var(--blue)]',\n 'dark:[--button-solid-hover:var(--blue-600)]',\n 'dark:[--button-outline-border:var(--blue)]',\n 'dark:[--button-outline-foreground:var(--blue)]',\n 'dark:[--button-soft:var(--blue-950)]',\n 'dark:[--button-soft-hover:var(--blue-900)]',\n 'dark:[--button-soft-foreground:var(--blue)]',\n 'dark:[--button-ghost-hover:var(--blue-950)]',\n 'dark:[--button-ghost-foreground:var(--blue)]',\n 'dark:[--button-link-foreground:var(--blue)]'\n ],\n indigo: [\n '[--button-solid:var(--indigo)]',\n '[--button-solid-hover:var(--indigo-600)]',\n '[--button-solid-foreground:var(--zinc-50)]',\n '[--button-outline-border:var(--indigo)]',\n '[--button-outline-foreground:var(--indigo)]',\n '[--button-soft:var(--indigo-50)]',\n '[--button-soft-hover:var(--indigo-100)]',\n '[--button-soft-foreground:var(--indigo)]',\n '[--button-ghost-hover:var(--indigo-50)]',\n '[--button-ghost-foreground:var(--indigo)]',\n '[--button-link-foreground:var(--indigo)]',\n 'dark:[--button-solid:var(--indigo)]',\n 'dark:[--button-solid-hover:var(--indigo-600)]',\n 'dark:[--button-outline-border:var(--indigo)]',\n 'dark:[--button-outline-foreground:var(--indigo)]',\n 'dark:[--button-soft:var(--indigo-950)]',\n 'dark:[--button-soft-hover:var(--indigo-900)]',\n 'dark:[--button-soft-foreground:var(--indigo)]',\n 'dark:[--button-ghost-hover:var(--indigo-950)]',\n 'dark:[--button-ghost-foreground:var(--indigo)]',\n 'dark:[--button-link-foreground:var(--indigo)]'\n ],\n pink: [\n '[--button-solid:var(--pink)]',\n '[--button-solid-hover:var(--pink-600)]',\n '[--button-solid-foreground:var(--zinc-50)]',\n '[--button-outline-border:var(--pink)]',\n '[--button-outline-foreground:var(--pink)]',\n '[--button-soft:var(--pink-50)]',\n '[--button-soft-hover:var(--pink-100)]',\n '[--button-soft-foreground:var(--pink)]',\n '[--button-ghost-hover:var(--pink-50)]',\n '[--button-ghost-foreground:var(--pink)]',\n '[--button-link-foreground:var(--pink)]',\n 'dark:[--button-solid:var(--pink)]',\n 'dark:[--button-solid-hover:var(--pink-600)]',\n 'dark:[--button-outline-border:var(--pink)]',\n 'dark:[--button-outline-foreground:var(--pink)]',\n 'dark:[--button-soft:var(--pink-950)]',\n 'dark:[--button-soft-hover:var(--pink-900)]',\n 'dark:[--button-soft-foreground:var(--pink)]',\n 'dark:[--button-ghost-hover:var(--pink-950)]',\n 'dark:[--button-ghost-foreground:var(--pink)]',\n 'dark:[--button-link-foreground:var(--pink)]'\n ],\n green: [\n '[--button-solid:var(--green)]',\n '[--button-solid-hover:var(--green-600)]',\n '[--button-solid-foreground:var(--zinc-50)]',\n '[--button-outline-border:var(--green)]',\n '[--button-outline-foreground:var(--green)]',\n '[--button-soft:var(--green-50)]',\n '[--button-soft-hover:var(--green-100)]',\n '[--button-soft-foreground:var(--green)]',\n '[--button-ghost-hover:var(--green-50)]',\n '[--button-ghost-foreground:var(--green)]',\n '[--button-link-foreground:var(--green)]',\n 'dark:[--button-solid:var(--green)]',\n 'dark:[--button-solid-hover:var(--green-600)]',\n 'dark:[--button-outline-border:var(--green)]',\n 'dark:[--button-outline-foreground:var(--green)]',\n 'dark:[--button-soft:var(--green-950)]',\n 'dark:[--button-soft-hover:var(--green-900)]',\n 'dark:[--button-soft-foreground:var(--green)]',\n 'dark:[--button-ghost-hover:var(--green-950)]',\n 'dark:[--button-ghost-foreground:var(--green)]',\n 'dark:[--button-link-foreground:var(--green)]'\n ]\n} as const satisfies Record<UIColor, readonly string[]>\n\nexport type ButtonColor = UIColor\n"],"mappings":"AAEA,MAAaA,EAAsB,CACjC,QAAS,CACP,kCACA,4CACA,6CACA,2CACA,+CACA,oCACA,2CACA,4CACA,2CACA,6CACA,4CACA,uCACA,iDACA,gDACA,oDACA,0CACA,gDACA,iDACA,iDACA,kDACA,gDACF,EACA,MAAO,CACL,gCACA,0CACA,6CACA,yCACA,6CACA,kCACA,yCACA,0CACA,yCACA,2CACA,0CACA,qCACA,+CACA,8CACA,kDACA,wCACA,8CACA,+CACA,+CACA,gDACA,8CACF,EACA,KAAM,CACJ,+BACA,yCACA,6CACA,wCACA,4CACA,kCACA,wCACA,yCACA,yCACA,0CACA,yCACA,oCACA,8CACA,6CACA,iDACA,uCACA,6CACA,8CACA,8CACA,+CACA,6CACF,EACA,KAAM,CACJ,+BACA,yCACA,6CACA,wCACA,4CACA,kCACA,wCACA,yCACA,yCACA,0CACA,yCACA,oCACA,8CACA,6CACA,iDACA,uCACA,6CACA,8CACA,8CACA,+CACA,6CACF,EACA,IAAK,CACH,8BACA,wCACA,6CACA,uCACA,2CACA,gCACA,uCACA,wCACA,uCACA,yCACA,wCACA,mCACA,6CACA,4CACA,gDACA,sCACA,4CACA,6CACA,6CACA,8CACA,4CACF,EACA,OAAQ,CACN,iCACA,2CACA,6CACA,0CACA,8CACA,mCACA,0CACA,2CACA,0CACA,4CACA,2CACA,sCACA,gDACA,+CACA,mDACA,yCACA,+CACA,gDACA,gDACA,iDACA,+CACF,EACA,KAAM,CACJ,+BACA,yCACA,6CACA,wCACA,4CACA,iCACA,wCACA,yCACA,wCACA,0CACA,yCACA,oCACA,8CACA,6CACA,iDACA,uCACA,6CACA,8CACA,8CACA,+CACA,6CACF,EACA,OAAQ,CACN,iCACA,2CACA,6CACA,0CACA,8CACA,mCACA,0CACA,2CACA,0CACA,4CACA,2CACA,sCACA,gDACA,+CACA,mDACA,yCACA,+CACA,gDACA,gDACA,iDACA,+CACF,EACA,KAAM,CACJ,+BACA,yCACA,6CACA,wCACA,4CACA,iCACA,wCACA,yCACA,wCACA,0CACA,yCACA,oCACA,8CACA,6CACA,iDACA,uCACA,6CACA,8CACA,8CACA,+CACA,6CACF,EACA,MAAO,CACL,gCACA,0CACA,6CACA,yCACA,6CACA,kCACA,yCACA,0CACA,yCACA,2CACA,0CACA,qCACA,+CACA,8CACA,kDACA,wCACA,8CACA,+CACA,+CACA,gDACA,8CACF,CACF"}
1
+ {"version":3,"file":"button.js","names":["buttonColorVariants"],"sources":["../../src/lib/button.ts"],"sourcesContent":["import type { UIColor } from './color'\n\nexport const buttonColorVariants = {\n primary: [\n '[--button-solid:var(--primary)]',\n '[--button-solid-hover:var(--primary-600)]',\n '[--button-solid-foreground:var(--zinc-50)]',\n '[--button-outline-border:var(--primary)]',\n '[--button-outline-foreground:var(--primary)]',\n '[--button-soft:var(--primary-50)]',\n '[--button-soft-hover:var(--primary-100)]',\n '[--button-soft-foreground:var(--primary)]',\n '[--button-ghost-hover:var(--primary-50)]',\n '[--button-ghost-foreground:var(--primary)]',\n '[--button-link-foreground:var(--primary)]',\n 'dark:[--button-solid:var(--primary)]',\n 'dark:[--button-solid-hover:var(--primary-600)]',\n 'dark:[--button-outline-border:var(--primary)]',\n 'dark:[--button-outline-foreground:var(--primary)]',\n 'dark:[--button-soft:var(--primary-950)]',\n 'dark:[--button-soft-hover:var(--primary-900)]',\n 'dark:[--button-soft-foreground:var(--primary)]',\n 'dark:[--button-ghost-hover:var(--primary-950)]',\n 'dark:[--button-ghost-foreground:var(--primary)]',\n 'dark:[--button-link-foreground:var(--primary)]'\n ],\n brand: [\n '[--button-solid:var(--brand)]',\n '[--button-solid-hover:var(--brand-600)]',\n '[--button-solid-foreground:var(--zinc-50)]',\n '[--button-outline-border:var(--brand)]',\n '[--button-outline-foreground:var(--brand)]',\n '[--button-soft:var(--brand-50)]',\n '[--button-soft-hover:var(--brand-100)]',\n '[--button-soft-foreground:var(--brand)]',\n '[--button-ghost-hover:var(--brand-50)]',\n '[--button-ghost-foreground:var(--brand)]',\n '[--button-link-foreground:var(--brand)]',\n 'dark:[--button-solid:var(--brand)]',\n 'dark:[--button-solid-hover:var(--brand-600)]',\n 'dark:[--button-outline-border:var(--brand)]',\n 'dark:[--button-outline-foreground:var(--brand)]',\n 'dark:[--button-soft:var(--brand-950)]',\n 'dark:[--button-soft-hover:var(--brand-900)]',\n 'dark:[--button-soft-foreground:var(--brand)]',\n 'dark:[--button-ghost-hover:var(--brand-950)]',\n 'dark:[--button-ghost-foreground:var(--brand)]',\n 'dark:[--button-link-foreground:var(--brand)]'\n ],\n gray: [\n '[--button-solid:var(--gray)]',\n '[--button-solid-hover:var(--gray-600)]',\n '[--button-solid-foreground:var(--zinc-50)]',\n '[--button-outline-border:var(--gray)]',\n '[--button-outline-foreground:var(--gray)]',\n '[--button-soft:var(--gray-100)]',\n '[--button-soft-hover:var(--gray-200)]',\n '[--button-soft-foreground:var(--gray)]',\n '[--button-ghost-hover:var(--gray-100)]',\n '[--button-ghost-foreground:var(--gray)]',\n '[--button-link-foreground:var(--gray)]',\n 'dark:[--button-solid:var(--gray)]',\n 'dark:[--button-solid-hover:var(--gray-600)]',\n 'dark:[--button-outline-border:var(--gray)]',\n 'dark:[--button-outline-foreground:var(--gray)]',\n 'dark:[--button-soft:var(--gray-950)]',\n 'dark:[--button-soft-hover:var(--gray-900)]',\n 'dark:[--button-soft-foreground:var(--gray)]',\n 'dark:[--button-ghost-hover:var(--gray-950)]',\n 'dark:[--button-ghost-foreground:var(--gray)]',\n 'dark:[--button-link-foreground:var(--gray)]'\n ],\n zinc: [\n '[--button-solid:var(--zinc)]',\n '[--button-solid-hover:var(--zinc-600)]',\n '[--button-solid-foreground:var(--zinc-50)]',\n '[--button-outline-border:var(--zinc)]',\n '[--button-outline-foreground:var(--zinc)]',\n '[--button-soft:var(--zinc-100)]',\n '[--button-soft-hover:var(--zinc-200)]',\n '[--button-soft-foreground:var(--zinc)]',\n '[--button-ghost-hover:var(--zinc-100)]',\n '[--button-ghost-foreground:var(--zinc)]',\n '[--button-link-foreground:var(--zinc)]',\n 'dark:[--button-solid:var(--zinc)]',\n 'dark:[--button-solid-hover:var(--zinc-600)]',\n 'dark:[--button-outline-border:var(--zinc)]',\n 'dark:[--button-outline-foreground:var(--zinc)]',\n 'dark:[--button-soft:var(--zinc-950)]',\n 'dark:[--button-soft-hover:var(--zinc-900)]',\n 'dark:[--button-soft-foreground:var(--zinc)]',\n 'dark:[--button-ghost-hover:var(--zinc-950)]',\n 'dark:[--button-ghost-foreground:var(--zinc)]',\n 'dark:[--button-link-foreground:var(--zinc)]'\n ],\n red: [\n '[--button-solid:var(--red)]',\n '[--button-solid-hover:var(--red-600)]',\n '[--button-solid-foreground:var(--zinc-50)]',\n '[--button-outline-border:var(--red)]',\n '[--button-outline-foreground:var(--red)]',\n '[--button-soft:var(--red-50)]',\n '[--button-soft-hover:var(--red-100)]',\n '[--button-soft-foreground:var(--red)]',\n '[--button-ghost-hover:var(--red-50)]',\n '[--button-ghost-foreground:var(--red)]',\n '[--button-link-foreground:var(--red)]',\n 'dark:[--button-solid:var(--red)]',\n 'dark:[--button-solid-hover:var(--red-600)]',\n 'dark:[--button-outline-border:var(--red)]',\n 'dark:[--button-outline-foreground:var(--red)]',\n 'dark:[--button-soft:var(--red-950)]',\n 'dark:[--button-soft-hover:var(--red-900)]',\n 'dark:[--button-soft-foreground:var(--red)]',\n 'dark:[--button-ghost-hover:var(--red-950)]',\n 'dark:[--button-ghost-foreground:var(--red)]',\n 'dark:[--button-link-foreground:var(--red)]'\n ],\n yellow: [\n '[--button-solid:var(--yellow)]',\n '[--button-solid-hover:var(--yellow-600)]',\n '[--button-solid-foreground:var(--zinc-50)]',\n '[--button-outline-border:var(--yellow)]',\n '[--button-outline-foreground:var(--yellow)]',\n '[--button-soft:var(--yellow-50)]',\n '[--button-soft-hover:var(--yellow-100)]',\n '[--button-soft-foreground:var(--yellow)]',\n '[--button-ghost-hover:var(--yellow-50)]',\n '[--button-ghost-foreground:var(--yellow)]',\n '[--button-link-foreground:var(--yellow)]',\n 'dark:[--button-solid:var(--yellow)]',\n 'dark:[--button-solid-hover:var(--yellow-600)]',\n 'dark:[--button-outline-border:var(--yellow)]',\n 'dark:[--button-outline-foreground:var(--yellow)]',\n 'dark:[--button-soft:var(--yellow-950)]',\n 'dark:[--button-soft-hover:var(--yellow-900)]',\n 'dark:[--button-soft-foreground:var(--yellow)]',\n 'dark:[--button-ghost-hover:var(--yellow-950)]',\n 'dark:[--button-ghost-foreground:var(--yellow)]',\n 'dark:[--button-link-foreground:var(--yellow)]'\n ],\n blue: [\n '[--button-solid:var(--blue)]',\n '[--button-solid-hover:var(--blue-600)]',\n '[--button-solid-foreground:var(--zinc-50)]',\n '[--button-outline-border:var(--blue)]',\n '[--button-outline-foreground:var(--blue)]',\n '[--button-soft:var(--blue-50)]',\n '[--button-soft-hover:var(--blue-100)]',\n '[--button-soft-foreground:var(--blue)]',\n '[--button-ghost-hover:var(--blue-50)]',\n '[--button-ghost-foreground:var(--blue)]',\n '[--button-link-foreground:var(--blue)]',\n 'dark:[--button-solid:var(--blue)]',\n 'dark:[--button-solid-hover:var(--blue-600)]',\n 'dark:[--button-outline-border:var(--blue)]',\n 'dark:[--button-outline-foreground:var(--blue)]',\n 'dark:[--button-soft:var(--blue-950)]',\n 'dark:[--button-soft-hover:var(--blue-900)]',\n 'dark:[--button-soft-foreground:var(--blue)]',\n 'dark:[--button-ghost-hover:var(--blue-950)]',\n 'dark:[--button-ghost-foreground:var(--blue)]',\n 'dark:[--button-link-foreground:var(--blue)]'\n ],\n indigo: [\n '[--button-solid:var(--indigo)]',\n '[--button-solid-hover:var(--indigo-600)]',\n '[--button-solid-foreground:var(--zinc-50)]',\n '[--button-outline-border:var(--indigo)]',\n '[--button-outline-foreground:var(--indigo)]',\n '[--button-soft:var(--indigo-50)]',\n '[--button-soft-hover:var(--indigo-100)]',\n '[--button-soft-foreground:var(--indigo)]',\n '[--button-ghost-hover:var(--indigo-50)]',\n '[--button-ghost-foreground:var(--indigo)]',\n '[--button-link-foreground:var(--indigo)]',\n 'dark:[--button-solid:var(--indigo)]',\n 'dark:[--button-solid-hover:var(--indigo-600)]',\n 'dark:[--button-outline-border:var(--indigo)]',\n 'dark:[--button-outline-foreground:var(--indigo)]',\n 'dark:[--button-soft:var(--indigo-950)]',\n 'dark:[--button-soft-hover:var(--indigo-900)]',\n 'dark:[--button-soft-foreground:var(--indigo)]',\n 'dark:[--button-ghost-hover:var(--indigo-950)]',\n 'dark:[--button-ghost-foreground:var(--indigo)]',\n 'dark:[--button-link-foreground:var(--indigo)]'\n ],\n pink: [\n '[--button-solid:var(--pink)]',\n '[--button-solid-hover:var(--pink-600)]',\n '[--button-solid-foreground:var(--zinc-50)]',\n '[--button-outline-border:var(--pink)]',\n '[--button-outline-foreground:var(--pink)]',\n '[--button-soft:var(--pink-50)]',\n '[--button-soft-hover:var(--pink-100)]',\n '[--button-soft-foreground:var(--pink)]',\n '[--button-ghost-hover:var(--pink-50)]',\n '[--button-ghost-foreground:var(--pink)]',\n '[--button-link-foreground:var(--pink)]',\n 'dark:[--button-solid:var(--pink)]',\n 'dark:[--button-solid-hover:var(--pink-600)]',\n 'dark:[--button-outline-border:var(--pink)]',\n 'dark:[--button-outline-foreground:var(--pink)]',\n 'dark:[--button-soft:var(--pink-950)]',\n 'dark:[--button-soft-hover:var(--pink-900)]',\n 'dark:[--button-soft-foreground:var(--pink)]',\n 'dark:[--button-ghost-hover:var(--pink-950)]',\n 'dark:[--button-ghost-foreground:var(--pink)]',\n 'dark:[--button-link-foreground:var(--pink)]'\n ],\n green: [\n '[--button-solid:var(--green)]',\n '[--button-solid-hover:var(--green-600)]',\n '[--button-solid-foreground:var(--zinc-50)]',\n '[--button-outline-border:var(--green)]',\n '[--button-outline-foreground:var(--green)]',\n '[--button-soft:var(--green-50)]',\n '[--button-soft-hover:var(--green-100)]',\n '[--button-soft-foreground:var(--green)]',\n '[--button-ghost-hover:var(--green-50)]',\n '[--button-ghost-foreground:var(--green)]',\n '[--button-link-foreground:var(--green)]',\n 'dark:[--button-solid:var(--green)]',\n 'dark:[--button-solid-hover:var(--green-600)]',\n 'dark:[--button-outline-border:var(--green)]',\n 'dark:[--button-outline-foreground:var(--green)]',\n 'dark:[--button-soft:var(--green-950)]',\n 'dark:[--button-soft-hover:var(--green-900)]',\n 'dark:[--button-soft-foreground:var(--green)]',\n 'dark:[--button-ghost-hover:var(--green-950)]',\n 'dark:[--button-ghost-foreground:var(--green)]',\n 'dark:[--button-link-foreground:var(--green)]'\n ]\n} as const satisfies Record<UIColor, readonly string[]>\n\nexport type ButtonColor = UIColor\n"],"mappings":"AAEA,MAAaA,EAAsB,CACjC,QAAS,CACP,kCACA,4CACA,6CACA,2CACA,+CACA,oCACA,2CACA,4CACA,2CACA,6CACA,4CACA,uCACA,iDACA,gDACA,oDACA,0CACA,gDACA,iDACA,iDACA,kDACA,gDACF,EACA,MAAO,CACL,gCACA,0CACA,6CACA,yCACA,6CACA,kCACA,yCACA,0CACA,yCACA,2CACA,0CACA,qCACA,+CACA,8CACA,kDACA,wCACA,8CACA,+CACA,+CACA,gDACA,8CACF,EACA,KAAM,CACJ,+BACA,yCACA,6CACA,wCACA,4CACA,kCACA,wCACA,yCACA,yCACA,0CACA,yCACA,oCACA,8CACA,6CACA,iDACA,uCACA,6CACA,8CACA,8CACA,+CACA,6CACF,EACA,KAAM,CACJ,+BACA,yCACA,6CACA,wCACA,4CACA,kCACA,wCACA,yCACA,yCACA,0CACA,yCACA,oCACA,8CACA,6CACA,iDACA,uCACA,6CACA,8CACA,8CACA,+CACA,6CACF,EACA,IAAK,CACH,8BACA,wCACA,6CACA,uCACA,2CACA,gCACA,uCACA,wCACA,uCACA,yCACA,wCACA,mCACA,6CACA,4CACA,gDACA,sCACA,4CACA,6CACA,6CACA,8CACA,4CACF,EACA,OAAQ,CACN,iCACA,2CACA,6CACA,0CACA,8CACA,mCACA,0CACA,2CACA,0CACA,4CACA,2CACA,sCACA,gDACA,+CACA,mDACA,yCACA,+CACA,gDACA,gDACA,iDACA,+CACF,EACA,KAAM,CACJ,+BACA,yCACA,6CACA,wCACA,4CACA,iCACA,wCACA,yCACA,wCACA,0CACA,yCACA,oCACA,8CACA,6CACA,iDACA,uCACA,6CACA,8CACA,8CACA,+CACA,6CACF,EACA,OAAQ,CACN,iCACA,2CACA,6CACA,0CACA,8CACA,mCACA,0CACA,2CACA,0CACA,4CACA,2CACA,sCACA,gDACA,+CACA,mDACA,yCACA,+CACA,gDACA,gDACA,iDACA,+CACF,EACA,KAAM,CACJ,+BACA,yCACA,6CACA,wCACA,4CACA,iCACA,wCACA,yCACA,wCACA,0CACA,yCACA,oCACA,8CACA,6CACA,iDACA,uCACA,6CACA,8CACA,8CACA,+CACA,6CACF,EACA,MAAO,CACL,gCACA,0CACA,6CACA,yCACA,6CACA,kCACA,yCACA,0CACA,yCACA,2CACA,0CACA,qCACA,+CACA,8CACA,kDACA,wCACA,8CACA,+CACA,+CACA,gDACA,8CACF,CACF,E"}
@@ -1,5 +1,4 @@
1
1
  import { t as __name } from "../rolldown-runtime-BhWHdk3m.js";
2
- //#region src/lib/color.d.ts
3
2
  export declare const uiColors: readonly ['primary', 'brand', 'gray', 'zinc', 'red', 'yellow', 'blue', 'indigo', 'pink', 'green'];
4
3
  export type UIColor = (typeof uiColors)[number];
5
4
  export declare const selectionControlColorVariants: {
@@ -14,5 +13,4 @@ export declare const selectionControlColorVariants: {
14
13
  readonly pink: readonly ["[--selection-control:var(--pink)]", "[--selection-control-foreground:var(--zinc-50)]"];
15
14
  readonly green: readonly ["[--selection-control:var(--green)]", "[--selection-control-foreground:var(--zinc-50)]"];
16
15
  };
17
- //#endregion
18
16
  //# sourceMappingURL=color.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"color.js","names":["uiColors","selectionControlColorVariants"],"sources":["../../src/lib/color.ts"],"sourcesContent":["export const uiColors = [\n 'primary',\n 'brand',\n 'gray',\n 'zinc',\n 'red',\n 'yellow',\n 'blue',\n 'indigo',\n 'pink',\n 'green'\n] as const\n\nexport type UIColor = (typeof uiColors)[number]\n\nexport const selectionControlColorVariants = {\n primary: ['[--selection-control:var(--primary)]', '[--selection-control-foreground:var(--zinc-50)]'],\n brand: ['[--selection-control:var(--brand)]', '[--selection-control-foreground:var(--zinc-50)]'],\n gray: ['[--selection-control:var(--gray)]', '[--selection-control-foreground:var(--zinc-50)]'],\n zinc: ['[--selection-control:var(--zinc)]', '[--selection-control-foreground:var(--zinc-50)]'],\n red: ['[--selection-control:var(--red)]', '[--selection-control-foreground:var(--zinc-50)]'],\n yellow: ['[--selection-control:var(--yellow)]', '[--selection-control-foreground:var(--zinc-50)]'],\n blue: ['[--selection-control:var(--blue)]', '[--selection-control-foreground:var(--zinc-50)]'],\n indigo: ['[--selection-control:var(--indigo)]', '[--selection-control-foreground:var(--zinc-50)]'],\n pink: ['[--selection-control:var(--pink)]', '[--selection-control-foreground:var(--zinc-50)]'],\n green: ['[--selection-control:var(--green)]', '[--selection-control-foreground:var(--zinc-50)]']\n} as const satisfies Record<UIColor, readonly string[]>\n"],"mappings":"AAAA,MAAaA,EAAW,CACtB,UACA,QACA,OACA,OACA,MACA,SACA,OACA,SACA,OACA,OACF,EAIaC,EAAgC,CAC3C,QAAS,CAAC,uCAAwC,iDAAiD,EACnG,MAAO,CAAC,qCAAsC,iDAAiD,EAC/F,KAAM,CAAC,oCAAqC,iDAAiD,EAC7F,KAAM,CAAC,oCAAqC,iDAAiD,EAC7F,IAAK,CAAC,mCAAoC,iDAAiD,EAC3F,OAAQ,CAAC,sCAAuC,iDAAiD,EACjG,KAAM,CAAC,oCAAqC,iDAAiD,EAC7F,OAAQ,CAAC,sCAAuC,iDAAiD,EACjG,KAAM,CAAC,oCAAqC,iDAAiD,EAC7F,MAAO,CAAC,qCAAsC,iDAAiD,CACjG"}
1
+ {"version":3,"file":"color.js","names":["uiColors","selectionControlColorVariants"],"sources":["../../src/lib/color.ts"],"sourcesContent":["export const uiColors = [\n 'primary',\n 'brand',\n 'gray',\n 'zinc',\n 'red',\n 'yellow',\n 'blue',\n 'indigo',\n 'pink',\n 'green'\n] as const\n\nexport type UIColor = (typeof uiColors)[number]\n\nexport const selectionControlColorVariants = {\n primary: ['[--selection-control:var(--primary)]', '[--selection-control-foreground:var(--zinc-50)]'],\n brand: ['[--selection-control:var(--brand)]', '[--selection-control-foreground:var(--zinc-50)]'],\n gray: ['[--selection-control:var(--gray)]', '[--selection-control-foreground:var(--zinc-50)]'],\n zinc: ['[--selection-control:var(--zinc)]', '[--selection-control-foreground:var(--zinc-50)]'],\n red: ['[--selection-control:var(--red)]', '[--selection-control-foreground:var(--zinc-50)]'],\n yellow: ['[--selection-control:var(--yellow)]', '[--selection-control-foreground:var(--zinc-50)]'],\n blue: ['[--selection-control:var(--blue)]', '[--selection-control-foreground:var(--zinc-50)]'],\n indigo: ['[--selection-control:var(--indigo)]', '[--selection-control-foreground:var(--zinc-50)]'],\n pink: ['[--selection-control:var(--pink)]', '[--selection-control-foreground:var(--zinc-50)]'],\n green: ['[--selection-control:var(--green)]', '[--selection-control-foreground:var(--zinc-50)]']\n} as const satisfies Record<UIColor, readonly string[]>\n"],"mappings":"AAAA,MAAaA,EAAW,CACtB,UACA,QACA,OACA,OACA,MACA,SACA,OACA,SACA,OACA,OACF,EAIaC,EAAgC,CAC3C,QAAS,CAAC,uCAAwC,iDAAiD,EACnG,MAAO,CAAC,qCAAsC,iDAAiD,EAC/F,KAAM,CAAC,oCAAqC,iDAAiD,EAC7F,KAAM,CAAC,oCAAqC,iDAAiD,EAC7F,IAAK,CAAC,mCAAoC,iDAAiD,EAC3F,OAAQ,CAAC,sCAAuC,iDAAiD,EACjG,KAAM,CAAC,oCAAqC,iDAAiD,EAC7F,OAAQ,CAAC,sCAAuC,iDAAiD,EACjG,KAAM,CAAC,oCAAqC,iDAAiD,EAC7F,MAAO,CAAC,qCAAsC,iDAAiD,CACjG,E"}
@@ -1,7 +1,5 @@
1
1
  import { t as __name } from "../rolldown-runtime-BhWHdk3m.js";
2
2
  import * as React from "react";
3
- //#region src/lib/compose-refs.d.ts
4
3
  export declare function setRef<T>(ref: React.Ref<T> | undefined, value: T | null): void;
5
4
  export declare function composeRefs<T>(...refs: Array<React.Ref<T> | undefined>): React.RefCallback<T>;
6
- //#endregion
7
5
  //# sourceMappingURL=compose-refs.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"compose-refs.js","names":["ref","value","refs"],"sources":["../../src/lib/compose-refs.ts"],"sourcesContent":["import type * as React from 'react'\n\nexport function setRef<T>(ref: React.Ref<T> | undefined, value: T | null) {\n if (typeof ref === 'function') {\n ref(value)\n return\n }\n\n if (ref) {\n ref.current = value\n }\n}\n\nexport function composeRefs<T>(...refs: Array<React.Ref<T> | undefined>): React.RefCallback<T> {\n return (value) => {\n refs.forEach((ref) => {\n setRef(ref, value)\n })\n }\n}\n"],"mappings":"wCAEA,SAAgB,OAAU,EAA+B,EAAiB,CACpE,OAAOA,GAAQ,WACjBA,EAAIC,CAAK,EAIPD,IACF,EAAI,QAAUC,EAElB,CAEA,SAAgB,YAAe,GAAGC,EAA6D,CAC7F,MAAQ,IAAU,CAChBA,EAAK,QAAS,GAAQ,CACpB,OAAOF,EAAKC,CAAK,CACnB,CAAC,CACH,CACF"}
1
+ {"version":3,"file":"compose-refs.js","names":["ref","value","refs"],"sources":["../../src/lib/compose-refs.ts"],"sourcesContent":["import type * as React from 'react'\n\nexport function setRef<T>(ref: React.Ref<T> | undefined, value: T | null) {\n if (typeof ref === 'function') {\n ref(value)\n return\n }\n\n if (ref) {\n ref.current = value\n }\n}\n\nexport function composeRefs<T>(...refs: Array<React.Ref<T> | undefined>): React.RefCallback<T> {\n return (value) => {\n refs.forEach((ref) => {\n setRef(ref, value)\n })\n }\n}\n"],"mappings":"A,wCAEA,SAAgB,OAAU,EAA+B,EAAiB,CACpE,OAAOA,GAAQ,WACjBA,EAAIC,CAAK,EAIPD,IACF,EAAI,QAAUC,EAElB,CAEA,SAAgB,YAAe,GAAGC,EAA6D,CAC7F,MAAQ,IAAU,CAChBA,EAAK,QAAS,GAAQ,CACpB,OAAOF,EAAKC,CAAK,CACnB,CAAC,CACH,CACF,C"}
@@ -1,6 +1,5 @@
1
1
  import { t as __name } from "../rolldown-runtime-BhWHdk3m.js";
2
2
  import { UIColor } from "./color.js";
3
- //#region src/lib/progress.d.ts
4
3
  export declare const progressColorVariants: {
5
4
  readonly primary: readonly ["[--progress-color:var(--primary)]"];
6
5
  readonly brand: readonly ["[--progress-color:var(--brand)]"];
@@ -14,5 +13,4 @@ export declare const progressColorVariants: {
14
13
  readonly green: readonly ["[--progress-color:var(--green)]"];
15
14
  };
16
15
  export type ProgressColor = UIColor;
17
- //#endregion
18
16
  //# sourceMappingURL=progress.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"progress.js","names":["progressColorVariants"],"sources":["../../src/lib/progress.ts"],"sourcesContent":["import type { UIColor } from './color'\n\nexport const progressColorVariants = {\n primary: ['[--progress-color:var(--primary)]'],\n brand: ['[--progress-color:var(--brand)]'],\n gray: ['[--progress-color:var(--gray)]'],\n zinc: ['[--progress-color:var(--zinc)]'],\n red: ['[--progress-color:var(--red)]'],\n yellow: ['[--progress-color:var(--yellow)]'],\n blue: ['[--progress-color:var(--blue)]'],\n indigo: ['[--progress-color:var(--indigo)]'],\n pink: ['[--progress-color:var(--pink)]'],\n green: ['[--progress-color:var(--green)]']\n} as const satisfies Record<UIColor, readonly string[]>\n\nexport type ProgressColor = UIColor\n"],"mappings":"AAEA,MAAaA,EAAwB,CACnC,QAAS,CAAC,mCAAmC,EAC7C,MAAO,CAAC,iCAAiC,EACzC,KAAM,CAAC,gCAAgC,EACvC,KAAM,CAAC,gCAAgC,EACvC,IAAK,CAAC,+BAA+B,EACrC,OAAQ,CAAC,kCAAkC,EAC3C,KAAM,CAAC,gCAAgC,EACvC,OAAQ,CAAC,kCAAkC,EAC3C,KAAM,CAAC,gCAAgC,EACvC,MAAO,CAAC,iCAAiC,CAC3C"}
1
+ {"version":3,"file":"progress.js","names":["progressColorVariants"],"sources":["../../src/lib/progress.ts"],"sourcesContent":["import type { UIColor } from './color'\n\nexport const progressColorVariants = {\n primary: ['[--progress-color:var(--primary)]'],\n brand: ['[--progress-color:var(--brand)]'],\n gray: ['[--progress-color:var(--gray)]'],\n zinc: ['[--progress-color:var(--zinc)]'],\n red: ['[--progress-color:var(--red)]'],\n yellow: ['[--progress-color:var(--yellow)]'],\n blue: ['[--progress-color:var(--blue)]'],\n indigo: ['[--progress-color:var(--indigo)]'],\n pink: ['[--progress-color:var(--pink)]'],\n green: ['[--progress-color:var(--green)]']\n} as const satisfies Record<UIColor, readonly string[]>\n\nexport type ProgressColor = UIColor\n"],"mappings":"AAEA,MAAaA,EAAwB,CACnC,QAAS,CAAC,mCAAmC,EAC7C,MAAO,CAAC,iCAAiC,EACzC,KAAM,CAAC,gCAAgC,EACvC,KAAM,CAAC,gCAAgC,EACvC,IAAK,CAAC,+BAA+B,EACrC,OAAQ,CAAC,kCAAkC,EAC3C,KAAM,CAAC,gCAAgC,EACvC,OAAQ,CAAC,kCAAkC,EAC3C,KAAM,CAAC,gCAAgC,EACvC,MAAO,CAAC,iCAAiC,CAC3C,E"}
@@ -1,9 +1,7 @@
1
1
  import { t as __name } from "../rolldown-runtime-BhWHdk3m.js";
2
2
  import * as React from "react";
3
3
  import { cn } from "cn";
4
- //#region src/lib/utils.d.ts
5
4
  export declare function randomId(prefix?: string): string;
6
5
  export declare function stopPropagationHandler<E extends React.SyntheticEvent>(handler?: (event: E) => void): (event: E) => void;
7
- //#endregion
8
6
  export { cn };
9
7
  //# sourceMappingURL=utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","names":["prefix","handler","event","cn"],"sources":["../../src/lib/utils.ts"],"sourcesContent":["import type * as React from 'react'\n\nexport { cn } from 'cn'\n\nexport function randomId(prefix = 'max-') {\n return `${prefix}${Math.random().toString(36).slice(2, 11)}`\n}\n\nexport function stopPropagationHandler<E extends React.SyntheticEvent>(handler?: (event: E) => void) {\n return (event: E) => {\n handler?.(event)\n event.stopPropagation()\n }\n}\n"],"mappings":"gEAIA,SAAgB,SAAS,EAAS,OAAQ,CACxC,MAAO,GAAGA,IAAS,KAAK,OAAO,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAG,EAAE,GAC3D,CAEA,SAAgB,uBAAuD,EAA8B,CACnG,MAAQ,IAAa,CACnBC,IAAUC,CAAK,EACfA,EAAM,gBAAgB,CACxB,CACF"}
1
+ {"version":3,"file":"utils.js","names":["prefix","handler","event","cn"],"sources":["../../src/lib/utils.ts"],"sourcesContent":["import type * as React from 'react'\n\nexport { cn } from 'cn'\n\nexport function randomId(prefix = 'max-') {\n return `${prefix}${Math.random().toString(36).slice(2, 11)}`\n}\n\nexport function stopPropagationHandler<E extends React.SyntheticEvent>(handler?: (event: E) => void) {\n return (event: E) => {\n handler?.(event)\n event.stopPropagation()\n }\n}\n"],"mappings":"A,gEAIA,SAAgB,SAAS,EAAS,OAAQ,CACxC,MAAO,GAAGA,IAAS,KAAK,OAAO,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAG,EAAE,GAC3D,CAEA,SAAgB,uBAAuD,EAA8B,CACnG,MAAQ,IAAa,CACnBC,IAAUC,CAAK,EACfA,EAAM,gBAAgB,CACxB,CACF,C"}