@ngrok/mantle 0.79.2 → 0.80.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 (196) hide show
  1. package/dist/accordion.d.ts +169 -12
  2. package/dist/accordion.js +1 -1
  3. package/dist/agent.json +1 -1
  4. package/dist/alert-dialog.d.ts +496 -30
  5. package/dist/alert-dialog.js +1 -1
  6. package/dist/alert.d.ts +129 -9
  7. package/dist/alert.js +1 -1
  8. package/dist/anchor-_2meGDfj.js +1 -0
  9. package/dist/anchor.d.ts +2 -2
  10. package/dist/anchor.js +1 -1
  11. package/dist/as-child-D23mGo4f.d.ts +49 -0
  12. package/dist/badge.d.ts +44 -5
  13. package/dist/badge.js +1 -1
  14. package/dist/breadcrumb.d.ts +214 -14
  15. package/dist/breadcrumb.js +1 -1
  16. package/dist/button-5WsvzIQ6.js +1 -0
  17. package/dist/{button-DcXOWUYo.d.ts → button-BPMwa2jN.d.ts} +3 -3
  18. package/dist/button-D9n09xUg.js +1 -0
  19. package/dist/button.d.ts +3 -3
  20. package/dist/button.js +1 -1
  21. package/dist/calendar.d.ts +0 -3
  22. package/dist/calendar.js +1 -1
  23. package/dist/card.d.ts +146 -9
  24. package/dist/card.js +1 -1
  25. package/dist/centered-layout.d.ts +224 -8
  26. package/dist/centered-layout.js +1 -1
  27. package/dist/checkbox-Cq17y0-R.js +1 -0
  28. package/dist/checkbox.d.ts +12 -10
  29. package/dist/checkbox.js +1 -1
  30. package/dist/choice-Cc8dA5r8.js +1 -0
  31. package/dist/choice-Ct0KK8jw.d.ts +269 -0
  32. package/dist/choice.d.ts +1 -252
  33. package/dist/choice.js +1 -1
  34. package/dist/code-block.d.ts +270 -50
  35. package/dist/code-block.js +6 -6
  36. package/dist/code-block_highlight-utils.js +1 -1
  37. package/dist/code.d.ts +3 -2
  38. package/dist/code.js +1 -1
  39. package/dist/combobox.d.ts +190 -11
  40. package/dist/combobox.js +1 -1
  41. package/dist/command.d.ts +285 -81
  42. package/dist/command.js +1 -1
  43. package/dist/compose-refs-BdBMM9ga.js +1 -0
  44. package/dist/data-table.d.ts +33 -5
  45. package/dist/data-table.js +1 -1
  46. package/dist/description-list.d.ts +79 -6
  47. package/dist/description-list.js +1 -1
  48. package/dist/dialog-CQ2C6vkE.js +1 -0
  49. package/dist/dialog.d.ts +239 -18
  50. package/dist/dialog.js +1 -1
  51. package/dist/dropdown-menu-CSCDdA3K.js +1 -0
  52. package/dist/{dropdown-menu-DP_Ne9Mr.d.ts → dropdown-menu-CoyozLzy.d.ts} +170 -29
  53. package/dist/dropdown-menu.d.ts +2 -2
  54. package/dist/dropdown-menu.js +1 -1
  55. package/dist/empty.d.ts +1 -1
  56. package/dist/empty.js +1 -1
  57. package/dist/field.d.ts +596 -45
  58. package/dist/field.js +1 -1
  59. package/dist/flag.d.ts +0 -3
  60. package/dist/flag.js +1 -1
  61. package/dist/hooks.d.ts +3 -4
  62. package/dist/hooks.js +1 -1
  63. package/dist/hover-card.d.ts +54 -4
  64. package/dist/hover-card.js +1 -1
  65. package/dist/{icon-Cevjo93X.d.ts → icon-BDqpcZ-n.d.ts} +1 -1
  66. package/dist/icon-CGgMKpJg.js +1 -0
  67. package/dist/{icon-button-B7uEj1qq.d.ts → icon-button-C1AfGnQx.d.ts} +11 -60
  68. package/dist/icon-button-DiOhreJD.js +1 -0
  69. package/dist/icon.d.ts +2 -2
  70. package/dist/icon.js +1 -1
  71. package/dist/icons.d.ts +5 -13
  72. package/dist/icons.js +1 -1
  73. package/dist/{in-view-nkSOdED2.d.ts → in-view-DDEGUKDR.d.ts} +17 -9
  74. package/dist/index-B8mIWKIU.d.ts +211 -0
  75. package/dist/{index-Rv8RL7xy.d.ts → index-BtwKJTLq.d.ts} +1 -1
  76. package/dist/{index-BivvYYs-.d.ts → index-C2jj8U4a.d.ts} +8 -5
  77. package/dist/index-CdPXa9h1.d.ts +1 -0
  78. package/dist/{index-D47aqlpz.d.ts → index-DA4ig3gj.d.ts} +1 -1
  79. package/dist/input-CVyAVbim.js +1 -0
  80. package/dist/{types-C19IR7jf.d.ts → input-DV9M6K4v.d.ts} +42 -2
  81. package/dist/input.d.ts +4 -55
  82. package/dist/input.js +1 -1
  83. package/dist/{label-v2-bv98k.d.ts → label-C6YH9skg.d.ts} +8 -6
  84. package/dist/label-D-D11mlp.js +1 -0
  85. package/dist/label.d.ts +1 -1
  86. package/dist/label.js +1 -1
  87. package/dist/list.d.ts +150 -6
  88. package/dist/list.js +1 -1
  89. package/dist/llms.txt +1 -1
  90. package/dist/main.d.ts +20 -4
  91. package/dist/main.js +1 -1
  92. package/dist/mantle.css +21 -7
  93. package/dist/media-object.d.ts +27 -4
  94. package/dist/media-object.js +1 -1
  95. package/dist/multi-select.d.ts +312 -15
  96. package/dist/multi-select.js +1 -1
  97. package/dist/otp-input.d.ts +129 -5
  98. package/dist/otp-input.js +1 -1
  99. package/dist/pagination.d.ts +70 -6
  100. package/dist/pagination.js +1 -1
  101. package/dist/popover-CBMADtjV.js +1 -0
  102. package/dist/popover.d.ts +1 -181
  103. package/dist/popover.js +1 -1
  104. package/dist/primitive-CJRIlrLz.d.ts +31 -0
  105. package/dist/primitive-DCPHJsRs.js +1 -0
  106. package/dist/progress.js +1 -1
  107. package/dist/qr-code.d.ts +113 -5
  108. package/dist/qr-code.js +1 -1
  109. package/dist/radio-group.d.ts +128 -23
  110. package/dist/radio-group.js +1 -1
  111. package/dist/{resolve-pre-rendered-props-C3e5Auo3.js → resolve-pre-rendered-props-C9uaM9-V.js} +1 -1
  112. package/dist/sandboxed-on-click.d.ts +2 -2
  113. package/dist/sandboxed-on-click.js +1 -1
  114. package/dist/select-SR_9-bxA.js +1 -0
  115. package/dist/select-idm1jy7y.d.ts +600 -0
  116. package/dist/select.d.ts +1 -1
  117. package/dist/select.js +1 -1
  118. package/dist/selectable-list.d.ts +252 -298
  119. package/dist/selectable-list.js +1 -1
  120. package/dist/separator-B5UmkVRL.d.ts +75 -0
  121. package/dist/separator-bpE_kooz.js +1 -0
  122. package/dist/separator.d.ts +1 -52
  123. package/dist/separator.js +1 -1
  124. package/dist/sheet.d.ts +295 -21
  125. package/dist/sheet.js +1 -1
  126. package/dist/skeleton-CsbUHbBA.js +1 -0
  127. package/dist/skeleton.d.ts +4 -7
  128. package/dist/skeleton.js +1 -1
  129. package/dist/skip-to-main-link.d.ts +24 -4
  130. package/dist/skip-to-main-link.js +1 -1
  131. package/dist/slot-CDk0Bb9z.js +1 -0
  132. package/dist/slot.d.ts +1 -1
  133. package/dist/slot.js +1 -1
  134. package/dist/{sort-BPX2Fk9t.js → sort-B_DDQcVD.js} +1 -1
  135. package/dist/split-button.d.ts +28 -13
  136. package/dist/split-button.js +1 -1
  137. package/dist/{svg-only-BFeFS1aa.d.ts → svg-only-CdI_v82i.d.ts} +1 -1
  138. package/dist/svg-only-d-nMCfAI.js +1 -0
  139. package/dist/switch.d.ts +9 -6
  140. package/dist/switch.js +1 -1
  141. package/dist/table-DUSvU_Jw.d.ts +875 -0
  142. package/dist/table-GDkapNFi.js +1 -0
  143. package/dist/table.d.ts +1 -1
  144. package/dist/table.js +1 -1
  145. package/dist/tabs.d.ts +139 -12
  146. package/dist/tabs.js +1 -1
  147. package/dist/text-area.d.ts +1 -1
  148. package/dist/text-area.js +1 -1
  149. package/dist/theme-provider-BftkIiZn.js +1 -0
  150. package/dist/theme-switcher.d.ts +110 -29
  151. package/dist/theme-switcher.js +1 -1
  152. package/dist/theme-wVnzzx2F.js +1 -0
  153. package/dist/theme.d.ts +53 -14
  154. package/dist/theme.js +1 -1
  155. package/dist/toast-DKgMRv4F.js +1 -0
  156. package/dist/toast.d.ts +98 -10
  157. package/dist/toast.js +1 -1
  158. package/dist/tooltip.d.ts +28 -1
  159. package/dist/tooltip.js +1 -1
  160. package/dist/{traffic-policy-file-0g5RXFqu.js → traffic-policy-file-CF1lbWtp.js} +1 -1
  161. package/dist/types.d.ts +2 -2
  162. package/dist/utils.d.ts +1 -1
  163. package/dist/utils.js +1 -1
  164. package/dist/virtual-UrzmaSQm.js +1 -0
  165. package/dist/well.d.ts +3 -3
  166. package/dist/well.js +1 -1
  167. package/package.json +5 -5
  168. package/dist/anchor-C_tjSVy6.js +0 -1
  169. package/dist/as-child-CYEVu1WY.d.ts +0 -23
  170. package/dist/button-5t6-JS_I.js +0 -1
  171. package/dist/button-ClC60Nzg.js +0 -1
  172. package/dist/checkbox-DJ2xl7Rc.js +0 -1
  173. package/dist/choice-DOdyNzFC.js +0 -1
  174. package/dist/compose-refs-Cjf2gfB8.js +0 -1
  175. package/dist/dialog-ZCgG41hx.js +0 -1
  176. package/dist/dropdown-menu-Bt1aKF1g.js +0 -1
  177. package/dist/icon-CDtYjF_H.js +0 -1
  178. package/dist/icon-button-DV2-GZHf.js +0 -1
  179. package/dist/index-g2rfwNCH.d.ts +0 -1
  180. package/dist/input-Ct1YOqSy.js +0 -1
  181. package/dist/label-BMlHW_2D.js +0 -1
  182. package/dist/popover-D5WxxnBY.js +0 -1
  183. package/dist/primitive-C64-m48O.d.ts +0 -13
  184. package/dist/primitive-M-kZdNIS.js +0 -1
  185. package/dist/select-Bwt2YduR.d.ts +0 -345
  186. package/dist/select-D-5u0Blc.js +0 -1
  187. package/dist/separator-kBnnv3Cw.js +0 -1
  188. package/dist/skeleton-Bu3tgNcW.js +0 -1
  189. package/dist/slot-DmPrjM7N.js +0 -1
  190. package/dist/svg-only-DDx6FtJd.js +0 -1
  191. package/dist/table-CPH2md2-.js +0 -1
  192. package/dist/table-CwFHXC-G.d.ts +0 -414
  193. package/dist/theme-D8kZCOzM.js +0 -1
  194. package/dist/theme-provider-Djj_jBo6.js +0 -1
  195. package/dist/toast-D3ntBmn4.js +0 -1
  196. package/dist/virtual-DZMBu7Ch.js +0 -1
