@uselets/ui 2.0.0 → 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 (209) 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 +5 -5
  7. package/dist/components/alert-dialog.js +1 -1
  8. package/dist/components/alert-dialog.js.map +1 -1
  9. package/dist/components/alert.d.ts +0 -2
  10. package/dist/components/alert.js.map +1 -1
  11. package/dist/components/anchor.d.ts +1 -3
  12. package/dist/components/anchor.js.map +1 -1
  13. package/dist/components/area-chart.d.ts +1 -3
  14. package/dist/components/area-chart.js.map +1 -1
  15. package/dist/components/avatar.d.ts +1 -3
  16. package/dist/components/avatar.js.map +1 -1
  17. package/dist/components/badge.d.ts +1 -3
  18. package/dist/components/badge.js.map +1 -1
  19. package/dist/components/bar-chart.d.ts +1 -3
  20. package/dist/components/bar-chart.js.map +1 -1
  21. package/dist/components/bottom-nav.d.ts +1 -3
  22. package/dist/components/bottom-nav.js.map +1 -1
  23. package/dist/components/breadcrumb.d.ts +1 -3
  24. package/dist/components/breadcrumb.js.map +1 -1
  25. package/dist/components/button-group.d.ts +1 -3
  26. package/dist/components/button-group.js.map +1 -1
  27. package/dist/components/button.d.ts +1 -3
  28. package/dist/components/button.js.map +1 -1
  29. package/dist/components/calendar.d.ts +0 -2
  30. package/dist/components/calendar.js +1 -1
  31. package/dist/components/calendar.js.map +1 -1
  32. package/dist/components/card.d.ts +0 -2
  33. package/dist/components/card.js.map +1 -1
  34. package/dist/components/carousel.d.ts +0 -2
  35. package/dist/components/carousel.js.map +1 -1
  36. package/dist/components/center.d.ts +0 -2
  37. package/dist/components/center.js.map +1 -1
  38. package/dist/components/chart.d.ts +1 -1
  39. package/dist/components/chart.js.map +1 -1
  40. package/dist/components/checkbox.d.ts +0 -2
  41. package/dist/components/checkbox.js.map +1 -1
  42. package/dist/components/code.d.ts +0 -2
  43. package/dist/components/code.js.map +1 -1
  44. package/dist/components/collapsible.d.ts +1 -3
  45. package/dist/components/collapsible.js.map +1 -1
  46. package/dist/components/combobox.d.ts +1 -3
  47. package/dist/components/combobox.js.map +1 -1
  48. package/dist/components/command.d.ts +0 -2
  49. package/dist/components/command.js.map +1 -1
  50. package/dist/components/container.d.ts +0 -2
  51. package/dist/components/container.js.map +1 -1
  52. package/dist/components/data-table.d.ts +0 -2
  53. package/dist/components/data-table.js.map +1 -1
  54. package/dist/components/date-range-picker.d.ts +0 -2
  55. package/dist/components/date-range-picker.js.map +1 -1
  56. package/dist/components/dialog.d.ts +5 -5
  57. package/dist/components/dialog.js +1 -1
  58. package/dist/components/dialog.js.map +1 -1
  59. package/dist/components/direction.d.ts +0 -2
  60. package/dist/components/donut-chart.d.ts +0 -2
  61. package/dist/components/donut-chart.js.map +1 -1
  62. package/dist/components/drawer.d.ts +2 -4
  63. package/dist/components/drawer.js +1 -1
  64. package/dist/components/drawer.js.map +1 -1
  65. package/dist/components/dropdown-menu.d.ts +1 -3
  66. package/dist/components/dropdown-menu.js.map +1 -1
  67. package/dist/components/dropzone.d.ts +0 -2
  68. package/dist/components/dropzone.js.map +1 -1
  69. package/dist/components/empty.d.ts +0 -2
  70. package/dist/components/empty.js.map +1 -1
  71. package/dist/components/field.d.ts +0 -2
  72. package/dist/components/field.js.map +1 -1
  73. package/dist/components/flex.d.ts +0 -2
  74. package/dist/components/flex.js.map +1 -1
  75. package/dist/components/grid.d.ts +0 -2
  76. package/dist/components/grid.js.map +1 -1
  77. package/dist/components/group.d.ts +0 -2
  78. package/dist/components/group.js.map +1 -1
  79. package/dist/components/heading.d.ts +1 -3
  80. package/dist/components/heading.js.map +1 -1
  81. package/dist/components/hover-card.d.ts +1 -3
  82. package/dist/components/hover-card.js.map +1 -1
  83. package/dist/components/input-group.d.ts +0 -2
  84. package/dist/components/input-group.js.map +1 -1
  85. package/dist/components/input-otp.d.ts +0 -2
  86. package/dist/components/input-otp.js.map +1 -1
  87. package/dist/components/input.d.ts +0 -2
  88. package/dist/components/input.js.map +1 -1
  89. package/dist/components/kbd.d.ts +0 -2
  90. package/dist/components/kbd.js.map +1 -1
  91. package/dist/components/label.d.ts +1 -3
  92. package/dist/components/label.js.map +1 -1
  93. package/dist/components/list.d.ts +1 -3
  94. package/dist/components/list.js.map +1 -1
  95. package/dist/components/logo.d.ts +0 -2
  96. package/dist/components/marker.d.ts +1 -3
  97. package/dist/components/marker.js.map +1 -1
  98. package/dist/components/mask-input.d.ts +0 -2
  99. package/dist/components/mask-input.js.map +1 -1
  100. package/dist/components/native-select.d.ts +0 -2
  101. package/dist/components/native-select.js.map +1 -1
  102. package/dist/components/navigation-menu.d.ts +1 -3
  103. package/dist/components/navigation-menu.js.map +1 -1
  104. package/dist/components/number-field.d.ts +1 -3
  105. package/dist/components/number-field.js.map +1 -1
  106. package/dist/components/pagination.d.ts +0 -2
  107. package/dist/components/pagination.js.map +1 -1
  108. package/dist/components/phone-input.d.ts +0 -2
  109. package/dist/components/phone-input.js.map +1 -1
  110. package/dist/components/pie-chart.d.ts +1 -3
  111. package/dist/components/pie-chart.js.map +1 -1
  112. package/dist/components/popover.d.ts +1 -3
  113. package/dist/components/popover.js.map +1 -1
  114. package/dist/components/progress.d.ts +0 -2
  115. package/dist/components/progress.js.map +1 -1
  116. package/dist/components/radio-group.d.ts +0 -2
  117. package/dist/components/radio-group.js.map +1 -1
  118. package/dist/components/resizable.d.ts +0 -2
  119. package/dist/components/resizable.js.map +1 -1
  120. package/dist/components/ring-progress.d.ts +0 -2
  121. package/dist/components/ring-progress.js.map +1 -1
  122. package/dist/components/scroll-area.d.ts +0 -2
  123. package/dist/components/scroll-area.js.map +1 -1
  124. package/dist/components/select.d.ts +1 -3
  125. package/dist/components/select.js.map +1 -1
  126. package/dist/components/separator.d.ts +1 -3
  127. package/dist/components/separator.js.map +1 -1
  128. package/dist/components/sidebar.d.ts +1 -3
  129. package/dist/components/sidebar.js.map +1 -1
  130. package/dist/components/simple-grid.d.ts +0 -2
  131. package/dist/components/simple-grid.js.map +1 -1
  132. package/dist/components/skeleton.d.ts +0 -2
  133. package/dist/components/skeleton.js.map +1 -1
  134. package/dist/components/slider.d.ts +0 -2
  135. package/dist/components/slider.js.map +1 -1
  136. package/dist/components/sonner.d.ts +0 -2
  137. package/dist/components/sonner.js.map +1 -1
  138. package/dist/components/spinner.d.ts +0 -2
  139. package/dist/components/spinner.js.map +1 -1
  140. package/dist/components/stack.d.ts +0 -2
  141. package/dist/components/stack.js.map +1 -1
  142. package/dist/components/stepper.d.ts +1 -3
  143. package/dist/components/stepper.js.map +1 -1
  144. package/dist/components/switch.d.ts +0 -2
  145. package/dist/components/switch.js.map +1 -1
  146. package/dist/components/table.d.ts +0 -2
  147. package/dist/components/table.js.map +1 -1
  148. package/dist/components/tabs.d.ts +1 -3
  149. package/dist/components/tabs.js.map +1 -1
  150. package/dist/components/text.d.ts +1 -3
  151. package/dist/components/text.js.map +1 -1
  152. package/dist/components/textarea.d.ts +0 -2
  153. package/dist/components/textarea.js.map +1 -1
  154. package/dist/components/theme.d.ts +0 -2
  155. package/dist/components/theme.js.map +1 -1
  156. package/dist/components/timeline.d.ts +0 -2
  157. package/dist/components/timeline.js.map +1 -1
  158. package/dist/components/toggle-group.d.ts +1 -3
  159. package/dist/components/toggle-group.js.map +1 -1
  160. package/dist/components/toggle.d.ts +1 -3
  161. package/dist/components/toggle.js.map +1 -1
  162. package/dist/components/tooltip.d.ts +1 -3
  163. package/dist/components/tooltip.js.map +1 -1
  164. package/dist/components/unstyled-button.d.ts +1 -3
  165. package/dist/components/unstyled-button.js.map +1 -1
  166. package/dist/components/visibility.d.ts +0 -2
  167. package/dist/components/visibility.js.map +1 -1
  168. package/dist/hooks/use-breakpoint-value.d.ts +0 -2
  169. package/dist/hooks/use-breakpoint-value.js.map +1 -1
  170. package/dist/hooks/use-breakpoint.d.ts +0 -2
  171. package/dist/hooks/use-breakpoint.js.map +1 -1
  172. package/dist/hooks/use-disclosure.d.ts +0 -2
  173. package/dist/hooks/use-disclosure.js.map +1 -1
  174. package/dist/hooks/use-document-visibility.d.ts +0 -2
  175. package/dist/hooks/use-document-visibility.js.map +1 -1
  176. package/dist/hooks/use-hotkeys.d.ts +1 -1
  177. package/dist/hooks/use-idle.d.ts +0 -2
  178. package/dist/hooks/use-idle.js.map +1 -1
  179. package/dist/hooks/use-interval.d.ts +0 -2
  180. package/dist/hooks/use-interval.js.map +1 -1
  181. package/dist/hooks/use-local-storage.d.ts +0 -2
  182. package/dist/hooks/use-local-storage.js.map +1 -1
  183. package/dist/hooks/use-mask.d.ts +0 -2
  184. package/dist/hooks/use-mask.js.map +1 -1
  185. package/dist/hooks/use-mobile.d.ts +0 -2
  186. package/dist/hooks/use-mobile.js.map +1 -1
  187. package/dist/index.d.ts +3 -3
  188. package/dist/lib/as-child.d.ts +1 -1
  189. package/dist/lib/as-child.js.map +1 -1
  190. package/dist/lib/badge.d.ts +0 -2
  191. package/dist/lib/badge.js.map +1 -1
  192. package/dist/lib/button.d.ts +0 -2
  193. package/dist/lib/button.js.map +1 -1
  194. package/dist/lib/color.d.ts +0 -2
  195. package/dist/lib/color.js.map +1 -1
  196. package/dist/lib/compose-refs.d.ts +0 -2
  197. package/dist/lib/compose-refs.js.map +1 -1
  198. package/dist/lib/progress.d.ts +0 -2
  199. package/dist/lib/progress.js.map +1 -1
  200. package/dist/lib/utils.d.ts +0 -2
  201. package/dist/lib/utils.js.map +1 -1
  202. package/dist/logo--R3_XDgA.js.map +1 -1
  203. package/dist/postcss.config.js.map +1 -1
  204. package/dist/resolve-class-name-BurP8ngI.js.map +1 -1
  205. package/dist/skills/uselets-ui/references/component-catalog.md +3 -3
  206. package/dist/{use-hotkeys-D1_TEIwN.d.ts → use-hotkeys-BVm0IGb8.d.ts} +1 -5
  207. package/dist/use-hotkeys-YDJmGWX6.js.map +1 -1
  208. package/package.json +9 -9
  209. package/skills/uselets-ui/references/component-catalog.md +3 -3
