@ngrok/mantle 0.32.0 → 0.32.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (136) hide show
  1. package/dist/accordion.d.ts +143 -2
  2. package/dist/accordion.js +1 -1
  3. package/dist/accordion.js.map +1 -1
  4. package/dist/alert-dialog.d.ts +1 -1
  5. package/dist/alert-dialog.js +1 -1
  6. package/dist/alert-dialog.js.map +1 -1
  7. package/dist/alert.d.ts +5 -2
  8. package/dist/alert.js +1 -1
  9. package/dist/alert.js.map +1 -1
  10. package/dist/anchor.d.ts +1 -1
  11. package/dist/anchor.js +1 -1
  12. package/dist/anchor.js.map +1 -1
  13. package/dist/badge.d.ts +4 -1
  14. package/dist/badge.js +1 -1
  15. package/dist/badge.js.map +1 -1
  16. package/dist/{button-C8eGiHOm.d.ts → button-BvWgeelK.d.ts} +8 -1
  17. package/dist/{button-group-CpDp0fYZ.d.ts → button-group-7oT-O90J.d.ts} +11 -0
  18. package/dist/button.d.ts +3 -3
  19. package/dist/button.js +1 -1
  20. package/dist/calendar.d.ts +17 -0
  21. package/dist/calendar.js +1 -1
  22. package/dist/calendar.js.map +1 -1
  23. package/dist/checkbox.d.ts +1 -1
  24. package/dist/checkbox.js.map +1 -1
  25. package/dist/{chunk-7XIZZ4HQ.js → chunk-3H3EUKI7.js} +1 -1
  26. package/dist/chunk-3H3EUKI7.js.map +1 -0
  27. package/dist/{chunk-ZXLA5BJX.js → chunk-3X4AKTRA.js} +2 -2
  28. package/dist/chunk-3X4AKTRA.js.map +1 -0
  29. package/dist/chunk-6RJ2G2DK.js +34 -0
  30. package/dist/chunk-6RJ2G2DK.js.map +1 -0
  31. package/dist/chunk-I6T6YV2L.js +2 -0
  32. package/dist/chunk-I6T6YV2L.js.map +1 -0
  33. package/dist/chunk-IVXZIYX4.js +2 -0
  34. package/dist/chunk-IVXZIYX4.js.map +1 -0
  35. package/dist/chunk-J6ZF5J72.js +2 -0
  36. package/dist/chunk-J6ZF5J72.js.map +1 -0
  37. package/dist/chunk-JIRNFNH5.js +2 -0
  38. package/dist/{chunk-72UMV3YP.js.map → chunk-JIRNFNH5.js.map} +1 -1
  39. package/dist/chunk-NPTDRQT5.js +2 -0
  40. package/dist/chunk-NPTDRQT5.js.map +1 -0
  41. package/dist/chunk-NRMIFYYG.js +2 -0
  42. package/dist/chunk-NRMIFYYG.js.map +1 -0
  43. package/dist/{chunk-VTCWSFFJ.js → chunk-PANPBV3Q.js} +2 -2
  44. package/dist/{chunk-VTCWSFFJ.js.map → chunk-PANPBV3Q.js.map} +1 -1
  45. package/dist/{chunk-BK4P33ZH.js → chunk-RTXWW6ND.js} +2 -2
  46. package/dist/{chunk-BK4P33ZH.js.map → chunk-RTXWW6ND.js.map} +1 -1
  47. package/dist/{chunk-3MDQ3LC2.js → chunk-W2YQRWR5.js} +2 -2
  48. package/dist/{chunk-3MDQ3LC2.js.map → chunk-W2YQRWR5.js.map} +1 -1
  49. package/dist/code-block.d.ts +3 -0
  50. package/dist/code-block.js +3 -3
  51. package/dist/code-block.js.map +1 -1
  52. package/dist/combobox.d.ts +4 -1
  53. package/dist/combobox.js +1 -1
  54. package/dist/combobox.js.map +1 -1
  55. package/dist/data-table.d.ts +41 -12
  56. package/dist/data-table.js +1 -1
  57. package/dist/data-table.js.map +1 -1
  58. package/dist/dialog.d.ts +256 -3
  59. package/dist/dialog.js +1 -1
  60. package/dist/dialog.js.map +1 -1
  61. package/dist/dropdown-menu.d.ts +80 -0
  62. package/dist/dropdown-menu.js +1 -1
  63. package/dist/dropdown-menu.js.map +1 -1
  64. package/dist/flag.d.ts +4 -1
  65. package/dist/flag.js +1 -1
  66. package/dist/flag.js.map +1 -1
  67. package/dist/hover-card.d.ts +58 -0
  68. package/dist/hover-card.js +1 -1
  69. package/dist/hover-card.js.map +1 -1
  70. package/dist/{icon-Cu-iYUjr.d.ts → icon-CkvpQ4BK.d.ts} +1 -7
  71. package/dist/{icon-button-D41yiI7H.d.ts → icon-button-D4BTvC7F.d.ts} +12 -1
  72. package/dist/icon.d.ts +2 -2
  73. package/dist/icon.js +1 -1
  74. package/dist/icons.d.ts +9 -0
  75. package/dist/icons.js +1 -1
  76. package/dist/icons.js.map +1 -1
  77. package/dist/inline-code.d.ts +10 -1
  78. package/dist/inline-code.js.map +1 -1
  79. package/dist/input.d.ts +39 -1
  80. package/dist/input.js +1 -1
  81. package/dist/input.js.map +1 -1
  82. package/dist/label.d.ts +1 -1
  83. package/dist/label.js.map +1 -1
  84. package/dist/pagination.d.ts +51 -1
  85. package/dist/pagination.js +1 -1
  86. package/dist/pagination.js.map +1 -1
  87. package/dist/popover.d.ts +77 -17
  88. package/dist/popover.js.map +1 -1
  89. package/dist/{primitive-hud69IM9.d.ts → primitive-BUbUB7RS.d.ts} +3 -0
  90. package/dist/progress.d.ts +14 -2
  91. package/dist/progress.js +1 -1
  92. package/dist/progress.js.map +1 -1
  93. package/dist/radio-group.d.ts +51 -3
  94. package/dist/radio-group.js +1 -1
  95. package/dist/radio-group.js.map +1 -1
  96. package/dist/sandboxed-on-click.d.ts +0 -3
  97. package/dist/sandboxed-on-click.js.map +1 -1
  98. package/dist/select.d.ts +8 -4
  99. package/dist/select.js +1 -1
  100. package/dist/separator.d.ts +4 -1
  101. package/dist/separator.js +1 -1
  102. package/dist/sheet.d.ts +18 -6
  103. package/dist/sheet.js +1 -1
  104. package/dist/sheet.js.map +1 -1
  105. package/dist/{svg-only-CS2INnEL.d.ts → svg-only-Bj2yffO4.d.ts} +7 -7
  106. package/dist/switch.d.ts +2 -2
  107. package/dist/switch.js.map +1 -1
  108. package/dist/table.js +1 -1
  109. package/dist/tabs.d.ts +104 -1
  110. package/dist/tabs.js +1 -1
  111. package/dist/tabs.js.map +1 -1
  112. package/dist/text-area.d.ts +2 -1
  113. package/dist/text-area.js.map +1 -1
  114. package/dist/theme-provider.d.ts +29 -5
  115. package/dist/theme-provider.js +1 -1
  116. package/dist/toast.d.ts +70 -2
  117. package/dist/toast.js +1 -1
  118. package/dist/tooltip.d.ts +53 -13
  119. package/dist/tooltip.js +1 -1
  120. package/dist/tooltip.js.map +1 -1
  121. package/package.json +1 -1
  122. package/dist/chunk-3XX7M573.js +0 -34
  123. package/dist/chunk-3XX7M573.js.map +0 -1
  124. package/dist/chunk-72UMV3YP.js +0 -2
  125. package/dist/chunk-7XIZZ4HQ.js.map +0 -1
  126. package/dist/chunk-BGY3DO4G.js +0 -2
  127. package/dist/chunk-BGY3DO4G.js.map +0 -1
  128. package/dist/chunk-HDPLH5HC.js +0 -2
  129. package/dist/chunk-HDPLH5HC.js.map +0 -1
  130. package/dist/chunk-HVMKFNT3.js +0 -2
  131. package/dist/chunk-HVMKFNT3.js.map +0 -1
  132. package/dist/chunk-UXH22BMO.js +0 -2
  133. package/dist/chunk-UXH22BMO.js.map +0 -1
  134. package/dist/chunk-XQVVOOLT.js +0 -2
  135. package/dist/chunk-XQVVOOLT.js.map +0 -1
  136. package/dist/chunk-ZXLA5BJX.js.map +0 -1
package/dist/dialog.d.ts CHANGED
@@ -2,19 +2,111 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as react from 'react';
3
3
  import { ComponentProps } from 'react';
4
4
  import * as _radix_ui_react_dialog from '@radix-ui/react-dialog';
5
- import { a as IconButtonProps } from './icon-button-D41yiI7H.js';
6
- import { R as Root } from './primitive-hud69IM9.js';
5
+ import { a as IconButtonProps } from './icon-button-D4BTvC7F.js';
6
+ import { R as Root } from './primitive-BUbUB7RS.js';
7
7
  import 'class-variance-authority/types';
8
8
  import './as-child-DJ7x3JFV.js';
9
9
  import './variant-props-oDo2u-We.js';
10
10
  import 'class-variance-authority';
11
11
  import './deep-non-nullable-SmpSvoSd.js';
12
12
 
13
+ /**
14
+ * A window overlaid on either the primary window or another dialog window.
15
+ * The root stateful component for the Dialog.
16
+ *
17
+ * @see https://mantle.ngrok.com/components/dialog#api-dialog
18
+ *
19
+ * @example
20
+ * ```tsx
21
+ * <Dialog>
22
+ * <DialogTrigger asChild>
23
+ * <Button type="button" appearance="outlined">
24
+ * Open Dialog
25
+ * </Button>
26
+ * </DialogTrigger>
27
+ * <DialogContent>
28
+ * <DialogHeader>
29
+ * <DialogTitle>Dialog Title</DialogTitle>
30
+ * <DialogCloseIconButton />
31
+ * </DialogHeader>
32
+ * <DialogBody>
33
+ * <p>This is the dialog content.</p>
34
+ * </DialogBody>
35
+ * <DialogFooter>
36
+ * <Button type="button" appearance="outlined">
37
+ * Cancel
38
+ * </Button>
39
+ * <Button type="button" appearance="filled">
40
+ * Save
41
+ * </Button>
42
+ * </DialogFooter>
43
+ * </DialogContent>
44
+ * </Dialog>
45
+ * ```
46
+ */
13
47
  declare const Dialog: typeof Root;
48
+ /**
49
+ * A button that opens the dialog.
50
+ *
51
+ * @see https://mantle.ngrok.com/components/dialog#api-dialog-trigger
52
+ *
53
+ * @example
54
+ * ```tsx
55
+ * <Dialog>
56
+ * <DialogTrigger asChild>
57
+ * <Button type="button" appearance="outlined">
58
+ * Open Dialog
59
+ * </Button>
60
+ * </DialogTrigger>
61
+ * <DialogContent>
62
+ * <DialogHeader>
63
+ * <DialogTitle>Dialog Title</DialogTitle>
64
+ * </DialogHeader>
65
+ * <DialogBody>
66
+ * <p>This is the dialog content.</p>
67
+ * </DialogBody>
68
+ * </DialogContent>
69
+ * </Dialog>
70
+ * ```
71
+ */
14
72
  declare const DialogTrigger: react.ForwardRefExoticComponent<_radix_ui_react_dialog.DialogTriggerProps & react.RefAttributes<HTMLButtonElement>>;
15
73
  declare const DialogPortal: react.FC<_radix_ui_react_dialog.DialogPortalProps>;
16
74
  declare const DialogClose: react.ForwardRefExoticComponent<_radix_ui_react_dialog.DialogCloseProps & react.RefAttributes<HTMLButtonElement>>;
17
75
  declare const DialogOverlay: react.ForwardRefExoticComponent<Omit<_radix_ui_react_dialog.DialogOverlayProps & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