@@ -1,5 +1,7 @@
1
- import { t as WithAsChild } from "./as-child-CYEVu1WY.js";
1
+ import { n as WithAsChild } from "./as-child-D23mGo4f.js";
2
2
  import { o as WithValidation } from "./validation-7QeiTFwl.js";
3
+ import { n as Separator } from "./separator-B5UmkVRL.js";
4
+ import { ComponentProps } from "react";
3
5
  import * as Primitive from "@ariakit/react";
4
6
  //#region src/components/combobox/combobox.d.ts
5
7
  type ComboboxProps = Primitive.ComboboxProviderProps;
@@ -32,11 +34,191 @@ declare const Root: {
32
34
  displayName: string;
33
35
  };
34
36
  type ComboboxInputProps = Omit<Primitive.ComboboxProps, "render"> & WithValidation;
37
+ /**
38
+ * Renders a combobox input element that can be used to filter a list of items.
39
+ *
40
+ * @see https://mantle.ngrok.com/components/forms/combobox#comboboxinput
41
+ *
42
+ * @example
43
+ * ```tsx
44
+ * <Combobox.Root>
45
+ * <Combobox.Input />
46
+ * <Combobox.Content>
47
+ * <Combobox.Item value="Apple" />
48
+ * <Combobox.Item value="Banana" />
49
+ * </Combobox.Content>
50
+ * </Combobox.Root>
51
+ * ```
52
+ */
53
+ declare const Input: {
54
+ ({ "aria-invalid": _ariaInvalid, autoComplete, autoSelect, className, ref, validation: _validation, ...props }: ComboboxInputProps): import("react").JSX.Element;
55
+ displayName: string;
56
+ };
35
57
  type ComboboxContentProps = Omit<Primitive.ComboboxPopoverProps, "render"> & WithAsChild;
