@ngrok/mantle 0.79.3 → 0.81.0

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 (222) hide show
  1. package/dist/accordion.d.ts +158 -19
  2. package/dist/accordion.js +1 -1
  3. package/dist/agent.json +5 -1
  4. package/dist/alert-dialog.d.ts +465 -32
  5. package/dist/alert-dialog.js +1 -1
  6. package/dist/alert.d.ts +116 -14
  7. package/dist/alert.js +1 -1
  8. package/dist/anchor-DfeXTpKW.js +1 -0
  9. package/dist/anchor.d.ts +2 -2
  10. package/dist/anchor.js +1 -1
  11. package/dist/area-chart.d.ts +504 -0
  12. package/dist/area-chart.js +1 -0
  13. package/dist/as-child-D23mGo4f.d.ts +49 -0
  14. package/dist/badge.d.ts +44 -5
  15. package/dist/badge.js +1 -1
  16. package/dist/bar-chart.d.ts +491 -0
  17. package/dist/bar-chart.js +1 -0
  18. package/dist/breadcrumb.d.ts +196 -14
  19. package/dist/breadcrumb.js +1 -1
  20. package/dist/button-BAno7KIU.js +1 -0
  21. package/dist/{index-BSAizFod.d.ts → button-C-gMbPso.d.ts} +5 -5
  22. package/dist/{icon-button-BvQvT790.d.ts → button-C7vAl6lS.d.ts} +22 -63
  23. package/dist/button-D9n09xUg.js +1 -0
  24. package/dist/{button-DcXOWUYo.d.ts → button-DARFK2KJ.d.ts} +4 -4
  25. package/dist/button-DjpEKt2X.js +1 -0
  26. package/dist/button-DvHMWAPl.js +1 -0
  27. package/dist/button.d.ts +5 -5
  28. package/dist/button.js +1 -1
  29. package/dist/calendar.d.ts +0 -3
  30. package/dist/calendar.js +1 -1
  31. package/dist/card.d.ts +131 -9
  32. package/dist/card.js +1 -1
  33. package/dist/centered-layout.d.ts +209 -8
  34. package/dist/centered-layout.js +1 -1
  35. package/dist/chart-BROa2gqt.js +2 -0
  36. package/dist/chart-BcOC6Qj0.d.ts +275 -0
  37. package/dist/checkbox-0EoxOyMA.js +1 -0
  38. package/dist/checkbox.d.ts +13 -11
  39. package/dist/checkbox.js +1 -1
  40. package/dist/choice-BHwFSSyv.js +1 -0
  41. package/dist/choice-BNRQXszu.d.ts +254 -0
  42. package/dist/choice.d.ts +1 -252
  43. package/dist/choice.js +1 -1
  44. package/dist/code-block.d.ts +242 -52
  45. package/dist/code-block.js +6 -6
  46. package/dist/code-block_highlight-utils.d.ts +1 -1
  47. package/dist/code-block_highlight-utils.js +1 -1
  48. package/dist/code.d.ts +3 -2
  49. package/dist/code.js +1 -1
  50. package/dist/combobox.d.ts +171 -16
  51. package/dist/combobox.js +1 -1
  52. package/dist/command.d.ts +279 -81
  53. package/dist/command.js +1 -1
  54. package/dist/compose-refs-BdBMM9ga.js +1 -0
  55. package/dist/data-table.d.ts +28 -6
  56. package/dist/data-table.js +1 -1
  57. package/dist/description-list.d.ts +67 -6
  58. package/dist/description-list.js +1 -1
  59. package/dist/dialog-BM4wPCft.d.ts +24 -0
  60. package/dist/dialog-DWZWd5Jt.js +1 -0
  61. package/dist/dialog.d.ts +226 -35
  62. package/dist/dialog.js +1 -1
  63. package/dist/{dropdown-menu-DP_Ne9Mr.d.ts → dropdown-menu-DZg-Cd69.d.ts} +137 -32
  64. package/dist/dropdown-menu-Dw-OtXPm.d.ts +1 -0
  65. package/dist/dropdown-menu-RyDWoKHx.js +1 -0
  66. package/dist/dropdown-menu.d.ts +2 -2
  67. package/dist/dropdown-menu.js +1 -1
  68. package/dist/empty.d.ts +7 -22
  69. package/dist/empty.js +1 -1
  70. package/dist/field-B1wqeZr4.js +1 -0
  71. package/dist/field.d.ts +568 -47
  72. package/dist/field.js +1 -1
  73. package/dist/flag.d.ts +0 -3
  74. package/dist/flag.js +1 -1
  75. package/dist/hooks.d.ts +3 -4
  76. package/dist/hooks.js +1 -1
  77. package/dist/hover-card.d.ts +48 -7
  78. package/dist/hover-card.js +1 -1
  79. package/dist/{svg-only-BFeFS1aa.d.ts → icon-CX_gj6sW.d.ts} +2 -2
  80. package/dist/icon-d-nMCfAI.js +1 -0
  81. package/dist/{icon-Cevjo93X.d.ts → icon-k4E9yNWD.d.ts} +2 -2
  82. package/dist/icon-lZ48P8Nn.js +1 -0
  83. package/dist/icon.d.ts +3 -3
  84. package/dist/icon.js +1 -1
  85. package/dist/{sort-BPX2Fk9t.js → icons-B_DDQcVD.js} +1 -1
  86. package/dist/{traffic-policy-file-0g5RXFqu.js → icons-CF1lbWtp.js} +1 -1
  87. package/dist/icons-DLCs1hLP.js +1 -0
  88. package/dist/icons.d.ts +7 -15
  89. package/dist/icons.js +1 -1
  90. package/dist/{in-view-nkSOdED2.d.ts → in-view-DDEGUKDR.d.ts} +17 -9
  91. package/dist/{index-D47aqlpz.d.ts → index-DA4ig3gj.d.ts} +1 -1
  92. package/dist/input-BnlpQF0c.js +1 -0
  93. package/dist/{types-C19IR7jf.d.ts → input-BuYDU6CF.d.ts} +42 -2
  94. package/dist/input.d.ts +5 -56
  95. package/dist/input.js +1 -1
  96. package/dist/{label-v2-bv98k.d.ts → label-C6YH9skg.d.ts} +8 -6
  97. package/dist/label-D-D11mlp.js +1 -0
  98. package/dist/label.d.ts +1 -1
  99. package/dist/label.js +1 -1
  100. package/dist/line-chart.d.ts +490 -0
  101. package/dist/line-chart.js +1 -0
  102. package/dist/list-51KQvENW.js +1 -0
  103. package/dist/list.d.ts +135 -6
  104. package/dist/list.js +1 -1
  105. package/dist/llms.txt +5 -1
  106. package/dist/main.d.ts +20 -4
  107. package/dist/main.js +1 -1
  108. package/dist/mantle-dark-high-contrast.css +17 -0
  109. package/dist/mantle-dark.css +13 -0
  110. package/dist/mantle-light-high-contrast.css +15 -0
  111. package/dist/mantle.css +29 -0
  112. package/dist/media-object.d.ts +18 -4
  113. package/dist/media-object.js +1 -1
  114. package/dist/multi-select.d.ts +282 -24
  115. package/dist/multi-select.js +1 -1
  116. package/dist/otp-input.d.ts +118 -6
  117. package/dist/otp-input.js +1 -1
  118. package/dist/pagination.d.ts +61 -6
  119. package/dist/pagination.js +1 -1
  120. package/dist/popover-CE4OlWkd.d.ts +208 -0
  121. package/dist/popover-CQ9s7jG5.js +1 -0
  122. package/dist/popover.d.ts +1 -181
  123. package/dist/popover.js +1 -1
  124. package/dist/primitive-trJDqIXJ.js +1 -0
  125. package/dist/progress.d.ts +2 -8
  126. package/dist/progress.js +1 -1
  127. package/dist/qr-code.d.ts +101 -5
  128. package/dist/qr-code.js +1 -1
  129. package/dist/radio-group.d.ts +110 -35
  130. package/dist/radio-group.js +1 -1
  131. package/dist/sandboxed-on-click.d.ts +2 -2
  132. package/dist/sandboxed-on-click.js +1 -1
  133. package/dist/scatter-plot.d.ts +495 -0
  134. package/dist/scatter-plot.js +1 -0
  135. package/dist/select-0z7HVS6r.d.ts +579 -0
  136. package/dist/select-BCHWvmyC.js +1 -0
  137. package/dist/select.d.ts +1 -1
  138. package/dist/select.js +1 -1
  139. package/dist/selectable-list.d.ts +225 -298
  140. package/dist/selectable-list.js +1 -1
  141. package/dist/separator-B5UmkVRL.d.ts +75 -0
  142. package/dist/separator-bpE_kooz.js +1 -0
  143. package/dist/separator.d.ts +1 -52
  144. package/dist/separator.js +1 -1
  145. package/dist/sheet.d.ts +285 -38
  146. package/dist/sheet.js +1 -1
  147. package/dist/skeleton-CsbUHbBA.js +1 -0
  148. package/dist/skeleton.d.ts +4 -7
  149. package/dist/skeleton.js +1 -1
  150. package/dist/skip-to-main-link.d.ts +24 -4
  151. package/dist/skip-to-main-link.js +1 -1
  152. package/dist/slider.js +1 -1
  153. package/dist/{index-Rv8RL7xy.d.ts → slot-BtwKJTLq.d.ts} +1 -1
  154. package/dist/slot-CDk0Bb9z.js +1 -0
  155. package/dist/slot.d.ts +1 -1
  156. package/dist/slot.js +1 -1
  157. package/dist/split-button.d.ts +14 -14
  158. package/dist/split-button.js +1 -1
  159. package/dist/switch.d.ts +10 -7
  160. package/dist/switch.js +1 -1
  161. package/dist/table-Bo0vNxIJ.d.ts +848 -0
  162. package/dist/table-CGxJwtbL.js +1 -0
  163. package/dist/table.d.ts +1 -1
  164. package/dist/table.js +1 -1
  165. package/dist/tabs.d.ts +124 -25
  166. package/dist/tabs.js +1 -1
  167. package/dist/text-area.d.ts +2 -2
  168. package/dist/text-area.js +1 -1
  169. package/dist/theme-C26-Xolp.js +1 -0
  170. package/dist/theme-switcher.d.ts +105 -33
  171. package/dist/theme-switcher.js +1 -1
  172. package/dist/theme.d.ts +54 -15
  173. package/dist/theme.js +1 -1
  174. package/dist/toast.d.ts +86 -10
  175. package/dist/toast.js +1 -1
  176. package/dist/tooltip.d.ts +50 -5
  177. package/dist/tooltip.js +1 -1
  178. package/dist/types.d.ts +2 -2
  179. package/dist/utils.d.ts +1 -1
  180. package/dist/utils.js +1 -1
  181. package/dist/well.d.ts +3 -3
  182. package/dist/well.js +1 -1
  183. package/package.json +9 -3
  184. package/dist/anchor-C_tjSVy6.js +0 -1
  185. package/dist/as-child-CYEVu1WY.d.ts +0 -23
  186. package/dist/button-5t6-JS_I.js +0 -1
  187. package/dist/button-ClC60Nzg.js +0 -1
  188. package/dist/checkbox-DJ2xl7Rc.js +0 -1
  189. package/dist/choice-DOdyNzFC.js +0 -1
  190. package/dist/compose-refs-Cjf2gfB8.js +0 -1
  191. package/dist/dialog-vxLIvB8M.js +0 -1
  192. package/dist/dropdown-menu-Bt1aKF1g.js +0 -1
  193. package/dist/field-context-BR01g789.js +0 -1
  194. package/dist/icon-CDtYjF_H.js +0 -1
  195. package/dist/icon-button-DV2-GZHf.js +0 -1
  196. package/dist/index-g2rfwNCH.d.ts +0 -1
  197. package/dist/input-Ct1YOqSy.js +0 -1
  198. package/dist/label-BMlHW_2D.js +0 -1
  199. package/dist/popover-D5WxxnBY.js +0 -1
  200. package/dist/primitive-C64-m48O.d.ts +0 -13
  201. package/dist/primitive-IKruV2iB.js +0 -1
  202. package/dist/select-Bwt2YduR.d.ts +0 -345
  203. package/dist/select-D-5u0Blc.js +0 -1
  204. package/dist/separator-kBnnv3Cw.js +0 -1
  205. package/dist/skeleton-Bu3tgNcW.js +0 -1
  206. package/dist/slot-DmPrjM7N.js +0 -1
  207. package/dist/svg-only-DDx6FtJd.js +0 -1
  208. package/dist/table-CPH2md2-.js +0 -1
  209. package/dist/table-CwFHXC-G.d.ts +0 -414
  210. package/dist/theme-D3MDng6U.js +0 -1
  211. package/dist/theme-provider-C9zpDyJW.js +0 -1
  212. package/dist/toast-BsCjaMVS.js +0 -1
  213. package/dist/virtual-DZMBu7Ch.js +0 -1
  214. /package/dist/{sizes-BCoI4bhP.d.ts → button-BCoI4bhP.d.ts} +0 -0
  215. /package/dist/{intents-DdSKSj1c.d.ts → button-DdSKSj1c.d.ts} +0 -0
  216. /package/dist/{resolve-pre-rendered-props-B6OlZrSI.d.ts → code-block-B6OlZrSI.d.ts} +0 -0
  217. /package/dist/{resolve-pre-rendered-props-C9uaM9-V.js → code-block-C9uaM9-V.js} +0 -0
  218. /package/dist/{validation-7QeiTFwl.d.ts → field-7QeiTFwl.d.ts} +0 -0
  219. /package/dist/{validation-Bpptk_9t.js → field-Bpptk_9t.js} +0 -0
  220. /package/dist/{types-D1RY5Tcj.d.ts → icon-D1RY5Tcj.d.ts} +0 -0
  221. /package/dist/{is-input-CXmS0OFN.js → input-CXmS0OFN.js} +0 -0
  222. /package/dist/{themes-CYNpplwN.d.ts → theme-CYNpplwN.d.ts} +0 -0
