@ngrok/mantle 0.77.0 → 0.79.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 (192) hide show
  1. package/dist/accordion.d.ts +63 -21
  2. package/dist/accordion.js +1 -1
  3. package/dist/agent.json +4 -1
  4. package/dist/alert-dialog.d.ts +102 -70
  5. package/dist/alert-dialog.js +1 -1
  6. package/dist/alert.d.ts +39 -39
  7. package/dist/alert.js +1 -1
  8. package/dist/{anchor-BtgEJoPN.js → anchor-C_tjSVy6.js} +1 -1
  9. package/dist/anchor.d.ts +3 -4
  10. package/dist/anchor.js +1 -1
  11. package/dist/{as-child-uN_018tj.d.ts → as-child-CYEVu1WY.d.ts} +0 -7
  12. package/dist/badge.d.ts +5 -56
  13. package/dist/badge.js +1 -1
  14. package/dist/breadcrumb.d.ts +212 -0
  15. package/dist/breadcrumb.js +1 -0
  16. package/dist/browser-only.d.ts +2 -6
  17. package/dist/{button-CERx95KE.js → button-5t6-JS_I.js} +1 -1
  18. package/dist/button-ClC60Nzg.js +1 -0
  19. package/dist/button-DcXOWUYo.d.ts +131 -0
  20. package/dist/button.d.ts +6 -4
  21. package/dist/button.js +1 -1
  22. package/dist/calendar.d.ts +2 -8
  23. package/dist/calendar.js +1 -1
  24. package/dist/card.d.ts +8 -8
  25. package/dist/card.js +1 -1
  26. package/dist/centered-layout.d.ts +147 -0
  27. package/dist/centered-layout.js +1 -0
  28. package/dist/checkbox-DJ2xl7Rc.js +1 -0
  29. package/dist/checkbox.d.ts +9 -11
  30. package/dist/checkbox.js +1 -1
  31. package/dist/{choice-D6S38dPs.js → choice-DOdyNzFC.js} +1 -1
  32. package/dist/choice.d.ts +16 -14
  33. package/dist/choice.js +1 -1
  34. package/dist/code-block.d.ts +5 -17
  35. package/dist/code-block.js +1 -1
  36. package/dist/code-block_highlight-utils.d.ts +1 -1
  37. package/dist/code-block_highlight-utils.js +1 -1
  38. package/dist/code.d.ts +4 -5
  39. package/dist/code.js +1 -1
  40. package/dist/combobox.d.ts +40 -19
  41. package/dist/combobox.js +1 -1
  42. package/dist/command.d.ts +71 -49
  43. package/dist/command.js +1 -1
  44. package/dist/cx-IiQEAKf5.js +1 -0
  45. package/dist/cx.js +1 -1
  46. package/dist/data-slot-CChfb_cv.d.ts +17 -0
  47. package/dist/data-table.d.ts +77 -137
  48. package/dist/data-table.js +1 -1
  49. package/dist/description-list.d.ts +7 -7
  50. package/dist/description-list.js +1 -1
  51. package/dist/{dialog-uyJcNks7.js → dialog-ZCgG41hx.js} +1 -1
  52. package/dist/dialog.d.ts +213 -88
  53. package/dist/dialog.js +1 -1
  54. package/dist/{direction-CcTY0FmA.d.ts → direction-BjU0bPST.d.ts} +1 -1
  55. package/dist/{dropdown-menu-OEuW4GLp.js → dropdown-menu-ByUQkAvJ.js} +1 -1
  56. package/dist/{dropdown-menu-CADgs9gz.d.ts → dropdown-menu-DMNw8ItM.d.ts} +26 -27
  57. package/dist/dropdown-menu.d.ts +2 -1
  58. package/dist/dropdown-menu.js +1 -1
  59. package/dist/empty.d.ts +139 -59
  60. package/dist/empty.js +1 -1
  61. package/dist/{field-context-4k1kI7Bo.js → field-context-BR01g789.js} +1 -1
  62. package/dist/field.d.ts +41 -36
  63. package/dist/field.js +1 -1
  64. package/dist/flag.d.ts +2 -9
  65. package/dist/flag.js +1 -1
  66. package/dist/hooks.d.ts +13 -15
  67. package/dist/hooks.js +1 -1
  68. package/dist/hover-card.d.ts +42 -20
  69. package/dist/hover-card.js +1 -1
  70. package/dist/icon-CDtYjF_H.js +1 -0
  71. package/dist/{icon-n49kOh4_.d.ts → icon-Cevjo93X.d.ts} +2 -3
  72. package/dist/{icon-button-D7hs6bX2.d.ts → icon-button-B7uEj1qq.d.ts} +73 -11
  73. package/dist/icon-button-DV2-GZHf.js +1 -0
  74. package/dist/icon.d.ts +3 -3
  75. package/dist/icon.js +1 -1
  76. package/dist/icons.d.ts +7 -19
  77. package/dist/icons.js +1 -1
  78. package/dist/{in-view-bItE1fkG.d.ts → in-view-nkSOdED2.d.ts} +1 -6
  79. package/dist/{index-CTU6apE6.d.ts → index-BivvYYs-.d.ts} +8 -7
  80. package/dist/{index-Bed_XLWa.d.ts → index-D47aqlpz.d.ts} +3 -2
  81. package/dist/index-DZRbVkZa.d.ts +1 -0
  82. package/dist/index-Rv8RL7xy.d.ts +25 -0
  83. package/dist/{input-B3TS9yAP.js → input-Ct1YOqSy.js} +1 -1
  84. package/dist/input.d.ts +10 -11
  85. package/dist/input.js +1 -1
  86. package/dist/intents-DdSKSj1c.d.ts +28 -0
  87. package/dist/{kbd-D6k4Dnrf.js → kbd-K8iaZ-Ti.js} +1 -1
  88. package/dist/kbd.d.ts +3 -8
  89. package/dist/kbd.js +1 -1
  90. package/dist/{label-BLXfnQmn.js → label-BMlHW_2D.js} +1 -1
  91. package/dist/{label-PY0qM0G5.d.ts → label-v2-bv98k.d.ts} +1 -1
  92. package/dist/label.d.ts +1 -1
  93. package/dist/label.js +1 -1
  94. package/dist/list.d.ts +18 -60
  95. package/dist/list.js +1 -1
  96. package/dist/llms.txt +4 -1
  97. package/dist/main.d.ts +4 -27
  98. package/dist/main.js +1 -1
  99. package/dist/mantle.css +6 -6
  100. package/dist/media-object.d.ts +6 -7
  101. package/dist/media-object.js +1 -1
  102. package/dist/multi-select.d.ts +80 -33
  103. package/dist/multi-select.js +1 -1
  104. package/dist/otp-input.d.ts +7 -8
  105. package/dist/otp-input.js +1 -1
  106. package/dist/pagination.d.ts +11 -22
  107. package/dist/pagination.js +1 -1
  108. package/dist/{popover-Bq52EC7X.js → popover-D5WxxnBY.js} +1 -1
  109. package/dist/popover.d.ts +17 -18
  110. package/dist/popover.js +1 -1
  111. package/dist/{primitive-FoWela9a.d.ts → primitive-C64-m48O.d.ts} +0 -1
  112. package/dist/{primitive-BuVqb6zf.js → primitive-M-kZdNIS.js} +1 -1
  113. package/dist/progress.d.ts +55 -46
  114. package/dist/progress.js +1 -1
  115. package/dist/qr-code.d.ts +10 -9
  116. package/dist/qr-code.js +1 -1
  117. package/dist/radio-group.d.ts +71 -60
  118. package/dist/radio-group.js +1 -1
  119. package/dist/{resolve-pre-rendered-props-DxJ9-DAl.d.ts → resolve-pre-rendered-props-B6OlZrSI.d.ts} +13 -26
  120. package/dist/{resolve-pre-rendered-props-DwIF_M_K.js → resolve-pre-rendered-props-C3e5Auo3.js} +1 -1
  121. package/dist/sandboxed-on-click.d.ts +4 -8
  122. package/dist/sandboxed-on-click.js +1 -1
  123. package/dist/{select-BUGOJMER.d.ts → select-Bwt2YduR.d.ts} +11 -12
  124. package/dist/{select-Bxq_N-_o.js → select-D-5u0Blc.js} +1 -1
  125. package/dist/select.d.ts +1 -1
  126. package/dist/select.js +1 -1
  127. package/dist/selectable-list.d.ts +160 -146
  128. package/dist/selectable-list.js +1 -1
  129. package/dist/{separator-CqohKk4z.js → separator-kBnnv3Cw.js} +1 -1
  130. package/dist/separator.d.ts +6 -37
  131. package/dist/separator.js +1 -1
  132. package/dist/sheet.d.ts +302 -89
  133. package/dist/sheet.js +1 -1
  134. package/dist/sizes-BCoI4bhP.d.ts +29 -0
  135. package/dist/skeleton-Bu3tgNcW.js +1 -0
  136. package/dist/skeleton.d.ts +2 -2
  137. package/dist/skeleton.js +1 -1
  138. package/dist/skip-to-main-link.d.ts +4 -34
  139. package/dist/skip-to-main-link.js +1 -1
  140. package/dist/slider.d.ts +2 -21
  141. package/dist/slider.js +1 -1
  142. package/dist/slot-DmPrjM7N.js +1 -0
  143. package/dist/slot.d.ts +1 -1
  144. package/dist/slot.js +1 -1
  145. package/dist/split-button.d.ts +21 -13
  146. package/dist/split-button.js +1 -1
  147. package/dist/{svg-only-f6ToFLH0.d.ts → svg-only-BFeFS1aa.d.ts} +2 -3
  148. package/dist/{svg-only-CSOaF1tL.js → svg-only-DDx6FtJd.js} +1 -1
  149. package/dist/switch.d.ts +4 -5
  150. package/dist/switch.js +1 -1
  151. package/dist/{table-CAitdL78.js → table-CPH2md2-.js} +1 -1
  152. package/dist/{table-BWD9IlIN.d.ts → table-CwFHXC-G.d.ts} +10 -10
  153. package/dist/table.d.ts +1 -1
  154. package/dist/table.js +1 -1
  155. package/dist/tabs.d.ts +29 -15
  156. package/dist/tabs.js +1 -1
  157. package/dist/text-area.d.ts +2 -3
  158. package/dist/text-area.js +1 -1
  159. package/dist/theme-D8kZCOzM.js +1 -0
  160. package/dist/theme-provider-Djj_jBo6.js +1 -0
  161. package/dist/theme-switcher.d.ts +53 -0
  162. package/dist/theme-switcher.js +1 -0
  163. package/dist/theme.d.ts +15 -101
  164. package/dist/theme.js +1 -1
  165. package/dist/toast-D3ntBmn4.js +1 -0
  166. package/dist/toast.d.ts +32 -50
  167. package/dist/toast.js +1 -1
  168. package/dist/tooltip.d.ts +16 -50
  169. package/dist/tooltip.js +1 -1
  170. package/dist/{types-CTam1uIW.d.ts → types-C19IR7jf.d.ts} +1 -0
  171. package/dist/{types-BvUzforF.d.ts → types-D1RY5Tcj.d.ts} +0 -1
  172. package/dist/types.d.ts +3 -3
  173. package/dist/use-prefers-reduced-motion-CagaNRgm.js +1 -0
  174. package/dist/utils.d.ts +2 -3
  175. package/dist/{validation-xyX_6kph.d.ts → validation-7QeiTFwl.d.ts} +3 -12
  176. package/dist/{validation-DCyx-ceH.js → validation-Bpptk_9t.js} +1 -1
  177. package/dist/{virtual-PBNiHjMK.js → virtual-DZMBu7Ch.js} +1 -1
  178. package/dist/well.d.ts +3 -3
  179. package/dist/well.js +1 -1
  180. package/dist/{with-style-props-CyImx7vd.d.ts → with-style-props-Dq5Vntqy.d.ts} +0 -1
  181. package/package.json +17 -14
  182. package/dist/button-C9GW9nAr.js +0 -1
  183. package/dist/button-mfYak6Rx.d.ts +0 -71
  184. package/dist/checkbox-Apow0ipK.js +0 -1
  185. package/dist/cx-C1UYP5We.js +0 -1
  186. package/dist/icon-SUx16Sl3.js +0 -1
  187. package/dist/icon-button-DiX9iZ9n.js +0 -1
  188. package/dist/index-CJbKEKr2.d.ts +0 -20
  189. package/dist/slot-DT_E5BQx.js +0 -1
  190. package/dist/theme-provider-C5XYi2-H.js +0 -1
  191. package/dist/toast-CZBWjXcP.js +0 -1
  192. package/dist/use-prefers-reduced-motion-DBqNw1wB.js +0 -1