58
+ /**
59
+ * Renders a popover that contains combobox content, e.g. Combobox.Items, Combobox.Groups, and Combobox.Separators.
60
+ *
61
+ * `Combobox.Content` renders at Tailwind `z-50`, Mantle's shared floating
62
+ * z-index. When multiple shared layers are open, the most recently mounted
63
+ * layer renders on top.
64
+ *
65
+ * @see https://mantle.ngrok.com/components/forms/combobox#comboboxcontent
66
+ *
67
+ * @example
68
+ * ```tsx
69
+ * <Combobox.Root>
70
+ * <Combobox.Input />
71
+ * <Combobox.Content>
72
+ * <Combobox.Item value="Apple" />
73
+ * <Combobox.Item value="Banana" />
74
+ * </Combobox.Content>
75
+ * </Combobox.Root>
76
+ * ```
77
+ */
78
+ declare const Content: {
79
+ ({ asChild, children, className, ref, sameWidth, unmountOnHide, ...props }: ComboboxContentProps): import("react").JSX.Element;
80
+ displayName: string;
81
+ };
36
82
  type ComboboxItemProps = Omit<Primitive.ComboboxItemProps, "render"> & WithAsChild;
83
+ /**
84
+ * Renders a combobox item inside a Combobox.Content component.
85
+ *
86
+ * @see https://mantle.ngrok.com/components/forms/combobox#comboboxitem
87
+ *
88
+ * @example
89
+ * ```tsx
90
+ * <Combobox.Root>
91
+ * <Combobox.Input />
92
+ * <Combobox.Content>
93
+ * <Combobox.Item value="Apple" />
94
+ * <Combobox.Item value="Banana" />
95
+ * <Combobox.Item value="Orange" />
96
+ * </Combobox.Content>
97
+ * </Combobox.Root>
98
+ * ```
99
+ */
100
+ declare const Item: {
101
+ ({ asChild, children, className, focusOnHover, ref, value, ...props }: ComboboxItemProps): import("react").JSX.Element;
102
+ displayName: string;
103
+ };
37
104
  type ComboboxGroupProps = Omit<Primitive.ComboboxGroupProps, "render"> & WithAsChild;
