@ngrok/mantle 0.81.0 → 0.82.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 (133) hide show
  1. package/dist/accordion.d.ts +6 -6
  2. package/dist/accordion.js +1 -1
  3. package/dist/agent.json +4 -1
  4. package/dist/alert-BWwNPOMI.d.ts +391 -0
  5. package/dist/alert-QMs0PqMq.js +1 -0
  6. package/dist/alert-center.d.ts +449 -0
  7. package/dist/alert-center.js +1 -0
  8. package/dist/alert-dialog.js +1 -1
  9. package/dist/alert.d.ts +1 -288
  10. package/dist/alert.js +1 -1
  11. package/dist/{anchor-DfeXTpKW.js → anchor-DvbNsphX.js} +1 -1
  12. package/dist/anchor.js +1 -1
  13. package/dist/app-layout.d.ts +483 -0
  14. package/dist/app-layout.js +1 -0
  15. package/dist/area-chart.d.ts +4 -3
  16. package/dist/area-chart.js +1 -1
  17. package/dist/badge.js +1 -1
  18. package/dist/bar-chart.d.ts +4 -3
  19. package/dist/bar-chart.js +1 -1
  20. package/dist/breadcrumb.d.ts +1 -1
  21. package/dist/breadcrumb.js +1 -1
  22. package/dist/browser-only-CmEEzfU3.js +1 -0
  23. package/dist/browser-only.js +1 -1
  24. package/dist/{button-D9n09xUg.js → button-BO2CKsz6.js} +1 -1
  25. package/dist/{button-DjpEKt2X.js → button-BUospUB3.js} +1 -1
  26. package/dist/{button-BAno7KIU.js → button-C0S8RbaJ.js} +1 -1
  27. package/dist/button.js +1 -1
  28. package/dist/calendar.d.ts +1 -1
  29. package/dist/calendar.js +1 -1
  30. package/dist/card.js +1 -1
  31. package/dist/centered-layout.d.ts +9 -9
  32. package/dist/centered-layout.js +1 -1
  33. package/dist/{chart-BcOC6Qj0.d.ts → chart-1cVjAcj8.d.ts} +81 -22
  34. package/dist/chart-DdBQ3xwx.js +2 -0
  35. package/dist/checkbox.d.ts +12 -0
  36. package/dist/{choice-BHwFSSyv.js → choice-C9gLKECf.js} +1 -1
  37. package/dist/choice.js +1 -1
  38. package/dist/code-block.d.ts +46 -0
  39. package/dist/code-block.js +1 -1
  40. package/dist/code.js +1 -1
  41. package/dist/combobox.js +1 -1
  42. package/dist/command.d.ts +67 -9
  43. package/dist/command.js +1 -1
  44. package/dist/{copy-to-clipboard-BsCQ9m6K.js → copy-to-clipboard-B4UB6pts.js} +1 -1
  45. package/dist/data-slot-EM6s2WEU.js +1 -0
  46. package/dist/data-table.d.ts +1 -1
  47. package/dist/data-table.js +1 -1
  48. package/dist/description-list.d.ts +36 -16
  49. package/dist/description-list.js +1 -1
  50. package/dist/{dialog-DWZWd5Jt.js → dialog-Bsj_dX6r.js} +1 -1
  51. package/dist/dialog.d.ts +1 -1
  52. package/dist/dialog.js +1 -1
  53. package/dist/dropdown-menu-BbbQuae2.d.ts +1 -0
  54. package/dist/{dropdown-menu-DZg-Cd69.d.ts → dropdown-menu-D6pMAY7I.d.ts} +138 -0
  55. package/dist/dropdown-menu-fUMqjRC0.js +1 -0
  56. package/dist/dropdown-menu.d.ts +2 -2
  57. package/dist/dropdown-menu.js +1 -1
  58. package/dist/empty.js +1 -1
  59. package/dist/field.d.ts +12 -9
  60. package/dist/field.js +1 -1
  61. package/dist/flag.d.ts +1 -1
  62. package/dist/hooks.js +1 -1
  63. package/dist/{icons-DLCs1hLP.js → icons-CPbOq7cF.js} +1 -1
  64. package/dist/icons.d.ts +52 -1
  65. package/dist/icons.js +1 -1
  66. package/dist/input.js +1 -1
  67. package/dist/line-chart.d.ts +4 -3
  68. package/dist/line-chart.js +1 -1
  69. package/dist/{list-51KQvENW.js → list-CQFWx6Z8.js} +1 -1
  70. package/dist/list.js +1 -1
  71. package/dist/llms.txt +4 -1
  72. package/dist/main.d.ts +4 -1
  73. package/dist/main.js +1 -1
  74. package/dist/mantle.css +21 -1
  75. package/dist/media-object.d.ts +42 -0
  76. package/dist/media-object.js +1 -1
  77. package/dist/multi-select.d.ts +10 -2
  78. package/dist/multi-select.js +1 -1
  79. package/dist/otp-input.js +1 -1
  80. package/dist/pagination.d.ts +6 -7
  81. package/dist/pagination.js +1 -1
  82. package/dist/{primitive-trJDqIXJ.js → primitive-Dv-3snU3.js} +1 -1
  83. package/dist/progress.d.ts +8 -8
  84. package/dist/qr-code.js +1 -1
  85. package/dist/radio-group.d.ts +129 -0
  86. package/dist/radio-group.js +1 -1
  87. package/dist/sandboxed-on-click.d.ts +2 -2
  88. package/dist/sandboxed-on-click.js +1 -1
  89. package/dist/scatter-plot.d.ts +4 -3
  90. package/dist/scatter-plot.js +1 -1
  91. package/dist/{select-BCHWvmyC.js → select-B-9yWrif.js} +1 -1
  92. package/dist/select.js +1 -1
  93. package/dist/selectable-list.js +1 -1
  94. package/dist/{separator-bpE_kooz.js → separator-BepAcFFy.js} +1 -1
  95. package/dist/separator.js +1 -1
  96. package/dist/sheet-_fXLjiq2.js +1 -0
  97. package/dist/sheet.d.ts +11 -11
  98. package/dist/sheet.js +1 -1
  99. package/dist/sidebar.d.ts +2084 -0
  100. package/dist/sidebar.js +1 -0
  101. package/dist/{skeleton-CsbUHbBA.js → skeleton-DsHXIa9j.js} +1 -1
  102. package/dist/skeleton.js +1 -1
  103. package/dist/skip-to-main-link.js +1 -1
  104. package/dist/slot-Dpsqz16D.js +1 -0
  105. package/dist/slot.js +1 -1
  106. package/dist/split-button.d.ts +147 -8
  107. package/dist/split-button.js +1 -1
  108. package/dist/{table-Bo0vNxIJ.d.ts → table-CZBYEmyK.d.ts} +2 -2
  109. package/dist/table.d.ts +1 -1
  110. package/dist/tabs.js +1 -1
  111. package/dist/text-area.d.ts +1 -1
  112. package/dist/{theme-CYNpplwN.d.ts → theme-FbfjYiD3.d.ts} +16 -0
  113. package/dist/{theme-C26-Xolp.js → theme-IAnQ35bd.js} +1 -1
  114. package/dist/theme-switcher.d.ts +2 -2
  115. package/dist/theme-switcher.js +1 -1
  116. package/dist/theme.d.ts +42 -2
  117. package/dist/theme.js +1 -1
  118. package/dist/toast.d.ts +4 -0
  119. package/dist/toast.js +1 -1
  120. package/dist/types.js +1 -1
  121. package/dist/use-breakpoint-Wd7_5-Mu.js +1 -0
  122. package/dist/use-copy-to-clipboard-CSyp4Zk0.js +1 -0
  123. package/dist/use-is-hydrated-DDCqXmju.js +1 -0
  124. package/dist/{use-prefers-reduced-motion-CagaNRgm.js → use-prefers-reduced-motion-Bk5zAfHY.js} +1 -1
  125. package/dist/utils.js +1 -1
  126. package/dist/well.js +1 -1
  127. package/package.json +18 -15
  128. package/dist/browser-only-CPH56Xw_.js +0 -1
  129. package/dist/chart-BROa2gqt.js +0 -2
  130. package/dist/dropdown-menu-Dw-OtXPm.d.ts +0 -1
  131. package/dist/dropdown-menu-RyDWoKHx.js +0 -1
  132. package/dist/slot-CDk0Bb9z.js +0 -1
  133. package/dist/use-copy-to-clipboard-DqQ0_N3E.js +0 -1