package/dist/field.d.ts CHANGED
@@ -1,9 +1,9 @@
1
- import { t as WithAsChild } from "./as-child-uN_018tj.js";
2
- import { n as IconButtonProps } from "./icon-button-D7hs6bX2.js";
3
- import { a as ValidationState, c as parseValidation, i as ValidationProp, l as resolveValidation, n as ParsedValidation, o as WithValidation, r as Validation, s as isAriaInvalid, t as AriaInvalid } from "./validation-xyX_6kph.js";
4
- import { t as Slot } from "./index-CJbKEKr2.js";
1
+ import { t as WithAsChild } from "./as-child-CYEVu1WY.js";
2
+ import { t as ButtonIntent } from "./intents-DdSKSj1c.js";
3
+ import { n as IconButtonAppearance, r as IconButtonProps } from "./icon-button-B7uEj1qq.js";
4
+ import { a as ValidationState, c as parseValidation, i as ValidationProp, l as resolveValidation, n as ParsedValidation, o as WithValidation, r as Validation, s as isAriaInvalid, t as AriaInvalid } from "./validation-7QeiTFwl.js";
5
+ import { t as Slot } from "./index-Rv8RL7xy.js";
5
6
  import { ComponentProps, ReactElement, ReactNode } from "react";
6
-
7
7
  //#region src/components/field/field-context.d.ts
8
8
  /**
9
9
  * ARIA and identity props that `Field.Control` applies to the field's
@@ -33,14 +33,6 @@ type FieldControlAriaProps = {
33
33
  */
34
34
  name?: string;
35
35
  };
36
- /**
37
- * Context value owned by `Field.Item` and consumed by message/control parts.
38
- *
39
- * `Field.Item` owns the two stable slot IDs (one for the description, one for
40
- * the error list) so consumers don't manage ARIA wiring themselves. The IDs
41
- * are emitted unconditionally; ARIA treats unresolved IDREFs as no-ops, so
42
- * dangling IDs (when no description or error list is rendered) are harmless.
43
- */
44
36
  //#endregion
45
37
  //#region src/components/field/error-helpers.d.ts
46
38
  /**
@@ -49,9 +41,6 @@ type FieldControlAriaProps = {
49
41
  * still rendering only real strings.
50
42
  */
51
43
  type FieldErrorMessage = string | null | undefined | false;
52
- /**
53
- * Options for checking a manual `Field.ErrorList` subtree.
54
- */
55
44
  //#endregion
56
45
  //#region src/components/field/field.d.ts
57
46
  /**
@@ -74,7 +63,7 @@ type FieldErrorMessage = string | null | undefined | false;
74
63
  * `Field.Errors`, or multiple `Field.ErrorItem` children to `Field.ErrorList`,
75
64
  * instead.
76
65
  *
77
- * @see https://mantle.ngrok.com/components/field
66
+ * @see https://mantle.ngrok.com/components/forms/field
78
67
  *
79
68
  * @example
80
69
  * ```tsx
@@ -132,7 +121,7 @@ type FieldControlRenderProps = {
132
121
  * `Slot` cannot reach the focusable element.
133
122
  */
134
123
  children: (props: FieldControlAriaProps) => ReactNode;
135
- } & { [K in keyof FieldControlSlotProps]?: never };
124
+ } & { [K in keyof FieldControlSlotProps]?: never; };
136
125
  /**
137
126
  * Props for the `Field.Errors` convenience renderer. It owns its generated
138
127
  * children, so use `Field.ErrorList` / `Field.ErrorItem` directly when custom
@@ -153,7 +142,7 @@ type FieldErrorsProps = Omit<ComponentProps<"ul">, "children" | "id"> & {
153
142
  * `Field.Group`; use `Field.Set` + `Field.Legend` for radios / related
154
143
  * checkboxes that share one accessible name.
155
144
  *
156
- * @see https://mantle.ngrok.com/components/field
145
+ * @see https://mantle.ngrok.com/components/forms/field
157
146
  *
158
147
  * @example
159
148
  * Composition:
@@ -201,7 +190,7 @@ declare const Field: {
201
190
  * A single form field. Provides message IDs and validation state to
202
191
  * `Field.Control`; rendered errors infer `"error"` validation.
203
192
  *
204
- * @see https://mantle.ngrok.com/components/field
193
+ * @see https://mantle.ngrok.com/components/forms/field
205
194
  *
206
195
  * @example
207
196
  * ```tsx
@@ -234,7 +223,7 @@ declare const Field: {
234
223
  * `<label>`-wrapped native checkbox, or a third-party component that
235
224
  * needs the props placed manually on an inner input.
236
225
  *
237
- * @see https://mantle.ngrok.com/components/field
226
+ * @see https://mantle.ngrok.com/components/forms/field
238
227
  *
239
228
  * @example
240
229
  * ```tsx
@@ -269,7 +258,7 @@ declare const Field: {
269
258
  /**
270
259
  * Layout container that stacks multiple `Field.Item`s vertically.
271
260
  *
272
- * @see https://mantle.ngrok.com/components/field
261
+ * @see https://mantle.ngrok.com/components/forms/field
273
262
  *
274
263
  * @example
275
264
  * ```tsx
@@ -298,7 +287,7 @@ declare const Field: {
298
287
  * Semantic `<fieldset>` for related controls that share one accessible
299
288
  * name from `Field.Legend`.
300
289
  *
301
- * @see https://mantle.ngrok.com/components/field
290
+ * @see https://mantle.ngrok.com/components/forms/field
302
291
  *
303
292
  * @example
304
293
  * ```tsx
@@ -315,7 +304,7 @@ declare const Field: {
315
304
  /**
316
305
  * Caption for `Field.Set`. Renders a semantic `<legend>`.
317
306
  *
318
- * @see https://mantle.ngrok.com/components/field
307
+ * @see https://mantle.ngrok.com/components/forms/field
319
308
  *
320
309
  * @example
321
310
  * ```tsx
@@ -338,7 +327,7 @@ declare const Field: {
338
327
  * opt out (e.g. when the focusable element is rendered outside of
339
328
  * `Field.Control`).
340
329
  *
341
- * @see https://mantle.ngrok.com/components/label
330
+ * @see https://mantle.ngrok.com/components/forms/label
342
331
  *
343
332
  * @example
344
333
  * ```tsx
@@ -376,7 +365,7 @@ declare const Field: {
376
365
  * status) inside sheets or detail panels. For rows with a real control,
377
366
  * use `Field.Label` instead so the label-to-control association is wired.
378
367
  *
379
- * @see https://mantle.ngrok.com/components/field
368
+ * @see https://mantle.ngrok.com/components/forms/field
380
369
  *
381
370
  * @example
382
371
  * ```tsx
@@ -393,7 +382,7 @@ declare const Field: {
393
382
  * `<Field.Label>` (which may contain `Field.Optional`) with adjacent affordances
394
383
  * like a help-icon `Popover.Trigger` on a shared center line with `gap-1`.
395
384
  *
396
- * @see https://mantle.ngrok.com/components/field
385
+ * @see https://mantle.ngrok.com/components/forms/field
397
386
  *
398
387
  * @example
399
388
  * ```tsx
@@ -423,7 +412,7 @@ declare const Field: {
423
412
  * `Field.HelpTrigger` and `Field.HelpContent` to drop a `?` button next to
424
413
  * a label without manually composing Popover + IconButton + QuestionIcon.
425
414
  *
426
- * @see https://mantle.ngrok.com/components/field
415
+ * @see https://mantle.ngrok.com/components/forms/field
427
416
  *
428
417
  * @example
429
418
  * ```tsx
@@ -453,7 +442,7 @@ declare const Field: {
453
442
  * `QuestionIcon`. Requires a contextual `label`; pass `icon` to swap the
454
443
  * glyph, or other `IconButton` props (`size`, `appearance`, etc.) to customize.
455
444
  *
456
- * @see https://mantle.ngrok.com/components/field
445
+ * @see https://mantle.ngrok.com/components/forms/field
457
446
  *
458
447
  * @example
459
448
  * ```tsx
@@ -477,19 +466,35 @@ declare const Field: {
477
466
  * </Field.Group>
478
467
  * ```
479
468
  */