105
+ /**
106
+ * Renders a group for Combobox.Item elements.
107
+ *
108
+ * Optionally, a Combobox.GroupLabel can be rendered as a child to provide a label for the group.
109
+ *
110
+ * You should only reach for this component when it semantically makes sense to group items together, such as when a label is needed.
111
+ *
112
+ * @see https://mantle.ngrok.com/components/forms/combobox#comboboxgroup
113
+ *
114
+ * @example
115
+ * ```tsx
116
+ * <Combobox.Root>
117
+ * <Combobox.Input />
118
+ * <Combobox.Content>
119
+ * <Combobox.Group>
120
+ * <Combobox.GroupLabel>Fruits</Combobox.GroupLabel>
121
+ * <Combobox.Item value="Apple" />
122
+ * <Combobox.Item value="Banana" />
123
+ * </Combobox.Group>
124
+ * </Combobox.Content>
125
+ * </Combobox.Root>
126
+ * ```
127
+ */
128
+ declare const Group: {
129
+ ({ asChild, children, className, ref, ...props }: ComboboxGroupProps): import("react").JSX.Element;
130
+ displayName: string;
131
+ };
38
132
  type ComboboxGroupLabelProps = Omit<Primitive.ComboboxGroupLabelProps, "render"> & WithAsChild;