@@ -1 +1 @@
1
- {"version":3,"file":"toggle.js","names":["TogglePrimitive","resolveClassName","Toggle$1","toggleVariants","cva","buttonColorVariants","props","variant","color","size","cn","className","state","toAsChildRenderProps","asChild","children"],"sources":["../../src/components/toggle.tsx"],"sourcesContent":["import { Toggle as TogglePrimitive } from '@base-ui/react/toggle'\nimport { cva, type VariantProps } from 'class-variance-authority'\n\nimport { type AsChildPrimitiveProps, toAsChildRenderProps } from '../lib/as-child'\nimport { buttonColorVariants } from '../lib/button'\nimport { cn } from '../lib/utils'\nimport { resolveClassName } from '../utils/resolve-class-name'\n\nconst toggleVariants = cva(\n \"group/toggle inline-flex items-center justify-center gap-1 rounded-full border border-transparent text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n {\n variants: {\n variant: {\n secondary:\n 'border-border bg-background hover:bg-muted hover:text-foreground data-pressed:bg-muted data-pressed:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50 dark:data-pressed:bg-input/50',\n outline:\n 'border-(--button-outline-border) bg-background text-(--button-outline-foreground) hover:bg-(--button-solid) hover:text-(--button-solid-foreground) data-pressed:bg-(--button-solid) data-pressed:text-(--button-solid-foreground)',\n ghost:\n 'text-(--button-ghost-foreground) hover:bg-(--button-ghost-hover) hover:text-(--button-ghost-foreground) data-pressed:bg-(--button-ghost-hover) data-pressed:text-(--button-ghost-foreground)'\n },\n color: buttonColorVariants,\n size: {\n sm: 'h-8 min-w-8 px-1.5 text-[0.8rem]',\n md: 'h-9 min-w-9 px-2',\n lg: 'h-10 min-w-10 px-2.5'\n }\n },\n defaultVariants: {\n variant: 'ghost',\n color: 'primary',\n size: 'md'\n }\n }\n)\n\nexport type ToggleProps = AsChildPrimitiveProps<typeof TogglePrimitive> & VariantProps<typeof toggleVariants>\n\nfunction Toggle({\n className,\n variant = 'ghost',\n color = 'primary',\n size = 'md',\n asChild,\n children,\n ...props\n}: ToggleProps) {\n return (\n <TogglePrimitive\n data-slot=\"toggle\"\n data-variant={variant}\n data-color={color}\n data-size={size}\n className={(state) => cn(toggleVariants({ variant, color, size }), resolveClassName(className, state))}\n {...props}\n {...toAsChildRenderProps(asChild, children)}\n />\n )\n}\n\nexport { Toggle, toggleVariants }\n"],"mappings":"0XAQA,MAAMG,EAAiBC,EACrB,shBACA,CACE,SAAU,CACR,QAAS,CACP,UACE,8MACF,QACE,oOACF,MACE,8LACJ,EACA,MAAOC,EACP,KAAM,CACJ,GAAI,mCACJ,GAAI,mBACJ,GAAI,sBACN,CACF,EACA,gBAAiB,CACf,QAAS,QACT,MAAO,UACP,KAAM,IACR,CACF,CACF,EAIA,SAAS,OAAO,CACd,YACA,UAAU,QACV,QAAQ,UACR,OAAO,KACP,UACA,WACA,GAAGC,GACW,CACd,MACE,kBAACN,EAAD,CACE,YAAU,SACV,eAAcO,EACd,aAAYC,EACZ,YAAWC,EACX,UAAY,GAAUC,EAAGP,EAAe,CAAE,UAAS,QAAO,MAAK,CAAC,EAAGF,EAAiBU,EAAWC,CAAK,CAAC,EACrG,GAAIN,EACJ,GAAIO,EAAqBC,EAASC,CAAQ,CAC3C,CAAA,CAEL"}
1
+ {"version":3,"file":"toggle.js","names":["TogglePrimitive","resolveClassName","Toggle$1","toggleVariants","cva","buttonColorVariants","props","variant","color","size","cn","className","state","toAsChildRenderProps","asChild","children"],"sources":["../../src/components/toggle.tsx"],"sourcesContent":["import { Toggle as TogglePrimitive } from '@base-ui/react/toggle'\nimport { cva, type VariantProps } from 'class-variance-authority'\n\nimport { type AsChildPrimitiveProps, toAsChildRenderProps } from '../lib/as-child'\nimport { buttonColorVariants } from '../lib/button'\nimport { cn } from '../lib/utils'\nimport { resolveClassName } from '../utils/resolve-class-name'\n\nconst toggleVariants = cva(\n \"group/toggle inline-flex items-center justify-center gap-1 rounded-full border border-transparent text-sm font-medium whitespace-nowrap transition-all outline-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n {\n variants: {\n variant: {\n secondary:\n 'border-border bg-background hover:bg-muted hover:text-foreground data-pressed:bg-muted data-pressed:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50 dark:data-pressed:bg-input/50',\n outline:\n 'border-(--button-outline-border) bg-background text-(--button-outline-foreground) hover:bg-(--button-solid) hover:text-(--button-solid-foreground) data-pressed:bg-(--button-solid) data-pressed:text-(--button-solid-foreground)',\n ghost:\n 'text-(--button-ghost-foreground) hover:bg-(--button-ghost-hover) hover:text-(--button-ghost-foreground) data-pressed:bg-(--button-ghost-hover) data-pressed:text-(--button-ghost-foreground)'\n },\n color: buttonColorVariants,\n size: {\n sm: 'h-8 min-w-8 px-1.5 text-[0.8rem]',\n md: 'h-9 min-w-9 px-2',\n lg: 'h-10 min-w-10 px-2.5'\n }\n },\n defaultVariants: {\n variant: 'ghost',\n color: 'primary',\n size: 'md'\n }\n }\n)\n\nexport type ToggleProps = AsChildPrimitiveProps<typeof TogglePrimitive> & VariantProps<typeof toggleVariants>\n\nfunction Toggle({\n className,\n variant = 'ghost',\n color = 'primary',\n size = 'md',\n asChild,\n children,\n ...props\n}: ToggleProps) {\n return (\n <TogglePrimitive\n data-slot=\"toggle\"\n data-variant={variant}\n data-color={color}\n data-size={size}\n className={(state) => cn(toggleVariants({ variant, color, size }), resolveClassName(className, state))}\n {...props}\n {...toAsChildRenderProps(asChild, children)}\n />\n )\n}\n\nexport { Toggle, toggleVariants }\n"],"mappings":"A,0XAQA,MAAMG,EAAiBC,EACrB,shBACA,CACE,SAAU,CACR,QAAS,CACP,UACE,8MACF,QACE,oOACF,MACE,8LACJ,EACA,MAAOC,EACP,KAAM,CACJ,GAAI,mCACJ,GAAI,mBACJ,GAAI,sBACN,CACF,EACA,gBAAiB,CACf,QAAS,QACT,MAAO,UACP,KAAM,IACR,CACF,CACF,EAIA,SAAS,OAAO,CACd,YACA,UAAU,QACV,QAAQ,UACR,OAAO,KACP,UACA,WACA,GAAGC,GACW,CACd,MACE,kBAACN,EAAD,CACE,YAAU,SACV,eAAcO,EACd,aAAYC,EACZ,YAAWC,EACX,UAAY,GAAUC,EAAGP,EAAe,CAAE,UAAS,QAAO,MAAK,CAAC,EAAGF,EAAiBU,EAAWC,CAAK,CAAC,EACrG,GAAIN,EACJ,GAAIO,EAAqBC,EAASC,CAAQ,CAC3C,CAAA,CAEL,C"}
@@ -1,8 +1,7 @@
1
1
  import { t as __name } from "../rolldown-runtime-BhWHdk3m.js";
