@ngrok/mantle 0.65.0 → 0.66.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (297) hide show
  1. package/dist/accordion.d.ts +158 -154
  2. package/dist/accordion.js +1 -1
  3. package/dist/accordion.js.map +1 -1
  4. package/dist/alert-dialog.d.ts +282 -277
  5. package/dist/alert-dialog.js +1 -1
  6. package/dist/alert-dialog.js.map +1 -1
  7. package/dist/alert.d.ts +145 -138
  8. package/dist/alert.js +1 -1
  9. package/dist/alert.js.map +1 -1
  10. package/dist/anchor.d.ts +25 -22
  11. package/dist/anchor.js +1 -1
  12. package/dist/anchor.js.map +1 -1
  13. package/dist/as-child-XMVTepJu.d.ts +31 -0
  14. package/dist/badge.d.ts +29 -19
  15. package/dist/badge.js +1 -1
  16. package/dist/badge.js.map +1 -1
  17. package/dist/booleanish-CBGdPL3Q.js +2 -0
  18. package/dist/booleanish-CBGdPL3Q.js.map +1 -0
  19. package/dist/browser-only-jrBUqioz.js +2 -0
  20. package/dist/browser-only-jrBUqioz.js.map +1 -0
  21. package/dist/browser-only.d.ts +20 -15
  22. package/dist/browser-only.js +1 -2
  23. package/dist/button-CKL-3sIr.d.ts +175 -0
  24. package/dist/button-CRRPesae.js +2 -0
  25. package/dist/button-CRRPesae.js.map +1 -0
  26. package/dist/button-DA2p0_5F.js +2 -0
  27. package/dist/button-DA2p0_5F.js.map +1 -0
  28. package/dist/button.d.ts +4 -9
  29. package/dist/button.js +1 -2
  30. package/dist/calendar.d.ts +14 -8
  31. package/dist/calendar.js +1 -1
  32. package/dist/calendar.js.map +1 -1
  33. package/dist/card.d.ts +99 -97
  34. package/dist/card.js +1 -1
  35. package/dist/card.js.map +1 -1
  36. package/dist/checkbox.d.ts +14 -12
  37. package/dist/checkbox.js +1 -1
  38. package/dist/checkbox.js.map +1 -1
  39. package/dist/code-block.d.ts +254 -237
  40. package/dist/code-block.js +3 -3
  41. package/dist/code-block.js.map +1 -1
  42. package/dist/code.d.ts +5 -3
  43. package/dist/code.js +1 -1
  44. package/dist/code.js.map +1 -1
  45. package/dist/color.d.ts +2 -38
  46. package/dist/color.js +1 -1
  47. package/dist/color.js.map +1 -1
  48. package/dist/combobox.d.ts +172 -167
  49. package/dist/combobox.js +1 -1
  50. package/dist/combobox.js.map +1 -1
  51. package/dist/command.d.ts +234 -227
  52. package/dist/command.js +1 -1
  53. package/dist/command.js.map +1 -1
  54. package/dist/compose-refs-DeIsFv68.js +2 -0
  55. package/dist/compose-refs-DeIsFv68.js.map +1 -0
  56. package/dist/cx-bKromGBh.js +2 -0
  57. package/dist/cx-bKromGBh.js.map +1 -0
  58. package/dist/cx.d.ts +4 -2
  59. package/dist/cx.js +1 -2
  60. package/dist/data-table.d.ts +211 -184
  61. package/dist/data-table.js +1 -1
  62. package/dist/data-table.js.map +1 -1
  63. package/dist/deep-non-nullable-BLM3Gz0I.d.ts +8 -0
  64. package/dist/description-list.d.ts +61 -59
  65. package/dist/description-list.js +1 -1
  66. package/dist/description-list.js.map +1 -1
  67. package/dist/dialog-BuD_JQf_.d.ts +422 -0
  68. package/dist/dialog-CGBjHvo_.js +2 -0
  69. package/dist/dialog-CGBjHvo_.js.map +1 -0
  70. package/dist/dialog.d.ts +3 -410
  71. package/dist/dialog.js +1 -2
  72. package/dist/direction-DfrtFTny.js +2 -0
  73. package/dist/direction-DfrtFTny.js.map +1 -0
  74. package/dist/{direction-DHheuUag.d.ts → direction-deXpJFDZ.d.ts} +9 -7
  75. package/dist/dropdown-menu-CjOaj-Ap.js +2 -0
  76. package/dist/dropdown-menu-CjOaj-Ap.js.map +1 -0
  77. package/dist/dropdown-menu-D_ZoY1AH.d.ts +330 -0
  78. package/dist/dropdown-menu.d.ts +2 -325
  79. package/dist/dropdown-menu.js +1 -2
  80. package/dist/flag.d.ts +31 -22
  81. package/dist/flag.js +1 -1
  82. package/dist/flag.js.map +1 -1
  83. package/dist/hooks.d.ts +116 -50
  84. package/dist/hooks.js +1 -1
  85. package/dist/hooks.js.map +1 -1
  86. package/dist/hover-card.d.ts +97 -91
  87. package/dist/hover-card.js +1 -1
  88. package/dist/hover-card.js.map +1 -1
  89. package/dist/{icon-DXTMiV1L.d.ts → icon-B1XLv02t.d.ts} +11 -9
  90. package/dist/icon-B5oNYYrJ.js +2 -0
  91. package/dist/icon-B5oNYYrJ.js.map +1 -0
  92. package/dist/icon-button-2r6S3HVA.d.ts +98 -0
  93. package/dist/icon-button-D4e9-dq-.js +2 -0
  94. package/dist/icon-button-D4e9-dq-.js.map +1 -0
  95. package/dist/icon.d.ts +4 -4
  96. package/dist/icon.js +1 -2
  97. package/dist/icons.d.ts +54 -41
  98. package/dist/icons.js +1 -1
  99. package/dist/icons.js.map +1 -1
  100. package/dist/{in-view-aHeQHaUj.d.ts → in-view-CTQRT44m.d.ts} +29 -22
  101. package/dist/in-view-bPnaWEL4.js +2 -0
  102. package/dist/in-view-bPnaWEL4.js.map +1 -0
  103. package/dist/index-BLCvtjLi.d.ts +40 -0
  104. package/dist/index-DWqhfw9n.d.ts +103 -0
  105. package/dist/{button-group-BFnqgdtl.d.ts → index-ViSCOUrU.d.ts} +10 -8
  106. package/dist/index-s8rMcilU.d.ts +47 -0
  107. package/dist/input.d.ts +3 -100
  108. package/dist/input.js +1 -1
  109. package/dist/input.js.map +1 -1
  110. package/dist/is-input-BFR8yMM7.js +2 -0
  111. package/dist/is-input-BFR8yMM7.js.map +1 -0
  112. package/dist/kbd-pyj32aN4.js +2 -0
  113. package/dist/kbd-pyj32aN4.js.map +1 -0
  114. package/dist/kbd.d.ts +10 -4
  115. package/dist/kbd.js +1 -2
  116. package/dist/label.d.ts +8 -6
  117. package/dist/label.js +1 -1
  118. package/dist/label.js.map +1 -1
  119. package/dist/media-object.d.ts +70 -68
  120. package/dist/media-object.js +1 -1
  121. package/dist/media-object.js.map +1 -1
  122. package/dist/multi-select.d.ts +278 -0
  123. package/dist/multi-select.js +2 -0
  124. package/dist/multi-select.js.map +1 -0
  125. package/dist/pagination.d.ts +168 -164
  126. package/dist/pagination.js +1 -1
  127. package/dist/pagination.js.map +1 -1
  128. package/dist/popover.d.ts +119 -117
  129. package/dist/popover.js +1 -1
  130. package/dist/popover.js.map +1 -1
  131. package/dist/primitive-W5Izf14l.js +2 -0
  132. package/dist/primitive-W5Izf14l.js.map +1 -0
  133. package/dist/primitive-tuHqhoRE.d.ts +16 -0
  134. package/dist/progress.d.ts +175 -150
  135. package/dist/progress.js +1 -1
  136. package/dist/progress.js.map +1 -1
  137. package/dist/radio-group.d.ts +246 -230
  138. package/dist/radio-group.js +1 -1
  139. package/dist/radio-group.js.map +1 -1
  140. package/dist/sandboxed-on-click.d.ts +36 -31
  141. package/dist/sandboxed-on-click.js +1 -1
  142. package/dist/sandboxed-on-click.js.map +1 -1
  143. package/dist/select-39Jfc1Cb.d.ts +265 -0
  144. package/dist/select-DZ2ztBkI.js +2 -0
  145. package/dist/select-DZ2ztBkI.js.map +1 -0
  146. package/dist/select.d.ts +2 -263
  147. package/dist/select.js +1 -2
  148. package/dist/separator-BcCNbHBg.js +2 -0
  149. package/dist/separator-BcCNbHBg.js.map +1 -0
  150. package/dist/separator.d.ts +28 -21
  151. package/dist/separator.js +1 -2
  152. package/dist/sheet.d.ts +319 -305
  153. package/dist/sheet.js +1 -1
  154. package/dist/sheet.js.map +1 -1
  155. package/dist/skeleton.d.ts +8 -6
  156. package/dist/skeleton.js +1 -1
  157. package/dist/skeleton.js.map +1 -1
  158. package/dist/slider.d.ts +48 -35
  159. package/dist/slider.js +1 -1
  160. package/dist/slider.js.map +1 -1
  161. package/dist/slot-DdnjeV2n.js +2 -0
  162. package/dist/slot-DdnjeV2n.js.map +1 -0
  163. package/dist/slot.d.ts +6 -4
  164. package/dist/slot.js +1 -2
  165. package/dist/sort-CfPsu1Gs.js +2 -0
  166. package/dist/sort-CfPsu1Gs.js.map +1 -0
  167. package/dist/split-button.d.ts +158 -162
  168. package/dist/split-button.js +1 -1
  169. package/dist/split-button.js.map +1 -1
  170. package/dist/svg-only-BVLlbQ4e.js +2 -0
  171. package/dist/svg-only-BVLlbQ4e.js.map +1 -0
  172. package/dist/{svg-only-Cp8Mu_sh.d.ts → svg-only-Dti1FvNV.d.ts} +11 -9
  173. package/dist/switch.d.ts +10 -8
  174. package/dist/switch.js +1 -1
  175. package/dist/switch.js.map +1 -1
  176. package/dist/table-BWMp12sl.js +2 -0
  177. package/dist/table-BWMp12sl.js.map +1 -0
  178. package/dist/table-Dpt192qt.d.ts +398 -0
  179. package/dist/table.d.ts +2 -396
  180. package/dist/table.js +1 -2
  181. package/dist/tabs.d.ts +110 -104
  182. package/dist/tabs.js +1 -1
  183. package/dist/tabs.js.map +1 -1
  184. package/dist/text-area.d.ts +10 -8
  185. package/dist/text-area.js +1 -1
  186. package/dist/text-area.js.map +1 -1
  187. package/dist/theme-provider-CbzLgte1.js +2 -0
  188. package/dist/theme-provider-CbzLgte1.js.map +1 -0
  189. package/dist/theme.d.ts +65 -38
  190. package/dist/theme.js +1 -2
  191. package/dist/{themes-Bi46K9ZW.d.ts → themes-ClppRAGt.d.ts} +4 -2
  192. package/dist/toast-B4gxB8U0.js +2 -0
  193. package/dist/toast-B4gxB8U0.js.map +1 -0
  194. package/dist/toast.d.ts +95 -87
  195. package/dist/toast.js +1 -2
  196. package/dist/tooltip.d.ts +78 -73
  197. package/dist/tooltip.js +1 -1
  198. package/dist/tooltip.js.map +1 -1
  199. package/dist/{chunk-W2YQRWR5.js → traffic-policy-file-QnF-2YkY.js} +2 -2
  200. package/dist/traffic-policy-file-QnF-2YkY.js.map +1 -0
  201. package/dist/types-884RJJqm.js +2 -0
  202. package/dist/types-884RJJqm.js.map +1 -0
  203. package/dist/{types-DehRoXC5.d.ts → types-DgXUgkpc.d.ts} +38 -36
  204. package/dist/types-Dh4BVhXC.d.ts +9 -0
  205. package/dist/types.d.ts +6 -49
  206. package/dist/types.js +1 -2
  207. package/dist/use-copy-to-clipboard-BEbQOKHc.js +2 -0
  208. package/dist/use-copy-to-clipboard-BEbQOKHc.js.map +1 -0
  209. package/dist/use-matches-media-query-BxTQ5f4i.js +2 -0
  210. package/dist/use-matches-media-query-BxTQ5f4i.js.map +1 -0
  211. package/dist/use-prefers-reduced-motion-BPlsKyCJ.js +2 -0
  212. package/dist/use-prefers-reduced-motion-BPlsKyCJ.js.map +1 -0
  213. package/dist/utils.d.ts +6 -5
  214. package/dist/utils.js +1 -1
  215. package/dist/utils.js.map +1 -1
  216. package/dist/variant-props-UE-phTwh.d.ts +13 -0
  217. package/dist/with-style-props-D1QFTzj6.d.ts +29 -0
  218. package/package.json +15 -7
  219. package/dist/as-child-DJ7x3JFV.d.ts +0 -21
  220. package/dist/browser-only.js.map +0 -1
  221. package/dist/button-DLUUf_c-.d.ts +0 -173
  222. package/dist/button.js.map +0 -1
  223. package/dist/chunk-63ZAW25Z.js +0 -2
  224. package/dist/chunk-63ZAW25Z.js.map +0 -1
  225. package/dist/chunk-6J7D73WA.js +0 -2
  226. package/dist/chunk-6J7D73WA.js.map +0 -1
  227. package/dist/chunk-72TJUKMV.js +0 -1
  228. package/dist/chunk-72TJUKMV.js.map +0 -1
  229. package/dist/chunk-7MJQGBE4.js +0 -2
  230. package/dist/chunk-7MJQGBE4.js.map +0 -1
  231. package/dist/chunk-7YLII2US.js +0 -2
  232. package/dist/chunk-7YLII2US.js.map +0 -1
  233. package/dist/chunk-ADF5DAYG.js +0 -2
  234. package/dist/chunk-ADF5DAYG.js.map +0 -1
  235. package/dist/chunk-CBRSMQ26.js +0 -2
  236. package/dist/chunk-CBRSMQ26.js.map +0 -1
  237. package/dist/chunk-COQIVAQH.js +0 -2
  238. package/dist/chunk-COQIVAQH.js.map +0 -1
  239. package/dist/chunk-EIEPGCIG.js +0 -2
  240. package/dist/chunk-EIEPGCIG.js.map +0 -1
  241. package/dist/chunk-ELZLLG6G.js +0 -2
  242. package/dist/chunk-ELZLLG6G.js.map +0 -1
  243. package/dist/chunk-EYZYDUS2.js +0 -2
  244. package/dist/chunk-EYZYDUS2.js.map +0 -1
  245. package/dist/chunk-HF3KJHO3.js +0 -2
  246. package/dist/chunk-HF3KJHO3.js.map +0 -1
  247. package/dist/chunk-HKSO72E5.js +0 -2
  248. package/dist/chunk-HKSO72E5.js.map +0 -1
  249. package/dist/chunk-HL2HWYKP.js +0 -2
  250. package/dist/chunk-HL2HWYKP.js.map +0 -1
  251. package/dist/chunk-IVQ626TU.js +0 -2
  252. package/dist/chunk-IVQ626TU.js.map +0 -1
  253. package/dist/chunk-JQ5D5YZR.js +0 -2
  254. package/dist/chunk-JQ5D5YZR.js.map +0 -1
  255. package/dist/chunk-KCF3KPUB.js +0 -2
  256. package/dist/chunk-KCF3KPUB.js.map +0 -1
  257. package/dist/chunk-KMNACVH6.js +0 -2
  258. package/dist/chunk-KMNACVH6.js.map +0 -1
  259. package/dist/chunk-MLXONRJD.js +0 -2
  260. package/dist/chunk-MLXONRJD.js.map +0 -1
  261. package/dist/chunk-NJNFZ2EG.js +0 -2
  262. package/dist/chunk-NJNFZ2EG.js.map +0 -1
  263. package/dist/chunk-OHPGAB7U.js +0 -2
  264. package/dist/chunk-OHPGAB7U.js.map +0 -1
  265. package/dist/chunk-OP6JMBKJ.js +0 -2
  266. package/dist/chunk-OP6JMBKJ.js.map +0 -1
  267. package/dist/chunk-PFXFESEN.js +0 -2
  268. package/dist/chunk-PFXFESEN.js.map +0 -1
  269. package/dist/chunk-PNL7JOXI.js +0 -2
  270. package/dist/chunk-PNL7JOXI.js.map +0 -1
  271. package/dist/chunk-RED6SFAV.js +0 -2
  272. package/dist/chunk-RED6SFAV.js.map +0 -1
  273. package/dist/chunk-SBQHQ2SJ.js +0 -2
  274. package/dist/chunk-SBQHQ2SJ.js.map +0 -1
  275. package/dist/chunk-W2YQRWR5.js.map +0 -1
  276. package/dist/chunk-W5A5HSFE.js +0 -2
  277. package/dist/chunk-W5A5HSFE.js.map +0 -1
  278. package/dist/chunk-YPAUKPCE.js +0 -2
  279. package/dist/chunk-YPAUKPCE.js.map +0 -1
  280. package/dist/cx.js.map +0 -1
  281. package/dist/deep-non-nullable-SmpSvoSd.d.ts +0 -8
  282. package/dist/dialog.js.map +0 -1
  283. package/dist/dropdown-menu.js.map +0 -1
  284. package/dist/icon-button-CT71Ti9V.d.ts +0 -96
  285. package/dist/icon.js.map +0 -1
  286. package/dist/kbd.js.map +0 -1
  287. package/dist/primitive-CBR_XmVa.d.ts +0 -14
  288. package/dist/select.js.map +0 -1
  289. package/dist/separator.js.map +0 -1
  290. package/dist/slot.js.map +0 -1
  291. package/dist/table.js.map +0 -1
  292. package/dist/theme.js.map +0 -1
  293. package/dist/toast.js.map +0 -1
  294. package/dist/types-BuKAGhC-.d.ts +0 -7
  295. package/dist/types.js.map +0 -1
  296. package/dist/variant-props-oDo2u-We.d.ts +0 -11
  297. package/dist/with-style-props-VnLWm0Yd.d.ts +0 -27