133
+ /**
134
+ * Renders a label in a combobox group.
135
+ *
136
+ * This component should be wrapped with Combobox.Group so the aria-labelledby is correctly set on the group element.
137
+ *
138
+ * You should only reach for this component when it semantically makes sense to group items together, such as when a label is needed.
139
+ *
140
+ * @see https://mantle.ngrok.com/components/forms/combobox#comboboxgrouplabel
141
+ *
142
+ * @example
143
+ * ```tsx
144
+ * <Combobox.Root>
145
+ * <Combobox.Input />
146
+ * <Combobox.Content>
147
+ * <Combobox.Group>
148
+ * <Combobox.GroupLabel>Fruits</Combobox.GroupLabel>
149
+ * <Combobox.Item value="Apple" />
150
+ * <Combobox.Item value="Banana" />
151
+ * </Combobox.Group>
152
+ * </Combobox.Content>
153
+ * </Combobox.Root>
154
+ * ```
155
+ */
156
+ declare const GroupLabel: {
157
+ ({ asChild, children, className, ref, ...props }: ComboboxGroupLabelProps): import("react").JSX.Element;
158
+ displayName: string;
159
+ };
39
160
  type ComboboxItemValueProps = Omit<Primitive.ComboboxItemValueProps<"span">, "render"> & WithAsChild;
161
+ /**
162
+ * Highlights the match between the current Combobox.Input value (userValue) and parent Combobox.Item value.
163
+ *
164
+ * Renders a span element with the combobox item value as children.
165
+ * The value is split into span elements.
166
+ * Portions of the value matching the user input will have a data-user-value attribute, while the rest will have a data-autocomplete-value attribute.
167
+ *
168
+ * Should only be used as a child of Combobox.Item.
169
+ * The item value is automatically set to the value of the closest Combobox.Item component's value prop.
170
+ * The user input value is automatically set to the combobox store's value state.
171
+ * Both values can be overridden by providing the value and userValue props, respectively.
172
+ *
173
+ * @see https://mantle.ngrok.com/components/forms/combobox#comboboxitemvalue
174
+ *
175
+ * @example
176
+ * ```tsx
177
+ * <Combobox.Root>
178
+ * <Combobox.Input />
179
+ * <Combobox.Content>
180
+ * <Combobox.Item value="Apple">
181
+ * 🍎
182
+ * <Combobox.ItemValue />
183
+ * </Combobox.Item>
184
+ * <Combobox.Item value="Banana">
185
+ * 🍌
186
+ * <Combobox.ItemValue />
187
+ * </Combobox.Item>
188
+ * </Combobox.Content>
189
+ * </Combobox.Root>
190
+ * ```
191
+ */
192
+ declare const ItemValue: {
193
+ ({ asChild, className, ref, ...props }: ComboboxItemValueProps): import("react").JSX.Element;
194
+ displayName: string;
195
+ };
196
+ /**
197
+ * Renders a separator between Combobox.Items or Combobox.Groups.
198
+ *
199
+ * @see https://mantle.ngrok.com/components/forms/combobox#comboboxseparator
200
+ *
201
+ * @example
202
+ * ```tsx
203
+ * <Combobox.Root>
204
+ * <Combobox.Input />
205
+ * <Combobox.Content>
206
+ * <Combobox.Group>
207
+ * <Combobox.Item value="Apple" />
208
+ * <Combobox.Item value="Banana" />
209
+ * </Combobox.Group>
210
+ * <Combobox.Separator />
211
+ * <Combobox.Item>
212
+ * Click me!
213
+ * </Combobox.Item>
214
+ * </Combobox.Content>
215
+ * </Combobox.Root>
216
+ * ```
217
+ */
218
+ declare const ComboboxSeparatorComponent: {
219
+ ({ className, ref, ...props }: ComponentProps<typeof Separator>): import("react").JSX.Element;
220
+ displayName: string;
221
+ };
40
222
  /**
41
223
  * Fill in a React input field with autocomplete & autosuggest functionalities.
42
224
  * Choose from a list of suggested values with full keyboard support.
@@ -126,7 +308,7 @@ declare const Combobox: {
126
308
  * </Combobox.Root>
127
309
  * ```
128
310
  */