2
- import { t as AsChildPrimitiveProps } from "../as-child-Dxg3Xo1G.js";
2
+ import { t as AsChildPrimitiveProps } from "../as-child-T9W73ZYU.js";
3
3
  import * as React from "react";
4
4
  import { Tooltip as Tooltip$1 } from "@base-ui/react/tooltip";
5
- //#region src/components/tooltip.d.ts
6
5
  export type TooltipProviderProps = React.ComponentProps<typeof Tooltip$1.Provider>;
7
6
  export type TooltipRootProps = React.ComponentProps<typeof Tooltip$1.Root>;
8
7
  export type TooltipTriggerProps = AsChildPrimitiveProps<typeof Tooltip$1.Trigger>;
@@ -23,6 +22,5 @@ declare function TooltipRoot({ ...props }: TooltipRootProps): React.JSX.Element;
23
22
  declare function Tooltip({ label, children, disabled, open, defaultOpen, onOpenChange, onOpenChangeComplete, disableHoverablePopup, trackCursorAxis, actionsRef, delay, closeDelay, ...contentProps }: TooltipProps): string | number | bigint | boolean | React.JSX.Element | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | Iterable<React.ReactNode> | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | React.ReactPortal | null | undefined> | null | undefined;
24
23
  declare function TooltipTrigger({ asChild, children, ...props }: TooltipTriggerProps): React.JSX.Element;