@@ -1,21 +1,22 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import * as react from 'react';
3
- import { ReactNode, HTMLAttributes } from 'react';
4
- import { RadioProps, RadioGroupProps } from '@headlessui/react';
5
- import { W as WithAsChild } from './as-child-DJ7x3JFV.js';
1
+ import { t as WithAsChild } from "./as-child-XMVTepJu.js";
2
+ import * as react from "react";
3
+ import { HTMLAttributes, ReactNode } from "react";
4
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
5
+ import { RadioGroupProps, RadioProps } from "@headlessui/react";
6
6
 
7
+ //#region src/components/radio-group/radio-group.d.ts
7
8
  /**
8
9
  * The shape of the radio state context.
9
10
  */
10
11
  type RadioStateContextValue = {
11
- autofocus: boolean;
12
- checked: boolean;
13
- disabled: boolean;
14
- focus: boolean;
15
- hover: boolean;
12
+ autofocus: boolean;
13
+ checked: boolean;
14
+ disabled: boolean;
15
+ focus: boolean;
16
+ hover: boolean;
16
17
  };
17
18
  type RadioIndicatorProps = Omit<HTMLAttributes<HTMLDivElement>, "children"> & {
18
- children?: ReactNode | ((context: RadioStateContextValue) => ReactNode);
19
+ children?: ReactNode | ((context: RadioStateContextValue) => ReactNode);
19
20
  };