76
+ /**
77
+ * The container for the dialog content.
78
+ * Renders on top of the overlay and is centered in the viewport.
79
+ *
80
+ * @see https://mantle.ngrok.com/components/dialog#api-dialog-content
81
+ *
82
+ * @example
83
+ * ```tsx
84
+ * <Dialog>
85
+ * <DialogTrigger asChild>
86
+ * <Button type="button" appearance="outlined">
87
+ * Open Dialog
88
+ * </Button>
89
+ * </DialogTrigger>
90
+ * <DialogContent>
91
+ * <DialogHeader>
92
+ * <DialogTitle>Dialog Title</DialogTitle>
93
+ * <DialogCloseIconButton />
94
+ * </DialogHeader>
95
+ * <DialogBody>
96
+ * <p>This is the dialog content.</p>
97
+ * </DialogBody>
98
+ * <DialogFooter>
99
+ * <Button type="button" appearance="outlined">
100
+ * Cancel
101
+ * </Button>
102
+ * <Button type="button" appearance="filled">
103
+ * Save
104
+ * </Button>
105
+ * </DialogFooter>
106
+ * </DialogContent>
107
+ * </Dialog>
108
+ * ```
109
+ */
18
110
  declare const DialogContent: react.ForwardRefExoticComponent<Omit<Omit<_radix_ui_react_dialog.DialogContentProps & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>, "ref"> & {
19
111
  /**
20
112
  * The preferred width of the `DialogContent` as a tailwind `max-w-` class.
@@ -26,21 +118,182 @@ declare const DialogContent: react.ForwardRefExoticComponent<Omit<Omit<_radix_ui
26
118
  */
27
119
  preferredWidth?: `max-w-${string}`;
28
120
  } & react.RefAttributes<HTMLDivElement>>;
121
+ /**
122
+ * Contains the header content of the dialog, including the title and close button.
123
+ *
124
+ * @see https://mantle.ngrok.com/components/dialog#api-dialog-header
125
+ *
126
+ * @example
127
+ * ```tsx
128
+ * <Dialog>
129
+ * <DialogTrigger asChild>
130
+ * <Button type="button" appearance="outlined">
131
+ * Open Dialog
132
+ * </Button>
133
+ * </DialogTrigger>
134
+ * <DialogContent>
135
+ * <DialogHeader>
136
+ * <DialogTitle>Dialog Title</DialogTitle>
137
+ * <DialogCloseIconButton />
138
+ * </DialogHeader>
139
+ * <DialogBody>
140
+ * <p>This is the dialog content.</p>
141
+ * </DialogBody>
142
+ * </DialogContent>
143
+ * </Dialog>
144
+ * ```
145
+ */
29
146
  declare const DialogHeader: {
30
147
  ({ className, children, ...props }: ComponentProps<"div">): react_jsx_runtime.JSX.Element;
31
148
  displayName: string;
32
149
  };
33
150
  type DialogCloseIconButtonProps = Partial<Omit<IconButtonProps, "icon">>;
34
- declare const DialogCloseIconButton: ({ size, type, label, appearance, ...props }: DialogCloseIconButtonProps) => react_jsx_runtime.JSX.Element;
151
+ /**
152
+ * An icon button that closes the dialog when clicked.
153
+ *
154
+ * @see https://mantle.ngrok.com/components/dialog#api-dialog-close-icon-button
155
+ *
156
+ * @example
157
+ * ```tsx
158
+ * <Dialog>
159
+ * <DialogTrigger asChild>
160
+ * <Button type="button" appearance="outlined">
161
+ * Open Dialog
162
+ * </Button>
163
+ * </DialogTrigger>
164
+ * <DialogContent>
165
+ * <DialogHeader>
166
+ * <DialogTitle>Dialog Title</DialogTitle>
167
+ * <DialogCloseIconButton />
168
+ * </DialogHeader>
169
+ * <DialogBody>
170
+ * <p>This is the dialog content.</p>
171
+ * </DialogBody>
172
+ * </DialogContent>
173
+ * </Dialog>
174
+ * ```
175
+ */
176
+ declare const DialogCloseIconButton: {
177
+ ({ size, type, label, appearance, ...props }: DialogCloseIconButtonProps): react_jsx_runtime.JSX.Element;
178
+ displayName: string;
179
+ };
180
+ /**
181
+ * Contains the main content of the dialog.
182
+ *
183
+ * @see https://mantle.ngrok.com/components/dialog#api-dialog-body
184
+ *
185
+ * @example
186
+ * ```tsx
187
+ * <Dialog>
188
+ * <DialogTrigger asChild>
189
+ * <Button type="button" appearance="outlined">
190
+ * Open Dialog
191
+ * </Button>
192
+ * </DialogTrigger>
193
+ * <DialogContent>
194
+ * <DialogHeader>
195
+ * <DialogTitle>Dialog Title</DialogTitle>
196
+ * </DialogHeader>
197
+ * <DialogBody>
198
+ * <p>This is the dialog content.</p>
199
+ * </DialogBody>
200
+ * </DialogContent>
201
+ * </Dialog>
202
+ * ```
203
+ */
35
204
  declare const DialogBody: {
36
205
  ({ className, ...props }: ComponentProps<"div">): react_jsx_runtime.JSX.Element;
37
206
  displayName: string;
38
207
  };
208
+ /**
209
+ * Contains the footer content of the dialog, including action buttons.
210
+ *
211
+ * @see https://mantle.ngrok.com/components/dialog#api-dialog-footer
212
+ *
213
+ * @example
214
+ * ```tsx
215
+ * <Dialog>
216
+ * <DialogTrigger asChild>
217
+ * <Button type="button" appearance="outlined">
218
+ * Open Dialog
219
+ * </Button>
220
+ * </DialogTrigger>
221
+ * <DialogContent>
222
+ * <DialogHeader>
223
+ * <DialogTitle>Dialog Title</DialogTitle>
224
+ * </DialogHeader>
225
+ * <DialogBody>
226
+ * <p>This is the dialog content.</p>
227
+ * </DialogBody>
228
+ * <DialogFooter>
229
+ * <Button type="button" appearance="outlined">
230
+ * Cancel
231
+ * </Button>
232
+ * <Button type="button" appearance="filled">
233
+ * Save
234
+ * </Button>
235
+ * </DialogFooter>
236
+ * </DialogContent>
237
+ * </Dialog>
238
+ * ```
239
+ */
39
240
  declare const DialogFooter: {
40
241
  ({ className, ...props }: ComponentProps<"div">): react_jsx_runtime.JSX.Element;
41
242
  displayName: string;
42
243
  };
244
+ /**
245
+ * An accessible name to be announced when the dialog is opened.
246
+ *
247
+ * @see https://mantle.ngrok.com/components/dialog#api-dialog-title
248
+ *
249
+ * @example
250
+ * ```tsx
251
+ * <Dialog>
252
+ * <DialogTrigger asChild>
253
+ * <Button type="button" appearance="outlined">
254
+ * Open Dialog
255
+ * </Button>
256
+ * </DialogTrigger>
257
+ * <DialogContent>
258
+ * <DialogHeader>
259
+ * <DialogTitle>Dialog Title</DialogTitle>
260
+ * <DialogCloseIconButton />
261
+ * </DialogHeader>
262
+ * <DialogBody>
263
+ * <p>This is the dialog content.</p>
264
+ * </DialogBody>
265
+ * </DialogContent>
266
+ * </Dialog>
267
+ * ```
268
+ */
43
269
  declare const DialogTitle: react.ForwardRefExoticComponent<Omit<_radix_ui_react_dialog.DialogTitleProps & react.RefAttributes<HTMLHeadingElement>, "ref"> & react.RefAttributes<HTMLHeadingElement>>;
270
+ /**
271
+ * An accessible description to be announced when the dialog is opened.
272
+ *
273
+ * @see https://mantle.ngrok.com/components/dialog#api-dialog-description
274
+ *
275
+ * @example
276
+ * ```tsx
277
+ * <Dialog>
278
+ * <DialogTrigger asChild>
279
+ * <Button type="button" appearance="outlined">
280
+ * Open Dialog
281
+ * </Button>
282
+ * </DialogTrigger>
283
+ * <DialogContent>
284
+ * <DialogHeader>
285
+ * <DialogTitle>Dialog Title</DialogTitle>
286
+ * <DialogDescription>
287
+ * This is an optional description.
288
+ * </DialogDescription>
289
+ * </DialogHeader>
290
+ * <DialogBody>
291
+ * <p>This is the dialog content.</p>
292
+ * </DialogBody>
293
+ * </DialogContent>
294
+ * </Dialog>
295
+ * ```
296
+ */
44
297
  declare const DialogDescription: react.ForwardRefExoticComponent<Omit<Omit<_radix_ui_react_dialog.DialogDescriptionProps & react.RefAttributes<HTMLParagraphElement>, "ref"> & react.RefAttributes<HTMLParagraphElement>, "ref"> & react.RefAttributes<HTMLParagraphElement>>;
45
298
 
46
299
  export { Dialog, DialogBody, DialogClose, DialogCloseIconButton, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger };
package/dist/dialog.js CHANGED
@@ -1,2 +1,2 @@
1
- import{a as v,b as u,c as y,d as m,e as p,f as d,g,h as D}from"./chunk-HVMKFNT3.js";import{g as c}from"./chunk-BGY3DO4G.js";import"./chunk-3XX7M573.js";import"./chunk-D3XF6J5A.js";import{a as P}from"./chunk-BK4P33ZH.js";import"./chunk-4LSFAAZW.js";import"./chunk-72TJUKMV.js";import"./chunk-3C5O3AQA.js";import"./chunk-XQVVOOLT.js";import"./chunk-HDPLH5HC.js";import{a}from"./chunk-AZ56JGNY.js";import{XIcon as O}from"@phosphor-icons/react/X";import{forwardRef as r}from"react";import{jsx as e,jsxs as F}from"react/jsx-runtime";var T=v,W=u,C=y,z=m,f=r(({className:o,...t},i)=>e(p,{ref:i,className:a("bg-overlay data-state-closed:animate-out data-state-closed:fade-out-0 data-state-open:animate-in data-state-open:fade-in-0 fixed inset-0 z-50 backdrop-blur-sm",o),...t}));f.displayName=p.displayName;var x=r(({children:o,className:t,onInteractOutside:i,onPointerDownOutside:n,preferredWidth:s="max-w-lg",...B},I)=>F(C,{children:[e(f,{}),e("div",{className:"fixed inset-4 z-50 flex items-center justify-center",children:e(d,{className:a("flex max-h-full w-full flex-1 flex-col","outline-none focus-within:outline-none","border-dialog bg-dialog rounded-xl border shadow-lg transition-transform duration-200","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",s,t),onInteractOutside:l=>{c(l),i?.(l)},onPointerDownOutside:l=>{c(l),n?.(l)},ref:I,...B,children:o})})]}));x.displayName=d.displayName;var N=({className:o,children:t,...i})=>e("div",{className:a("border-dialog-muted text-strong relative flex shrink-0 items-center justify-between gap-2 border-b px-6 py-4","has-[.icon-button]:pr-4",o),...i,children:t});N.displayName="DialogHeader";var k=({size:o="md",type:t="button",label:i="Close Dialog",appearance:n="ghost",...s})=>e(m,{asChild:!0,children:e(P,{appearance:n,icon:e(O,{}),label:i,size:o,type:t,...s})}),b=({className:o,...t})=>e("div",{className:a("scrollbar text-body flex-1 overflow-y-auto p-6",o),...t});b.displayName="DialogBody";var h=({className:o,...t})=>e("div",{className:a("border-dialog-muted flex shrink-0 flex-row-reverse gap-2 border-t px-6 py-4",o),...t});h.displayName="DialogFooter";var R=r(({className:o,...t},i)=>e(g,{ref:i,className:a("text-strong truncate text-lg font-medium",o),...t}));R.displayName=g.displayName;var w=r(({className:o,...t},i)=>e(D,{ref:i,className:a("text-muted",o),...t}));w.displayName=D.displayName;export{T as Dialog,b as DialogBody,z as DialogClose,k as DialogCloseIconButton,x as DialogContent,w as DialogDescription,h as DialogFooter,N as DialogHeader,f as DialogOverlay,C as DialogPortal,R as DialogTitle,W as DialogTrigger};
1
+ import{a as c,b as f,c as P,d as m,e as u,f as y,g as v,h as C}from"./chunk-IVXZIYX4.js";import{g as p}from"./chunk-NRMIFYYG.js";import"./chunk-6RJ2G2DK.js";import"./chunk-D3XF6J5A.js";import{a as D}from"./chunk-RTXWW6ND.js";import"./chunk-4LSFAAZW.js";import"./chunk-72TJUKMV.js";import"./chunk-3C5O3AQA.js";import"./chunk-I6T6YV2L.js";import"./chunk-NPTDRQT5.js";import{a}from"./chunk-AZ56JGNY.js";import{XIcon as k}from"@phosphor-icons/react/X";import{forwardRef as r}from"react";import{jsx as t,jsxs as F}from"react/jsx-runtime";var x=c;x.displayName="Dialog";var N=f;N.displayName="DialogTrigger";var g=P;g.displayName="DialogPortal";var b=m;b.displayName="DialogClose";var d=r(({className:o,...e},i)=>t(u,{ref:i,className:a("bg-overlay data-state-closed:animate-out data-state-closed:fade-out-0 data-state-open:animate-in data-state-open:fade-in-0 fixed inset-0 z-50 backdrop-blur-sm",o),...e}));d.displayName="DialogOverlay";var h=r(({children:o,className:e,onInteractOutside:i,onPointerDownOutside:n,preferredWidth:s="max-w-lg",...W},z)=>F(g,{children:[t(d,{}),t("div",{className:"fixed inset-4 z-50 flex items-center justify-center",children:t(y,{className:a("flex max-h-full w-full flex-1 flex-col","outline-none focus-within:outline-none","border-dialog bg-dialog rounded-xl border shadow-lg transition-transform duration-200","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",s,e),onInteractOutside:l=>{p(l),i?.(l)},onPointerDownOutside:l=>{p(l),n?.(l)},ref:z,...W,children:o})})]}));h.displayName="DialogContent";var R=({className:o,children:e,...i})=>t("div",{className:a("border-dialog-muted text-strong relative flex shrink-0 items-center justify-between gap-2 border-b px-6 py-4","has-[.icon-button]:pr-4",o),...i,children:e});R.displayName="DialogHeader";var B=({size:o="md",type:e="button",label:i="Close Dialog",appearance:n="ghost",...s})=>t(m,{asChild:!0,children:t(D,{appearance:n,icon:t(k,{}),label:i,size:o,type:e,...s})});B.displayName="DialogCloseIconButton";var I=({className:o,...e})=>t("div",{className:a("scrollbar text-body flex-1 overflow-y-auto p-6",o),...e});I.displayName="DialogBody";var w=({className:o,...e})=>t("div",{className:a("border-dialog-muted flex shrink-0 flex-row-reverse gap-2 border-t px-6 py-4",o),...e});w.displayName="DialogFooter";var T=r(({className:o,...e},i)=>t(v,{ref:i,className:a("text-strong truncate text-lg font-medium",o),...e}));T.displayName="DialogTitle";var O=r(({className:o,...e},i)=>t(C,{ref:i,className:a("text-muted",o),...e}));O.displayName="DialogDescription";export{x as Dialog,I as DialogBody,b as DialogClose,B as DialogCloseIconButton,h as DialogContent,O as DialogDescription,w as DialogFooter,R as DialogHeader,d as DialogOverlay,g as DialogPortal,T as DialogTitle,N as DialogTrigger};
2
2
  //# sourceMappingURL=dialog.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/dialog/dialog.tsx"],"sourcesContent":["import { XIcon } from \"@phosphor-icons/react/X\";\nimport type {\n\tComponentProps,\n\tComponentPropsWithoutRef,\n\tComponentRef,\n} from \"react\";\nimport { forwardRef } from \"react\";\nimport { cx } from \"../../utils/cx/cx.js\";\nimport { IconButton, type IconButtonProps } from \"../button/icon-button.js\";\nimport { preventCloseOnPromptInteraction } from \"../toast/toast.js\";\nimport * as DialogPrimitive from \"./primitive.js\";\n\nconst Dialog = DialogPrimitive.Root;\n\nconst DialogTrigger = DialogPrimitive.Trigger;\n\nconst DialogPortal = DialogPrimitive.Portal;\n\nconst DialogClose = DialogPrimitive.Close;\n\nconst DialogOverlay = forwardRef<\n\tComponentRef<\"div\">,\n\tComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n\t<DialogPrimitive.Overlay\n\t\tref={ref}\n\t\tclassName={cx(\n\t\t\t\"bg-overlay data-state-closed:animate-out data-state-closed:fade-out-0 data-state-open:animate-in data-state-open:fade-in-0 fixed inset-0 z-50 backdrop-blur-sm\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nDialogOverlay.displayName = DialogPrimitive.Overlay.displayName;\n\ntype DialogContentProps = ComponentPropsWithoutRef<\n\ttypeof DialogPrimitive.Content\n> & {\n\t/**\n\t * The preferred width of the `DialogContent` as a tailwind `max-w-` class.\n\t *\n\t * By default, a `Dialog`'s content width is responsive with a default\n\t * preferred width: the maximum width of the `DialogContent`\n\t *\n\t * @default `max-w-lg`\n\t */\n\tpreferredWidth?: `max-w-${string}`;\n};\n\nconst DialogContent = forwardRef<ComponentRef<\"div\">, DialogContentProps>(\n\t(\n\t\t{\n\t\t\tchildren,\n\t\t\tclassName,\n\t\t\tonInteractOutside,\n\t\t\tonPointerDownOutside,\n\t\t\tpreferredWidth = \"max-w-lg\",\n\t\t\t...props\n\t\t},\n\t\tref,\n\t) => (\n\t\t<DialogPortal>\n\t\t\t<DialogOverlay />\n\t\t\t<div className=\"fixed inset-4 z-50 flex items-center justify-center\">\n\t\t\t\t<DialogPrimitive.Content\n\t\t\t\t\tclassName={cx(\n\t\t\t\t\t\t\"flex max-h-full w-full flex-1 flex-col\",\n\t\t\t\t\t\t\"outline-none focus-within:outline-none\",\n\t\t\t\t\t\t\"border-dialog bg-dialog rounded-xl border shadow-lg transition-transform duration-200\",\n\t\t\t\t\t\t\"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\",\n\t\t\t\t\t\tpreferredWidth,\n\t\t\t\t\t\tclassName,\n\t\t\t\t\t)}\n\t\t\t\t\tonInteractOutside={(event) => {\n\t\t\t\t\t\tpreventCloseOnPromptInteraction(event);\n\t\t\t\t\t\tonInteractOutside?.(event);\n\t\t\t\t\t}}\n\t\t\t\t\tonPointerDownOutside={(event) => {\n\t\t\t\t\t\tpreventCloseOnPromptInteraction(event);\n\t\t\t\t\t\tonPointerDownOutside?.(event);\n\t\t\t\t\t}}\n\t\t\t\t\tref={ref}\n\t\t\t\t\t{...props}\n\t\t\t\t>\n\t\t\t\t\t{children}\n\t\t\t\t</DialogPrimitive.Content>\n\t\t\t</div>\n\t\t</DialogPortal>\n\t),\n);\nDialogContent.displayName = DialogPrimitive.Content.displayName;\n\nconst DialogHeader = ({\n\tclassName,\n\tchildren,\n\t...props\n}: ComponentProps<\"div\">) => (\n\t<div\n\t\tclassName={cx(\n\t\t\t\"border-dialog-muted text-strong relative flex shrink-0 items-center justify-between gap-2 border-b px-6 py-4\",\n\t\t\t\"has-[.icon-button]:pr-4\", // when there are actions in the header, shorten the padding\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t>\n\t\t{children}\n\t</div>\n);\nDialogHeader.displayName = \"DialogHeader\";\n\ntype DialogCloseIconButtonProps = Partial<Omit<IconButtonProps, \"icon\">>;\nconst DialogCloseIconButton = ({\n\tsize = \"md\",\n\ttype = \"button\",\n\tlabel = \"Close Dialog\",\n\tappearance = \"ghost\",\n\t...props\n}: DialogCloseIconButtonProps) => (\n\t<DialogPrimitive.Close asChild>\n\t\t<IconButton\n\t\t\tappearance={appearance}\n\t\t\ticon={<XIcon />}\n\t\t\tlabel={label}\n\t\t\tsize={size}\n\t\t\ttype={type}\n\t\t\t{...props}\n\t\t/>\n\t</DialogPrimitive.Close>\n);\n\nconst DialogBody = ({ className, ...props }: ComponentProps<\"div\">) => (\n\t<div\n\t\tclassName={cx(\"scrollbar text-body flex-1 overflow-y-auto p-6\", className)}\n\t\t{...props}\n\t/>\n);\nDialogBody.displayName = \"DialogBody\";\n\nconst DialogFooter = ({ className, ...props }: ComponentProps<\"div\">) => (\n\t<div\n\t\tclassName={cx(\n\t\t\t\"border-dialog-muted flex shrink-0 flex-row-reverse gap-2 border-t px-6 py-4\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n);\nDialogFooter.displayName = \"DialogFooter\";\n\nconst DialogTitle = forwardRef<\n\tComponentRef<typeof DialogPrimitive.Title>,\n\tComponentPropsWithoutRef<typeof DialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n\t<DialogPrimitive.Title\n\t\tref={ref}\n\t\tclassName={cx(\"text-strong truncate text-lg font-medium\", className)}\n\t\t{...props}\n\t/>\n));\nDialogTitle.displayName = DialogPrimitive.Title.displayName;\n\nconst DialogDescription = forwardRef<\n\tComponentRef<\"p\">,\n\tComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n\t<DialogPrimitive.Description\n\t\tref={ref}\n\t\tclassName={cx(\"text-muted\", className)}\n\t\t{...props}\n\t/>\n));\nDialogDescription.displayName = DialogPrimitive.Description.displayName;\n\nexport {\n\tDialog,\n\tDialogBody,\n\tDialogClose,\n\tDialogCloseIconButton,\n\tDialogContent,\n\tDialogDescription,\n\tDialogFooter,\n\tDialogHeader,\n\tDialogOverlay,\n\tDialogPortal,\n\tDialogTitle,\n\tDialogTrigger,\n};\n"],"mappings":"2YAAA,OAAS,SAAAA,MAAa,0BAMtB,OAAS,cAAAC,MAAkB,QAkB1B,cAAAC,EAqCC,QAAAC,MArCD,oBAZD,IAAMC,EAAyBC,EAEzBC,EAAgCC,EAEhCC,EAA+BC,EAE/BC,EAA8BC,EAE9BC,EAAgBC,EAGpB,CAAC,CAAE,UAAAC,EAAW,GAAGC,CAAM,EAAGC,IAC3Bd,EAAiBe,EAAhB,CACA,IAAKD,EACL,UAAWE,EACV,iKACAJ,CACD,EACC,GAAGC,EACL,CACA,EACDH,EAAc,YAA8BK,EAAQ,YAgBpD,IAAME,EAAgBN,EACrB,CACC,CACC,SAAAO,EACA,UAAAN,EACA,kBAAAO,EACA,qBAAAC,EACA,eAAAC,EAAiB,WACjB,GAAGR,CACJ,EACAC,IAEAb,EAACK,EAAA,CACA,UAAAN,EAACU,EAAA,EAAc,EACfV,EAAC,OAAI,UAAU,sDACd,SAAAA,EAAiBsB,EAAhB,CACA,UAAWN,EACV,yCACA,yCACA,wFACA,2KACAK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AAAC,EAAW,GAAGC,CAAM,EAAGC,IAC3Bd,EAAiBsC,EAAhB,CACA,IAAKxB,EACL,UAAWE,EAAG,aAAcJ,CAAS,EACpC,GAAGC,EACL,CACA,EACDwB,EAAkB,YAA8BC,EAAY","names":["XIcon","forwardRef","jsx","jsxs","Dialog","Root","DialogTrigger","Trigger","DialogPortal","Portal","DialogClose","Close","DialogOverlay","forwardRef","className","props","ref","Overlay","cx","DialogContent","children","onInteractOutside","onPointerDownOutside","preferredWidth","Content","event","preventCloseOnPromptInteraction","DialogHeader","DialogCloseIconButton","size","type","label","appearance","IconButton","XIcon","DialogBody","DialogFooter","DialogTitle","Title","DialogDescription","Description"]}