25
24
  declare function TooltipContent({ className, side, sideOffset, align, alignOffset, sticky, keepMounted, children, asChild, ...props }: TooltipContentProps): React.JSX.Element;
26
- //#endregion
27
25
  export { Tooltip, TooltipContent, TooltipProvider, TooltipRoot, TooltipTrigger };
28
26
  //# sourceMappingURL=tooltip.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"tooltip.js","names":["TooltipPrimitive","resolveClassName","Tooltip$1","props","contentProps","disabled","children","label","toAsChildRenderProps","asChild","cn","className","state"],"sources":["../../src/components/tooltip.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { Tooltip as TooltipPrimitive } from '@base-ui/react/tooltip'\n\nimport { type AsChildPrimitiveProps, toAsChildRenderProps } from '../lib/as-child'\nimport { cn } from '../lib/utils'\nimport { resolveClassName } from '../utils/resolve-class-name'\n\nexport type TooltipProviderProps = React.ComponentProps<typeof TooltipPrimitive.Provider>\n\nexport type TooltipRootProps = React.ComponentProps<typeof TooltipPrimitive.Root>\n\nexport type TooltipTriggerProps = AsChildPrimitiveProps<typeof TooltipPrimitive.Trigger>\n\nexport type TooltipContentProps = AsChildPrimitiveProps<typeof TooltipPrimitive.Popup> &\n Pick<\n React.ComponentProps<typeof TooltipPrimitive.Positioner>,\n 'side' | 'sideOffset' | 'align' | 'alignOffset' | 'sticky'\n > &\n Pick<React.ComponentProps<typeof TooltipPrimitive.Portal>, 'keepMounted'>\n\nexport type TooltipProps = Pick<\n TooltipRootProps,\n | 'open'\n | 'defaultOpen'\n | 'onOpenChange'\n | 'onOpenChangeComplete'\n | 'disableHoverablePopup'\n | 'trackCursorAxis'\n | 'actionsRef'\n> &\n Omit<TooltipContentProps, 'children'> &\n Pick<TooltipTriggerProps, 'delay' | 'closeDelay'> & {\n /** The trigger. Must be a single element that accepts a ref and event handlers. */\n children?: React.ReactNode\n /** Tooltip content. */\n label?: React.ReactNode\n /**\n * Renders only the trigger, without a tooltip.\n * @default false\n */\n disabled?: boolean\n }\n\nfunction TooltipProvider({ delay = 0, ...props }: TooltipProviderProps) {\n return <TooltipPrimitive.Provider data-slot=\"tooltip-provider\" delay={delay} {...props} />\n}\n\nfunction TooltipRoot({ ...props }: TooltipRootProps) {\n return <TooltipPrimitive.Root data-slot=\"tooltip-root\" {...props} />\n}\n\nfunction Tooltip({\n label,\n children,\n disabled = false,\n open,\n defaultOpen,\n onOpenChange,\n onOpenChangeComplete,\n disableHoverablePopup,\n trackCursorAxis,\n actionsRef,\n delay,\n closeDelay,\n ...contentProps\n}: TooltipProps) {\n if (disabled) {\n return children\n }\n\n return (\n <TooltipRoot\n open={open}\n defaultOpen={defaultOpen}\n onOpenChange={onOpenChange}\n onOpenChangeComplete={onOpenChangeComplete}\n disableHoverablePopup={disableHoverablePopup}\n trackCursorAxis={trackCursorAxis}\n actionsRef={actionsRef}\n >\n <TooltipTrigger asChild delay={delay} closeDelay={closeDelay}>\n {children}\n </TooltipTrigger>\n <TooltipContent {...contentProps}>{label}</TooltipContent>\n </TooltipRoot>\n )\n}\n\nfunction TooltipTrigger({ asChild, children, ...props }: TooltipTriggerProps) {\n return (\n <TooltipPrimitive.Trigger data-slot=\"tooltip-trigger\" {...props} {...toAsChildRenderProps(asChild, children)} />\n )\n}\n\nfunction TooltipContent({\n className,\n side = 'top',\n sideOffset = 0,\n align = 'center',\n alignOffset = 0,\n sticky,\n keepMounted,\n children,\n asChild,\n ...props\n}: TooltipContentProps) {\n return (\n <TooltipPrimitive.Portal keepMounted={keepMounted}>\n <TooltipPrimitive.Positioner\n side={side}\n sideOffset={sideOffset}\n align={align}\n alignOffset={alignOffset}\n sticky={sticky}\n className=\"isolate z-50\"\n >\n <TooltipPrimitive.Popup\n data-slot=\"tooltip-content\"\n role=\"tooltip\"\n className={(state) =>\n cn(\n 'bg-foreground text-background z-50 w-fit max-w-xs rounded-md px-3 py-1.5 text-xs origin-(--transform-origin)',\n 'data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95',\n 'data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95',\n 'data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',\n resolveClassName(className, state)\n )\n }\n {...props}\n {...toAsChildRenderProps(asChild, children)}\n >\n {!asChild && children}\n {!asChild && (\n <TooltipPrimitive.Arrow\n data-slot=\"tooltip-arrow\"\n className={cn(\n 'size-2.5 rotate-45 rounded-[2px] bg-foreground fill-foreground z-50 translate-y-[calc(-50%-2px)]',\n 'data-[side=top]:-bottom-2.5 data-[side=bottom]:top-1',\n 'data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2',\n 'data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2'\n )}\n />\n )}\n </TooltipPrimitive.Popup>\n </TooltipPrimitive.Positioner>\n </TooltipPrimitive.Portal>\n )\n}\n\nexport { Tooltip, TooltipContent, TooltipProvider, TooltipRoot, TooltipTrigger }\n"],"mappings":"gSA4CA,SAAS,gBAAgB,CAAE,QAAQ,EAAG,GAAGG,GAA+B,CACtE,MAAO,kBAACH,EAAiB,SAAlB,CAA2B,YAAU,mBAA0B,QAAO,GAAIG,CAAQ,CAAA,CAC3F,CAEA,SAAS,YAAY,CAAE,GAAGA,GAA2B,CACnD,MAAO,kBAACH,EAAiB,KAAlB,CAAuB,YAAU,eAAe,GAAIG,CAAQ,CAAA,CACrE,CAEA,SAAS,QAAQ,CACf,QACA,WACA,WAAW,GACX,OACA,cACA,eACA,uBACA,wBACA,kBACA,aACA,QACA,aACA,GAAGC,GACY,CAKf,OAJIC,EACKC,EAIP,kBAAC,YAAD,CACQ,OACO,cACC,eACQ,uBACC,wBACN,kBACL,aAPd,SAAA,CASE,kBAAC,eAAD,CAAgB,QAAA,GAAe,QAAmB,aAC/C,UACa,CAAA,EAChB,kBAAC,eAAD,CAAgB,GAAIF,EAAe,SAAAG,CAAsB,CAAA,CAC9C,GAEjB,CAEA,SAAS,eAAe,CAAE,UAAS,WAAU,GAAGJ,GAA8B,CAC5E,MACE,kBAACH,EAAiB,QAAlB,CAA0B,YAAU,kBAAkB,GAAIG,EAAO,GAAIK,EAAqBC,EAASH,CAAQ,CAAI,CAAA,CAEnH,CAEA,SAAS,eAAe,CACtB,YACA,OAAO,MACP,aAAa,EACb,QAAQ,SACR,cAAc,EACd,SACA,cACA,WACA,UACA,GAAGH,GACmB,CACtB,MACE,kBAACH,EAAiB,OAAlB,CAAsC,cACpC,SAAA,kBAACA,EAAiB,WAAlB,CACQ,OACM,aACL,QACM,cACL,SACR,UAAU,eAEV,SAAA,kBAACA,EAAiB,MAAlB,CACE,YAAU,kBACV,KAAK,UACL,UAAY,GACVU,EACE,+GACA,gEACA,yEACA,8JACAT,EAAiBU,EAAWC,CAAK,CACnC,EAEF,GAAIT,EACJ,GAAIK,EAAqBC,EAASH,CAAQ,EAb5C,SAAA,CAeG,CAACG,GAAWH,EACZ,CAACG,GACA,kBAACT,EAAiB,MAAlB,CACE,YAAU,gBACV,UAAWU,EACT,mGACA,uDACA,wFACA,yFACF,CACD,CAAA,CAEmB,GACG,CAAA,CACN,CAAA,CAE7B"}
