@ngrok/mantle 0.76.11 → 0.78.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 +63 -21
- package/dist/accordion.js +1 -1
- package/dist/agent.json +7 -1
- package/dist/alert-dialog.d.ts +19 -26
- package/dist/alert-dialog.js +1 -1
- package/dist/alert.d.ts +16 -24
- package/dist/alert.js +1 -1
- package/dist/{anchor-BtgEJoPN.js → anchor-C_tjSVy6.js} +1 -1
- package/dist/anchor.d.ts +3 -4
- package/dist/anchor.js +1 -1
- package/dist/{as-child-uN_018tj.d.ts → as-child-CYEVu1WY.d.ts} +0 -7
- package/dist/badge.d.ts +5 -56
- package/dist/badge.js +1 -1
- package/dist/breadcrumb.d.ts +212 -0
- package/dist/breadcrumb.js +1 -0
- package/dist/browser-only-CPH56Xw_.js +1 -0
- package/dist/browser-only.d.ts +2 -6
- package/dist/browser-only.js +1 -1
- package/dist/{button-CERx95KE.js → button-5t6-JS_I.js} +1 -1
- package/dist/button-AS5Ir3DE.js +1 -0
- package/dist/{button-mfYak6Rx.d.ts → button-Bw9MpShl.d.ts} +26 -8
- package/dist/button.d.ts +5 -4
- package/dist/button.js +1 -1
- package/dist/calendar.d.ts +2 -8
- package/dist/calendar.js +1 -1
- package/dist/card.d.ts +8 -8
- package/dist/card.js +1 -1
- package/dist/centered-layout.d.ts +147 -0
- package/dist/centered-layout.js +1 -0
- package/dist/checkbox-DJ2xl7Rc.js +1 -0
- package/dist/checkbox.d.ts +11 -9
- package/dist/checkbox.js +1 -1
- package/dist/choice-DOdyNzFC.js +1 -0
- package/dist/choice.d.ts +253 -0
- package/dist/choice.js +1 -0
- package/dist/code-block.d.ts +5 -17
- package/dist/code-block.js +1 -1
- package/dist/code-block_highlight-utils.d.ts +1 -1
- package/dist/code-block_highlight-utils.js +1 -1
- package/dist/code.d.ts +4 -5
- package/dist/code.js +1 -1
- package/dist/combobox.d.ts +40 -19
- package/dist/combobox.js +1 -1
- package/dist/command.d.ts +60 -38
- package/dist/command.js +1 -1
- package/dist/{copy-to-clipboard-Baw30q9O.js → copy-to-clipboard-BsCQ9m6K.js} +1 -1
- package/dist/cx-IiQEAKf5.js +1 -0
- package/dist/cx.js +1 -1
- package/dist/data-slot-CChfb_cv.d.ts +17 -0
- package/dist/data-table.d.ts +45 -131
- package/dist/data-table.js +1 -1
- package/dist/description-list.d.ts +7 -7
- package/dist/description-list.js +1 -1
- package/dist/{dialog-Cp0S2jsG.js → dialog-DVDFVT_-.js} +1 -1
- package/dist/dialog.d.ts +155 -48
- package/dist/dialog.js +1 -1
- package/dist/{direction-CcTY0FmA.d.ts → direction-BjU0bPST.d.ts} +1 -1
- package/dist/{dropdown-menu-OEuW4GLp.js → dropdown-menu-ByUQkAvJ.js} +1 -1
- package/dist/{dropdown-menu-CADgs9gz.d.ts → dropdown-menu-DT30TQzL.d.ts} +21 -24
- package/dist/dropdown-menu.d.ts +2 -1
- package/dist/dropdown-menu.js +1 -1
- package/dist/empty.d.ts +133 -53
- package/dist/empty.js +1 -1
- package/dist/{field-context-4k1kI7Bo.js → field-context-BR01g789.js} +1 -1
- package/dist/field.d.ts +24 -36
- package/dist/field.js +1 -1
- package/dist/flag.d.ts +2 -9
- package/dist/flag.js +1 -1
- package/dist/hooks.d.ts +139 -81
- package/dist/hooks.js +1 -1
- package/dist/hover-card.d.ts +34 -14
- package/dist/hover-card.js +1 -1
- package/dist/icon-CDtYjF_H.js +1 -0
- package/dist/{icon-n49kOh4_.d.ts → icon-Cevjo93X.d.ts} +2 -3
- package/dist/{icon-button-DiX9iZ9n.js → icon-button-CxVsZ2N1.js} +1 -1
- package/dist/{icon-button-D7hs6bX2.d.ts → icon-button-DuRSCsPh.d.ts} +5 -6
- package/dist/icon.d.ts +3 -3
- package/dist/icon.js +1 -1
- package/dist/icons.d.ts +7 -19
- package/dist/icons.js +1 -1
- package/dist/{in-view-BC3wmz-a.d.ts → in-view-nkSOdED2.d.ts} +21 -10
- package/dist/index-BnI3OppC.d.ts +1 -0
- package/dist/{index-CTU6apE6.d.ts → index-CDwfBOAA.d.ts} +5 -4
- package/dist/{index-Bed_XLWa.d.ts → index-D47aqlpz.d.ts} +3 -2
- package/dist/index-Rv8RL7xy.d.ts +25 -0
- package/dist/input-Ct1YOqSy.js +1 -0
- package/dist/input.d.ts +10 -56
- package/dist/input.js +1 -1
- package/dist/{kbd-D6k4Dnrf.js → kbd-K8iaZ-Ti.js} +1 -1
- package/dist/kbd.d.ts +3 -8
- package/dist/kbd.js +1 -1
- package/dist/{label-BLXfnQmn.js → label-BMlHW_2D.js} +1 -1
- package/dist/label-v2-bv98k.d.ts +69 -0
- package/dist/label.d.ts +1 -68
- package/dist/label.js +1 -1
- package/dist/list.d.ts +295 -0
- package/dist/list.js +1 -0
- package/dist/llms.txt +7 -1
- package/dist/main.d.ts +4 -27
- package/dist/main.js +1 -1
- package/dist/mantle.css +6 -6
- package/dist/media-object.d.ts +6 -7
- package/dist/media-object.js +1 -1
- package/dist/multi-select.d.ts +80 -33
- package/dist/multi-select.js +1 -1
- package/dist/otp-input.d.ts +7 -8
- package/dist/otp-input.js +1 -1
- package/dist/pagination.d.ts +11 -22
- package/dist/pagination.js +1 -1
- package/dist/{popover-Bq52EC7X.js → popover-D5WxxnBY.js} +1 -1
- package/dist/popover.d.ts +6 -7
- package/dist/popover.js +1 -1
- package/dist/{primitive-FoWela9a.d.ts → primitive-C64-m48O.d.ts} +0 -1
- package/dist/{primitive-BFUir4UB.js → primitive-wm7Wk-gy.js} +1 -1
- package/dist/progress.d.ts +55 -46
- package/dist/progress.js +1 -1
- package/dist/qr-code.d.ts +10 -9
- package/dist/qr-code.js +1 -1
- package/dist/radio-group.d.ts +71 -60
- package/dist/radio-group.js +1 -1
- package/dist/{resolve-pre-rendered-props-DxJ9-DAl.d.ts → resolve-pre-rendered-props-B6OlZrSI.d.ts} +13 -26
- package/dist/{resolve-pre-rendered-props-DwIF_M_K.js → resolve-pre-rendered-props-C3e5Auo3.js} +1 -1
- package/dist/sandboxed-on-click.d.ts +4 -8
- package/dist/sandboxed-on-click.js +1 -1
- package/dist/{select-BUGOJMER.d.ts → select-Bwt2YduR.d.ts} +11 -12
- package/dist/{select-xfyY5Vt1.js → select-D-5u0Blc.js} +1 -1
- package/dist/select.d.ts +1 -1
- package/dist/select.js +1 -1
- package/dist/selectable-list.d.ts +725 -0
- package/dist/selectable-list.js +1 -0
- package/dist/{separator-CqohKk4z.js → separator-kBnnv3Cw.js} +1 -1
- package/dist/separator.d.ts +6 -37
- package/dist/separator.js +1 -1
- package/dist/sheet.d.ts +231 -47
- package/dist/sheet.js +1 -1
- package/dist/sizes-Dje_rwKc.d.ts +29 -0
- package/dist/skeleton-Bu3tgNcW.js +1 -0
- package/dist/skeleton.d.ts +2 -2
- package/dist/skeleton.js +1 -1
- package/dist/skip-to-main-link.d.ts +4 -34
- package/dist/skip-to-main-link.js +1 -1
- package/dist/slider.d.ts +2 -21
- package/dist/slider.js +1 -1
- package/dist/slot-DmPrjM7N.js +1 -0
- package/dist/slot.d.ts +1 -1
- package/dist/slot.js +1 -1
- package/dist/split-button.d.ts +20 -12
- package/dist/split-button.js +1 -1
- package/dist/{svg-only-f6ToFLH0.d.ts → svg-only-BFeFS1aa.d.ts} +2 -3
- package/dist/{svg-only-CSOaF1tL.js → svg-only-DDx6FtJd.js} +1 -1
- package/dist/switch.d.ts +6 -3
- package/dist/switch.js +1 -1
- package/dist/{table-CAitdL78.js → table-CPH2md2-.js} +1 -1
- package/dist/{table-BWD9IlIN.d.ts → table-CwFHXC-G.d.ts} +10 -10
- package/dist/table.d.ts +1 -1
- package/dist/table.js +1 -1
- package/dist/tabs.d.ts +29 -15
- package/dist/tabs.js +1 -1
- package/dist/text-area.d.ts +2 -3
- package/dist/text-area.js +1 -1
- package/dist/theme-D8kZCOzM.js +1 -0
- package/dist/theme-provider-Djj_jBo6.js +1 -0
- package/dist/theme-switcher.d.ts +45 -0
- package/dist/theme-switcher.js +1 -0
- package/dist/theme.d.ts +15 -101
- package/dist/theme.js +1 -1
- package/dist/{toast-Bwno5LUs.js → toast-RkhbliFh.js} +1 -1
- package/dist/toast.d.ts +13 -37
- package/dist/toast.js +1 -1
- package/dist/tooltip.d.ts +10 -44
- package/dist/tooltip.js +1 -1
- package/dist/types-C19IR7jf.d.ts +48 -0
- package/dist/{types-BvUzforF.d.ts → types-D1RY5Tcj.d.ts} +0 -1
- package/dist/types.d.ts +3 -3
- package/dist/use-copy-to-clipboard-DqQ0_N3E.js +1 -0
- package/dist/use-prefers-reduced-motion-CagaNRgm.js +1 -0
- package/dist/utils.d.ts +2 -3
- package/dist/utils.js +1 -1
- package/dist/{validation-xyX_6kph.d.ts → validation-7QeiTFwl.d.ts} +3 -12
- package/dist/{validation-DCyx-ceH.js → validation-Bpptk_9t.js} +1 -1
- package/dist/virtual-DZMBu7Ch.js +1 -0
- package/dist/well.d.ts +3 -3
- package/dist/well.js +1 -1
- package/dist/{with-style-props-CyImx7vd.d.ts → with-style-props-Dq5Vntqy.d.ts} +0 -1
- package/package.json +79 -344
- package/dist/browser-only-BSl_hruR.js +0 -1
- package/dist/button-C9GW9nAr.js +0 -1
- package/dist/cx-C1UYP5We.js +0 -1
- package/dist/icon-SUx16Sl3.js +0 -1
- package/dist/index-CJbKEKr2.d.ts +0 -20
- package/dist/slot-DT_E5BQx.js +0 -1
- package/dist/theme-provider-BNFS3Acf.js +0 -1
- package/dist/use-copy-to-clipboard-BLpquU9d.js +0 -1
- package/dist/use-prefers-reduced-motion-CWIoFA6W.js +0 -1
package/dist/empty.d.ts
CHANGED
|
@@ -1,19 +1,138 @@
|
|
|
1
|
-
import { t as WithAsChild } from "./as-child-
|
|
2
|
-
import { t as SvgAttributes } from "./types-
|
|
1
|
+
import { t as WithAsChild } from "./as-child-CYEVu1WY.js";
|
|
2
|
+
import { t as SvgAttributes } from "./types-D1RY5Tcj.js";
|
|
3
3
|
import { ComponentProps, HTMLAttributes, ReactNode } from "react";
|
|
4
|
-
|
|
5
4
|
//#region src/components/empty/empty.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* The root container for an empty state. Centers content horizontally
|
|
7
|
+
* with consistent vertical padding and max-width.
|
|
8
|
+
*
|
|
9
|
+
* @see https://mantle.ngrok.com/components/feedback/empty
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```tsx
|
|
13
|
+
* <Empty.Root>
|
|
14
|
+
* <Empty.Icon svg={<GhostIcon />} />
|
|
15
|
+
* <Empty.Title>No results found</Empty.Title>
|
|
16
|
+
* <Empty.Description>Try adjusting your search or filters.</Empty.Description>
|
|
17
|
+
* <Empty.Actions>
|
|
18
|
+
* <Button>Clear filters</Button>
|
|
19
|
+
* </Empty.Actions>
|
|
20
|
+
* </Empty.Root>
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
declare const Root: {
|
|
24
|
+
({ asChild, children, className, ...props }: ComponentProps<"div"> & WithAsChild): import("react").JSX.Element;
|
|
25
|
+
displayName: string;
|
|
26
|
+
};
|
|
6
27
|
type EmptyIconProps = Omit<SvgAttributes, "children"> & {
|
|
7
28
|
/**
|
|
8
29
|
* A single SVG icon element.
|
|
9
30
|
*/
|
|
10
31
|
svg: ReactNode;
|
|
11
32
|
};
|
|
33
|
+
/**
|
|
34
|
+
* Renders a large icon for the empty state. Pass a single SVG icon element
|
|
35
|
+
* via the `svg` prop (e.g. from `@phosphor-icons/react`).
|
|
36
|
+
*
|
|
37
|
+
* @see https://mantle.ngrok.com/components/feedback/empty
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* ```tsx
|
|
41
|
+
* <Empty.Root>
|
|
42
|
+
* <Empty.Icon svg={<GhostIcon />} />
|
|
43
|
+
* <Empty.Title>No endpoints yet</Empty.Title>
|
|
44
|
+
* <Empty.Description>Create your first endpoint to get started.</Empty.Description>
|
|
45
|
+
* <Empty.Actions>
|
|
46
|
+
* <Button>Create endpoint</Button>
|
|
47
|
+
* </Empty.Actions>
|
|
48
|
+
* </Empty.Root>
|
|
49
|
+
* ```
|
|
50
|
+
*/
|
|
51
|
+
declare const Icon: {
|
|
52
|
+
({ className, svg, ...props }: EmptyIconProps): import("react").JSX.Element;
|
|
53
|
+
displayName: string;
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* The heading text for the empty state. Renders as an `h3` by default. Use the
|
|
57
|
+
* `asChild` prop to render as a different heading level (e.g. `h1`, `h2`).
|
|
58
|
+
*
|
|
59
|
+
* @see https://mantle.ngrok.com/components/feedback/empty
|
|
60
|
+
*
|
|
61
|
+
* @example
|
|
62
|
+
* ```tsx
|
|
63
|
+
* <Empty.Root>
|
|
64
|
+
* <Empty.Icon svg={<GhostIcon />} />
|
|
65
|
+
* <Empty.Title>No endpoints yet</Empty.Title>
|
|
66
|
+
* <Empty.Description>Create your first endpoint to get started.</Empty.Description>
|
|
67
|
+
* <Empty.Actions>
|
|
68
|
+
* <Button>Create endpoint</Button>
|
|
69
|
+
* </Empty.Actions>
|
|
70
|
+
* </Empty.Root>
|
|
71
|
+
*
|
|
72
|
+
* <Empty.Title asChild>
|
|
73
|
+
* <h2>No results found</h2>
|
|
74
|
+
* </Empty.Title>
|
|
75
|
+
* ```
|
|
76
|
+
*/
|
|
77
|
+
declare const Title: {
|
|
78
|
+
({ asChild, children, className, ...props }: HTMLAttributes<HTMLHeadingElement> & WithAsChild): import("react").JSX.Element;
|
|
79
|
+
displayName: string;
|
|
80
|
+
};
|
|
81
|
+
/**
|
|
82
|
+
* Supporting descriptive text below the title. Renders as a `div` with
|
|
83
|
+
* `space-y-4` so multiple paragraphs can be placed inside. Use the `asChild`
|
|
84
|
+
* prop to render as a different element.
|
|
85
|
+
*
|
|
86
|
+
* @see https://mantle.ngrok.com/components/feedback/empty
|
|
87
|
+
*
|
|
88
|
+
* @example
|
|
89
|
+
* ```tsx
|
|
90
|
+
* <Empty.Root>
|
|
91
|
+
* <Empty.Icon svg={<GhostIcon />} />
|
|
92
|
+
* <Empty.Title>No endpoints yet</Empty.Title>
|
|
93
|
+
* <Empty.Description>Create your first endpoint to get started.</Empty.Description>
|
|
94
|
+
* <Empty.Actions>
|
|
95
|
+
* <Button>Create endpoint</Button>
|
|
96
|
+
* </Empty.Actions>
|
|
97
|
+
* </Empty.Root>
|
|
98
|
+
*
|
|
99
|
+
* <Empty.Description>
|
|
100
|
+
* <p>Something went wrong.</p>
|
|
101
|
+
* <p>Please try again in a few minutes.</p>
|
|
102
|
+
* </Empty.Description>
|
|
103
|
+
* ```
|
|
104
|
+
*/
|
|
105
|
+
declare const Description: {
|
|
106
|
+
({ asChild, children, className, ...props }: ComponentProps<"div"> & WithAsChild): import("react").JSX.Element;
|
|
107
|
+
displayName: string;
|
|
108
|
+
};
|
|
109
|
+
/**
|
|
110
|
+
* A container for action buttons or links in the empty state.
|
|
111
|
+
*
|
|
112
|
+
* @see https://mantle.ngrok.com/components/feedback/empty
|
|
113
|
+
*
|
|
114
|
+
* @example
|
|
115
|
+
* ```tsx
|
|
116
|
+
* <Empty.Root>
|
|
117
|
+
* <Empty.Icon svg={<GhostIcon />} />
|
|
118
|
+
* <Empty.Title>No endpoints yet</Empty.Title>
|
|
119
|
+
* <Empty.Description>Create your first endpoint to get started.</Empty.Description>
|
|
120
|
+
* <Empty.Actions>
|
|
121
|
+
* <Button>Create endpoint</Button>
|
|
122
|
+
* <Button appearance="outlined">Go back</Button>
|
|
123
|
+
* </Empty.Actions>
|
|
124
|
+
* </Empty.Root>
|
|
125
|
+
* ```
|
|
126
|
+
*/
|
|
127
|
+
declare const Actions: {
|
|
128
|
+
({ asChild, children, className, ...props }: ComponentProps<"div"> & WithAsChild): import("react").JSX.Element;
|
|
129
|
+
displayName: string;
|
|
130
|
+
};
|
|
12
131
|
/**
|
|
13
132
|
* Compound component for rendering empty states. Use with `Empty.Root`,
|
|
14
133
|
* `Empty.Icon`, `Empty.Title`, `Empty.Description`, and `Empty.Actions`.
|
|
15
134
|
*
|
|
16
|
-
* @see https://mantle.ngrok.com/components/empty
|
|
135
|
+
* @see https://mantle.ngrok.com/components/feedback/empty
|
|
17
136
|
*
|
|
18
137
|
* @example
|
|
19
138
|
* Composition:
|
|
@@ -44,7 +163,7 @@ declare const Empty: {
|
|
|
44
163
|
* The root container for an empty state. Centers content vertically and
|
|
45
164
|
* horizontally with consistent padding and max-width.
|
|
46
165
|
*
|
|
47
|
-
* @see https://mantle.ngrok.com/components/empty
|
|
166
|
+
* @see https://mantle.ngrok.com/components/feedback/empty
|
|
48
167
|
*
|
|
49
168
|
* @example
|
|
50
169
|
* ```tsx
|
|
@@ -58,20 +177,12 @@ declare const Empty: {
|
|
|
58
177
|
* </Empty.Root>
|
|
59
178
|
* ```
|
|
60
179
|
*/
|
|
61
|
-
readonly Root:
|
|
62
|
-
({
|
|
63
|
-
asChild,
|
|
64
|
-
children,
|
|
65
|
-
className,
|
|
66
|
-
...props
|
|
67
|
-
}: ComponentProps<"div"> & WithAsChild): import("react").JSX.Element;
|
|
68
|
-
displayName: string;
|
|
69
|
-
};
|
|
180
|
+
readonly Root: typeof Root;
|
|
70
181
|
/**
|
|
71
182
|
* Renders a large icon for the empty state. Pass a single SVG icon element
|
|
72
183
|
* via the `svg` prop.
|
|
73
184
|
*
|
|
74
|
-
* @see https://mantle.ngrok.com/components/empty
|
|
185
|
+
* @see https://mantle.ngrok.com/components/feedback/empty
|
|
75
186
|
*
|
|
76
187
|
* @example
|
|
77
188
|
* ```tsx
|
|
@@ -85,19 +196,12 @@ declare const Empty: {
|
|
|
85
196
|
* </Empty.Root>
|
|
86
197
|
* ```
|
|
87
198
|
*/
|
|
88
|
-
readonly Icon:
|
|
89
|
-
({
|
|
90
|
-
className,
|
|
91
|
-
svg,
|
|
92
|
-
...props
|
|
93
|
-
}: EmptyIconProps): import("react").JSX.Element;
|
|
94
|
-
displayName: string;
|
|
95
|
-
};
|
|
199
|
+
readonly Icon: typeof Icon;
|
|
96
200
|
/**
|
|
97
201
|
* The heading text for the empty state. Renders as an `h3` by default.
|
|
98
202
|
* Use `asChild` to render as a different heading level.
|
|
99
203
|
*
|
|
100
|
-
* @see https://mantle.ngrok.com/components/empty
|
|
204
|
+
* @see https://mantle.ngrok.com/components/feedback/empty
|
|
101
205
|
*
|
|
102
206
|
* @example
|
|
103
207
|
* ```tsx
|
|
@@ -115,21 +219,13 @@ declare const Empty: {
|
|
|
115
219
|
* </Empty.Title>
|
|
116
220
|
* ```
|
|
117
221
|
*/
|
|
118
|
-
readonly Title:
|
|
119
|
-
({
|
|
120
|
-
asChild,
|
|
121
|
-
children,
|
|
122
|
-
className,
|
|
123
|
-
...props
|
|
124
|
-
}: HTMLAttributes<HTMLHeadingElement> & WithAsChild): import("react").JSX.Element;
|
|
125
|
-
displayName: string;
|
|
126
|
-
};
|
|
222
|
+
readonly Title: typeof Title;
|
|
127
223
|
/**
|
|
128
224
|
* Supporting descriptive text below the title. Renders as a `div` with
|
|
129
225
|
* `space-y-4` for multiple paragraphs. Use `asChild` to render as a
|
|
130
226
|
* different element.
|
|
131
227
|
*
|
|
132
|
-
* @see https://mantle.ngrok.com/components/empty
|
|
228
|
+
* @see https://mantle.ngrok.com/components/feedback/empty
|
|
133
229
|
*
|
|
134
230
|
* @example
|
|
135
231
|
* ```tsx
|
|
@@ -143,19 +239,11 @@ declare const Empty: {
|
|
|
143
239
|
* </Empty.Root>
|
|
144
240
|
* ```
|
|
145
241
|
*/
|
|
146
|
-
readonly Description:
|
|
147
|
-
({
|
|
148
|
-
asChild,
|
|
149
|
-
children,
|
|
150
|
-
className,
|
|
151
|
-
...props
|
|
152
|
-
}: ComponentProps<"div"> & WithAsChild): import("react").JSX.Element;
|
|
153
|
-
displayName: string;
|
|
154
|
-
};
|
|
242
|
+
readonly Description: typeof Description;
|
|
155
243
|
/**
|
|
156
244
|
* A container for action buttons or links in the empty state.
|
|
157
245
|
*
|
|
158
|
-
* @see https://mantle.ngrok.com/components/empty
|
|
246
|
+
* @see https://mantle.ngrok.com/components/feedback/empty
|
|
159
247
|
*
|
|
160
248
|
* @example
|
|
161
249
|
* ```tsx
|
|
@@ -169,15 +257,7 @@ declare const Empty: {
|
|
|
169
257
|
* </Empty.Root>
|
|
170
258
|
* ```
|
|
171
259
|
*/
|
|
172
|
-
readonly Actions:
|
|
173
|
-
({
|
|
174
|
-
asChild,
|
|
175
|
-
children,
|
|
176
|
-
className,
|
|
177
|
-
...props
|
|
178
|
-
}: ComponentProps<"div"> & WithAsChild): import("react").JSX.Element;
|
|
179
|
-
displayName: string;
|
|
180
|
-
};
|
|
260
|
+
readonly Actions: typeof Actions;
|
|
181
261
|
};
|
|
182
262
|
//#endregion
|
|
183
263
|
export { Empty };
|
package/dist/empty.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./cx-
|
|
1
|
+
import{t as e}from"./cx-IiQEAKf5.js";import{t}from"./svg-only-DDx6FtJd.js";import{t as n}from"./slot-DmPrjM7N.js";import{jsx as r}from"react/jsx-runtime";const i=({asChild:t,children:i,className:a,...o})=>r(t?n:`div`,{"data-slot":`empty`,className:e(`mx-auto flex max-w-lg flex-col items-center p-6 text-center`,a),...o,children:i});i.displayName=`Empty`;const a=({className:n,svg:i,...a})=>r(t,{"data-slot":`empty-icon`,className:e(`mb-1 size-10 text-neutral-400`,n),svg:i,...a});a.displayName=`EmptyIcon`;const o=({asChild:t,children:i,className:a,...o})=>r(t?n:`h3`,{"data-slot":`empty-title`,className:e(`text-strong text-sm font-medium font-sans`,a),...o,children:i});o.displayName=`EmptyTitle`;const s=({asChild:t,children:i,className:a,...o})=>r(t?n:`div`,{"data-slot":`empty-description`,className:e(`text-muted space-y-4 text-sm font-sans`,a),...o,children:i});s.displayName=`EmptyDescription`;const c=({asChild:t,children:i,className:a,...o})=>r(t?n:`div`,{"data-slot":`empty-actions`,className:e(`mt-4 flex items-center gap-2`,a),...o,children:i});c.displayName=`EmptyActions`;const l={Root:i,Icon:a,Title:o,Description:s,Actions:c};export{l as Empty};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./validation-
|
|
1
|
+
import{r as e}from"./validation-Bpptk_9t.js";import{createContext as t}from"react";const n=t(null),r=t(null),i=({context:t})=>{if(!t)return{ariaProps:{},validation:void 0};let n=e({defaultAriaInvalid:!1,validation:t.validation});return{ariaProps:{"aria-describedby":`${t.descriptionId} ${t.errorId}`,"aria-errormessage":n.isInvalid?t.errorId:void 0,"aria-invalid":n.ariaInvalid,id:t.controlId,name:t.name},validation:n.validation}};export{n,i as r,r as t};
|
package/dist/field.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { t as WithAsChild } from "./as-child-
|
|
2
|
-
import { n as IconButtonProps } from "./icon-button-
|
|
3
|
-
import { a as ValidationState, c as parseValidation, i as ValidationProp, l as resolveValidation, n as ParsedValidation, o as WithValidation, r as Validation, s as isAriaInvalid, t as AriaInvalid } from "./validation-
|
|
4
|
-
import { t as Slot } from "./index-
|
|
1
|
+
import { t as WithAsChild } from "./as-child-CYEVu1WY.js";
|
|
2
|
+
import { n as IconButtonProps } from "./icon-button-DuRSCsPh.js";
|
|
3
|
+
import { a as ValidationState, c as parseValidation, i as ValidationProp, l as resolveValidation, n as ParsedValidation, o as WithValidation, r as Validation, s as isAriaInvalid, t as AriaInvalid } from "./validation-7QeiTFwl.js";
|
|
4
|
+
import { t as Slot } from "./index-Rv8RL7xy.js";
|
|
5
5
|
import { ComponentProps, ReactElement, ReactNode } from "react";
|
|
6
|
-
|
|
7
6
|
//#region src/components/field/field-context.d.ts
|
|
8
7
|
/**
|
|
9
8
|
* ARIA and identity props that `Field.Control` applies to the field's
|
|
@@ -33,14 +32,6 @@ type FieldControlAriaProps = {
|
|
|
33
32
|
*/
|
|
34
33
|
name?: string;
|
|
35
34
|
};
|
|
36
|
-
/**
|
|
37
|
-
* Context value owned by `Field.Item` and consumed by message/control parts.
|
|
38
|
-
*
|
|
39
|
-
* `Field.Item` owns the two stable slot IDs (one for the description, one for
|
|
40
|
-
* the error list) so consumers don't manage ARIA wiring themselves. The IDs
|
|
41
|
-
* are emitted unconditionally; ARIA treats unresolved IDREFs as no-ops, so
|
|
42
|
-
* dangling IDs (when no description or error list is rendered) are harmless.
|
|
43
|
-
*/
|
|
44
35
|
//#endregion
|
|
45
36
|
//#region src/components/field/error-helpers.d.ts
|
|
46
37
|
/**
|
|
@@ -49,9 +40,6 @@ type FieldControlAriaProps = {
|
|
|
49
40
|
* still rendering only real strings.
|
|
50
41
|
*/
|
|
51
42
|
type FieldErrorMessage = string | null | undefined | false;
|
|
52
|
-
/**
|
|
53
|
-
* Options for checking a manual `Field.ErrorList` subtree.
|
|
54
|
-
*/
|
|
55
43
|
//#endregion
|
|
56
44
|
//#region src/components/field/field.d.ts
|
|
57
45
|
/**
|
|
@@ -74,7 +62,7 @@ type FieldErrorMessage = string | null | undefined | false;
|
|
|
74
62
|
* `Field.Errors`, or multiple `Field.ErrorItem` children to `Field.ErrorList`,
|
|
75
63
|
* instead.
|
|
76
64
|
*
|
|
77
|
-
* @see https://mantle.ngrok.com/components/field
|
|
65
|
+
* @see https://mantle.ngrok.com/components/forms/field
|
|
78
66
|
*
|
|
79
67
|
* @example
|
|
80
68
|
* ```tsx
|
|
@@ -132,7 +120,7 @@ type FieldControlRenderProps = {
|
|
|
132
120
|
* `Slot` cannot reach the focusable element.
|
|
133
121
|
*/
|
|
134
122
|
children: (props: FieldControlAriaProps) => ReactNode;
|
|
135
|
-
} & { [K in keyof FieldControlSlotProps]?: never };
|
|
123
|
+
} & { [K in keyof FieldControlSlotProps]?: never; };
|
|
136
124
|
/**
|
|
137
125
|
* Props for the `Field.Errors` convenience renderer. It owns its generated
|
|
138
126
|
* children, so use `Field.ErrorList` / `Field.ErrorItem` directly when custom
|
|
@@ -153,7 +141,7 @@ type FieldErrorsProps = Omit<ComponentProps<"ul">, "children" | "id"> & {
|
|
|
153
141
|
* `Field.Group`; use `Field.Set` + `Field.Legend` for radios / related
|
|
154
142
|
* checkboxes that share one accessible name.
|
|
155
143
|
*
|
|
156
|
-
* @see https://mantle.ngrok.com/components/field
|
|
144
|
+
* @see https://mantle.ngrok.com/components/forms/field
|
|
157
145
|
*
|
|
158
146
|
* @example
|
|
159
147
|
* Composition:
|
|
@@ -201,7 +189,7 @@ declare const Field: {
|
|
|
201
189
|
* A single form field. Provides message IDs and validation state to
|
|
202
190
|
* `Field.Control`; rendered errors infer `"error"` validation.
|
|
203
191
|
*
|
|
204
|
-
* @see https://mantle.ngrok.com/components/field
|
|
192
|
+
* @see https://mantle.ngrok.com/components/forms/field
|
|
205
193
|
*
|
|
206
194
|
* @example
|
|
207
195
|
* ```tsx
|
|
@@ -234,7 +222,7 @@ declare const Field: {
|
|
|
234
222
|
* `<label>`-wrapped native checkbox, or a third-party component that
|
|
235
223
|
* needs the props placed manually on an inner input.
|
|
236
224
|
*
|
|
237
|
-
* @see https://mantle.ngrok.com/components/field
|
|
225
|
+
* @see https://mantle.ngrok.com/components/forms/field
|
|
238
226
|
*
|
|
239
227
|
* @example
|
|
240
228
|
* ```tsx
|
|
@@ -269,7 +257,7 @@ declare const Field: {
|
|
|
269
257
|
/**
|
|
270
258
|
* Layout container that stacks multiple `Field.Item`s vertically.
|
|
271
259
|
*
|
|
272
|
-
* @see https://mantle.ngrok.com/components/field
|
|
260
|
+
* @see https://mantle.ngrok.com/components/forms/field
|
|
273
261
|
*
|
|
274
262
|
* @example
|
|
275
263
|
* ```tsx
|
|
@@ -298,7 +286,7 @@ declare const Field: {
|
|
|
298
286
|
* Semantic `<fieldset>` for related controls that share one accessible
|
|
299
287
|
* name from `Field.Legend`.
|
|
300
288
|
*
|
|
301
|
-
* @see https://mantle.ngrok.com/components/field
|
|
289
|
+
* @see https://mantle.ngrok.com/components/forms/field
|
|
302
290
|
*
|
|
303
291
|
* @example
|
|
304
292
|
* ```tsx
|
|
@@ -315,7 +303,7 @@ declare const Field: {
|
|
|
315
303
|
/**
|
|
316
304
|
* Caption for `Field.Set`. Renders a semantic `<legend>`.
|
|
317
305
|
*
|
|
318
|
-
* @see https://mantle.ngrok.com/components/field
|
|
306
|
+
* @see https://mantle.ngrok.com/components/forms/field
|
|
319
307
|
*
|
|
320
308
|
* @example
|
|
321
309
|
* ```tsx
|
|
@@ -338,7 +326,7 @@ declare const Field: {
|
|
|
338
326
|
* opt out (e.g. when the focusable element is rendered outside of
|
|
339
327
|
* `Field.Control`).
|
|
340
328
|
*
|
|
341
|
-
* @see https://mantle.ngrok.com/components/label
|
|
329
|
+
* @see https://mantle.ngrok.com/components/forms/label
|
|
342
330
|
*
|
|
343
331
|
* @example
|
|
344
332
|
* ```tsx
|
|
@@ -376,7 +364,7 @@ declare const Field: {
|
|
|
376
364
|
* status) inside sheets or detail panels. For rows with a real control,
|
|
377
365
|
* use `Field.Label` instead so the label-to-control association is wired.
|
|
378
366
|
*
|
|
379
|
-
* @see https://mantle.ngrok.com/components/field
|
|
367
|
+
* @see https://mantle.ngrok.com/components/forms/field
|
|
380
368
|
*
|
|
381
369
|
* @example
|
|
382
370
|
* ```tsx
|
|
@@ -393,7 +381,7 @@ declare const Field: {
|
|
|
393
381
|
* `<Field.Label>` (which may contain `Field.Optional`) with adjacent affordances
|
|
394
382
|
* like a help-icon `Popover.Trigger` on a shared center line with `gap-1`.
|
|
395
383
|
*
|
|
396
|
-
* @see https://mantle.ngrok.com/components/field
|
|
384
|
+
* @see https://mantle.ngrok.com/components/forms/field
|
|
397
385
|
*
|
|
398
386
|
* @example
|
|
399
387
|
* ```tsx
|
|
@@ -423,7 +411,7 @@ declare const Field: {
|
|
|
423
411
|
* `Field.HelpTrigger` and `Field.HelpContent` to drop a `?` button next to
|
|
424
412
|
* a label without manually composing Popover + IconButton + QuestionIcon.
|
|
425
413
|
*
|
|
426
|
-
* @see https://mantle.ngrok.com/components/field
|
|
414
|
+
* @see https://mantle.ngrok.com/components/forms/field
|
|
427
415
|
*
|
|
428
416
|
* @example
|
|
429
417
|
* ```tsx
|
|
@@ -453,7 +441,7 @@ declare const Field: {
|
|
|
453
441
|
* `QuestionIcon`. Requires a contextual `label`; pass `icon` to swap the
|
|
454
442
|
* glyph, or other `IconButton` props (`size`, `appearance`, etc.) to customize.
|
|
455
443
|
*
|
|
456
|
-
* @see https://mantle.ngrok.com/components/field
|
|
444
|
+
* @see https://mantle.ngrok.com/components/forms/field
|
|
457
445
|
*
|
|
458
446
|
* @example
|
|
459
447
|
* ```tsx
|
|
@@ -477,7 +465,7 @@ declare const Field: {
|
|
|
477
465
|
* </Field.Group>
|
|
478
466
|
* ```
|
|
479
467
|
*/
|
|
480
|
-
readonly HelpTrigger: import("react").ForwardRefExoticComponent<Partial<Omit<IconButtonProps, "
|
|
468
|
+
readonly HelpTrigger: import("react").ForwardRefExoticComponent<Partial<Omit<IconButtonProps, "icon" | "label">> & Pick<IconButtonProps, "label"> & {
|
|
481
469
|
/**
|
|
482
470
|
* The icon to render inside the trigger button. Defaults to a Phosphor
|
|
483
471
|
* `QuestionIcon` so the most common case only needs a contextual label.
|
|
@@ -489,7 +477,7 @@ declare const Field: {
|
|
|
489
477
|
* positioning / sizing options (`side`, `align`, `preferredWidth`, etc.)
|
|
490
478
|
* work as expected.
|
|
491
479
|
*
|
|
492
|
-
* @see https://mantle.ngrok.com/components/field
|
|
480
|
+
* @see https://mantle.ngrok.com/components/forms/field
|
|
493
481
|
*
|
|
494
482
|
* @example
|
|
495
483
|
* ```tsx
|
|
@@ -522,7 +510,7 @@ declare const Field: {
|
|
|
522
510
|
* the `<Field.Label>` so screen readers announce it as part of the accessible
|
|
523
511
|
* name.
|
|
524
512
|
*
|
|
525
|
-
* @see https://mantle.ngrok.com/components/field
|
|
513
|
+
* @see https://mantle.ngrok.com/components/forms/field
|
|
526
514
|
*
|
|
527
515
|
* @example
|
|
528
516
|
* ```tsx
|
|
@@ -550,7 +538,7 @@ declare const Field: {
|
|
|
550
538
|
/**
|
|
551
539
|
* Helper / hint text rendered below the control in the muted body color.
|
|
552
540
|
*
|
|
553
|
-
* @see https://mantle.ngrok.com/components/field
|
|
541
|
+
* @see https://mantle.ngrok.com/components/forms/field
|
|
554
542
|
*
|
|
555
543
|
* @example
|
|
556
544
|
* ```tsx
|
|
@@ -580,7 +568,7 @@ declare const Field: {
|
|
|
580
568
|
* filters empty values, and renders a `Field.ErrorList` with one
|
|
581
569
|
* `Field.ErrorItem` for each remaining message.
|
|
582
570
|
*
|
|
583
|
-
* @see https://mantle.ngrok.com/components/field
|
|
571
|
+
* @see https://mantle.ngrok.com/components/forms/field
|
|
584
572
|
*
|
|
585
573
|
* @example
|
|
586
574
|
* ```tsx
|
|
@@ -609,7 +597,7 @@ declare const Field: {
|
|
|
609
597
|
* Wraps one or more `Field.ErrorItem` children in a semantic `<ul>`.
|
|
610
598
|
* Renders nothing when given no renderable children.
|
|
611
599
|
*
|
|
612
|
-
* @see https://mantle.ngrok.com/components/field
|
|
600
|
+
* @see https://mantle.ngrok.com/components/forms/field
|
|
613
601
|
*
|
|
614
602
|
* @example
|
|
615
603
|
* ```tsx
|
|
@@ -633,7 +621,7 @@ declare const Field: {
|
|
|
633
621
|
* A single error message list item for a field. Renders an `<li>` in
|
|
634
622
|
* `text-danger-600` and must be nested inside a `Field.ErrorList`.
|
|
635
623
|
*
|
|
636
|
-
* @see https://mantle.ngrok.com/components/field
|
|
624
|
+
* @see https://mantle.ngrok.com/components/forms/field
|
|
637
625
|
*
|
|
638
626
|
* @example
|
|
639
627
|
* ```tsx
|
package/dist/field.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./use-isomorphic-layout-effect-DdTRtMY-.js";import{t}from"./cx-
|
|
1
|
+
import{t as e}from"./use-isomorphic-layout-effect-DdTRtMY-.js";import{t}from"./cx-IiQEAKf5.js";import{t as n}from"./slot-DmPrjM7N.js";import{t as r}from"./icon-button-CxVsZ2N1.js";import{i,n as a,r as o,t as s}from"./validation-Bpptk_9t.js";import{n as c,r as l,t as u}from"./field-context-BR01g789.js";import{t as d}from"./label-BMlHW_2D.js";import{t as f}from"./popover-D5WxxnBY.js";import{Children as p,Fragment as m,cloneElement as h,forwardRef as g,isValidElement as _,useCallback as v,useContext as y,useId as b,useMemo as x,useState as S}from"react";import C from"tiny-invariant";import{jsx as w}from"react/jsx-runtime";import{QuestionIcon as T}from"@phosphor-icons/react/Question";const E=e=>{let t=[],n=new Set;for(let r of e??[]){if(typeof r!=`string`)continue;let e=r.trim();e.length===0||n.has(e)||(n.add(e),t.push(e))}return t},D=e=>!(e==null||typeof e==`boolean`||typeof e==`string`&&e.trim().length===0),O=({children:e,errorItemType:t})=>{let n=!1;return p.forEach(e,e=>{if(!(n||e==null||typeof e==`boolean`)){if(typeof e==`string`){e.trim().length>0&&(n=!0);return}if(!_(e)){n=!0;return}if(e.type===t){n=D(e.props.children);return}if(e.type===m){n=O({children:e.props.children,errorItemType:t});return}n=!0}}),n},k=g(({className:e,...n},r)=>w(`fieldset`,{ref:r,"data-slot":`field-set`,className:t(`flex w-full min-w-0 flex-col gap-4 border-0 p-0`,e),...n}));k.displayName=`FieldSet`;const A=g(({className:e,...n},r)=>w(`legend`,{ref:r,"data-slot":`field-legend`,className:t(`text-strong mb-1.5 text-sm font-medium font-sans`,e),...n}));A.displayName=`FieldLegend`;const j=g(({htmlFor:e,...t},n)=>{let r=y(c);return w(d,{ref:n,htmlFor:e??r?.controlId,...t})});j.displayName=`FieldLabel`;const M=g(({asChild:e,className:r,...i},a)=>w(e?n:`p`,{ref:a,"data-slot":`field-label-text`,className:t(`text-strong text-sm font-medium font-sans`,r),...i}));M.displayName=`FieldLabelText`;const N=g(({asChild:e,className:r,...i},a)=>w(e?n:`div`,{ref:a,"data-slot":`field-label-row`,className:t(`flex items-center gap-1`,r),...i}));N.displayName=`FieldLabelRow`;const P=f.Root,F=w(T,{}),I=g(({appearance:e=`ghost`,className:n,icon:i=F,label:a,size:o=`xs`,type:s=`button`,...c},l)=>w(f.Trigger,{asChild:!0,children:w(r,{ref:l,appearance:e,className:t(`text-body -my-0.5`,n),icon:i,label:a,size:o,type:s,...c})}));I.displayName=`FieldHelpTrigger`;const L=g((e,t)=>w(f.Content,{ref:t,"data-slot":`field-help-content`,...e}));L.displayName=`FieldHelpContent`;const R=g(({asChild:e,children:r,className:i,...a},o)=>w(e?n:`span`,{ref:o,"data-slot":`field-optional`,className:t(`text-muted text-sm font-normal font-sans`,i),...a,children:r??`(Optional)`}));R.displayName=`FieldOptional`;const z=g(({asChild:e,className:r,...i},a)=>w(e?n:`div`,{ref:a,"data-slot":`field-group`,className:t(`flex w-full flex-col gap-4`,r),...i}));z.displayName=`FieldGroup`;const B=g(({asChild:e,children:r,className:a,name:o,validation:l,...u},d)=>{let f=e?n:`div`,p=b(),m=b(),h=b(),[g,_]=S(!1),y=i(l??(g?`error`:void 0)),C=v(()=>(_(!0),()=>{_(!1)}),[]),T=x(()=>({controlId:p,descriptionId:m,errorId:h,hasErrors:g,name:o,registerError:C,validation:y}),[p,m,h,g,o,C,y]);return w(c.Provider,{value:T,children:w(s,{validation:y,children:w(f,{ref:d,"data-slot":`field-item`,"data-validation":y,className:t(`flex w-full flex-col gap-1.5`,a),...u,children:r})})})});B.displayName=`FieldItem`;const V=g(({children:e,...t},r)=>{let i=y(c),a=l({context:i});return typeof e==`function`?w(s,{validation:a.validation,children:w(u.Provider,{value:i?a.ariaProps:null,children:e(a.ariaProps)})}):(C(_(e),`Field.Control expects a single React element child (or a render-prop function). Got a non-element value (string, array, fragment, null, or undefined). Wrap the control in a single element, or use the function child form: <Field.Control>{(props) => <YourControl {...props} />}</Field.Control>.`),w(s,{validation:a.validation,children:w(u.Provider,{value:i?a.ariaProps:null,children:w(n,{ref:r,...t,children:h(e,a.ariaProps)})})}))});V.displayName=`FieldControl`;const H=g(({asChild:e,className:r,...i},a)=>w(e?n:`p`,{ref:a,"data-slot":`field-description`,id:y(c)?.descriptionId,className:t(`text-body text-sm leading-4`,`[:where([data-slot=field-error-list]+&)]:-mt-1.5`,r),...i}));H.displayName=`FieldDescription`;const U=g(({children:e,className:n,...r},i)=>D(e)?w(`li`,{ref:i,"data-slot":`field-error`,className:t(`text-danger-600 text-sm leading-4`,n),...r,children:e}):null);U.displayName=`FieldErrorItem`;const W=g(({messages:e,...t},n)=>w(G,{ref:n,...t,children:E(e).map(e=>w(U,{children:e},e))}));W.displayName=`FieldErrors`;const G=g(({asChild:r,children:i,className:a,...o},s)=>{let l=O({children:i,errorItemType:U}),u=y(c),d=u?.registerError;return e(()=>{if(!(!l||d==null))return d()},[l,d]),l?w(r?n:`ul`,{ref:s,"data-slot":`field-error-list`,id:u?.errorId,role:`list`,className:t(`m-0 flex w-full flex-col list-none p-0`,a),...o,children:i}):null});G.displayName=`FieldErrorList`;const K={Item:B,Control:V,Group:z,Set:k,Legend:A,Label:j,LabelText:M,LabelRow:N,Help:P,HelpTrigger:I,HelpContent:L,Optional:R,Description:H,Errors:W,ErrorList:G,ErrorItem:U},q=e=>E(e?.map(e=>typeof e==`string`||!e?e:e.message));export{K as Field,a as isAriaInvalid,o as parseValidation,i as resolveValidation,q as toErrorMessages};
|
package/dist/flag.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ComponentProps } from "react";
|
|
2
|
-
|
|
3
2
|
//#region src/components/flag/country-code.d.ts
|
|
4
3
|
/** All valid values for a flag
|
|
5
4
|
* @see https://www.flagpack.xyz/docs/flag-index
|
|
@@ -58,7 +57,7 @@ type Props = Omit<ComponentProps<"div">, "children"> & {
|
|
|
58
57
|
* **Loading.** Defaults to `loading="lazy"`. Use `loading="eager"` for flags
|
|
59
58
|
* above the fold or in critical content.
|
|
60
59
|
*
|
|
61
|
-
* @see https://mantle.ngrok.com/components/flag#flag
|
|
60
|
+
* @see https://mantle.ngrok.com/components/data-display/flag#flag
|
|
62
61
|
*
|
|
63
62
|
* @example
|
|
64
63
|
* ```tsx
|
|
@@ -75,13 +74,7 @@ type Props = Omit<ComponentProps<"div">, "children"> & {
|
|
|
75
74
|
* </span>
|
|
76
75
|
* ```
|
|
77
76
|
*/
|
|
78
|
-
declare function Flag({
|
|
79
|
-
className,
|
|
80
|
-
code,
|
|
81
|
-
size,
|
|
82
|
-
loading,
|
|
83
|
-
...props
|
|
84
|
-
}: Props): import("react").JSX.Element;
|
|
77
|
+
declare function Flag({ className, code, size, loading, ...props }: Props): import("react").JSX.Element;
|
|
85
78
|
declare namespace Flag {
|
|
86
79
|
var displayName: string;
|
|
87
80
|
}
|
package/dist/flag.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./cx-
|
|
1
|
+
import{t as e}from"./cx-IiQEAKf5.js";import{jsx as t,jsxs as n}from"react/jsx-runtime";import{cva as r}from"class-variance-authority";const i=r(``,{variants:{size:{s:`rounded-[0.0625rem]`,m:`rounded-[0.09375rem]`,l:`rounded-xs`}}}),a=r(``,{variants:{size:{s:`w-4 h-3`,m:`w-5 h-3.75`,l:`w-8 h-6`}}});function o({className:r,code:o,size:s=`l`,loading:c=`lazy`,...l}){let u=i({size:s});return n(`div`,{"data-slot":`flag`,className:e(`flag relative overflow-hidden`,u,a({size:s}),r),...l,children:[t(`div`,{"aria-hidden":!0,className:e(`absolute inset-0 border border-[#000]/10`,u)}),t(`img`,{className:`h-full w-full block object-cover`,src:`https://assets.ngrok.com/flags/${s}/${o}.svg`,alt:`flag for ${o}`,loading:c})]})}o.displayName=`Flag`;const s=`004.008.010.016.016.020.024.028.031.032.040.044.048.050.051.052.056.060.064.068.070.072.074.076.084.086.090.092.096.100.104.108.112.116.120.124.132.136.140.144.148.152.156.158.162.166.170.174.178.180.184.188.191.192.196.203.204.208.212.214.218.222.226.231.232.233.234.238.239.242.246.248.250.254.258.260.262.266.268.270.275.276.288.292.296.300.304.308.312.316.320.324.328.332.334.336.340.344.348.352.356.360.364.368.372.376.380.384.388.392.398.400.404.408.410.414.417.418.422.426.428.430.434.438.440.442.446.450.454.458.462.466.470.474.478.480.484.492.496.498.499.500.504.508.512.516.520.524.528.531.533.534.540.548.554.558.562.566.570.574.578.580.581.583.584.585.586.591.598.600.604.608.612.616.620.624.626.630.634.638.642.643.646.652.654.659.660.662.663.666.670.674.678.682.686.688.690.694.702.703.704.705.706.710.716.724.728.729.732.740.744.748.752.756.760.762.764.768.772.776.780.784.788.792.795.796.798.800.804.807.818.831.832.833.834.836.840.850.854.858.860.862.876.882.887.894.ABW.AD.AE.AF.AFG.AFRUN.AG.AGO.AI.AIA.AL.ALA.ALB.AM.AMS.AND.AO.AQ.AR.ARE.ARG.ARM.AS.ASM.AT.ATA.ATF.ATG.AU.AUS.AUT.AW.AX.AZ.AZE.BA.BB.BD.BDI.BE.BEL.BEN.BF.BFA.BG.BGD.BGR.BH.BHR.BHS.BI.BIH.BJ.BL.BLM.BLR.BLZ.BM.BMU.BN.BO.BOL.BQ-BO.BQ-SA.BQ-SE.BR.BRA.BRB.BRN.BS.BT.BTN.BV.BVT.BW.BWA.BY.BZ.CA.CAF.CAN.CC.CCK.CD.CF.CG.CH.CHE.CHL.CHN.CI.CIV.CK.CL.CM.CMR.CN.CO.COD.COG.COK.COL.COM.CPV.CR.CRI.CU.CUB.CUW.CV.CW.CX.CXR.CY.CYM.CYP.CZ.CZE.DE.DEU.DJ.DJI.DK.DM.DMA.DNK.DO.DOM.EC.ECU.EE.EG.EGY.EH.ER.ERI.ES.ESH.ESP.EST.ET.ETH.EU.FI.FIN.FJ.FJI.FK.FLK.FM.FO.FR.FRA.FRO.FSM.GA.GAB.GB-ENG.GB-NIR.GB-SCT.GB-UKM.GB-WLS.GB.GBR.GD.GE.GEO.GF.GG.GGY.GH.GHA.GI.GIB.GIN.GL.GLP.GM.GMB.GN.GNB.GNQ.GP.GQ.GR.GRC.GRD.GRL.GS.GT.GTM.GU.GUF.GUM.GUY.GW.GY.HK.HKG.HM.HMD.HN.HND.HR.HRV.HT.HTI.HU.HUN.ID.IDN.IE.IL.IM.IMN.IN.IND.IO.IOT.IQ.IR.IRL.IRN.IRQ.IS.ISL.ISR.IT.ITA.JAM.JE.JEY.JM.JO.JOR.JP.JPN.KAZ.KE.KEN.KG.KGZ.KH.KHM.KI.KIR.KM.KN-SK.KNA.KOR.KP.KR.KW.KWT.KY.KZ.LA.LAO.LB.LBN.LBR.LBY.LC.LCA.LI.LIE.LK.LKA.LR.LS.LSO.LT.LTU.LU.LUX.LV.LVA.LY.MA.MAC.MAF.MAR.MC.MCO.MD.MDA.MDG.MDV.ME.MEX.MF.MG.MH.MHL.MK.MKD.ML.MLI.MLT.MM.MMR.MN.MNE.MNG.MNP.MO.MOZ.MP.MQ.MR.MRT.MS.MSR.MT.MTQ.MU.MUS.MV.MW.MWI.MX.MY.MYS.MZ.NA.NAM.NC.NCL.NE.NER.NF.NFK.NG.NGA.NI.NIC.NIU.NL.NLD.NO.NOR.NP.NPL.NR.NRU.NU.NZ.NZL.OM.OMN.PA.PAK.PAN.PCN.PE.PER.PF.PG.PH.PHL.PK.PL.PLW.PM.PN.PNG.POL.PR.PRI.PRK.PRT.PRY.PS.PSE.PT.PW.PY.PYF.QA.QAT.RAINBOW.RE.REU.RO.ROU.RS.RU.RUS.RW.RWA.SA.SAU.SB.SC.SD.SDN.SE.SEN.SG.SGP.SGS.SH.SHN.SI.SJ.SJM.SK.SL.SLB.SLE.SLV.SM.SMR.SN.SO.SOM.SPM.SR.SRB.SS.SSD.ST.STP.SUR.SV.SVK.SVN.SWE.SWZ.SX.SXM.SY.SYC.SYR.SZ.TC.TCA.TCD.TD.TF.TG.TGO.TH.THA.TJ.TJK.TK.TKL.TKM.TL.TLS.TM.TN.TO.TON.TR.TT.TTO.TUN.TUR.TUV.TV.TW.TWN.TZ.TZA.UA.UG.UGA.UKR.UM.UMI.UNASUR.URY.US.USA.UY.UZ.UZB.VA.VAT.VC.VCT.VE.VEN.VG.VGB.VI.VIR.VN.VNM.VU.VUT.WF.WLF.WS.WSM.YE.YEM.ZA.ZAF.ZM.ZMB.ZW.ZWE`.split(`.`);function c(e){return s.includes(e)}export{o as Flag,s as countryCodes,c as isCountryCode};
|