129
- readonly Content: import("react").ForwardRefExoticComponent<Omit<ComboboxContentProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
311
+ readonly Content: typeof Content;
130
312
  /**
131
313
  * Renders a group for Combobox.Item elements.
132
314
  *
@@ -146,7 +328,7 @@ declare const Combobox: {
146
328
  * </Combobox.Root>
147
329
  * ```
148
330
  */
149
- readonly Group: import("react").ForwardRefExoticComponent<Omit<ComboboxGroupProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
331
+ readonly Group: typeof Group;
150
332
  /**
151
333
  * Renders a label in a combobox group.
152
334
  *
@@ -166,7 +348,7 @@ declare const Combobox: {
166
348
  * </Combobox.Root>
167
349
  * ```
168
350
  */
169
- readonly GroupLabel: import("react").ForwardRefExoticComponent<Omit<ComboboxGroupLabelProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
351
+ readonly GroupLabel: typeof GroupLabel;
170
352
  /**
171
353
  * Renders a combobox input element that can be used to filter a list of items.
172
354
  *
@@ -183,7 +365,7 @@ declare const Combobox: {
183
365
  * </Combobox.Root>
184
366
  * ```
185
367
  */
186
- readonly Input: import("react").ForwardRefExoticComponent<Omit<ComboboxInputProps, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
368
+ readonly Input: typeof Input;
187
369
  /**
188
370
  * Renders a combobox item inside a Combobox.Content component.
189
371
  *
@@ -201,7 +383,7 @@ declare const Combobox: {
201
383
  * </Combobox.Root>
202
384
  * ```
203
385
  */
204
- readonly Item: import("react").ForwardRefExoticComponent<Omit<ComboboxItemProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
386
+ readonly Item: typeof Item;
205
387
  /**
206
388
  * Highlights the match between the current Combobox.Input value and parent Combobox.Item value.
207
389
  *
@@ -224,7 +406,7 @@ declare const Combobox: {
224
406
  * </Combobox.Root>
225
407
  * ```
226
408
  */
227
- readonly ItemValue: import("react").ForwardRefExoticComponent<Omit<ComboboxItemValueProps, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
409
+ readonly ItemValue: typeof ItemValue;
228
410
  /**
229
411
  * Renders a separator between Combobox.Items or Combobox.Groups.
230
412
  *
@@ -247,10 +429,7 @@ declare const Combobox: {
247
429
  * </Combobox.Root>
248
430
  * ```
249
431
  */
250
- readonly Separator: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & WithAsChild & {
251
- orientation?: "horizontal" | "vertical";
252
- semantic?: boolean;
253
- }, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
432
+ readonly Separator: typeof ComboboxSeparatorComponent;
254
433
  };
255
434
  //#endregion
256
435
  export { Combobox };
