@ngrok/mantle 0.66.0 → 0.66.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 (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-QPyyfLaB.js +2 -0
  20. package/dist/browser-only-QPyyfLaB.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-B6StZJsz.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-Cr5u0Eai.js +2 -0
  69. package/dist/dialog-Cr5u0Eai.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 +72 -59
  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 +226 -218
  123. package/dist/multi-select.js +1 -1
  124. package/dist/multi-select.js.map +1 -1
  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-Cath9ASB.js +2 -0
  132. package/dist/primitive-Cath9ASB.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-C8F5nFrJ.js +2 -0
  188. package/dist/theme-provider-C8F5nFrJ.js.map +1 -0
  189. package/dist/theme.d.ts +66 -39
  190. package/dist/theme.js +1 -2
  191. package/dist/{themes-Bi46K9ZW.d.ts → themes-ClppRAGt.d.ts} +4 -2
  192. package/dist/toast-1AuBbrBS.js +2 -0
  193. package/dist/toast-1AuBbrBS.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-CojcYxlA.js +2 -0
  210. package/dist/use-matches-media-query-CojcYxlA.js.map +1 -0
  211. package/dist/use-prefers-reduced-motion-BiG6QGkf.js +2 -0
  212. package/dist/use-prefers-reduced-motion-BiG6QGkf.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 +6 -6
  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-2FYR6IJV.js +0 -2
  224. package/dist/chunk-2FYR6IJV.js.map +0 -1
  225. package/dist/chunk-5VDCC3YW.js +0 -2
  226. package/dist/chunk-5VDCC3YW.js.map +0 -1
  227. package/dist/chunk-63ZAW25Z.js +0 -2
  228. package/dist/chunk-63ZAW25Z.js.map +0 -1
  229. package/dist/chunk-6J7D73WA.js +0 -2
  230. package/dist/chunk-6J7D73WA.js.map +0 -1
  231. package/dist/chunk-72TJUKMV.js +0 -1
  232. package/dist/chunk-72TJUKMV.js.map +0 -1
  233. package/dist/chunk-7MJQGBE4.js +0 -2
  234. package/dist/chunk-7MJQGBE4.js.map +0 -1
  235. package/dist/chunk-7YLII2US.js +0 -2
  236. package/dist/chunk-7YLII2US.js.map +0 -1
  237. package/dist/chunk-ADF5DAYG.js +0 -2
  238. package/dist/chunk-ADF5DAYG.js.map +0 -1
  239. package/dist/chunk-CBRSMQ26.js +0 -2
  240. package/dist/chunk-CBRSMQ26.js.map +0 -1
  241. package/dist/chunk-COQIVAQH.js +0 -2
  242. package/dist/chunk-COQIVAQH.js.map +0 -1
  243. package/dist/chunk-ELZLLG6G.js +0 -2
  244. package/dist/chunk-ELZLLG6G.js.map +0 -1
  245. package/dist/chunk-EVU5XGB4.js +0 -2
  246. package/dist/chunk-EVU5XGB4.js.map +0 -1
  247. package/dist/chunk-EYZYDUS2.js +0 -2
  248. package/dist/chunk-EYZYDUS2.js.map +0 -1
  249. package/dist/chunk-HKSO72E5.js +0 -2
  250. package/dist/chunk-HKSO72E5.js.map +0 -1
  251. package/dist/chunk-HL2HWYKP.js +0 -2
  252. package/dist/chunk-HL2HWYKP.js.map +0 -1
  253. package/dist/chunk-IVQ626TU.js +0 -2
  254. package/dist/chunk-IVQ626TU.js.map +0 -1
  255. package/dist/chunk-JQ5D5YZR.js +0 -2
  256. package/dist/chunk-JQ5D5YZR.js.map +0 -1
  257. package/dist/chunk-LBO5LEYM.js +0 -2
  258. package/dist/chunk-LBO5LEYM.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-OHPGAB7U.js +0 -2
  262. package/dist/chunk-OHPGAB7U.js.map +0 -1
  263. package/dist/chunk-OP6JMBKJ.js +0 -2
  264. package/dist/chunk-OP6JMBKJ.js.map +0 -1
  265. package/dist/chunk-PFXFESEN.js +0 -2
  266. package/dist/chunk-PFXFESEN.js.map +0 -1
  267. package/dist/chunk-PNL7JOXI.js +0 -2
  268. package/dist/chunk-PNL7JOXI.js.map +0 -1
  269. package/dist/chunk-RED6SFAV.js +0 -2
  270. package/dist/chunk-RED6SFAV.js.map +0 -1
  271. package/dist/chunk-SBQHQ2SJ.js +0 -2
  272. package/dist/chunk-SBQHQ2SJ.js.map +0 -1
  273. package/dist/chunk-SGGOH2WW.js +0 -2
  274. package/dist/chunk-SGGOH2WW.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
package/dist/select.d.ts CHANGED
@@ -1,263 +1,2 @@
1
- import { W as WithAsChild } from './as-child-DJ7x3JFV.js';
2
- import * as react from 'react';
3
- import { ReactNode, FocusEvent, SelectHTMLAttributes } from 'react';
4
- import * as SelectPrimitive from '@radix-ui/react-select';
5
- import { W as WithValidation } from './types-DehRoXC5.js';
6
-
7
- type WithAriaInvalid = Pick<SelectHTMLAttributes<HTMLSelectElement>, "aria-invalid">;
8
- /**
9
- * Displays a list of options for the user to pick from—triggered by a button.
10
- *
11
- * @see https://mantle.ngrok.com/components/select
12
- *
13
- * @example
14
- * ```tsx
15
- * <Select.Root>
16
- * <Select.Trigger>
17
- * <Select.Value placeholder="Select a fruit" />
18
- * </Select.Trigger>
19
- * <Select.Content>
20
- * <Select.Group>
21
- * <Select.Label>Fruits</Select.Label>
22
- * <Select.Item value="apple">Apple</Select.Item>
23
- * <Select.Item value="banana">Banana</Select.Item>
24
- * <Select.Item value="cherry">Cherry</Select.Item>
25
- * </Select.Group>
26
- * <Select.Separator />
27
- * <Select.Group>
28
- * <Select.Label>Veggies</Select.Label>
29
- * <Select.Item value="carrot">Carrot</Select.Item>
30
- * <Select.Item value="cucumber">Cucumber</Select.Item>
31
- * </Select.Group>
32
- * </Select.Content>
33
- * </Select.Root>
34
- * ```
35
- */
36
- declare const Select: {
37
- /**
38
- * Displays a list of options for the user to pick from—triggered by a button.
39
- *
40
- * @see https://mantle.ngrok.com/components/select#selectroot
41
- *
42
- * @example
43
- * ```tsx
44
- * <Select.Root>
45
- * <Select.Trigger>
46
- * <Select.Value placeholder="Select a fruit" />
47
- * </Select.Trigger>
48
- * <Select.Content>
49
- * <Select.Group>
50
- * <Select.Label>Fruits</Select.Label>
51
- * <Select.Item value="apple">Apple</Select.Item>
52
- * <Select.Item value="banana">Banana</Select.Item>
53
- * <Select.Item value="cherry">Cherry</Select.Item>
54
- * </Select.Group>
55
- * <Select.Separator />
56
- * <Select.Group>
57
- * <Select.Label>Veggies</Select.Label>
58
- * <Select.Item value="carrot">Carrot</Select.Item>
59
- * <Select.Item value="cucumber">Cucumber</Select.Item>
60
- * </Select.Group>
61
- * </Select.Content>
62
- * </Select.Root>
63
- * ```
64
- */
65
- readonly Root: react.ForwardRefExoticComponent<{
66
- children?: ReactNode | undefined;
67
- } & {
68
- autoComplete?: string;
69
- defaultOpen?: boolean;
70
- defaultValue?: string;
71
- dir?: "ltr" | "rtl";
72
- disabled?: boolean;
73
- form?: string;
74
- id?: string;
75
- name?: string;
76
- /**
77
- * Event handler called when Select blurs.
78
- * @note this is a no-op for now until we can guarantee that it works identically to a native select onBlur
79
- */
80
- onBlur?: (event: FocusEvent<HTMLButtonElement>) => void;
81
- /**
82
- * Event handler called when the value changes.
83
- * @deprecated Use `onValueChange` instead.
84
- */
85
- onChange?: (value: string) => void;
86
- onOpenChange?(open: boolean): void;
87
- onValueChange?(value: string): void;
88
- open?: boolean;
89
- required?: boolean;
90
- value?: string;
91
- } & WithValidation & WithAriaInvalid & react.RefAttributes<HTMLButtonElement>>;
92
- /**
93
- * The component that pops out when the select is open as a portal adjacent to the trigger button.
94
- * It contains a scrolling viewport of the select items.
95
- *
96
- * @see https://mantle.ngrok.com/components/select#selectcontent
97
- *
98
- * @example
99
- * <Select.Root>
100
- * <Select.Trigger>
101
- * <Select.Value placeholder="Select a fruit" />
102
- * </Select.Trigger>
103
- * <Select.Content>
104
- * <Select.Item value="apple">Apple</Select.Item>
105
- * <Select.Item value="banana">Banana</Select.Item>
106
- * <Select.Item value="cherry">Cherry</Select.Item>
107
- * </Select.Content>
108
- * </Select.Root>
109
- */
110
- readonly Content: react.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectContentProps & react.RefAttributes<HTMLDivElement>, "ref"> & {
111
- /**
112
- * The width of the content. Defaults to the width of the trigger.
113
- * If set to "content", the content will use the intrinsic content width; it will be the width of the longest/widest item.
114
- * @default "trigger"
115
- */
116
- width?: "trigger" | "content";
117
- } & react.RefAttributes<HTMLDivElement>>;
118
- /**
119
- * A group of related options within a select menu. Similar to an html `<optgroup>` element.
120
- * Use in conjunction with Select.Label to ensure good accessibility via automatic labelling.
121
- *
122
- * @see https://mantle.ngrok.com/components/select#selectgroup
123
- *
124
- * @example
125
- * <Select.Root>
126
- * <Select.Trigger>
127
- * <Select.Value placeholder="Select a fruit" />
128
- * </Select.Trigger>
129
- * <Select.Content>
130
- * <Select.Group>
131
- * <Select.Label>Fruits</Select.Label>
132
- * <Select.Item value="apple">Apple</Select.Item>
133
- * <Select.Item value="banana">Banana</Select.Item>
134
- * <Select.Item value="cherry">Cherry</Select.Item>
135
- * </Select.Group>
136
- * <Select.Group>
137
- * <Select.Label>Veggies</Select.Label>
138
- * <Select.Item value="carrot">Carrot</Select.Item>
139
- * <Select.Item value="cucumber">Cucumber</Select.Item>
140
- * </Select.Group>
141
- * </Select.Content>
142
- * </Select.Root>
143
- */
144
- readonly Group: react.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectGroupProps & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
145
- /**
146
- * An option within a select menu. Similar to an html `<option>` element.
147
- * Has a required `value` prop that will be passed to the `onChange` handler of the `Select` component when this item is selected.
148
- * Displays the children as the option's text.
149
- *
150
- * @see https://mantle.ngrok.com/components/select#selectitem
151
- *
152
- * @example
153
- * <Select.Root>
154
- * <Select.Trigger>
155
- * <Select.Value placeholder="Select a fruit" />
156
- * </Select.Trigger>
157
- * <Select.Content>
158
- * <Select.Item value="apple">Apple</Select.Item>
159
- * <Select.Item value="banana">Banana</Select.Item>
160
- * <Select.Item value="cherry">Cherry</Select.Item>
161
- * </Select.Content>
162
- * </Select.Root>
163
- */
164
- readonly Item: react.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectItemProps & react.RefAttributes<HTMLDivElement>, "ref"> & {
165
- icon?: ReactNode;
166
- } & react.RefAttributes<HTMLDivElement>>;
167
- /**
168
- * Used to render the label of a group. It won't be focusable using arrow keys.
169
- *
170
- * @see https://mantle.ngrok.com/components/select#selectlabel
171
- *
172
- * @example
173
- * <Select.Root>
174
- * <Select.Trigger>
175
- * <Select.Value placeholder="Select a fruit" />
176
- * </Select.Trigger>
177
- * <Select.Content>
178
- * <Select.Group>
179
- * <Select.Label>Fruits</Select.Label>
180
- * <Select.Item value="apple">Apple</Select.Item>
181
- * <Select.Item value="banana">Banana</Select.Item>
182
- * <Select.Item value="cherry">Cherry</Select.Item>
183
- * </Select.Group>
184
- * <Select.Group>
185
- * <Select.Label>Veggies</Select.Label>
186
- * <Select.Item value="carrot">Carrot</Select.Item>
187
- * <Select.Item value="cucumber">Cucumber</Select.Item>
188
- * </Select.Group>
189
- * </Select.Content>
190
- * </Select.Root>
191
- */
192
- readonly Label: react.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectLabelProps & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
193
- /**
194
- * Used to visually separate items or groups of items in the select content.
195
- *
196
- * @see https://mantle.ngrok.com/components/select#selectseparator
197
- *
198
- * @example
199
- * <Select.Root>
200
- * <Select.Trigger>
201
- * <Select.Value placeholder="Select a fruit" />
202
- * </Select.Trigger>
203
- * <Select.Content>
204
- * <Select.Group>
205
- * <Select.Label>Fruits</Select.Label>
206
- * <Select.Item value="apple">Apple</Select.Item>
207
- * <Select.Item value="banana">Banana</Select.Item>
208
- * <Select.Item value="cherry">Cherry</Select.Item>
209
- * </Select.Group>
210
- * <Select.Separator />
211
- * <Select.Group>
212
- * <Select.Label>Veggies</Select.Label>
213
- * <Select.Item value="carrot">Carrot</Select.Item>
214
- * <Select.Item value="cucumber">Cucumber</Select.Item>
215
- * </Select.Group>
216
- * </Select.Content>
217
- * </Select.Root>
218
- */
219
- readonly Separator: react.ForwardRefExoticComponent<Omit<Omit<react.ClassAttributes<HTMLDivElement> & react.HTMLAttributes<HTMLDivElement> & WithAsChild & {
220
- orientation?: "horizontal" | "vertical";
221
- semantic?: boolean;
222
- }, "ref"> & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
223
- /**
224
- * The button that toggles the select. The Select.Content will position itself adjacent to the trigger.
225
- *
226
- * @see https://mantle.ngrok.com/components/select#selecttrigger
227
- *
228
- * @example
229
- * ```tsx
230
- * <Select.Root>
231
- * <Select.Trigger>
232
- * <Select.Value placeholder="Select a fruit" />
233
- * </Select.Trigger>
234
- * <Select.Content>
235
- * <Select.Item value="apple">Apple</Select.Item>
236
- * <Select.Item value="banana">Banana</Select.Item>
237
- * <Select.Item value="cherry">Cherry</Select.Item>
238
- * </Select.Content>
239
- * </Select.Root>
240
- * ```
241
- */
242
- readonly Trigger: react.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectTriggerProps & react.RefAttributes<HTMLButtonElement>, "ref"> & WithAriaInvalid & WithValidation & react.RefAttributes<HTMLButtonElement>>;
243
- /**
244
- * The part that reflects the selected value. By default the selected item's text will be rendered. if you require more control, you can instead control the select and pass your own children. It should not be styled to ensure correct positioning. An optional placeholder prop is also available for when the select has no value.
245
- *
246
- * @see https://mantle.ngrok.com/components/select#selectvalue
247
- *
248
- * @example
249
- * <Select.Root>
250
- * <Select.Trigger>
251
- * <Select.Value placeholder="Select a fruit" />
252
- * </Select.Trigger>
253
- * <Select.Content>
254
- * <Select.Item value="apple">Apple</Select.Item>
255
- * <Select.Item value="banana">Banana</Select.Item>
256
- * <Select.Item value="cherry">Cherry</Select.Item>
257
- * </Select.Content>
258
- * </Select.Root>
259
- */
260
- readonly Value: react.ForwardRefExoticComponent<SelectPrimitive.SelectValueProps & react.RefAttributes<HTMLSpanElement>>;
261
- };
262
-
263
- export { Select };
1
+ import { t as Select } from "./select-39Jfc1Cb.js";
2
+ export { Select };
package/dist/select.js CHANGED
@@ -1,2 +1 @@
1
- import{a as e}from"./chunk-YPAUKPCE.js";import"./chunk-MLXONRJD.js";import"./chunk-HKSO72E5.js";import"./chunk-IVQ626TU.js";import"./chunk-ADF5DAYG.js";import"./chunk-SBQHQ2SJ.js";import"./chunk-PFXFESEN.js";export{e as Select};
2
- //# sourceMappingURL=select.js.map
1
+ import{t as e}from"./select-DZ2ztBkI.js";export{e as Select};
@@ -0,0 +1,2 @@
1
+ import{t as e}from"./cx-bKromGBh.js";import{t}from"./slot-DdnjeV2n.js";import{createContext as n,forwardRef as r,useContext as i}from"react";import{jsx as a}from"react/jsx-runtime";const o=[`horizontal`,`vertical`],s=n({}),c=({className:n,children:r,asChild:i,...o})=>{let c=i?t:`div`;return a(s.Provider,{value:{orientation:`horizontal`},children:a(c,{"data-horizontal-separator-group":!0,className:e(`group flex items-center gap-2 [&_*:not([data-separator])]:shrink-0`,n),...o,children:r})})};c.displayName=`HorizontalSeparatorGroup`;const l=r(({asChild:n=!1,children:r,className:o,orientation:c,semantic:l=!1,...d},f)=>{let p=n?t:`div`,m=i(s).orientation??(u(c)?c:`horizontal`),h=m===`vertical`?m:void 0,g=l?{"aria-orientation":h,role:`separator`}:{role:`none`};return a(p,{className:e(`separator`,`dark-high-contrast:bg-black high-contrast:bg-black bg-gray-500/20 dark:bg-gray-600/20`,m===`horizontal`?`h-px w-full group-data-horizontal-separator-group:flex-1`:`h-full w-px`,o),"data-orientation":m,"data-separator":!0,...g,ref:f,...n?{children:r}:{},...d})});l.displayName=`Separator`;function u(e){return typeof e==`string`&&o.includes(e)}export{l as n,c as t};
2
+ //# sourceMappingURL=separator-BcCNbHBg.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"separator-BcCNbHBg.js","names":[],"sources":["../src/components/separator/separator.tsx"],"sourcesContent":["import type { ComponentProps, ComponentRef, HTMLAttributes } from \"react\";\nimport { createContext, forwardRef, useContext } from \"react\";\nimport type { WithAsChild } from \"../../types/as-child.js\";\nimport { cx } from \"../../utils/cx/cx.js\";\nimport { Slot } from \"../slot/index.js\";\n\nconst orientations = [\"horizontal\", \"vertical\"] as const;\ntype Orientation = (typeof orientations)[number];\n\ntype SeparatorGroupContextShape = {\n\torientation?: Orientation;\n};\n\nconst SeparatorGroupContext = createContext<SeparatorGroupContextShape>({});\n\n/**\n * A container to layout a group of horizontal separators and other children.\n * Overrides all children `Separator`s to be `orientation=\"horizontal\"`.\n *\n * @see https://mantle.ngrok.com/components/separator\n *\n * @example\n * ```tsx\n * <HorizontalSeparatorGroup>\n * <Separator />\n * <h3>ngrok mantle</h3>\n * <Separator />\n * </HorizontalSeparatorGroup>\n *\n * <HorizontalSeparatorGroup>\n * <h3>ngrok mantle</h3>\n * <Separator />\n * </HorizontalSeparatorGroup>\n *\n * <HorizontalSeparatorGroup>\n * <Separator />\n * <h3>ngrok mantle</h3>\n * </HorizontalSeparatorGroup>\n * ```\n */\nconst HorizontalSeparatorGroup = ({\n\tclassName,\n\tchildren,\n\tasChild,\n\t...props\n}: HTMLAttributes<HTMLDivElement> & WithAsChild) => {\n\tconst Comp = asChild ? Slot : \"div\";\n\n\treturn (\n\t\t<SeparatorGroupContext.Provider value={{ orientation: \"horizontal\" }}>\n\t\t\t<Comp\n\t\t\t\tdata-horizontal-separator-group\n\t\t\t\tclassName={cx(\n\t\t\t\t\t\"group flex items-center gap-2 [&_*:not([data-separator])]:shrink-0\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</Comp>\n\t\t</SeparatorGroupContext.Provider>\n\t);\n};\nHorizontalSeparatorGroup.displayName = \"HorizontalSeparatorGroup\";\n\ntype SeparatorProps = ComponentProps<\"div\"> &\n\tWithAsChild & {\n\t\t/**\n\t\t * Either `horizontal` or `vertical`.\n\t\t *\n\t\t * @default \"horizontal\"\n\t\t */\n\t\torientation?: Orientation;\n\t\t/**\n\t\t * If `true`, the separator will be rendered with all accessibility-related attributes and role=\"separator\".\n\t\t * If `false`, the separator is purely decorative and all accessibility-related attributes\n\t\t * are updated so that that the rendered element is removed from the accessibility tree.\n\t\t *\n\t\t * @default false\n\t\t */\n\t\tsemantic?: boolean;\n\t};\n\n/**\n * Visually or semantically separates content.\n *\n * @see https://mantle.ngrok.com/components/separator\n *\n * @example\n * ```tsx\n * <Separator className=\"my-4\" />\n *\n * <Separator className=\"my-4\" semantic />\n *\n * <div className=\"flex h-5 items-center gap-4 text-sm\">\n * Blog\n * <Separator orientation=\"vertical\" />\n * Docs\n * <Separator orientation=\"vertical\" />\n * Source\n * </div>\n * ```\n */\nconst Separator = forwardRef<ComponentRef<\"div\">, SeparatorProps>(\n\t(\n\t\t{\n\t\t\tasChild = false,\n\t\t\tchildren,\n\t\t\tclassName,\n\t\t\torientation: propOrientation,\n\t\t\tsemantic = false,\n\t\t\t...props\n\t\t},\n\t\tref,\n\t) => {\n\t\tconst Component = asChild ? Slot : \"div\";\n\t\tconst ctx = useContext(SeparatorGroupContext);\n\t\t// Prefer the orientation from the context if it's set, else fallback to the prop and then to \"horizontal\".\n\t\tconst orientation =\n\t\t\tctx.orientation ?? (isOrientation(propOrientation) ? propOrientation : \"horizontal\");\n\t\t// `aria-orientation` defaults to `horizontal` so we only need it if `orientation` is vertical\n\t\tconst ariaOrientation = orientation === \"vertical\" ? orientation : undefined;\n\t\tconst semanticProps = semantic\n\t\t\t? { \"aria-orientation\": ariaOrientation, role: \"separator\" }\n\t\t\t: { role: \"none\" };\n\n\t\treturn (\n\t\t\t<Component\n\t\t\t\tclassName={cx(\n\t\t\t\t\t\"separator\",\n\t\t\t\t\t\"dark-high-contrast:bg-black high-contrast:bg-black bg-gray-500/20 dark:bg-gray-600/20\",\n\t\t\t\t\torientation === \"horizontal\"\n\t\t\t\t\t\t? \"h-px w-full group-data-horizontal-separator-group:flex-1\"\n\t\t\t\t\t\t: \"h-full w-px\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\tdata-orientation={orientation}\n\t\t\t\tdata-separator\n\t\t\t\t{...semanticProps}\n\t\t\t\tref={ref}\n\t\t\t\t{...(asChild ? { children } : {})} // only pass children if asChild is true\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t);\n\t},\n);\nSeparator.displayName = \"Separator\";\n\nexport {\n\t//,\n\tHorizontalSeparatorGroup,\n\tSeparator,\n};\n\nfunction isOrientation(value: unknown): value is Orientation {\n\treturn typeof value === \"string\" && orientations.includes(value as Orientation);\n}\n"],"mappings":"qLAMA,MAAM,EAAe,CAAC,aAAc,WAAW,CAOzC,EAAwB,EAA0C,EAAE,CAAC,CA2BrE,GAA4B,CACjC,YACA,WACA,UACA,GAAG,KACgD,CACnD,IAAM,EAAO,EAAU,EAAO,MAE9B,OACC,EAAC,EAAsB,SAAvB,CAAgC,MAAO,CAAE,YAAa,aAAc,UACnE,EAAC,EAAD,CACC,kCAAA,GACA,UAAW,EACV,qEACA,EACA,CACD,GAAI,EAEH,WACK,CAAA,CACyB,CAAA,EAGnC,EAAyB,YAAc,2BAwCvC,MAAM,EAAY,GAEhB,CACC,UAAU,GACV,WACA,YACA,YAAa,EACb,WAAW,GACX,GAAG,GAEJ,IACI,CACJ,IAAM,EAAY,EAAU,EAAO,MAG7B,EAFM,EAAW,EAAsB,CAGxC,cAAgB,EAAc,EAAgB,CAAG,EAAkB,cAElE,EAAkB,IAAgB,WAAa,EAAc,IAAA,GAC7D,EAAgB,EACnB,CAAE,mBAAoB,EAAiB,KAAM,YAAa,CAC1D,CAAE,KAAM,OAAQ,CAEnB,OACC,EAAC,EAAD,CACC,UAAW,EACV,YACA,wFACA,IAAgB,aACb,2DACA,cACH,EACA,CACD,mBAAkB,EAClB,iBAAA,GACA,GAAI,EACC,MACL,GAAK,EAAU,CAAE,WAAU,CAAG,EAAE,CAChC,GAAI,EACH,CAAA,EAGJ,CACD,EAAU,YAAc,YAQxB,SAAS,EAAc,EAAsC,CAC5D,OAAO,OAAO,GAAU,UAAY,EAAa,SAAS,EAAqB"}
@@ -1,8 +1,9 @@
1
- import * as react from 'react';
2
- import { HTMLAttributes, ComponentProps } from 'react';
3
- import * as react_jsx_runtime from 'react/jsx-runtime';
4
- 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 { ComponentProps, HTMLAttributes } from "react";
4
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
5
5
 
6
+ //#region src/components/separator/separator.d.ts
6
7
  declare const orientations: readonly ["horizontal", "vertical"];
7
8
  type Orientation = (typeof orientations)[number];
8
9
  /**
@@ -31,24 +32,29 @@ type Orientation = (typeof orientations)[number];
31
32
  * ```
32
33
  */
33
34
  declare const HorizontalSeparatorGroup: {
34
- ({ className, children, asChild, ...props }: HTMLAttributes<HTMLDivElement> & WithAsChild): react_jsx_runtime.JSX.Element;
35
- displayName: string;
35
+ ({
36
+ className,
37
+ children,
38
+ asChild,
39
+ ...props
40
+ }: HTMLAttributes<HTMLDivElement> & WithAsChild): react_jsx_runtime0.JSX.Element;
41
+ displayName: string;
36
42
  };
37
43
  type SeparatorProps = ComponentProps<"div"> & WithAsChild & {
38
- /**
39
- * Either `horizontal` or `vertical`.
40
- *
41
- * @default "horizontal"
42
- */
43
- orientation?: Orientation;
44
- /**
45
- * If `true`, the separator will be rendered with all accessibility-related attributes and role="separator".
46
- * If `false`, the separator is purely decorative and all accessibility-related attributes
47
- * are updated so that that the rendered element is removed from the accessibility tree.
48
- *
49
- * @default false
50
- */
51
- semantic?: boolean;
44
+ /**
45
+ * Either `horizontal` or `vertical`.
46
+ *
47
+ * @default "horizontal"
48
+ */
49
+ orientation?: Orientation;
50
+ /**
51
+ * If `true`, the separator will be rendered with all accessibility-related attributes and role="separator".
52
+ * If `false`, the separator is purely decorative and all accessibility-related attributes
53
+ * are updated so that that the rendered element is removed from the accessibility tree.
54
+ *
55
+ * @default false
56
+ */
57
+ semantic?: boolean;
52
58
  };
53
59
  /**
54
60
  * Visually or semantically separates content.
@@ -71,5 +77,6 @@ type SeparatorProps = ComponentProps<"div"> & WithAsChild & {
71
77
  * ```
72
78
  */
73
79
  declare const Separator: react.ForwardRefExoticComponent<Omit<SeparatorProps, "ref"> & react.RefAttributes<HTMLDivElement>>;
74
-
80
+ //#endregion
75
81
  export { HorizontalSeparatorGroup, Separator };
82
+ //# sourceMappingURL=separator.d.ts.map
package/dist/separator.js CHANGED
@@ -1,2 +1 @@
1
- import{a as r,b as o}from"./chunk-MLXONRJD.js";import"./chunk-ADF5DAYG.js";import"./chunk-PFXFESEN.js";export{r as HorizontalSeparatorGroup,o as Separator};
2
- //# sourceMappingURL=separator.js.map
1
+ import{n as e,t}from"./separator-BcCNbHBg.js";export{t as HorizontalSeparatorGroup,e as Separator};