@@ -0,0 +1,579 @@
1
+ import { o as WithValidation } from "./field-7QeiTFwl.js";
2
+ import { n as Separator } from "./separator-B5UmkVRL.js";
3
+ import { ComponentProps, FocusEvent, PropsWithChildren, ReactNode, Ref, SelectHTMLAttributes } from "react";
4
+ import * as SelectPrimitive from "@radix-ui/react-select";
5
+ //#region src/components/select/select.d.ts
6
+ type WithAriaInvalid = Pick<SelectHTMLAttributes<HTMLSelectElement>, "aria-invalid">;
7
+ type SelectProps = PropsWithChildren & {
8
+ autoComplete?: string;
9
+ defaultOpen?: boolean;
10
+ defaultValue?: string;
11
+ dir?: "ltr" | "rtl";
12
+ disabled?: boolean;
13
+ form?: string;
14
+ id?: string;
15
+ name?: string;
16
+ /**
17
+ * Event handler called when Select blurs.
18
+ * @note this is a no-op for now until we can guarantee that it works identically to a native select onBlur
19
+ */
20
+ onBlur?: (event: FocusEvent<HTMLButtonElement>) => void;
21
+ /**
22
+ * Event handler called when the value changes.
23
+ * @deprecated Use `onValueChange` instead.
24
+ */
25
+ onChange?: (value: string) => void;
26
+ onOpenChange?(open: boolean): void;
27
+ onValueChange?(value: string): void;
28
+ open?: boolean;
29
+ /**
30
+ * Ref for the trigger button.
31
+ */
32
+ ref?: Ref<HTMLButtonElement>;
33
+ required?: boolean;
34
+ value?: string;
35
+ } & WithValidation & WithAriaInvalid;
36
+ /**
37
+ * Displays a list of options for the user to pick from—triggered by a button.
38
+ *
39
+ * Use Select for a small, finite list of options (~2-15) where the user picks exactly one
40
+ * and search/filtering is unnecessary. For larger lists or async/searchable data, use
41
+ * Combobox. For picking multiple options, use MultiSelect.
42
+ *
43
+ * Pass `validation` here when the entire select has an explicit state. That
44
+ * root state is forwarded to `Select.Trigger` and takes precedence over the
45
+ * ambient `validation` from `Field.Item`. Note: rendered `Field.Errors` /
46
+ * `Field.ErrorList` set `aria-invalid="true"` on the trigger via
47
+ * `Field.Control`'s wiring, which still forces the trigger into the error
48
+ * state — suppress the inferred error by passing `validation` on `Field.Item`
49
+ * if a non-error `Select.Root` state needs to win in that case.
50
+ *
51
+ * `Select.Content` renders at Tailwind `z-50`, Mantle's shared floating
52
+ * z-index. When multiple shared layers are open, the most recently mounted
53
+ * layer renders on top.
54
+ *
55
+ * @see https://mantle.ngrok.com/components/forms/select#selectroot
56
+ *
57
+ * @example
58
+ * ```tsx
59
+ * <Select.Root>
60
+ * <Select.Trigger>
61
+ * <Select.Value placeholder="Select a fruit" />
62
+ * </Select.Trigger>
63
+ * <Select.Content>
64
+ * <Select.Group>
65
+ * <Select.Label>Fruits</Select.Label>
66
+ * <Select.Item value="apple">Apple</Select.Item>
67
+ * <Select.Item value="banana">Banana</Select.Item>
68
+ * <Select.Item value="cherry">Cherry</Select.Item>
69
+ * </Select.Group>
70
+ * <Select.Separator />
71
+ * <Select.Group>
72
+ * <Select.Label>Veggies</Select.Label>
73
+ * <Select.Item value="carrot">Carrot</Select.Item>
74
+ * <Select.Item value="cucumber">Cucumber</Select.Item>
75
+ * </Select.Group>
76
+ * </Select.Content>
77
+ * </Select.Root>
78
+ * ```
79
+ */
80
+ declare const Root: ({ "aria-invalid": _ariaInvalid, children, id, validation, onBlur, onValueChange, onChange, ref, ...props }: SelectProps) => import("react").JSX.Element;
81
+ /**
82
+ * A group of related options within a select menu. Similar to an html `<optgroup>` element.
83
+ * Use in conjunction with Select.Label to ensure good accessibility via automatic labelling.
84
+ *
85
+ * @see https://mantle.ngrok.com/components/forms/select#selectgroup
86
+ *
87
+ * @example
88
+ * ```tsx
89
+ * <Select.Root>
90
+ * <Select.Trigger>
91
+ * <Select.Value placeholder="Select a fruit" />
92
+ * </Select.Trigger>
93
+ * <Select.Content>
94
+ * <Select.Group>
95
+ * <Select.Label>Fruits</Select.Label>
96
+ * <Select.Item value="apple">Apple</Select.Item>
97
+ * <Select.Item value="banana">Banana</Select.Item>
98
+ * <Select.Item value="cherry">Cherry</Select.Item>
99
+ * </Select.Group>
100
+ * <Select.Separator />
101
+ * <Select.Group>
102
+ * <Select.Label>Veggies</Select.Label>
103
+ * <Select.Item value="carrot">Carrot</Select.Item>
104
+ * <Select.Item value="cucumber">Cucumber</Select.Item>
105
+ * </Select.Group>
106
+ * </Select.Content>
107
+ * </Select.Root>
108
+ * ```
109
+ */
110
+ declare const Group: ({ className, ref, ...props }: ComponentProps<typeof SelectPrimitive.Group>) => import("react").JSX.Element;
111
+ type SelectTriggerProps = ComponentProps<typeof SelectPrimitive.Trigger> & WithAriaInvalid & WithValidation;
112
+ /**
113
+ * The button that toggles the select. The Select.Content will position itself adjacent to the trigger.
114
+ * When composing with `Field.Item`, wrap `Select.Root` in `Field.Control` —
115
+ * the generated `id`, `name`, and `aria-invalid` flow onto `Select.Root` (so
116
+ * the hidden form input gets the field name), and the trigger reads
117
+ * `aria-describedby` / `aria-errormessage` from `FieldControlContext`.
118
+ *
119
+ * @see https://mantle.ngrok.com/components/forms/select#selecttrigger
120
+ *
121
+ * @example
122
+ * ```tsx
123
+ * <Select.Root>
124
+ * <Select.Trigger>
125
+ * <Select.Value placeholder="Select a fruit" />
126
+ * </Select.Trigger>
127
+ * <Select.Content>
128
+ * <Select.Group>
129
+ * <Select.Label>Fruits</Select.Label>
130
+ * <Select.Item value="apple">Apple</Select.Item>
131
+ * <Select.Item value="banana">Banana</Select.Item>
132
+ * <Select.Item value="cherry">Cherry</Select.Item>
133
+ * </Select.Group>
134
+ * <Select.Separator />
135
+ * <Select.Group>
136
+ * <Select.Label>Veggies</Select.Label>
137
+ * <Select.Item value="carrot">Carrot</Select.Item>
138
+ * <Select.Item value="cucumber">Cucumber</Select.Item>
139
+ * </Select.Group>
140
+ * </Select.Content>
141
+ * </Select.Root>
142
+ * ```
143
+ */
144
+ declare const Trigger: ({ "aria-invalid": ariaInValidProp, className, children, id: propId, ref, validation: propValidation, ...props }: SelectTriggerProps) => import("react").JSX.Element;
145
+ type SelectContentProps = ComponentProps<typeof SelectPrimitive.Content> & {
146
+ /**
147
+ * The width of the content. Defaults to the width of the trigger.
148
+ * If set to "content", the content will use the intrinsic content width; it will be the width of the longest/widest item.
149
+ * @default "trigger"
150
+ */
151
+ width?: "trigger" | "content";
152
+ };
153
+ /**
154
+ * The component that pops out when the select is open as a portal adjacent to the trigger button.
155
+ * It contains a scrolling viewport of the select items.
156
+ *
157
+ * `Select.Content` renders at Tailwind `z-50`, Mantle's shared floating
158
+ * z-index. When multiple shared layers are open, the most recently mounted
159
+ * layer renders on top.
160
+ *
161
+ * @see https://mantle.ngrok.com/components/forms/select#selectcontent
162
+ *
163
+ * @example
164
+ * ```tsx
165
+ * <Select.Root>
166
+ * <Select.Trigger>
167
+ * <Select.Value placeholder="Select a fruit" />
168
+ * </Select.Trigger>
169
+ * <Select.Content>
170
+ * <Select.Group>
171
+ * <Select.Label>Fruits</Select.Label>
172
+ * <Select.Item value="apple">Apple</Select.Item>
173
+ * <Select.Item value="banana">Banana</Select.Item>
174
+ * <Select.Item value="cherry">Cherry</Select.Item>
175
+ * </Select.Group>
176
+ * <Select.Separator />
177
+ * <Select.Group>
178
+ * <Select.Label>Veggies</Select.Label>
179
+ * <Select.Item value="carrot">Carrot</Select.Item>
180
+ * <Select.Item value="cucumber">Cucumber</Select.Item>
181
+ * </Select.Group>
182
+ * </Select.Content>
183
+ * </Select.Root>
184
+ * ```
185
+ */
186
+ declare const Content: ({ className, children, position, ref, width, ...props }: SelectContentProps) => import("react").JSX.Element;
187
+ /**
188
+ * Used to render the label of a group. It won't be focusable using arrow keys.
189
+ *
190
+ * @see https://mantle.ngrok.com/components/forms/select#selectlabel
191
+ *
192
+ * @example
193
+ * ```tsx
194
+ * <Select.Root>
195
+ * <Select.Trigger>
196
+ * <Select.Value placeholder="Select a fruit" />
197
+ * </Select.Trigger>
198
+ * <Select.Content>
199
+ * <Select.Group>
200
+ * <Select.Label>Fruits</Select.Label>
201
+ * <Select.Item value="apple">Apple</Select.Item>
202
+ * <Select.Item value="banana">Banana</Select.Item>
203
+ * <Select.Item value="cherry">Cherry</Select.Item>
204
+ * </Select.Group>
205
+ * <Select.Separator />
206
+ * <Select.Group>
207
+ * <Select.Label>Veggies</Select.Label>
208
+ * <Select.Item value="carrot">Carrot</Select.Item>
209
+ * <Select.Item value="cucumber">Cucumber</Select.Item>
210
+ * </Select.Group>
211
+ * </Select.Content>
212
+ * </Select.Root>
213
+ * ```
214
+ */
215
+ declare const Label: ({ className, ref, ...props }: ComponentProps<typeof SelectPrimitive.Label>) => import("react").JSX.Element;
216
+ type SelectItemProps = ComponentProps<typeof SelectPrimitive.Item> & {
217
+ icon?: ReactNode;
218
+ };
219
+ /**
220
+ * An option within a select menu. Similar to an html `<option>` element.
221
+ * Has a required `value` prop that will be passed to the `onChange` handler of the `Select` component when this item is selected.
222
+ * Displays the children as the option's text.
223
+ *
224
+ * @see https://mantle.ngrok.com/components/forms/select#selectitem
225
+ *
226
+ * @example
227
+ * ```tsx
228
+ * <Select.Root>
229
+ * <Select.Trigger>
230
+ * <Select.Value placeholder="Select a fruit" />
231
+ * </Select.Trigger>
232
+ * <Select.Content>
233
+ * <Select.Group>
234
+ * <Select.Label>Fruits</Select.Label>
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.Group>
239
+ * <Select.Separator />
240
+ * <Select.Group>
241
+ * <Select.Label>Veggies</Select.Label>
242
+ * <Select.Item value="carrot">Carrot</Select.Item>
243
+ * <Select.Item value="cucumber">Cucumber</Select.Item>
244
+ * </Select.Group>
245
+ * </Select.Content>
246
+ * </Select.Root>
247
+ * ```
248
+ */
249
+ declare const Item: ({ className, children, icon, ref, ...props }: SelectItemProps) => import("react").JSX.Element;
250
+ /**
251
+ * Used to visually separate items or groups of items in the select content.
252
+ *
253
+ * @see https://mantle.ngrok.com/components/forms/select#selectseparator
254
+ *
255
+ * @example
256
+ * ```tsx
257
+ * <Select.Root>
258
+ * <Select.Trigger>
259
+ * <Select.Value placeholder="Select a fruit" />
260
+ * </Select.Trigger>
261
+ * <Select.Content>
262
+ * <Select.Group>
263
+ * <Select.Label>Fruits</Select.Label>
264
+ * <Select.Item value="apple">Apple</Select.Item>
265
+ * <Select.Item value="banana">Banana</Select.Item>
266
+ * <Select.Item value="cherry">Cherry</Select.Item>
267
+ * </Select.Group>
268
+ * <Select.Separator />
269
+ * <Select.Group>
270
+ * <Select.Label>Veggies</Select.Label>
271
+ * <Select.Item value="carrot">Carrot</Select.Item>
272
+ * <Select.Item value="cucumber">Cucumber</Select.Item>
273
+ * </Select.Group>
274
+ * </Select.Content>
275
+ * </Select.Root>
276
+ * ```
277
+ */
278
+ declare const SelectSeparatorComponent: ({ className, ref, ...props }: ComponentProps<typeof Separator>) => import("react").JSX.Element;
279
+ /**
280
+ * Displays a list of options for the user to pick from—triggered by a button.
281
+ *
282
+ * Use Select for a small, finite list of options (~2-15) where the user picks exactly one
283
+ * and search/filtering is unnecessary. For larger lists or async/searchable data, use
284
+ * Combobox. For picking multiple options, use MultiSelect.
285
+ *
286
+ * `Select.Content` renders at Tailwind `z-50`, Mantle's shared floating
287
+ * z-index. When multiple shared layers are open, the most recently mounted
288
+ * layer renders on top.
289
+ *
290
+ * @see https://mantle.ngrok.com/components/forms/select
291
+ *
292
+ * @example
293
+ * Composition:
294
+ * ```
295
+ * Select.Root
296
+ * ├── Select.Trigger
297
+ * │ └── Select.Value
298
+ * └── Select.Content
299
+ * ├── Select.Group
300
+ * │ ├── Select.Label
301
+ * │ └── Select.Item
302
+ * └── Select.Separator
303
+ * ```
304
+ *
305
+ * @example
306
+ * ```tsx
307
+ * <Select.Root>
308
+ * <Select.Trigger>
309
+ * <Select.Value placeholder="Select a fruit" />
310
+ * </Select.Trigger>
311
+ * <Select.Content>
312
+ * <Select.Group>
313
+ * <Select.Label>Fruits</Select.Label>
314
+ * <Select.Item value="apple">Apple</Select.Item>
315
+ * <Select.Item value="banana">Banana</Select.Item>
316
+ * <Select.Item value="cherry">Cherry</Select.Item>
317
+ * </Select.Group>
318
+ * <Select.Separator />
319
+ * <Select.Group>
320
+ * <Select.Label>Veggies</Select.Label>
321
+ * <Select.Item value="carrot">Carrot</Select.Item>
322
+ * <Select.Item value="cucumber">Cucumber</Select.Item>
323
+ * </Select.Group>
324
+ * </Select.Content>
325
+ * </Select.Root>
326
+ * ```
327
+ */
328
+ declare const Select: {
329
+ /**
330
+ * Displays a list of options for the user to pick from—triggered by a button.
331
+ *
332
+ * Use Select for a small, finite list of options (~2-15) where the user picks exactly one
333
+ * and search/filtering is unnecessary. For larger lists or async/searchable data, use
334
+ * Combobox. For picking multiple options, use MultiSelect.
335
+ *
336
+ * `Select.Content` renders at Tailwind `z-50`, Mantle's shared floating
337
+ * z-index. When multiple shared layers are open, the most recently mounted
338
+ * layer renders on top.
339
+ *
340
+ * @see https://mantle.ngrok.com/components/forms/select#selectroot
341
+ *
342
+ * @example
343
+ * ```tsx
344
+ * <Select.Root>
345
+ * <Select.Trigger>
346
+ * <Select.Value placeholder="Select a fruit" />
347
+ * </Select.Trigger>
348
+ * <Select.Content>
349
+ * <Select.Group>
350
+ * <Select.Label>Fruits</Select.Label>
351
+ * <Select.Item value="apple">Apple</Select.Item>
352
+ * <Select.Item value="banana">Banana</Select.Item>
353
+ * <Select.Item value="cherry">Cherry</Select.Item>
354
+ * </Select.Group>
355
+ * <Select.Separator />
356
+ * <Select.Group>
357
+ * <Select.Label>Veggies</Select.Label>
358
+ * <Select.Item value="carrot">Carrot</Select.Item>
359
+ * <Select.Item value="cucumber">Cucumber</Select.Item>
360
+ * </Select.Group>
361
+ * </Select.Content>
362
+ * </Select.Root>
363
+ * ```
364
+ */
365
+ readonly Root: typeof Root;
366
+ /**
367
+ * The component that pops out when the select is open as a portal adjacent to the trigger button.
368
+ * It contains a scrolling viewport of the select items.
369
+ *
370
+ * `Select.Content` renders at Tailwind `z-50`, Mantle's shared floating
371
+ * z-index. When multiple shared layers are open, the most recently mounted
372
+ * layer renders on top.
373
+ *
374
+ * @see https://mantle.ngrok.com/components/forms/select#selectcontent
375
+ *
376
+ * @example
377
+ * ```tsx
378
+ * <Select.Root>
379
+ * <Select.Trigger>
380
+ * <Select.Value placeholder="Select a fruit" />
381
+ * </Select.Trigger>
382
+ * <Select.Content>
383
+ * <Select.Group>
384
+ * <Select.Label>Fruits</Select.Label>
385
+ * <Select.Item value="apple">Apple</Select.Item>
386
+ * <Select.Item value="banana">Banana</Select.Item>
387
+ * <Select.Item value="cherry">Cherry</Select.Item>
388
+ * </Select.Group>
389
+ * <Select.Separator />
390
+ * <Select.Group>
391
+ * <Select.Label>Veggies</Select.Label>
392
+ * <Select.Item value="carrot">Carrot</Select.Item>
393
+ * <Select.Item value="cucumber">Cucumber</Select.Item>
394
+ * </Select.Group>
395
+ * </Select.Content>
396
+ * </Select.Root>
397
+ * ```
398
+ */
399
+ readonly Content: typeof Content;
400
+ /**
401
+ * A group of related options within a select menu. Similar to an html `<optgroup>` element.
402
+ * Use in conjunction with Select.Label to ensure good accessibility via automatic labelling.
403
+ *
404
+ * @see https://mantle.ngrok.com/components/forms/select#selectgroup
405
+ *
406
+ * @example
407
+ * ```tsx
408
+ * <Select.Root>
409
+ * <Select.Trigger>
410
+ * <Select.Value placeholder="Select a fruit" />
411
+ * </Select.Trigger>
412
+ * <Select.Content>
413
+ * <Select.Group>
414
+ * <Select.Label>Fruits</Select.Label>
415
+ * <Select.Item value="apple">Apple</Select.Item>
416
+ * <Select.Item value="banana">Banana</Select.Item>
417
+ * <Select.Item value="cherry">Cherry</Select.Item>
418
+ * </Select.Group>
419
+ * <Select.Separator />
420
+ * <Select.Group>
421
+ * <Select.Label>Veggies</Select.Label>
422
+ * <Select.Item value="carrot">Carrot</Select.Item>
423
+ * <Select.Item value="cucumber">Cucumber</Select.Item>
424
+ * </Select.Group>
425
+ * </Select.Content>
426
+ * </Select.Root>
427
+ * ```
428
+ */
429
+ readonly Group: typeof Group;
430
+ /**
431
+ * An option within a select menu. Similar to an html `<option>` element.
432
+ * Has a required `value` prop that will be passed to the `onChange` handler of the `Select` component when this item is selected.
433
+ * Displays the children as the option's text.
434
+ *
435
+ * @see https://mantle.ngrok.com/components/forms/select#selectitem
436
+ *
437
+ * @example
438
+ * ```tsx
439
+ * <Select.Root>
440
+ * <Select.Trigger>
441
+ * <Select.Value placeholder="Select a fruit" />
442
+ * </Select.Trigger>
443
+ * <Select.Content>
444
+ * <Select.Group>
445
+ * <Select.Label>Fruits</Select.Label>
446
+ * <Select.Item value="apple">Apple</Select.Item>
447
+ * <Select.Item value="banana">Banana</Select.Item>
448
+ * <Select.Item value="cherry">Cherry</Select.Item>
449
+ * </Select.Group>
450
+ * <Select.Separator />
451
+ * <Select.Group>
452
+ * <Select.Label>Veggies</Select.Label>
453
+ * <Select.Item value="carrot">Carrot</Select.Item>
454
+ * <Select.Item value="cucumber">Cucumber</Select.Item>
455
+ * </Select.Group>
456
+ * </Select.Content>
457
+ * </Select.Root>
458
+ * ```
459
+ */
460
+ readonly Item: typeof Item;
461
+ /**
462
+ * Used to render the label of a group. It won't be focusable using arrow keys.
463
+ *
464
+ * @see https://mantle.ngrok.com/components/forms/select#selectlabel
465
+ *
466
+ * @example
467
+ * ```tsx
468
+ * <Select.Root>
469
+ * <Select.Trigger>
470
+ * <Select.Value placeholder="Select a fruit" />
471
+ * </Select.Trigger>
472
+ * <Select.Content>
473
+ * <Select.Group>
474
+ * <Select.Label>Fruits</Select.Label>
475
+ * <Select.Item value="apple">Apple</Select.Item>
476
+ * <Select.Item value="banana">Banana</Select.Item>
477
+ * <Select.Item value="cherry">Cherry</Select.Item>
478
+ * </Select.Group>
479
+ * <Select.Separator />
480
+ * <Select.Group>
481
+ * <Select.Label>Veggies</Select.Label>
482
+ * <Select.Item value="carrot">Carrot</Select.Item>
483
+ * <Select.Item value="cucumber">Cucumber</Select.Item>
484
+ * </Select.Group>
485
+ * </Select.Content>
486
+ * </Select.Root>
487
+ * ```
488
+ */
489
+ readonly Label: typeof Label;
490
+ /**
491
+ * Used to visually separate items or groups of items in the select content.
492
+ *
493
+ * @see https://mantle.ngrok.com/components/forms/select#selectseparator
494
+ *
495
+ * @example
496
+ * ```tsx
497
+ * <Select.Root>
498
+ * <Select.Trigger>
499
+ * <Select.Value placeholder="Select a fruit" />
500
+ * </Select.Trigger>
501
+ * <Select.Content>
502
+ * <Select.Group>
503
+ * <Select.Label>Fruits</Select.Label>
504
+ * <Select.Item value="apple">Apple</Select.Item>
505
+ * <Select.Item value="banana">Banana</Select.Item>
506
+ * <Select.Item value="cherry">Cherry</Select.Item>
507
+ * </Select.Group>
508
+ * <Select.Separator />
509
+ * <Select.Group>
510
+ * <Select.Label>Veggies</Select.Label>
511
+ * <Select.Item value="carrot">Carrot</Select.Item>
512
+ * <Select.Item value="cucumber">Cucumber</Select.Item>
513
+ * </Select.Group>
514
+ * </Select.Content>
515
+ * </Select.Root>
516
+ * ```
517
+ */
518
+ readonly Separator: typeof SelectSeparatorComponent;
519
+ /**
520
+ * The button that toggles the select. The Select.Content will position itself adjacent to the trigger.
521
+ *
522
+ * @see https://mantle.ngrok.com/components/forms/select#selecttrigger
523
+ *
524
+ * @example
525
+ * ```tsx
526
+ * <Select.Root>
527
+ * <Select.Trigger>
528
+ * <Select.Value placeholder="Select a fruit" />
529
+ * </Select.Trigger>
530
+ * <Select.Content>
531
+ * <Select.Group>
532
+ * <Select.Label>Fruits</Select.Label>
533
+ * <Select.Item value="apple">Apple</Select.Item>
534
+ * <Select.Item value="banana">Banana</Select.Item>
535
+ * <Select.Item value="cherry">Cherry</Select.Item>
536
+ * </Select.Group>
537
+ * <Select.Separator />
538
+ * <Select.Group>
539
+ * <Select.Label>Veggies</Select.Label>
540
+ * <Select.Item value="carrot">Carrot</Select.Item>
541
+ * <Select.Item value="cucumber">Cucumber</Select.Item>
542
+ * </Select.Group>
543
+ * </Select.Content>
544
+ * </Select.Root>
545
+ * ```
546
+ */
547
+ readonly Trigger: typeof Trigger;
548
+ /**
549
+ * 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.
550
+ *
551
+ * @see https://mantle.ngrok.com/components/forms/select#selectvalue
552
+ *
553
+ * @example
554
+ * ```tsx
555
+ * <Select.Root>
556
+ * <Select.Trigger>
557
+ * <Select.Value placeholder="Select a fruit" />
558
+ * </Select.Trigger>
559
+ * <Select.Content>
560
+ * <Select.Group>
561
+ * <Select.Label>Fruits</Select.Label>
562
+ * <Select.Item value="apple">Apple</Select.Item>
563
+ * <Select.Item value="banana">Banana</Select.Item>
564
+ * <Select.Item value="cherry">Cherry</Select.Item>
565
+ * </Select.Group>
566
+ * <Select.Separator />
567
+ * <Select.Group>
568
+ * <Select.Label>Veggies</Select.Label>
569
+ * <Select.Item value="carrot">Carrot</Select.Item>
570
+ * <Select.Item value="cucumber">Cucumber</Select.Item>
571
+ * </Select.Group>
572
+ * </Select.Content>
573
+ * </Select.Root>
574
+ * ```
575
+ */
576
+ readonly Value: import("react").ForwardRefExoticComponent<SelectPrimitive.SelectValueProps & import("react").RefAttributes<HTMLSpanElement>>;
577
+ };
578
+ //#endregion
579
+ export { Select as t };
@@ -0,0 +1 @@
1
+ import{t as e}from"./compose-refs-BdBMM9ga.js";import{t}from"./cx-IiQEAKf5.js";import{t as n}from"./icon-lZ48P8Nn.js";import{a as r,r as i}from"./field-Bpptk_9t.js";import{t as a}from"./field-B1wqeZr4.js";import{n as o}from"./separator-bpE_kooz.js";import{CaretDownIcon as s}from"@phosphor-icons/react/CaretDown";import{createContext as c,useContext as l,useMemo as u}from"react";import{jsx as d,jsxs as f}from"react/jsx-runtime";import{CheckIcon as p}from"@phosphor-icons/react/Check";import{CaretUpIcon as m}from"@phosphor-icons/react/CaretUp";import*as h from"@radix-ui/react-select";const g=c({}),_=({"aria-invalid":e,children:t,id:n,validation:r,onBlur:i,onValueChange:a,onChange:o,ref:s,...c})=>{let l=u(()=>({"aria-invalid":e,id:n,validation:r,onBlur:i,ref:s}),[e,n,r,i,s]);return d(h.Root,{...c,onValueChange:e=>{o?.(e),a?.(e)},children:d(g.Provider,{value:l,children:t})})},v=({className:e,ref:n,...r})=>d(h.Group,{ref:n,"data-slot":`select-group`,className:t(`space-y-px`,e),...r}),y=h.Value,b=({"aria-invalid":o,className:c,children:u,id:p,ref:m,validation:_,...v})=>{let y=l(g),b=l(a),x=r(),{ariaInvalid:S,validation:C}=i({"aria-invalid":b?b[`aria-invalid`]:y[`aria-invalid`]??o,validation:y.validation??_??x}),w=b?b.id:y.id??p;return f(h.Trigger,{"data-slot":`select-trigger`,className:t(`h-9 text-sm`,`border-form bg-form text-strong font-sans placeholder:text-placeholder hover:bg-form-hover hover:text-strong flex w-full items-center justify-between gap-1.5 rounded-md border px-3 py-2 disabled:pointer-events-none disabled:opacity-50 [&>span]:line-clamp-1 [&>span]:text-left`,`hover:border-neutral-400`,`focus:outline-hidden focus:ring-4 aria-expanded:ring-4`,`focus:border-accent-600 focus:ring-focus-accent aria-expanded:border-accent-600 aria-expanded:ring-focus-accent`,`data-validation-success:border-success-600 data-validation-success:focus:border-success-600 data-validation-success:focus:ring-focus-success data-validation-success:aria-expanded:border-success-600 data-validation-success:aria-expanded:ring-focus-success`,`data-validation-warning:border-warning-600 data-validation-warning:focus:border-warning-600 data-validation-warning:focus:ring-focus-warning data-validation-warning:aria-expanded:border-warning-600 data-validation-warning:aria-expanded:ring-focus-warning`,`data-validation-error:border-danger-600 data-validation-error:focus:border-danger-600 data-validation-error:focus:ring-focus-danger data-validation-error:aria-expanded:border-danger-600 data-validation-error:aria-expanded:ring-focus-danger`,c),"data-validation":C||void 0,id:w,ref:e(m,y.ref),...v,...b?{"aria-describedby":b[`aria-describedby`],"aria-errormessage":b[`aria-errormessage`]}:void 0,"aria-invalid":S,children:[u,d(h.Icon,{asChild:!0,children:d(n,{svg:d(s,{weight:`bold`}),className:`size-4`})})]})},x=({className:e,ref:r,...i})=>d(h.ScrollUpButton,{ref:r,className:t(`flex cursor-default items-center justify-center py-1`,e),...i,children:d(n,{svg:d(m,{weight:`bold`}),className:`size-4`})}),S=({className:e,ref:r,...i})=>d(h.ScrollDownButton,{ref:r,className:t(`flex cursor-default items-center justify-center py-1`,e),...i,children:d(n,{svg:d(s,{weight:`bold`}),className:`size-4`})}),C={Root:_,Content:({className:e,children:n,position:r=`popper`,ref:i,width:a=`trigger`,...o})=>d(h.Portal,{children:f(h.Content,{ref:i,"data-slot":`select-content`,className:t(`border-popover 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 data-state-closed:animate-out data-state-closed:fade-out-0 data-state-closed:zoom-out-95 data-state-open:animate-in data-state-open:fade-in-0 data-state-open:zoom-in-95 relative z-50 max-h-96 min-w-32 overflow-hidden rounded-md border shadow-md`,`bg-popover font-sans`,r===`popper`&&`data-side-bottom:translate-y-2 data-side-left:-translate-x-2 data-side-right:translate-x-2 data-side-top:-translate-y-2 max-h-(--radix-select-content-available-height)`,a===`trigger`&&`w-(--radix-select-trigger-width)`,e),position:r,...o,children:[d(x,{}),d(h.Viewport,{className:t(`p-1 space-y-px`,r===`popper`&&`h-(--radix-select-trigger-height) w-full`),children:n}),d(S,{})]})}),Group:v,Item:({className:e,children:r,icon:i,ref:a,...o})=>f(h.Item,{ref:a,"data-slot":`select-item`,className:t(`relative flex gap-2 w-full cursor-pointer select-none items-center rounded-md py-1.5 pl-2 pr-8 text-strong text-sm outline-hidden`,`focus:bg-active-menu-item`,`data-disabled:pointer-events-none data-disabled:opacity-50`,`data-state-checked:bg-selected-menu-item`,`focus:data-state-checked:bg-active-selected-menu-item`,e),...o,children:[i&&d(n,{svg:i}),d(h.ItemText,{children:r}),d(h.ItemIndicator,{className:`absolute right-2 flex h-3.5 w-3.5 items-center justify-center`,children:d(n,{svg:d(p,{weight:`bold`}),className:`size-4 text-accent-600`})})]}),Label:({className:e,ref:n,...r})=>d(h.Label,{ref:n,"data-slot":`select-label`,className:t(`px-2 py-1.5 text-sm font-medium`,e),...r}),Separator:({className:e,ref:n,...r})=>d(o,{ref:n,"data-slot":`select-separator`,className:t(`-mx-1 my-1 h-px w-auto`,e),...r}),Trigger:b,Value:y};export{C as t};
package/dist/select.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { t as Select } from "./select-Bwt2YduR.js";
1
+ import { t as Select } from "./select-0z7HVS6r.js";
2
2
  export { Select };
package/dist/select.js CHANGED
@@ -1 +1 @@
1
- import{t as e}from"./select-D-5u0Blc.js";export{e as Select};
1
+ import{t as e}from"./select-BCHWvmyC.js";export{e as Select};