package/dist/combobox.js CHANGED
@@ -1 +1 @@
1
- import{t as e}from"./cx-IiQEAKf5.js";import{t}from"./slot-DmPrjM7N.js";import{a as n,r}from"./validation-Bpptk_9t.js";import{n as i}from"./separator-kBnnv3Cw.js";import{createContext as a,forwardRef as o}from"react";import{jsx as s}from"react/jsx-runtime";import*as c from"@ariakit/react";const l=({children:e,...t})=>s(c.ComboboxProvider,{...t,children:e});l.displayName=`Combobox`;const u=o(({"aria-invalid":t,autoComplete:i=`list`,autoSelect:a=`always`,className:o,validation:l,...u},d)=>{let f=n(),{ariaInvalid:p,validation:m}=r({"aria-invalid":t,validation:l??f});return s(c.Combobox,{"aria-invalid":p,autoComplete:i,autoSelect:a,"data-slot":`combobox-input`,className:e(`pointer-coarse:text-base h-9 text-sm`,`bg-form relative block w-full rounded-md border px-3 py-2 border-form text-strong font-sans`,`placeholder:text-placeholder`,`aria-disabled:opacity-50`,`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`,`autofill:shadow-(--color-blue-50) autofill:bg-blue-50 autofill:[-webkit-text-fill-color:var(--text-color-strong)]`,o),"data-validation":m||void 0,ref:d,...u})});u.displayName=`ComboboxInput`;const d=o(({asChild:n=!1,children:r,className:i,sameWidth:a=!0,unmountOnHide:o=!0,...l},u)=>s(c.ComboboxPopover,{"data-slot":`combobox-content`,className:e(`border-popover bg-popover relative z-50 max-h-96 min-w-32 scrollbar overflow-y-scroll overflow-x-hidden rounded-md border shadow-md p-1 my-2 space-y-px font-sans focus:outline-hidden`,i),ref:u,render:n?({ref:e,...n})=>s(t,{ref:e,...n}):void 0,sameWidth:a,unmountOnHide:o,...l,children:r}));d.displayName=`ComboboxContent`;const f=a(void 0),p=o(({asChild:n=!1,children:r,className:i,focusOnHover:a=!0,value:o,...l},u)=>s(f.Provider,{value:o,children:s(c.ComboboxItem,{"data-slot":`combobox-item`,className:e(`cursor-pointer rounded-md px-2 py-1.5 text-strong text-sm flex min-w-0 gap-2 items-center [&>svg]:size-5 [&_svg]:shrink-0`,`data-active-item:bg-active-menu-item`,`aria-disabled:opacity-50`,i),focusOnHover:a,ref:u,render:n?({ref:e,...n})=>s(t,{ref:e,...n}):void 0,value:o,...l,children:r})}));p.displayName=`ComboboxItem`;const m=o(({asChild:n=!1,children:r,className:i,...a},o)=>s(c.ComboboxGroup,{"data-slot":`combobox-group`,className:e(`space-y-px`,i),ref:o,render:n?({ref:e,...n})=>s(t,{ref:e,...n}):void 0,...a,children:r}));m.displayName=`ComboboxGroup`;const h=o(({asChild:n=!1,children:r,className:i,...a},o)=>s(c.ComboboxGroupLabel,{"data-slot":`combobox-group-label`,className:e(`text-muted px-2 py-1 text-xs font-medium`,i),ref:o,render:n?({ref:e,...n})=>s(t,{ref:e,...n}):void 0,...a,children:r}));h.displayName=`ComboboxGroupLabel`;const g=o(({asChild:n=!1,className:r,...i},a)=>s(c.ComboboxItemValue,{"data-slot":`combobox-item-value`,className:e(`*:data-user-value:font-medium flex-1 shrink-0 text-strong font-normal`,r),ref:a,render:n?({ref:e,...n})=>s(t,{ref:e,...n}):void 0,...i}));g.displayName=`ComboboxItemValue`;const _=o(({className:t,...n},r)=>s(i,{ref:r,"data-slot":`combobox-separator`,className:e(`-mx-1.25 my-1 w-auto`,t),...n}));_.displayName=`ComboboxSeparator`;const v={Root:l,Content:d,Group:m,GroupLabel:h,Input:u,Item:p,ItemValue:g,Separator:_};export{v as Combobox};
1
+ import{t as e}from"./cx-IiQEAKf5.js";import{t}from"./slot-CDk0Bb9z.js";import{a as n,r}from"./validation-Bpptk_9t.js";import{n as i}from"./separator-bpE_kooz.js";import{createContext as a}from"react";import{jsx as o}from"react/jsx-runtime";import*as s from"@ariakit/react";const c=({children:e,...t})=>o(s.ComboboxProvider,{...t,children:e});c.displayName=`Combobox`;const l=({"aria-invalid":t,autoComplete:i=`list`,autoSelect:a=`always`,className:c,ref:l,validation:u,...d})=>{let f=n(),{ariaInvalid:p,validation:m}=r({"aria-invalid":t,validation:u??f});return o(s.Combobox,{"aria-invalid":p,autoComplete:i,autoSelect:a,"data-slot":`combobox-input`,className:e(`pointer-coarse:text-base h-9 text-sm`,`bg-form relative block w-full rounded-md border px-3 py-2 border-form text-strong font-sans`,`placeholder:text-placeholder`,`aria-disabled:opacity-50`,`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`,`autofill:shadow-(--color-blue-50) autofill:bg-blue-50 autofill:[-webkit-text-fill-color:var(--text-color-strong)]`,c),"data-validation":m||void 0,ref:l,...d})};l.displayName=`ComboboxInput`;const u=({asChild:n=!1,children:r,className:i,ref:a,sameWidth:c=!0,unmountOnHide:l=!0,...u})=>o(s.ComboboxPopover,{"data-slot":`combobox-content`,className:e(`border-popover bg-popover relative z-50 max-h-96 min-w-32 scrollbar overflow-y-scroll overflow-x-hidden rounded-md border shadow-md p-1 my-2 space-y-px font-sans focus:outline-hidden`,i),ref:a,render:n?({ref:e,...n})=>o(t,{ref:e,...n}):void 0,sameWidth:c,unmountOnHide:l,...u,children:r});u.displayName=`ComboboxContent`;const d=a(void 0),f=({asChild:n=!1,children:r,className:i,focusOnHover:a=!0,ref:c,value:l,...u})=>o(d.Provider,{value:l,children:o(s.ComboboxItem,{"data-slot":`combobox-item`,className:e(`cursor-pointer rounded-md px-2 py-1.5 text-strong text-sm flex min-w-0 gap-2 items-center [&>svg]:size-5 [&_svg]:shrink-0`,`data-active-item:bg-active-menu-item`,`aria-disabled:opacity-50`,i),focusOnHover:a,ref:c,render:n?({ref:e,...n})=>o(t,{ref:e,...n}):void 0,value:l,...u,children:r})});f.displayName=`ComboboxItem`;const p=({asChild:n=!1,children:r,className:i,ref:a,...c})=>o(s.ComboboxGroup,{"data-slot":`combobox-group`,className:e(`space-y-px`,i),ref:a,render:n?({ref:e,...n})=>o(t,{ref:e,...n}):void 0,...c,children:r});p.displayName=`ComboboxGroup`;const m=({asChild:n=!1,children:r,className:i,ref:a,...c})=>o(s.ComboboxGroupLabel,{"data-slot":`combobox-group-label`,className:e(`text-muted px-2 py-1 text-xs font-medium`,i),ref:a,render:n?({ref:e,...n})=>o(t,{ref:e,...n}):void 0,...c,children:r});m.displayName=`ComboboxGroupLabel`;const h=({asChild:n=!1,className:r,ref:i,...a})=>o(s.ComboboxItemValue,{"data-slot":`combobox-item-value`,className:e(`*:data-user-value:font-medium flex-1 shrink-0 text-strong font-normal`,r),ref:i,render:n?({ref:e,...n})=>o(t,{ref:e,...n}):void 0,...a});h.displayName=`ComboboxItemValue`;const g=({className:t,ref:n,...r})=>o(i,{ref:n,"data-slot":`combobox-separator`,className:e(`-mx-1.25 my-1 w-auto`,t),...r});g.displayName=`ComboboxSeparator`;const _={Root:c,Content:u,Group:p,GroupLabel:m,Input:l,Item:f,ItemValue:h,Separator:g};export{_ as Combobox};