20
21
  type RadioItemContentProps = HTMLAttributes<HTMLDivElement> & WithAsChild;
21
22
  type RadioInputSandboxProps = HTMLAttributes<HTMLDivElement>;
@@ -39,224 +40,239 @@ type RadioInputSandboxProps = HTMLAttributes<HTMLDivElement>;
39
40
  * ```
40
41
  */
41
42
  declare const RadioGroup: {
42
- /**
43
- * A radio button that is used inside a RadioGroup.ButtonGroup for inline grouped radio options.
44
- *
45
- * @see https://mantle.ngrok.com/components/radio-group#radiogroupbutton
46
- *
47
- * @example
48
- * ```tsx
49
- * <RadioGroup.Root defaultValue="option1">
50
- * <RadioGroup.ButtonGroup>
51
- * <RadioGroup.Button value="option1">Option 1</RadioGroup.Button>
52
- * <RadioGroup.Button value="option2">Option 2</RadioGroup.Button>
53
- * <RadioGroup.Button value="option3">Option 3</RadioGroup.Button>
54
- * </RadioGroup.ButtonGroup>
55
- * </RadioGroup.Root>
56
- * ```
57
- */
58
- readonly Button: react.ForwardRefExoticComponent<Omit<RadioProps, "children"> & {
59
- children?: ReactNode | undefined;
60
- } & react.RefAttributes<HTMLDivElement>>;
61
- /**
62
- * An inline group of radio buttons. Use RadioGroup.Button as direct children for horizontal radio layouts.
63
- *
64
- * @see https://mantle.ngrok.com/components/radio-group#radiogroupbuttongroup
65
- *
66
- * @example
67
- * ```tsx
68
- * <RadioGroup.Root defaultValue="small">
69
- * <Label htmlFor="size-group">Size</Label>
70
- * <RadioGroup.ButtonGroup>
71
- * <RadioGroup.Button value="small">Small</RadioGroup.Button>
72
- * <RadioGroup.Button value="medium">Medium</RadioGroup.Button>
73
- * <RadioGroup.Button value="large">Large</RadioGroup.Button>
74
- * </RadioGroup.ButtonGroup>
75
- * </RadioGroup.Root>
76
- * ```
77
- */
78
- readonly ButtonGroup: react.ForwardRefExoticComponent<Omit<RadioGroupProps, "children" | "as"> & {
79
- children?: ReactNode | undefined;
80
- } & react.RefAttributes<HTMLElement>>;
81
- /**
82
- * A radio card item with enhanced styling. Use it as a child of RadioGroup for card-based radio options.
83
- *
84
- * @see https://mantle.ngrok.com/components/radio-group#radiogroupcard
85
- *
86
- * @example
87
- * ```tsx
88
- * <RadioGroup.Root defaultValue="basic">
89
- * <div className="space-y-3">
90
- * <RadioGroup.Card value="basic">
91
- * <RadioGroup.ItemContent>
92
- * <Text weight="strong">Basic Plan</Text>
93
- * <Text>$10/month</Text>
94
- * </RadioGroup.ItemContent>
95
- * </RadioGroup.Card>
96
- * <RadioGroup.Card value="pro">
97
- * <RadioGroup.ItemContent>
98
- * <Text weight="strong">Pro Plan</Text>
99
- * <Text>$25/month</Text>
100
- * </RadioGroup.ItemContent>
101
- * </RadioGroup.Card>
102
- * </div>
103
- * </RadioGroup.Root>
104
- * ```
105
- */
106
- readonly Card: react.ForwardRefExoticComponent<Omit<RadioProps, "children"> & {
107
- children?: ReactNode | undefined;
108
- } & react.RefAttributes<HTMLDivElement>>;
109
- /**
110
- * The selection indicator for any radio item. Shows the checked state with customizable appearance.
111
- *
112
- * @see https://mantle.ngrok.com/components/radio-group#radiogroupindicator
113
- *
114
- * @example
115
- * ```tsx
116
- * <RadioGroup.Item value="option1">
117
- * <RadioGroup.Indicator />
118
- * <span>Option 1</span>
119
- * </RadioGroup.Item>
120
- * ```
121
- */
122
- readonly Indicator: {
123
- ({ children, className, ...props }: RadioIndicatorProps): react_jsx_runtime.JSX.Element;
124
- displayName: string;
125
- };
126
- /**
127
- * A sandbox container for input elements composed within radio group items. Prevents default radio behavior.
128
- *
129
- * @see https://mantle.ngrok.com/components/radio-group#radiogroupinputsandbox
130
- *
131
- * @example
132
- * ```tsx
133
- * <RadioGroup.Root defaultValue="custom">
134
- * <RadioGroup.Item value="custom">
135
- * <RadioGroup.Indicator />
136
- * <RadioGroup.ItemContent>
137
- * <Text>Custom amount</Text>
138
- * <RadioGroup.InputSandbox>
139
- * <Input type="number" placeholder="Enter amount" />
140
- * </RadioGroup.InputSandbox>
141
- * </RadioGroup.ItemContent>
142
- * </RadioGroup.Item>
143
- * </RadioGroup.Root>
144
- * ```
145
- */
146
- readonly InputSandbox: {
147
- ({ children, onClick, onKeyDown, ...props }: RadioInputSandboxProps): react_jsx_runtime.JSX.Element;
148
- displayName: string;
149
- };
150
- /**
151
- * A simple radio item that can be used inside a radio group. The conventional use-case for basic radio options.
152
- *
153
- * @see https://mantle.ngrok.com/components/radio-group#radiogroupitem
154
- *
155
- * @example
156
- * ```tsx
157
- * <RadioGroup.Item value="option1">
158
- * <RadioGroup.Indicator />
159
- * <span>Option 1</span>
160
- * </RadioGroup.Item>
161
- * ```
162
- */
163
- readonly Item: react.ForwardRefExoticComponent<Omit<RadioProps, "children"> & {
164
- children?: ReactNode | undefined;
165
- } & react.RefAttributes<HTMLDivElement>>;
166
- /**
167
- * The content wrapper for any radio item. Use it to wrap labels, descriptions, or content of a radio item.
168
- *
169
- * @see https://mantle.ngrok.com/components/radio-group#radiogroupitemcontent
170
- *
171
- * @example
172
- * ```tsx
173
- * <RadioGroup.Root defaultValue="option1">
174
- * <RadioGroup.Item value="option1">
175
- * <RadioGroup.Indicator />
176
- * <RadioGroup.ItemContent>
177
- * <Text weight="strong">Option 1</Text>
178
- * <Text size="sm">Description for option 1</Text>
179
- * </RadioGroup.ItemContent>
180
- * </RadioGroup.Item>
181
- * </RadioGroup.Root>
182
- * ```
183
- */
184
- readonly ItemContent: {
185
- ({ asChild, children, className, ...props }: RadioItemContentProps): react_jsx_runtime.JSX.Element;
186
- displayName: string;
187
- };
188
- /**
189
- * A group of radio list items with connected borders. Use RadioGroup.ListItem as direct children.
190
- *
191
- * @see https://mantle.ngrok.com/components/radio-group#radiogrouplist
192
- *
193
- * @example
194
- * ```tsx
195
- * <RadioGroup.Root defaultValue="option1">
196
- * <RadioGroup.List>
197
- * <RadioGroup.ListItem value="option1">
198
- * <RadioGroup.ItemContent>
199
- * <Text>Option 1</Text>
200
- * </RadioGroup.ItemContent>
201
- * </RadioGroup.ListItem>
202
- * <RadioGroup.ListItem value="option2">
203
- * <RadioGroup.ItemContent>
204
- * <Text>Option 2</Text>
205
- * </RadioGroup.ItemContent>
206
- * </RadioGroup.ListItem>
207
- * </RadioGroup.List>
208
- * </RadioGroup.Root>
209
- * ```
210
- */
211
- readonly List: react.ForwardRefExoticComponent<Omit<RadioGroupProps, "children" | "as"> & {
212
- children?: ReactNode | undefined;
213
- } & react.RefAttributes<HTMLElement>>;
214
- /**
215
- * A radio list item that is used inside a RadioGroup.List for connected list-style radio options.
216
- *
217
- * @see https://mantle.ngrok.com/components/radio-group#radiogrouplistitem
218
- *
219
- * @example
220
- * ```tsx
221
- * <RadioGroup.Root defaultValue="item1">
222
- * <RadioGroup.List>
223
- * <RadioGroup.ListItem value="item1">
224
- * <RadioGroup.ItemContent>
225
- * <Text>List Item 1</Text>
226
- * <Text size="sm" className="text-muted">First option</Text>
227
- * </RadioGroup.ItemContent>
228
- * </RadioGroup.ListItem>
229
- * <RadioGroup.ListItem value="item2">
230
- * <RadioGroup.ItemContent>
231
- * <Text>List Item 2</Text>
232
- * <Text size="sm" className="text-muted">Second option</Text>
233
- * </RadioGroup.ItemContent>
234
- * </RadioGroup.ListItem>
235
- * </RadioGroup.List>
236
- * </RadioGroup.Root>
237
- * ```
238
- */
239
- readonly ListItem: react.ForwardRefExoticComponent<Omit<RadioProps, "children"> & {
240
- children?: ReactNode | undefined;
241
- } & react.RefAttributes<HTMLDivElement>>;
242
- /**
243
- * The root radio group component. Manages the state of the children radios where only one can be selected.
244
- *
245
- * @see https://mantle.ngrok.com/components/radio-group#radiogrouproot
246
- *
247
- * @example
248
- * ```tsx
249
- * <RadioGroup.Root value={value} onValueChange={setValue}>
250
- * <RadioGroup.Item value="option1">
251
- * <RadioGroup.Indicator />
252
- * <span>Option 1</span>
253
- * </RadioGroup.Item>
254
- * </RadioGroup.Root>
255
- * ```
256
- */
257
- readonly Root: react.ForwardRefExoticComponent<Omit<RadioGroupProps, "children" | "as"> & {
258
- children?: ReactNode | undefined;
259
- } & react.RefAttributes<HTMLElement>>;
43
+ /**
44
+ * A radio button that is used inside a RadioGroup.ButtonGroup for inline grouped radio options.
45
+ *
46
+ * @see https://mantle.ngrok.com/components/radio-group#radiogroupbutton
47
+ *
48
+ * @example
49
+ * ```tsx
50
+ * <RadioGroup.Root defaultValue="option1">
51
+ * <RadioGroup.ButtonGroup>
52
+ * <RadioGroup.Button value="option1">Option 1</RadioGroup.Button>
53
+ * <RadioGroup.Button value="option2">Option 2</RadioGroup.Button>
54
+ * <RadioGroup.Button value="option3">Option 3</RadioGroup.Button>
55
+ * </RadioGroup.ButtonGroup>
56
+ * </RadioGroup.Root>
57
+ * ```
58
+ */
59
+ readonly Button: react.ForwardRefExoticComponent<Omit<RadioProps, "children"> & {
60
+ children?: ReactNode | undefined;
61
+ } & react.RefAttributes<HTMLDivElement>>;
62
+ /**
63
+ * An inline group of radio buttons. Use RadioGroup.Button as direct children for horizontal radio layouts.
64
+ *
65
+ * @see https://mantle.ngrok.com/components/radio-group#radiogroupbuttongroup
66
+ *
67
+ * @example
68
+ * ```tsx
69
+ * <RadioGroup.Root defaultValue="small">
70
+ * <Label htmlFor="size-group">Size</Label>
71
+ * <RadioGroup.ButtonGroup>
72
+ * <RadioGroup.Button value="small">Small</RadioGroup.Button>
73
+ * <RadioGroup.Button value="medium">Medium</RadioGroup.Button>
74
+ * <RadioGroup.Button value="large">Large</RadioGroup.Button>
75
+ * </RadioGroup.ButtonGroup>
76
+ * </RadioGroup.Root>
77
+ * ```
78
+ */
79
+ readonly ButtonGroup: react.ForwardRefExoticComponent<Omit<RadioGroupProps, "children" | "as"> & {
80
+ children?: ReactNode | undefined;
81
+ } & react.RefAttributes<HTMLElement>>;
82
+ /**
83
+ * A radio card item with enhanced styling. Use it as a child of RadioGroup for card-based radio options.
84
+ *
85
+ * @see https://mantle.ngrok.com/components/radio-group#radiogroupcard
86
+ *
87
+ * @example
88
+ * ```tsx
89
+ * <RadioGroup.Root defaultValue="basic">
90
+ * <div className="space-y-3">
91
+ * <RadioGroup.Card value="basic">
92
+ * <RadioGroup.ItemContent>
93
+ * <Text weight="strong">Basic Plan</Text>
94
+ * <Text>$10/month</Text>
95
+ * </RadioGroup.ItemContent>
96
+ * </RadioGroup.Card>
97
+ * <RadioGroup.Card value="pro">
98
+ * <RadioGroup.ItemContent>
99
+ * <Text weight="strong">Pro Plan</Text>
100
+ * <Text>$25/month</Text>
101
+ * </RadioGroup.ItemContent>
102
+ * </RadioGroup.Card>
103
+ * </div>
104
+ * </RadioGroup.Root>
105
+ * ```
106
+ */
107
+ readonly Card: react.ForwardRefExoticComponent<Omit<RadioProps, "children"> & {
108
+ children?: ReactNode | undefined;
109
+ } & react.RefAttributes<HTMLDivElement>>;
110
+ /**
111
+ * The selection indicator for any radio item. Shows the checked state with customizable appearance.
112
+ *
113
+ * @see https://mantle.ngrok.com/components/radio-group#radiogroupindicator
114
+ *
115
+ * @example
116
+ * ```tsx
117
+ * <RadioGroup.Item value="option1">
118
+ * <RadioGroup.Indicator />
119
+ * <span>Option 1</span>
120
+ * </RadioGroup.Item>
121
+ * ```
122
+ */
123
+ readonly Indicator: {
124
+ ({
125
+ children,
126
+ className,
127
+ ...props
128
+ }: RadioIndicatorProps): react_jsx_runtime0.JSX.Element;
129
+ displayName: string;
130
+ };
131
+ /**
132
+ * A sandbox container for input elements composed within radio group items. Prevents default radio behavior.
133
+ *
134
+ * @see https://mantle.ngrok.com/components/radio-group#radiogroupinputsandbox
135
+ *
136
+ * @example
137
+ * ```tsx
138
+ * <RadioGroup.Root defaultValue="custom">
139
+ * <RadioGroup.Item value="custom">
140
+ * <RadioGroup.Indicator />
141
+ * <RadioGroup.ItemContent>
142
+ * <Text>Custom amount</Text>
143
+ * <RadioGroup.InputSandbox>
144
+ * <Input type="number" placeholder="Enter amount" />
145
+ * </RadioGroup.InputSandbox>
146
+ * </RadioGroup.ItemContent>
147
+ * </RadioGroup.Item>
148
+ * </RadioGroup.Root>
149
+ * ```
150
+ */
151
+ readonly InputSandbox: {
152
+ ({
153
+ children,
154
+ onClick,
155
+ onKeyDown,
156
+ ...props
157
+ }: RadioInputSandboxProps): react_jsx_runtime0.JSX.Element;
158
+ displayName: string;
159
+ };
160
+ /**
161
+ * A simple radio item that can be used inside a radio group. The conventional use-case for basic radio options.
162
+ *
163
+ * @see https://mantle.ngrok.com/components/radio-group#radiogroupitem
164
+ *
165
+ * @example
166
+ * ```tsx
167
+ * <RadioGroup.Item value="option1">
168
+ * <RadioGroup.Indicator />
169
+ * <span>Option 1</span>
170
+ * </RadioGroup.Item>
171
+ * ```
172
+ */
173
+ readonly Item: react.ForwardRefExoticComponent<Omit<RadioProps, "children"> & {
174
+ children?: ReactNode | undefined;
175
+ } & react.RefAttributes<HTMLDivElement>>;
176
+ /**
177
+ * The content wrapper for any radio item. Use it to wrap labels, descriptions, or content of a radio item.
178
+ *
179
+ * @see https://mantle.ngrok.com/components/radio-group#radiogroupitemcontent
180
+ *
181
+ * @example
182
+ * ```tsx
183
+ * <RadioGroup.Root defaultValue="option1">
184
+ * <RadioGroup.Item value="option1">
185
+ * <RadioGroup.Indicator />
186
+ * <RadioGroup.ItemContent>
187
+ * <Text weight="strong">Option 1</Text>
188
+ * <Text size="sm">Description for option 1</Text>
189
+ * </RadioGroup.ItemContent>
190
+ * </RadioGroup.Item>
191
+ * </RadioGroup.Root>
192
+ * ```
193
+ */
194
+ readonly ItemContent: {
195
+ ({
196
+ asChild,
197
+ children,
198
+ className,
199
+ ...props
200
+ }: RadioItemContentProps): react_jsx_runtime0.JSX.Element;
201
+ displayName: string;
202
+ };
203
+ /**
204
+ * A group of radio list items with connected borders. Use RadioGroup.ListItem as direct children.
205
+ *
206
+ * @see https://mantle.ngrok.com/components/radio-group#radiogrouplist
207
+ *
208
+ * @example
209
+ * ```tsx
210
+ * <RadioGroup.Root defaultValue="option1">
211
+ * <RadioGroup.List>
212
+ * <RadioGroup.ListItem value="option1">
213
+ * <RadioGroup.ItemContent>
214
+ * <Text>Option 1</Text>
215
+ * </RadioGroup.ItemContent>
216
+ * </RadioGroup.ListItem>
217
+ * <RadioGroup.ListItem value="option2">
218
+ * <RadioGroup.ItemContent>
219
+ * <Text>Option 2</Text>
220
+ * </RadioGroup.ItemContent>
221
+ * </RadioGroup.ListItem>
222
+ * </RadioGroup.List>
223
+ * </RadioGroup.Root>
224
+ * ```
225
+ */
226
+ readonly List: react.ForwardRefExoticComponent<Omit<RadioGroupProps, "children" | "as"> & {
227
+ children?: ReactNode | undefined;
228
+ } & react.RefAttributes<HTMLElement>>;
229
+ /**
230
+ * A radio list item that is used inside a RadioGroup.List for connected list-style radio options.
231
+ *
232
+ * @see https://mantle.ngrok.com/components/radio-group#radiogrouplistitem
233
+ *
234
+ * @example
235
+ * ```tsx
236
+ * <RadioGroup.Root defaultValue="item1">
237
+ * <RadioGroup.List>
238
+ * <RadioGroup.ListItem value="item1">
239
+ * <RadioGroup.ItemContent>
240
+ * <Text>List Item 1</Text>
241
+ * <Text size="sm" className="text-muted">First option</Text>
242
+ * </RadioGroup.ItemContent>
243
+ * </RadioGroup.ListItem>
244
+ * <RadioGroup.ListItem value="item2">
245
+ * <RadioGroup.ItemContent>
246
+ * <Text>List Item 2</Text>
247
+ * <Text size="sm" className="text-muted">Second option</Text>
248
+ * </RadioGroup.ItemContent>
249
+ * </RadioGroup.ListItem>
250
+ * </RadioGroup.List>
251
+ * </RadioGroup.Root>
252
+ * ```
253
+ */
254
+ readonly ListItem: react.ForwardRefExoticComponent<Omit<RadioProps, "children"> & {
255
+ children?: ReactNode | undefined;
256
+ } & react.RefAttributes<HTMLDivElement>>;
257
+ /**
258
+ * The root radio group component. Manages the state of the children radios where only one can be selected.
259
+ *
260
+ * @see https://mantle.ngrok.com/components/radio-group#radiogrouproot
261
+ *
262
+ * @example
263
+ * ```tsx
264
+ * <RadioGroup.Root value={value} onValueChange={setValue}>
265
+ * <RadioGroup.Item value="option1">
266
+ * <RadioGroup.Indicator />
267
+ * <span>Option 1</span>
268
+ * </RadioGroup.Item>
269
+ * </RadioGroup.Root>
270
+ * ```
271
+ */
272
+ readonly Root: react.ForwardRefExoticComponent<Omit<RadioGroupProps, "children" | "as"> & {
273
+ children?: ReactNode | undefined;
274
+ } & react.RefAttributes<HTMLElement>>;
260
275
  };
261
-
276
+ //#endregion
262
277
  export { RadioGroup };
278
+ //# sourceMappingURL=radio-group.d.ts.map
@@ -1,2 +1,2 @@
1
- import{a as v}from"./chunk-EYZYDUS2.js";import{a as y}from"./chunk-ADF5DAYG.js";import{a as l}from"./chunk-PFXFESEN.js";import{Radio as u,RadioGroup as S}from"@headlessui/react";import f from"clsx";import{Children as T,cloneElement as z,createContext as M,forwardRef as s,isValidElement as w,useContext as b,useRef as D}from"react";import{Fragment as h,jsx as a}from"react/jsx-runtime";var m=s((e,o)=>a(S,{...e,ref:o}));m.displayName="RadioGroup";var n=M({autofocus:!1,checked:!1,disabled:!1,focus:!1,hover:!1}),x=s(({children:e,className:o,...r},t)=>a(u,{className:l("group/radio cursor-pointer aria-disabled:cursor-default [&_label]:cursor-inherit flex gap-2 py-1 text-sm focus:outline-hidden",o),as:"div",...r,ref:t,children:i=>a(n.Provider,{value:i,children:e})}));x.displayName="RadioItem";var E=({checked:e,disabled:o,focus:r,hover:t})=>a("span",{className:l("border-form flex size-4 items-center justify-center rounded-full border shrink-0",o&&"cursor-default opacity-50",e&&"border-accent-500 bg-accent-500",r&&!o&&"border-accent-600 ring-focus-accent ring-4",t&&"border-accent-600"),children:e&&a("span",{className:"size-2 rounded-full bg-[#fff] shrink-0"})}),P=({children:e,className:o,...r})=>{let t=b(n);return a("div",{className:l("radio-indicator inline-flex size-5 select-none items-center justify-center shrink-0",o),...r,children:e==null?a(E,{...t}):typeof e=="function"?e(t):e})};P.displayName="RadioIndicator";var C=s(({className:e,...o},r)=>a(m,{className:f("-space-y-px",e),...o,ref:r}));C.displayName="RadioGroupList";var g=s(({children:e,className:o,...r},t)=>a(u,{as:"div",className:l("group/radio border-form [&_label]:cursor-inherit relative flex select-none gap-2 border px-3 py-2 text-sm","cursor-pointer aria-disabled:cursor-default focus:outline-hidden","focus-visible:ring-focus-accent not-aria-disabled:focus-visible:border-accent-600 focus-visible:ring-4","first-of-type:rounded-tl-md first-of-type:rounded-tr-md last-of-type:rounded-bl-md last-of-type:rounded-br-md","aria-disabled:border-form/50 not-aria-disabled:hover:z-1 not-aria-disabled:hover:border-accent-600","aria-checked:z-1 aria-checked:border-accent-500/40 aria-checked:bg-accent-500/10 dark-high-contrast:aria-checked:border-accent-400 high-contrast:aria-checked:border-accent-400 not-aria-disabled:hover:aria-checked:border-accent-600","has-[.radio-indicator:first-child]:pl-2 has-[.radio-indicator:last-child]:pr-2",o),ref:t,...r,children:i=>a(h,{children:a(n.Provider,{value:i,children:e})})}));g.displayName="RadioListItem";var I=s(({children:e,className:o,...r},t)=>a(u,{as:"div",className:f("group/radio border-card bg-card [&_label]:cursor-inherit relative rounded-md border p-4 text-sm","cursor-pointer aria-disabled:cursor-default focus:outline-hidden","focus-visible:ring-focus-accent not-aria-disabled:focus-visible:border-accent-600 focus-visible:ring-4","first-of-type:rounded-tl-md first-of-type:rounded-tr-md last-of-type:rounded-bl-md last-of-type:rounded-br-md","aria-disabled:border-form/50 not-aria-disabled:hover:z-1 not-aria-disabled:hover:border-accent-600","aria-checked:z-1 aria-checked:border-accent-500/40 aria-checked:bg-accent-500/10 not-aria-disabled:hover:aria-checked:border-accent-600 dark-high-contrast:aria-checked:border-accent-400 high-contrast:aria-checked:border-accent-400",o),...r,ref:t,children:i=>a(h,{children:a(n.Provider,{value:i,children:e})})}));I.displayName="RadioCard";var k=({asChild:e=!1,children:o,className:r,...t})=>{let i=b(n);return a(e?y:"div",{className:f("min-w-0 flex-1",i.disabled&&"opacity-50",r),...t,children:o})};k.displayName="RadioItemContent";var N=s(({className:e,...o},r)=>a(m,{className:f("flex flex-row flex-nowrap -space-x-px",e),...o,ref:r}));N.displayName="RadioButtonGroup";var H=s(({children:e,className:o,...r},t)=>a(u,{as:"div",className:l("group/radio border-form [&_label]:cursor-inherit relative flex flex-1 select-none items-center justify-center gap-2 border px-3 text-sm","h-9","focus-visible:ring-focus-accent not-aria-disabled:focus-visible:border-accent-600 focus-visible:ring-4","cursor-pointer aria-disabled:cursor-default focus:outline-hidden","first-of-type:rounded-bl-md first-of-type:rounded-tl-md last-of-type:rounded-br-md last-of-type:rounded-tr-md","not-aria-disabled:hover:z-1 not-aria-disabled:hover:border-accent-600 aria-disabled:opacity-50","aria-checked:z-1 aria-checked:border-accent-500/40 aria-checked:bg-accent-500/10 not-aria-disabled:hover:aria-checked:border-accent-600","has-[.radio-indicator:first-child]:pl-2 has-[.radio-indicator:last-child]:pr-2",o),ref:t,...r,children:i=>a(h,{children:a(n.Provider,{value:i,children:e})})}));H.displayName="RadioButton";var G=({children:e,onClick:o,onKeyDown:r,...t})=>{let i=D(null),c=b(n),p=T.only(e),L=c.disabled||!c.checked;return a("div",{role:"none",ref:i,onKeyDown:d=>{if(c.disabled){d.stopPropagation(),d.preventDefault();return}switch(d.key){case"Enter":case"Tab":break;default:d.stopPropagation()}r?.(d)},onClick:d=>{if(c.disabled){d.stopPropagation(),d.preventDefault();return}let R=d.target;v(R)&&window.requestAnimationFrame(()=>{R.focus()}),o?.(d)},...t,children:w(p)?z(p,{disabled:c.disabled||p.props.disabled,tabIndex:L?-1:p.props.tabIndex}):null})};G.displayName="RadioInputSandbox";var A={Button:H,ButtonGroup:N,Card:I,Indicator:P,InputSandbox:G,Item:x,ItemContent:k,List:C,ListItem:g,Root:m};export{A as RadioGroup};
1
+ import{t as e}from"./cx-bKromGBh.js";import{t}from"./slot-DdnjeV2n.js";import{t as n}from"./is-input-BFR8yMM7.js";import{Children as r,cloneElement as i,createContext as a,forwardRef as o,isValidElement as s,useContext as c,useRef as l}from"react";import u from"clsx";import{Fragment as d,jsx as f}from"react/jsx-runtime";import{Radio as p,RadioGroup as m}from"@headlessui/react";const h=o((e,t)=>f(m,{...e,ref:t}));h.displayName=`RadioGroup`;const g=a({autofocus:!1,checked:!1,disabled:!1,focus:!1,hover:!1}),_=o(({children:t,className:n,...r},i)=>f(p,{className:e(`group/radio cursor-pointer aria-disabled:cursor-default [&_label]:cursor-inherit flex gap-2 py-1 text-sm focus:outline-hidden`,n),as:`div`,...r,ref:i,children:e=>f(g.Provider,{value:e,children:t})}));_.displayName=`RadioItem`;const v=({checked:t,disabled:n,focus:r,hover:i})=>f(`span`,{className:e(`border-form flex size-4 items-center justify-center rounded-full border shrink-0`,n&&`cursor-default opacity-50`,t&&`border-accent-500 bg-accent-500`,r&&!n&&`border-accent-600 ring-focus-accent ring-4`,i&&`border-accent-600`),children:t&&f(`span`,{className:`size-2 rounded-full bg-[#fff] shrink-0`})}),y=({children:t,className:n,...r})=>{let i=c(g);return f(`div`,{className:e(`radio-indicator inline-flex size-5 select-none items-center justify-center shrink-0`,n),...r,children:t==null?f(v,{...i}):typeof t==`function`?t(i):t})};y.displayName=`RadioIndicator`;const b=o(({className:e,...t},n)=>f(h,{className:u(`-space-y-px`,e),...t,ref:n}));b.displayName=`RadioGroupList`;const x=o(({children:t,className:n,...r},i)=>f(p,{as:`div`,className:e(`group/radio border-form [&_label]:cursor-inherit relative flex select-none gap-2 border px-3 py-2 text-sm`,`cursor-pointer aria-disabled:cursor-default focus:outline-hidden`,`focus-visible:ring-focus-accent not-aria-disabled:focus-visible:border-accent-600 focus-visible:ring-4`,`first-of-type:rounded-tl-md first-of-type:rounded-tr-md last-of-type:rounded-bl-md last-of-type:rounded-br-md`,`aria-disabled:border-form/50 not-aria-disabled:hover:z-1 not-aria-disabled:hover:border-accent-600`,`aria-checked:z-1 aria-checked:border-accent-500/40 aria-checked:bg-accent-500/10 dark-high-contrast:aria-checked:border-accent-400 high-contrast:aria-checked:border-accent-400 not-aria-disabled:hover:aria-checked:border-accent-600`,`has-[.radio-indicator:first-child]:pl-2 has-[.radio-indicator:last-child]:pr-2`,n),ref:i,...r,children:e=>f(d,{children:f(g.Provider,{value:e,children:t})})}));x.displayName=`RadioListItem`;const S=o(({children:e,className:t,...n},r)=>f(p,{as:`div`,className:u(`group/radio border-card bg-card [&_label]:cursor-inherit relative rounded-md border p-4 text-sm`,`cursor-pointer aria-disabled:cursor-default focus:outline-hidden`,`focus-visible:ring-focus-accent not-aria-disabled:focus-visible:border-accent-600 focus-visible:ring-4`,`first-of-type:rounded-tl-md first-of-type:rounded-tr-md last-of-type:rounded-bl-md last-of-type:rounded-br-md`,`aria-disabled:border-form/50 not-aria-disabled:hover:z-1 not-aria-disabled:hover:border-accent-600`,`aria-checked:z-1 aria-checked:border-accent-500/40 aria-checked:bg-accent-500/10 not-aria-disabled:hover:aria-checked:border-accent-600 dark-high-contrast:aria-checked:border-accent-400 high-contrast:aria-checked:border-accent-400`,t),...n,ref:r,children:t=>f(d,{children:f(g.Provider,{value:t,children:e})})}));S.displayName=`RadioCard`;const C=({asChild:e=!1,children:n,className:r,...i})=>{let a=c(g);return f(e?t:`div`,{className:u(`min-w-0 flex-1`,a.disabled&&`opacity-50`,r),...i,children:n})};C.displayName=`RadioItemContent`;const w=o(({className:e,...t},n)=>f(h,{className:u(`flex flex-row flex-nowrap -space-x-px`,e),...t,ref:n}));w.displayName=`RadioButtonGroup`;const T=o(({children:t,className:n,...r},i)=>f(p,{as:`div`,className:e(`group/radio border-form [&_label]:cursor-inherit relative flex flex-1 select-none items-center justify-center gap-2 border px-3 text-sm`,`h-9`,`focus-visible:ring-focus-accent not-aria-disabled:focus-visible:border-accent-600 focus-visible:ring-4`,`cursor-pointer aria-disabled:cursor-default focus:outline-hidden`,`first-of-type:rounded-bl-md first-of-type:rounded-tl-md last-of-type:rounded-br-md last-of-type:rounded-tr-md`,`not-aria-disabled:hover:z-1 not-aria-disabled:hover:border-accent-600 aria-disabled:opacity-50`,`aria-checked:z-1 aria-checked:border-accent-500/40 aria-checked:bg-accent-500/10 not-aria-disabled:hover:aria-checked:border-accent-600`,`has-[.radio-indicator:first-child]:pl-2 has-[.radio-indicator:last-child]:pr-2`,n),ref:i,...r,children:e=>f(d,{children:f(g.Provider,{value:e,children:t})})}));T.displayName=`RadioButton`;const E=({children:e,onClick:t,onKeyDown:a,...o})=>{let u=l(null),d=c(g),p=r.only(e),m=d.disabled||!d.checked;return f(`div`,{role:`none`,ref:u,onKeyDown:e=>{if(d.disabled){e.stopPropagation(),e.preventDefault();return}switch(e.key){case`Enter`:case`Tab`:break;default:e.stopPropagation()}a?.(e)},onClick:e=>{if(d.disabled){e.stopPropagation(),e.preventDefault();return}let r=e.target;n(r)&&window.requestAnimationFrame(()=>{r.focus()}),t?.(e)},...o,children:s(p)?i(p,{disabled:d.disabled||p.props.disabled,tabIndex:m?-1:p.props.tabIndex}):null})};E.displayName=`RadioInputSandbox`;const D={Button:T,ButtonGroup:w,Card:S,Indicator:y,InputSandbox:E,Item:_,ItemContent:C,List:b,ListItem:x,Root:h};export{D as RadioGroup};
2
2
  //# sourceMappingURL=radio-group.js.map