1
+ {"version":3,"sources":["../src/components/dialog/dialog.tsx"],"sourcesContent":["import { XIcon } from \"@phosphor-icons/react/X\";\nimport type {\n\tComponentProps,\n\tComponentPropsWithoutRef,\n\tComponentRef,\n} from \"react\";\nimport { forwardRef } from \"react\";\nimport { cx } from \"../../utils/cx/cx.js\";\nimport { IconButton, type IconButtonProps } from \"../button/icon-button.js\";\nimport { preventCloseOnPromptInteraction } from \"../toast/toast.js\";\nimport * as DialogPrimitive from \"./primitive.js\";\n\n/**\n * A window overlaid on either the primary window or another dialog window.\n * The root stateful component for the Dialog.\n *\n * @see https://mantle.ngrok.com/components/dialog#api-dialog\n *\n * @example\n * ```tsx\n * <Dialog>\n * <DialogTrigger asChild>\n * <Button type=\"button\" appearance=\"outlined\">\n * Open Dialog\n * </Button>\n * </DialogTrigger>\n * <DialogContent>\n * <DialogHeader>\n * <DialogTitle>Dialog Title</DialogTitle>\n * <DialogCloseIconButton />\n * </DialogHeader>\n * <DialogBody>\n * <p>This is the dialog content.</p>\n * </DialogBody>\n * <DialogFooter>\n * <Button type=\"button\" appearance=\"outlined\">\n * Cancel\n * </Button>\n * <Button type=\"button\" appearance=\"filled\">\n * Save\n * </Button>\n * </DialogFooter>\n * </DialogContent>\n * </Dialog>\n * ```\n */\nconst Dialog = DialogPrimitive.Root;\nDialog.displayName = \"Dialog\";\n\n/**\n * A button that opens the dialog.\n *\n * @see https://mantle.ngrok.com/components/dialog#api-dialog-trigger\n *\n * @example\n * ```tsx\n * <Dialog>\n * <DialogTrigger asChild>\n * <Button type=\"button\" appearance=\"outlined\">\n * Open Dialog\n * </Button>\n * </DialogTrigger>\n * <DialogContent>\n * <DialogHeader>\n * <DialogTitle>Dialog Title</DialogTitle>\n * </DialogHeader>\n * <DialogBody>\n * <p>This is the dialog content.</p>\n * </DialogBody>\n * </DialogContent>\n * </Dialog>\n * ```\n */\nconst DialogTrigger = DialogPrimitive.Trigger;\nDialogTrigger.displayName = \"DialogTrigger\";\n\nconst DialogPortal = DialogPrimitive.Portal;\nDialogPortal.displayName = \"DialogPortal\";\n\nconst DialogClose = DialogPrimitive.Close;\nDialogClose.displayName = \"DialogClose\";\n\nconst DialogOverlay = forwardRef<\n\tComponentRef<\"div\">,\n\tComponentPropsWithoutRef<typeof DialogPrimitive.Overlay>\n>(({ className, ...props }, ref) => (\n\t<DialogPrimitive.Overlay\n\t\tref={ref}\n\t\tclassName={cx(\n\t\t\t\"bg-overlay data-state-closed:animate-out data-state-closed:fade-out-0 data-state-open:animate-in data-state-open:fade-in-0 fixed inset-0 z-50 backdrop-blur-sm\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nDialogOverlay.displayName = \"DialogOverlay\";\n\ntype DialogContentProps = ComponentPropsWithoutRef<\n\ttypeof DialogPrimitive.Content\n> & {\n\t/**\n\t * The preferred width of the `DialogContent` as a tailwind `max-w-` class.\n\t *\n\t * By default, a `Dialog`'s content width is responsive with a default\n\t * preferred width: the maximum width of the `DialogContent`\n\t *\n\t * @default `max-w-lg`\n\t */\n\tpreferredWidth?: `max-w-${string}`;\n};\n\n/**\n * The container for the dialog content.\n * Renders on top of the overlay and is centered in the viewport.\n *\n * @see https://mantle.ngrok.com/components/dialog#api-dialog-content\n *\n * @example\n * ```tsx\n * <Dialog>\n * <DialogTrigger asChild>\n * <Button type=\"button\" appearance=\"outlined\">\n * Open Dialog\n * </Button>\n * </DialogTrigger>\n * <DialogContent>\n * <DialogHeader>\n * <DialogTitle>Dialog Title</DialogTitle>\n * <DialogCloseIconButton />\n * </DialogHeader>\n * <DialogBody>\n * <p>This is the dialog content.</p>\n * </DialogBody>\n * <DialogFooter>\n * <Button type=\"button\" appearance=\"outlined\">\n * Cancel\n * </Button>\n * <Button type=\"button\" appearance=\"filled\">\n * Save\n * </Button>\n * </DialogFooter>\n * </DialogContent>\n * </Dialog>\n * ```\n */\nconst DialogContent = forwardRef<ComponentRef<\"div\">, DialogContentProps>(\n\t(\n\t\t{\n\t\t\tchildren,\n\t\t\tclassName,\n\t\t\tonInteractOutside,\n\t\t\tonPointerDownOutside,\n\t\t\tpreferredWidth = \"max-w-lg\",\n\t\t\t...props\n\t\t},\n\t\tref,\n\t) => (\n\t\t<DialogPortal>\n\t\t\t<DialogOverlay />\n\t\t\t<div className=\"fixed inset-4 z-50 flex items-center justify-center\">\n\t\t\t\t<DialogPrimitive.Content\n\t\t\t\t\tclassName={cx(\n\t\t\t\t\t\t\"flex max-h-full w-full flex-1 flex-col\",\n\t\t\t\t\t\t\"outline-none focus-within:outline-none\",\n\t\t\t\t\t\t\"border-dialog bg-dialog rounded-xl border shadow-lg transition-transform duration-200\",\n\t\t\t\t\t\t\"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\",\n\t\t\t\t\t\tpreferredWidth,\n\t\t\t\t\t\tclassName,\n\t\t\t\t\t)}\n\t\t\t\t\tonInteractOutside={(event) => {\n\t\t\t\t\t\tpreventCloseOnPromptInteraction(event);\n\t\t\t\t\t\tonInteractOutside?.(event);\n\t\t\t\t\t}}\n\t\t\t\t\tonPointerDownOutside={(event) => {\n\t\t\t\t\t\tpreventCloseOnPromptInteraction(event);\n\t\t\t\t\t\tonPointerDownOutside?.(event);\n\t\t\t\t\t}}\n\t\t\t\t\tref={ref}\n\t\t\t\t\t{...props}\n\t\t\t\t>\n\t\t\t\t\t{children}\n\t\t\t\t</DialogPrimitive.Content>\n\t\t\t</div>\n\t\t</DialogPortal>\n\t),\n);\nDialogContent.displayName = \"DialogContent\";\n\n/**\n * Contains the header content of the dialog, including the title and close button.\n *\n * @see https://mantle.ngrok.com/components/dialog#api-dialog-header\n *\n * @example\n * ```tsx\n * <Dialog>\n * <DialogTrigger asChild>\n * <Button type=\"button\" appearance=\"outlined\">\n * Open Dialog\n * </Button>\n * </DialogTrigger>\n * <DialogContent>\n * <DialogHeader>\n * <DialogTitle>Dialog Title</DialogTitle>\n * <DialogCloseIconButton />\n * </DialogHeader>\n * <DialogBody>\n * <p>This is the dialog content.</p>\n * </DialogBody>\n * </DialogContent>\n * </Dialog>\n * ```\n */\nconst DialogHeader = ({\n\tclassName,\n\tchildren,\n\t...props\n}: ComponentProps<\"div\">) => (\n\t<div\n\t\tclassName={cx(\n\t\t\t\"border-dialog-muted text-strong relative flex shrink-0 items-center justify-between gap-2 border-b px-6 py-4\",\n\t\t\t\"has-[.icon-button]:pr-4\", // when there are actions in the header, shorten the padding\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t>\n\t\t{children}\n\t</div>\n);\nDialogHeader.displayName = \"DialogHeader\";\n\ntype DialogCloseIconButtonProps = Partial<Omit<IconButtonProps, \"icon\">>;\n\n/**\n * An icon button that closes the dialog when clicked.\n *\n * @see https://mantle.ngrok.com/components/dialog#api-dialog-close-icon-button\n *\n * @example\n * ```tsx\n * <Dialog>\n * <DialogTrigger asChild>\n * <Button type=\"button\" appearance=\"outlined\">\n * Open Dialog\n * </Button>\n * </DialogTrigger>\n * <DialogContent>\n * <DialogHeader>\n * <DialogTitle>Dialog Title</DialogTitle>\n * <DialogCloseIconButton />\n * </DialogHeader>\n * <DialogBody>\n * <p>This is the dialog content.</p>\n * </DialogBody>\n * </DialogContent>\n * </Dialog>\n * ```\n */\nconst DialogCloseIconButton = ({\n\tsize = \"md\",\n\ttype = \"button\",\n\tlabel = \"Close Dialog\",\n\tappearance = \"ghost\",\n\t...props\n}: DialogCloseIconButtonProps) => (\n\t<DialogPrimitive.Close asChild>\n\t\t<IconButton\n\t\t\tappearance={appearance}\n\t\t\ticon={<XIcon />}\n\t\t\tlabel={label}\n\t\t\tsize={size}\n\t\t\ttype={type}\n\t\t\t{...props}\n\t\t/>\n\t</DialogPrimitive.Close>\n);\nDialogCloseIconButton.displayName = \"DialogCloseIconButton\";\n\n/**\n * Contains the main content of the dialog.\n *\n * @see https://mantle.ngrok.com/components/dialog#api-dialog-body\n *\n * @example\n * ```tsx\n * <Dialog>\n * <DialogTrigger asChild>\n * <Button type=\"button\" appearance=\"outlined\">\n * Open Dialog\n * </Button>\n * </DialogTrigger>\n * <DialogContent>\n * <DialogHeader>\n * <DialogTitle>Dialog Title</DialogTitle>\n * </DialogHeader>\n * <DialogBody>\n * <p>This is the dialog content.</p>\n * </DialogBody>\n * </DialogContent>\n * </Dialog>\n * ```\n */\nconst DialogBody = ({ className, ...props }: ComponentProps<\"div\">) => (\n\t<div\n\t\tclassName={cx(\"scrollbar text-body flex-1 overflow-y-auto p-6\", className)}\n\t\t{...props}\n\t/>\n);\nDialogBody.displayName = \"DialogBody\";\n\n/**\n * Contains the footer content of the dialog, including action buttons.\n *\n * @see https://mantle.ngrok.com/components/dialog#api-dialog-footer\n *\n * @example\n * ```tsx\n * <Dialog>\n * <DialogTrigger asChild>\n * <Button type=\"button\" appearance=\"outlined\">\n * Open Dialog\n * </Button>\n * </DialogTrigger>\n * <DialogContent>\n * <DialogHeader>\n * <DialogTitle>Dialog Title</DialogTitle>\n * </DialogHeader>\n * <DialogBody>\n * <p>This is the dialog content.</p>\n * </DialogBody>\n * <DialogFooter>\n * <Button type=\"button\" appearance=\"outlined\">\n * Cancel\n * </Button>\n * <Button type=\"button\" appearance=\"filled\">\n * Save\n * </Button>\n * </DialogFooter>\n * </DialogContent>\n * </Dialog>\n * ```\n */\nconst DialogFooter = ({ className, ...props }: ComponentProps<\"div\">) => (\n\t<div\n\t\tclassName={cx(\n\t\t\t\"border-dialog-muted flex shrink-0 flex-row-reverse gap-2 border-t px-6 py-4\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n);\nDialogFooter.displayName = \"DialogFooter\";\n\n/**\n * An accessible name to be announced when the dialog is opened.\n *\n * @see https://mantle.ngrok.com/components/dialog#api-dialog-title\n *\n * @example\n * ```tsx\n * <Dialog>\n * <DialogTrigger asChild>\n * <Button type=\"button\" appearance=\"outlined\">\n * Open Dialog\n * </Button>\n * </DialogTrigger>\n * <DialogContent>\n * <DialogHeader>\n * <DialogTitle>Dialog Title</DialogTitle>\n * <DialogCloseIconButton />\n * </DialogHeader>\n * <DialogBody>\n * <p>This is the dialog content.</p>\n * </DialogBody>\n * </DialogContent>\n * </Dialog>\n * ```\n */\nconst DialogTitle = forwardRef<\n\tComponentRef<typeof DialogPrimitive.Title>,\n\tComponentPropsWithoutRef<typeof DialogPrimitive.Title>\n>(({ className, ...props }, ref) => (\n\t<DialogPrimitive.Title\n\t\tref={ref}\n\t\tclassName={cx(\"text-strong truncate text-lg font-medium\", className)}\n\t\t{...props}\n\t/>\n));\nDialogTitle.displayName = \"DialogTitle\";\n\n/**\n * An accessible description to be announced when the dialog is opened.\n *\n * @see https://mantle.ngrok.com/components/dialog#api-dialog-description\n *\n * @example\n * ```tsx\n * <Dialog>\n * <DialogTrigger asChild>\n * <Button type=\"button\" appearance=\"outlined\">\n * Open Dialog\n * </Button>\n * </DialogTrigger>\n * <DialogContent>\n * <DialogHeader>\n * <DialogTitle>Dialog Title</DialogTitle>\n * <DialogDescription>\n * This is an optional description.\n * </DialogDescription>\n * </DialogHeader>\n * <DialogBody>\n * <p>This is the dialog content.</p>\n * </DialogBody>\n * </DialogContent>\n * </Dialog>\n * ```\n */\nconst DialogDescription = forwardRef<\n\tComponentRef<\"p\">,\n\tComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(({ className, ...props }, ref) => (\n\t<DialogPrimitive.Description\n\t\tref={ref}\n\t\tclassName={cx(\"text-muted\", className)}\n\t\t{...props}\n\t/>\n));\nDialogDescription.displayName = \"DialogDescription\";\n\nexport {\n\tDialog,\n\tDialogBody,\n\tDialogClose,\n\tDialogCloseIconButton,\n\tDialogContent,\n\tDialogDescription,\n\tDialogFooter,\n\tDialogHeader,\n\tDialogOverlay,\n\tDialogPortal,\n\tDialogTitle,\n\tDialogTrigger,\n};\n"],"mappings":"gZAAA,OAAS,SAAAA,MAAa,0BAMtB,OAAS,cAAAC,MAAkB,QAgF1B,cAAAC,EAuEC,QAAAC,MAvED,oBAxCD,IAAMC,EAAyBC,EAC/BD,EAAO,YAAc,SA0BrB,IAAME,EAAgCC,EACtCD,EAAc,YAAc,gBAE5B,IAAME,EAA+BC,EACrCD,EAAa,YAAc,eAE3B,IAAME,EAA8BC,EACpCD,EAAY,YAAc,cAE1B,IAAME,EAAgBC,EAGpB,CAAC,CAAE,UAAAC,EAAW,GAAGC,CAAM,EAAGC,IAC3Bd,EAAiBe,EAAhB,CACA,IAAKD,EACL,UAAWE,EACV,iKACAJ,CACD,EACC,GAAGC,EACL,CACA,EACDH,EAAc,YAAc,gBAkD5B,IAAMO,EAAgBN,EACrB,CACC,CACC,SAAAO,EACA,UAAAN,EACA,kBAAAO,EACA,qBAAAC,EACA,eAAAC,EAAiB,WACjB,GAAGR,CACJ,EACAC,IAEAb,EAACK,EAAA,CACA,UAAAN,EAACU,EAAA,EAAc,EACfV,EAAC,OAAI,UAAU,sDACd,SAAAA,EAAiBsB,EAAhB,CACA,UAAWN,EACV,yCACA,yCACA,wFACA,2KACAK,EACAT,CACD,EACA,kBAAoBW,GAAU,CAC7BC,EAAgCD,CAAK,EACrCJ,IAAoBI,CAAK,CAC1B,EACA,qBAAuBA,GAAU,CAChCC,EAAgCD,CAAK,EACrCH,IAAuBG,CAAK,CAC7B,EACA,IAAKT,EACJ,GAAGD,EAEH,SAAAK,EAC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og","Root","DialogTrigger","Trigger","DialogPortal","Portal","DialogClose","Close","DialogOverlay","forwardRef","className","props","ref","Overlay","cx","DialogContent","children","onInteractOutside","onPointerDownOutside","preferredWidth","Content","event","preventCloseOnPromptInteraction","DialogHeader","DialogCloseIconButton","size","type","label","appearance","IconButton","XIcon","DialogBody","DialogFooter","DialogTitle","Title","DialogDescription","Description"]}
@@ -3,7 +3,47 @@ import { W as WithAsChild } from './as-child-DJ7x3JFV.js';
3
3
  import * as react from 'react';
