@ngrok/mantle 0.81.1 → 0.82.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.
- package/dist/accordion.js +1 -1
- package/dist/agent.json +4 -1
- package/dist/alert-BWwNPOMI.d.ts +391 -0
- package/dist/alert-center.d.ts +647 -0
- package/dist/alert-center.js +1 -0
- package/dist/alert-dialog.js +1 -1
- package/dist/alert-vwFd7qdp.js +1 -0
- package/dist/alert.d.ts +1 -390
- package/dist/alert.js +1 -1
- package/dist/{anchor-DfeXTpKW.js → anchor-3OGK2UKU.js} +1 -1
- package/dist/anchor.js +1 -1
- package/dist/app-layout.d.ts +566 -0
- package/dist/app-layout.js +1 -0
- package/dist/area-chart.js +1 -1
- package/dist/badge.js +1 -1
- package/dist/bar-chart.js +1 -1
- package/dist/breadcrumb.d.ts +1 -1
- package/dist/breadcrumb.js +1 -1
- package/dist/browser-only-CmEEzfU3.js +1 -0
- package/dist/browser-only.js +1 -1
- package/dist/{button-DjpEKt2X.js → button-Cnja9Bsr.js} +1 -1
- package/dist/{button-D9n09xUg.js → button-DmJkYfyl.js} +1 -1
- package/dist/{button-BAno7KIU.js → button-IlxHhjPK.js} +1 -1
- package/dist/button.js +1 -1
- package/dist/calendar.d.ts +1 -1
- package/dist/card.js +1 -1
- package/dist/centered-layout.d.ts +9 -9
- package/dist/centered-layout.js +1 -1
- package/dist/chart-B3pAvmkk.js +2 -0
- package/dist/{choice-BHwFSSyv.js → choice-CnwfjSEu.js} +1 -1
- package/dist/choice.js +1 -1
- package/dist/code-block.js +1 -1
- package/dist/code.js +1 -1
- package/dist/combobox.js +1 -1
- package/dist/command.js +1 -1
- package/dist/cookie-ca4g5CKp.js +1 -0
- package/dist/{copy-to-clipboard-BsCQ9m6K.js → copy-to-clipboard-B4UB6pts.js} +1 -1
- package/dist/data-slot-EM6s2WEU.js +1 -0
- package/dist/data-table.js +1 -1
- package/dist/description-list.js +1 -1
- package/dist/{dialog-DWZWd5Jt.js → dialog-DozL6n-F.js} +1 -1
- package/dist/dialog.d.ts +1 -1
- package/dist/dialog.js +1 -1
- package/dist/dropdown-menu-BRH0Wd_z.js +1 -0
- package/dist/dropdown-menu.js +1 -1
- package/dist/empty.js +1 -1
- package/dist/field.d.ts +1 -1
- package/dist/field.js +1 -1
- package/dist/hooks.js +1 -1
- package/dist/{icons-DLCs1hLP.js → icons-Bb_zF2OV.js} +1 -1
- package/dist/icons.js +1 -1
- package/dist/input.js +1 -1
- package/dist/line-chart.js +1 -1
- package/dist/{list-51KQvENW.js → list-CJABVHwi.js} +1 -1
- package/dist/list.js +1 -1
- package/dist/llms.txt +4 -1
- package/dist/main.d.ts +35 -1
- package/dist/main.js +1 -1
- package/dist/mantle.css +21 -1
- package/dist/media-object.js +1 -1
- package/dist/multi-select.d.ts +10 -2
- package/dist/multi-select.js +1 -1
- package/dist/otp-input.js +1 -1
- package/dist/pagination.js +1 -1
- package/dist/platform-BVD3gpKD.js +1 -0
- package/dist/{primitive-trJDqIXJ.js → primitive-D-9GIFWb.js} +1 -1
- package/dist/progress.d.ts +8 -8
- package/dist/qr-code.js +1 -1
- package/dist/radio-group.d.ts +10 -0
- package/dist/radio-group.js +1 -1
- package/dist/sandboxed-on-click.js +1 -1
- package/dist/scatter-plot.d.ts +2 -1
- package/dist/scatter-plot.js +1 -1
- package/dist/{select-BCHWvmyC.js → select-BReznXaw.js} +1 -1
- package/dist/select.js +1 -1
- package/dist/selectable-list.js +1 -1
- package/dist/{separator-bpE_kooz.js → separator-D0D6VyyM.js} +1 -1
- package/dist/separator.js +1 -1
- package/dist/sheet-BxvTfPLM.js +1 -0
- package/dist/sheet.d.ts +1 -1
- package/dist/sheet.js +1 -1
- package/dist/sidebar.d.ts +2558 -0
- package/dist/sidebar.js +1 -0
- package/dist/{skeleton-CsbUHbBA.js → skeleton-BhcJMpem.js} +1 -1
- package/dist/skeleton.js +1 -1
- package/dist/skip-to-main-link.js +1 -1
- package/dist/slot-DdgxmuI5.d.ts +67 -0
- package/dist/slot-DpNWVci8.js +1 -0
- package/dist/slot.d.ts +1 -1
- package/dist/slot.js +1 -1
- package/dist/split-button.js +1 -1
- package/dist/tabs.js +1 -1
- package/dist/theme-BorfgnNh.js +1 -0
- package/dist/theme-switcher.d.ts +1 -1
- package/dist/theme-switcher.js +1 -1
- package/dist/theme.js +1 -1
- package/dist/toast.js +1 -1
- package/dist/tooltip-Dnu35cjU.js +1 -0
- package/dist/tooltip-mrpLz4DZ.d.ts +218 -0
- package/dist/tooltip.d.ts +1 -217
- package/dist/tooltip.js +1 -1
- package/dist/use-breakpoint-Wd7_5-Mu.js +1 -0
- package/dist/use-copy-to-clipboard-CSyp4Zk0.js +1 -0
- package/dist/use-is-hydrated-DDCqXmju.js +1 -0
- package/dist/{use-prefers-reduced-motion-CagaNRgm.js → use-prefers-reduced-motion-Bk5zAfHY.js} +1 -1
- package/dist/utils.js +1 -1
- package/dist/well.js +1 -1
- package/package.json +16 -13
- package/dist/browser-only-CPH56Xw_.js +0 -1
- package/dist/chart-Do2qkrxl.js +0 -2
- package/dist/dropdown-menu-RyDWoKHx.js +0 -1
- package/dist/slot-BtwKJTLq.d.ts +0 -25
- package/dist/slot-CDk0Bb9z.js +0 -1
- package/dist/theme-C26-Xolp.js +0 -1
- package/dist/use-copy-to-clipboard-DqQ0_N3E.js +0 -1
package/dist/accordion.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./use-isomorphic-layout-effect-DdTRtMY-.js";import{n as t}from"./compose-refs-BdBMM9ga.js";import{t as n}from"./cx-IiQEAKf5.js";import{t as r}from"./icon-lZ48P8Nn.js";import{t as i}from"./slot-
|
|
1
|
+
import{t as e}from"./use-isomorphic-layout-effect-DdTRtMY-.js";import{n as t}from"./compose-refs-BdBMM9ga.js";import{t as n}from"./cx-IiQEAKf5.js";import{t as r}from"./icon-lZ48P8Nn.js";import{t as i}from"./slot-DpNWVci8.js";import{CaretDownIcon as a}from"@phosphor-icons/react/CaretDown";import{createContext as o,useCallback as s,useContext as c,useEffect as l,useMemo as u,useRef as d,useState as f}from"react";import p from"tiny-invariant";import{jsx as m}from"react/jsx-runtime";function h(e,t){return e.includes(t)}function g(e,t,n,r){let i=e.includes(t);return n?r===`single`?i&&e.length===1?e:[t]:i?e:[...e,t]:i?e.filter(e=>e!==t):e}function _(e){return e==null?[]:typeof e==`string`?e===``?[]:[e]:e}function v(e,t){e.type===`single`?e.onValueChange?.(t[0]??``):e.onValueChange?.([...t])}function y(){return typeof document<`u`&&document.body!=null&&`onbeforematch`in document.body}const b=o(null);function x(e){let t=c(b);return p(t,`\`${e}\` must be rendered within \`Accordion.Root\`.`),t}const S=o(null);function C(e){let t=c(S);return p(t,`\`${e}\` must be rendered within \`Accordion.Item\`.`),t}const w=e=>{let{type:t=`multiple`,value:r,defaultValue:a,onValueChange:o,asChild:s,children:c,className:l,ref:d,...p}=e,h=r!=null,[y,x]=f(()=>_(a)),S=h?_(r):y,C=u(()=>({type:t,openValues:S,setItemOpen:(n,r)=>{let i=g(S,n,r,t);i!==S&&(h||x(i),v(e,i))}}),[t,S,h,e]),w={...p,"data-slot":`accordion`,className:n(`w-full divide-y divide-separator`,l)};return m(b.Provider,{value:C,children:m(s?i:`div`,{ref:d,...w,children:c})})},T=({children:e,value:t,ref:n,...r})=>{let{openValues:i,setItemOpen:a}=x(`Accordion.Item`),o=h(i,t),c=s(e=>{a(t,e)},[a,t]),l=u(()=>({open:o,setOpen:c}),[o,c]);return m(S.Provider,{value:l,children:m(`div`,{ref:n,...r,role:`group`,"data-slot":`accordion-item`,"data-state":o?`open`:`closed`,children:e})})},E=({className:e,children:t,onClick:r,ref:i,...a})=>{let{open:o,setOpen:s}=C(`Accordion.Trigger`);return m(`button`,{ref:i,type:`button`,...a,"data-slot":`accordion-trigger`,"data-state":o?`open`:`closed`,"aria-expanded":o,className:n(`group flex w-full cursor-pointer items-center justify-between gap-4 py-4 text-left font-medium outline-none`,`-mx-2 rounded-md px-2`,`transition-[padding] duration-200 ease-out data-state-open:pb-2 motion-reduce:transition-none`,`focus:outline-hidden focus-visible:ring-4 focus-visible:ring-focus-accent`,e),onClick:e=>{r?.(e),s(!o)},children:t})},D=m(a,{weight:`bold`}),O={Root:w,Item:T,Trigger:E,TriggerIcon:({className:e,svg:t=D,...i})=>m(r,{...i,"data-slot":`accordion-trigger-icon`,svg:t,className:n(`size-4 shrink-0 text-muted transition-transform duration-200 group-data-state-open:rotate-180`,e)}),Content:({className:r,children:i,ref:a,...o})=>{let{open:s,setOpen:c}=C(`Accordion.Content`),u=d(null),f=t(u,a);return l(()=>{let e=u.current;if(!e||!y())return;let t=()=>{e.removeAttribute(`hidden`),e.style.height=`auto`,c(!0)};return e.addEventListener(`beforematch`,t),()=>{e.removeEventListener(`beforematch`,t)}},[c]),e(()=>{let e=u.current;e&&(s||!y()?e.removeAttribute(`hidden`):(e.setAttribute(`hidden`,`until-found`),e.style.height=``))},[s]),m(`div`,{ref:f,...o,"data-slot":`accordion-content`,"data-state":s?`open`:`closed`,className:n(`h-0 overflow-hidden transition-[height,content-visibility] duration-200 ease-out [interpolate-size:allow-keywords] transition-discrete data-state-open:h-auto motion-reduce:transition-none`,r),children:i})},Body:({className:e,ref:t,...r})=>m(`div`,{ref:t,...r,"data-slot":`accordion-body`,className:n(`pt-2 pb-4`,e)})};export{O as Accordion};
|
package/dist/agent.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ngrok/mantle",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.82.1",
|
|
4
4
|
"origin": "https://mantle.ngrok.com",
|
|
5
5
|
"endpoints": {
|
|
6
6
|
"docs": "https://mantle.ngrok.com/",
|
|
@@ -18,8 +18,10 @@
|
|
|
18
18
|
"subpaths": [
|
|
19
19
|
"@ngrok/mantle/accordion",
|
|
20
20
|
"@ngrok/mantle/alert",
|
|
21
|
+
"@ngrok/mantle/alert-center",
|
|
21
22
|
"@ngrok/mantle/alert-dialog",
|
|
22
23
|
"@ngrok/mantle/anchor",
|
|
24
|
+
"@ngrok/mantle/app-layout",
|
|
23
25
|
"@ngrok/mantle/area-chart",
|
|
24
26
|
"@ngrok/mantle/badge",
|
|
25
27
|
"@ngrok/mantle/bar-chart",
|
|
@@ -69,6 +71,7 @@
|
|
|
69
71
|
"@ngrok/mantle/selectable-list",
|
|
70
72
|
"@ngrok/mantle/separator",
|
|
71
73
|
"@ngrok/mantle/sheet",
|
|
74
|
+
"@ngrok/mantle/sidebar",
|
|
72
75
|
"@ngrok/mantle/skeleton",
|
|
73
76
|
"@ngrok/mantle/skip-to-main-link",
|
|
74
77
|
"@ngrok/mantle/slider",
|
|
@@ -0,0 +1,391 @@
|
|
|
1
|
+
import { n as WithAsChild } from "./as-child-D23mGo4f.js";
|
|
2
|
+
import { t as SvgAttributes } from "./icon-D1RY5Tcj.js";
|
|
3
|
+
import { r as ButtonProps } from "./button-DARFK2KJ.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
|
+
* Trailing controls inherit these public CSS variables:
|
|
30
|
+
*
|
|
31
|
+
* | Variable | Default | Purpose |
|
|
32
|
+
* | --- | --- | --- |
|
|
33
|
+
* | `--alert-control-color` | `var(--color-<intent>-700)` | Control text and icon color. |
|
|
34
|
+
* | `--alert-control-hover-color` | `var(--color-<intent>-800)` | Control text and icon color on hover. |
|
|
35
|
+
* | `--alert-control-hover-bg` | `color-mix(in oklab, var(--color-<intent>-500) 10%, transparent)` | Control background on hover. |
|
|
36
|
+
*
|
|
37
|
+
* @see https://mantle.ngrok.com/components/feedback/alert#alertroot
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* ```tsx
|
|
41
|
+
* <Alert.Root intent="info">
|
|
42
|
+
* <Alert.Icon />
|
|
43
|
+
* <Alert.Content>
|
|
44
|
+
* <Alert.Title>Alert Title</Alert.Title>
|
|
45
|
+
* <Alert.Description>
|
|
46
|
+
* Alert description text.
|
|
47
|
+
* </Alert.Description>
|
|
48
|
+
* <Alert.DismissIconButton />
|
|
49
|
+
* <Alert.ExpandButton count={2} expanded={false} />
|
|
50
|
+
* </Alert.Content>
|
|
51
|
+
* </Alert.Root>
|
|
52
|
+
*```
|
|
53
|
+
*/
|
|
54
|
+
declare const Root: ({ appearance, className, intent, ref, style, ...props }: AlertProps) => import("react").JSX.Element;
|
|
55
|
+
type AlertIconProps = Omit<SvgAttributes, "children"> & {
|
|
56
|
+
/**
|
|
57
|
+
* An optional icon that renders in place of the default icon for the Alert intent.
|
|
58
|
+
*/
|
|
59
|
+
svg?: ReactNode;
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* An optional icon that visually represents the intent of the Alert.
|
|
63
|
+
*
|
|
64
|
+
* The default rendered icon be overridden with a custom icon using the `svg` prop.
|
|
65
|
+
*
|
|
66
|
+
* @see https://mantle.ngrok.com/components/feedback/alert#alerticon
|
|
67
|
+
*
|
|
68
|
+
* @example
|
|
69
|
+
* ```tsx
|
|
70
|
+
* <Alert.Root intent="info">
|
|
71
|
+
* <Alert.Icon />
|
|
72
|
+
* <Alert.Content>
|
|
73
|
+
* <Alert.Title>Alert Title</Alert.Title>
|
|
74
|
+
* <Alert.Description>
|
|
75
|
+
* Alert description text.
|
|
76
|
+
* </Alert.Description>
|
|
77
|
+
* <Alert.DismissIconButton />
|
|
78
|
+
* <Alert.ExpandButton count={2} expanded={false} />
|
|
79
|
+
* </Alert.Content>
|
|
80
|
+
* </Alert.Root>
|
|
81
|
+
* ```
|
|
82
|
+
*/
|
|
83
|
+
declare const Icon: ({ className, ref, svg, ...props }: AlertIconProps) => import("react").JSX.Element;
|
|
84
|
+
/**
|
|
85
|
+
* The container for the content slot of an alert. Place the title, description,
|
|
86
|
+
* and trailing controls as direct children.
|
|
87
|
+
*
|
|
88
|
+
* @see https://mantle.ngrok.com/components/feedback/alert#alertcontent
|
|
89
|
+
*
|
|
90
|
+
* @example
|
|
91
|
+
* ```tsx
|
|
92
|
+
* <Alert.Root intent="info">
|
|
93
|
+
* <Alert.Icon />
|
|
94
|
+
* <Alert.Content>
|
|
95
|
+
* <Alert.Title>Alert Title</Alert.Title>
|
|
96
|
+
* <Alert.Description>
|
|
97
|
+
* Alert description text.
|
|
98
|
+
* </Alert.Description>
|
|
99
|
+
* <Alert.DismissIconButton />
|
|
100
|
+
* <Alert.ExpandButton count={2} expanded={false} />
|
|
101
|
+
* </Alert.Content>
|
|
102
|
+
* </Alert.Root>
|
|
103
|
+
*```
|
|
104
|
+
*/
|
|
105
|
+
declare const Content: ({ className, ref, ...props }: ComponentProps<"div">) => import("react").JSX.Element;
|
|
106
|
+
type AlertTitleProps = ComponentProps<"h5"> & WithAsChild;
|
|
107
|
+
/**
|
|
108
|
+
* The title of an alert. Default renders as an h5 element, use asChild to render something else.
|
|
109
|
+
*
|
|
110
|
+
* @see https://mantle.ngrok.com/components/feedback/alert#alerttitle
|
|
111
|
+
*
|
|
112
|
+
* @example
|
|
113
|
+
* ```tsx
|
|
114
|
+
* <Alert.Root intent="info">
|
|
115
|
+
* <Alert.Icon />
|
|
116
|
+
* <Alert.Content>
|
|
117
|
+
* <Alert.Title>Alert Title</Alert.Title>
|
|
118
|
+
* <Alert.Description>
|
|
119
|
+
* Alert description text.
|
|
120
|
+
* </Alert.Description>
|
|
121
|
+
* <Alert.DismissIconButton />
|
|
122
|
+
* <Alert.ExpandButton count={2} expanded={false} />
|
|
123
|
+
* </Alert.Content>
|
|
124
|
+
* </Alert.Root>
|
|
125
|
+
*```
|
|
126
|
+
*/
|
|
127
|
+
declare const Title: ({ asChild, className, ref, ...props }: AlertTitleProps) => import("react").JSX.Element;
|
|
128
|
+
type AlertDescriptionProps = ComponentProps<"div"> & WithAsChild;
|
|
129
|
+
/**
|
|
130
|
+
* The optional description of an alert.
|
|
131
|
+
* Renders as a `div` by default, but can be changed to any other element using
|
|
132
|
+
* the `asChild` prop.
|
|
133
|
+
*
|
|
134
|
+
* @see https://mantle.ngrok.com/components/feedback/alert#alertdescription
|
|
135
|
+
*
|
|
136
|
+
* @example
|
|
137
|
+
* ```tsx
|
|
138
|
+
* <Alert.Root intent="info">
|
|
139
|
+
* <Alert.Icon />
|
|
140
|
+
* <Alert.Content>
|
|
141
|
+
* <Alert.Title>Alert Title</Alert.Title>
|
|
142
|
+
* <Alert.Description>
|
|
143
|
+
* Alert description text.
|
|
144
|
+
* </Alert.Description>
|
|
145
|
+
* <Alert.DismissIconButton />
|
|
146
|
+
* <Alert.ExpandButton count={2} expanded={false} />
|
|
147
|
+
* </Alert.Content>
|
|
148
|
+
* </Alert.Root>
|
|
149
|
+
* ```
|
|
150
|
+
*/
|
|
151
|
+
declare const Description: ({ asChild, className, ref, ...props }: AlertDescriptionProps) => import("react").JSX.Element;
|
|
152
|
+
type AlertDismissIconButtonProps = Partial<Omit<IconButtonProps, "appearance" | "icon" | "intent">> & {
|
|
153
|
+
/**
|
|
154
|
+
* The visual style of the dismiss button. Optional here —
|
|
155
|
+
* `Alert.DismissIconButton` defaults to `"ghost"` so the dismiss affordance
|
|
156
|
+
* stays visually quiet inside the Alert.
|
|
157
|
+
*
|
|
158
|
+
* @default "ghost"
|
|
159
|
+
*/
|
|
160
|
+
appearance?: IconButtonAppearance;
|
|
161
|
+
/**
|
|
162
|
+
* An optional icon to render inside the dismiss button. Defaults to an X icon.
|
|
163
|
+
*/
|
|
164
|
+
icon?: ReactNode;
|
|
165
|
+
};
|
|
166
|
+
/**
|
|
167
|
+
* A compact, trailing control for dismissing an alert.
|
|
168
|
+
*
|
|
169
|
+
* It inherits `--alert-control-color`, `--alert-control-hover-color`, and
|
|
170
|
+
* `--alert-control-hover-bg` from `Alert.Root`, shared with
|
|
171
|
+
* `Alert.ExpandButton` when both controls are composed together.
|
|
172
|
+
*
|
|
173
|
+
* @see https://mantle.ngrok.com/components/feedback/alert#alertdismissiconbutton
|
|
174
|
+
*
|
|
175
|
+
* @example
|
|
176
|
+
* ```tsx
|
|
177
|
+
* <Alert.Root intent="warning">
|
|
178
|
+
* <Alert.Icon />
|
|
179
|
+
* <Alert.Content>
|
|
180
|
+
* <Alert.Title>Usage limit approaching</Alert.Title>
|
|
181
|
+
* <Alert.DismissIconButton onClick={dismiss} />
|
|
182
|
+
* <Alert.ExpandButton count={2} expanded={isExpanded} onClick={toggle} />
|
|
183
|
+
* </Alert.Content>
|
|
184
|
+
* </Alert.Root>
|
|
185
|
+
* ```
|
|
186
|
+
*/
|
|
187
|
+
declare const DismissIconButton: ({ size, type, label, appearance, className, icon, ...props }: AlertDismissIconButtonProps) => import("react").JSX.Element;
|
|
188
|
+
type AlertExpandButtonProps = Omit<ButtonProps, "appearance" | "asChild" | "children" | "icon" | "iconPlacement" | "intent" | "size"> & {
|
|
189
|
+
/** The number of alerts hidden by a collapsed alert center. */
|
|
190
|
+
count: number;
|
|
191
|
+
/** Whether the alerts controlled by this button are currently visible. */
|
|
192
|
+
expanded: boolean;
|
|
193
|
+
};
|
|
194
|
+
/**
|
|
195
|
+
* A compact, trailing control for expanding or collapsing related alerts.
|
|
196
|
+
*
|
|
197
|
+
* It occupies the trailing control area alongside `Alert.DismissIconButton`
|
|
198
|
+
* when both are present, and marks the alert so `Alert.Content` reserves room
|
|
199
|
+
* for its plus-prefixed count and caret on narrow viewports. It shares the
|
|
200
|
+
* `--alert-control-*` color variables from `Alert.Root` with the dismiss
|
|
201
|
+
* control.
|
|
202
|
+
*
|
|
203
|
+
* @see https://mantle.ngrok.com/components/feedback/alert#alertexpandbutton
|
|
204
|
+
*
|
|
205
|
+
* @example
|
|
206
|
+
* ```tsx
|
|
207
|
+
* <Alert.Root intent="warning">
|
|
208
|
+
* <Alert.Icon />
|
|
209
|
+
* <Alert.Content>
|
|
210
|
+
* <Alert.Title>Usage limit approaching</Alert.Title>
|
|
211
|
+
* <Alert.DismissIconButton />
|
|
212
|
+
* <Alert.ExpandButton count={2} expanded={isExpanded} onClick={toggle} />
|
|
213
|
+
* </Alert.Content>
|
|
214
|
+
* </Alert.Root>
|
|
215
|
+
* ```
|
|
216
|
+
*/
|
|
217
|
+
declare const ExpandButton: ({ count, expanded, className, ...props }: AlertExpandButtonProps) => import("react").JSX.Element;
|
|
218
|
+
/**
|
|
219
|
+
* Displays a callout for user attention.
|
|
220
|
+
*
|
|
221
|
+
* @see https://mantle.ngrok.com/components/feedback/alert
|
|
222
|
+
*
|
|
223
|
+
* @example
|
|
224
|
+
* Composition:
|
|
225
|
+
* ```
|
|
226
|
+
* Alert.Root
|
|
227
|
+
* ├── Alert.Icon
|
|
228
|
+
* ├── Alert.Content
|
|
229
|
+
* ├── Alert.Title
|
|
230
|
+
* ├── Alert.Description
|
|
231
|
+
* ├── Alert.DismissIconButton
|
|
232
|
+
* └── Alert.ExpandButton
|
|
233
|
+
* ```
|
|
234
|
+
*
|
|
235
|
+
* @example
|
|
236
|
+
* ```tsx
|
|
237
|
+
* <Alert.Root intent="info">
|
|
238
|
+
* <Alert.Icon />
|
|
239
|
+
* <Alert.Content>
|
|
240
|
+
* <Alert.Title>Alert Title</Alert.Title>
|
|
241
|
+
* <Alert.Description>
|
|
242
|
+
* Alert description text.
|
|
243
|
+
* </Alert.Description>
|
|
244
|
+
* <Alert.DismissIconButton />
|
|
245
|
+
* <Alert.ExpandButton count={2} expanded={false} />
|
|
246
|
+
* </Alert.Content>
|
|
247
|
+
* </Alert.Root>
|
|
248
|
+
*```
|
|
249
|
+
*/
|
|
250
|
+
declare const Alert: {
|
|
251
|
+
/**
|
|
252
|
+
* The root container of the alert component.
|
|
253
|
+
*
|
|
254
|
+
* @see https://mantle.ngrok.com/components/feedback/alert#alertroot
|
|
255
|
+
*
|
|
256
|
+
* @example
|
|
257
|
+
* ```tsx
|
|
258
|
+
* <Alert.Root intent="info">
|
|
259
|
+
* <Alert.Icon />
|
|
260
|
+
* <Alert.Content>
|
|
261
|
+
* <Alert.Title>Alert Title</Alert.Title>
|
|
262
|
+
* <Alert.Description>Alert description</Alert.Description>
|
|
263
|
+
* <Alert.DismissIconButton />
|
|
264
|
+
* <Alert.ExpandButton count={2} expanded={false} />
|
|
265
|
+
* </Alert.Content>
|
|
266
|
+
* </Alert.Root>
|
|
267
|
+
* ```
|
|
268
|
+
*/
|
|
269
|
+
readonly Root: typeof Root;
|
|
270
|
+
/**
|
|
271
|
+
* The container for the content slot of an alert.
|
|
272
|
+
*
|
|
273
|
+
* @see https://mantle.ngrok.com/components/feedback/alert#alertcontent
|
|
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.DismissIconButton />
|
|
283
|
+
* <Alert.ExpandButton count={2} expanded={false} />
|
|
284
|
+
* </Alert.Content>
|
|
285
|
+
* </Alert.Root>
|
|
286
|
+
* ```
|
|
287
|
+
*/
|
|
288
|
+
readonly Content: typeof Content;
|
|
289
|
+
/**
|
|
290
|
+
* A compact trailing control for expanding or collapsing related alerts.
|
|
291
|
+
* It inherits the `--alert-control-color`, `--alert-control-hover-color`, and
|
|
292
|
+
* `--alert-control-hover-bg` variables from `Alert.Root`, shared with the
|
|
293
|
+
* dismiss control.
|
|
294
|
+
*
|
|
295
|
+
* @see https://mantle.ngrok.com/components/feedback/alert#alertexpandbutton
|
|
296
|
+
*
|
|
297
|
+
* @example
|
|
298
|
+
* ```tsx
|
|
299
|
+
* <Alert.Root intent="warning">
|
|
300
|
+
* <Alert.Icon />
|
|
301
|
+
* <Alert.Content>
|
|
302
|
+
* <Alert.Title>Usage limit approaching</Alert.Title>
|
|
303
|
+
* <Alert.DismissIconButton />
|
|
304
|
+
* <Alert.ExpandButton count={2} expanded={isExpanded} onClick={toggle} />
|
|
305
|
+
* </Alert.Content>
|
|
306
|
+
* </Alert.Root>
|
|
307
|
+
* ```
|
|
308
|
+
*/
|
|
309
|
+
readonly ExpandButton: typeof ExpandButton;
|
|
310
|
+
/**
|
|
311
|
+
* The optional description of an alert.
|
|
312
|
+
*
|
|
313
|
+
* @see https://mantle.ngrok.com/components/feedback/alert#alertdescription
|
|
314
|
+
*
|
|
315
|
+
* @example
|
|
316
|
+
* ```tsx
|
|
317
|
+
* <Alert.Root intent="info">
|
|
318
|
+
* <Alert.Icon />
|
|
319
|
+
* <Alert.Content>
|
|
320
|
+
* <Alert.Title>Alert Title</Alert.Title>
|
|
321
|
+
* <Alert.Description>Alert description text.</Alert.Description>
|
|
322
|
+
* <Alert.DismissIconButton />
|
|
323
|
+
* <Alert.ExpandButton count={2} expanded={false} />
|
|
324
|
+
* </Alert.Content>
|
|
325
|
+
* </Alert.Root>
|
|
326
|
+
* ```
|
|
327
|
+
*/
|
|
328
|
+
readonly Description: typeof Description;
|
|
329
|
+
/**
|
|
330
|
+
* An optional dismiss button that can be used to close the alert.
|
|
331
|
+
* It inherits the `--alert-control-color`, `--alert-control-hover-color`, and
|
|
332
|
+
* `--alert-control-hover-bg` variables from `Alert.Root`, shared with the
|
|
333
|
+
* expand control.
|
|
334
|
+
*
|
|
335
|
+
* @see https://mantle.ngrok.com/components/feedback/alert#alertdismissiconbutton
|
|
336
|
+
*
|
|
337
|
+
* @example
|
|
338
|
+
* ```tsx
|
|
339
|
+
* <Alert.Root intent="info">
|
|
340
|
+
* <Alert.Icon />
|
|
341
|
+
* <Alert.Content>
|
|
342
|
+
* <Alert.Title>Alert Title</Alert.Title>
|
|
343
|
+
* <Alert.DismissIconButton />
|
|
344
|
+
* <Alert.Description>Alert description text.</Alert.Description>
|
|
345
|
+
* <Alert.ExpandButton count={2} expanded={false} />
|
|
346
|
+
* </Alert.Content>
|
|
347
|
+
* </Alert.Root>
|
|
348
|
+
* ```
|
|
349
|
+
*/
|
|
350
|
+
readonly DismissIconButton: typeof DismissIconButton;
|
|
351
|
+
/**
|
|
352
|
+
* An optional icon that visually represents the intent of the Alert.
|
|
353
|
+
*
|
|
354
|
+
* @see https://mantle.ngrok.com/components/feedback/alert#alerticon
|
|
355
|
+
*
|
|
356
|
+
* @example
|
|
357
|
+
* ```tsx
|
|
358
|
+
* <Alert.Root intent="info">
|
|
359
|
+
* <Alert.Icon />
|
|
360
|
+
* <Alert.Content>
|
|
361
|
+
* <Alert.Title>Alert Title</Alert.Title>
|
|
362
|
+
* <Alert.Description>Alert description text.</Alert.Description>
|
|
363
|
+
* <Alert.DismissIconButton />
|
|
364
|
+
* <Alert.ExpandButton count={2} expanded={false} />
|
|
365
|
+
* </Alert.Content>
|
|
366
|
+
* </Alert.Root>
|
|
367
|
+
* ```
|
|
368
|
+
*/
|
|
369
|
+
readonly Icon: typeof Icon;
|
|
370
|
+
/**
|
|
371
|
+
* The title of an alert.
|
|
372
|
+
*
|
|
373
|
+
* @see https://mantle.ngrok.com/components/feedback/alert#alerttitle
|
|
374
|
+
*
|
|
375
|
+
* @example
|
|
376
|
+
* ```tsx
|
|
377
|
+
* <Alert.Root intent="info">
|
|
378
|
+
* <Alert.Icon />
|
|
379
|
+
* <Alert.Content>
|
|
380
|
+
* <Alert.Title>Alert Title</Alert.Title>
|
|
381
|
+
* <Alert.Description>Alert description text.</Alert.Description>
|
|
382
|
+
* <Alert.DismissIconButton />
|
|
383
|
+
* <Alert.ExpandButton count={2} expanded={false} />
|
|
384
|
+
* </Alert.Content>
|
|
385
|
+
* </Alert.Root>
|
|
386
|
+
* ```
|
|
387
|
+
*/
|
|
388
|
+
readonly Title: typeof Title;
|
|
389
|
+
};
|
|
390
|
+
//#endregion
|
|
391
|
+
export { Alert as t };
|