@ngrok/mantle 0.79.3 → 0.80.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 +169 -12
- package/dist/accordion.js +1 -1
- package/dist/agent.json +1 -1
- package/dist/alert-dialog.d.ts +496 -30
- package/dist/alert-dialog.js +1 -1
- package/dist/alert.d.ts +129 -9
- package/dist/alert.js +1 -1
- package/dist/anchor-_2meGDfj.js +1 -0
- package/dist/anchor.d.ts +2 -2
- package/dist/anchor.js +1 -1
- package/dist/as-child-D23mGo4f.d.ts +49 -0
- package/dist/badge.d.ts +44 -5
- package/dist/badge.js +1 -1
- package/dist/breadcrumb.d.ts +214 -14
- package/dist/breadcrumb.js +1 -1
- package/dist/button-5WsvzIQ6.js +1 -0
- package/dist/{button-DcXOWUYo.d.ts → button-BPMwa2jN.d.ts} +3 -3
- package/dist/button-D9n09xUg.js +1 -0
- package/dist/button.d.ts +3 -3
- package/dist/button.js +1 -1
- package/dist/calendar.d.ts +0 -3
- package/dist/calendar.js +1 -1
- package/dist/card.d.ts +146 -9
- package/dist/card.js +1 -1
- package/dist/centered-layout.d.ts +224 -8
- package/dist/centered-layout.js +1 -1
- package/dist/checkbox-Cq17y0-R.js +1 -0
- package/dist/checkbox.d.ts +12 -10
- package/dist/checkbox.js +1 -1
- package/dist/choice-Cc8dA5r8.js +1 -0
- package/dist/choice-Ct0KK8jw.d.ts +269 -0
- package/dist/choice.d.ts +1 -252
- package/dist/choice.js +1 -1
- package/dist/code-block.d.ts +270 -50
- package/dist/code-block.js +6 -6
- package/dist/code.d.ts +3 -2
- package/dist/code.js +1 -1
- package/dist/combobox.d.ts +190 -11
- package/dist/combobox.js +1 -1
- package/dist/command.d.ts +285 -81
- package/dist/command.js +1 -1
- package/dist/compose-refs-BdBMM9ga.js +1 -0
- package/dist/data-table.d.ts +33 -5
- package/dist/data-table.js +1 -1
- package/dist/description-list.d.ts +79 -6
- package/dist/description-list.js +1 -1
- package/dist/dialog-CQ2C6vkE.js +1 -0
- package/dist/dialog.d.ts +239 -18
- package/dist/dialog.js +1 -1
- package/dist/dropdown-menu-CSCDdA3K.js +1 -0
- package/dist/{dropdown-menu-DP_Ne9Mr.d.ts → dropdown-menu-CoyozLzy.d.ts} +170 -29
- package/dist/dropdown-menu.d.ts +2 -2
- package/dist/dropdown-menu.js +1 -1
- package/dist/empty.d.ts +1 -1
- package/dist/empty.js +1 -1
- package/dist/field.d.ts +596 -45
- 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 +54 -4
- package/dist/hover-card.js +1 -1
- package/dist/{icon-Cevjo93X.d.ts → icon-BDqpcZ-n.d.ts} +1 -1
- package/dist/icon-CGgMKpJg.js +1 -0
- package/dist/{icon-button-BvQvT790.d.ts → icon-button-C1AfGnQx.d.ts} +6 -60
- package/dist/icon-button-DiOhreJD.js +1 -0
- package/dist/icon.d.ts +2 -2
- package/dist/icon.js +1 -1
- package/dist/icons.d.ts +5 -13
- package/dist/icons.js +1 -1
- package/dist/{in-view-nkSOdED2.d.ts → in-view-DDEGUKDR.d.ts} +17 -9
- package/dist/index-B8mIWKIU.d.ts +211 -0
- package/dist/{index-Rv8RL7xy.d.ts → index-BtwKJTLq.d.ts} +1 -1
- package/dist/{index-BSAizFod.d.ts → index-C2jj8U4a.d.ts} +5 -5
- package/dist/index-CdPXa9h1.d.ts +1 -0
- package/dist/{index-D47aqlpz.d.ts → index-DA4ig3gj.d.ts} +1 -1
- package/dist/input-CVyAVbim.js +1 -0
- package/dist/{types-C19IR7jf.d.ts → input-DV9M6K4v.d.ts} +42 -2
- package/dist/input.d.ts +4 -55
- 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/list.d.ts +150 -6
- package/dist/list.js +1 -1
- package/dist/llms.txt +1 -1
- package/dist/main.d.ts +20 -4
- package/dist/main.js +1 -1
- package/dist/media-object.d.ts +27 -4
- package/dist/media-object.js +1 -1
- package/dist/multi-select.d.ts +312 -15
- package/dist/multi-select.js +1 -1
- package/dist/otp-input.d.ts +129 -5
- package/dist/otp-input.js +1 -1
- package/dist/pagination.d.ts +70 -6
- package/dist/pagination.js +1 -1
- package/dist/popover-CBMADtjV.js +1 -0
- package/dist/popover.d.ts +1 -181
- package/dist/popover.js +1 -1
- package/dist/primitive-CJRIlrLz.d.ts +31 -0
- package/dist/primitive-DCPHJsRs.js +1 -0
- package/dist/progress.js +1 -1
- package/dist/qr-code.d.ts +113 -5
- package/dist/qr-code.js +1 -1
- package/dist/radio-group.d.ts +128 -23
- 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/select-SR_9-bxA.js +1 -0
- package/dist/select-idm1jy7y.d.ts +600 -0
- package/dist/select.d.ts +1 -1
- package/dist/select.js +1 -1
- package/dist/selectable-list.d.ts +252 -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 +295 -21
- 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/slot-CDk0Bb9z.js +1 -0
- package/dist/slot.d.ts +1 -1
- package/dist/slot.js +1 -1
- package/dist/{sort-BPX2Fk9t.js → sort-B_DDQcVD.js} +1 -1
- package/dist/split-button.d.ts +28 -13
- package/dist/split-button.js +1 -1
- package/dist/{svg-only-BFeFS1aa.d.ts → svg-only-CdI_v82i.d.ts} +1 -1
- package/dist/svg-only-d-nMCfAI.js +1 -0
- package/dist/switch.d.ts +9 -6
- package/dist/switch.js +1 -1
- package/dist/table-DUSvU_Jw.d.ts +875 -0
- package/dist/table-GDkapNFi.js +1 -0
- package/dist/table.d.ts +1 -1
- package/dist/table.js +1 -1
- package/dist/tabs.d.ts +135 -21
- package/dist/tabs.js +1 -1
- package/dist/text-area.d.ts +1 -1
- package/dist/text-area.js +1 -1
- package/dist/theme-provider-BftkIiZn.js +1 -0
- package/dist/theme-switcher.d.ts +110 -29
- package/dist/theme-switcher.js +1 -1
- package/dist/theme-wVnzzx2F.js +1 -0
- package/dist/theme.d.ts +53 -14
- package/dist/theme.js +1 -1
- package/dist/toast-DKgMRv4F.js +1 -0
- package/dist/toast.d.ts +98 -10
- package/dist/toast.js +1 -1
- package/dist/tooltip.d.ts +28 -1
- package/dist/tooltip.js +1 -1
- package/dist/{traffic-policy-file-0g5RXFqu.js → traffic-policy-file-CF1lbWtp.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/virtual-UrzmaSQm.js +1 -0
- package/dist/well.d.ts +3 -3
- package/dist/well.js +1 -1
- package/package.json +3 -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/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
|
@@ -1,11 +1,84 @@
|
|
|
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: {
|
|
25
|
+
({ asChild, className, children, ref, ...rest }: DescriptionListProps): import("react").JSX.Element;
|
|
26
|
+
displayName: string;
|
|
27
|
+
};
|
|
6
28
|
type DescriptionListItemProps = ComponentProps<"div"> & WithAsChild;
|
|
29
|
+
/**
|
|
30
|
+
* A wrapper that groups a `DescriptionList.Label` and `DescriptionList.Value`
|
|
31
|
+
* pair. Renders as a `<div>` inside the `<dl>` with a subgrid layout that
|
|
32
|
+
* inherits column tracks from the root.
|
|
33
|
+
*
|
|
34
|
+
* @see https://mantle.ngrok.com/components/data-display/description-list#descriptionlistitem
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```tsx
|
|
38
|
+
* <DescriptionList.Item>
|
|
39
|
+
* <DescriptionList.Label>ID</DescriptionList.Label>
|
|
40
|
+
* <DescriptionList.Value>aigk_2fKm9x8Hn3...</DescriptionList.Value>
|
|
41
|
+
* </DescriptionList.Item>
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
declare const Item: {
|
|
45
|
+
({ asChild, className, children, ref, ...rest }: DescriptionListItemProps): import("react").JSX.Element;
|
|
46
|
+
displayName: string;
|
|
47
|
+
};
|
|
7
48
|
type DescriptionListLabelProps = ComponentProps<"dt"> & WithAsChild;
|
|
49
|
+
/**
|
|
50
|
+
* The label for a description list item. Renders as a `<dt>` element.
|
|
51
|
+
*
|
|
52
|
+
* @see https://mantle.ngrok.com/components/data-display/description-list#descriptionlistlabel
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* ```tsx
|
|
56
|
+
* <DescriptionList.Label>Name</DescriptionList.Label>
|
|
57
|
+
* ```
|
|
58
|
+
*/
|
|
59
|
+
declare const Label: {
|
|
60
|
+
({ asChild, className, children, ref, ...rest }: DescriptionListLabelProps): import("react").JSX.Element;
|
|
61
|
+
displayName: string;
|
|
62
|
+
};
|
|
8
63
|
type DescriptionListValueProps = ComponentProps<"dd"> & WithAsChild;
|
|
64
|
+
/**
|
|
65
|
+
* The value for a description list item. Renders as a `<dd>` element.
|
|
66
|
+
* Compose any content inside — the component is intentionally "dumb" and
|
|
67
|
+
* imposes no layout on its children.
|
|
68
|
+
*
|
|
69
|
+
* @see https://mantle.ngrok.com/components/data-display/description-list#descriptionlistvalue
|
|
70
|
+
*
|
|
71
|
+
* @example
|
|
72
|
+
* ```tsx
|
|
73
|
+
* <DescriptionList.Value>
|
|
74
|
+
* aigk_2fKm9x8Hn3QpYT7zKlR0vW5
|
|
75
|
+
* </DescriptionList.Value>
|
|
76
|
+
* ```
|
|
77
|
+
*/
|
|
78
|
+
declare const Value: {
|
|
79
|
+
({ asChild, className, children, ref, ...rest }: DescriptionListValueProps): import("react").JSX.Element;
|
|
80
|
+
displayName: string;
|
|
81
|
+
};
|
|
9
82
|
/**
|
|
10
83
|
* A semantically correct description list built on the HTML `<dl>` element.
|
|
11
84
|
* Renders a list of label/value pairs with alternating row backgrounds,
|
|
@@ -59,7 +132,7 @@ declare const DescriptionList: {
|
|
|
59
132
|
* </DescriptionList.Root>
|
|
60
133
|
* ```
|
|
61
134
|
*/
|
|
62
|
-
readonly Root:
|
|
135
|
+
readonly Root: typeof Root;
|
|
63
136
|
/**
|
|
64
137
|
* A wrapper that groups a label/value pair. Renders a `<div>` with a default
|
|
65
138
|
* subgrid layout.
|
|
@@ -74,7 +147,7 @@ declare const DescriptionList: {
|
|
|
74
147
|
* </DescriptionList.Item>
|
|
75
148
|
* ```
|
|
76
149
|
*/
|
|
77
|
-
readonly Item:
|
|
150
|
+
readonly Item: typeof Item;
|
|
78
151
|
/**
|
|
79
152
|
* The label for a description list item. Renders a `<dt>` element.
|
|
80
153
|
*
|
|
@@ -85,7 +158,7 @@ declare const DescriptionList: {
|
|
|
85
158
|
* <DescriptionList.Label>Name</DescriptionList.Label>
|
|
86
159
|
* ```
|
|
87
160
|
*/
|
|
88
|
-
readonly Label:
|
|
161
|
+
readonly Label: typeof Label;
|
|
89
162
|
/**
|
|
90
163
|
* The value for a description list item. Renders a `<dd>` element.
|
|
91
164
|
*
|
|
@@ -98,7 +171,7 @@ declare const DescriptionList: {
|
|
|
98
171
|
* </DescriptionList.Value>
|
|
99
172
|
* ```
|
|
100
173
|
*/
|
|
101
|
-
readonly Value:
|
|
174
|
+
readonly Value: typeof Value;
|
|
102
175
|
};
|
|
103
176
|
//#endregion
|
|
104
177
|
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=({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});r.displayName=`DescriptionList`;const i=({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});i.displayName=`DescriptionListItem`;const a=({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});a.displayName=`DescriptionListLabel`;const o=({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});o.displayName=`DescriptionListValue`;const s={Root:r,Item:i,Label:a,Value:o};export{s as DescriptionList};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./cx-IiQEAKf5.js";import{t}from"./icon-button-DiOhreJD.js";import{a as n,c as r,i,n as a,o,r as s,s as c,t as l}from"./primitive-DCPHJsRs.js";import{jsx as u,jsxs as d}from"react/jsx-runtime";import{XIcon as f}from"@phosphor-icons/react/X";const p=o;p.displayName=`Dialog`;const m=e=>u(r,{"data-slot":`dialog-trigger`,...e});m.displayName=`DialogTrigger`;const h=n;h.displayName=`DialogPortal`;const g=e=>u(l,{"data-slot":`dialog-close`,...e});g.displayName=`DialogClose`;const _=({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});_.displayName=`DialogOverlay`;const v=({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})})]});v.displayName=`DialogContent`;const y=({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});y.displayName=`DialogHeader`;const b=({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})});b.displayName=`DialogCloseIconButton`;const x=({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});x.displayName=`DialogBody`;const S=({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});S.displayName=`DialogFooter`;const C=({className:t,ref:n,...r})=>u(c,{ref:n,"data-slot":`dialog-title`,className:e(`text-strong truncate text-lg font-medium`,t),...r});C.displayName=`DialogTitle`;const w=({className:t,ref:n,...r})=>u(s,{ref:n,"data-slot":`dialog-description`,className:e(`text-muted`,t),...r});w.displayName=`DialogDescription`;const T={Root:p,Body:x,Close:g,CloseIconButton:b,Content:v,Description:w,Footer:S,Header:y,Overlay:_,Portal:h,Title:C,Trigger:m};export{T as t};
|
package/dist/dialog.d.ts
CHANGED
|
@@ -1,8 +1,169 @@
|
|
|
1
1
|
import { t as ButtonIntent } from "./intents-DdSKSj1c.js";
|
|
2
|
-
import {
|
|
3
|
-
import { n as IconButtonAppearance, r as IconButtonProps } from "./icon-button-
|
|
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 "./primitive-CJRIlrLz.js";
|
|
3
|
+
import { n as IconButtonAppearance, r as IconButtonProps } from "./icon-button-C1AfGnQx.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: {
|
|
37
|
+
(props: ComponentProps<typeof Trigger$1>): import("react").JSX.Element;
|
|
38
|
+
displayName: string;
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* A button that closes the dialog when clicked. Wrap an interactive element
|
|
42
|
+
* with `asChild` to delegate the close behavior to your own button.
|
|
43
|
+
*
|
|
44
|
+
* @see https://mantle.ngrok.com/components/overlays/dialog#dialogclose
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* ```tsx
|
|
48
|
+
* <Dialog.Root>
|
|
49
|
+
* <Dialog.Trigger asChild>
|
|
50
|
+
* <Button type="button" appearance="filled" intent="neutral">Open Dialog</Button>
|
|
51
|
+
* </Dialog.Trigger>
|
|
52
|
+
* <Dialog.Content>
|
|
53
|
+
* <Dialog.Header>
|
|
54
|
+
* <Dialog.Title>Dialog Title</Dialog.Title>
|
|
55
|
+
* <Dialog.Description>This is an optional description.</Dialog.Description>
|
|
56
|
+
* <Dialog.CloseIconButton />
|
|
57
|
+
* </Dialog.Header>
|
|
58
|
+
* <Dialog.Body>
|
|
59
|
+
* <p>This is the dialog content.</p>
|
|
60
|
+
* </Dialog.Body>
|
|
61
|
+
* <Dialog.Footer>
|
|
62
|
+
* <Dialog.Close asChild>
|
|
63
|
+
* <Button type="button" appearance="outlined" intent="neutral">Cancel</Button>
|
|
64
|
+
* </Dialog.Close>
|
|
65
|
+
* <Button type="button" appearance="filled" intent="neutral">Save</Button>
|
|
66
|
+
* </Dialog.Footer>
|
|
67
|
+
* </Dialog.Content>
|
|
68
|
+
* </Dialog.Root>
|
|
69
|
+
* ```
|
|
70
|
+
*/
|
|
71
|
+
declare const Close: {
|
|
72
|
+
(props: ComponentProps<typeof Close$1>): import("react").JSX.Element;
|
|
73
|
+
displayName: string;
|
|
74
|
+
};
|
|
75
|
+
/**
|
|
76
|
+
* The backdrop overlay for the dialog. Sits between the page and the dialog
|
|
77
|
+
* content and applies a blur and dim effect.
|
|
78
|
+
*
|
|
79
|
+
* Most consumers should not need to use this directly — `Dialog.Content`
|
|
80
|
+
* renders an overlay automatically. Use this only when composing a custom
|
|
81
|
+
* `Dialog.Portal` tree.
|
|
82
|
+
*
|
|
83
|
+
* @see https://mantle.ngrok.com/components/overlays/dialog#api-reference
|
|
84
|
+
*
|
|
85
|
+
* @example
|
|
86
|
+
* ```tsx
|
|
87
|
+
* <Dialog.Root>
|
|
88
|
+
* <Dialog.Trigger asChild>
|
|
89
|
+
* <Button type="button" appearance="filled" intent="neutral">Open Dialog</Button>
|
|
90
|
+
* </Dialog.Trigger>
|
|
91
|
+
* <Dialog.Portal>
|
|
92
|
+
* <Dialog.Overlay />
|
|
93
|
+
* <Dialog.Content>
|
|
94
|
+
* <Dialog.Header>
|
|
95
|
+
* <Dialog.Title>Dialog Title</Dialog.Title>
|
|
96
|
+
* <Dialog.Description>This is an optional description.</Dialog.Description>
|
|
97
|
+
* <Dialog.CloseIconButton />
|
|
98
|
+
* </Dialog.Header>
|
|
99
|
+
* <Dialog.Body>
|
|
100
|
+
* <p>This is the dialog content.</p>
|
|
101
|
+
* </Dialog.Body>
|
|
102
|
+
* <Dialog.Footer>
|
|
103
|
+
* <Dialog.Close asChild>
|
|
104
|
+
* <Button type="button" appearance="outlined" intent="neutral">Cancel</Button>
|
|
105
|
+
* </Dialog.Close>
|
|
106
|
+
* <Button type="button" appearance="filled" intent="neutral">Save</Button>
|
|
107
|
+
* </Dialog.Footer>
|
|
108
|
+
* </Dialog.Content>
|
|
109
|
+
* </Dialog.Portal>
|
|
110
|
+
* </Dialog.Root>
|
|
111
|
+
* ```
|
|
112
|
+
*/
|
|
113
|
+
declare const Overlay: {
|
|
114
|
+
({ className, ref, ...props }: ComponentProps<typeof Overlay$1>): import("react").JSX.Element;
|
|
115
|
+
displayName: string;
|
|
116
|
+
};
|
|
117
|
+
type ContentProps = ComponentProps<typeof Content$1> & {
|
|
118
|
+
/**
|
|
119
|
+
* The preferred width of the `Dialog.Content` as a tailwind `max-w-` class.
|
|
120
|
+
*
|
|
121
|
+
* By default, a `Dialog`'s content width is responsive with a default
|
|
122
|
+
* preferred width: the maximum width of the `Dialog.Content`
|
|
123
|
+
*
|
|
124
|
+
* @default `max-w-lg`
|
|
125
|
+
*/
|
|
126
|
+
preferredWidth?: `max-w-${string}`;
|
|
127
|
+
};
|
|
128
|
+
/**
|
|
129
|
+
* The container for the dialog content.
|
|
130
|
+
* Renders on top of the overlay and is centered in the viewport.
|
|
131
|
+
*
|
|
132
|
+
* `Dialog.Content` renders its floating layer at Tailwind `z-50`, Mantle's
|
|
133
|
+
* shared floating z-index. When multiple shared layers are open, the most
|
|
134
|
+
* recently mounted layer renders on top.
|
|
135
|
+
*
|
|
136
|
+
* @see https://mantle.ngrok.com/components/overlays/dialog#dialogcontent
|
|
137
|
+
*
|
|
138
|
+
* @example
|
|
139
|
+
* ```tsx
|
|
140
|
+
* <Dialog.Root>
|
|
141
|
+
* <Dialog.Trigger asChild>
|
|
142
|
+
* <Button type="button" appearance="filled" intent="neutral">Open Dialog</Button>
|
|
143
|
+
* </Dialog.Trigger>
|
|
144
|
+
* <Dialog.Content>
|
|
145
|
+
* <Dialog.Header>
|
|
146
|
+
* <Dialog.Title>Dialog Title</Dialog.Title>
|
|
147
|
+
* <Dialog.Description>This is an optional description.</Dialog.Description>
|
|
148
|
+
* <Dialog.CloseIconButton />
|
|
149
|
+
* </Dialog.Header>
|
|
150
|
+
* <Dialog.Body>
|
|
151
|
+
* <p>This is the dialog content.</p>
|
|
152
|
+
* </Dialog.Body>
|
|
153
|
+
* <Dialog.Footer>
|
|
154
|
+
* <Dialog.Close asChild>
|
|
155
|
+
* <Button type="button" appearance="outlined" intent="neutral">Cancel</Button>
|
|
156
|
+
* </Dialog.Close>
|
|
157
|
+
* <Button type="button" appearance="filled" intent="neutral">Save</Button>
|
|
158
|
+
* </Dialog.Footer>
|
|
159
|
+
* </Dialog.Content>
|
|
160
|
+
* </Dialog.Root>
|
|
161
|
+
* ```
|
|
162
|
+
*/
|
|
163
|
+
declare const Content: {
|
|
164
|
+
({ children, className, preferredWidth, ref, ...props }: ContentProps): import("react").JSX.Element;
|
|
165
|
+
displayName: string;
|
|
166
|
+
};
|
|
6
167
|
/**
|
|
7
168
|
* Contains the header content of the dialog, including the title and close button.
|
|
8
169
|
*
|
|
@@ -157,6 +318,76 @@ declare const Footer: {
|
|
|
157
318
|
({ className, ...props }: ComponentProps<"div">): import("react").JSX.Element;
|
|
158
319
|
displayName: string;
|
|
159
320
|
};
|
|
321
|
+
/**
|
|
322
|
+
* An accessible name to be announced when the dialog is opened.
|
|
323
|
+
*
|
|
324
|
+
* @see https://mantle.ngrok.com/components/overlays/dialog#dialogtitle
|
|
325
|
+
*
|
|
326
|
+
* @example
|
|
327
|
+
* ```tsx
|
|
328
|
+
* <Dialog.Root>
|
|
329
|
+
* <Dialog.Trigger asChild>
|
|
330
|
+
* <Button type="button" appearance="filled" intent="neutral">Open Dialog</Button>
|
|
331
|
+
* </Dialog.Trigger>
|
|
332
|
+
* <Dialog.Content>
|
|
333
|
+
* <Dialog.Header>
|
|
334
|
+
* <Dialog.Title>Dialog Title</Dialog.Title>
|
|
335
|
+
* <Dialog.Description>This is an optional description.</Dialog.Description>
|
|
336
|
+
* <Dialog.CloseIconButton />
|
|
337
|
+
* </Dialog.Header>
|
|
338
|
+
* <Dialog.Body>
|
|
339
|
+
* <p>This is the dialog content.</p>
|
|
340
|
+
* </Dialog.Body>
|
|
341
|
+
* <Dialog.Footer>
|
|
342
|
+
* <Dialog.Close asChild>
|
|
343
|
+
* <Button type="button" appearance="outlined" intent="neutral">Cancel</Button>
|
|
344
|
+
* </Dialog.Close>
|
|
345
|
+
* <Button type="button" appearance="filled" intent="neutral">Save</Button>
|
|
346
|
+
* </Dialog.Footer>
|
|
347
|
+
* </Dialog.Content>
|
|
348
|
+
* </Dialog.Root>
|
|
349
|
+
* ```
|
|
350
|
+
*/
|
|
351
|
+
declare const Title: {
|
|
352
|
+
({ className, ref, ...props }: ComponentProps<typeof Title$1>): import("react").JSX.Element;
|
|
353
|
+
displayName: string;
|
|
354
|
+
};
|
|
355
|
+
/**
|
|
356
|
+
* An accessible description to be announced when the dialog is opened.
|
|
357
|
+
* Renders as a `div` by default, but can be changed to any other element using
|
|
358
|
+
* the `asChild` prop.
|
|
359
|
+
*
|
|
360
|
+
* @see https://mantle.ngrok.com/components/overlays/dialog#dialogdescription
|
|
361
|
+
*
|
|
362
|
+
* @example
|
|
363
|
+
* ```tsx
|
|
364
|
+
* <Dialog.Root>
|
|
365
|
+
* <Dialog.Trigger asChild>
|
|
366
|
+
* <Button type="button" appearance="filled" intent="neutral">Open Dialog</Button>
|
|
367
|
+
* </Dialog.Trigger>
|
|
368
|
+
* <Dialog.Content>
|
|
369
|
+
* <Dialog.Header>
|
|
370
|
+
* <Dialog.Title>Dialog Title</Dialog.Title>
|
|
371
|
+
* <Dialog.Description>This is an optional description.</Dialog.Description>
|
|
372
|
+
* <Dialog.CloseIconButton />
|
|
373
|
+
* </Dialog.Header>
|
|
374
|
+
* <Dialog.Body>
|
|
375
|
+
* <p>This is the dialog content.</p>
|
|
376
|
+
* </Dialog.Body>
|
|
377
|
+
* <Dialog.Footer>
|
|
378
|
+
* <Dialog.Close asChild>
|
|
379
|
+
* <Button type="button" appearance="outlined" intent="neutral">Cancel</Button>
|
|
380
|
+
* </Dialog.Close>
|
|
381
|
+
* <Button type="button" appearance="filled" intent="neutral">Save</Button>
|
|
382
|
+
* </Dialog.Footer>
|
|
383
|
+
* </Dialog.Content>
|
|
384
|
+
* </Dialog.Root>
|
|
385
|
+
* ```
|
|
386
|
+
*/
|
|
387
|
+
declare const Description: {
|
|
388
|
+
({ className, ref, ...props }: ComponentProps<typeof Description$1>): import("react").JSX.Element;
|
|
389
|
+
displayName: string;
|
|
390
|
+
};
|
|
160
391
|
/**
|
|
161
392
|
* A window overlaid on either the primary window or another dialog window. Use
|
|
162
393
|
* Dialog for a focused modal that interrupts the user to gather input or
|
|
@@ -309,7 +540,7 @@ declare const Dialog: {
|
|
|
309
540
|
* </Dialog.Root>
|
|
310
541
|
* ```
|
|
311
542
|
*/
|
|
312
|
-
readonly Close:
|
|
543
|
+
readonly Close: typeof Close;
|
|
313
544
|
/**
|
|
314
545
|
* An icon button that closes the dialog when clicked.
|
|
315
546
|
*
|
|
@@ -376,17 +607,7 @@ declare const Dialog: {
|
|
|
376
607
|
* </Dialog.Root>
|
|
377
608
|
* ```
|
|
378
609
|
*/
|
|
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>>;
|
|
610
|
+
readonly Content: typeof Content;
|
|
390
611
|
/**
|
|
391
612
|
* An accessible description to be announced when the dialog is opened.
|
|
392
613
|
*
|
|
@@ -417,7 +638,7 @@ declare const Dialog: {
|
|
|
417
638
|
* </Dialog.Root>
|
|
418
639
|
* ```
|
|
419
640
|
*/
|
|
420
|
-
readonly Description:
|
|
641
|
+
readonly Description: typeof Description;
|
|
421
642
|
/**
|
|
422
643
|
* Contains the footer content of the dialog, including action buttons.
|
|
423
644
|
*
|
|
@@ -513,7 +734,7 @@ declare const Dialog: {
|
|
|
513
734
|
* </Dialog.Root>
|
|
514
735
|
* ```
|
|
515
736
|
*/
|
|
516
|
-
readonly Overlay:
|
|
737
|
+
readonly Overlay: typeof Overlay;
|
|
517
738
|
/**
|
|
518
739
|
* The portal container for the dialog.
|
|
519
740
|
*
|
|
@@ -578,7 +799,7 @@ declare const Dialog: {
|
|
|
578
799
|
* </Dialog.Root>
|
|
579
800
|
* ```
|
|
580
801
|
*/
|
|
581
|
-
readonly Title:
|
|
802
|
+
readonly Title: typeof Title;
|
|
582
803
|
/**
|
|
583
804
|
* A button that opens the dialog.
|
|
584
805
|
*
|
|
@@ -609,7 +830,7 @@ declare const Dialog: {
|
|
|
609
830
|
* </Dialog.Root>
|
|
610
831
|
* ```
|
|
611
832
|
*/
|
|
612
|
-
readonly Trigger:
|
|
833
|
+
readonly Trigger: typeof Trigger;
|
|
613
834
|
};
|
|
614
835
|
//#endregion
|
|
615
836
|
export { Dialog, isDialogOverlayTarget };
|
package/dist/dialog.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{l as e}from"./primitive-
|
|
1
|
+
import{l as e}from"./primitive-DCPHJsRs.js";import{t}from"./dialog-CQ2C6vkE.js";export{t as Dialog,e as isDialogOverlayTarget};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./cx-IiQEAKf5.js";import{t}from"./icon-CGgMKpJg.js";import{n}from"./slot-CDk0Bb9z.js";import{n as r}from"./separator-bpE_kooz.js";import{jsx as i,jsxs as a}from"react/jsx-runtime";import{CaretRightIcon as o}from"@phosphor-icons/react/CaretRight";import{CheckIcon as s}from"@phosphor-icons/react/Check";import*as c from"@radix-ui/react-dropdown-menu";const l=c.Root;l.displayName=`DropdownMenu`;const u=e=>i(c.Trigger,{"data-slot":`dropdown-menu-trigger`,...e});u.displayName=`DropdownMenuTrigger`;const d=({className:t,...n})=>i(c.Group,{"data-slot":`dropdown-menu-group`,className:e(`space-y-px`,t),...n});d.displayName=`DropdownMenuGroup`;const f=c.Portal;f.displayName=`DropdownMenuPortal`;const p=c.Sub;p.displayName=`DropdownMenuSub`;const m=({className:t,...n})=>i(c.RadioGroup,{"data-slot":`dropdown-menu-radio-group`,className:e(`space-y-px`,t),...n});m.displayName=`DropdownMenuRadioGroup`;const h=({className:n,inset:r,children:s,...l})=>a(c.SubTrigger,{"data-slot":`dropdown-menu-sub-trigger`,className:e(`focus:bg-accent data-state-open:bg-accent relative flex select-none items-center rounded-md py-1.5 pl-2 pr-9 text-sm outline-hidden`,`data-highlighted:bg-active-menu-item data-state-open:bg-active-menu-item`,`[&>svg]:size-5 [&_svg]:shrink-0`,r&&`pl-8`,n),...l,children:[s,i(`span`,{className:`absolute right-2 flex items-center`,children:i(t,{svg:i(o,{weight:`bold`}),className:`size-4`})})]});h.displayName=`DropdownMenuSubTrigger`;const g=({className:t,loop:n=!0,...r})=>i(f,{children:i(c.SubContent,{"data-slot":`dropdown-menu-sub-content`,className:e(`scrollbar`,`text-popover-foreground border-popover bg-popover p-1.25 data-state-closed:animate-out data-state-closed:fade-out-0 data-state-closed:zoom-out-95 data-state-open:animate-in data-state-open:fade-in-0 data-state-open:zoom-in-95 data-side-bottom:slide-in-from-top-2 data-side-left:slide-in-from-right-2 data-side-right:slide-in-from-left-2 data-side-top:slide-in-from-bottom-2 z-50 min-w-32 overflow-hidden rounded-md border shadow-xl space-y-px font-sans`,`my-2 max-h-[calc(var(--radix-dropdown-menu-content-available-height)-16px)] overflow-auto`,t),loop:n,...r})});g.displayName=`DropdownMenuSubContent`;const _=({className:t,"data-slot":r,onClick:a,loop:o=!0,width:s,...l})=>i(f,{children:i(c.Content,{"data-slot":n(r,`dropdown-menu-content`),className:e(`scrollbar`,`text-popover-foreground border-popover bg-popover p-1.25 z-50 min-w-32 overflow-hidden rounded-md border shadow-xl outline-hidden space-y-px font-sans`,`data-side-bottom:slide-in-from-top-2 data-side-left:slide-in-from-right-2 data-side-right:slide-in-from-left-2 data-side-top:slide-in-from-bottom-2 data-state-closed:animate-out data-state-closed:fade-out-0 data-state-closed:zoom-out-95 data-state-open:animate-in data-state-open:fade-in-0 data-state-open:zoom-in-95`,`my-2 max-h-[calc(var(--radix-dropdown-menu-content-available-height)-16px)] overflow-auto`,s===`trigger`&&`w-(--radix-dropdown-menu-trigger-width)`,t),loop:o,onClick:e=>{e.stopPropagation(),a?.(e)},...l})});_.displayName=`DropdownMenuContent`;const v=({className:t,inset:n,...r})=>i(c.Item,{"data-slot":`dropdown-menu-item`,className:e(`relative flex cursor-pointer select-none items-center rounded-md px-2 py-1.5 text-strong text-sm font-normal outline-hidden transition-colors`,`data-highlighted:bg-active-menu-item`,`focus:bg-accent focus:text-accent-foreground`,`data-disabled:cursor-default data-disabled:opacity-50`,`[&>svg]:size-5 [&_svg]:shrink-0`,n&&`pl-8`,t),...r});v.displayName=`DropdownMenuItem`;const y=({className:n,children:r,checked:o,...l})=>a(c.CheckboxItem,{"data-slot":`dropdown-menu-checkbox-item`,className:e(`text-strong data-disabled:pointer-events-none data-disabled:opacity-50 relative flex cursor-pointer select-none items-center gap-2 rounded-md py-1.5 pl-2 pr-9 text-sm font-normal outline-hidden`,`data-highlighted:bg-active-menu-item`,`aria-checked:bg-selected-menu-item`,`data-highlighted:aria-checked:bg-active-selected-menu-item!`,`[&>svg]:size-5 [&_svg]:shrink-0`,n),checked:o,...l,children:[i(`span`,{className:`absolute right-2 flex items-center`,children:i(c.ItemIndicator,{children:i(t,{svg:i(s,{weight:`bold`}),className:`size-4 text-accent-600`})})}),r]});y.displayName=`DropdownMenuCheckboxItem`;const b=({className:n,children:r,...o})=>a(c.RadioItem,{"data-slot":`dropdown-menu-radio-item`,className:e(`group/dropdown-menu-radio-item`,`text-strong data-disabled:pointer-events-none data-disabled:opacity-50 relative flex cursor-pointer select-none items-center gap-2 rounded-md py-1.5 px-2 text-sm font-normal outline-none`,`data-highlighted:bg-active-menu-item`,`aria-checked:bg-selected-menu-item aria-checked:pr-9`,`data-highlighted:aria-checked:bg-active-selected-menu-item!`,`[&>svg]:size-5 [&_svg]:shrink-0`,n),...o,children:[i(`span`,{className:`absolute right-2 items-center hidden group-aria-checked/dropdown-menu-radio-item:flex`,children:i(c.ItemIndicator,{children:i(t,{svg:i(s,{weight:`bold`}),className:`size-4 text-accent-600`})})}),r]});b.displayName=`DropdownMenuRadioItem`;const x=({className:t,inset:n,...r})=>i(c.Label,{"data-slot":`dropdown-menu-label`,className:e(`px-2 py-1.5 text-sm font-medium`,n&&`pl-8`,t),...r});x.displayName=`DropdownMenuLabel`;const S=({className:t,...n})=>i(r,{"data-slot":`dropdown-menu-separator`,className:e(`-mx-1.25 my-1 w-auto`,t),...n});S.displayName=`DropdownMenuSeparator`;const C=({className:t,...n})=>i(`span`,{"data-slot":`dropdown-menu-shortcut`,className:e(`ml-auto text-xs tracking-widest opacity-60`,t),...n});C.displayName=`DropdownMenuShortcut`;const w={Root:l,CheckboxItem:y,Content:_,Group:d,Item:v,Label:x,RadioGroup:m,RadioItem:b,Separator:S,Shortcut:C,Sub:p,SubContent:g,SubTrigger:h,Trigger:u};export{w as t};
|