@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
|
@@ -1,11 +1,72 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./index-
|
|
1
|
+
import { n as WithAsChild } from "./as-child-D23mGo4f.js";
|
|
2
|
+
import "./index-DA4ig3gj.js";
|
|
3
3
|
import { ComponentProps } from "react";
|
|
4
4
|
//#region src/components/description-list/description-list.d.ts
|
|
5
5
|
type DescriptionListProps = ComponentProps<"dl"> & WithAsChild;
|
|
6
|
+
/**
|
|
7
|
+
* A semantically correct description list built on the HTML `<dl>` element.
|
|
8
|
+
* Renders a list of label/value pairs with alternating row backgrounds,
|
|
9
|
+
* commonly used in detail views to display metadata about a resource.
|
|
10
|
+
*
|
|
11
|
+
* @see https://mantle.ngrok.com/components/data-display/description-list#descriptionlistroot
|
|
12
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/dl
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```tsx
|
|
16
|
+
* <DescriptionList.Root>
|
|
17
|
+
* <DescriptionList.Item>
|
|
18
|
+
* <DescriptionList.Label>Name</DescriptionList.Label>
|
|
19
|
+
* <DescriptionList.Value>my-api-key</DescriptionList.Value>
|
|
20
|
+
* </DescriptionList.Item>
|
|
21
|
+
* </DescriptionList.Root>
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
declare const Root: ({ asChild, className, children, ref, ...rest }: DescriptionListProps) => import("react").JSX.Element;
|
|
6
25
|
type DescriptionListItemProps = ComponentProps<"div"> & WithAsChild;
|
|
26
|
+
/**
|
|
27
|
+
* A wrapper that groups a `DescriptionList.Label` and `DescriptionList.Value`
|
|
28
|
+
* pair. Renders as a `<div>` inside the `<dl>` with a subgrid layout that
|
|
29
|
+
* inherits column tracks from the root.
|
|
30
|
+
*
|
|
31
|
+
* @see https://mantle.ngrok.com/components/data-display/description-list#descriptionlistitem
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```tsx
|
|
35
|
+
* <DescriptionList.Item>
|
|
36
|
+
* <DescriptionList.Label>ID</DescriptionList.Label>
|
|
37
|
+
* <DescriptionList.Value>aigk_2fKm9x8Hn3...</DescriptionList.Value>
|
|
38
|
+
* </DescriptionList.Item>
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
declare const Item: ({ asChild, className, children, ref, ...rest }: DescriptionListItemProps) => import("react").JSX.Element;
|
|
7
42
|
type DescriptionListLabelProps = ComponentProps<"dt"> & WithAsChild;
|
|
43
|
+
/**
|
|
44
|
+
* The label for a description list item. Renders as a `<dt>` element.
|
|
45
|
+
*
|
|
46
|
+
* @see https://mantle.ngrok.com/components/data-display/description-list#descriptionlistlabel
|
|
47
|
+
*
|
|
48
|
+
* @example
|
|
49
|
+
* ```tsx
|
|
50
|
+
* <DescriptionList.Label>Name</DescriptionList.Label>
|
|
51
|
+
* ```
|
|
52
|
+
*/
|
|
53
|
+
declare const Label: ({ asChild, className, children, ref, ...rest }: DescriptionListLabelProps) => import("react").JSX.Element;
|
|
8
54
|
type DescriptionListValueProps = ComponentProps<"dd"> & WithAsChild;
|
|
55
|
+
/**
|
|
56
|
+
* The value for a description list item. Renders as a `<dd>` element.
|
|
57
|
+
* Compose any content inside — the component is intentionally "dumb" and
|
|
58
|
+
* imposes no layout on its children.
|
|
59
|
+
*
|
|
60
|
+
* @see https://mantle.ngrok.com/components/data-display/description-list#descriptionlistvalue
|
|
61
|
+
*
|
|
62
|
+
* @example
|
|
63
|
+
* ```tsx
|
|
64
|
+
* <DescriptionList.Value>
|
|
65
|
+
* aigk_2fKm9x8Hn3QpYT7zKlR0vW5
|
|
66
|
+
* </DescriptionList.Value>
|
|
67
|
+
* ```
|
|
68
|
+
*/
|
|
69
|
+
declare const Value: ({ asChild, className, children, ref, ...rest }: DescriptionListValueProps) => import("react").JSX.Element;
|
|
9
70
|
/**
|
|
10
71
|
* A semantically correct description list built on the HTML `<dl>` element.
|
|
11
72
|
* Renders a list of label/value pairs with alternating row backgrounds,
|
|
@@ -59,7 +120,7 @@ declare const DescriptionList: {
|
|
|
59
120
|
* </DescriptionList.Root>
|
|
60
121
|
* ```
|
|
61
122
|
*/
|
|
62
|
-
readonly Root:
|
|
123
|
+
readonly Root: typeof Root;
|
|
63
124
|
/**
|
|
64
125
|
* A wrapper that groups a label/value pair. Renders a `<div>` with a default
|
|
65
126
|
* subgrid layout.
|
|
@@ -74,7 +135,7 @@ declare const DescriptionList: {
|
|
|
74
135
|
* </DescriptionList.Item>
|
|
75
136
|
* ```
|
|
76
137
|
*/
|
|
77
|
-
readonly Item:
|
|
138
|
+
readonly Item: typeof Item;
|
|
78
139
|
/**
|
|
79
140
|
* The label for a description list item. Renders a `<dt>` element.
|
|
80
141
|
*
|
|
@@ -85,7 +146,7 @@ declare const DescriptionList: {
|
|
|
85
146
|
* <DescriptionList.Label>Name</DescriptionList.Label>
|
|
86
147
|
* ```
|
|
87
148
|
*/
|
|
88
|
-
readonly Label:
|
|
149
|
+
readonly Label: typeof Label;
|
|
89
150
|
/**
|
|
90
151
|
* The value for a description list item. Renders a `<dd>` element.
|
|
91
152
|
*
|
|
@@ -98,7 +159,7 @@ declare const DescriptionList: {
|
|
|
98
159
|
* </DescriptionList.Value>
|
|
99
160
|
* ```
|
|
100
161
|
*/
|
|
101
|
-
readonly Value:
|
|
162
|
+
readonly Value: typeof Value;
|
|
102
163
|
};
|
|
103
164
|
//#endregion
|
|
104
165
|
export { DescriptionList, type DescriptionListProps };
|
package/dist/description-list.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./cx-IiQEAKf5.js";import{t}from"./slot-
|
|
1
|
+
import{t as e}from"./cx-IiQEAKf5.js";import{t}from"./slot-CDk0Bb9z.js";import{jsx as n}from"react/jsx-runtime";const r={Root:({asChild:r=!1,className:i,children:a,ref:o,...s})=>n(r?t:`dl`,{ref:o,"data-slot":`description-list`,className:e(`relative scrollbar overflow-x-auto overscroll-x-none rounded-lg border border-card grid grid-cols-[auto_1fr] gap-x-4 [&>*:nth-child(odd)]:bg-neutral-500/5 p-1`,i),...s,children:a}),Item:({asChild:r=!1,className:i,children:a,ref:o,...s})=>n(r?t:`div`,{ref:o,"data-slot":`description-list-item`,className:e(`rounded-sm col-span-full grid grid-cols-subgrid items-center`,i),...s,children:a}),Label:({asChild:r=!1,className:i,children:a,ref:o,...s})=>n(r?t:`dt`,{ref:o,"data-slot":`description-list-label`,className:e(`text-muted text-sm font-sans font-medium min-w-36 p-2`,i),...s,children:a}),Value:({asChild:r=!1,className:i,children:a,ref:o,...s})=>n(r?t:`dd`,{ref:o,"data-slot":`description-list-value`,className:e(`text-body font-mono text-mono py-2 px-3`,i),...s,children:a})};export{r as DescriptionList};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ComponentProps, ComponentPropsWithoutRef, Ref } from "react";
|
|
2
|
+
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
3
|
+
//#region src/components/dialog/primitive.d.ts
|
|
4
|
+
type DialogPrimitiveContentProps = ComponentProps<typeof DialogPrimitive.Content>;
|
|
5
|
+
declare function Root(props: ComponentPropsWithoutRef<typeof DialogPrimitive.Root>): import("react").JSX.Element;
|
|
6
|
+
declare const Trigger: import("react").ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
7
|
+
declare const Close: import("react").ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
8
|
+
declare const Overlay: (props: ComponentProps<typeof DialogPrimitive.Overlay>) => import("react").JSX.Element;
|
|
9
|
+
declare const Content: ({ onEscapeKeyDown, onInteractOutside, onPointerDownOutside, ref, ...props }: DialogPrimitiveContentProps) => import("react").JSX.Element;
|
|
10
|
+
declare const Title: import("react").ForwardRefExoticComponent<DialogPrimitive.DialogTitleProps & import("react").RefAttributes<HTMLHeadingElement>>;
|
|
11
|
+
/**
|
|
12
|
+
* An accessible description for the dialog primitive.
|
|
13
|
+
* This is a low-level primitive used by higher-level dialog components.
|
|
14
|
+
* Renders as a `div` by default, but can be changed to any other element using the `asChild` prop.
|
|
15
|
+
*/
|
|
16
|
+
declare const Description: ({ asChild, children, ref, ...props }: ComponentPropsWithoutRef<typeof DialogPrimitive.Description> & {
|
|
17
|
+
ref?: Ref<HTMLDivElement>;
|
|
18
|
+
}) => import("react").JSX.Element;
|
|
19
|
+
/**
|
|
20
|
+
* Type guard to check if the event target is the overlay component
|
|
21
|
+
*/
|
|
22
|
+
declare function isDialogOverlayTarget(target: EventTarget | null): boolean;
|
|
23
|
+
//#endregion
|
|
24
|
+
export { Root as a, isDialogOverlayTarget as c, Overlay as i, Content as n, Title as o, Description as r, Trigger as s, Close as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./cx-IiQEAKf5.js";import{t}from"./button-BAno7KIU.js";import{a as n,c as r,i,n as a,o,r as s,s as c,t as l}from"./primitive-trJDqIXJ.js";import{jsx as u,jsxs as d}from"react/jsx-runtime";import{XIcon as f}from"@phosphor-icons/react/X";const p=o,m=e=>u(r,{"data-slot":`dialog-trigger`,...e}),h=n,g=e=>u(l,{"data-slot":`dialog-close`,...e}),_=({className:t,ref:n,...r})=>u(i,{ref:n,"data-slot":`dialog-overlay`,className:e(`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-xs`,t),...r}),v={Root:p,Body:({className:t,...n})=>u(`div`,{"data-slot":`dialog-body`,className:e(`scrollbar scrollbar-gutter-stable text-body flex-1 overflow-y-auto p-6`,t),...n}),Close:g,CloseIconButton:({size:e=`md`,type:n=`button`,label:r=`Close Dialog`,appearance:i=`ghost`,intent:a=`neutral`,...o})=>u(l,{asChild:!0,children:u(t,{appearance:i,"data-slot":`dialog-close-icon-button`,icon:u(f,{}),intent:a,label:r,size:e,type:n,...o})}),Content:({children:t,className:n,preferredWidth:r=`max-w-lg`,ref:i,...o})=>d(h,{children:[u(_,{}),u(`div`,{className:`fixed inset-4 z-50 flex items-center justify-center`,children:u(a,{"data-mantle-modal-content":!0,"data-slot":`dialog-content`,className:e(`flex max-h-full w-full flex-1 flex-col`,`outline-hidden focus-within:outline-hidden`,`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`,r,n),ref:i,...o,children:t})})]}),Description:({className:t,ref:n,...r})=>u(s,{ref:n,"data-slot":`dialog-description`,className:e(`text-muted`,t),...r}),Footer:({className:t,...n})=>u(`div`,{"data-slot":`dialog-footer`,className:e(`border-dialog-muted flex shrink-0 justify-end gap-2 border-t px-6 py-4`,t),...n}),Header:({className:t,children:n,...r})=>u(`div`,{"data-slot":`dialog-header`,className:e(`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`,t),...r,children:n}),Overlay:_,Portal:h,Title:({className:t,ref:n,...r})=>u(c,{ref:n,"data-slot":`dialog-title`,className:e(`text-strong truncate text-lg font-medium`,t),...r}),Trigger:m};export{v as t};
|
package/dist/dialog.d.ts
CHANGED
|
@@ -1,8 +1,157 @@
|
|
|
1
|
-
import { t as ButtonIntent } from "./
|
|
2
|
-
import {
|
|
3
|
-
import { n as
|
|
1
|
+
import { t as ButtonIntent } from "./button-DdSKSj1c.js";
|
|
2
|
+
import { a as Root, c as isDialogOverlayTarget, i as Overlay$1, n as Content$1, o as Title$1, r as Description$1, s as Trigger$1, t as Close$1 } from "./dialog-BM4wPCft.js";
|
|
3
|
+
import { n as IconButtonProps, r as IconButtonAppearance } from "./button-C7vAl6lS.js";
|
|
4
4
|
import { ComponentProps } from "react";
|
|
5
5
|
//#region src/components/dialog/dialog.d.ts
|
|
6
|
+
/**
|
|
7
|
+
* A button that opens the dialog.
|
|
8
|
+
*
|
|
9
|
+
* @see https://mantle.ngrok.com/components/overlays/dialog#dialogtrigger
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```tsx
|
|
13
|
+
* <Dialog.Root>
|
|
14
|
+
* <Dialog.Trigger asChild>
|
|
15
|
+
* <Button type="button" appearance="filled" intent="neutral">Open Dialog</Button>
|
|
16
|
+
* </Dialog.Trigger>
|
|
17
|
+
* <Dialog.Content>
|
|
18
|
+
* <Dialog.Header>
|
|
19
|
+
* <Dialog.Title>Dialog Title</Dialog.Title>
|
|
20
|
+
* <Dialog.Description>This is an optional description.</Dialog.Description>
|
|
21
|
+
* <Dialog.CloseIconButton />
|
|
22
|
+
* </Dialog.Header>
|
|
23
|
+
* <Dialog.Body>
|
|
24
|
+
* <p>This is the dialog content.</p>
|
|
25
|
+
* </Dialog.Body>
|
|
26
|
+
* <Dialog.Footer>
|
|
27
|
+
* <Dialog.Close asChild>
|
|
28
|
+
* <Button type="button" appearance="outlined" intent="neutral">Cancel</Button>
|
|
29
|
+
* </Dialog.Close>
|
|
30
|
+
* <Button type="button" appearance="filled" intent="neutral">Save</Button>
|
|
31
|
+
* </Dialog.Footer>
|
|
32
|
+
* </Dialog.Content>
|
|
33
|
+
* </Dialog.Root>
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
36
|
+
declare const Trigger: (props: ComponentProps<typeof Trigger$1>) => import("react").JSX.Element;
|
|
37
|
+
/**
|
|
38
|
+
* A button that closes the dialog when clicked. Wrap an interactive element
|
|
39
|
+
* with `asChild` to delegate the close behavior to your own button.
|
|
40
|
+
*
|
|
41
|
+
* @see https://mantle.ngrok.com/components/overlays/dialog#dialogclose
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* ```tsx
|
|
45
|
+
* <Dialog.Root>
|
|
46
|
+
* <Dialog.Trigger asChild>
|
|
47
|
+
* <Button type="button" appearance="filled" intent="neutral">Open Dialog</Button>
|
|
48
|
+
* </Dialog.Trigger>
|
|
49
|
+
* <Dialog.Content>
|
|
50
|
+
* <Dialog.Header>
|
|
51
|
+
* <Dialog.Title>Dialog Title</Dialog.Title>
|
|
52
|
+
* <Dialog.Description>This is an optional description.</Dialog.Description>
|
|
53
|
+
* <Dialog.CloseIconButton />
|
|
54
|
+
* </Dialog.Header>
|
|
55
|
+
* <Dialog.Body>
|
|
56
|
+
* <p>This is the dialog content.</p>
|
|
57
|
+
* </Dialog.Body>
|
|
58
|
+
* <Dialog.Footer>
|
|
59
|
+
* <Dialog.Close asChild>
|
|
60
|
+
* <Button type="button" appearance="outlined" intent="neutral">Cancel</Button>
|
|
61
|
+
* </Dialog.Close>
|
|
62
|
+
* <Button type="button" appearance="filled" intent="neutral">Save</Button>
|
|
63
|
+
* </Dialog.Footer>
|
|
64
|
+
* </Dialog.Content>
|
|
65
|
+
* </Dialog.Root>
|
|
66
|
+
* ```
|
|
67
|
+
*/
|
|
68
|
+
declare const Close: (props: ComponentProps<typeof Close$1>) => import("react").JSX.Element;
|
|
69
|
+
/**
|
|
70
|
+
* The backdrop overlay for the dialog. Sits between the page and the dialog
|
|
71
|
+
* content and applies a blur and dim effect.
|
|
72
|
+
*
|
|
73
|
+
* Most consumers should not need to use this directly — `Dialog.Content`
|
|
74
|
+
* renders an overlay automatically. Use this only when composing a custom
|
|
75
|
+
* `Dialog.Portal` tree.
|
|
76
|
+
*
|
|
77
|
+
* @see https://mantle.ngrok.com/components/overlays/dialog#api-reference
|
|
78
|
+
*
|
|
79
|
+
* @example
|
|
80
|
+
* ```tsx
|
|
81
|
+
* <Dialog.Root>
|
|
82
|
+
* <Dialog.Trigger asChild>
|
|
83
|
+
* <Button type="button" appearance="filled" intent="neutral">Open Dialog</Button>
|
|
84
|
+
* </Dialog.Trigger>
|
|
85
|
+
* <Dialog.Portal>
|
|
86
|
+
* <Dialog.Overlay />
|
|
87
|
+
* <Dialog.Content>
|
|
88
|
+
* <Dialog.Header>
|
|
89
|
+
* <Dialog.Title>Dialog Title</Dialog.Title>
|
|
90
|
+
* <Dialog.Description>This is an optional description.</Dialog.Description>
|
|
91
|
+
* <Dialog.CloseIconButton />
|
|
92
|
+
* </Dialog.Header>
|
|
93
|
+
* <Dialog.Body>
|
|
94
|
+
* <p>This is the dialog content.</p>
|
|
95
|
+
* </Dialog.Body>
|
|
96
|
+
* <Dialog.Footer>
|
|
97
|
+
* <Dialog.Close asChild>
|
|
98
|
+
* <Button type="button" appearance="outlined" intent="neutral">Cancel</Button>
|
|
99
|
+
* </Dialog.Close>
|
|
100
|
+
* <Button type="button" appearance="filled" intent="neutral">Save</Button>
|
|
101
|
+
* </Dialog.Footer>
|
|
102
|
+
* </Dialog.Content>
|
|
103
|
+
* </Dialog.Portal>
|
|
104
|
+
* </Dialog.Root>
|
|
105
|
+
* ```
|
|
106
|
+
*/
|
|
107
|
+
declare const Overlay: ({ className, ref, ...props }: ComponentProps<typeof Overlay$1>) => import("react").JSX.Element;
|
|
108
|
+
type ContentProps = ComponentProps<typeof Content$1> & {
|
|
109
|
+
/**
|
|
110
|
+
* The preferred width of the `Dialog.Content` as a tailwind `max-w-` class.
|
|
111
|
+
*
|
|
112
|
+
* By default, a `Dialog`'s content width is responsive with a default
|
|
113
|
+
* preferred width: the maximum width of the `Dialog.Content`
|
|
114
|
+
*
|
|
115
|
+
* @default `max-w-lg`
|
|
116
|
+
*/
|
|
117
|
+
preferredWidth?: `max-w-${string}`;
|
|
118
|
+
};
|
|
119
|
+
/**
|
|
120
|
+
* The container for the dialog content.
|
|
121
|
+
* Renders on top of the overlay and is centered in the viewport.
|
|
122
|
+
*
|
|
123
|
+
* `Dialog.Content` renders its floating layer at Tailwind `z-50`, Mantle's
|
|
124
|
+
* shared floating z-index. When multiple shared layers are open, the most
|
|
125
|
+
* recently mounted layer renders on top.
|
|
126
|
+
*
|
|
127
|
+
* @see https://mantle.ngrok.com/components/overlays/dialog#dialogcontent
|
|
128
|
+
*
|
|
129
|
+
* @example
|
|
130
|
+
* ```tsx
|
|
131
|
+
* <Dialog.Root>
|
|
132
|
+
* <Dialog.Trigger asChild>
|
|
133
|
+
* <Button type="button" appearance="filled" intent="neutral">Open Dialog</Button>
|
|
134
|
+
* </Dialog.Trigger>
|
|
135
|
+
* <Dialog.Content>
|
|
136
|
+
* <Dialog.Header>
|
|
137
|
+
* <Dialog.Title>Dialog Title</Dialog.Title>
|
|
138
|
+
* <Dialog.Description>This is an optional description.</Dialog.Description>
|
|
139
|
+
* <Dialog.CloseIconButton />
|
|
140
|
+
* </Dialog.Header>
|
|
141
|
+
* <Dialog.Body>
|
|
142
|
+
* <p>This is the dialog content.</p>
|
|
143
|
+
* </Dialog.Body>
|
|
144
|
+
* <Dialog.Footer>
|
|
145
|
+
* <Dialog.Close asChild>
|
|
146
|
+
* <Button type="button" appearance="outlined" intent="neutral">Cancel</Button>
|
|
147
|
+
* </Dialog.Close>
|
|
148
|
+
* <Button type="button" appearance="filled" intent="neutral">Save</Button>
|
|
149
|
+
* </Dialog.Footer>
|
|
150
|
+
* </Dialog.Content>
|
|
151
|
+
* </Dialog.Root>
|
|
152
|
+
* ```
|
|
153
|
+
*/
|
|
154
|
+
declare const Content: ({ children, className, preferredWidth, ref, ...props }: ContentProps) => import("react").JSX.Element;
|
|
6
155
|
/**
|
|
7
156
|
* Contains the header content of the dialog, including the title and close button.
|
|
8
157
|
*
|
|
@@ -33,10 +182,7 @@ import { ComponentProps } from "react";
|
|
|
33
182
|
* </Dialog.Root>
|
|
34
183
|
* ```
|
|
35
184
|
*/
|
|
36
|
-
declare const Header: {
|
|
37
|
-
({ className, children, ...props }: ComponentProps<"div">): import("react").JSX.Element;
|
|
38
|
-
displayName: string;
|
|
39
|
-
};
|
|
185
|
+
declare const Header: ({ className, children, ...props }: ComponentProps<"div">) => import("react").JSX.Element;
|
|
40
186
|
type CloseIconButtonProps = Partial<Omit<IconButtonProps, "appearance" | "icon" | "intent">> & {
|
|
41
187
|
/**
|
|
42
188
|
* The visual style of the close icon button. Optional here —
|
|
@@ -85,10 +231,7 @@ type CloseIconButtonProps = Partial<Omit<IconButtonProps, "appearance" | "icon"
|
|
|
85
231
|
* </Dialog.Root>
|
|
86
232
|
* ```
|
|
87
233
|
*/
|
|
88
|
-
declare const CloseIconButton: {
|
|
89
|
-
({ size, type, label, appearance, intent, ...props }: CloseIconButtonProps): import("react").JSX.Element;
|
|
90
|
-
displayName: string;
|
|
91
|
-
};
|
|
234
|
+
declare const CloseIconButton: ({ size, type, label, appearance, intent, ...props }: CloseIconButtonProps) => import("react").JSX.Element;
|
|
92
235
|
/**
|
|
93
236
|
* Contains the main content of the dialog.
|
|
94
237
|
*
|
|
@@ -119,10 +262,7 @@ declare const CloseIconButton: {
|
|
|
119
262
|
* </Dialog.Root>
|
|
120
263
|
* ```
|
|
121
264
|
*/
|
|
122
|
-
declare const Body: {
|
|
123
|
-
({ className, ...props }: ComponentProps<"div">): import("react").JSX.Element;
|
|
124
|
-
displayName: string;
|
|
125
|
-
};
|
|
265
|
+
declare const Body: ({ className, ...props }: ComponentProps<"div">) => import("react").JSX.Element;
|
|
126
266
|
/**
|
|
127
267
|
* Contains the footer content of the dialog, including action buttons.
|
|
128
268
|
*
|
|
@@ -153,10 +293,71 @@ declare const Body: {
|
|
|
153
293
|
* </Dialog.Root>
|
|
154
294
|
* ```
|
|
155
295
|
*/
|
|
156
|
-
declare const Footer: {
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
296
|
+
declare const Footer: ({ className, ...props }: ComponentProps<"div">) => import("react").JSX.Element;
|
|
297
|
+
/**
|
|
298
|
+
* An accessible name to be announced when the dialog is opened.
|
|
299
|
+
*
|
|
300
|
+
* @see https://mantle.ngrok.com/components/overlays/dialog#dialogtitle
|
|
301
|
+
*
|
|
302
|
+
* @example
|
|
303
|
+
* ```tsx
|
|
304
|
+
* <Dialog.Root>
|
|
305
|
+
* <Dialog.Trigger asChild>
|
|
306
|
+
* <Button type="button" appearance="filled" intent="neutral">Open Dialog</Button>
|
|
307
|
+
* </Dialog.Trigger>
|
|
308
|
+
* <Dialog.Content>
|
|
309
|
+
* <Dialog.Header>
|
|
310
|
+
* <Dialog.Title>Dialog Title</Dialog.Title>
|
|
311
|
+
* <Dialog.Description>This is an optional description.</Dialog.Description>
|
|
312
|
+
* <Dialog.CloseIconButton />
|
|
313
|
+
* </Dialog.Header>
|
|
314
|
+
* <Dialog.Body>
|
|
315
|
+
* <p>This is the dialog content.</p>
|
|
316
|
+
* </Dialog.Body>
|
|
317
|
+
* <Dialog.Footer>
|
|
318
|
+
* <Dialog.Close asChild>
|
|
319
|
+
* <Button type="button" appearance="outlined" intent="neutral">Cancel</Button>
|
|
320
|
+
* </Dialog.Close>
|
|
321
|
+
* <Button type="button" appearance="filled" intent="neutral">Save</Button>
|
|
322
|
+
* </Dialog.Footer>
|
|
323
|
+
* </Dialog.Content>
|
|
324
|
+
* </Dialog.Root>
|
|
325
|
+
* ```
|
|
326
|
+
*/
|
|
327
|
+
declare const Title: ({ className, ref, ...props }: ComponentProps<typeof Title$1>) => import("react").JSX.Element;
|
|
328
|
+
/**
|
|
329
|
+
* An accessible description to be announced when the dialog is opened.
|
|
330
|
+
* Renders as a `div` by default, but can be changed to any other element using
|
|
331
|
+
* the `asChild` prop.
|
|
332
|
+
*
|
|
333
|
+
* @see https://mantle.ngrok.com/components/overlays/dialog#dialogdescription
|
|
334
|
+
*
|
|
335
|
+
* @example
|
|
336
|
+
* ```tsx
|
|
337
|
+
* <Dialog.Root>
|
|
338
|
+
* <Dialog.Trigger asChild>
|
|
339
|
+
* <Button type="button" appearance="filled" intent="neutral">Open Dialog</Button>
|
|
340
|
+
* </Dialog.Trigger>
|
|
341
|
+
* <Dialog.Content>
|
|
342
|
+
* <Dialog.Header>
|
|
343
|
+
* <Dialog.Title>Dialog Title</Dialog.Title>
|
|
344
|
+
* <Dialog.Description>This is an optional description.</Dialog.Description>
|
|
345
|
+
* <Dialog.CloseIconButton />
|
|
346
|
+
* </Dialog.Header>
|
|
347
|
+
* <Dialog.Body>
|
|
348
|
+
* <p>This is the dialog content.</p>
|
|
349
|
+
* </Dialog.Body>
|
|
350
|
+
* <Dialog.Footer>
|
|
351
|
+
* <Dialog.Close asChild>
|
|
352
|
+
* <Button type="button" appearance="outlined" intent="neutral">Cancel</Button>
|
|
353
|
+
* </Dialog.Close>
|
|
354
|
+
* <Button type="button" appearance="filled" intent="neutral">Save</Button>
|
|
355
|
+
* </Dialog.Footer>
|
|
356
|
+
* </Dialog.Content>
|
|
357
|
+
* </Dialog.Root>
|
|
358
|
+
* ```
|
|
359
|
+
*/
|
|
360
|
+
declare const Description: ({ className, ref, ...props }: ComponentProps<typeof Description$1>) => import("react").JSX.Element;
|
|
160
361
|
/**
|
|
161
362
|
* A window overlaid on either the primary window or another dialog window. Use
|
|
162
363
|
* Dialog for a focused modal that interrupts the user to gather input or
|
|
@@ -309,7 +510,7 @@ declare const Dialog: {
|
|
|
309
510
|
* </Dialog.Root>
|
|
310
511
|
* ```
|
|
311
512
|
*/
|
|
312
|
-
readonly Close:
|
|
513
|
+
readonly Close: typeof Close;
|
|
313
514
|
/**
|
|
314
515
|
* An icon button that closes the dialog when clicked.
|
|
315
516
|
*
|
|
@@ -376,17 +577,7 @@ declare const Dialog: {
|
|
|
376
577
|
* </Dialog.Root>
|
|
377
578
|
* ```
|
|
378
579
|
*/
|
|
379
|
-
readonly Content:
|
|
380
|
-
/**
|
|
381
|
-
* The preferred width of the `Dialog.Content` as a tailwind `max-w-` class.
|
|
382
|
-
*
|
|
383
|
-
* By default, a `Dialog`'s content width is responsive with a default
|
|
384
|
-
* preferred width: the maximum width of the `Dialog.Content`
|
|
385
|
-
*
|
|
386
|
-
* @default `max-w-lg`
|
|
387
|
-
*/
|
|
388
|
-
preferredWidth?: `max-w-${string}`;
|
|
389
|
-
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
580
|
+
readonly Content: typeof Content;
|
|
390
581
|
/**
|
|
391
582
|
* An accessible description to be announced when the dialog is opened.
|
|
392
583
|
*
|
|
@@ -417,7 +608,7 @@ declare const Dialog: {
|
|
|
417
608
|
* </Dialog.Root>
|
|
418
609
|
* ```
|
|
419
610
|
*/
|
|
420
|
-
readonly Description:
|
|
611
|
+
readonly Description: typeof Description;
|
|
421
612
|
/**
|
|
422
613
|
* Contains the footer content of the dialog, including action buttons.
|
|
423
614
|
*
|
|
@@ -513,7 +704,7 @@ declare const Dialog: {
|
|
|
513
704
|
* </Dialog.Root>
|
|
514
705
|
* ```
|
|
515
706
|
*/
|
|
516
|
-
readonly Overlay:
|
|
707
|
+
readonly Overlay: typeof Overlay;
|
|
517
708
|
/**
|
|
518
709
|
* The portal container for the dialog.
|
|
519
710
|
*
|
|
@@ -578,7 +769,7 @@ declare const Dialog: {
|
|
|
578
769
|
* </Dialog.Root>
|
|
579
770
|
* ```
|
|
580
771
|
*/
|
|
581
|
-
readonly Title:
|
|
772
|
+
readonly Title: typeof Title;
|
|
582
773
|
/**
|
|
583
774
|
* A button that opens the dialog.
|
|
584
775
|
*
|
|
@@ -609,7 +800,7 @@ declare const Dialog: {
|
|
|
609
800
|
* </Dialog.Root>
|
|
610
801
|
* ```
|
|
611
802
|
*/
|
|
612
|
-
readonly Trigger:
|
|
803
|
+
readonly Trigger: typeof Trigger;
|
|
613
804
|
};
|
|
614
805
|
//#endregion
|
|
615
806
|
export { Dialog, isDialogOverlayTarget };
|
package/dist/dialog.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{l as e}from"./primitive-
|
|
1
|
+
import{l as e}from"./primitive-trJDqIXJ.js";import{t}from"./dialog-DWZWd5Jt.js";export{t as Dialog,e as isDialogOverlayTarget};
|