4
4
  import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
5
5
 
6
+ /**
7
+ * A menu of options or actions, triggered by a button.
8
+ * This is the root, stateful component that manages the open/closed state of the dropdown menu.
9
+ *
10
+ * @see https://mantle.ngrok.com/components/dropdown-menu#api-dropdown-menu
11
+ *
12
+ * @example
13
+ * ```tsx
14
+ * <DropdownMenu>
15
+ * <DropdownMenuTrigger asChild>
16
+ * <Button type="button" appearance="outlined">
17
+ * Open Menu
18
+ * </Button>
19
+ * </DropdownMenuTrigger>
20
+ * <DropdownMenuContent>
21
+ * <DropdownMenuItem>Item 1</DropdownMenuItem>
22
+ * <DropdownMenuItem>Item 2</DropdownMenuItem>
23
+ * </DropdownMenuContent>
24
+ * </DropdownMenu>
25
+ * ```
26
+ */
6
27
  declare const DropdownMenu: react.FC<DropdownMenuPrimitive.DropdownMenuProps>;
28
+ /**
29
+ * The trigger button that opens the dropdown menu.
30
+ *
31
+ * @see https://mantle.ngrok.com/components/dropdown-menu#api-dropdown-menu-trigger
32
+ *
33
+ * @example
34
+ * ```tsx
35
+ * <DropdownMenu>
36
+ * <DropdownMenuTrigger asChild>
37
+ * <Button type="button" appearance="outlined">
38
+ * Open Menu
39
+ * </Button>
40
+ * </DropdownMenuTrigger>
41
+ * <DropdownMenuContent>
42
+ * <DropdownMenuItem>Item 1</DropdownMenuItem>
43
+ * </DropdownMenuContent>
44
+ * </DropdownMenu>
45
+ * ```
46
+ */
7
47
  declare const DropdownMenuTrigger: react.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuTriggerProps & react.RefAttributes<HTMLButtonElement>>;
8
48
  declare const DropdownMenuGroup: react.ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuGroupProps & react.RefAttributes<HTMLDivElement>>;
9
49
  declare const DropdownMenuPortal: react.FC<DropdownMenuPrimitive.DropdownMenuPortalProps>;
@@ -13,12 +53,52 @@ declare const DropdownMenuSubTrigger: react.ForwardRefExoticComponent<Omit<Dropd
13
53
  inset?: boolean;
14
54
  } & react.RefAttributes<HTMLDivElement>>;
15
55
  declare const DropdownMenuSubContent: react.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubContentProps & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
56
+ /**
57
+ * The container for the dropdown menu content.
58
+ *
59
+ * @see https://mantle.ngrok.com/components/dropdown-menu#api-dropdown-menu-content
60
+ *
61
+ * @example
62
+ * ```tsx
63
+ * <DropdownMenu>
64
+ * <DropdownMenuTrigger asChild>
65
+ * <Button type="button" appearance="outlined">
66
+ * Open Menu
67
+ * </Button>
68
+ * </DropdownMenuTrigger>
69
+ * <DropdownMenuContent>
70
+ * <DropdownMenuItem>Item 1</DropdownMenuItem>
71
+ * <DropdownMenuItem>Item 2</DropdownMenuItem>
72
+ * </DropdownMenuContent>
73
+ * </DropdownMenu>
74
+ * ```
75
+ */
16
76
  declare const DropdownMenuContent: react.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuContentProps & react.RefAttributes<HTMLDivElement>, "ref"> & {
17
77
  /**
18
78
  * Whether the DropdownMenuContent should match the width of the trigger or use the intrinsic content width.
19
79
  */
20
80
  width?: "trigger" | "content";
21
81
  } & react.RefAttributes<HTMLDivElement>>;
82
+ /**
83
+ * An item in the dropdown menu.
84
+ *
85
+ * @see https://mantle.ngrok.com/components/dropdown-menu#api-dropdown-menu-item
86
+ *
87
+ * @example
88
+ * ```tsx
89
+ * <DropdownMenu>
90
+ * <DropdownMenuTrigger asChild>
91
+ * <Button type="button" appearance="outlined">
92
+ * Open Menu
93
+ * </Button>
94
+ * </DropdownMenuTrigger>
95
+ * <DropdownMenuContent>
96
+ * <DropdownMenuItem>Item 1</DropdownMenuItem>
97
+ * <DropdownMenuItem>Item 2</DropdownMenuItem>
98
+ * </DropdownMenuContent>
99
+ * </DropdownMenu>
100
+ * ```
101
+ */
22
102
  declare const DropdownMenuItem: react.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuItemProps & react.RefAttributes<HTMLDivElement>, "ref"> & {
23
103
  inset?: boolean;
24
104
  } & react.RefAttributes<HTMLDivElement>>;
