@ngrok/mantle 0.93.7 → 0.94.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -2
- package/dist/accordion.d.ts +73 -21
- package/dist/accordion.js +1 -1
- package/dist/agent.json +1234 -84
- package/dist/alert-BkJHDx9X.js +1 -0
- package/dist/{alert-BcSBNR3S.d.ts → alert-D0zRRUHV.d.ts} +35 -25
- package/dist/alert-center.d.ts +67 -55
- package/dist/alert-center.js +1 -1
- package/dist/alert-dialog.d.ts +35 -10
- package/dist/alert-dialog.js +1 -1
- package/dist/alert.d.ts +6 -1
- package/dist/alert.js +1 -1
- package/dist/anchor-Dc6IgvXV.js +1 -0
- package/dist/anchor.d.ts +17 -5
- package/dist/anchor.js +1 -1
- package/dist/app-layout.d.ts +33 -18
- package/dist/app-layout.js +1 -1
- package/dist/area-chart.d.ts +153 -97
- package/dist/area-chart.js +1 -1
- package/dist/avatar.d.ts +36 -24
- package/dist/avatar.js +1 -1
- package/dist/badge.d.ts +19 -7
- package/dist/badge.js +1 -1
- package/dist/bar-chart.d.ts +155 -100
- package/dist/bar-chart.js +1 -1
- package/dist/breadcrumb.d.ts +47 -36
- package/dist/breadcrumb.js +1 -1
- package/dist/browser-only-CZfkNw5A.js +1 -0
- package/dist/browser-only-ymFoM3Ya.js +1 -0
- package/dist/browser-only.d.ts +8 -0
- package/dist/browser-only.js +1 -1
- package/dist/{button-BX-4lYUn.d.ts → button-5Pc7Mby_.d.ts} +4 -4
- package/dist/button-B9bChDgl.js +1 -0
- package/dist/button-D8jixIbH.js +1 -0
- package/dist/button-DNLTJ32M.js +1 -0
- package/dist/{button-CPsKGDK0.d.ts → button-Ddj6yr10.d.ts} +34 -27
- package/dist/{button-Yxyu1XMd.d.ts → button-DnYv7IOT.d.ts} +29 -22
- package/dist/button.d.ts +9 -3
- package/dist/button.js +1 -1
- package/dist/calendar.d.ts +8 -1
- package/dist/calendar.js +1 -1
- package/dist/card.d.ts +7 -2
- package/dist/card.js +1 -1
- package/dist/centered-layout.d.ts +34 -23
- package/dist/centered-layout.js +1 -1
- package/dist/chart-BLCqzt56.js +1 -0
- package/dist/chart-CChZiCrt.js +1 -0
- package/dist/chart-CUmSu9d7.js +1 -0
- package/dist/{chart-BpfbtOUN.d.ts → chart-Dl8gFo_D.d.ts} +117 -121
- package/dist/chart-DtgZBAas.js +2 -0
- package/dist/checkbox-Cu5cgZmk.js +1 -0
- package/dist/checkbox.d.ts +15 -2
- package/dist/checkbox.js +1 -1
- package/dist/choice-CCVG2hb9.js +1 -0
- package/dist/{choice-BLR0_MeB.d.ts → choice-CNiOSzqV.d.ts} +26 -20
- package/dist/choice.d.ts +6 -1
- package/dist/choice.js +1 -1
- package/dist/code-BPKNY1_w.js +1 -0
- package/dist/{code-block-BGdV4Yty.d.ts → code-block-BDw6MEwH.d.ts} +9 -9
- package/dist/{code-block-W3kWPxCJ.js → code-block-CKzsAMzj.js} +3 -3
- package/dist/code-block.d.ts +28 -19
- package/dist/code-block.js +1 -1
- package/dist/code-block_highlight-utils.d.ts +6 -1
- package/dist/code-block_highlight-utils.js +1 -1
- package/dist/code.d.ts +16 -3
- package/dist/code.js +1 -1
- package/dist/color-CHZbU1Ww.js +1 -0
- package/dist/color.js +1 -1
- package/dist/combobox.d.ts +42 -28
- package/dist/combobox.js +1 -1
- package/dist/command.d.ts +59 -47
- package/dist/command.js +1 -1
- package/dist/compose-refs-BdRUneoc.js +1 -0
- package/dist/{copy-to-clipboard-DInu78k_.js → copy-to-clipboard-Dd83caRw.js} +1 -1
- package/dist/cx.d.ts +4 -4
- package/dist/cx.js +1 -1
- package/dist/{data-slot-B-LqAcBB.d.ts → data-slot-BW8KQ9Xo.d.ts} +2 -2
- package/dist/data-table.d.ts +83 -52
- package/dist/data-table.js +1 -1
- package/dist/description-list.d.ts +13 -2
- package/dist/description-list.js +1 -1
- package/dist/{dialog-2fRO4ca4.d.ts → dialog-CIEuwNys.d.ts} +32 -8
- package/dist/dialog-CbEEA0fl.d.ts +32 -0
- package/dist/dialog-DmzoDfY3.js +1 -0
- package/dist/dialog.d.ts +7 -2
- package/dist/dialog.js +1 -1
- package/dist/{dropdown-menu-CpjRwMWe.d.ts → dropdown-menu-CeY498yk.d.ts} +41 -33
- package/dist/dropdown-menu-uheL0prz.js +1 -0
- package/dist/dropdown-menu.d.ts +6 -1
- package/dist/dropdown-menu.js +1 -1
- package/dist/empty.d.ts +7 -2
- package/dist/empty.js +1 -1
- package/dist/field-Bpvn4tQp.js +1 -0
- package/dist/{field-V_gnkcmN.d.ts → field-BshcNVe_.d.ts} +1 -1
- package/dist/field-Cai_4c1l.js +1 -0
- package/dist/field.d.ts +53 -42
- package/dist/field.js +1 -1
- package/dist/flag.d.ts +11 -3
- package/dist/flag.js +1 -1
- package/dist/hooks.d.ts +35 -10
- package/dist/hooks.js +1 -1
- package/dist/hover-card.d.ts +25 -14
- package/dist/hover-card.js +1 -1
- package/dist/{icon-CgNqu-fl.d.ts → icon--purqHRo.d.ts} +1 -1
- package/dist/{icon-ByLVhdYq.d.ts → icon-DuIYoyft.d.ts} +8 -2
- package/dist/{icon-DXDyhy2N.d.ts → icon-QCm1ui29.d.ts} +2 -2
- package/dist/icon-xb7d9M7X.js +1 -0
- package/dist/icon.d.ts +8 -3
- package/dist/icon.js +1 -1
- package/dist/icons-DEDCLZ8B.js +1 -0
- package/dist/icons-DXadFwpo.js +1 -0
- package/dist/icons-DcesO4Ng.js +1 -0
- package/dist/icons.d.ts +13 -1
- package/dist/icons.js +1 -1
- package/dist/{in-view-B3nMAzfE.d.ts → in-view-C_daNafg.d.ts} +4 -23
- package/dist/{index-BhfgyurF.d.ts → index-KJ06KK6t.d.ts} +3 -3
- package/dist/input-BjCDSOPA.js +1 -0
- package/dist/{input-Dx5owTCc.d.ts → input-DC4nW0Sr.d.ts} +12 -2
- package/dist/input-fW8QSZEO.js +1 -0
- package/dist/input.d.ts +37 -5
- package/dist/input.js +1 -1
- package/dist/kbd-P1nQshWo.js +1 -0
- package/dist/kbd.d.ts +17 -5
- package/dist/kbd.js +1 -1
- package/dist/label-DO1RlMKl.js +1 -0
- package/dist/{label-Dn5CPJUj.d.ts → label-epgtywRz.d.ts} +14 -8
- package/dist/label.d.ts +6 -1
- package/dist/label.js +1 -1
- package/dist/layer-container-DL4yclOu.js +1 -0
- package/dist/layer-container.d.ts +2 -2
- package/dist/layer-container.js +1 -1
- package/dist/line-chart.d.ts +147 -90
- package/dist/line-chart.js +1 -1
- package/dist/list-cQZPSjfz.js +1 -0
- package/dist/list.d.ts +34 -16
- package/dist/list.js +1 -1
- package/dist/live-region-Dhapu8a5.js +1 -0
- package/dist/live-region.d.ts +15 -2
- package/dist/live-region.js +1 -1
- package/dist/llms.txt +82 -79
- package/dist/main-CHyWYDak.js +1 -0
- package/dist/main.d.ts +13 -1
- package/dist/main.js +1 -1
- package/dist/mantle.css +133 -88
- package/dist/media-object.d.ts +16 -4
- package/dist/media-object.js +1 -1
- package/dist/migrations/0014-chart-named-colors.yml +1389 -0
- package/dist/migrations/0015-segmented-control.yml +788 -0
- package/dist/multi-select.d.ts +42 -29
- package/dist/multi-select.js +1 -1
- package/dist/otp-input.d.ts +20 -8
- package/dist/otp-input.js +1 -1
- package/dist/pagination.d.ts +93 -4
- package/dist/pagination.js +1 -1
- package/dist/{popover-BfB2I9G0.d.ts → popover-Bei0jyfH.d.ts} +87 -12
- package/dist/popover-DhgunktK.js +1 -0
- package/dist/popover-T2EyaqGK.d.ts +1 -0
- package/dist/popover.d.ts +7 -2
- package/dist/popover.js +1 -1
- package/dist/primitive-D8CzV_Ft.js +1 -0
- package/dist/progress.d.ts +28 -11
- package/dist/progress.js +1 -1
- package/dist/qr-code.d.ts +11 -3
- package/dist/qr-code.js +1 -1
- package/dist/query-filter.d.ts +6 -6
- package/dist/query.d.ts +9 -4
- package/dist/query.js +1 -1
- package/dist/radio-group-BJQ6EOqh.d.ts +27 -0
- package/dist/radio-group-BliblUqe.js +1 -0
- package/dist/radio-group-ggEkCi0V.js +1 -0
- package/dist/radio-group.d.ts +21 -100
- package/dist/radio-group.js +1 -1
- package/dist/sandbar.d.ts +43 -30
- package/dist/sandbar.js +1 -1
- package/dist/sandboxed-on-click-D4PL5_GR.js +1 -0
- package/dist/sandboxed-on-click.d.ts +8 -0
- package/dist/sandboxed-on-click.js +1 -1
- package/dist/scatter-plot.d.ts +137 -76
- package/dist/scatter-plot.js +1 -1
- package/dist/segmented-control.d.ts +136 -0
- package/dist/segmented-control.js +1 -0
- package/dist/select-1xuUx_os.js +1 -0
- package/dist/{select-BkhBxtOT.d.ts → select-BpaXHxJm.d.ts} +33 -25
- package/dist/select.d.ts +6 -1
- package/dist/select.js +1 -1
- package/dist/selectable-list.d.ts +29 -18
- package/dist/selectable-list.js +1 -1
- package/dist/{separator-D9AWEkcJ.d.ts → separator-Ck4sPrdN.d.ts} +4 -2
- package/dist/separator-DnvhwY2J.js +1 -0
- package/dist/separator.d.ts +6 -1
- package/dist/separator.js +1 -1
- package/dist/{shake-DL6WhMXM.js → shake-CAUpKBHe.js} +1 -1
- package/dist/sheet-DHy_vlme.js +1 -0
- package/dist/sheet.d.ts +36 -7
- package/dist/sheet.js +1 -1
- package/dist/sidebar.d.ts +53 -37
- package/dist/sidebar.js +1 -1
- package/dist/skeleton-DHfyjuQi.js +1 -0
- package/dist/skeleton.d.ts +15 -4
- package/dist/skeleton.js +1 -1
- package/dist/skip-to-main-link.d.ts +12 -1
- package/dist/skip-to-main-link.js +1 -1
- package/dist/slider.d.ts +11 -1
- package/dist/slider.js +1 -1
- package/dist/slot-B7rwscwd.js +1 -0
- package/dist/{slot-C0OCJjdJ.d.ts → slot-BEMQMbk3.d.ts} +6 -4
- package/dist/slot.d.ts +6 -1
- package/dist/slot.js +1 -1
- package/dist/source-all.css +5 -1
- package/dist/split-button.d.ts +20 -9
- package/dist/split-button.js +1 -1
- package/dist/strata.d.ts +35 -22
- package/dist/strata.js +1 -1
- package/dist/{suggestions-NkqYTT49.d.ts → suggestions-BJeGvwDa.d.ts} +7 -7
- package/dist/switch.d.ts +14 -2
- package/dist/switch.js +1 -1
- package/dist/table-BnLdXUai.js +1 -0
- package/dist/{table-vT6Okwfa.d.ts → table-Ii9hHUWN.d.ts} +84 -5
- package/dist/table.d.ts +6 -1
- package/dist/table.js +1 -1
- package/dist/tabs.d.ts +24 -12
- package/dist/tabs.js +1 -1
- package/dist/text-area.d.ts +12 -2
- package/dist/text-area.js +1 -1
- package/dist/theme-BNdZl352.js +1 -0
- package/dist/theme-switcher.d.ts +18 -4
- package/dist/theme-switcher.js +1 -1
- package/dist/theme.d.ts +25 -11
- package/dist/theme.js +1 -1
- package/dist/toast.d.ts +15 -2
- package/dist/toast.js +1 -1
- package/dist/tokens.dark.json +3261 -0
- package/dist/tokens.json +4933 -0
- package/dist/tokens.resolver.json +37 -0
- package/dist/{tooltip-NcLIeBy5.d.ts → tooltip-CstGDKwy.d.ts} +18 -11
- package/dist/tooltip-DQO40Mrq.js +1 -0
- package/dist/tooltip.d.ts +6 -1
- package/dist/tooltip.js +1 -1
- package/dist/truncated-text.d.ts +28 -14
- package/dist/truncated-text.js +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/types.js +1 -1
- package/dist/use-breakpoint-B4Kh0xE6.js +1 -0
- package/dist/use-callback-ref-DiOXFQzM.js +1 -0
- package/dist/use-composed-refs-DPYmLDSe.js +1 -0
- package/dist/use-copy-to-clipboard-hBL6_65i.js +1 -0
- package/dist/use-inert-siblings-C4RHXrZc.js +1 -0
- package/dist/use-is-apple-platform-Bq6_KbVX.js +1 -0
- package/dist/use-is-hydrated-BeLOGKwE.js +1 -0
- package/dist/use-is-hydrated-after-paint-CrHt3OHw.js +1 -0
- package/dist/use-isomorphic-layout-effect-CL6iq0Bj.js +1 -0
- package/dist/use-matches-media-query-FfvtNKQe.js +1 -0
- package/dist/use-prefers-reduced-motion-Ck6dnOM9.js +1 -0
- package/dist/use-swipe-to-dismiss-BYdlca8r.js +1 -0
- package/dist/utils.d.ts +1 -1
- package/dist/utils.js +1 -1
- package/dist/visually-hidden.d.ts +14 -1
- package/dist/visually-hidden.js +1 -1
- package/dist/well.d.ts +7 -2
- package/dist/well.js +1 -1
- package/package.json +21 -7
- package/src/components/chart/d3-license.md +25 -0
- package/dist/alert-P9lwn25X.js +0 -1
- package/dist/anchor-CgcbWEUs.js +0 -1
- package/dist/browser-only-BTSrYWLj.js +0 -1
- package/dist/button-69InNC_m.js +0 -1
- package/dist/button-B8k98Pby.js +0 -1
- package/dist/button-Dge0D5bl.js +0 -1
- package/dist/chart-BpWfQAwf.js +0 -2
- package/dist/checkbox-DmSQXs26.js +0 -1
- package/dist/choice-2Lrv8_nl.js +0 -1
- package/dist/code-DUJzSl4K.js +0 -1
- package/dist/compose-refs-sFdxsL7k.js +0 -1
- package/dist/dialog-7TUgiSzX.js +0 -1
- package/dist/dialog-Dp0QGWwo.d.ts +0 -28
- package/dist/dropdown-menu-BHBzCDSZ.js +0 -1
- package/dist/field-Bihblt8U.js +0 -1
- package/dist/field-CPvjazWN.js +0 -1
- package/dist/icon-kK0c-POG.js +0 -1
- package/dist/icons-CDLz5lpI.js +0 -1
- package/dist/icons-CSwTVV2m.js +0 -1
- package/dist/icons-DP3lQw5O.js +0 -1
- package/dist/input-CpQ6jlpI.js +0 -1
- package/dist/kbd-CLHsJ99p.js +0 -1
- package/dist/label-nHqqYS7e.js +0 -1
- package/dist/layer-container-kEQiE4zV.js +0 -1
- package/dist/list-RFRIQxU2.js +0 -1
- package/dist/live-region-DQ1QLv3L.js +0 -1
- package/dist/main-CC1L9IsH.js +0 -1
- package/dist/popover-C96V8SXi.d.ts +0 -1
- package/dist/popover-DxOqLKxy.js +0 -1
- package/dist/primitive-Dz9Al-us.js +0 -1
- package/dist/radio-group-HDVxTNPi.js +0 -1
- package/dist/sandboxed-on-click-C7pPu-2M.js +0 -1
- package/dist/select-CAAYk4Yj.js +0 -1
- package/dist/separator-DfzxVutO.js +0 -1
- package/dist/sheet-CSJc_sB4.js +0 -1
- package/dist/skeleton-DBpI-ko5.js +0 -1
- package/dist/slot-DdYN1L1C.js +0 -1
- package/dist/table-CFHiDBW8.js +0 -1
- package/dist/theme-C-glc5Q-.js +0 -1
- package/dist/tooltip-b6oiTaWq.js +0 -1
- package/dist/use-breakpoint--mo7kr9d.js +0 -1
- package/dist/use-callback-ref-BvVyI5K1.js +0 -1
- package/dist/use-copy-to-clipboard-Dy_0Qzb7.js +0 -1
- package/dist/use-is-apple-platform-D4nifHMx.js +0 -1
- package/dist/use-is-hydrated-after-paint-r9Cl2mGp.js +0 -1
- package/dist/use-isomorphic-layout-effect-CLSmHzo4.js +0 -1
- package/dist/use-matches-media-query-m860lols.js +0 -1
- package/dist/use-prefers-reduced-motion-CU6mWmOe.js +0 -1
- package/dist/use-swipe-to-dismiss-DceYk1Id.js +0 -1
package/dist/hover-card.d.ts
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Re-exports for the Hover Card component.
|
|
3
|
+
*
|
|
4
|
+
* @see https://mantle.ngrok.com/components/overlays/hover-card
|
|
5
|
+
*/
|
|
6
|
+
import { t as WithDataSlot } from "./data-slot-BW8KQ9Xo.js";
|
|
2
7
|
import { ComponentProps } from "react";
|
|
3
|
-
import { Arrow, Content, Portal, Root, Trigger } from "@radix-ui/react-hover-card";
|
|
8
|
+
import { Arrow as Arrow$1, Content as Content$1, Portal as Portal$1, Root as Root$1, Trigger as Trigger$1 } from "@radix-ui/react-hover-card";
|
|
4
9
|
/**
|
|
5
10
|
* A floating card that appears when a user hovers over a trigger element.
|
|
6
11
|
* This is the root, stateful component that manages the open/closed state of the hover card.
|
|
@@ -28,7 +33,7 @@ import { Arrow, Content, Portal, Root, Trigger } from "@radix-ui/react-hover-car
|
|
|
28
33
|
* </HoverCard.Root>
|
|
29
34
|
* ```
|
|
30
35
|
*/
|
|
31
|
-
declare const Root
|
|
36
|
+
declare const Root: ({ closeDelay, openDelay, ...props }: ComponentProps<typeof Root$1>) => import("react").JSX.Element;
|
|
32
37
|
/**
|
|
33
38
|
* The trigger element that opens the hover card when hovered.
|
|
34
39
|
*
|
|
@@ -48,7 +53,7 @@ declare const Root$1: ({ closeDelay, openDelay, ...props }: ComponentProps<typeo
|
|
|
48
53
|
* </HoverCard.Root>
|
|
49
54
|
* ```
|
|
50
55
|
*/
|
|
51
|
-
declare const Trigger
|
|
56
|
+
declare const Trigger: ({ "data-slot": dataSlot, ...props }: ComponentProps<typeof Trigger$1> & WithDataSlot) => import("react").JSX.Element;
|
|
52
57
|
/**
|
|
53
58
|
* The portal container for rendering hover card content outside the normal DOM tree.
|
|
54
59
|
* `HoverCard.Content` already renders inside this portal internally, so you typically
|
|
@@ -77,7 +82,7 @@ declare const Trigger$1: ({ "data-slot": dataSlot, ...props }: ComponentProps<ty
|
|
|
77
82
|
* </HoverCard.Root>
|
|
78
83
|
* ```
|
|
79
84
|
*/
|
|
80
|
-
declare const Portal
|
|
85
|
+
declare const Portal: ({ container, ...props }: ComponentProps<typeof Portal$1>) => import("react").JSX.Element;
|
|
81
86
|
/**
|
|
82
87
|
* The content to render inside the hover card.
|
|
83
88
|
*
|
|
@@ -108,8 +113,8 @@ declare const Portal$1: ({ container, ...props }: ComponentProps<typeof Portal>)
|
|
|
108
113
|
* </HoverCard.Root>
|
|
109
114
|
* ```
|
|
110
115
|
*/
|
|
111
|
-
declare const Content
|
|
112
|
-
type HoverCardArrowProps = Omit<ComponentProps<typeof Arrow>, "asChild" | "children"> & WithDataSlot;
|
|
116
|
+
declare const Content: ({ "data-slot": dataSlot, className, onClick, onEscapeKeyDown, align, sideOffset, ...props }: ComponentProps<typeof Content$1> & WithDataSlot) => import("react").JSX.Element;
|
|
117
|
+
type HoverCardArrowProps = Omit<ComponentProps<typeof Arrow$1>, "asChild" | "children"> & WithDataSlot;
|
|
113
118
|
/**
|
|
114
119
|
* An optional tip that points from `HoverCard.Content` at its trigger. Render it
|
|
115
120
|
* as a child of `HoverCard.Content`. Radix positions it with floating-ui's arrow
|
|
@@ -133,11 +138,11 @@ type HoverCardArrowProps = Omit<ComponentProps<typeof Arrow>, "asChild" | "child
|
|
|
133
138
|
* </HoverCard.Root>
|
|
134
139
|
* ```
|
|
135
140
|
*/
|
|
136
|
-
declare const Arrow
|
|
141
|
+
declare const Arrow: ({ "data-slot": dataSlot, className, height, width, ...props }: HoverCardArrowProps) => import("react").JSX.Element;
|
|
137
142
|
/**
|
|
138
143
|
* A floating card that appears when a user hovers over a trigger element.
|
|
139
144
|
*
|
|
140
|
-
* Use `HoverCard` for non-essential preview content shown on HOVER
|
|
145
|
+
* Use `HoverCard` for non-essential preview content shown on HOVER: user
|
|
141
146
|
* cards, repo previews, rich link previews. Because hover is not reachable
|
|
142
147
|
* via keyboard, all content inside a `HoverCard` must be supplemental,
|
|
143
148
|
* never the only path to information; the trigger is typically a link that
|
|
@@ -152,6 +157,12 @@ declare const Arrow$1: ({ "data-slot": dataSlot, className, height, width, ...pr
|
|
|
152
157
|
* (`z-60`). When sibling floats share a container, the most recently mounted
|
|
153
158
|
* float paints on top.
|
|
154
159
|
*
|
|
160
|
+
* @useWhen Preview the content behind a link on hover, such as a user card or a repository preview.
|
|
161
|
+
*
|
|
162
|
+
* @siblings
|
|
163
|
+
* - `Tooltip`: the content is a short label or hint with no interactive content.
|
|
164
|
+
* - `Popover`: the user opens interactive content on purpose, with a click or a key.
|
|
165
|
+
*
|
|
155
166
|
* @see https://mantle.ngrok.com/components/overlays/hover-card
|
|
156
167
|
*
|
|
157
168
|
* @example
|
|
@@ -204,7 +215,7 @@ declare const HoverCard: {
|
|
|
204
215
|
* </HoverCard.Root>
|
|
205
216
|
* ```
|
|
206
217
|
*/
|
|
207
|
-
readonly Root: typeof Root
|
|
218
|
+
readonly Root: typeof Root;
|
|
208
219
|
/**
|
|
209
220
|
* An optional tip that points from `HoverCard.Content` at its trigger. It stays
|
|
210
221
|
* centered on the trigger when collision detection shifts or flips the content,
|
|
@@ -228,7 +239,7 @@ declare const HoverCard: {
|
|
|
228
239
|
* </HoverCard.Root>
|
|
229
240
|
* ```
|
|
230
241
|
*/
|
|
231
|
-
readonly Arrow: typeof Arrow
|
|
242
|
+
readonly Arrow: typeof Arrow;
|
|
232
243
|
/**
|
|
233
244
|
* The content to render inside the hover card.
|
|
234
245
|
*
|
|
@@ -261,7 +272,7 @@ declare const HoverCard: {
|
|
|
261
272
|
* </HoverCard.Root>
|
|
262
273
|
* ```
|
|
263
274
|
*/
|
|
264
|
-
readonly Content: typeof Content
|
|
275
|
+
readonly Content: typeof Content;
|
|
265
276
|
/**
|
|
266
277
|
* The portal container for rendering hover card content outside the normal DOM tree.
|
|
267
278
|
* `HoverCard.Content` already renders inside this portal internally, so you typically
|
|
@@ -290,7 +301,7 @@ declare const HoverCard: {
|
|
|
290
301
|
* </HoverCard.Root>
|
|
291
302
|
* ```
|
|
292
303
|
*/
|
|
293
|
-
readonly Portal: typeof Portal
|
|
304
|
+
readonly Portal: typeof Portal;
|
|
294
305
|
/**
|
|
295
306
|
* The trigger element that opens the hover card when hovered.
|
|
296
307
|
*
|
|
@@ -313,6 +324,6 @@ declare const HoverCard: {
|
|
|
313
324
|
* </HoverCard.Root>
|
|
314
325
|
* ```
|
|
315
326
|
*/
|
|
316
|
-
readonly Trigger: typeof Trigger
|
|
327
|
+
readonly Trigger: typeof Trigger;
|
|
317
328
|
};
|
|
318
329
|
export { HoverCard };
|
package/dist/hover-card.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./cx-CK7o_rVv.js";import{t}from"./data-slot-EM6s2WEU.js";import{i as n,n as r}from"./layer-container-
|
|
1
|
+
"use client";import{t as e}from"./cx-CK7o_rVv.js";import{t}from"./data-slot-EM6s2WEU.js";import{i as n,n as r,s as i}from"./layer-container-DL4yclOu.js";import{c as a}from"react/compiler-runtime";import{jsx as o,jsxs as s}from"react/jsx-runtime";import{Arrow as c,Content as l,Portal as u,Root as d,Trigger as f}from"@radix-ui/react-hover-card";const p=e=>{let t=a(8),n,r,i;t[0]===e?(n=t[1],r=t[2],i=t[3]):({closeDelay:r,openDelay:i,...n}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i);let s=r===void 0?300:r,c=i===void 0?100:i,l;return t[4]!==s||t[5]!==c||t[6]!==n?(l=/* @__PURE__ */ o(d,{closeDelay:s,openDelay:c,...n}),t[4]=s,t[5]=c,t[6]=n,t[7]=l):l=t[7],l},m=e=>{let n=a(8),r,i;n[0]===e?(r=n[1],i=n[2]):({"data-slot":r,...i}=e,n[0]=e,n[1]=r,n[2]=i);let s;n[3]===r?s=n[4]:(s=t(r,`hover-card-trigger`),n[3]=r,n[4]=s);let c;return n[5]!==i||n[6]!==s?(c=/* @__PURE__ */ o(f,{"data-slot":s,...i}),n[5]=i,n[6]=s,n[7]=c):c=n[7],c},h=e=>{let t=a(9),n,s;t[0]===e?(n=t[1],s=t[2]):({container:n,...s}=e,t[0]=e,t[1]=n,t[2]=s);let c=i(),l=n??c,d;t[3]!==s||t[4]!==l?(d=/* @__PURE__ */ o(u,{container:l,...s}),t[3]=s,t[4]=l,t[5]=d):d=t[5];let f;return t[6]!==l||t[7]!==d?(f=/* @__PURE__ */ o(r.Provider,{value:l,children:d}),t[6]=l,t[7]=d,t[8]=f):f=t[8],f},g={Root:p,Arrow:n=>{let r=a(20),i,l,u,d,f;r[0]===n?(i=r[1],l=r[2],u=r[3],d=r[4],f=r[5]):({"data-slot":l,className:i,height:d,width:f,...u}=n,r[0]=n,r[1]=i,r[2]=l,r[3]=u,r[4]=d,r[5]=f);let p=d===void 0?7:d,m=f===void 0?14:f,h;r[6]===l?h=r[7]:(h=t(l,`hover-card-arrow`),r[6]=l,r[7]=h);let g;r[8]===i?g=r[9]:(g=e(`fill-(--background-color-popover)`,`[clip-path:inset(0_-200%_-200%_-200%)]`,`filter-[drop-shadow(0_0_4px_color-mix(in_oklab,var(--shadow-color)_var(--shadow-first-opacity),transparent))]`,i),r[8]=i,r[9]=g);let _,v;r[10]===Symbol.for(`react.memo_cache_sentinel`)?(_=/* @__PURE__ */ o(`polygon`,{points:`0,0 30,0 15,10`}),v=/* @__PURE__ */ o(`polyline`,{className:`stroke-(--border-color-popover)`,fill:`none`,points:`0,0 15,10 30,0`,strokeWidth:1.5,vectorEffect:`non-scaling-stroke`}),r[10]=_,r[11]=v):(_=r[10],v=r[11]);let y;r[12]===g?y=r[13]:(y=/* @__PURE__ */ s(`svg`,{className:g,children:[_,v]}),r[12]=g,r[13]=y);let b;return r[14]!==p||r[15]!==u||r[16]!==h||r[17]!==y||r[18]!==m?(b=/* @__PURE__ */ o(c,{"aria-hidden":`true`,asChild:!0,"data-slot":h,height:p,width:m,...u,children:y}),r[14]=p,r[15]=u,r[16]=h,r[17]=y,r[18]=m,r[19]=b):b=r[19],b},Content:r=>{let i=a(22),s,c,u,d,f,p,m;i[0]===r?(s=i[1],c=i[2],u=i[3],d=i[4],f=i[5],p=i[6],m=i[7]):({"data-slot":c,className:s,onClick:u,onEscapeKeyDown:d,align:p,sideOffset:m,...f}=r,i[0]=r,i[1]=s,i[2]=c,i[3]=u,i[4]=d,i[5]=f,i[6]=p,i[7]=m);let g=p===void 0?`center`:p,_=m===void 0?4:m,v=n(d),y;i[8]===c?y=i[9]:(y=t(c,`hover-card-content`),i[8]=c,i[9]=y);let b;i[10]===s?b=i[11]:(b=e(`relative`,`bg-popover border-popover z-50 w-64 rounded-md border p-4 shadow-md outline-hidden`,`data-state-open:animate-in data-state-closed:animate-out data-state-closed:fade-out-0 data-state-open:fade-in-0 data-state-closed:zoom-out-95 data-state-open:zoom-in-95 data-side-bottom:slide-in-from-top-1 data-side-left:slide-in-from-right-1 data-side-right:slide-in-from-left-1 data-side-top:slide-in-from-bottom-1 data-side-bottom:slide-out-to-top-1 data-side-left:slide-out-to-right-1 data-side-right:slide-out-to-left-1 data-side-top:slide-out-to-bottom-1 duration-200 ease-out-strong data-state-closed:duration-150 motion-reduce:animate-none!`,s),i[10]=s,i[11]=b);let x;i[12]===u?x=i[13]:(x=e=>{e.stopPropagation(),u?.(e)},i[12]=u,i[13]=x);let S;return i[14]!==g||i[15]!==v||i[16]!==f||i[17]!==_||i[18]!==y||i[19]!==b||i[20]!==x?(S=/* @__PURE__ */ o(h,{children:/* @__PURE__ */ o(l,{"data-slot":y,align:g,sideOffset:_,className:b,onClick:x,onEscapeKeyDown:v,...f})}),i[14]=g,i[15]=v,i[16]=f,i[17]=_,i[18]=y,i[19]=b,i[20]=x,i[21]=S):S=i[21],S},Portal:h,Trigger:m};export{g as HoverCard};
|
|
@@ -13,7 +13,7 @@ import { ComponentProps } from "react";
|
|
|
13
13
|
type SvgAttributes = ComponentProps<"svg"> & {
|
|
14
14
|
/**
|
|
15
15
|
* Whether the SVG can receive keyboard focus. Use the string form
|
|
16
|
-
* (`"true"` / `"false"`)
|
|
16
|
+
* (`"true"` / `"false"`): the SVG attribute is serialized as a string and
|
|
17
17
|
* React's boolean form can produce inconsistent output.
|
|
18
18
|
*/
|
|
19
19
|
focusable?: "true" | "false";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as WithDataSlot } from "./data-slot-
|
|
2
|
-
import { t as SvgAttributes } from "./icon
|
|
1
|
+
import { t as WithDataSlot } from "./data-slot-BW8KQ9Xo.js";
|
|
2
|
+
import { t as SvgAttributes } from "./icon--purqHRo.js";
|
|
3
3
|
import { ReactNode } from "react";
|
|
4
4
|
type IconProps = Omit<SvgAttributes, "children"> & {
|
|
5
5
|
/**
|
|
@@ -16,6 +16,12 @@ type IconProps = Omit<SvgAttributes, "children"> & {
|
|
|
16
16
|
* `aria-hidden`. Pass `role="img"` and `aria-label` when the icon is the only
|
|
17
17
|
* thing that conveys its meaning.
|
|
18
18
|
*
|
|
19
|
+
* @useWhen Show an SVG icon, such as a Phosphor icon, beside text or inside a control.
|
|
20
|
+
*
|
|
21
|
+
* @siblings
|
|
22
|
+
* - `IconButton`: the icon is the only content of a button.
|
|
23
|
+
* - `Avatar`: the image represents a person or an account.
|
|
24
|
+
*
|
|
19
25
|
* @see https://mantle.ngrok.com/components/data-display/icon
|
|
20
26
|
*
|
|
21
27
|
* @example
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as WithDataSlot } from "./data-slot-
|
|
2
|
-
import { t as SvgAttributes } from "./icon
|
|
1
|
+
import { t as WithDataSlot } from "./data-slot-BW8KQ9Xo.js";
|
|
2
|
+
import { t as SvgAttributes } from "./icon--purqHRo.js";
|
|
3
3
|
import { ReactNode } from "react";
|
|
4
4
|
type SvgOnlyProps = Omit<SvgAttributes, "children"> & {
|
|
5
5
|
/**
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{t as e}from"./cx-CK7o_rVv.js";import{t}from"./data-slot-EM6s2WEU.js";import{t as n}from"./icon-BudQMD2S.js";import{c as r}from"react/compiler-runtime";import{jsx as i}from"react/jsx-runtime";const a=a=>{let o=r(18),s,c,l,u,d,f;o[0]===a?(s=o[1],c=o[2],l=o[3],u=o[4],d=o[5],f=o[6]):({"data-slot":c,className:s,style:d,svg:f,ref:u,...l}=a,o[0]=a,o[1]=s,o[2]=c,o[3]=l,o[4]=u,o[5]=d,o[6]=f);let p;o[7]===c?p=o[8]:(p=t(c,`icon`),o[7]=c,o[8]=p);let m;o[9]===s?m=o[10]:(m=e(`size-5`,s),o[9]=s,o[10]=m);let h;return o[11]!==l||o[12]!==u||o[13]!==d||o[14]!==f||o[15]!==p||o[16]!==m?(h=/* @__PURE__ */ i(n,{ref:u,"data-slot":p,className:m,style:d,svg:f,...l}),o[11]=l,o[12]=u,o[13]=d,o[14]=f,o[15]=p,o[16]=m,o[17]=h):h=o[17],h};export{a as t};
|
package/dist/icon.d.ts
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Re-exports for the Icon component.
|
|
3
|
+
*
|
|
4
|
+
* @see https://mantle.ngrok.com/components/data-display/icon
|
|
5
|
+
*/
|
|
6
|
+
import { n as IconProps, t as Icon } from "./icon-DuIYoyft.js";
|
|
7
|
+
import { n as SvgOnlyProps, t as SvgOnly } from "./icon-QCm1ui29.js";
|
|
8
|
+
import { t as SvgAttributes } from "./icon--purqHRo.js";
|
|
4
9
|
export { Icon, type IconProps, type SvgAttributes, SvgOnly, type SvgOnlyProps };
|
package/dist/icon.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./icon-
|
|
1
|
+
import{t as e}from"./icon-xb7d9M7X.js";import{t}from"./icon-BudQMD2S.js";export{e as Icon,t as SvgOnly};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{i as e}from"./direction-CvDpql3O.js";import{c as t}from"react/compiler-runtime";import{jsx as n}from"react/jsx-runtime";import{SortAscendingIcon as r}from"@phosphor-icons/react/SortAscending";import{SortDescendingIcon as i}from"@phosphor-icons/react/SortDescending";const a=a=>{let o=t(12),s,c,l;switch(o[0]===a?(s=o[1],c=o[2],l=o[3]):({mode:c,direction:s,...l}=a,o[0]=a,o[1]=s,o[2]=c,o[3]=l),c){case`alphanumeric`:switch(s){case`asc`:{let e;return o[4]===l?e=o[5]:(e=/* @__PURE__ */ n(r,{...l}),o[4]=l,o[5]=e),e}case`desc`:{let e;return o[6]===l?e=o[7]:(e=/* @__PURE__ */ n(i,{...l}),o[6]=l,o[7]=e),e}default:throw Error(`Invalid alphanumeric sorting direction given: "${String(s)}"`)}case`time`:switch(e(s)){case`oldest-to-newest`:{let e;return o[8]===l?e=o[9]:(e=/* @__PURE__ */ n(i,{...l}),o[8]=l,o[9]=e),e}case`newest-to-oldest`:{let e;return o[10]===l?e=o[11]:(e=/* @__PURE__ */ n(r,{...l}),o[10]=l,o[11]=e),e}default:throw Error(`Invalid time sorting direction given: "${s}"`)}}};export{a as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{c as e}from"react/compiler-runtime";import{jsx as t,jsxs as n}from"react/jsx-runtime";function r(r){let i=e(5),a,o,s;i[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=/* @__PURE__ */ t(`path`,{fill:`none`,d:`M0 0h256v256H0z`}),o=/* @__PURE__ */ t(`path`,{d:`m213.7 82.3-56-56c-1.5-1.5-3.5-2.3-5.7-2.3H56c-8.8 0-16 7.2-16 16v88c0 4.4 3.6 8 8 8s8-3.6 8-8V40h88v48c0 4.4 3.6 8 8 8h48v120h-40c-4.4 0-8 3.6-8 8s3.6 8 8 8h40c8.8 0 16-7.2 16-16V88c0-2.1-.8-4.2-2.3-5.7zm-53.7-31L188.7 80H160V51.3z`}),s=/* @__PURE__ */ t(`path`,{d:`M124.6 194.5h-6.8v-27.3h6.8c1.9 0 3.4-1.5 3.4-3.4s-1.5-3.4-3.4-3.4h-6.8v-10.2c0-3.8-3.1-6.8-6.8-6.8H63.3c-3.8 0-6.8 3.1-6.8 6.8v10.2h-6.8c-1.9 0-3.4 1.5-3.4 3.4s1.5 3.4 3.4 3.4h6.8v27.3h-6.8c-1.9 0-3.4 1.5-3.4 3.4s1.5 3.4 3.4 3.4h6.8v23.9c0 3.8 3.1 6.8 6.8 6.8H111c3.8 0 6.8-3.1 6.8-6.8v-23.9h6.8c1.9 0 3.4-1.5 3.4-3.4s-1.5-3.4-3.4-3.4zm-37.5-11.9c-6.6 0-11.9-5.3-11.9-11.9s5.3-11.9 11.9-11.9S99 164.1 99 170.7s-5.3 11.9-11.9 11.9zm0 10.2c6.6 0 11.9 5.3 11.9 11.9s-5.3 11.9-11.9 11.9-11.9-5.3-11.9-11.9 5.3-11.9 11.9-11.9z`}),i[0]=a,i[1]=o,i[2]=s):(a=i[0],o=i[1],s=i[2]);let c;return i[3]===r?c=i[4]:(c=/* @__PURE__ */ n(`svg`,{fill:`currentColor`,height:`1em`,viewBox:`0 0 256 256`,width:`1em`,...r,children:[a,o,s]}),i[3]=r,i[4]=c),c}export{r as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{s as e}from"./theme-BNdZl352.js";import{c as t}from"react/compiler-runtime";import{jsx as n}from"react/jsx-runtime";import{DesktopIcon as r}from"@phosphor-icons/react/Desktop";import{MoonIcon as i}from"@phosphor-icons/react/Moon";import{SunIcon as a}from"@phosphor-icons/react/Sun";function o(r){let i=t(3),a=e(),o;return i[0]!==a||i[1]!==r?(o=/* @__PURE__ */ n(s,{theme:a,...r}),i[0]=a,i[1]=r,i[2]=o):o=i[2],o}function s(e){let o=t(9),s,c;switch(o[0]===e?(s=o[1],c=o[2]):({theme:c,...s}=e,o[0]=e,o[1]=s,o[2]=c),c){case`system`:{let e;return o[3]===s?e=o[4]:(e=/* @__PURE__ */ n(r,{...s}),o[3]=s,o[4]=e),e}case`light`:{let e;return o[5]===s?e=o[6]:(e=/* @__PURE__ */ n(a,{...s}),o[5]=s,o[6]=e),e}case`dark`:{let e;return o[7]===s?e=o[8]:(e=/* @__PURE__ */ n(i,{...s}),o[7]=s,o[8]=e),e}}}export{s as n,o as t};
|
package/dist/icons.d.ts
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Re-exports for the Icons component: the ngrok-specific icons that
|
|
3
|
+
* `@phosphor-icons/react` does not ship.
|
|
4
|
+
*
|
|
5
|
+
* @useWhen Show an ngrok glyph that `@phosphor-icons/react` does not ship, such as the ngrok
|
|
6
|
+
* wordmark or the icon for a traffic policy file.
|
|
7
|
+
*
|
|
8
|
+
* @siblings
|
|
9
|
+
* - `Icon`: the glyph comes from `@phosphor-icons/react`.
|
|
10
|
+
*
|
|
11
|
+
* @see https://mantle.ngrok.com/components/data-display/icons
|
|
12
|
+
*/
|
|
2
13
|
import { a as AlphanumericSortingDirection, c as TimeSortingDirection, o as SortingDirection, s as SortingMode } from "./direction-CpRzTtZh.js";
|
|
14
|
+
import { t as SvgAttributes } from "./icon--purqHRo.js";
|
|
3
15
|
import { i as Theme } from "./theme-w1CrMM-x.js";
|
|
4
16
|
import { ComponentProps } from "react";
|
|
5
17
|
type Props = SvgAttributes & ({
|
package/dist/icons.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as e}from"./icons-
|
|
1
|
+
"use client";import{t as e}from"./icons-DEDCLZ8B.js";import{t}from"./icons-DXadFwpo.js";import{n,t as r}from"./icons-DcesO4Ng.js";import{c as i}from"react/compiler-runtime";import{jsx as a}from"react/jsx-runtime";function o(e){let t=i(3),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=/* @__PURE__ */ a(`path`,{d:`M32.272 12.011c-1.298-1.466-2.904-2.205-4.812-2.205-1.176 0-2.26.233-3.255.7a7.995 7.995 0 0 0-2.581 1.906 9.205 9.205 0 0 0-1.715 2.853 9.773 9.773 0 0 0-.628 3.546c0 1.25.194 2.39.58 3.419.362.98.918 1.877 1.635 2.636A7.543 7.543 0 0 0 24 26.584c.965.41 2.025.617 3.176.617.522 0 1.005-.041 1.445-.116.439-.075.858-.2 1.26-.37.4-.175.79-.398 1.18-.664.385-.27.792-.612 1.21-1.018v4.353h-.005v.421h-5.33l-4.005 4.64v.798h15.037v-24.98h-5.697v1.746Zm-.014 7.979a4.25 4.25 0 0 1-.786 1.215 3.555 3.555 0 0 1-2.592 1.1 3.627 3.627 0 0 1-1.464-.292 3.508 3.508 0 0 1-1.166-.808 3.93 3.93 0 0 1-1.054-2.72c0-.519.097-1.006.298-1.457a3.77 3.77 0 0 1 .804-1.181 4.114 4.114 0 0 1 1.162-.808 3.484 3.484 0 0 1 2.817-.016c.448.19.844.463 1.181.81.336.347.6.743.804 1.194.202.452.298.95.298 1.493 0 .505-.104 1.005-.302 1.47m-16.261-7.708a6.173 6.173 0 0 0-2.06-1.602 4.875 4.875 0 0 0-.57-.22 6.383 6.383 0 0 0-.923-.216H8.383L5.697 13.39v-3.082H.002v16.61h5.695V15.712h5.35l.444-.01v11.214h5.697V16.528c0-.885-.084-1.674-.25-2.366a4.655 4.655 0 0 0-.941-1.877zm38.367-2.018h-6.213l-2.47 2.863v-2.864h-5.7v16.61h5.71l.004-11.117h4.144l4.526-5.26zm31.051 7.672 7.79-7.392v-.281H85.7l-5.975 5.991V0h-5.696v26.87h5.696v-6.766l6.262 6.763h7.663v-.316l-8.233-8.617zm-16.11-5.78a9.436 9.436 0 0 0-3.085-1.842 10.953 10.953 0 0 0-3.855-.664c-1.407 0-2.705.226-3.884.678a9.611 9.611 0 0 0-3.072 1.858 8.488 8.488 0 0 0-2.016 2.788 8.281 8.281 0 0 0-.722 3.449c0 1.362.24 2.596.722 3.707a8.52 8.52 0 0 0 2.002 2.862c.85.798 1.86 1.415 3.036 1.847 1.177.432 2.455.647 3.842.647 1.406 0 2.707-.215 3.919-.647 1.204-.431 2.24-1.04 3.098-1.833a8.583 8.583 0 0 0 2.031-2.816c.493-1.09.742-2.29.742-3.611 0-1.316-.244-2.52-.722-3.612a8.424 8.424 0 0 0-2.035-2.81Zm-3.558 7.864c-.2.461-.463.869-.786 1.215a3.573 3.573 0 0 1-2.592 1.1c-.502 0-.981-.096-1.434-.291a3.44 3.44 0 0 1-1.16-.809 4.155 4.155 0 0 1-.788-1.215 3.825 3.825 0 0 1-.297-1.537c0-.517.098-1.004.297-1.456.201-.451.46-.849.787-1.194a3.579 3.579 0 0 1 2.597-1.1c.502 0 .98.096 1.43.29.448.19.839.461 1.16.81.328.345.586.752.786 1.214.2.461.297.954.297 1.471 0 .538-.096 1.04-.297 1.502`}),t[0]=n):n=t[0];let r;return t[1]===e?r=t[2]:(r=/* @__PURE__ */ a(`svg`,{fill:`currentColor`,height:`1em`,viewBox:`0 0 94 36`,width:`2.61em`,...e,children:n}),t[1]=e,t[2]=r),r}function s(e){let t=i(3),n;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(n=/* @__PURE__ */ a(`path`,{d:`M27.2 6.18a9.47 9.47 0 0 0-3.12-2.5A9.42 9.42 0 0 0 21.82 3h-6.14l-4.06 4.9V3.1H3V29h8.62V11.53h8.09l.67-.02v17.48H29V12.8c0-1.37-.13-2.6-.38-3.68a7.35 7.35 0 0 0-1.42-2.93Z`}),t[0]=n):n=t[0];let r;return t[1]===e?r=t[2]:(r=/* @__PURE__ */ a(`svg`,{fill:`currentColor`,height:`1em`,viewBox:`0 0 32 32`,width:`1em`,...e,children:n}),t[1]=e,t[2]=r),r}export{r as AutoThemeIcon,s as NgrokLettermarkIcon,o as NgrokWordmarkIcon,e as SortIcon,n as ThemeIcon,t as TrafficPolicyFileIcon};
|
|
@@ -5,9 +5,10 @@ import { Ref, RefCallback } from "react";
|
|
|
5
5
|
* browsers.
|
|
6
6
|
*
|
|
7
7
|
* Throws when called outside a DOM environment, or when both the Clipboard
|
|
8
|
-
* API and the polyfill fail
|
|
8
|
+
* API and the polyfill fail. `await` the call to observe success.
|
|
9
9
|
*/
|
|
10
10
|
declare function copyToClipboard(value: string): Promise<void>;
|
|
11
|
+
/** A ref that a part may receive: a callback ref, a ref object, or none. */
|
|
11
12
|
type PossibleRef<T> = Ref<T> | undefined;
|
|
12
13
|
/**
|
|
13
14
|
* A utility that composes multiple refs into a single callback ref. Accepts
|
|
@@ -20,7 +21,7 @@ type PossibleRef<T> = Ref<T> | undefined;
|
|
|
20
21
|
* If no inner ref returns a cleanup, the composed ref returns `undefined`
|
|
21
22
|
* and React calls it again with `null` on unmount (legacy behavior).
|
|
22
23
|
*
|
|
23
|
-
* Prefer {@link useComposedRefs} inside components
|
|
24
|
+
* Prefer {@link useComposedRefs} inside components: it keeps a stable
|
|
24
25
|
* function identity across renders.
|
|
25
26
|
*
|
|
26
27
|
* @example
|
|
@@ -28,26 +29,6 @@ type PossibleRef<T> = Ref<T> | undefined;
|
|
|
28
29
|
* return <input ref={setRefs} />;
|
|
29
30
|
*/
|
|
30
31
|
declare function composeRefs<T>(...refs: PossibleRef<T>[]): RefCallback<T>;
|
|
31
|
-
/**
|
|
32
|
-
* A custom hook that composes up to three refs into a single callback ref.
|
|
33
|
-
* Accepts callback refs and RefObject(s). The callback keeps one identity
|
|
34
|
-
* while the refs it composes keep theirs, so React attaches it once per
|
|
35
|
-
* mount. If you pass a new ref on a later render, React detaches the old
|
|
36
|
-
* callback and attaches the new one, so the new ref receives the node at
|
|
37
|
-
* once. A consumer callback ref fires once per mount when the consumer
|
|
38
|
-
* passes the same function each render, and on every render when the
|
|
39
|
-
* consumer passes a new function, as it does on a plain element. Any
|
|
40
|
-
* cleanup the composed ref returns targets the refs it composed (see
|
|
41
|
-
* {@link composeRefs} for the cleanup propagation contract).
|
|
42
|
-
*
|
|
43
|
-
* @example
|
|
44
|
-
* function MyInput({ ref, ...props }: ComponentProps<"input">) {
|
|
45
|
-
* const internalRef = useRef<HTMLInputElement>(null);
|
|
46
|
-
* const composedRef = useComposedRefs(internalRef, ref);
|
|
47
|
-
* return <input ref={composedRef} {...props} />;
|
|
48
|
-
* }
|
|
49
|
-
*/
|
|
50
|
-
declare function useComposedRefs<T>(firstRef: PossibleRef<T>, secondRef: PossibleRef<T>, thirdRef?: PossibleRef<T>): RefCallback<T>;
|
|
51
32
|
type MarginValue = `${number}${"px" | "%"}`;
|
|
52
33
|
/**
|
|
53
34
|
* Margin string used to expand or contract the intersection root's bounding box.
|
|
@@ -110,4 +91,4 @@ type ViewChangeHandler = (entry: IntersectionObserverEntry) => void;
|
|
|
110
91
|
* stop();
|
|
111
92
|
*/
|
|
112
93
|
declare function inView(element: Element, onStart: (element: Element, entry: IntersectionObserverEntry) => void | ViewChangeHandler, { root, margin: rootMargin, amount }?: InViewOptions): VoidFunction;
|
|
113
|
-
export {
|
|
94
|
+
export { PossibleRef as a, inView as i, MarginType as n, composeRefs as o, ViewChangeHandler as r, copyToClipboard as s, InViewOptions as t };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./as-child-DFxX3U2i.js";
|
|
2
2
|
import "./with-style-props-CuT30s0W.js";
|
|
3
3
|
import { CSSProperties } from "react";
|
|
4
|
-
import { VariantProps } from "class-variance-authority";
|
|
4
|
+
import { VariantProps as VariantProps$1 } from "class-variance-authority";
|
|
5
5
|
type Booleanish = boolean | "true" | "false";
|
|
6
6
|
/**
|
|
7
7
|
* Parse/coerce a booleanish value (boolean | "true" | "false") into a boolean.
|
|
@@ -17,7 +17,7 @@ type DeepNonNullable<Type> = { [Property in keyof Type]-?: Type[Property] & {};
|
|
|
17
17
|
*
|
|
18
18
|
* Using VariantProps directly from CVA produces that can be `null`, which is not what we want.
|
|
19
19
|
*/
|
|
20
|
-
type VariantProps
|
|
20
|
+
type VariantProps<Variants extends (props: Record<PropertyKey, unknown> | undefined) => string> = Partial<DeepNonNullable<VariantProps$1<Variants>>>;
|
|
21
21
|
/**
|
|
22
22
|
* A CSS custom property (CSS variable) name.
|
|
23
23
|
*
|
|
@@ -51,4 +51,4 @@ type CssProperties = CSSProperties & Record<CssVariableName, string | number>;
|
|
|
51
51
|
* style={$cssProperties({ display: "block", "--gap": 8, ...style })}
|
|
52
52
|
*/
|
|
53
53
|
declare const $cssProperties: (input: CssProperties) => CSSProperties;
|
|
54
|
-
export { Booleanish as a, DeepNonNullable as i, CssProperties as n, parseBooleanish as o, VariantProps
|
|
54
|
+
export { Booleanish as a, DeepNonNullable as i, CssProperties as n, parseBooleanish as o, VariantProps as r, $cssProperties as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e={"data-1p-ignore":!0,"data-bwignore":!0,"data-form-type":`other`,"data-lpignore":`true`,"data-protonpass-ignore":!0};export{e as t};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as WithDataSlot } from "./data-slot-
|
|
2
|
-
import { o as WithValidation } from "./field-
|
|
1
|
+
import { t as WithDataSlot } from "./data-slot-BW8KQ9Xo.js";
|
|
2
|
+
import { o as WithValidation } from "./field-BshcNVe_.js";
|
|
3
3
|
import { ComponentProps, PropsWithChildren } from "react";
|
|
4
4
|
/**
|
|
5
5
|
* (Not a Boolean attribute!) The autocomplete attribute takes as its value a space-separated string that describes what,
|
|
@@ -54,6 +54,16 @@ type InputProps = Omit<ComponentProps<"input">, "autoComplete" | "type"> & BaseP
|
|
|
54
54
|
* An interactive form control that accepts data from the user. Supports many
|
|
55
55
|
* input types and validation states, and composes with adornment children.
|
|
56
56
|
*
|
|
57
|
+
* @useWhen Accept one line of text from the user, such as a name, an email address, a URL, or a
|
|
58
|
+
* search term.
|
|
59
|
+
*
|
|
60
|
+
* @siblings
|
|
61
|
+
* - `TextArea`: the text spans several lines.
|
|
62
|
+
* - `PasswordInput`: the value is a password or another secret.
|
|
63
|
+
* - `OtpInput`: the value is a one-time passcode.
|
|
64
|
+
* - `Combobox`: the user picks the value from a list of suggestions.
|
|
65
|
+
* - `Query`: the field filters a list with free text and `key:value` qualifiers.
|
|
66
|
+
*
|
|
57
67
|
* @see https://mantle.ngrok.com/components/forms/input
|
|
58
68
|
*
|
|
59
69
|
* @example
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{t as e}from"./booleanish-BfvnW6vy.js";import{t}from"./use-composed-refs-DPYmLDSe.js";import{t as n}from"./clsx-DUGZgXfJ.js";import{t as r}from"./cx-CK7o_rVv.js";import{t as i}from"./data-slot-EM6s2WEU.js";import{a,r as o}from"./field-Bpvn4tQp.js";import{t as s}from"./icon-xb7d9M7X.js";import{c}from"react/compiler-runtime";import{createContext as l,useContext as u,useRef as d}from"react";import{jsx as f,jsxs as p}from"react/jsx-runtime";import{CheckCircleIcon as m}from"@phosphor-icons/react/CheckCircle";import{WarningIcon as h}from"@phosphor-icons/react/Warning";import{WarningDiamondIcon as g}from"@phosphor-icons/react/WarningDiamond";const _=e=>{let t=c(17),n,r,i,a;t[0]===e?(n=t[1],r=t[2],i=t[3],a=t[4]):({children:n,className:r,ref:a,...i}=e,t[0]=e,t[1]=n,t[2]=r,t[3]=i,t[4]=a);let o=!!n,s=d(null);if(o){let e;return t[5]!==n||t[6]!==r||t[7]!==i||t[8]!==a?(e=/* @__PURE__ */ f(b,{className:r,forwardedRef:a,innerRef:s,...i,children:n}),t[5]=n,t[6]=r,t[7]=i,t[8]=a,t[9]=e):e=t[9],e}let l;t[10]===i?l=t[11]:(l=/* @__PURE__ */ f(v,{...i}),t[10]=i,t[11]=l);let u;return t[12]!==r||t[13]!==i||t[14]!==a||t[15]!==l?(u=/* @__PURE__ */ f(b,{...i,className:r,forwardedRef:a,innerRef:s,children:l}),t[12]=r,t[13]=i,t[14]=a,t[15]=l,t[16]=u):u=t[16],u},v=e=>{let n=c(31),s,l,d,p,m,h;n[0]===e?(s=n[1],l=n[2],d=n[3],p=n[4],m=n[5],h=n[6]):({"aria-invalid":s,"data-slot":p,className:d,ref:m,validation:l,...h}=e,n[0]=e,n[1]=s,n[2]=l,n[3]=d,n[4]=p,n[5]=m,n[6]=h);let g=u(y),_,v,b,x,S;n[7]===g?(_=n[8],v=n[9],b=n[10],x=n[11],S=n[12]):({"aria-invalid":v,forwardedRef:b,innerRef:x,validation:S,..._}=g,n[7]=g,n[8]=_,n[9]=v,n[10]=b,n[11]=x,n[12]=S);let C=a(),w=v??s,T=S??l??C,E;n[13]!==w||n[14]!==T?(E=o({"aria-invalid":w,validation:T}),n[13]=w,n[14]=T,n[15]=E):E=n[15];let{ariaInvalid:D,validation:O}=E,k=h.type??_.type??`text`,A;n[16]!==_||n[17]!==h||n[18]!==k?(A={..._,...h,type:k},n[16]=_,n[17]=h,n[18]=k,n[19]=A):A=n[19];let j=A,M=t(m,b,x),N;n[20]===p?N=n[21]:(N=i(p,`input-capture`),n[20]=p,n[21]=N);let P;n[22]===d?P=n[23]:(P=r(`placeholder:text-placeholder min-w-0 flex-1 bg-transparent text-left autofill:shadow-[inset_0_0_0px_1000px_var(--color-blue-50)] focus:outline-hidden`,d),n[22]=d,n[23]=P);let F;return n[24]!==D||n[25]!==M||n[26]!==j||n[27]!==N||n[28]!==P||n[29]!==O?(F=/* @__PURE__ */ f(`input`,{"aria-invalid":D,"data-slot":N,"data-validation":O,className:P,ref:M,...j}),n[24]=D,n[25]=M,n[26]=j,n[27]=N,n[28]=P,n[29]=O,n[30]=F):F=n[30],F},y=l({validation:void 0,innerRef:{current:null}}),b=t=>{let n=c(51),s,l,u,d,m,h,g,_,v,b,S,C;n[0]===t?(s=n[1],l=n[2],u=n[3],d=n[4],m=n[5],h=n[6],g=n[7],_=n[8],v=n[9],b=n[10],S=n[11],C=n[12]):({"aria-invalid":l,"aria-disabled":s,"data-slot":h,children:d,className:m,disabled:g,forwardedRef:_,innerRef:v,style:S,type:C,validation:u,...b}=t,n[0]=t,n[1]=s,n[2]=l,n[3]=u,n[4]=d,n[5]=m,n[6]=h,n[7]=g,n[8]=_,n[9]=v,n[10]=b,n[11]=S,n[12]=C);let w=a(),T=u??w,E;n[13]!==l||n[14]!==T?(E=o({"aria-invalid":l,validation:T}),n[13]=l,n[14]=T,n[15]=E):E=n[15];let{validation:D}=E,O;n[16]!==s||n[17]!==l||n[18]!==u||n[19]!==g||n[20]!==_||n[21]!==v||n[22]!==b||n[23]!==C?(O={"aria-invalid":l,"aria-disabled":s,disabled:g,type:C,validation:u,...b,forwardedRef:_,innerRef:v},n[16]=s,n[17]=l,n[18]=u,n[19]=g,n[20]=_,n[21]=v,n[22]=b,n[23]=C,n[24]=O):O=n[24];let k=O,A;n[25]===h?A=n[26]:(A=i(h,`input`),n[25]=h,n[26]=A);let j;n[27]!==s||n[28]!==g?(j=e(g??s)||void 0,n[27]=s,n[28]=g,n[29]=j):j=n[29];let M=D||void 0,N;n[30]===m?N=n[31]:(N=r(`pointer-coarse:text-base h-9 text-sm`,`bg-form relative flex w-full items-center gap-1.5 rounded-md border px-3 py-2 file:border-0 file:bg-transparent file:text-sm file:font-medium focus-within:outline-hidden focus-within:ring-4`,`data-disabled:opacity-50`,`has-[input:not(:first-child)]:ps-2.5 has-[input:not(:last-child)]:pe-2.5 [&>:not(input)]:shrink-0 [&_svg]:size-5`,`border-form text-strong focus-within:border-accent-600 focus-within:ring-focus-accent`,`data-validation-success:border-success-600 focus-within:data-validation-success:border-success-600 focus-within:data-validation-success:ring-focus-success`,`data-validation-warning:border-warning-600 focus-within:data-validation-warning:border-warning-600 focus-within:data-validation-warning:ring-focus-warning`,`data-validation-error:border-danger-600 focus-within:data-validation-error:border-danger-600 focus-within:data-validation-error:ring-focus-danger motion-safe:data-validation-error:animate-shake`,`has-[>[data-validation=error]]:border-danger-600 focus-within:has-[>[data-validation=error]]:border-danger-600 focus-within:has-[>[data-validation=error]]:ring-focus-danger motion-safe:has-[>[data-validation=error]]:animate-shake`,`autofill:shadow-[inset_0_0_0px_1000px_var(--color-blue-50)] has-autofill:bg-blue-50 has-autofill:[-webkit-text-fill-color:var(--text-color-strong)]`,m),n[30]=m,n[31]=N);let P,F;n[32]===v?(P=n[33],F=n[34]):(P=e=>{e.target!==v?.current&&e.preventDefault()},F=e=>{let t=v.current;t!=null&&e.detail!==0&&t.focus()},n[32]=v,n[33]=P,n[34]=F);let I;n[35]!==b.name||n[36]!==D?(I=/* @__PURE__ */ f(x,{name:b.name,validation:D}),n[35]=b.name,n[36]=D,n[37]=I):I=n[37];let L;n[38]!==d||n[39]!==S||n[40]!==I||n[41]!==A||n[42]!==j||n[43]!==M||n[44]!==N||n[45]!==P||n[46]!==F?(L=/* @__PURE__ */ p(`div`,{role:`none`,"data-slot":A,"data-disabled":j,"data-validation":M,className:N,onMouseDown:P,onClick:F,style:S,children:[d,I]}),n[38]=d,n[39]=S,n[40]=I,n[41]=A,n[42]=j,n[43]=M,n[44]=N,n[45]=P,n[46]=F,n[47]=L):L=n[47];let R;return n[48]!==k||n[49]!==L?(R=/* @__PURE__ */ f(y.Provider,{value:k,children:L}),n[48]=k,n[49]=L,n[50]=R):R=n[50],R},x=e=>{let t=c(9),{name:r,validation:i}=e;switch(i){case`error`:{let e;t[0]===r?e=t[1]:(e=n(`The value entered for the`,r,`input has failed validation.`),t[0]=r,t[1]=e);let i;t[2]===e?i=t[3]:(i=/* @__PURE__ */ f(`span`,{className:`sr-only`,children:e}),t[2]=e,t[3]=i);let a;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(a=/* @__PURE__ */ f(s,{svg:/* @__PURE__ */ f(h,{"aria-hidden":!0,weight:`fill`})}),t[4]=a):a=t[4];let o;return t[5]===i?o=t[6]:(o=/* @__PURE__ */ p(`div`,{className:`text-danger-600 order-last select-none`,children:[i,a]}),t[5]=i,t[6]=o),o}case`success`:{let e;return t[7]===Symbol.for(`react.memo_cache_sentinel`)?(e=/* @__PURE__ */ f(`div`,{className:`text-success-600 order-last select-none`,children:/* @__PURE__ */ f(s,{svg:/* @__PURE__ */ f(m,{weight:`fill`})})}),t[7]=e):e=t[7],e}case`warning`:{let e;return t[8]===Symbol.for(`react.memo_cache_sentinel`)?(e=/* @__PURE__ */ f(`div`,{className:`text-warning-600 order-last select-none`,children:/* @__PURE__ */ f(s,{svg:/* @__PURE__ */ f(g,{weight:`fill`})})}),t[8]=e):e=t[8],e}default:return null}};export{v as n,_ as t};
|
package/dist/input.d.ts
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Re-exports for the Input component family.
|
|
3
|
+
*
|
|
4
|
+
* @see https://mantle.ngrok.com/components/forms/input
|
|
5
|
+
* @see https://mantle.ngrok.com/components/forms/password-input
|
|
6
|
+
*/
|
|
7
|
+
import { a as AutoComplete, c as WithInputType, i as InputProps, n as InputCapture, o as InputType, r as InputCaptureProps, s as WithAutoComplete, t as Input } from "./input-DC4nW0Sr.js";
|
|
8
|
+
import { o as WithValidation, r as Validation } from "./field-BshcNVe_.js";
|
|
9
|
+
import { t as WithDataSlot } from "./data-slot-BW8KQ9Xo.js";
|
|
4
10
|
import { ComponentProps } from "react";
|
|
5
11
|
/**
|
|
6
12
|
* The props for the `PasswordInput` component.
|
|
@@ -61,6 +67,12 @@ type PasswordInputProps = Omit<ComponentProps<"input">, "autoComplete" | "type">
|
|
|
61
67
|
* `type="text"`. Some password managers may pause autofill in this state,
|
|
62
68
|
* which is the intended security trade-off.
|
|
63
69
|
*
|
|
70
|
+
* @useWhen Accept a password or another secret value, with a button that shows or hides it.
|
|
71
|
+
*
|
|
72
|
+
* @siblings
|
|
73
|
+
* - `Input`: the value is never sensitive.
|
|
74
|
+
* - `OtpInput`: the value is a one-time passcode.
|
|
75
|
+
*
|
|
64
76
|
* @see https://mantle.ngrok.com/components/forms/password-input
|
|
65
77
|
*
|
|
66
78
|
* @example
|
|
@@ -69,7 +81,7 @@ type PasswordInputProps = Omit<ComponentProps<"input">, "autoComplete" | "type">
|
|
|
69
81
|
* import { Label } from "@ngrok/mantle/label";
|
|
70
82
|
* import { useState } from "react";
|
|
71
83
|
*
|
|
72
|
-
* // Basic
|
|
84
|
+
* // Basic: uncontrolled visibility.
|
|
73
85
|
* <Label className="grid gap-1">
|
|
74
86
|
* <span>Password</span>
|
|
75
87
|
* <PasswordInput name="password" autoComplete="current-password" />
|
|
@@ -78,7 +90,7 @@ type PasswordInputProps = Omit<ComponentProps<"input">, "autoComplete" | "type">
|
|
|
78
90
|
* // Validation state.
|
|
79
91
|
* <PasswordInput validation="error" />
|
|
80
92
|
*
|
|
81
|
-
* // Controlled visibility
|
|
93
|
+
* // Controlled visibility: one toggle reveals multiple fields.
|
|
82
94
|
* function PasswordPair() {
|
|
83
95
|
* const [show, setShow] = useState(false);
|
|
84
96
|
* return (
|
|
@@ -107,4 +119,24 @@ declare const PasswordInput: ({ "data-slot": dataSlot, disabled, id: idProp, onV
|
|
|
107
119
|
* ```
|
|
108
120
|
*/
|
|
109
121
|
export declare function isInput(value: unknown): value is HTMLInputElement;
|
|
122
|
+
/**
|
|
123
|
+
* Attributes that tell 1Password, Bitwarden, Dashlane, LastPass, and Proton
|
|
124
|
+
* Pass to skip an input: no badge, no fill, no save prompt. Spread them on an
|
|
125
|
+
* input that is not a credential, such as a search or filter box.
|
|
126
|
+
*
|
|
127
|
+
* Do not spread them on a one-time-code input. Most of these managers fill
|
|
128
|
+
* one-time codes, and an ignore attribute stops that fill.
|
|
129
|
+
*
|
|
130
|
+
* @example
|
|
131
|
+
* ```tsx
|
|
132
|
+
* <Input type="search" aria-label="Search" {...passwordManagerIgnoreProps} />
|
|
133
|
+
* ```
|
|
134
|
+
*/
|
|
135
|
+
export declare const passwordManagerIgnoreProps: {
|
|
136
|
+
readonly "data-1p-ignore": true;
|
|
137
|
+
readonly "data-bwignore": true;
|
|
138
|
+
readonly "data-form-type": "other";
|
|
139
|
+
readonly "data-lpignore": "true";
|
|
140
|
+
readonly "data-protonpass-ignore": true;
|
|
141
|
+
};
|
|
110
142
|
export { type AutoComplete, Input, InputCapture, type InputCaptureProps, type InputProps, type InputType, PasswordInput, type PasswordInputProps, type Validation, type WithAutoComplete, type WithInputType, type WithValidation };
|
package/dist/input.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
"use client";import{n as e,t}from"./input-fW8QSZEO.js";import{t as n}from"./use-isomorphic-layout-effect-CL6iq0Bj.js";import{t as r}from"./use-prefers-reduced-motion-Ck6dnOM9.js";import{t as i}from"./icon-xb7d9M7X.js";import{t as a}from"./data-slot-EM6s2WEU.js";import{t as o}from"./input-DQyN6gN0.js";import{t as s}from"./input-BjCDSOPA.js";import{c}from"react/compiler-runtime";import{useId as l,useRef as u,useState as d}from"react";import{jsx as f,jsxs as p}from"react/jsx-runtime";import{EyeIcon as m}from"@phosphor-icons/react/Eye";import{EyeClosedIcon as h}from"@phosphor-icons/react/EyeClosed";const g=o=>{let s=c(34),g,_,v,y,b,x,S;s[0]===o?(g=s[1],_=s[2],v=s[3],y=s[4],b=s[5],x=s[6],S=s[7]):({"data-slot":g,disabled:_,id:v,onValueVisibilityChange:y,ref:x,showValue:S,...b}=o,s[0]=o,s[1]=g,s[2]=_,s[3]=v,s[4]=y,s[5]=b,s[6]=x,s[7]=S);let C=l(),w=v??C,T=S!=null,[E,D]=d(!1),O=T?S:E,k=O?`text`:`password`,A=O?m:h,j=u(null),M=u(O),N,P;s[8]===O?(N=s[9],P=s[10]):(N=()=>{if(M.current===O)return;M.current=O;let e=j.current;e==null||r()||e.animate([{scale:`1 0.5`},{scale:`1`}],{duration:200,easing:`cubic-bezier(0.23, 1, 0.32, 1)`})},P=[O],s[8]=O,s[9]=N,s[10]=P),n(N,P);let F;s[11]===g?F=s[12]:(F=a(g,`password-input`),s[11]=g,s[12]=F);let I;s[13]===Symbol.for(`react.memo_cache_sentinel`)?(I=/* @__PURE__ */ f(e,{}),s[13]=I):I=s[13];let L;s[14]!==T||s[15]!==y||s[16]!==O?(L=()=>{let e=!O;T||D(e),y?.(e)},s[14]=T,s[15]=y,s[16]=O,s[17]=L):L=s[17];let R;s[18]===A?R=s[19]:(R=/* @__PURE__ */ f(i,{ref:j,svg:/* @__PURE__ */ f(A,{"aria-hidden":!0})}),s[18]=A,s[19]=R);let z;s[20]!==_||s[21]!==w||s[22]!==O||s[23]!==L||s[24]!==R?(z=/* @__PURE__ */ f(`button`,{type:`button`,disabled:_,"data-slot":`password-input-toggle`,"aria-label":`Show value`,"aria-pressed":O,"aria-controls":w,className:`text-body hover:text-strong focus-visible:ring-focus-accent ml-1 cursor-pointer rounded-xs bg-inherit p-0 focus-visible:ring-2 focus-visible:outline-hidden`,onClick:L,children:R}),s[20]=_,s[21]=w,s[22]=O,s[23]=L,s[24]=R,s[25]=z):z=s[25];let B;return s[26]!==_||s[27]!==w||s[28]!==b||s[29]!==x||s[30]!==F||s[31]!==z||s[32]!==k?(B=/* @__PURE__ */ p(t,{"data-slot":F,disabled:_,id:w,type:k,ref:x,...b,children:[I,z]}),s[26]=_,s[27]=w,s[28]=b,s[29]=x,s[30]=F,s[31]=z,s[32]=k,s[33]=B):B=s[33],B};export{t as Input,e as InputCapture,g as PasswordInput,o as isInput,s as passwordManagerIgnoreProps};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{t as e}from"./cx-CK7o_rVv.js";import{t}from"./data-slot-EM6s2WEU.js";import{c as n}from"react/compiler-runtime";import{jsx as r}from"react/jsx-runtime";function i(i){let a=n(14),o,s,c,l;a[0]===i?(o=a[1],s=a[2],c=a[3],l=a[4]):({"data-slot":c,children:o,className:s,...l}=i,a[0]=i,a[1]=o,a[2]=s,a[3]=c,a[4]=l);let u;a[5]===c?u=a[6]:(u=t(c,`kbd`),a[5]=c,a[6]=u);let d;a[7]===s?d=a[8]:(d=e(`[font-kerning:normal] [font-variant-ligatures:common-ligatures_contextual]`,`appearance-none tabular-nums inline-grid place-items-center size-5 bg-neutral-500/15 px-1 rounded text-mono leading-none font-mono`,s),a[7]=s,a[8]=d);let f;return a[9]!==o||a[10]!==l||a[11]!==u||a[12]!==d?(f=/* @__PURE__ */ r(`kbd`,{"data-slot":u,className:d,...l,translate:`no`,children:o}),a[9]=o,a[10]=l,a[11]=u,a[12]=d,a[13]=f):f=a[13],f}export{i as t};
|
package/dist/kbd.d.ts
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Re-exports for the Kbd component.
|
|
3
|
+
*
|
|
4
|
+
* @see https://mantle.ngrok.com/components/data-display/kbd
|
|
5
|
+
*/
|
|
6
|
+
import { t as WithDataSlot } from "./data-slot-BW8KQ9Xo.js";
|
|
2
7
|
import { ComponentProps } from "react";
|
|
3
8
|
/**
|
|
4
|
-
* A square, centered keyboard "key" chip for rendering shortcut hints
|
|
9
|
+
* A square, centered keyboard "key" chip for rendering shortcut hints:
|
|
5
10
|
* "K", "⌘", "⌃", "Enter". Renders a native `<kbd>` element so screen
|
|
6
11
|
* readers announce it as keyboard input. Sized so letters and modifier
|
|
7
12
|
* symbols share a consistent visual height, width, and baseline.
|
|
@@ -12,8 +17,8 @@ import { ComponentProps } from "react";
|
|
|
12
17
|
* - Inline with prose: "Press `Kbd K` to open search."
|
|
13
18
|
*
|
|
14
19
|
* **When not to use**
|
|
15
|
-
* - For arbitrary monospace text
|
|
16
|
-
* - For chord-style multi-key shortcuts as a single chip
|
|
20
|
+
* - For arbitrary monospace text, use {@link https://mantle.ngrok.com/components/data-display/code Code}.
|
|
21
|
+
* - For chord-style multi-key shortcuts as a single chip, render multiple
|
|
17
22
|
* `<Kbd>` elements separated by `+` text instead.
|
|
18
23
|
*
|
|
19
24
|
* **Accessibility.** Symbol-only glyphs (`⌘`, `⌃`, `↵`) are not announced
|
|
@@ -27,6 +32,13 @@ import { ComponentProps } from "react";
|
|
|
27
32
|
* key the reader's keyboard does not have. The `translate` prop is omitted from
|
|
28
33
|
* the type, so no call site can turn the guard off.
|
|
29
34
|
*
|
|
35
|
+
* @useWhen Show a keyboard key or a shortcut hint, such as `⌘` and `K`, in prose, a tooltip, or a
|
|
36
|
+
* menu item.
|
|
37
|
+
*
|
|
38
|
+
* @siblings
|
|
39
|
+
* - `Code`: the text is a fragment of code, not a key.
|
|
40
|
+
* - `Badge`: the label is a status, a category, or a count.
|
|
41
|
+
*
|
|
30
42
|
* @see https://mantle.ngrok.com/components/data-display/kbd
|
|
31
43
|
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Global_attributes/translate
|
|
32
44
|
*
|
|
@@ -43,7 +55,7 @@ import { ComponentProps } from "react";
|
|
|
43
55
|
* <span aria-hidden>↵</span>
|
|
44
56
|
* </Kbd>
|
|
45
57
|
*
|
|
46
|
-
* // Chord
|
|
58
|
+
* // Chord: render each key separately.
|
|
47
59
|
* <span className="inline-flex items-center gap-1">
|
|
48
60
|
* <Kbd>
|
|
49
61
|
* <span className="sr-only">Command</span>
|
package/dist/kbd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{t as Kbd}from"./kbd-
|
|
1
|
+
export{t as Kbd}from"./kbd-P1nQshWo.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use client";import{t as e}from"./booleanish-BfvnW6vy.js";import{t}from"./cx-CK7o_rVv.js";import{t as n}from"./data-slot-EM6s2WEU.js";import{c as r}from"react/compiler-runtime";import{jsx as i}from"react/jsx-runtime";const a=a=>{let o=r(26),s,c,l,u,d,f,p,m;o[0]===a?(s=o[1],c=o[2],l=o[3],u=o[4],d=o[5],f=o[6],p=o[7],m=o[8]):({"data-slot":u,"aria-disabled":s,children:c,className:l,disabled:d,onMouseDown:f,ref:m,...p}=a,o[0]=a,o[1]=s,o[2]=c,o[3]=l,o[4]=u,o[5]=d,o[6]=f,o[7]=p,o[8]=m);let h;o[9]!==s||o[10]!==d?(h=e(d??s)||void 0,o[9]=s,o[10]=d,o[11]=h):h=o[11];let g;o[12]===u?g=o[13]:(g=n(u,`label`),o[12]=u,o[13]=g);let _;o[14]===l?_=o[15]:(_=t(`text-strong cursor-pointer text-sm peer-disabled:cursor-default has-disabled:cursor-default data-disabled:cursor-default font-sans`,`[:where(&:not(:has(input,textarea,select,button,[contenteditable])))]:font-medium`,l),o[14]=l,o[15]=_);let v;o[16]===f?v=o[17]:(v=e=>{e.target instanceof Element&&e.target.closest(`button, input, select, textarea`)||(f?.(e),!e.defaultPrevented&&e.detail>1&&e.preventDefault())},o[16]=f,o[17]=v);let y;return o[18]!==c||o[19]!==p||o[20]!==m||o[21]!==h||o[22]!==g||o[23]!==_||o[24]!==v?(y=/* @__PURE__ */ i(`label`,{"data-disabled":h,"data-slot":g,className:_,onMouseDown:v,ref:m,...p,children:c}),o[18]=c,o[19]=p,o[20]=m,o[21]=h,o[22]=g,o[23]=_,o[24]=v,o[25]=y):y=o[25],y};export{a as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as WithDataSlot } from "./data-slot-
|
|
1
|
+
import { t as WithDataSlot } from "./data-slot-BW8KQ9Xo.js";
|
|
2
2
|
import { ComponentProps } from "react";
|
|
3
3
|
type LabelProps = ComponentProps<"label"> & {
|
|
4
4
|
/**
|
|
@@ -7,7 +7,7 @@ type LabelProps = ComponentProps<"label"> & {
|
|
|
7
7
|
disabled?: boolean;
|
|
8
8
|
} & WithDataSlot;
|
|
9
9
|
/**
|
|
10
|
-
* A caption for a form control
|
|
10
|
+
* A caption for a form control: input, checkbox, radio, switch, select.
|
|
11
11
|
* Renders a native `<label>`. Pair every form control with a `Label` so the
|
|
12
12
|
* control has an accessible name, clicks on the label focus the control, and
|
|
13
13
|
* screen readers announce the field correctly.
|
|
@@ -18,14 +18,14 @@ type LabelProps = ComponentProps<"label"> & {
|
|
|
18
18
|
* - Wrapping a checkbox or radio next to its descriptive text.
|
|
19
19
|
*
|
|
20
20
|
* **When not to use**
|
|
21
|
-
* - For static UI text that isn't labeling a control
|
|
21
|
+
* - For static UI text that isn't labeling a control. Use a heading or
|
|
22
22
|
* plain `<p>`/`<span>`.
|
|
23
23
|
* - As a substitute for `aria-label` on non-`<input>` widgets that don't
|
|
24
24
|
* support `<label for>` association.
|
|
25
25
|
*
|
|
26
26
|
* **Two ways to associate.** Either wrap the control inside the `<Label>`
|
|
27
|
-
* (implicit association
|
|
28
|
-
* (explicit
|
|
27
|
+
* (implicit association, the simplest) or set `htmlFor` to the control's `id`
|
|
28
|
+
* (explicit, required when the control isn't a child).
|
|
29
29
|
*
|
|
30
30
|
* **Disabled state.** Pass `disabled` to render the label in a disabled
|
|
31
31
|
* style. Typically you'll want this to mirror the underlying control's
|
|
@@ -37,11 +37,17 @@ type LabelProps = ComponentProps<"label"> & {
|
|
|
37
37
|
* **not** contain a nested form control (`<input>`, `<textarea>`, `<select>`,
|
|
38
38
|
* `<button>`, or `[contenteditable]`). When the label *does* wrap a control,
|
|
39
39
|
* the auto default is intentionally skipped so the control's own typography
|
|
40
|
-
* isn't bolded
|
|
40
|
+
* isn't bolded. Apply `font-medium` to your own caption element (e.g. a
|
|
41
41
|
* `<span>` or `<p>`) inside the label. Override the default at any time by
|
|
42
42
|
* passing a font-weight utility on the `Label` itself, e.g.
|
|
43
43
|
* `<Label className="font-bold">`.
|
|
44
44
|
*
|
|
45
|
+
* @useWhen Give a form control a visible caption that names it and focuses it on a click.
|
|
46
|
+
*
|
|
47
|
+
* @siblings
|
|
48
|
+
* - `Field`: the control also needs a description or validation errors.
|
|
49
|
+
* - `Choice`: the control needs a title and a description beside it.
|
|
50
|
+
*
|
|
45
51
|
* @see https://mantle.ngrok.com/components/forms/label
|
|
46
52
|
*
|
|
47
53
|
* @example
|
|
@@ -49,13 +55,13 @@ type LabelProps = ComponentProps<"label"> & {
|
|
|
49
55
|
* import { Label } from "@ngrok/mantle/label";
|
|
50
56
|
* import { Input } from "@ngrok/mantle/input";
|
|
51
57
|
*
|
|
52
|
-
* // Implicit
|
|
58
|
+
* // Implicit: control nested inside the label.
|
|
53
59
|
* <Label className="grid gap-1">
|
|
54
60
|
* <span>Email</span>
|
|
55
61
|
* <Input type="email" name="email" />
|
|
56
62
|
* </Label>
|
|
57
63
|
*
|
|
58
|
-
* // Explicit
|
|
64
|
+
* // Explicit: htmlFor matches the control's id.
|
|
59
65
|
* <div className="grid gap-1">
|
|
60
66
|
* <Label htmlFor="api-key">API key</Label>
|
|
61
67
|
* <Input id="api-key" name="apiKey" />
|