package/dist/alert.d.ts CHANGED
@@ -1,289 +1,2 @@
1
- import { n as WithAsChild } from "./as-child-D23mGo4f.js";
2
- import { t as SvgAttributes } from "./icon-D1RY5Tcj.js";
3
- import "./index-DA4ig3gj.js";
4
- import { n as IconButtonProps, r as IconButtonAppearance } from "./button-C7vAl6lS.js";
5
- import { ComponentProps, ReactNode } from "react";
6
- //#region src/components/alert/alert.d.ts
7
- declare const intents: readonly ["danger", "important", "info", "success", "warning"];
8
- type AlertIntent = (typeof intents)[number];
9
- declare const appearances: readonly ["banner", "default"];
10
- type Appearance = (typeof appearances)[number];
11
- type AlertProps = ComponentProps<"div"> & {
12
- /**
13
- * The intent of the Alert — the status its color communicates to the user,
14
- * determining the color and styling of the Alert.
15
- */
16
- intent: AlertIntent;
17
- /**
18
- * Controls the visual style of the Alert.
19
- * - "default" provides standard rounded corners and borders.
20
- * - "banner" creates a banner-style alert with no rounded corners, sticky positioning, and no left/right borders.
21
- *
22
- * @default "default"
23
- */
24
- appearance?: Appearance;
25
- };
26
- /**
27
- * Displays a callout for user attention. Root container for all Alert sub-components.
28
- *
29
- * @see https://mantle.ngrok.com/components/feedback/alert#alertroot
30
- *
31
- * @example
32
- * ```tsx
33
- * <Alert intent="info">
34
- * <AlertIcon />
35
- * <AlertContent>
36
- * <AlertTitle>Alert Title</AlertTitle>
37
- * <AlertDismissIconButton />
38
- * <AlertDescription>
39
- * Alert description text.
40
- * </AlertDescription>
41
- * </AlertContent>
42
- * </Alert>
43
- *```
44
- */
45
- declare const Root: ({ appearance, className, intent, ref, ...props }: AlertProps) => import("react").JSX.Element;
46
- type AlertIconProps = Omit<SvgAttributes, "children"> & {
47
- /**
48
- * An optional icon that renders in place of the default icon for the Alert intent.
49
- */
50
- svg?: ReactNode;
51
- };
52
- /**
53
- * An optional icon that visually represents the intent of the Alert.
54
- *
55
- * The default rendered icon be overridden with a custom icon using the `svg` prop.
56
- *
57
- * @see https://mantle.ngrok.com/components/feedback/alert#alerticon
58
- *
59
- * @example
60
- * ```tsx
61
- * <Alert intent="info">
62
- * <AlertIcon />
63
- * <AlertContent>
64
- * <AlertTitle>Alert Title</AlertTitle>
65
- * <AlertDismissIconButton />
66
- * <AlertDescription>
67
- * Alert description text.
68
- * </AlertDescription>
69
- * </AlertContent>
70
- * </Alert>
71
- * ```
72
- */
73
- declare const Icon: ({ className, ref, svg, ...props }: AlertIconProps) => import("react").JSX.Element;
74
- /**
75
- * The container for the content slot of an alert. Place the title and description as direct children.
76
- *
77
- * @see https://mantle.ngrok.com/components/feedback/alert#alertcontent
78
- *
79
- * @example
80
- * ```tsx
81
- * <Alert intent="info">
82
- * <AlertIcon />
83
- * <AlertContent>
84
- * <AlertTitle>Alert Title</AlertTitle>
85
- * <AlertDismissIconButton />
86
- * <AlertDescription>
87
- * Alert description text.
88
- * </AlertDescription>
89
- * </AlertContent>
90
- * </Alert>
91
- *```
92
- */
93
- declare const Content: ({ className, ref, ...props }: ComponentProps<"div">) => import("react").JSX.Element;
94
- type AlertTitleProps = ComponentProps<"h5"> & WithAsChild;
95
- /**
96
- * The title of an alert. Default renders as an h5 element, use asChild to render something else.
97
- *
98
- * @see https://mantle.ngrok.com/components/feedback/alert#alerttitle
99
- *
100
- * @example
101
- * ```tsx
102
- * <Alert intent="info">
103
- * <AlertIcon />
104
- * <AlertContent>
105
- * <AlertTitle>Alert Title</AlertTitle>
106
- * <AlertDismissIconButton />
107
- * <AlertDescription>
108
- * Alert description text.
109
- * </AlertDescription>
110
- * </AlertContent>
111
- * </Alert>
112
- *```
113
- */
114
- declare const Title: ({ asChild, className, ref, ...props }: AlertTitleProps) => import("react").JSX.Element;
115
- type AlertDescriptionProps = ComponentProps<"div"> & WithAsChild;
116
- /**
117
- * The optional description of an alert.
118
- * Renders as a `div` by default, but can be changed to any other element using
119
- * the `asChild` prop.
120
- *
121
- * @see https://mantle.ngrok.com/components/feedback/alert#alertdescription
122
- *
123
- * @example
124
- * ```tsx
125
- * <Alert intent="info">
126
- * <AlertIcon />
127
- * <AlertContent>
128
- * <AlertTitle>Alert Title</AlertTitle>
129
- * <AlertDismissIconButton />
130
- * <AlertDescription>
131
- * Alert description text.
132
- * </AlertDescription>
133
- * </AlertContent>
134
- * </Alert>
135
- * ```
136
- */
137
- declare const Description: ({ asChild, className, ref, ...props }: AlertDescriptionProps) => import("react").JSX.Element;
138
- type AlertDismissIconButtonProps = Partial<Omit<IconButtonProps, "appearance" | "icon" | "intent">> & {
139
- /**
140
- * The visual style of the dismiss button. Optional here —
141
- * `Alert.DismissIconButton` defaults to `"ghost"` so the dismiss affordance
142
- * stays visually quiet inside the Alert.
143
- *
144
- * @default "ghost"
145
- */
146
- appearance?: IconButtonAppearance;
147
- /**
148
- * An optional icon to render inside the dismiss button. Defaults to an X icon.
149
- */
150
- icon?: ReactNode;
151
- };
152
- declare const DismissIconButton: ({ size, type, label, appearance, className, icon, style, ...props }: AlertDismissIconButtonProps) => import("react").JSX.Element;
153
- /**
154
- * Displays a callout for user attention.
155
- *
156
- * @see https://mantle.ngrok.com/components/feedback/alert
157
- *
158
- * @example
159
- * Composition:
160
- * ```
161
- * Alert.Root
162
- * ├── Alert.Icon
163
- * └── Alert.Content
164
- * ├── Alert.Title
165
- * ├── Alert.Description
166
- * └── Alert.DismissIconButton
167
- * ```
168
- *
169
- * @example
170
- * ```tsx
171
- * <Alert intent="info">
172
- * <AlertIcon />
173
- * <AlertContent>
174
- * <AlertTitle>Alert Title</AlertTitle>
175
- * <AlertDismissIconButton />
176
- * <AlertDescription>
177
- * Alert description text.
178
- * </AlertDescription>
179
- * </AlertContent>
180
- * </Alert>
181
- *```
182
- */
183
- declare const Alert: {
184
- /**
185
- * The root container of the alert component.
186
- *
187
- * @see https://mantle.ngrok.com/components/feedback/alert#alertroot
188
- *
189
- * @example
190
- * ```tsx
191
- * <Alert.Root intent="info">
192
- * <Alert.Icon />
193
- * <Alert.Content>
194
- * <Alert.Title>Alert Title</Alert.Title>
195
- * <Alert.Description>Alert description</Alert.Description>
196
- * </Alert.Content>
197
- * </Alert.Root>
198
- * ```
199
- */
200
- readonly Root: typeof Root;
201
- /**
202
- * The container for the content slot of an alert.
203
- *
204
- * @see https://mantle.ngrok.com/components/feedback/alert#alertcontent
205
- *
206
- * @example
207
- * ```tsx
208
- * <Alert.Root intent="info">
209
- * <Alert.Icon />
210
- * <Alert.Content>
211
- * <Alert.Title>Alert Title</Alert.Title>
212
- * <Alert.Description>Alert description text.</Alert.Description>
213
- * </Alert.Content>
214
- * </Alert.Root>
215
- * ```
216
- */
217
- readonly Content: typeof Content;
218
- /**
219
- * The optional description of an alert.
220
- *
221
- * @see https://mantle.ngrok.com/components/feedback/alert#alertdescription
222
- *
223
- * @example
224
- * ```tsx
225
- * <Alert.Root intent="info">
226
- * <Alert.Icon />
227
- * <Alert.Content>
228
- * <Alert.Title>Alert Title</Alert.Title>
229
- * <Alert.Description>Alert description text.</Alert.Description>
230
- * </Alert.Content>
231
- * </Alert.Root>
232
- * ```
233
- */
234
- readonly Description: typeof Description;
235
- /**
236
- * An optional dismiss button that can be used to close the alert.
237
- *
238
- * @see https://mantle.ngrok.com/components/feedback/alert#alertdismissiconbutton
239
- *
240
- * @example
241
- * ```tsx
242
- * <Alert.Root intent="info">
243
- * <Alert.Icon />
244
- * <Alert.Content>
245
- * <Alert.Title>Alert Title</Alert.Title>
246
- * <Alert.DismissIconButton />
247
- * <Alert.Description>Alert description text.</Alert.Description>
248
- * </Alert.Content>
249
- * </Alert.Root>
250
- * ```
251
- */
252
- readonly DismissIconButton: typeof DismissIconButton;
253
- /**
254
- * An optional icon that visually represents the intent of the Alert.
255
- *
256
- * @see https://mantle.ngrok.com/components/feedback/alert#alerticon
257
- *
258
- * @example
259
- * ```tsx
260
- * <Alert.Root intent="info">
261
- * <Alert.Icon />
262
- * <Alert.Content>
263
- * <Alert.Title>Alert Title</Alert.Title>
264
- * <Alert.Description>Alert description text.</Alert.Description>
265
- * </Alert.Content>
266
- * </Alert.Root>
267
- * ```
268
- */
269
- readonly Icon: typeof Icon;
270
- /**
271
- * The title of an alert.
272
- *
273
- * @see https://mantle.ngrok.com/components/feedback/alert#alerttitle
274
- *
275
- * @example
276
- * ```tsx
277
- * <Alert.Root intent="info">
278
- * <Alert.Icon />
279
- * <Alert.Content>
280
- * <Alert.Title>Alert Title</Alert.Title>
281
- * <Alert.Description>Alert description text.</Alert.Description>
282
- * </Alert.Content>
283
- * </Alert.Root>
284
- * ```
285
- */
286
- readonly Title: typeof Title;
287
- };
288
- //#endregion
1
+ import { t as Alert } from "./alert-BWwNPOMI.js";
289
2
  export { Alert };