@@ -1,2 +1,2 @@
1
- import{b as c}from"./chunk-UXH22BMO.js";import{a as s}from"./chunk-XQVVOOLT.js";import"./chunk-HDPLH5HC.js";import{a}from"./chunk-AZ56JGNY.js";import{CaretRightIcon as y}from"@phosphor-icons/react/CaretRight";import{CheckIcon as w}from"@phosphor-icons/react/Check";import*as e from"@radix-ui/react-dropdown-menu";import{forwardRef as d}from"react";import{jsx as o,jsxs as u}from"react/jsx-runtime";var R=e.Root,I=e.Trigger,k=e.Group,m=e.Portal,S=e.Sub,N=e.RadioGroup,f=d(({className:t,inset:n,children:r,...i},p)=>u(e.SubTrigger,{className:a("focus:bg-accent data-state-open:bg-accent relative flex cursor-pointer select-none items-center rounded py-1.5 pl-2 pr-9 text-sm outline-none","data-highlighted:bg-popover-hover data-state-open:bg-popover-hover","[&>svg]:size-5 [&_svg]:shrink-0",n&&"pl-8",t),ref:p,...i,children:[r,o("span",{className:"absolute right-2 flex items-center",children:o(s,{svg:o(y,{weight:"bold"}),className:"size-4"})})]}));f.displayName="DropdownMenuSubTrigger";var g=d(({className:t,loop:n=!0,...r},i)=>o(m,{children:o(e.SubContent,{className:a("scrollbar","text-popover-foreground border-popover bg-popover p-1.25 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 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 z-50 min-w-[8rem] overflow-hidden rounded-md border shadow-xl","my-2 max-h-[calc(var(--radix-dropdown-menu-content-available-height)_-_16px)] overflow-auto",t),loop:n,ref:i,...r})}));g.displayName="DropdownMenuSubContent";var h=d(({className:t,onClick:n,loop:r=!0,width:i,...p},C)=>o(m,{children:o(e.Content,{ref:C,className:a("scrollbar","text-popover-foreground border-popover bg-popover p-1.25 z-50 min-w-[8rem] overflow-hidden rounded-md border shadow-xl outline-none","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","my-2 max-h-[calc(var(--radix-dropdown-menu-content-available-height)_-_16px)] overflow-auto",i==="trigger"&&"w-[var(--radix-dropdown-menu-trigger-width)]",t),loop:r,onClick:l=>{l.stopPropagation(),n?.(l)},...p})}));h.displayName="DropdownMenuContent";var v=d(({className:t,inset:n,...r},i)=>o(e.Item,{ref:i,className:a("focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 data-highlighted:bg-popover-hover data-active-item:dark:bg-popover-hover relative flex cursor-pointer select-none items-center rounded px-2 py-1.5 text-sm font-normal outline-none transition-colors","[&>svg]:size-5 [&_svg]:shrink-0",n&&"pl-8",t),...r}));v.displayName="DropdownMenuItem";var M=d(({className:t,children:n,checked:r,...i},p)=>u(e.CheckboxItem,{ref:p,className:a("text-strong data-disabled:pointer-events-none data-disabled:opacity-50 relative flex cursor-pointer select-none items-center gap-2 rounded py-1.5 pl-2 pr-9 text-sm font-normal outline-none","data-highlighted:bg-popover-hover data-highlighted:dark:bg-popover-hover","aria-checked:!bg-filled-accent aria-checked:text-on-filled aria-checked:font-medium","[&>svg]:size-5 [&_svg]:shrink-0",t),checked:r,...i,children:[o("span",{className:"absolute right-2 flex items-center",children:o(e.ItemIndicator,{children:o(s,{svg:o(w,{weight:"bold"}),className:"size-4"})})}),n]}));M.displayName="DropdownMenuCheckboxItem";var D=d(({className:t,children:n,...r},i)=>u(e.RadioItem,{className:a("group/dropdown-menu-radio-item","text-strong data-disabled:pointer-events-none data-disabled:opacity-50 relative flex cursor-pointer select-none items-center gap-2 rounded py-1.5 px-2 text-sm font-normal outline-none","data-highlighted:bg-popover-hover data-highlighted:dark:bg-popover-hover","aria-checked:!bg-filled-accent aria-checked:text-on-filled aria-checked:font-medium aria-checked:pr-9","[&>svg]:size-5 [&_svg]:shrink-0",t),ref:i,...r,children:[o("span",{className:"absolute right-2 items-center hidden group-aria-checked/dropdown-menu-radio-item:flex",children:o(e.ItemIndicator,{children:o(s,{svg:o(w,{weight:"bold"}),className:"size-4"})})}),n]}));D.displayName="DropdownMenuRadioItem";var b=d(({className:t,inset:n,...r},i)=>o(e.Label,{ref:i,className:a("px-2 py-1.5 text-sm font-semibold",n&&"pl-8",t),...r}));b.displayName="DropdownMenuLabel";var P=d(({className:t,...n},r)=>o(c,{ref:r,className:a("-mx-1.25 my-1 w-auto",t),...n}));P.displayName="DropdownMenuSeparator";var x=({className:t,...n})=>o("span",{className:a("ml-auto text-xs tracking-widest opacity-60",t),...n});x.displayName="DropdownMenuShortcut";export{R as DropdownMenu,M as DropdownMenuCheckboxItem,h as DropdownMenuContent,k as DropdownMenuGroup,v as DropdownMenuItem,b as DropdownMenuLabel,m as DropdownMenuPortal,N as DropdownMenuRadioGroup,D as DropdownMenuRadioItem,P as DropdownMenuSeparator,x as DropdownMenuShortcut,S as DropdownMenuSub,g as DropdownMenuSubContent,f as DropdownMenuSubTrigger,I as DropdownMenuTrigger};
1
+ import{b as c}from"./chunk-J6ZF5J72.js";import{a as s}from"./chunk-I6T6YV2L.js";import"./chunk-NPTDRQT5.js";import{a}from"./chunk-AZ56JGNY.js";import{CaretRightIcon as k}from"@phosphor-icons/react/CaretRight";import{CheckIcon as w}from"@phosphor-icons/react/Check";import*as e from"@radix-ui/react-dropdown-menu";import{forwardRef as d}from"react";import{jsx as o,jsxs as u}from"react/jsx-runtime";var f=e.Root;f.displayName="DropdownMenu";var g=e.Trigger;g.displayName="DropdownMenuTrigger";var M=e.Group;M.displayName="DropdownMenuGroup";var m=e.Portal;m.displayName="DropdownMenuPortal";var D=e.Sub;D.displayName="DropdownMenuSub";var h=e.RadioGroup;h.displayName="DropdownMenuRadioGroup";var v=d(({className:t,inset:n,children:r,...i},p)=>u(e.SubTrigger,{className:a("focus:bg-accent data-state-open:bg-accent relative flex cursor-pointer select-none items-center rounded py-1.5 pl-2 pr-9 text-sm outline-none","data-highlighted:bg-popover-hover data-state-open:bg-popover-hover","[&>svg]:size-5 [&_svg]:shrink-0",n&&"pl-8",t),ref:p,...i,children:[r,o("span",{className:"absolute right-2 flex items-center",children:o(s,{svg:o(k,{weight:"bold"}),className:"size-4"})})]}));v.displayName="DropdownMenuSubTrigger";var b=d(({className:t,loop:n=!0,...r},i)=>o(m,{children:o(e.SubContent,{className:a("scrollbar","text-popover-foreground border-popover bg-popover p-1.25 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 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 z-50 min-w-[8rem] overflow-hidden rounded-md border shadow-xl","my-2 max-h-[calc(var(--radix-dropdown-menu-content-available-height)_-_16px)] overflow-auto",t),loop:n,ref:i,...r})}));b.displayName="DropdownMenuSubContent";var P=d(({className:t,onClick:n,loop:r=!0,width:i,...p},S)=>o(m,{children:o(e.Content,{ref:S,className:a("scrollbar","text-popover-foreground border-popover bg-popover p-1.25 z-50 min-w-[8rem] overflow-hidden rounded-md border shadow-xl outline-none","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","my-2 max-h-[calc(var(--radix-dropdown-menu-content-available-height)_-_16px)] overflow-auto",i==="trigger"&&"w-[var(--radix-dropdown-menu-trigger-width)]",t),loop:r,onClick:l=>{l.stopPropagation(),n?.(l)},...p})}));P.displayName="DropdownMenuContent";var y=d(({className:t,inset:n,...r},i)=>o(e.Item,{ref:i,className:a("focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 data-highlighted:bg-popover-hover data-active-item:dark:bg-popover-hover relative flex cursor-pointer select-none items-center rounded px-2 py-1.5 text-sm font-normal outline-none transition-colors","[&>svg]:size-5 [&_svg]:shrink-0",n&&"pl-8",t),...r}));y.displayName="DropdownMenuItem";var x=d(({className:t,children:n,checked:r,...i},p)=>u(e.CheckboxItem,{ref:p,className:a("text-strong data-disabled:pointer-events-none data-disabled:opacity-50 relative flex cursor-pointer select-none items-center gap-2 rounded py-1.5 pl-2 pr-9 text-sm font-normal outline-none","data-highlighted:bg-popover-hover data-highlighted:dark:bg-popover-hover","aria-checked:!bg-filled-accent aria-checked:text-on-filled aria-checked:font-medium","[&>svg]:size-5 [&_svg]:shrink-0",t),checked:r,...i,children:[o("span",{className:"absolute right-2 flex items-center",children:o(e.ItemIndicator,{children:o(s,{svg:o(w,{weight:"bold"}),className:"size-4"})})}),n]}));x.displayName="DropdownMenuCheckboxItem";var C=d(({className:t,children:n,...r},i)=>u(e.RadioItem,{className:a("group/dropdown-menu-radio-item","text-strong data-disabled:pointer-events-none data-disabled:opacity-50 relative flex cursor-pointer select-none items-center gap-2 rounded py-1.5 px-2 text-sm font-normal outline-none","data-highlighted:bg-popover-hover data-highlighted:dark:bg-popover-hover","aria-checked:!bg-filled-accent aria-checked:text-on-filled aria-checked:font-medium aria-checked:pr-9","[&>svg]:size-5 [&_svg]:shrink-0",t),ref:i,...r,children:[o("span",{className:"absolute right-2 items-center hidden group-aria-checked/dropdown-menu-radio-item:flex",children:o(e.ItemIndicator,{children:o(s,{svg:o(w,{weight:"bold"}),className:"size-4"})})}),n]}));C.displayName="DropdownMenuRadioItem";var R=d(({className:t,inset:n,...r},i)=>o(e.Label,{ref:i,className:a("px-2 py-1.5 text-sm font-semibold",n&&"pl-8",t),...r}));R.displayName="DropdownMenuLabel";var I=d(({className:t,...n},r)=>o(c,{ref:r,className:a("-mx-1.25 my-1 w-auto",t),...n}));I.displayName="DropdownMenuSeparator";var N=({className:t,...n})=>o("span",{className:a("ml-auto text-xs tracking-widest opacity-60",t),...n});N.displayName="DropdownMenuShortcut";export{f as DropdownMenu,x as DropdownMenuCheckboxItem,P as DropdownMenuContent,M as DropdownMenuGroup,y as DropdownMenuItem,R as DropdownMenuLabel,m as DropdownMenuPortal,h as DropdownMenuRadioGroup,C as DropdownMenuRadioItem,I as DropdownMenuSeparator,N as DropdownMenuShortcut,D as DropdownMenuSub,b as DropdownMenuSubContent,v as DropdownMenuSubTrigger,g as DropdownMenuTrigger};
2
2
  //# sourceMappingURL=dropdown-menu.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/dropdown-menu/dropdown-menu.tsx"],"sourcesContent":["import { CaretRightIcon } from \"@phosphor-icons/react/CaretRight\";\nimport { CheckIcon } from \"@phosphor-icons/react/Check\";\nimport * as DropdownMenuPrimitive from \"@radix-ui/react-dropdown-menu\";\nimport type { ComponentPropsWithoutRef, ComponentRef } from \"react\";\nimport { forwardRef } from \"react\";\nimport { cx } from \"../../utils/cx/cx.js\";\nimport { Icon } from \"../icon/icon.js\";\nimport { Separator } from \"../separator/separator.js\";\n\nconst DropdownMenu = DropdownMenuPrimitive.Root;\n\nconst DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;\n\nconst DropdownMenuGroup = DropdownMenuPrimitive.Group;\n\nconst DropdownMenuPortal = DropdownMenuPrimitive.Portal;\n\nconst DropdownMenuSub = DropdownMenuPrimitive.Sub;\n\nconst DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;\n\nconst DropdownMenuSubTrigger = forwardRef<\n\tComponentRef<typeof DropdownMenuPrimitive.SubTrigger>,\n\tComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> & {\n\t\tinset?: boolean;\n\t}\n>(({ className, inset, children, ...props }, ref) => (\n\t<DropdownMenuPrimitive.SubTrigger\n\t\tclassName={cx(\n\t\t\t\"focus:bg-accent data-state-open:bg-accent relative flex cursor-pointer select-none items-center rounded py-1.5 pl-2 pr-9 text-sm outline-none\",\n\t\t\t\"data-highlighted:bg-popover-hover data-state-open:bg-popover-hover\",\n\t\t\t\"[&>svg]:size-5 [&_svg]:shrink-0\",\n\t\t\tinset && \"pl-8\",\n\t\t\tclassName,\n\t\t)}\n\t\tref={ref}\n\t\t{...props}\n\t>\n\t\t{children}\n\t\t<span className=\"absolute right-2 flex items-center\">\n\t\t\t<Icon svg={<CaretRightIcon weight=\"bold\" />} className=\"size-4\" />\n\t\t</span>\n\t</DropdownMenuPrimitive.SubTrigger>\n));\nDropdownMenuSubTrigger.displayName = \"DropdownMenuSubTrigger\";\n\nconst DropdownMenuSubContent = forwardRef<\n\tComponentRef<typeof DropdownMenuPrimitive.SubContent>,\n\tComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>\n>(({ className, loop = true, ...props }, ref) => (\n\t<DropdownMenuPortal>\n\t\t<DropdownMenuPrimitive.SubContent\n\t\t\tclassName={cx(\n\t\t\t\t\"scrollbar\",\n\t\t\t\t\"text-popover-foreground border-popover bg-popover p-1.25 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 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 z-50 min-w-[8rem] overflow-hidden rounded-md border shadow-xl\",\n\t\t\t\t\"my-2 max-h-[calc(var(--radix-dropdown-menu-content-available-height)_-_16px)] overflow-auto\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\tloop={loop}\n\t\t\tref={ref}\n\t\t\t{...props}\n\t\t/>\n\t</DropdownMenuPortal>\n));\nDropdownMenuSubContent.displayName = \"DropdownMenuSubContent\";\n\ntype DropdownMenuContentProps = ComponentPropsWithoutRef<\n\ttypeof DropdownMenuPrimitive.Content\n> & {\n\t/**\n\t * Whether the DropdownMenuContent should match the width of the trigger or use the intrinsic content width.\n\t */\n\twidth?: \"trigger\" | \"content\";\n};\n\nconst DropdownMenuContent = forwardRef<\n\tComponentRef<typeof DropdownMenuPrimitive.Content>,\n\tDropdownMenuContentProps\n>(({ className, onClick, loop = true, width, ...props }, ref) => (\n\t<DropdownMenuPortal>\n\t\t<DropdownMenuPrimitive.Content\n\t\t\tref={ref}\n\t\t\tclassName={cx(\n\t\t\t\t\"scrollbar\",\n\t\t\t\t\"text-popover-foreground border-popover bg-popover p-1.25 z-50 min-w-[8rem] overflow-hidden rounded-md border shadow-xl outline-none\",\n\t\t\t\t\"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\",\n\t\t\t\t\"my-2 max-h-[calc(var(--radix-dropdown-menu-content-available-height)_-_16px)] overflow-auto\",\n\t\t\t\twidth === \"trigger\" && \"w-[var(--radix-dropdown-menu-trigger-width)]\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\tloop={loop}\n\t\t\tonClick={(event) => {\n\t\t\t\t/**\n\t\t\t\t * Prevent the click event from propagating up to parent/containing elements\n\t\t\t\t * of the DropdownMenu\n\t\t\t\t */\n\t\t\t\tevent.stopPropagation();\n\t\t\t\tonClick?.(event);\n\t\t\t}}\n\t\t\t{...props}\n\t\t/>\n\t</DropdownMenuPortal>\n));\nDropdownMenuContent.displayName = \"DropdownMenuContent\";\n\nconst DropdownMenuItem = forwardRef<\n\tComponentRef<typeof DropdownMenuPrimitive.Item>,\n\tComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & {\n\t\tinset?: boolean;\n\t}\n>(({ className, inset, ...props }, ref) => (\n\t<DropdownMenuPrimitive.Item\n\t\tref={ref}\n\t\tclassName={cx(\n\t\t\t\"focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 data-highlighted:bg-popover-hover data-active-item:dark:bg-popover-hover relative flex cursor-pointer select-none items-center rounded px-2 py-1.5 text-sm font-normal outline-none transition-colors\",\n\t\t\t\"[&>svg]:size-5 [&_svg]:shrink-0\",\n\t\t\tinset && \"pl-8\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nDropdownMenuItem.displayName = \"DropdownMenuItem\";\n\nconst DropdownMenuCheckboxItem = forwardRef<\n\tComponentRef<typeof DropdownMenuPrimitive.CheckboxItem>,\n\tComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>\n>(({ className, children, checked, ...props }, ref) => (\n\t<DropdownMenuPrimitive.CheckboxItem\n\t\tref={ref}\n\t\tclassName={cx(\n\t\t\t\"text-strong data-disabled:pointer-events-none data-disabled:opacity-50 relative flex cursor-pointer select-none items-center gap-2 rounded py-1.5 pl-2 pr-9 text-sm font-normal outline-none\",\n\t\t\t\"data-highlighted:bg-popover-hover data-highlighted:dark:bg-popover-hover\",\n\t\t\t\"aria-checked:!bg-filled-accent aria-checked:text-on-filled aria-checked:font-medium\",\n\t\t\t\"[&>svg]:size-5 [&_svg]:shrink-0\",\n\t\t\tclassName,\n\t\t)}\n\t\tchecked={checked}\n\t\t{...props}\n\t>\n\t\t<span className=\"absolute right-2 flex items-center\">\n\t\t\t<DropdownMenuPrimitive.ItemIndicator>\n\t\t\t\t<Icon svg={<CheckIcon weight=\"bold\" />} className=\"size-4\" />\n\t\t\t</DropdownMenuPrimitive.ItemIndicator>\n\t\t</span>\n\t\t{children}\n\t</DropdownMenuPrimitive.CheckboxItem>\n));\nDropdownMenuCheckboxItem.displayName = \"DropdownMenuCheckboxItem\";\n\ntype DropdownMenuRadioItemProps = ComponentPropsWithoutRef<\n\ttypeof DropdownMenuPrimitive.RadioItem\n> & {\n\tname?: string;\n\tid?: string;\n};\n\nconst DropdownMenuRadioItem = forwardRef<\n\tComponentRef<\"input\">,\n\tDropdownMenuRadioItemProps\n>(({ className, children, ...props }, ref) => (\n\t<DropdownMenuPrimitive.RadioItem\n\t\tclassName={cx(\n\t\t\t\"group/dropdown-menu-radio-item\",\n\t\t\t\"text-strong data-disabled:pointer-events-none data-disabled:opacity-50 relative flex cursor-pointer select-none items-center gap-2 rounded py-1.5 px-2 text-sm font-normal outline-none\",\n\t\t\t\"data-highlighted:bg-popover-hover data-highlighted:dark:bg-popover-hover\",\n\t\t\t\"aria-checked:!bg-filled-accent aria-checked:text-on-filled aria-checked:font-medium aria-checked:pr-9\",\n\t\t\t\"[&>svg]:size-5 [&_svg]:shrink-0\",\n\t\t\tclassName,\n\t\t)}\n\t\tref={ref}\n\t\t{...props}\n\t>\n\t\t<span className=\"absolute right-2 items-center hidden group-aria-checked/dropdown-menu-radio-item:flex\">\n\t\t\t<DropdownMenuPrimitive.ItemIndicator>\n\t\t\t\t<Icon svg={<CheckIcon weight=\"bold\" />} className=\"size-4\" />\n\t\t\t</DropdownMenuPrimitive.ItemIndicator>\n\t\t</span>\n\t\t{children}\n\t</DropdownMenuPrimitive.RadioItem>\n));\nDropdownMenuRadioItem.displayName = \"DropdownMenuRadioItem\";\n\nconst DropdownMenuLabel = forwardRef<\n\tComponentRef<typeof DropdownMenuPrimitive.Label>,\n\tComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> & {\n\t\tinset?: boolean;\n\t}\n>(({ className, inset, ...props }, ref) => (\n\t<DropdownMenuPrimitive.Label\n\t\tref={ref}\n\t\tclassName={cx(\n\t\t\t\"px-2 py-1.5 text-sm font-semibold\",\n\t\t\tinset && \"pl-8\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nDropdownMenuLabel.displayName = \"DropdownMenuLabel\";\n\nconst DropdownMenuSeparator = forwardRef<\n\tComponentRef<typeof Separator>,\n\tComponentPropsWithoutRef<typeof Separator>\n>(({ className, ...props }, ref) => (\n\t<Separator\n\t\tref={ref}\n\t\tclassName={cx(\"-mx-1.25 my-1 w-auto\", className)}\n\t\t{...props}\n\t/>\n));\nDropdownMenuSeparator.displayName = \"DropdownMenuSeparator\";\n\nconst DropdownMenuShortcut = ({\n\tclassName,\n\t...props\n}: React.HTMLAttributes<HTMLSpanElement>) => {\n\treturn (\n\t\t<span\n\t\t\tclassName={cx(\"ml-auto text-xs tracking-widest opacity-60\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n};\nDropdownMenuShortcut.displayName = \"DropdownMenuShortcut\";\n\nexport {\n\tDropdownMenu,\n\tDropdownMenuCheckboxItem,\n\tDropdownMenuContent,\n\tDropdownMenuGroup,\n\tDropdownMenuItem,\n\tDropdownMenuLabel,\n\tDropdownMenuPortal,\n\tDropdownMenuRadioGroup,\n\tDropdownMenuRadioItem,\n\tDropdownMenuSeparator,\n\tDropdownMenuShortcut,\n\tDropdownMenuSub,\n\tDropdownMenuSubContent,\n\tDropdownMenuSubTrigger,\n\tDropdownMenuTrigger,\n};\n"],"mappings":"+IAAA,OAAS,kBAAAA,MAAsB,mCAC/B,OAAS,aAAAC,MAAiB,8BAC1B,UAAYC,MAA2B,gCAEvC,OAAS,cAAAC,MAAkB,QAuB1B,OAaa,OAAAC,EAbb,QAAAC,MAAA,oBAlBD,IAAMC,EAAqC,OAErCC,EAA4C,UAE5CC,EAA0C,QAE1CC,EAA2C,SAE3CC,EAAwC,MAExCC,EAA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,IAEEb,EAAC,QACA,UAAWe,EAAG,6CAA8CL,CAAS,EACpE,GAAGG,EACL,EAGFmB,EAAqB,YAAc","names":["CaretRightIcon","CheckIcon","DropdownMenuPrimitive","forwardRef","jsx","jsxs","DropdownMenu","DropdownMenuTrigger","DropdownMenuGroup","DropdownMenuPortal","DropdownMenuSub","DropdownMenuRadioGroup","DropdownMenuSubTrigger","forwardRef","className","inset","children","props","ref","cx","Icon","CaretRightIcon","DropdownMenuSubContent","loop","DropdownMenuContent","onClick","width","event","DropdownMenuItem","DropdownMenuCheckboxItem","checked","CheckIcon","DropdownMenuRadioItem","DropdownMenuLabel","DropdownMenuSeparator","Separator","DropdownMenuShortcut"]}