1
+ {"version":3,"file":"tooltip.js","names":["TooltipPrimitive","resolveClassName","Tooltip$1","props","contentProps","disabled","children","label","toAsChildRenderProps","asChild","cn","className","state"],"sources":["../../src/components/tooltip.tsx"],"sourcesContent":["import type * as React from 'react'\n\nimport { Tooltip as TooltipPrimitive } from '@base-ui/react/tooltip'\n\nimport { type AsChildPrimitiveProps, toAsChildRenderProps } from '../lib/as-child'\nimport { cn } from '../lib/utils'\nimport { resolveClassName } from '../utils/resolve-class-name'\n\nexport type TooltipProviderProps = React.ComponentProps<typeof TooltipPrimitive.Provider>\n\nexport type TooltipRootProps = React.ComponentProps<typeof TooltipPrimitive.Root>\n\nexport type TooltipTriggerProps = AsChildPrimitiveProps<typeof TooltipPrimitive.Trigger>\n\nexport type TooltipContentProps = AsChildPrimitiveProps<typeof TooltipPrimitive.Popup> &\n Pick<\n React.ComponentProps<typeof TooltipPrimitive.Positioner>,\n 'side' | 'sideOffset' | 'align' | 'alignOffset' | 'sticky'\n > &\n Pick<React.ComponentProps<typeof TooltipPrimitive.Portal>, 'keepMounted'>\n\nexport type TooltipProps = Pick<\n TooltipRootProps,\n | 'open'\n | 'defaultOpen'\n | 'onOpenChange'\n | 'onOpenChangeComplete'\n | 'disableHoverablePopup'\n | 'trackCursorAxis'\n | 'actionsRef'\n> &\n Omit<TooltipContentProps, 'children'> &\n Pick<TooltipTriggerProps, 'delay' | 'closeDelay'> & {\n /** The trigger. Must be a single element that accepts a ref and event handlers. */\n children?: React.ReactNode\n /** Tooltip content. */\n label?: React.ReactNode\n /**\n * Renders only the trigger, without a tooltip.\n * @default false\n */\n disabled?: boolean\n }\n\nfunction TooltipProvider({ delay = 0, ...props }: TooltipProviderProps) {\n return <TooltipPrimitive.Provider data-slot=\"tooltip-provider\" delay={delay} {...props} />\n}\n\nfunction TooltipRoot({ ...props }: TooltipRootProps) {\n return <TooltipPrimitive.Root data-slot=\"tooltip-root\" {...props} />\n}\n\nfunction Tooltip({\n label,\n children,\n disabled = false,\n open,\n defaultOpen,\n onOpenChange,\n onOpenChangeComplete,\n disableHoverablePopup,\n trackCursorAxis,\n actionsRef,\n delay,\n closeDelay,\n ...contentProps\n}: TooltipProps) {\n if (disabled) {\n return children\n }\n\n return (\n <TooltipRoot\n open={open}\n defaultOpen={defaultOpen}\n onOpenChange={onOpenChange}\n onOpenChangeComplete={onOpenChangeComplete}\n disableHoverablePopup={disableHoverablePopup}\n trackCursorAxis={trackCursorAxis}\n actionsRef={actionsRef}\n >\n <TooltipTrigger asChild delay={delay} closeDelay={closeDelay}>\n {children}\n </TooltipTrigger>\n <TooltipContent {...contentProps}>{label}</TooltipContent>\n </TooltipRoot>\n )\n}\n\nfunction TooltipTrigger({ asChild, children, ...props }: TooltipTriggerProps) {\n return (\n <TooltipPrimitive.Trigger data-slot=\"tooltip-trigger\" {...props} {...toAsChildRenderProps(asChild, children)} />\n )\n}\n\nfunction TooltipContent({\n className,\n side = 'top',\n sideOffset = 0,\n align = 'center',\n alignOffset = 0,\n sticky,\n keepMounted,\n children,\n asChild,\n ...props\n}: TooltipContentProps) {\n return (\n <TooltipPrimitive.Portal keepMounted={keepMounted}>\n <TooltipPrimitive.Positioner\n side={side}\n sideOffset={sideOffset}\n align={align}\n alignOffset={alignOffset}\n sticky={sticky}\n className=\"isolate z-50\"\n >\n <TooltipPrimitive.Popup\n data-slot=\"tooltip-content\"\n role=\"tooltip\"\n className={(state) =>\n cn(\n 'bg-foreground text-background z-50 w-fit max-w-xs rounded-md px-3 py-1.5 text-xs origin-(--transform-origin)',\n 'data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95',\n 'data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95',\n 'data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2',\n resolveClassName(className, state)\n )\n }\n {...props}\n {...toAsChildRenderProps(asChild, children)}\n >\n {!asChild && children}\n {!asChild && (\n <TooltipPrimitive.Arrow\n data-slot=\"tooltip-arrow\"\n className={cn(\n 'size-2.5 rotate-45 rounded-[2px] bg-foreground fill-foreground z-50 translate-y-[calc(-50%-2px)]',\n 'data-[side=top]:-bottom-2.5 data-[side=bottom]:top-1',\n 'data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2',\n 'data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2'\n )}\n />\n )}\n </TooltipPrimitive.Popup>\n </TooltipPrimitive.Positioner>\n </TooltipPrimitive.Portal>\n )\n}\n\nexport { Tooltip, TooltipContent, TooltipProvider, TooltipRoot, TooltipTrigger }\n"],"mappings":"A,gSA4CA,SAAS,gBAAgB,CAAE,QAAQ,EAAG,GAAGG,GAA+B,CACtE,MAAO,kBAACH,EAAiB,SAAlB,CAA2B,YAAU,mBAA0B,QAAO,GAAIG,CAAQ,CAAA,CAC3F,CAEA,SAAS,YAAY,CAAE,GAAGA,GAA2B,CACnD,MAAO,kBAACH,EAAiB,KAAlB,CAAuB,YAAU,eAAe,GAAIG,CAAQ,CAAA,CACrE,CAEA,SAAS,QAAQ,CACf,QACA,WACA,WAAW,GACX,OACA,cACA,eACA,uBACA,wBACA,kBACA,aACA,QACA,aACA,GAAGC,GACY,CAKf,OAJIC,EACKC,EAIP,kBAAC,YAAD,CACQ,OACO,cACC,eACQ,uBACC,wBACN,kBACL,aAPd,SAAA,CASE,kBAAC,eAAD,CAAgB,QAAA,GAAe,QAAmB,aAC/C,UACa,CAAA,EAChB,kBAAC,eAAD,CAAgB,GAAIF,EAAe,SAAAG,CAAsB,CAAA,CAC9C,C,EAEjB,CAEA,SAAS,eAAe,CAAE,UAAS,WAAU,GAAGJ,GAA8B,CAC5E,MACE,kBAACH,EAAiB,QAAlB,CAA0B,YAAU,kBAAkB,GAAIG,EAAO,GAAIK,EAAqBC,EAASH,CAAQ,CAAI,CAAA,CAEnH,CAEA,SAAS,eAAe,CACtB,YACA,OAAO,MACP,aAAa,EACb,QAAQ,SACR,cAAc,EACd,SACA,cACA,WACA,UACA,GAAGH,GACmB,CACtB,MACE,kBAACH,EAAiB,OAAlB,CAAsC,cACpC,SAAA,kBAACA,EAAiB,WAAlB,CACQ,OACM,aACL,QACM,cACL,SACR,UAAU,eAEV,SAAA,kBAACA,EAAiB,MAAlB,CACE,YAAU,kBACV,KAAK,UACL,UAAY,GACVU,EACE,+GACA,gEACA,yEACA,8JACAT,EAAiBU,EAAWC,CAAK,CACnC,EAEF,GAAIT,EACJ,GAAIK,EAAqBC,EAASH,CAAQ,EAb5C,SAAA,CAeG,CAACG,GAAWH,EACZ,CAACG,GACA,kBAACT,EAAiB,MAAlB,CACE,YAAU,gBACV,UAAWU,EACT,mGACA,uDACA,wFACA,yFACF,CACD,CAAA,CAEmB,C,EACG,CAAA,CACN,CAAA,CAE7B,C"}
@@ -1,8 +1,6 @@
1
1
  import { t as __name } from "../rolldown-runtime-BhWHdk3m.js";