480
- readonly HelpTrigger: import("react").ForwardRefExoticComponent<Partial<Omit<IconButtonProps, "label" | "icon">> & Pick<IconButtonProps, "label"> & {
469
+ readonly HelpTrigger: import("react").ForwardRefExoticComponent<Partial<Omit<IconButtonProps, "appearance" | "icon" | "intent" | "label">> & Pick<IconButtonProps, "label"> & {
470
+ /**
471
+ * The visual style of the trigger button. Optional here —
472
+ * `Field.HelpTrigger` defaults to `"ghost"` so the help affordance reads
473
+ * as subtle metadata next to the label.
474
+ *
475
+ * @default "ghost"
476
+ */
477
+ appearance?: IconButtonAppearance;
481
478
  /**
482
479
  * The icon to render inside the trigger button. Defaults to a Phosphor
483
480
  * `QuestionIcon` so the most common case only needs a contextual label.
484
481
  */
485
482
  icon?: ReactNode;
483
+ /**
484
+ * The tone of the trigger button. Optional here — `Field.HelpTrigger`
485
+ * defaults to `"neutral"` because opening contextual help is a routine
486
+ * action.
487
+ *
488
+ * @default "neutral"
489
+ */
490
+ intent?: ButtonIntent;
486
491
  } & import("react").RefAttributes<HTMLButtonElement>>;
487
492
  /**
488
493
  * Body of a `Field.Help` popover. Re-exports `Popover.Content` so all
489
494
  * positioning / sizing options (`side`, `align`, `preferredWidth`, etc.)
490
495
  * work as expected.
491
496
  *
492
- * @see https://mantle.ngrok.com/components/field
497
+ * @see https://mantle.ngrok.com/components/forms/field
493
498
  *
494
499
  * @example
495
500
  * ```tsx
@@ -522,7 +527,7 @@ declare const Field: {
522
527
  * the `<Field.Label>` so screen readers announce it as part of the accessible
523
528
  * name.
524
529
  *
525
- * @see https://mantle.ngrok.com/components/field
530
+ * @see https://mantle.ngrok.com/components/forms/field
526
531
  *
527
532
  * @example
528
533
  * ```tsx
@@ -550,7 +555,7 @@ declare const Field: {
550
555
  /**
551
556
  * Helper / hint text rendered below the control in the muted body color.
552
557
  *
553
- * @see https://mantle.ngrok.com/components/field
558
+ * @see https://mantle.ngrok.com/components/forms/field
554
559
  *
555
560
  * @example
556
561
  * ```tsx
@@ -580,7 +585,7 @@ declare const Field: {
580
585
  * filters empty values, and renders a `Field.ErrorList` with one
581
586
  * `Field.ErrorItem` for each remaining message.
582
587
  *
583
- * @see https://mantle.ngrok.com/components/field
588
+ * @see https://mantle.ngrok.com/components/forms/field
584
589
  *
585
590
  * @example
586
591
  * ```tsx
@@ -609,7 +614,7 @@ declare const Field: {
609
614
  * Wraps one or more `Field.ErrorItem` children in a semantic `<ul>`.
610
615
  * Renders nothing when given no renderable children.
611
616
  *
612
- * @see https://mantle.ngrok.com/components/field
617
+ * @see https://mantle.ngrok.com/components/forms/field
613
618
  *
614
619
  * @example
615
620
  * ```tsx
@@ -633,7 +638,7 @@ declare const Field: {
633
638
  * A single error message list item for a field. Renders an `<li>` in
634
639
  * `text-danger-600` and must be nested inside a `Field.ErrorList`.
635
640
  *
636
- * @see https://mantle.ngrok.com/components/field
641
+ * @see https://mantle.ngrok.com/components/forms/field
637
642
  *
638
643
  * @example
639
644
  * ```tsx
package/dist/field.js CHANGED
@@ -1 +1 @@
1
- import{t as e}from"./use-isomorphic-layout-effect-DdTRtMY-.js";import{t}from"./cx-C1UYP5We.js";import{t as n}from"./slot-DT_E5BQx.js";import{t as r}from"./icon-button-DiX9iZ9n.js";import{i,n as a,r as o,t as s}from"./validation-DCyx-ceH.js";import{n as c,r as l,t as u}from"./field-context-4k1kI7Bo.js";import{t as d}from"./label-BLXfnQmn.js";import{t as f}from"./popover-Bq52EC7X.js";import{Children as p,Fragment as m,cloneElement as h,forwardRef as g,isValidElement as _,useCallback as v,useContext as y,useId as b,useMemo as x,useState as S}from"react";import C from"tiny-invariant";import{jsx as w}from"react/jsx-runtime";import{QuestionIcon as T}from"@phosphor-icons/react/Question";const E=e=>{let t=[],n=new Set;for(let r of e??[]){if(typeof r!=`string`)continue;let e=r.trim();e.length===0||n.has(e)||(n.add(e),t.push(e))}return t},D=e=>!(e==null||typeof e==`boolean`||typeof e==`string`&&e.trim().length===0),O=({children:e,errorItemType:t})=>{let n=!1;return p.forEach(e,e=>{if(!(n||e==null||typeof e==`boolean`)){if(typeof e==`string`){e.trim().length>0&&(n=!0);return}if(!_(e)){n=!0;return}if(e.type===t){n=D(e.props.children);return}if(e.type===m){n=O({children:e.props.children,errorItemType:t});return}n=!0}}),n},k=g(({className:e,...n},r)=>w(`fieldset`,{ref:r,"data-slot":`field-set`,className:t(`flex w-full min-w-0 flex-col gap-4 border-0 p-0`,e),...n}));k.displayName=`FieldSet`;const A=g(({className:e,...n},r)=>w(`legend`,{ref:r,"data-slot":`field-legend`,className:t(`text-strong mb-1.5 text-sm font-medium font-sans`,e),...n}));A.displayName=`FieldLegend`;const j=g(({htmlFor:e,...t},n)=>{let r=y(c);return w(d,{ref:n,htmlFor:e??r?.controlId,...t})});j.displayName=`FieldLabel`;const M=g(({asChild:e,className:r,...i},a)=>w(e?n:`p`,{ref:a,"data-slot":`field-label-text`,className:t(`text-strong text-sm font-medium font-sans`,r),...i}));M.displayName=`FieldLabelText`;const N=g(({asChild:e,className:r,...i},a)=>w(e?n:`div`,{ref:a,"data-slot":`field-label-row`,className:t(`flex items-center gap-1`,r),...i}));N.displayName=`FieldLabelRow`;const P=f.Root,F=w(T,{}),I=g(({appearance:e=`ghost`,className:n,icon:i=F,label:a,size:o=`xs`,type:s=`button`,...c},l)=>w(f.Trigger,{asChild:!0,children:w(r,{ref:l,appearance:e,className:t(`text-body -my-0.5`,n),icon:i,label:a,size:o,type:s,...c})}));I.displayName=`FieldHelpTrigger`;const L=g((e,t)=>w(f.Content,{ref:t,"data-slot":`field-help-content`,...e}));L.displayName=`FieldHelpContent`;const R=g(({asChild:e,children:r,className:i,...a},o)=>w(e?n:`span`,{ref:o,"data-slot":`field-optional`,className:t(`text-muted text-sm font-normal font-sans`,i),...a,children:r??`(Optional)`}));R.displayName=`FieldOptional`;const z=g(({asChild:e,className:r,...i},a)=>w(e?n:`div`,{ref:a,"data-slot":`field-group`,className:t(`flex w-full flex-col gap-4`,r),...i}));z.displayName=`FieldGroup`;const B=g(({asChild:e,children:r,className:a,name:o,validation:l,...u},d)=>{let f=e?n:`div`,p=b(),m=b(),h=b(),[g,_]=S(!1),y=i(l??(g?`error`:void 0)),C=v(()=>(_(!0),()=>{_(!1)}),[]),T=x(()=>({controlId:p,descriptionId:m,errorId:h,hasErrors:g,name:o,registerError:C,validation:y}),[p,m,h,g,o,C,y]);return w(c.Provider,{value:T,children:w(s,{validation:y,children:w(f,{ref:d,"data-slot":`field-item`,"data-validation":y,className:t(`flex w-full flex-col gap-1.5`,a),...u,children:r})})})});B.displayName=`FieldItem`;const V=g(({children:e,...t},r)=>{let i=y(c),a=l({context:i});return typeof e==`function`?w(s,{validation:a.validation,children:w(u.Provider,{value:i?a.ariaProps:null,children:e(a.ariaProps)})}):(C(_(e),`Field.Control expects a single React element child (or a render-prop function). Got a non-element value (string, array, fragment, null, or undefined). Wrap the control in a single element, or use the function child form: <Field.Control>{(props) => <YourControl {...props} />}</Field.Control>.`),w(s,{validation:a.validation,children:w(u.Provider,{value:i?a.ariaProps:null,children:w(n,{ref:r,...t,children:h(e,a.ariaProps)})})}))});V.displayName=`FieldControl`;const H=g(({asChild:e,className:r,...i},a)=>w(e?n:`p`,{ref:a,"data-slot":`field-description`,id:y(c)?.descriptionId,className:t(`text-body text-sm leading-4`,`[:where([data-slot=field-error-list]+&)]:-mt-1.5`,r),...i}));H.displayName=`FieldDescription`;const U=g(({children:e,className:n,...r},i)=>D(e)?w(`li`,{ref:i,"data-slot":`field-error`,className:t(`text-danger-600 text-sm leading-4`,n),...r,children:e}):null);U.displayName=`FieldErrorItem`;const W=g(({messages:e,...t},n)=>w(G,{ref:n,...t,children:E(e).map(e=>w(U,{children:e},e))}));W.displayName=`FieldErrors`;const G=g(({asChild:r,children:i,className:a,...o},s)=>{let l=O({children:i,errorItemType:U}),u=y(c),d=u?.registerError;return e(()=>{if(!(!l||d==null))return d()},[l,d]),l?w(r?n:`ul`,{ref:s,"data-slot":`field-error-list`,id:u?.errorId,role:`list`,className:t(`m-0 flex w-full flex-col list-none p-0`,a),...o,children:i}):null});G.displayName=`FieldErrorList`;const K={Item:B,Control:V,Group:z,Set:k,Legend:A,Label:j,LabelText:M,LabelRow:N,Help:P,HelpTrigger:I,HelpContent:L,Optional:R,Description:H,Errors:W,ErrorList:G,ErrorItem:U},q=e=>E(e?.map(e=>typeof e==`string`||!e?e:e.message));export{K as Field,a as isAriaInvalid,o as parseValidation,i as resolveValidation,q as toErrorMessages};
1
+ import{t as e}from"./use-isomorphic-layout-effect-DdTRtMY-.js";import{t}from"./cx-IiQEAKf5.js";import{t as n}from"./slot-DmPrjM7N.js";import{t as r}from"./icon-button-DV2-GZHf.js";import{i,n as a,r as o,t as s}from"./validation-Bpptk_9t.js";import{n as c,r as l,t as u}from"./field-context-BR01g789.js";import{t as d}from"./label-BMlHW_2D.js";import{t as f}from"./popover-D5WxxnBY.js";import{Children as p,Fragment as m,cloneElement as h,forwardRef as g,isValidElement as _,useCallback as v,useContext as y,useId as b,useMemo as x,useState as S}from"react";import C from"tiny-invariant";import{jsx as w}from"react/jsx-runtime";import{QuestionIcon as T}from"@phosphor-icons/react/Question";const E=e=>{let t=[],n=new Set;for(let r of e??[]){if(typeof r!=`string`)continue;let e=r.trim();e.length===0||n.has(e)||(n.add(e),t.push(e))}return t},D=e=>!(e==null||typeof e==`boolean`||typeof e==`string`&&e.trim().length===0),O=({children:e,errorItemType:t})=>{let n=!1;return p.forEach(e,e=>{if(!(n||e==null||typeof e==`boolean`)){if(typeof e==`string`){e.trim().length>0&&(n=!0);return}if(!_(e)){n=!0;return}if(e.type===t){n=D(e.props.children);return}if(e.type===m){n=O({children:e.props.children,errorItemType:t});return}n=!0}}),n},k=g(({className:e,...n},r)=>w(`fieldset`,{ref:r,"data-slot":`field-set`,className:t(`flex w-full min-w-0 flex-col gap-4 border-0 p-0`,e),...n}));k.displayName=`FieldSet`;const A=g(({className:e,...n},r)=>w(`legend`,{ref:r,"data-slot":`field-legend`,className:t(`text-strong mb-1.5 text-sm font-medium font-sans`,e),...n}));A.displayName=`FieldLegend`;const j=g(({htmlFor:e,...t},n)=>{let r=y(c);return w(d,{ref:n,htmlFor:e??r?.controlId,...t})});j.displayName=`FieldLabel`;const M=g(({asChild:e,className:r,...i},a)=>w(e?n:`p`,{ref:a,"data-slot":`field-label-text`,className:t(`text-strong text-sm font-medium font-sans`,r),...i}));M.displayName=`FieldLabelText`;const N=g(({asChild:e,className:r,...i},a)=>w(e?n:`div`,{ref:a,"data-slot":`field-label-row`,className:t(`flex items-center gap-1`,r),...i}));N.displayName=`FieldLabelRow`;const P=f.Root,F=w(T,{}),I=g(({appearance:e=`ghost`,className:n,icon:i=F,intent:a=`neutral`,label:o,size:s=`xs`,type:c=`button`,...l},u)=>w(f.Trigger,{asChild:!0,children:w(r,{ref:u,appearance:e,className:t(`text-body -my-0.5`,n),icon:i,intent:a,label:o,size:s,type:c,...l})}));I.displayName=`FieldHelpTrigger`;const L=g((e,t)=>w(f.Content,{ref:t,"data-slot":`field-help-content`,...e}));L.displayName=`FieldHelpContent`;const R=g(({asChild:e,children:r,className:i,...a},o)=>w(e?n:`span`,{ref:o,"data-slot":`field-optional`,className:t(`text-muted text-sm font-normal font-sans`,i),...a,children:r??`(Optional)`}));R.displayName=`FieldOptional`;const z=g(({asChild:e,className:r,...i},a)=>w(e?n:`div`,{ref:a,"data-slot":`field-group`,className:t(`flex w-full flex-col gap-4`,r),...i}));z.displayName=`FieldGroup`;const B=g(({asChild:e,children:r,className:a,name:o,validation:l,...u},d)=>{let f=e?n:`div`,p=b(),m=b(),h=b(),[g,_]=S(!1),y=i(l??(g?`error`:void 0)),C=v(()=>(_(!0),()=>{_(!1)}),[]),T=x(()=>({controlId:p,descriptionId:m,errorId:h,hasErrors:g,name:o,registerError:C,validation:y}),[p,m,h,g,o,C,y]);return w(c.Provider,{value:T,children:w(s,{validation:y,children:w(f,{ref:d,"data-slot":`field-item`,"data-validation":y,className:t(`flex w-full flex-col gap-1.5`,a),...u,children:r})})})});B.displayName=`FieldItem`;const V=g(({children:e,...t},r)=>{let i=y(c),a=l({context:i});return typeof e==`function`?w(s,{validation:a.validation,children:w(u.Provider,{value:i?a.ariaProps:null,children:e(a.ariaProps)})}):(C(_(e),`Field.Control expects a single React element child (or a render-prop function). Got a non-element value (string, array, fragment, null, or undefined). Wrap the control in a single element, or use the function child form: <Field.Control>{(props) => <YourControl {...props} />}</Field.Control>.`),w(s,{validation:a.validation,children:w(u.Provider,{value:i?a.ariaProps:null,children:w(n,{ref:r,...t,children:h(e,a.ariaProps)})})}))});V.displayName=`FieldControl`;const H=g(({asChild:e,className:r,...i},a)=>w(e?n:`p`,{ref:a,"data-slot":`field-description`,id:y(c)?.descriptionId,className:t(`text-body text-sm leading-4`,`[:where([data-slot=field-error-list]+&)]:-mt-1.5`,r),...i}));H.displayName=`FieldDescription`;const U=g(({children:e,className:n,...r},i)=>D(e)?w(`li`,{ref:i,"data-slot":`field-error`,className:t(`text-danger-600 text-sm leading-4`,n),...r,children:e}):null);U.displayName=`FieldErrorItem`;const W=g(({messages:e,...t},n)=>w(G,{ref:n,...t,children:E(e).map(e=>w(U,{children:e},e))}));W.displayName=`FieldErrors`;const G=g(({asChild:r,children:i,className:a,...o},s)=>{let l=O({children:i,errorItemType:U}),u=y(c),d=u?.registerError;return e(()=>{if(!(!l||d==null))return d()},[l,d]),l?w(r?n:`ul`,{ref:s,"data-slot":`field-error-list`,id:u?.errorId,role:`list`,className:t(`m-0 flex w-full flex-col list-none p-0`,a),...o,children:i}):null});G.displayName=`FieldErrorList`;const K={Item:B,Control:V,Group:z,Set:k,Legend:A,Label:j,LabelText:M,LabelRow:N,Help:P,HelpTrigger:I,HelpContent:L,Optional:R,Description:H,Errors:W,ErrorList:G,ErrorItem:U},q=e=>E(e?.map(e=>typeof e==`string`||!e?e:e.message));export{K as Field,a as isAriaInvalid,o as parseValidation,i as resolveValidation,q as toErrorMessages};
package/dist/flag.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { ComponentProps } from "react";
2
-
3
2
  //#region src/components/flag/country-code.d.ts
4
3
  /** All valid values for a flag
5
4
  * @see https://www.flagpack.xyz/docs/flag-index
@@ -58,7 +57,7 @@ type Props = Omit<ComponentProps<"div">, "children"> & {
58
57
  * **Loading.** Defaults to `loading="lazy"`. Use `loading="eager"` for flags
59
58
  * above the fold or in critical content.
60
59
  *
61
- * @see https://mantle.ngrok.com/components/flag#flag
60
+ * @see https://mantle.ngrok.com/components/data-display/flag#flag
62
61
  *
63
62
  * @example
64
63
  * ```tsx
@@ -75,13 +74,7 @@ type Props = Omit<ComponentProps<"div">, "children"> & {
75
74
  * </span>
76
75
  * ```
77
76
  */
78
- declare function Flag({
79
- className,
80
- code,
81
- size,
82
- loading,
83
- ...props
84
- }: Props): import("react").JSX.Element;
77
+ declare function Flag({ className, code, size, loading, ...props }: Props): import("react").JSX.Element;
85
78
  declare namespace Flag {
86
79
  var displayName: string;
87
80
  }
package/dist/flag.js CHANGED
@@ -1 +1 @@
1
- import{t as e}from"./cx-C1UYP5We.js";import{jsx as t,jsxs as n}from"react/jsx-runtime";import{cva as r}from"class-variance-authority";const i=r(``,{variants:{size:{s:`rounded-[0.0625rem]`,m:`rounded-[0.09375rem]`,l:`rounded-xs`}}}),a=r(``,{variants:{size:{s:`w-4 h-3`,m:`w-5 h-3.75`,l:`w-8 h-6`}}});function o({className:r,code:o,size:s=`l`,loading:c=`lazy`,...l}){let u=i({size:s});return n(`div`,{"data-slot":`flag`,className:e(`flag relative overflow-hidden`,u,a({size:s}),r),...l,children:[t(`div`,{"aria-hidden":!0,className:e(`absolute inset-0 border border-[#000]/10`,u)}),t(`img`,{className:`h-full w-full block object-cover`,src:`https://assets.ngrok.com/flags/${s}/${o}.svg`,alt:`flag for ${o}`,loading:c})]})}o.displayName=`Flag`;const s=`004.008.010.016.016.020.024.028.031.032.040.044.048.050.051.052.056.060.064.068.070.072.074.076.084.086.090.092.096.100.104.108.112.116.120.124.132.136.140.144.148.152.156.158.162.166.170.174.178.180.184.188.191.192.196.203.204.208.212.214.218.222.226.231.232.233.234.238.239.242.246.248.250.254.258.260.262.266.268.270.275.276.288.292.296.300.304.308.312.316.320.324.328.332.334.336.340.344.348.352.356.360.364.368.372.376.380.384.388.392.398.400.404.408.410.414.417.418.422.426.428.430.434.438.440.442.446.450.454.458.462.466.470.474.478.480.484.492.496.498.499.500.504.508.512.516.520.524.528.531.533.534.540.548.554.558.562.566.570.574.578.580.581.583.584.585.586.591.598.600.604.608.612.616.620.624.626.630.634.638.642.643.646.652.654.659.660.662.663.666.670.674.678.682.686.688.690.694.702.703.704.705.706.710.716.724.728.729.732.740.744.748.752.756.760.762.764.768.772.776.780.784.788.792.795.796.798.800.804.807.818.831.832.833.834.836.840.850.854.858.860.862.876.882.887.894.ABW.AD.AE.AF.AFG.AFRUN.AG.AGO.AI.AIA.AL.ALA.ALB.AM.AMS.AND.AO.AQ.AR.ARE.ARG.ARM.AS.ASM.AT.ATA.ATF.ATG.AU.AUS.AUT.AW.AX.AZ.AZE.BA.BB.BD.BDI.BE.BEL.BEN.BF.BFA.BG.BGD.BGR.BH.BHR.BHS.BI.BIH.BJ.BL.BLM.BLR.BLZ.BM.BMU.BN.BO.BOL.BQ-BO.BQ-SA.BQ-SE.BR.BRA.BRB.BRN.BS.BT.BTN.BV.BVT.BW.BWA.BY.BZ.CA.CAF.CAN.CC.CCK.CD.CF.CG.CH.CHE.CHL.CHN.CI.CIV.CK.CL.CM.CMR.CN.CO.COD.COG.COK.COL.COM.CPV.CR.CRI.CU.CUB.CUW.CV.CW.CX.CXR.CY.CYM.CYP.CZ.CZE.DE.DEU.DJ.DJI.DK.DM.DMA.DNK.DO.DOM.EC.ECU.EE.EG.EGY.EH.ER.ERI.ES.ESH.ESP.EST.ET.ETH.EU.FI.FIN.FJ.FJI.FK.FLK.FM.FO.FR.FRA.FRO.FSM.GA.GAB.GB-ENG.GB-NIR.GB-SCT.GB-UKM.GB-WLS.GB.GBR.GD.GE.GEO.GF.GG.GGY.GH.GHA.GI.GIB.GIN.GL.GLP.GM.GMB.GN.GNB.GNQ.GP.GQ.GR.GRC.GRD.GRL.GS.GT.GTM.GU.GUF.GUM.GUY.GW.GY.HK.HKG.HM.HMD.HN.HND.HR.HRV.HT.HTI.HU.HUN.ID.IDN.IE.IL.IM.IMN.IN.IND.IO.IOT.IQ.IR.IRL.IRN.IRQ.IS.ISL.ISR.IT.ITA.JAM.JE.JEY.JM.JO.JOR.JP.JPN.KAZ.KE.KEN.KG.KGZ.KH.KHM.KI.KIR.KM.KN-SK.KNA.KOR.KP.KR.KW.KWT.KY.KZ.LA.LAO.LB.LBN.LBR.LBY.LC.LCA.LI.LIE.LK.LKA.LR.LS.LSO.LT.LTU.LU.LUX.LV.LVA.LY.MA.MAC.MAF.MAR.MC.MCO.MD.MDA.MDG.MDV.ME.MEX.MF.MG.MH.MHL.MK.MKD.ML.MLI.MLT.MM.MMR.MN.MNE.MNG.MNP.MO.MOZ.MP.MQ.MR.MRT.MS.MSR.MT.MTQ.MU.MUS.MV.MW.MWI.MX.MY.MYS.MZ.NA.NAM.NC.NCL.NE.NER.NF.NFK.NG.NGA.NI.NIC.NIU.NL.NLD.NO.NOR.NP.NPL.NR.NRU.NU.NZ.NZL.OM.OMN.PA.PAK.PAN.PCN.PE.PER.PF.PG.PH.PHL.PK.PL.PLW.PM.PN.PNG.POL.PR.PRI.PRK.PRT.PRY.PS.PSE.PT.PW.PY.PYF.QA.QAT.RAINBOW.RE.REU.RO.ROU.RS.RU.RUS.RW.RWA.SA.SAU.SB.SC.SD.SDN.SE.SEN.SG.SGP.SGS.SH.SHN.SI.SJ.SJM.SK.SL.SLB.SLE.SLV.SM.SMR.SN.SO.SOM.SPM.SR.SRB.SS.SSD.ST.STP.SUR.SV.SVK.SVN.SWE.SWZ.SX.SXM.SY.SYC.SYR.SZ.TC.TCA.TCD.TD.TF.TG.TGO.TH.THA.TJ.TJK.TK.TKL.TKM.TL.TLS.TM.TN.TO.TON.TR.TT.TTO.TUN.TUR.TUV.TV.TW.TWN.TZ.TZA.UA.UG.UGA.UKR.UM.UMI.UNASUR.URY.US.USA.UY.UZ.UZB.VA.VAT.VC.VCT.VE.VEN.VG.VGB.VI.VIR.VN.VNM.VU.VUT.WF.WLF.WS.WSM.YE.YEM.ZA.ZAF.ZM.ZMB.ZW.ZWE`.split(`.`);function c(e){return s.includes(e)}export{o as Flag,s as countryCodes,c as isCountryCode};
1
+ import{t as e}from"./cx-IiQEAKf5.js";import{jsx as t,jsxs as n}from"react/jsx-runtime";import{cva as r}from"class-variance-authority";const i=r(``,{variants:{size:{s:`rounded-[0.0625rem]`,m:`rounded-[0.09375rem]`,l:`rounded-xs`}}}),a=r(``,{variants:{size:{s:`w-4 h-3`,m:`w-5 h-3.75`,l:`w-8 h-6`}}});function o({className:r,code:o,size:s=`l`,loading:c=`lazy`,...l}){let u=i({size:s});return n(`div`,{"data-slot":`flag`,className:e(`flag relative overflow-hidden`,u,a({size:s}),r),...l,children:[t(`div`,{"aria-hidden":!0,className:e(`absolute inset-0 border border-[#000]/10`,u)}),t(`img`,{className:`h-full w-full block object-cover`,src:`https://assets.ngrok.com/flags/${s}/${o}.svg`,alt:`flag for ${o}`,loading:c})]})}o.displayName=`Flag`;const s=`004.008.010.016.016.020.024.028.031.032.040.044.048.050.051.052.056.060.064.068.070.072.074.076.084.086.090.092.096.100.104.108.112.116.120.124.132.136.140.144.148.152.156.158.162.166.170.174.178.180.184.188.191.192.196.203.204.208.212.214.218.222.226.231.232.233.234.238.239.242.246.248.250.254.258.260.262.266.268.270.275.276.288.292.296.300.304.308.312.316.320.324.328.332.334.336.340.344.348.352.356.360.364.368.372.376.380.384.388.392.398.400.404.408.410.414.417.418.422.426.428.430.434.438.440.442.446.450.454.458.462.466.470.474.478.480.484.492.496.498.499.500.504.508.512.516.520.524.528.531.533.534.540.548.554.558.562.566.570.574.578.580.581.583.584.585.586.591.598.600.604.608.612.616.620.624.626.630.634.638.642.643.646.652.654.659.660.662.663.666.670.674.678.682.686.688.690.694.702.703.704.705.706.710.716.724.728.729.732.740.744.748.752.756.760.762.764.768.772.776.780.784.788.792.795.796.798.800.804.807.818.831.832.833.834.836.840.850.854.858.860.862.876.882.887.894.ABW.AD.AE.AF.AFG.AFRUN.AG.AGO.AI.AIA.AL.ALA.ALB.AM.AMS.AND.AO.AQ.AR.ARE.ARG.ARM.AS.ASM.AT.ATA.ATF.ATG.AU.AUS.AUT.AW.AX.AZ.AZE.BA.BB.BD.BDI.BE.BEL.BEN.BF.BFA.BG.BGD.BGR.BH.BHR.BHS.BI.BIH.BJ.BL.BLM.BLR.BLZ.BM.BMU.BN.BO.BOL.BQ-BO.BQ-SA.BQ-SE.BR.BRA.BRB.BRN.BS.BT.BTN.BV.BVT.BW.BWA.BY.BZ.CA.CAF.CAN.CC.CCK.CD.CF.CG.CH.CHE.CHL.CHN.CI.CIV.CK.CL.CM.CMR.CN.CO.COD.COG.COK.COL.COM.CPV.CR.CRI.CU.CUB.CUW.CV.CW.CX.CXR.CY.CYM.CYP.CZ.CZE.DE.DEU.DJ.DJI.DK.DM.DMA.DNK.DO.DOM.EC.ECU.EE.EG.EGY.EH.ER.ERI.ES.ESH.ESP.EST.ET.ETH.EU.FI.FIN.FJ.FJI.FK.FLK.FM.FO.FR.FRA.FRO.FSM.GA.GAB.GB-ENG.GB-NIR.GB-SCT.GB-UKM.GB-WLS.GB.GBR.GD.GE.GEO.GF.GG.GGY.GH.GHA.GI.GIB.GIN.GL.GLP.GM.GMB.GN.GNB.GNQ.GP.GQ.GR.GRC.GRD.GRL.GS.GT.GTM.GU.GUF.GUM.GUY.GW.GY.HK.HKG.HM.HMD.HN.HND.HR.HRV.HT.HTI.HU.HUN.ID.IDN.IE.IL.IM.IMN.IN.IND.IO.IOT.IQ.IR.IRL.IRN.IRQ.IS.ISL.ISR.IT.ITA.JAM.JE.JEY.JM.JO.JOR.JP.JPN.KAZ.KE.KEN.KG.KGZ.KH.KHM.KI.KIR.KM.KN-SK.KNA.KOR.KP.KR.KW.KWT.KY.KZ.LA.LAO.LB.LBN.LBR.LBY.LC.LCA.LI.LIE.LK.LKA.LR.LS.LSO.LT.LTU.LU.LUX.LV.LVA.LY.MA.MAC.MAF.MAR.MC.MCO.MD.MDA.MDG.MDV.ME.MEX.MF.MG.MH.MHL.MK.MKD.ML.MLI.MLT.MM.MMR.MN.MNE.MNG.MNP.MO.MOZ.MP.MQ.MR.MRT.MS.MSR.MT.MTQ.MU.MUS.MV.MW.MWI.MX.MY.MYS.MZ.NA.NAM.NC.NCL.NE.NER.NF.NFK.NG.NGA.NI.NIC.NIU.NL.NLD.NO.NOR.NP.NPL.NR.NRU.NU.NZ.NZL.OM.OMN.PA.PAK.PAN.PCN.PE.PER.PF.PG.PH.PHL.PK.PL.PLW.PM.PN.PNG.POL.PR.PRI.PRK.PRT.PRY.PS.PSE.PT.PW.PY.PYF.QA.QAT.RAINBOW.RE.REU.RO.ROU.RS.RU.RUS.RW.RWA.SA.SAU.SB.SC.SD.SDN.SE.SEN.SG.SGP.SGS.SH.SHN.SI.SJ.SJM.SK.SL.SLB.SLE.SLV.SM.SMR.SN.SO.SOM.SPM.SR.SRB.SS.SSD.ST.STP.SUR.SV.SVK.SVN.SWE.SWZ.SX.SXM.SY.SYC.SYR.SZ.TC.TCA.TCD.TD.TF.TG.TGO.TH.THA.TJ.TJK.TK.TKL.TKM.TL.TLS.TM.TN.TO.TON.TR.TT.TTO.TUN.TUR.TUV.TV.TW.TWN.TZ.TZA.UA.UG.UGA.UKR.UM.UMI.UNASUR.URY.US.USA.UY.UZ.UZB.VA.VAT.VC.VCT.VE.VEN.VG.VGB.VI.VIR.VN.VNM.VU.VUT.WF.WLF.WS.WSM.YE.YEM.ZA.ZAF.ZM.ZMB.ZW.ZWE`.split(`.`);function c(e){return s.includes(e)}export{o as Flag,s as countryCodes,c as isCountryCode};
package/dist/hooks.d.ts CHANGED
@@ -1,6 +1,5 @@
1
- import { n as MarginType, o as useComposedRefs, s as copyToClipboard } from "./in-view-bItE1fkG.js";
2
- import { RefObject, useEffect } from "react";
3
-
1
+ import { n as MarginType, o as useComposedRefs, s as copyToClipboard } from "./in-view-nkSOdED2.js";
2
+ import { RefObject, useLayoutEffect } from "react";
4
3
  //#region src/hooks/use-breakpoint.d.ts
5
4
  /**
6
5
  * Tailwind CSS breakpoints in descending order (largest → smallest).
@@ -315,7 +314,7 @@ declare function useIsHydrated(): boolean;
315
314
  *
316
315
  * return <div ref={ref}>Width: {width}</div>;
317
316
  */
318
- declare const useIsomorphicLayoutEffect: typeof useEffect;
317
+ declare const useIsomorphicLayoutEffect: typeof useLayoutEffect;
319
318
  //#endregion
320
319
  //#region src/hooks/use-local-storage.d.ts
321
320
  /**
@@ -589,20 +588,19 @@ type UseInViewOptions = {
589
588
  * const ref = useRef<HTMLDivElement>(null);
590
589
  * const isInView = useInView(ref, { amount: 0.5 });
591
590
  */
592
- declare function useInView(ref: RefObject<Element | null>, {
593
- root,
594
- margin,
595
- amount,
596
- once,
597
- initial
598
- }?: UseInViewOptions): boolean;
591
+ declare function useInView(ref: RefObject<Element | null>, { root, margin, amount, once, initial }?: UseInViewOptions): boolean;
599
592
  //#endregion
600
593
  //#region src/hooks/use-undo-redo.d.ts
601
594
  type UseUndoRedoReturn<T> = {
602
- /** Whether there are actions to undo. */canUndo: boolean; /** Whether there are actions to redo. */
603
- canRedo: boolean; /** Push a snapshot onto the undo stack. Clears the redo stack. */
604
- push: (snapshot: T) => void; /** Pop the last snapshot from the undo stack. Returns `undefined` if empty. */
605
- undo: (current: T) => T | undefined; /** Pop the last snapshot from the redo stack. Returns `undefined` if empty. */
595
+ /** Whether there are actions to undo. */
596
+ canUndo: boolean;
597
+ /** Whether there are actions to redo. */
598
+ canRedo: boolean;
599
+ /** Push a snapshot onto the undo stack. Clears the redo stack. */
600
+ push: (snapshot: T) => void;
601
+ /** Pop the last snapshot from the undo stack. Returns `undefined` if empty. */
602
+ undo: (current: T) => T | undefined;
603
+ /** Pop the last snapshot from the redo stack. Returns `undefined` if empty. */
606
604
  redo: (current: T) => T | undefined;
607
605
  };
608
606
  /**
package/dist/hooks.js CHANGED
@@ -1 +1 @@
1
- import{t as e}from"./use-isomorphic-layout-effect-DdTRtMY-.js";import{n as t}from"./compose-refs-Cjf2gfB8.js";import{t as n}from"./use-matches-media-query-CMSxHR9n.js";import{r}from"./browser-only-CPH56Xw_.js";import{t as i}from"./use-copy-to-clipboard-DqQ0_N3E.js";import{n as a,t as o}from"./use-prefers-reduced-motion-DBqNw1wB.js";import{t as s}from"./in-view-C2DpZ6s0.js";import{useCallback as c,useEffect as l,useMemo as u,useReducer as d,useRef as f,useState as p,useSyncExternalStore as m}from"react";const h=[`2xl`,`xl`,`lg`,`md`,`sm`,`xs`,`2xs`],g=[`default`,...h];function _(){return m(j,M,()=>`default`)}function v(e){return m(P(e),I(e),()=>!1)}const y={"2xl":`(min-width: 96rem)`,xl:`(min-width: 80rem)`,lg:`(min-width: 64rem)`,md:`(min-width: 48rem)`,sm:`(min-width: 40rem)`,xs:`(min-width: 30rem)`,"2xs":`(min-width: 22.5rem)`},b={"2xl":`(max-width: 95.99rem)`,xl:`(max-width: 79.99rem)`,lg:`(max-width: 63.99rem)`,md:`(max-width: 47.99rem)`,sm:`(max-width: 39.99rem)`,xs:`(max-width: 29.99rem)`,"2xs":`(max-width: 22.49rem)`};let x=null,S=null;function C(){return x||={"2xl":window.matchMedia(y[`2xl`]),xl:window.matchMedia(y.xl),lg:window.matchMedia(y.lg),md:window.matchMedia(y.md),sm:window.matchMedia(y.sm),xs:window.matchMedia(y.xs),"2xs":window.matchMedia(y[`2xs`])},x}function w(e){return S||={"2xl":window.matchMedia(b[`2xl`]),xl:window.matchMedia(b.xl),lg:window.matchMedia(b.lg),md:window.matchMedia(b.md),sm:window.matchMedia(b.sm),xs:window.matchMedia(b.xs),"2xs":window.matchMedia(b[`2xs`])},S[e]}let T=`default`;const E=new Set;let D=!1;function O(){let e=C();for(let t of h)if(e[t].matches)return t;return`default`}let k=!1;function A(){k||(k=!0,requestAnimationFrame(()=>{k=!1;let e=O();if(e!==T){T=e;for(let e of E)e()}}))}function j(e){if(E.add(e),!D){D=!0;let e=C();T=O();for(let t of Object.values(e))t.addEventListener(`change`,A)}return e(),()=>{if(E.delete(e),E.size===0&&D){D=!1;let e=C();for(let t of Object.values(e))t.removeEventListener(`change`,A)}}}function M(){return T}const N=new Map;function P(e){let t=N.get(e);return t||(t=t=>{let n=w(e),r=!1,i=()=>{r||(r=!0,requestAnimationFrame(()=>{r=!1,t()}))};return n.addEventListener(`change`,i),()=>{n.removeEventListener(`change`,i)}},N.set(e,t),t)}const F=new Map;function I(e){let t=F.get(e);return t||(t=()=>w(e).matches,F.set(e,t),t)}function L(e){let t=f(e);return l(()=>{t.current=e}),u(()=>((...e)=>t.current?.(...e)),[])}function R(e,t){let[n,r]=p(e);return l(()=>{let n=window.setTimeout(()=>{r(e)},t.waitMs);return()=>{window.clearTimeout(n)}},[e,t.waitMs]),n}function z(e,t){let n=L(e),r=f(0);return l(()=>()=>window.clearTimeout(r.current),[]),c((...e)=>{window.clearTimeout(r.current),r.current=window.setTimeout(()=>n(...e),t.waitMs)},[n,t.waitMs])}function B(e){return function(t){function n(n){let r=n.storageArea==null||n.storageArea===window.localStorage,i=n.key==null||n.key===e;r&&i&&t()}return window.addEventListener(`storage`,n),()=>{window.removeEventListener(`storage`,n)}}}function V(){return null}function H(e,t){try{let n=JSON.parse(e);return typeof n==`string`?n:t}catch{return t}}function U(e,t){let n=m(u(()=>B(e),[e]),()=>window.localStorage.getItem(e),V);return[n==null?t:H(n,t),c(t=>{let n=JSON.stringify(t);window.localStorage.setItem(e,n),window.dispatchEvent(new StorageEvent(`storage`,{key:e,newValue:n,storageArea:window.localStorage}))},[e])]}function W(e){return function(t){function n(n){let r=n.storageArea==null||n.storageArea===window.sessionStorage,i=n.key==null||n.key===e;r&&i&&t()}return window.addEventListener(`storage`,n),()=>{window.removeEventListener(`storage`,n)}}}function G(){return null}function K(e,t){try{let n=JSON.parse(e);return typeof n==`string`?n:t}catch{return t}}function q(e,t){let n=m(u(()=>W(e),[e]),()=>window.sessionStorage.getItem(e),G);return[n==null?t:K(n,t),c(t=>{let n=JSON.stringify(t);window.sessionStorage.setItem(e,n),window.dispatchEvent(new StorageEvent(`storage`,{key:e,newValue:n,storageArea:window.sessionStorage}))},[e])]}function J(){let e=a();return u(()=>e?`auto`:`smooth`,[e])}function Y(e,{root:t,margin:n,amount:r,once:i=!1,initial:a=!1}={}){let[o,c]=p(a);return l(()=>{if(!e.current||i&&o)return;function a(){return c(!0),i?void 0:()=>c(!1)}let l={root:t&&t.current||void 0,margin:n,amount:r};return s(e.current,a,l)},[t,e,n,i,r]),o}function X(){let e=f([]),t=f([]),[,n]=d(e=>e+1,0),r=c(r=>{e.current.push(r),t.current=[],n()},[]),i=c(r=>{let i=e.current[e.current.length-1];if(i!==void 0)return e.current.pop(),t.current.push(r),n(),i},[]),a=c(r=>{let i=t.current[t.current.length-1];if(i!==void 0)return t.current.pop(),e.current.push(r),n(),i},[]),o=e.current.length>0,s=t.current.length>0;return u(()=>({canUndo:o,canRedo:s,push:r,undo:i,redo:a}),[o,s,r,i,a])}export{g as breakpoints,o as getPrefersReducedMotion,_ as useBreakpoint,L as useCallbackRef,t as useComposedRefs,i as useCopyToClipboard,R as useDebounce,z as useDebouncedCallback,Y as useInView,v as useIsBelowBreakpoint,r as useIsHydrated,e as useIsomorphicLayoutEffect,U as useLocalStorage,n as useMatchesMediaQuery,a as usePrefersReducedMotion,J as useScrollBehavior,q as useSessionStorage,X as useUndoRedo};
1
+ import{t as e}from"./use-isomorphic-layout-effect-DdTRtMY-.js";import{n as t}from"./compose-refs-Cjf2gfB8.js";import{t as n}from"./use-matches-media-query-CMSxHR9n.js";import{r}from"./browser-only-CPH56Xw_.js";import{t as i}from"./use-copy-to-clipboard-DqQ0_N3E.js";import{n as a,t as o}from"./use-prefers-reduced-motion-CagaNRgm.js";import{t as s}from"./in-view-C2DpZ6s0.js";import{useCallback as c,useEffect as l,useMemo as u,useReducer as d,useRef as f,useState as p,useSyncExternalStore as m}from"react";const h=[`2xl`,`xl`,`lg`,`md`,`sm`,`xs`,`2xs`],g=[`default`,...h];function _(){return m(j,M,()=>`default`)}function v(e){return m(P(e),I(e),()=>!1)}const y={"2xl":`(min-width: 96rem)`,xl:`(min-width: 80rem)`,lg:`(min-width: 64rem)`,md:`(min-width: 48rem)`,sm:`(min-width: 40rem)`,xs:`(min-width: 30rem)`,"2xs":`(min-width: 22.5rem)`},b={"2xl":`(max-width: 95.99rem)`,xl:`(max-width: 79.99rem)`,lg:`(max-width: 63.99rem)`,md:`(max-width: 47.99rem)`,sm:`(max-width: 39.99rem)`,xs:`(max-width: 29.99rem)`,"2xs":`(max-width: 22.49rem)`};let x=null,S=null;function C(){return x||={"2xl":window.matchMedia(y[`2xl`]),xl:window.matchMedia(y.xl),lg:window.matchMedia(y.lg),md:window.matchMedia(y.md),sm:window.matchMedia(y.sm),xs:window.matchMedia(y.xs),"2xs":window.matchMedia(y[`2xs`])},x}function w(e){return S||={"2xl":window.matchMedia(b[`2xl`]),xl:window.matchMedia(b.xl),lg:window.matchMedia(b.lg),md:window.matchMedia(b.md),sm:window.matchMedia(b.sm),xs:window.matchMedia(b.xs),"2xs":window.matchMedia(b[`2xs`])},S[e]}let T=`default`;const E=new Set;let D=!1;function O(){let e=C();for(let t of h)if(e[t].matches)return t;return`default`}let k=!1;function A(){k||(k=!0,requestAnimationFrame(()=>{k=!1;let e=O();if(e!==T){T=e;for(let e of E)e()}}))}function j(e){if(E.add(e),!D){D=!0;let e=C();T=O();for(let t of Object.values(e))t.addEventListener(`change`,A)}return e(),()=>{if(E.delete(e),E.size===0&&D){D=!1;let e=C();for(let t of Object.values(e))t.removeEventListener(`change`,A)}}}function M(){return T}const N=new Map;function P(e){let t=N.get(e);return t||(t=t=>{let n=w(e),r=!1,i=()=>{r||(r=!0,requestAnimationFrame(()=>{r=!1,t()}))};return n.addEventListener(`change`,i),()=>{n.removeEventListener(`change`,i)}},N.set(e,t),t)}const F=new Map;function I(e){let t=F.get(e);return t||(t=()=>w(e).matches,F.set(e,t),t)}function L(e){let t=f(e);return l(()=>{t.current=e}),u(()=>((...e)=>t.current?.(...e)),[])}function R(e,t){let[n,r]=p(e);return l(()=>{let n=window.setTimeout(()=>{r(e)},t.waitMs);return()=>{window.clearTimeout(n)}},[e,t.waitMs]),n}function z(e,t){let n=L(e),r=f(0);return l(()=>()=>window.clearTimeout(r.current),[]),c((...e)=>{window.clearTimeout(r.current),r.current=window.setTimeout(()=>n(...e),t.waitMs)},[n,t.waitMs])}function B(e){return function(t){function n(n){let r=n.storageArea==null||n.storageArea===window.localStorage,i=n.key==null||n.key===e;r&&i&&t()}return window.addEventListener(`storage`,n),()=>{window.removeEventListener(`storage`,n)}}}function V(){return null}function H(e,t){try{let n=JSON.parse(e);return typeof n==`string`?n:t}catch{return t}}function U(e,t){let n=m(u(()=>B(e),[e]),()=>window.localStorage.getItem(e),V);return[n==null?t:H(n,t),c(t=>{let n=JSON.stringify(t);window.localStorage.setItem(e,n),window.dispatchEvent(new StorageEvent(`storage`,{key:e,newValue:n,storageArea:window.localStorage}))},[e])]}function W(e){return function(t){function n(n){let r=n.storageArea==null||n.storageArea===window.sessionStorage,i=n.key==null||n.key===e;r&&i&&t()}return window.addEventListener(`storage`,n),()=>{window.removeEventListener(`storage`,n)}}}function G(){return null}function K(e,t){try{let n=JSON.parse(e);return typeof n==`string`?n:t}catch{return t}}function q(e,t){let n=m(u(()=>W(e),[e]),()=>window.sessionStorage.getItem(e),G);return[n==null?t:K(n,t),c(t=>{let n=JSON.stringify(t);window.sessionStorage.setItem(e,n),window.dispatchEvent(new StorageEvent(`storage`,{key:e,newValue:n,storageArea:window.sessionStorage}))},[e])]}function J(){let e=a();return u(()=>e?`auto`:`smooth`,[e])}function Y(e,{root:t,margin:n,amount:r,once:i=!1,initial:a=!1}={}){let[o,c]=p(a);return l(()=>{if(!e.current||i&&o)return;function a(){return c(!0),i?void 0:()=>c(!1)}let l={root:t&&t.current||void 0,margin:n,amount:r};return s(e.current,a,l)},[t,e,n,i,r]),o}function X(){let e=f([]),t=f([]),[,n]=d(e=>e+1,0),r=c(r=>{e.current.push(r),t.current=[],n()},[]),i=c(r=>{let i=e.current[e.current.length-1];if(i!==void 0)return e.current.pop(),t.current.push(r),n(),i},[]),a=c(r=>{let i=t.current[t.current.length-1];if(i!==void 0)return t.current.pop(),e.current.push(r),n(),i},[]),o=e.current.length>0,s=t.current.length>0;return u(()=>({canUndo:o,canRedo:s,push:r,undo:i,redo:a}),[o,s,r,i,a])}export{g as breakpoints,o as getPrefersReducedMotion,_ as useBreakpoint,L as useCallbackRef,t as useComposedRefs,i as useCopyToClipboard,R as useDebounce,z as useDebouncedCallback,Y as useInView,v as useIsBelowBreakpoint,r as useIsHydrated,e as useIsomorphicLayoutEffect,U as useLocalStorage,n as useMatchesMediaQuery,a as usePrefersReducedMotion,J as useScrollBehavior,q as useSessionStorage,X as useUndoRedo};
@@ -1,7 +1,34 @@
1
1
  import { ComponentPropsWithoutRef } from "react";
2
2
  import * as HoverCardPrimitive from "@radix-ui/react-hover-card";
3
-
4
3
  //#region src/components/hover-card/hover-card.d.ts
4
+ /**
5
+ * A floating card that appears when a user hovers over a trigger element.
6
+ * This is the root, stateful component that manages the open/closed state of the hover card.
7
+ *
8
+ * `HoverCard.Content` renders at Tailwind `z-50`, Mantle's shared floating
9
+ * z-index. When multiple shared layers are open, the most recently mounted
10
+ * layer renders on top.
11
+ *
12
+ * @see https://mantle.ngrok.com/components/overlays/hover-card#hovercardroot
13
+ *
14
+ * @example
15
+ * ```tsx
16
+ * <HoverCard.Root>
17
+ * <HoverCard.Trigger asChild>
18
+ * <Button type="button" appearance="outlined" intent="neutral">
19
+ * Hover me
20
+ * </Button>
21
+ * </HoverCard.Trigger>
22
+ * <HoverCard.Content>
23
+ * <p>This is the hover card content.</p>
24
+ * </HoverCard.Content>
25
+ * </HoverCard.Root>
26
+ * ```
27
+ */
28
+ declare const Root: {
29
+ ({ closeDelay, openDelay, ...props }: ComponentPropsWithoutRef<typeof HoverCardPrimitive.Root>): import("react").JSX.Element;
30
+ displayName: string;
31
+ };
5
32
  /**
6
33
  * A floating card that appears when a user hovers over a trigger element.
7
34
  *
@@ -17,7 +44,7 @@ import * as HoverCardPrimitive from "@radix-ui/react-hover-card";
17
44
  * z-index. When multiple shared layers are open, the most recently mounted
18
45
  * layer renders on top.
19
46
  *
20
- * @see https://mantle.ngrok.com/components/hover-card
47
+ * @see https://mantle.ngrok.com/components/overlays/hover-card
21
48
  *
22
49
  * @example
23
50
  * Composition:
@@ -31,7 +58,7 @@ import * as HoverCardPrimitive from "@radix-ui/react-hover-card";
31
58
  * ```tsx
32
59
  * <HoverCard.Root>
33
60
  * <HoverCard.Trigger asChild>
34
- * <Button type="button" appearance="outlined">
61
+ * <Button type="button" appearance="outlined" intent="neutral">
35
62
  * Hover me
36
63
  * </Button>
37
64
  * </HoverCard.Trigger>
@@ -49,13 +76,15 @@ declare const HoverCard: {
49
76
  * z-index. When multiple shared layers are open, the most recently mounted
50
77
  * layer renders on top.
51
78
  *
52
- * @see https://mantle.ngrok.com/components/hover-card#hovercardroot
79
+ * @see https://mantle.ngrok.com/components/overlays/hover-card#hovercardroot
53
80
  *
54
81
  * @example
55
82
  * ```tsx
56
83
  * <HoverCard.Root>
57
84
  * <HoverCard.Trigger asChild>
58
- * <Button>Hover me</Button>
85
+ * <Button type="button" appearance="outlined" intent="neutral">
86
+ * Hover me
87
+ * </Button>
59
88
  * </HoverCard.Trigger>
60
89
  * <HoverCard.Content>
61
90
  * <p>This is the hover card content.</p>
@@ -63,14 +92,7 @@ declare const HoverCard: {
63
92
  * </HoverCard.Root>
64
93
  * ```
65
94
  */
66
- readonly Root: {
67
- ({
68
- closeDelay,
69
- openDelay,
70
- ...props
71
- }: ComponentPropsWithoutRef<typeof HoverCardPrimitive.Root>): import("react").JSX.Element;
72
- displayName: string;
73
- };
95
+ readonly Root: typeof Root;
74
96
  /**
75
97
  * The content to render inside the hover card. Appears in a portal with rich styling and animations.
76
98
  *
@@ -78,19 +100,19 @@ declare const HoverCard: {
78
100
  * z-index. When multiple shared layers are open, the most recently mounted
79
101
  * layer renders on top.
80
102
  *
81
- * @see https://mantle.ngrok.com/components/hover-card#hovercardcontent
103
+ * @see https://mantle.ngrok.com/components/overlays/hover-card#hovercardcontent
82
104
  *
83
105
  * @example
84
106
  * ```tsx
85
107
  * <HoverCard.Root>
86
108
  * <HoverCard.Trigger asChild>
87
- * <Button type="button" variant="link">@username</Button>
109
+ * <Button type="button" appearance="link" intent="accent">@username</Button>
88
110
  * </HoverCard.Trigger>
89
111
  * <HoverCard.Content side="top">
90
112
  * <div className="space-y-2">
91
113
  * <Text weight="strong">User Profile</Text>
92
114
  * <Text>Additional information about the user.</Text>
93
- * <Button type="button" size="sm">Follow</Button>
115
+ * <Button type="button" appearance="filled" intent="neutral" size="sm">Follow</Button>
94
116
  * </div>
95
117
  * </HoverCard.Content>
96
118
  * </HoverCard.Root>
@@ -103,13 +125,13 @@ declare const HoverCard: {
103
125
  * do not need to use `HoverCard.Portal` directly. Use it only when you need to
104
126
  * customize portal placement or wrap multiple `HoverCard.Content` instances.
105
127
  *
106
- * @see https://mantle.ngrok.com/components/hover-card#hovercardportal
128
+ * @see https://mantle.ngrok.com/components/overlays/hover-card#hovercardportal
107
129
  *
108
130
  * @example
109
131
  * ```tsx
110
132
  * <HoverCard.Root>
111
133
  * <HoverCard.Trigger asChild>
112
- * <Button type="button" appearance="outlined">
134
+ * <Button type="button" appearance="outlined" intent="neutral">
113
135
  * Hover me
114
136
  * </Button>
115
137
  * </HoverCard.Trigger>
@@ -125,13 +147,13 @@ declare const HoverCard: {
125
147
  /**
126
148
  * The trigger element that opens the hover card when hovered.
127
149
  *
128
- * @see https://mantle.ngrok.com/components/hover-card#hovercardtrigger
150
+ * @see https://mantle.ngrok.com/components/overlays/hover-card#hovercardtrigger
129
151
  *
130
152
  * @example
131
153
  * ```tsx
132
154
  * <HoverCard.Root>
133
155
  * <HoverCard.Trigger asChild>
134
- * <Button type="button" variant="ghost">
156
+ * <Button type="button" appearance="ghost" intent="neutral">
135
157
  * Hover for details
136
158
  * </Button>
137
159
  * </HoverCard.Trigger>
@@ -1 +1 @@
1
- import{t as e}from"./cx-C1UYP5We.js";import{forwardRef as t}from"react";import{jsx as n}from"react/jsx-runtime";import*as r from"@radix-ui/react-hover-card";const i=({closeDelay:e=300,openDelay:t=100,...i})=>n(r.Root,{closeDelay:e,openDelay:t,...i});i.displayName=`HoverCard`;const a=t((e,t)=>n(r.Trigger,{ref:t,"data-slot":`hover-card-trigger`,...e}));a.displayName=`HoverCardTrigger`;const o=r.Portal;o.displayName=`HoverCardPortal`;const s=t(({className:t,onClick:i,align:a=`center`,sideOffset:s=4,...c},l)=>n(o,{children:n(r.Content,{ref:l,"data-slot":`hover-card-content`,align:a,sideOffset:s,className:e(`bg-popover border-popover z-50 w-64 rounded-md border p-4 shadow-md outline-hidden`,`data-state-open:animate-in data-state-closed:animate-out data-state-closed:fade-out-0 data-state-open:fade-in-0 data-state-closed:zoom-out-95 data-state-open:zoom-in-95 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`,t),onClick:e=>{e.stopPropagation(),i?.(e)},...c})}));s.displayName=r.Content.displayName;const c={Root:i,Content:s,Portal:o,Trigger:a};export{c as HoverCard};
1
+ import{t as e}from"./cx-IiQEAKf5.js";import{forwardRef as t}from"react";import{jsx as n}from"react/jsx-runtime";import*as r from"@radix-ui/react-hover-card";const i=({closeDelay:e=300,openDelay:t=100,...i})=>n(r.Root,{closeDelay:e,openDelay:t,...i});i.displayName=`HoverCard`;const a=t((e,t)=>n(r.Trigger,{ref:t,"data-slot":`hover-card-trigger`,...e}));a.displayName=`HoverCardTrigger`;const o=r.Portal;o.displayName=`HoverCardPortal`;const s=t(({className:t,onClick:i,align:a=`center`,sideOffset:s=4,...c},l)=>n(o,{children:n(r.Content,{ref:l,"data-slot":`hover-card-content`,align:a,sideOffset:s,className:e(`bg-popover border-popover z-50 w-64 rounded-md border p-4 shadow-md outline-hidden`,`data-state-open:animate-in data-state-closed:animate-out data-state-closed:fade-out-0 data-state-open:fade-in-0 data-state-closed:zoom-out-95 data-state-open:zoom-in-95 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`,t),onClick:e=>{e.stopPropagation(),i?.(e)},...c})}));s.displayName=r.Content.displayName;const c={Root:i,Content:s,Portal:o,Trigger:a};export{c as HoverCard};
@@ -0,0 +1 @@
1
+ import{t as e}from"./cx-IiQEAKf5.js";import{t}from"./svg-only-DDx6FtJd.js";import{forwardRef as n}from"react";import{jsx as r}from"react/jsx-runtime";const i=n(({className:n,style:i,svg:a,...o},s)=>r(t,{ref:s,"data-slot":`icon`,className:e(`size-5`,n),style:i,svg:a,...o}));i.displayName=`Icon`;export{i as t};
@@ -1,6 +1,5 @@
1
- import { t as SvgAttributes } from "./types-BvUzforF.js";
1
+ import { t as SvgAttributes } from "./types-D1RY5Tcj.js";
2
2
  import { ReactNode } from "react";
3
-
4
3
  //#region src/components/icon/icon.d.ts
5
4
  type IconProps = Omit<SvgAttributes, "children"> & {
6
5
  /**
@@ -11,7 +10,7 @@ type IconProps = Omit<SvgAttributes, "children"> & {
11
10
  /**
12
11
  * Decorates an svg icon with automatic sizing styles and a `shrink-0` class.
13
12
  *
14
- * @see https://mantle.ngrok.com/components/icon
13
+ * @see https://mantle.ngrok.com/components/data-display/icon
15
14
  *
16
15
  * @example
17
16
  * ```tsx