1
+ {"version":3,"sources":["../src/components/dropdown-menu/dropdown-menu.tsx"],"sourcesContent":["import { CaretRightIcon } from \"@phosphor-icons/react/CaretRight\";\nimport { CheckIcon } from \"@phosphor-icons/react/Check\";\nimport * as DropdownMenuPrimitive from \"@radix-ui/react-dropdown-menu\";\nimport type { ComponentPropsWithoutRef, ComponentRef } from \"react\";\nimport { forwardRef } from \"react\";\nimport { cx } from \"../../utils/cx/cx.js\";\nimport { Icon } from \"../icon/icon.js\";\nimport { Separator } from \"../separator/separator.js\";\n\n/**\n * A menu of options or actions, triggered by a button.\n * This is the root, stateful component that manages the open/closed state of the dropdown menu.\n *\n * @see https://mantle.ngrok.com/components/dropdown-menu#api-dropdown-menu\n *\n * @example\n * ```tsx\n * <DropdownMenu>\n * <DropdownMenuTrigger asChild>\n * <Button type=\"button\" appearance=\"outlined\">\n * Open Menu\n * </Button>\n * </DropdownMenuTrigger>\n * <DropdownMenuContent>\n * <DropdownMenuItem>Item 1</DropdownMenuItem>\n * <DropdownMenuItem>Item 2</DropdownMenuItem>\n * </DropdownMenuContent>\n * </DropdownMenu>\n * ```\n */\nconst DropdownMenu = DropdownMenuPrimitive.Root;\nDropdownMenu.displayName = \"DropdownMenu\";\n\n/**\n * The trigger button that opens the dropdown menu.\n *\n * @see https://mantle.ngrok.com/components/dropdown-menu#api-dropdown-menu-trigger\n *\n * @example\n * ```tsx\n * <DropdownMenu>\n * <DropdownMenuTrigger asChild>\n * <Button type=\"button\" appearance=\"outlined\">\n * Open Menu\n * </Button>\n * </DropdownMenuTrigger>\n * <DropdownMenuContent>\n * <DropdownMenuItem>Item 1</DropdownMenuItem>\n * </DropdownMenuContent>\n * </DropdownMenu>\n * ```\n */\nconst DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;\nDropdownMenuTrigger.displayName = \"DropdownMenuTrigger\";\n\nconst DropdownMenuGroup = DropdownMenuPrimitive.Group;\nDropdownMenuGroup.displayName = \"DropdownMenuGroup\";\n\nconst DropdownMenuPortal = DropdownMenuPrimitive.Portal;\nDropdownMenuPortal.displayName = \"DropdownMenuPortal\";\n\nconst DropdownMenuSub = DropdownMenuPrimitive.Sub;\nDropdownMenuSub.displayName = \"DropdownMenuSub\";\n\nconst DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;\nDropdownMenuRadioGroup.displayName = \"DropdownMenuRadioGroup\";\n\nconst DropdownMenuSubTrigger = forwardRef<\n\tComponentRef<typeof DropdownMenuPrimitive.SubTrigger>,\n\tComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> & {\n\t\tinset?: boolean;\n\t}\n>(({ className, inset, children, ...props }, ref) => (\n\t<DropdownMenuPrimitive.SubTrigger\n\t\tclassName={cx(\n\t\t\t\"focus:bg-accent data-state-open:bg-accent relative flex cursor-pointer select-none items-center rounded py-1.5 pl-2 pr-9 text-sm outline-none\",\n\t\t\t\"data-highlighted:bg-popover-hover data-state-open:bg-popover-hover\",\n\t\t\t\"[&>svg]:size-5 [&_svg]:shrink-0\",\n\t\t\tinset && \"pl-8\",\n\t\t\tclassName,\n\t\t)}\n\t\tref={ref}\n\t\t{...props}\n\t>\n\t\t{children}\n\t\t<span className=\"absolute right-2 flex items-center\">\n\t\t\t<Icon svg={<CaretRightIcon weight=\"bold\" />} className=\"size-4\" />\n\t\t</span>\n\t</DropdownMenuPrimitive.SubTrigger>\n));\nDropdownMenuSubTrigger.displayName = \"DropdownMenuSubTrigger\";\n\nconst DropdownMenuSubContent = forwardRef<\n\tComponentRef<typeof DropdownMenuPrimitive.SubContent>,\n\tComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>\n>(({ className, loop = true, ...props }, ref) => (\n\t<DropdownMenuPortal>\n\t\t<DropdownMenuPrimitive.SubContent\n\t\t\tclassName={cx(\n\t\t\t\t\"scrollbar\",\n\t\t\t\t\"text-popover-foreground border-popover bg-popover p-1.25 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 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 z-50 min-w-[8rem] overflow-hidden rounded-md border shadow-xl\",\n\t\t\t\t\"my-2 max-h-[calc(var(--radix-dropdown-menu-content-available-height)_-_16px)] overflow-auto\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\tloop={loop}\n\t\t\tref={ref}\n\t\t\t{...props}\n\t\t/>\n\t</DropdownMenuPortal>\n));\nDropdownMenuSubContent.displayName = \"DropdownMenuSubContent\";\n\ntype DropdownMenuContentProps = ComponentPropsWithoutRef<\n\ttypeof DropdownMenuPrimitive.Content\n> & {\n\t/**\n\t * Whether the DropdownMenuContent should match the width of the trigger or use the intrinsic content width.\n\t */\n\twidth?: \"trigger\" | \"content\";\n};\n\n/**\n * The container for the dropdown menu content.\n *\n * @see https://mantle.ngrok.com/components/dropdown-menu#api-dropdown-menu-content\n *\n * @example\n * ```tsx\n * <DropdownMenu>\n * <DropdownMenuTrigger asChild>\n * <Button type=\"button\" appearance=\"outlined\">\n * Open Menu\n * </Button>\n * </DropdownMenuTrigger>\n * <DropdownMenuContent>\n * <DropdownMenuItem>Item 1</DropdownMenuItem>\n * <DropdownMenuItem>Item 2</DropdownMenuItem>\n * </DropdownMenuContent>\n * </DropdownMenu>\n * ```\n */\nconst DropdownMenuContent = forwardRef<\n\tComponentRef<typeof DropdownMenuPrimitive.Content>,\n\tDropdownMenuContentProps\n>(({ className, onClick, loop = true, width, ...props }, ref) => (\n\t<DropdownMenuPortal>\n\t\t<DropdownMenuPrimitive.Content\n\t\t\tref={ref}\n\t\t\tclassName={cx(\n\t\t\t\t\"scrollbar\",\n\t\t\t\t\"text-popover-foreground border-popover bg-popover p-1.25 z-50 min-w-[8rem] overflow-hidden rounded-md border shadow-xl outline-none\",\n\t\t\t\t\"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\",\n\t\t\t\t\"my-2 max-h-[calc(var(--radix-dropdown-menu-content-available-height)_-_16px)] overflow-auto\",\n\t\t\t\twidth === \"trigger\" && \"w-[var(--radix-dropdown-menu-trigger-width)]\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\tloop={loop}\n\t\t\tonClick={(event) => {\n\t\t\t\t/**\n\t\t\t\t * Prevent the click event from propagating up to parent/containing elements\n\t\t\t\t * of the DropdownMenu\n\t\t\t\t */\n\t\t\t\tevent.stopPropagation();\n\t\t\t\tonClick?.(event);\n\t\t\t}}\n\t\t\t{...props}\n\t\t/>\n\t</DropdownMenuPortal>\n));\nDropdownMenuContent.displayName = \"DropdownMenuContent\";\n\n/**\n * An item in the dropdown menu.\n *\n * @see https://mantle.ngrok.com/components/dropdown-menu#api-dropdown-menu-item\n *\n * @example\n * ```tsx\n * <DropdownMenu>\n * <DropdownMenuTrigger asChild>\n * <Button type=\"button\" appearance=\"outlined\">\n * Open Menu\n * </Button>\n * </DropdownMenuTrigger>\n * <DropdownMenuContent>\n * <DropdownMenuItem>Item 1</DropdownMenuItem>\n * <DropdownMenuItem>Item 2</DropdownMenuItem>\n * </DropdownMenuContent>\n * </DropdownMenu>\n * ```\n */\nconst DropdownMenuItem = forwardRef<\n\tComponentRef<typeof DropdownMenuPrimitive.Item>,\n\tComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & {\n\t\tinset?: boolean;\n\t}\n>(({ className, inset, ...props }, ref) => (\n\t<DropdownMenuPrimitive.Item\n\t\tref={ref}\n\t\tclassName={cx(\n\t\t\t\"focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 data-highlighted:bg-popover-hover data-active-item:dark:bg-popover-hover relative flex cursor-pointer select-none items-center rounded px-2 py-1.5 text-sm font-normal outline-none transition-colors\",\n\t\t\t\"[&>svg]:size-5 [&_svg]:shrink-0\",\n\t\t\tinset && \"pl-8\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nDropdownMenuItem.displayName = \"DropdownMenuItem\";\n\nconst DropdownMenuCheckboxItem = forwardRef<\n\tComponentRef<typeof DropdownMenuPrimitive.CheckboxItem>,\n\tComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>\n>(({ className, children, checked, ...props }, ref) => (\n\t<DropdownMenuPrimitive.CheckboxItem\n\t\tref={ref}\n\t\tclassName={cx(\n\t\t\t\"text-strong data-disabled:pointer-events-none data-disabled:opacity-50 relative flex cursor-pointer select-none items-center gap-2 rounded py-1.5 pl-2 pr-9 text-sm font-normal outline-none\",\n\t\t\t\"data-highlighted:bg-popover-hover data-highlighted:dark:bg-popover-hover\",\n\t\t\t\"aria-checked:!bg-filled-accent aria-checked:text-on-filled aria-checked:font-medium\",\n\t\t\t\"[&>svg]:size-5 [&_svg]:shrink-0\",\n\t\t\tclassName,\n\t\t)}\n\t\tchecked={checked}\n\t\t{...props}\n\t>\n\t\t<span className=\"absolute right-2 flex items-center\">\n\t\t\t<DropdownMenuPrimitive.ItemIndicator>\n\t\t\t\t<Icon svg={<CheckIcon weight=\"bold\" />} className=\"size-4\" />\n\t\t\t</DropdownMenuPrimitive.ItemIndicator>\n\t\t</span>\n\t\t{children}\n\t</DropdownMenuPrimitive.CheckboxItem>\n));\nDropdownMenuCheckboxItem.displayName = \"DropdownMenuCheckboxItem\";\n\ntype DropdownMenuRadioItemProps = ComponentPropsWithoutRef<\n\ttypeof DropdownMenuPrimitive.RadioItem\n> & {\n\tname?: string;\n\tid?: string;\n};\n\nconst DropdownMenuRadioItem = forwardRef<\n\tComponentRef<\"input\">,\n\tDropdownMenuRadioItemProps\n>(({ className, children, ...props }, ref) => (\n\t<DropdownMenuPrimitive.RadioItem\n\t\tclassName={cx(\n\t\t\t\"group/dropdown-menu-radio-item\",\n\t\t\t\"text-strong data-disabled:pointer-events-none data-disabled:opacity-50 relative flex cursor-pointer select-none items-center gap-2 rounded py-1.5 px-2 text-sm font-normal outline-none\",\n\t\t\t\"data-highlighted:bg-popover-hover data-highlighted:dark:bg-popover-hover\",\n\t\t\t\"aria-checked:!bg-filled-accent aria-checked:text-on-filled aria-checked:font-medium aria-checked:pr-9\",\n\t\t\t\"[&>svg]:size-5 [&_svg]:shrink-0\",\n\t\t\tclassName,\n\t\t)}\n\t\tref={ref}\n\t\t{...props}\n\t>\n\t\t<span className=\"absolute right-2 items-center hidden group-aria-checked/dropdown-menu-radio-item:flex\">\n\t\t\t<DropdownMenuPrimitive.ItemIndicator>\n\t\t\t\t<Icon svg={<CheckIcon weight=\"bold\" />} className=\"size-4\" />\n\t\t\t</DropdownMenuPrimitive.ItemIndicator>\n\t\t</span>\n\t\t{children}\n\t</DropdownMenuPrimitive.RadioItem>\n));\nDropdownMenuRadioItem.displayName = \"DropdownMenuRadioItem\";\n\nconst DropdownMenuLabel = forwardRef<\n\tComponentRef<typeof DropdownMenuPrimitive.Label>,\n\tComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> & {\n\t\tinset?: boolean;\n\t}\n>(({ className, inset, ...props }, ref) => (\n\t<DropdownMenuPrimitive.Label\n\t\tref={ref}\n\t\tclassName={cx(\n\t\t\t\"px-2 py-1.5 text-sm font-semibold\",\n\t\t\tinset && \"pl-8\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nDropdownMenuLabel.displayName = \"DropdownMenuLabel\";\n\nconst DropdownMenuSeparator = forwardRef<\n\tComponentRef<typeof Separator>,\n\tComponentPropsWithoutRef<typeof Separator>\n>(({ className, ...props }, ref) => (\n\t<Separator\n\t\tref={ref}\n\t\tclassName={cx(\"-mx-1.25 my-1 w-auto\", className)}\n\t\t{...props}\n\t/>\n));\nDropdownMenuSeparator.displayName = \"DropdownMenuSeparator\";\n\nconst DropdownMenuShortcut = ({\n\tclassName,\n\t...props\n}: React.HTMLAttributes<HTMLSpanElement>) => {\n\treturn (\n\t\t<span\n\t\t\tclassName={cx(\"ml-auto text-xs tracking-widest opacity-60\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n};\nDropdownMenuShortcut.displayName = \"DropdownMenuShortcut\";\n\nexport {\n\tDropdownMenu,\n\tDropdownMenuCheckboxItem,\n\tDropdownMenuContent,\n\tDropdownMenuGroup,\n\tDropdownMenuItem,\n\tDropdownMenuLabel,\n\tDropdownMenuPortal,\n\tDropdownMenuRadioGroup,\n\tDropdownMenuRadioItem,\n\tDropdownMenuSeparator,\n\tDropdownMenuShortcut,\n\tDropdownMenuSub,\n\tDropdownMenuSubContent,\n\tDropdownMenuSubTrigger,\n\tDropdownMenuTrigger,\n};\n"],"mappings":"+IAAA,OAAS,kBAAAA,MAAsB,mCAC/B,OAAS,aAAAC,MAAiB,8BAC1B,UAAYC,MAA2B,gCAEvC,OAAS,cAAAC,MAAkB,QAqE1B,OAaa,OAAAC,EAbb,QAAAC,MAAA,oBA3CD,IAAMC,EAAqC,OAC3CA,EAAa,YAAc,eAqB3B,IAAMC,EAA4C,UAClDA,EAAoB,YAAc,sBAElC,IAAMC,EAA0C,QAChDA,EAAkB,YAAc,oBAEhC,IAAMC,EAA2C,SACjDA,EAAm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AC9C,GAAGG,EACL,CACA,EACDiB,EAAsB,YAAc,wBAEpC,IAAME,EAAuB,CAAC,CAC7B,UAAAtB,EACA,GAAGG,CACJ,IAEEb,EAAC,QACA,UAAWe,EAAG,6CAA8CL,CAAS,EACpE,GAAGG,EACL,EAGFmB,EAAqB,YAAc","names":["CaretRightIcon","CheckIcon","DropdownMenuPrimitive","forwardRef","jsx","jsxs","DropdownMenu","DropdownMenuTrigger","DropdownMenuGroup","DropdownMenuPortal","DropdownMenuSub","DropdownMenuRadioGroup","DropdownMenuSubTrigger","forwardRef","className","inset","children","props","ref","cx","Icon","CaretRightIcon","DropdownMenuSubContent","loop","DropdownMenuContent","onClick","width","event","DropdownMenuItem","DropdownMenuCheckboxItem","checked","CheckIcon","DropdownMenuRadioItem","DropdownMenuLabel","DropdownMenuSeparator","Separator","DropdownMenuShortcut"]}
package/dist/flag.d.ts CHANGED
@@ -35,7 +35,7 @@ type Props = Omit<ComponentProps<"div">, "children"> & {
35
35
  * A flag component that displays a flag based on the provided country code.
36
36
  * Inspired by [react-flagpack](https://flagpack.xyz/docs/development/react).
37
37
  *
38
- * @see https://mantle.ngrok.com/components/flag#api
38
+ * @see https://mantle.ngrok.com/components/flag#api-flag
39
39
  *
40
40
  * @example
41
41
  * ```tsx
@@ -46,5 +46,8 @@ type Props = Omit<ComponentProps<"div">, "children"> & {
46
46
  * ```
47
47
  */
48
48
  declare function Flag({ className, code, size, loading, ...props }: Props): react_jsx_runtime.JSX.Element;
49
+ declare namespace Flag {
50
+ var displayName: string;
51
+ }
49
52
 
50
53
  export { type CountryCode, Flag, type Props as FlagProps, countryCodes, isCountryCode };