2
- import { n as AsChildProps } from "../as-child-Dxg3Xo1G.js";
3
- //#region src/components/unstyled-button.d.ts
2
+ import { n as AsChildProps } from "../as-child-T9W73ZYU.js";
4
3
  export type UnstyledButtonProps = AsChildProps<'button'>;
5
4
  declare function UnstyledButton({ className, type, asChild, ...props }: UnstyledButtonProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
6
- //#endregion
7
5
  export { UnstyledButton };
8
6
  //# sourceMappingURL=unstyled-button.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"unstyled-button.js","names":["props","useAsChild","asChild","type","cn","className"],"sources":["../../src/components/unstyled-button.tsx"],"sourcesContent":["import { type AsChildProps, useAsChild } from '../lib/as-child'\nimport { cn } from '../lib/utils'\n\nexport type UnstyledButtonProps = AsChildProps<'button'>\n\nfunction UnstyledButton({ className, type = 'button', asChild = false, ...props }: UnstyledButtonProps) {\n return useAsChild('button', {\n asChild,\n type: !asChild ? type : undefined,\n 'data-slot': 'unstyled-button',\n className: cn(\n 'inline-flex appearance-none items-center justify-center border-0 bg-transparent p-0 [font:inherit] text-inherit outline-none',\n 'cursor-pointer select-none disabled:pointer-events-none disabled:opacity-50',\n 'focus-visible:ring-3 focus-visible:ring-ring/50',\n className\n ),\n ...props\n })\n}\n\nexport { UnstyledButton }\n"],"mappings":"6HAKA,SAAS,eAAe,CAAE,YAAW,OAAO,SAAU,UAAU,GAAO,GAAGA,GAA8B,CACtG,OAAOC,EAAW,SAAU,CAC1B,UACA,KAAOC,EAAiB,IAAA,GAAPC,EACjB,YAAa,kBACb,UAAWC,EACT,+HACA,8EACA,kDACAC,CACF,EACA,GAAGL,CACL,CAAC,CACH"}
1
+ {"version":3,"file":"unstyled-button.js","names":["props","useAsChild","asChild","type","cn","className"],"sources":["../../src/components/unstyled-button.tsx"],"sourcesContent":["import { type AsChildProps, useAsChild } from '../lib/as-child'\nimport { cn } from '../lib/utils'\n\nexport type UnstyledButtonProps = AsChildProps<'button'>\n\nfunction UnstyledButton({ className, type = 'button', asChild = false, ...props }: UnstyledButtonProps) {\n return useAsChild('button', {\n asChild,\n type: !asChild ? type : undefined,\n 'data-slot': 'unstyled-button',\n className: cn(\n 'inline-flex appearance-none items-center justify-center border-0 bg-transparent p-0 [font:inherit] text-inherit outline-none',\n 'cursor-pointer select-none disabled:pointer-events-none disabled:opacity-50',\n 'focus-visible:ring-3 focus-visible:ring-ring/50',\n className\n ),\n ...props\n })\n}\n\nexport { UnstyledButton }\n"],"mappings":"A,6HAKA,SAAS,eAAe,CAAE,YAAW,OAAO,SAAU,UAAU,GAAO,GAAGA,GAA8B,CACtG,OAAOC,EAAW,SAAU,CAC1B,UACA,KAAOC,EAAiB,IAAA,GAAPC,EACjB,YAAa,kBACb,UAAWC,EACT,+HACA,8EACA,kDACAC,CACF,EACA,GAAGL,CACL,CAAC,CACH,C"}
@@ -1,6 +1,5 @@
1
1
  import { t as __name } from "../rolldown-runtime-BhWHdk3m.js";
2
2
  import { Breakpoint } from "../hooks/use-breakpoint.js";
3
- //#region src/components/visibility.d.ts
4
3
  type VisibilityBreakpoint = Exclude<Breakpoint, 'base'>;
5
4
  export type HiddenFromProps = React.ComponentProps<'div'> & {
6
5
  /** Breakpoint from which the children are hidden. */
@@ -14,6 +13,5 @@ export type VisibleFromProps = {
14
13
  children?: React.ReactNode;
15
14
  };
16
15
  declare function VisibleFrom({ breakpoint, children }: VisibleFromProps): import("react").JSX.Element;
17
- //#endregion
18
16
  export { HiddenFrom, VisibleFrom };
19
17
  //# sourceMappingURL=visibility.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"visibility.js","names":["isHidden","useBreakpoint","breakpoint","Activity","isVisible"],"sources":["../../src/components/visibility.tsx"],"sourcesContent":["import { Activity } from 'react'\n\nimport { type Breakpoint, useBreakpoint } from '../hooks/use-breakpoint'\n\ntype VisibilityBreakpoint = Exclude<Breakpoint, 'base'>\n\nexport type HiddenFromProps = React.ComponentProps<'div'> & {\n /** Breakpoint from which the children are hidden. */\n breakpoint: VisibilityBreakpoint\n children?: React.ReactNode\n}\n\nfunction HiddenFrom({ breakpoint, children }: HiddenFromProps) {\n const isHidden = useBreakpoint(breakpoint)\n\n return <Activity mode={isHidden ? 'hidden' : 'visible'}>{children}</Activity>\n}\n\nexport type VisibleFromProps = {\n /** Breakpoint from which the children are shown. */\n breakpoint: VisibilityBreakpoint\n children?: React.ReactNode\n}\n\nfunction VisibleFrom({ breakpoint, children }: VisibleFromProps) {\n const isVisible = useBreakpoint(breakpoint)\n\n return <Activity mode={isVisible ? 'visible' : 'hidden'}>{children}</Activity>\n}\n\nexport { HiddenFrom, VisibleFrom }\n"],"mappings":"4KAYA,SAAS,WAAW,CAAE,aAAY,YAA6B,CAC7D,IAAMA,EAAWC,EAAcC,CAAU,EAEzC,MAAO,kBAACC,EAAD,CAAU,KAAMH,EAAW,SAAW,UAAY,UAAmB,CAAA,CAC9E,CAQA,SAAS,YAAY,CAAE,aAAY,YAA8B,CAC/D,IAAMI,EAAYH,EAAcC,CAAU,EAE1C,MAAO,kBAACC,EAAD,CAAU,KAAMC,EAAY,UAAY,SAAW,UAAmB,CAAA,CAC/E"}
1
+ {"version":3,"file":"visibility.js","names":["isHidden","useBreakpoint","breakpoint","Activity","isVisible"],"sources":["../../src/components/visibility.tsx"],"sourcesContent":["import { Activity } from 'react'\n\nimport { type Breakpoint, useBreakpoint } from '../hooks/use-breakpoint'\n\ntype VisibilityBreakpoint = Exclude<Breakpoint, 'base'>\n\nexport type HiddenFromProps = React.ComponentProps<'div'> & {\n /** Breakpoint from which the children are hidden. */\n breakpoint: VisibilityBreakpoint\n children?: React.ReactNode\n}\n\nfunction HiddenFrom({ breakpoint, children }: HiddenFromProps) {\n const isHidden = useBreakpoint(breakpoint)\n\n return <Activity mode={isHidden ? 'hidden' : 'visible'}>{children}</Activity>\n}\n\nexport type VisibleFromProps = {\n /** Breakpoint from which the children are shown. */\n breakpoint: VisibilityBreakpoint\n children?: React.ReactNode\n}\n\nfunction VisibleFrom({ breakpoint, children }: VisibleFromProps) {\n const isVisible = useBreakpoint(breakpoint)\n\n return <Activity mode={isVisible ? 'visible' : 'hidden'}>{children}</Activity>\n}\n\nexport { HiddenFrom, VisibleFrom }\n"],"mappings":"A,4KAYA,SAAS,WAAW,CAAE,aAAY,YAA6B,CAC7D,IAAMA,EAAWC,EAAcC,CAAU,EAEzC,MAAO,kBAACC,EAAD,CAAU,KAAMH,EAAW,SAAW,UAAY,UAAmB,CAAA,CAC9E,CAQA,SAAS,YAAY,CAAE,aAAY,YAA8B,CAC/D,IAAMI,EAAYH,EAAcC,CAAU,EAE1C,MAAO,kBAACC,EAAD,CAAU,KAAMC,EAAY,UAAY,SAAW,UAAmB,CAAA,CAC/E,C"}
@@ -1,8 +1,6 @@
1
1
  import { t as __name } from "../rolldown-runtime-BhWHdk3m.js";
2
2
  import { Breakpoint } from "./use-breakpoint.js";
3
- //#region src/hooks/use-breakpoint-value.d.ts
4
3
  export type ResponsiveValueMap<T> = Partial<Record<Breakpoint, T>>;
5
4
  /** Returns the value of the largest active breakpoint in `values`, or `undefined` when none matches. */
6
5
  export declare function useBreakpointValue<T>(values: ResponsiveValueMap<T>): T | undefined;
7
- //#endregion
8
6
  //# sourceMappingURL=use-breakpoint-value.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"use-breakpoint-value.js","names":["breakpointOrder","activeBreakpoints","useBreakpoint","value","values","breakpoint"],"sources":["../../src/hooks/use-breakpoint-value.ts"],"sourcesContent":["import type { Breakpoint } from './use-breakpoint'\nimport { useBreakpoint } from './use-breakpoint'\n\nexport type ResponsiveValueMap<T> = Partial<Record<Breakpoint, T>>\n\nconst breakpointOrder = ['base', 'sm', 'md', 'lg', 'xl', '2xl'] as const satisfies readonly Breakpoint[]\n\n/** Returns the value of the largest active breakpoint in `values`, or `undefined` when none matches. */\nexport function useBreakpointValue<T>(values: ResponsiveValueMap<T>) {\n const activeBreakpoints = {\n base: useBreakpoint('base'),\n sm: useBreakpoint('sm'),\n md: useBreakpoint('md'),\n lg: useBreakpoint('lg'),\n xl: useBreakpoint('xl'),\n '2xl': useBreakpoint('2xl')\n }\n\n let value = values.base\n\n for (const breakpoint of breakpointOrder) {\n if (activeBreakpoints[breakpoint] && values[breakpoint] !== undefined) {\n value = values[breakpoint]\n }\n }\n\n return value\n}\n"],"mappings":"4FAKA,MAAMA,EAAkB,CAAC,OAAQ,KAAM,KAAM,KAAM,KAAM,KAAK,EAG9D,SAAgB,mBAAsB,EAA+B,CACnE,IAAMC,EAAoB,CACxB,KAAMC,EAAc,MAAM,EAC1B,GAAIA,EAAc,IAAI,EACtB,GAAIA,EAAc,IAAI,EACtB,GAAIA,EAAc,IAAI,EACtB,GAAIA,EAAc,IAAI,EACtB,MAAOA,EAAc,KAAK,CAC5B,EAEIC,EAAQC,EAAO,KAEnB,IAAK,IAAMC,KAAcL,EACnBC,EAAkBI,IAAeD,EAAOC,KAAgB,IAAA,KAC1D,EAAQD,EAAOC,IAInB,OAAOF,CACT"}
1
+ {"version":3,"file":"use-breakpoint-value.js","names":["breakpointOrder","activeBreakpoints","useBreakpoint","value","values","breakpoint"],"sources":["../../src/hooks/use-breakpoint-value.ts"],"sourcesContent":["import type { Breakpoint } from './use-breakpoint'\nimport { useBreakpoint } from './use-breakpoint'\n\nexport type ResponsiveValueMap<T> = Partial<Record<Breakpoint, T>>\n\nconst breakpointOrder = ['base', 'sm', 'md', 'lg', 'xl', '2xl'] as const satisfies readonly Breakpoint[]\n\n/** Returns the value of the largest active breakpoint in `values`, or `undefined` when none matches. */\nexport function useBreakpointValue<T>(values: ResponsiveValueMap<T>) {\n const activeBreakpoints = {\n base: useBreakpoint('base'),\n sm: useBreakpoint('sm'),\n md: useBreakpoint('md'),\n lg: useBreakpoint('lg'),\n xl: useBreakpoint('xl'),\n '2xl': useBreakpoint('2xl')\n }\n\n let value = values.base\n\n for (const breakpoint of breakpointOrder) {\n if (activeBreakpoints[breakpoint] && values[breakpoint] !== undefined) {\n value = values[breakpoint]\n }\n }\n\n return value\n}\n"],"mappings":"A,4FAKA,MAAMA,EAAkB,CAAC,OAAQ,KAAM,KAAM,KAAM,KAAM,KAAK,EAG9D,SAAgB,mBAAsB,EAA+B,CACnE,IAAMC,EAAoB,CACxB,KAAMC,EAAc,MAAM,EAC1B,GAAIA,EAAc,IAAI,EACtB,GAAIA,EAAc,IAAI,EACtB,GAAIA,EAAc,IAAI,EACtB,GAAIA,EAAc,IAAI,EACtB,MAAOA,EAAc,KAAK,CAC5B,EAEIC,EAAQC,EAAO,KAEnB,IAAK,IAAMC,KAAcL,EACnBC,EAAkBI,IAAeD,EAAOC,KAAgB,IAAA,KAC1D,EAAQD,EAAOC,IAInB,OAAOF,CACT,C"}
@@ -1,8 +1,6 @@
1
1
  import { t as __name } from "../rolldown-runtime-BhWHdk3m.js";
2
- //#region src/hooks/use-breakpoint.d.ts
3
2
  export type Breakpoint = 'base' | 'sm' | 'md' | 'lg' | 'xl' | '2xl';
4
3
  export declare const breakpointValues: Record<Exclude<Breakpoint, 'base'>, number>;
5
4
  /** Returns whether the viewport is at or above the given Tailwind breakpoint. */
6
5
  export declare function useBreakpoint(breakpoint: Breakpoint): boolean;
7
- //#endregion
8
6
  //# sourceMappingURL=use-breakpoint.d.ts.map
@@ -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"}