package/dist/alert.js CHANGED
@@ -1 +1 @@
1
- import{t as e}from"./cx-IiQEAKf5.js";import{t}from"./icon-d-nMCfAI.js";import{t as n}from"./slot-CDk0Bb9z.js";import{t as r}from"./types-D85fCNV3.js";import{t as i}from"./button-BAno7KIU.js";import{createContext as a,useContext as o,useMemo as s}from"react";import c from"tiny-invariant";import{jsx as l}from"react/jsx-runtime";import{CheckCircleIcon as u}from"@phosphor-icons/react/CheckCircle";import{InfoIcon as d}from"@phosphor-icons/react/Info";import{MegaphoneIcon as f}from"@phosphor-icons/react/Megaphone";import{WarningIcon as p}from"@phosphor-icons/react/Warning";import{WarningDiamondIcon as m}from"@phosphor-icons/react/WarningDiamond";import{XIcon as h}from"@phosphor-icons/react/X";import{cva as g}from"class-variance-authority";const _=a(null),v=l(h,{});function y(){let e=o(_);return c(e,`useAlertContext hook used outside of Alert parent!`),e}const b=g(`relative flex w-full gap-1.5 rounded-md border p-2.5 text-sm font-sans`,{variants:{intent:{danger:`border-danger-500/50 bg-danger-500/10 text-danger-700 [&_code]:bg-danger-500/10 [&_code]:border-danger-500/20 [&_code]:text-danger-900 [&_a]:text-danger-700 [&_a]:underline`,important:`border-important-500/50 bg-important-500/10 text-important-700 [&_code]:bg-important-500/10 [&_code]:border-important-500/20 [&_code]:text-important-900 [&_a]:text-important-700 [&_a]:underline`,info:`border-info-500/50 bg-info-500/10 text-info-700 [&_code]:bg-info-500/10 [&_code]:border-info-500/20 [&_code]:text-info-900 [&_a]:text-info-700 [&_a]:underline`,success:`border-success-500/50 bg-success-500/10 text-success-700 [&_code]:bg-success-500/10 [&_code]:border-success-500/20 [&_code]:text-success-900 [&_a]:text-success-700 [&_a]:underline`,warning:`border-warning-500/50 bg-warning-500/10 text-warning-700 [&_code]:bg-warning-500/10 [&_code]:border-warning-500/20 [&_code]:text-warning-900 [&_a]:text-warning-700 [&_a]:underline`},appearance:{banner:`border-x-0 border-t-0 rounded-none z-50 sticky`,default:``}}}),x=({appearance:t=`default`,className:n,intent:r,ref:i,...a})=>{let o=s(()=>({intent:r}),[r]);return l(_.Provider,{value:o,children:l(`div`,{ref:i,"data-slot":`alert`,className:e(b({appearance:t,intent:r}),n),...a})})},S={danger:l(p,{}),important:l(f,{mirrored:!0}),info:l(d,{}),success:l(u,{}),warning:l(m,{})},C=({className:n,ref:r,svg:i,...a})=>{let o=y(),s=S[o.intent];return l(t,{ref:r,"data-slot":`alert-icon`,className:e(`size-5`,n),svg:i??s,...a})},w=({className:t,ref:n,...r})=>l(`div`,{ref:n,"data-slot":`alert-content`,className:e(`min-w-0 flex-1 has-data-alert-dismiss:pr-6`,t),...r}),T=({asChild:t=!1,className:r,ref:i,...a})=>l(t?n:`h5`,{ref:i,"data-slot":`alert-title`,className:e(`font-medium`,r),...a}),E=({asChild:t=!1,className:r,ref:i,...a})=>l(t?n:`div`,{ref:i,"data-slot":`alert-description`,className:e(`text-sm`,r),...a}),D=e=>`var(--color-${e}-700)`,O=e=>`var(--color-${e}-800)`,k=e=>`color-mix(in oklab, var(--color-${e}-500) 10%, transparent)`,A={Root:x,Content:w,Description:E,DismissIconButton:({size:t=`sm`,type:n=`button`,label:a=`Dismiss Alert`,appearance:o=`ghost`,className:s,icon:c=v,style:u,...d})=>{let f=y();return l(i,{appearance:o,icon:c,intent:`neutral`,label:a,size:t,"data-slot":`alert-dismiss-icon-button`,"data-alert-dismiss":!0,className:e(`right-1.5 top-1.5 absolute`,`text-(--alert-dismiss-icon-color)`,`not-disabled:hover:bg-(--alert-dismiss-hover-bg) not-disabled:hover:text-(--alert-dismiss-icon-hover-color)`,s),type:n,style:r({...u,"--alert-dismiss-icon-color":D(f.intent),"--alert-dismiss-icon-hover-color":O(f.intent),"--alert-dismiss-hover-bg":k(f.intent)}),...d})},Icon:C,Title:T};export{A as Alert};
1
+ import{t as e}from"./alert-QMs0PqMq.js";export{e as Alert};
@@ -1 +1 @@
1
- import{t as e}from"./cx-IiQEAKf5.js";import{t}from"./icon-lZ48P8Nn.js";import{t as n}from"./slot-CDk0Bb9z.js";import{Children as r,cloneElement as i,isValidElement as a}from"react";import o from"tiny-invariant";import{Fragment as s,jsx as c,jsxs as l}from"react/jsx-runtime";const u=t=>e(`cursor-pointer rounded bg-transparent text-accent-600 hover:underline focus:outline-hidden focus-visible:ring-3 focus-visible:ring-focus-accent`,t),d=({asChild:e,children:d,className:p,rel:m,icon:h,iconPlacement:g=`start`,ref:_,...v})=>{let y=f(m),b={"data-slot":`anchor`,className:u(p),ref:_,rel:y,...v};if(e){let e=r.only(d);o(a(e),"When using `asChild`, Anchor must be passed a single child as a JSX tag.");let u=e.props?.children;return c(n,{...b,children:i(e,{},l(s,{children:[h&&g===`start`&&c(t,{className:`inline-block mr-1.5`,svg:h}),u,h&&g===`end`&&c(t,{className:`inline-block ml-1.5`,svg:h})]}))})}return l(`a`,{...b,children:[h&&g===`start`&&c(t,{className:`inline-block mr-1.5`,svg:h}),d,h&&g===`end`&&c(t,{className:`inline-block ml-1.5`,svg:h})]})};function f(e){return Array.isArray(e)?[...new Set(e)].map(e=>e?.trim()).filter(Boolean).toSorted().join(` `)||void 0:e?.trim()||void 0}export{u as n,f as r,d as t};
1
+ import{t as e}from"./cx-IiQEAKf5.js";import{t}from"./icon-lZ48P8Nn.js";import{t as n}from"./slot-Dpsqz16D.js";import{Children as r,cloneElement as i,isValidElement as a}from"react";import o from"tiny-invariant";import{Fragment as s,jsx as c,jsxs as l}from"react/jsx-runtime";const u=t=>e(`cursor-pointer rounded bg-transparent text-accent-600 hover:underline focus:outline-hidden focus-visible:ring-3 focus-visible:ring-focus-accent`,t),d=({asChild:e,children:d,className:p,rel:m,icon:h,iconPlacement:g=`start`,ref:_,...v})=>{let y=f(m),b={"data-slot":`anchor`,className:u(p),ref:_,rel:y,...v};if(e){let e=r.only(d);o(a(e),"When using `asChild`, Anchor must be passed a single child as a JSX tag.");let u=e.props?.children;return c(n,{...b,children:i(e,{},l(s,{children:[h&&g===`start`&&c(t,{className:`inline-block mr-1.5`,svg:h}),u,h&&g===`end`&&c(t,{className:`inline-block ml-1.5`,svg:h})]}))})}return l(`a`,{...b,children:[h&&g===`start`&&c(t,{className:`inline-block mr-1.5`,svg:h}),d,h&&g===`end`&&c(t,{className:`inline-block ml-1.5`,svg:h})]})};function f(e){return Array.isArray(e)?[...new Set(e)].map(e=>e?.trim()).filter(Boolean).toSorted().join(` `)||void 0:e?.trim()||void 0}export{u as n,f as r,d as t};
package/dist/anchor.js CHANGED
@@ -1 +1 @@
1
- import{n as e,r as t,t as n}from"./anchor-DfeXTpKW.js";export{n as Anchor,e as anchorClassNames,t as resolveRel};
1
+ import{n as e,r as t,t as n}from"./anchor-DvbNsphX.js";export{n as Anchor,e as anchorClassNames,t as resolveRel};