@ngrok/mantle 0.79.3 → 0.81.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/accordion.d.ts +158 -19
- package/dist/accordion.js +1 -1
- package/dist/agent.json +5 -1
- package/dist/alert-dialog.d.ts +465 -32
- package/dist/alert-dialog.js +1 -1
- package/dist/alert.d.ts +116 -14
- package/dist/alert.js +1 -1
- package/dist/anchor-DfeXTpKW.js +1 -0
- package/dist/anchor.d.ts +2 -2
- package/dist/anchor.js +1 -1
- package/dist/area-chart.d.ts +504 -0
- package/dist/area-chart.js +1 -0
- package/dist/as-child-D23mGo4f.d.ts +49 -0
- package/dist/badge.d.ts +44 -5
- package/dist/badge.js +1 -1
- package/dist/bar-chart.d.ts +491 -0
- package/dist/bar-chart.js +1 -0
- package/dist/breadcrumb.d.ts +196 -14
- package/dist/breadcrumb.js +1 -1
- package/dist/button-BAno7KIU.js +1 -0
- package/dist/{index-BSAizFod.d.ts → button-C-gMbPso.d.ts} +5 -5
- package/dist/{icon-button-BvQvT790.d.ts → button-C7vAl6lS.d.ts} +22 -63
- package/dist/button-D9n09xUg.js +1 -0
- package/dist/{button-DcXOWUYo.d.ts → button-DARFK2KJ.d.ts} +4 -4
- package/dist/button-DjpEKt2X.js +1 -0
- package/dist/button-DvHMWAPl.js +1 -0
- package/dist/button.d.ts +5 -5
- package/dist/button.js +1 -1
- package/dist/calendar.d.ts +0 -3
- package/dist/calendar.js +1 -1
- package/dist/card.d.ts +131 -9
- package/dist/card.js +1 -1
- package/dist/centered-layout.d.ts +209 -8
- package/dist/centered-layout.js +1 -1
- package/dist/chart-BROa2gqt.js +2 -0
- package/dist/chart-BcOC6Qj0.d.ts +275 -0
- package/dist/checkbox-0EoxOyMA.js +1 -0
- package/dist/checkbox.d.ts +13 -11
- package/dist/checkbox.js +1 -1
- package/dist/choice-BHwFSSyv.js +1 -0
- package/dist/choice-BNRQXszu.d.ts +254 -0
- package/dist/choice.d.ts +1 -252
- package/dist/choice.js +1 -1
- package/dist/code-block.d.ts +242 -52
- package/dist/code-block.js +6 -6
- package/dist/code-block_highlight-utils.d.ts +1 -1
- package/dist/code-block_highlight-utils.js +1 -1
- package/dist/code.d.ts +3 -2
- package/dist/code.js +1 -1
- package/dist/combobox.d.ts +171 -16
- package/dist/combobox.js +1 -1
- package/dist/command.d.ts +279 -81
- package/dist/command.js +1 -1
- package/dist/compose-refs-BdBMM9ga.js +1 -0
- package/dist/data-table.d.ts +28 -6
- package/dist/data-table.js +1 -1
- package/dist/description-list.d.ts +67 -6
- package/dist/description-list.js +1 -1
- package/dist/dialog-BM4wPCft.d.ts +24 -0
- package/dist/dialog-DWZWd5Jt.js +1 -0
- package/dist/dialog.d.ts +226 -35
- package/dist/dialog.js +1 -1
- package/dist/{dropdown-menu-DP_Ne9Mr.d.ts → dropdown-menu-DZg-Cd69.d.ts} +137 -32
- package/dist/dropdown-menu-Dw-OtXPm.d.ts +1 -0
- package/dist/dropdown-menu-RyDWoKHx.js +1 -0
- package/dist/dropdown-menu.d.ts +2 -2
- package/dist/dropdown-menu.js +1 -1
- package/dist/empty.d.ts +7 -22
- package/dist/empty.js +1 -1
- package/dist/field-B1wqeZr4.js +1 -0
- package/dist/field.d.ts +568 -47
- package/dist/field.js +1 -1
- package/dist/flag.d.ts +0 -3
- package/dist/flag.js +1 -1
- package/dist/hooks.d.ts +3 -4
- package/dist/hooks.js +1 -1
- package/dist/hover-card.d.ts +48 -7
- package/dist/hover-card.js +1 -1
- package/dist/{svg-only-BFeFS1aa.d.ts → icon-CX_gj6sW.d.ts} +2 -2
- package/dist/icon-d-nMCfAI.js +1 -0
- package/dist/{icon-Cevjo93X.d.ts → icon-k4E9yNWD.d.ts} +2 -2
- package/dist/icon-lZ48P8Nn.js +1 -0
- package/dist/icon.d.ts +3 -3
- package/dist/icon.js +1 -1
- package/dist/{sort-BPX2Fk9t.js → icons-B_DDQcVD.js} +1 -1
- package/dist/{traffic-policy-file-0g5RXFqu.js → icons-CF1lbWtp.js} +1 -1
- package/dist/icons-DLCs1hLP.js +1 -0
- package/dist/icons.d.ts +7 -15
- package/dist/icons.js +1 -1
- package/dist/{in-view-nkSOdED2.d.ts → in-view-DDEGUKDR.d.ts} +17 -9
- package/dist/{index-D47aqlpz.d.ts → index-DA4ig3gj.d.ts} +1 -1
- package/dist/input-BnlpQF0c.js +1 -0
- package/dist/{types-C19IR7jf.d.ts → input-BuYDU6CF.d.ts} +42 -2
- package/dist/input.d.ts +5 -56
- package/dist/input.js +1 -1
- package/dist/{label-v2-bv98k.d.ts → label-C6YH9skg.d.ts} +8 -6
- package/dist/label-D-D11mlp.js +1 -0
- package/dist/label.d.ts +1 -1
- package/dist/label.js +1 -1
- package/dist/line-chart.d.ts +490 -0
- package/dist/line-chart.js +1 -0
- package/dist/list-51KQvENW.js +1 -0
- package/dist/list.d.ts +135 -6
- package/dist/list.js +1 -1
- package/dist/llms.txt +5 -1
- package/dist/main.d.ts +20 -4
- package/dist/main.js +1 -1
- package/dist/mantle-dark-high-contrast.css +17 -0
- package/dist/mantle-dark.css +13 -0
- package/dist/mantle-light-high-contrast.css +15 -0
- package/dist/mantle.css +29 -0
- package/dist/media-object.d.ts +18 -4
- package/dist/media-object.js +1 -1
- package/dist/multi-select.d.ts +282 -24
- package/dist/multi-select.js +1 -1
- package/dist/otp-input.d.ts +118 -6
- package/dist/otp-input.js +1 -1
- package/dist/pagination.d.ts +61 -6
- package/dist/pagination.js +1 -1
- package/dist/popover-CE4OlWkd.d.ts +208 -0
- package/dist/popover-CQ9s7jG5.js +1 -0
- package/dist/popover.d.ts +1 -181
- package/dist/popover.js +1 -1
- package/dist/primitive-trJDqIXJ.js +1 -0
- package/dist/progress.d.ts +2 -8
- package/dist/progress.js +1 -1
- package/dist/qr-code.d.ts +101 -5
- package/dist/qr-code.js +1 -1
- package/dist/radio-group.d.ts +110 -35
- package/dist/radio-group.js +1 -1
- package/dist/sandboxed-on-click.d.ts +2 -2
- package/dist/sandboxed-on-click.js +1 -1
- package/dist/scatter-plot.d.ts +495 -0
- package/dist/scatter-plot.js +1 -0
- package/dist/select-0z7HVS6r.d.ts +579 -0
- package/dist/select-BCHWvmyC.js +1 -0
- package/dist/select.d.ts +1 -1
- package/dist/select.js +1 -1
- package/dist/selectable-list.d.ts +225 -298
- package/dist/selectable-list.js +1 -1
- package/dist/separator-B5UmkVRL.d.ts +75 -0
- package/dist/separator-bpE_kooz.js +1 -0
- package/dist/separator.d.ts +1 -52
- package/dist/separator.js +1 -1
- package/dist/sheet.d.ts +285 -38
- package/dist/sheet.js +1 -1
- package/dist/skeleton-CsbUHbBA.js +1 -0
- package/dist/skeleton.d.ts +4 -7
- package/dist/skeleton.js +1 -1
- package/dist/skip-to-main-link.d.ts +24 -4
- package/dist/skip-to-main-link.js +1 -1
- package/dist/slider.js +1 -1
- package/dist/{index-Rv8RL7xy.d.ts → slot-BtwKJTLq.d.ts} +1 -1
- package/dist/slot-CDk0Bb9z.js +1 -0
- package/dist/slot.d.ts +1 -1
- package/dist/slot.js +1 -1
- package/dist/split-button.d.ts +14 -14
- package/dist/split-button.js +1 -1
- package/dist/switch.d.ts +10 -7
- package/dist/switch.js +1 -1
- package/dist/table-Bo0vNxIJ.d.ts +848 -0
- package/dist/table-CGxJwtbL.js +1 -0
- package/dist/table.d.ts +1 -1
- package/dist/table.js +1 -1
- package/dist/tabs.d.ts +124 -25
- package/dist/tabs.js +1 -1
- package/dist/text-area.d.ts +2 -2
- package/dist/text-area.js +1 -1
- package/dist/theme-C26-Xolp.js +1 -0
- package/dist/theme-switcher.d.ts +105 -33
- package/dist/theme-switcher.js +1 -1
- package/dist/theme.d.ts +54 -15
- package/dist/theme.js +1 -1
- package/dist/toast.d.ts +86 -10
- package/dist/toast.js +1 -1
- package/dist/tooltip.d.ts +50 -5
- package/dist/tooltip.js +1 -1
- package/dist/types.d.ts +2 -2
- package/dist/utils.d.ts +1 -1
- package/dist/utils.js +1 -1
- package/dist/well.d.ts +3 -3
- package/dist/well.js +1 -1
- package/package.json +9 -3
- package/dist/anchor-C_tjSVy6.js +0 -1
- package/dist/as-child-CYEVu1WY.d.ts +0 -23
- package/dist/button-5t6-JS_I.js +0 -1
- package/dist/button-ClC60Nzg.js +0 -1
- package/dist/checkbox-DJ2xl7Rc.js +0 -1
- package/dist/choice-DOdyNzFC.js +0 -1
- package/dist/compose-refs-Cjf2gfB8.js +0 -1
- package/dist/dialog-vxLIvB8M.js +0 -1
- package/dist/dropdown-menu-Bt1aKF1g.js +0 -1
- package/dist/field-context-BR01g789.js +0 -1
- package/dist/icon-CDtYjF_H.js +0 -1
- package/dist/icon-button-DV2-GZHf.js +0 -1
- package/dist/index-g2rfwNCH.d.ts +0 -1
- package/dist/input-Ct1YOqSy.js +0 -1
- package/dist/label-BMlHW_2D.js +0 -1
- package/dist/popover-D5WxxnBY.js +0 -1
- package/dist/primitive-C64-m48O.d.ts +0 -13
- package/dist/primitive-IKruV2iB.js +0 -1
- package/dist/select-Bwt2YduR.d.ts +0 -345
- package/dist/select-D-5u0Blc.js +0 -1
- package/dist/separator-kBnnv3Cw.js +0 -1
- package/dist/skeleton-Bu3tgNcW.js +0 -1
- package/dist/slot-DmPrjM7N.js +0 -1
- package/dist/svg-only-DDx6FtJd.js +0 -1
- package/dist/table-CPH2md2-.js +0 -1
- package/dist/table-CwFHXC-G.d.ts +0 -414
- package/dist/theme-D3MDng6U.js +0 -1
- package/dist/theme-provider-C9zpDyJW.js +0 -1
- package/dist/toast-BsCjaMVS.js +0 -1
- package/dist/virtual-DZMBu7Ch.js +0 -1
- /package/dist/{sizes-BCoI4bhP.d.ts → button-BCoI4bhP.d.ts} +0 -0
- /package/dist/{intents-DdSKSj1c.d.ts → button-DdSKSj1c.d.ts} +0 -0
- /package/dist/{resolve-pre-rendered-props-B6OlZrSI.d.ts → code-block-B6OlZrSI.d.ts} +0 -0
- /package/dist/{resolve-pre-rendered-props-C9uaM9-V.js → code-block-C9uaM9-V.js} +0 -0
- /package/dist/{validation-7QeiTFwl.d.ts → field-7QeiTFwl.d.ts} +0 -0
- /package/dist/{validation-Bpptk_9t.js → field-Bpptk_9t.js} +0 -0
- /package/dist/{types-D1RY5Tcj.d.ts → icon-D1RY5Tcj.d.ts} +0 -0
- /package/dist/{is-input-CXmS0OFN.js → input-CXmS0OFN.js} +0 -0
- /package/dist/{themes-CYNpplwN.d.ts → theme-CYNpplwN.d.ts} +0 -0
package/dist/alert.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as SvgAttributes } from "./
|
|
3
|
-
import "./index-
|
|
4
|
-
import { n as
|
|
5
|
-
import { ComponentProps,
|
|
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
6
|
//#region src/components/alert/alert.d.ts
|
|
7
7
|
declare const intents: readonly ["danger", "important", "info", "success", "warning"];
|
|
8
8
|
type AlertIntent = (typeof intents)[number];
|
|
@@ -23,13 +23,118 @@ type AlertProps = ComponentProps<"div"> & {
|
|
|
23
23
|
*/
|
|
24
24
|
appearance?: Appearance;
|
|
25
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;
|
|
26
46
|
type AlertIconProps = Omit<SvgAttributes, "children"> & {
|
|
27
47
|
/**
|
|
28
48
|
* An optional icon that renders in place of the default icon for the Alert intent.
|
|
29
49
|
*/
|
|
30
50
|
svg?: ReactNode;
|
|
31
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;
|
|
32
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;
|
|
33
138
|
type AlertDismissIconButtonProps = Partial<Omit<IconButtonProps, "appearance" | "icon" | "intent">> & {
|
|
34
139
|
/**
|
|
35
140
|
* The visual style of the dismiss button. Optional here —
|
|
@@ -44,10 +149,7 @@ type AlertDismissIconButtonProps = Partial<Omit<IconButtonProps, "appearance" |
|
|
|
44
149
|
*/
|
|
45
150
|
icon?: ReactNode;
|
|
46
151
|
};
|
|
47
|
-
declare const DismissIconButton: {
|
|
48
|
-
({ size, type, label, appearance, className, icon, style, ...props }: AlertDismissIconButtonProps): import("react").JSX.Element;
|
|
49
|
-
displayName: string;
|
|
50
|
-
};
|
|
152
|
+
declare const DismissIconButton: ({ size, type, label, appearance, className, icon, style, ...props }: AlertDismissIconButtonProps) => import("react").JSX.Element;
|
|
51
153
|
/**
|
|
52
154
|
* Displays a callout for user attention.
|
|
53
155
|
*
|
|
@@ -95,7 +197,7 @@ declare const Alert: {
|
|
|
95
197
|
* </Alert.Root>
|
|
96
198
|
* ```
|
|
97
199
|
*/
|
|
98
|
-
readonly Root:
|
|
200
|
+
readonly Root: typeof Root;
|
|
99
201
|
/**
|
|
100
202
|
* The container for the content slot of an alert.
|
|
101
203
|
*
|
|
@@ -112,7 +214,7 @@ declare const Alert: {
|
|
|
112
214
|
* </Alert.Root>
|
|
113
215
|
* ```
|
|
114
216
|
*/
|
|
115
|
-
readonly Content:
|
|
217
|
+
readonly Content: typeof Content;
|
|
116
218
|
/**
|
|
117
219
|
* The optional description of an alert.
|
|
118
220
|
*
|
|
@@ -129,7 +231,7 @@ declare const Alert: {
|
|
|
129
231
|
* </Alert.Root>
|
|
130
232
|
* ```
|
|
131
233
|
*/
|
|
132
|
-
readonly Description:
|
|
234
|
+
readonly Description: typeof Description;
|
|
133
235
|
/**
|
|
134
236
|
* An optional dismiss button that can be used to close the alert.
|
|
135
237
|
*
|
|
@@ -164,7 +266,7 @@ declare const Alert: {
|
|
|
164
266
|
* </Alert.Root>
|
|
165
267
|
* ```
|
|
166
268
|
*/
|
|
167
|
-
readonly Icon:
|
|
269
|
+
readonly Icon: typeof Icon;
|
|
168
270
|
/**
|
|
169
271
|
* The title of an alert.
|
|
170
272
|
*
|
|
@@ -181,7 +283,7 @@ declare const Alert: {
|
|
|
181
283
|
* </Alert.Root>
|
|
182
284
|
* ```
|
|
183
285
|
*/
|
|
184
|
-
readonly Title:
|
|
286
|
+
readonly Title: typeof Title;
|
|
185
287
|
};
|
|
186
288
|
//#endregion
|
|
187
289
|
export { Alert };
|
package/dist/alert.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./cx-IiQEAKf5.js";import{t}from"./
|
|
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};
|
|
@@ -0,0 +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};
|
package/dist/anchor.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { n as WithAsChild } from "./as-child-D23mGo4f.js";
|
|
2
2
|
import { ComponentProps, ReactNode } from "react";
|
|
3
3
|
//#region src/components/anchor/types.d.ts
|
|
4
4
|
/**
|
|
@@ -95,7 +95,7 @@ type AnchorProps = Omit<ComponentProps<"a">, "rel"> & WithAsChild & {
|
|
|
95
95
|
* </Anchor>
|
|
96
96
|
* ```
|
|
97
97
|
*/
|
|
98
|
-
declare const Anchor:
|
|
98
|
+
declare const Anchor: ({ asChild, children, className, rel: propRel, icon, iconPlacement, ref, ...props }: AnchorProps) => import("react").JSX.Element;
|
|
99
99
|
/**
|
|
100
100
|
* Resolves the `rel` attribute to a string.
|
|
101
101
|
*
|
package/dist/anchor.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e,r as t,t as n}from"./anchor-
|
|
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};
|