@ngrok/mantle 0.66.0 → 0.66.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/accordion.d.ts +158 -154
- package/dist/accordion.js +1 -1
- package/dist/accordion.js.map +1 -1
- package/dist/alert-dialog.d.ts +282 -277
- package/dist/alert-dialog.js +1 -1
- package/dist/alert-dialog.js.map +1 -1
- package/dist/alert.d.ts +145 -138
- package/dist/alert.js +1 -1
- package/dist/alert.js.map +1 -1
- package/dist/anchor.d.ts +25 -22
- package/dist/anchor.js +1 -1
- package/dist/anchor.js.map +1 -1
- package/dist/as-child-XMVTepJu.d.ts +31 -0
- package/dist/badge.d.ts +29 -19
- package/dist/badge.js +1 -1
- package/dist/badge.js.map +1 -1
- package/dist/booleanish-CBGdPL3Q.js +2 -0
- package/dist/booleanish-CBGdPL3Q.js.map +1 -0
- package/dist/browser-only-QPyyfLaB.js +2 -0
- package/dist/browser-only-QPyyfLaB.js.map +1 -0
- package/dist/browser-only.d.ts +20 -15
- package/dist/browser-only.js +1 -2
- package/dist/button-B6StZJsz.d.ts +175 -0
- package/dist/button-CRRPesae.js +2 -0
- package/dist/button-CRRPesae.js.map +1 -0
- package/dist/button-DA2p0_5F.js +2 -0
- package/dist/button-DA2p0_5F.js.map +1 -0
- package/dist/button.d.ts +4 -9
- package/dist/button.js +1 -2
- package/dist/calendar.d.ts +14 -8
- package/dist/calendar.js +1 -1
- package/dist/calendar.js.map +1 -1
- package/dist/card.d.ts +99 -97
- package/dist/card.js +1 -1
- package/dist/card.js.map +1 -1
- package/dist/checkbox.d.ts +14 -12
- package/dist/checkbox.js +1 -1
- package/dist/checkbox.js.map +1 -1
- package/dist/code-block.d.ts +254 -237
- package/dist/code-block.js +3 -3
- package/dist/code-block.js.map +1 -1
- package/dist/code.d.ts +5 -3
- package/dist/code.js +1 -1
- package/dist/code.js.map +1 -1
- package/dist/color.d.ts +2 -38
- package/dist/color.js +1 -1
- package/dist/color.js.map +1 -1
- package/dist/combobox.d.ts +172 -167
- package/dist/combobox.js +1 -1
- package/dist/combobox.js.map +1 -1
- package/dist/command.d.ts +234 -227
- package/dist/command.js +1 -1
- package/dist/command.js.map +1 -1
- package/dist/compose-refs-DeIsFv68.js +2 -0
- package/dist/compose-refs-DeIsFv68.js.map +1 -0
- package/dist/cx-bKromGBh.js +2 -0
- package/dist/cx-bKromGBh.js.map +1 -0
- package/dist/cx.d.ts +4 -2
- package/dist/cx.js +1 -2
- package/dist/data-table.d.ts +211 -184
- package/dist/data-table.js +1 -1
- package/dist/data-table.js.map +1 -1
- package/dist/deep-non-nullable-BLM3Gz0I.d.ts +8 -0
- package/dist/description-list.d.ts +61 -59
- package/dist/description-list.js +1 -1
- package/dist/description-list.js.map +1 -1
- package/dist/dialog-BuD_JQf_.d.ts +422 -0
- package/dist/dialog-Cr5u0Eai.js +2 -0
- package/dist/dialog-Cr5u0Eai.js.map +1 -0
- package/dist/dialog.d.ts +3 -410
- package/dist/dialog.js +1 -2
- package/dist/direction-DfrtFTny.js +2 -0
- package/dist/direction-DfrtFTny.js.map +1 -0
- package/dist/{direction-DHheuUag.d.ts → direction-deXpJFDZ.d.ts} +9 -7
- package/dist/dropdown-menu-CjOaj-Ap.js +2 -0
- package/dist/dropdown-menu-CjOaj-Ap.js.map +1 -0
- package/dist/dropdown-menu-D_ZoY1AH.d.ts +330 -0
- package/dist/dropdown-menu.d.ts +2 -325
- package/dist/dropdown-menu.js +1 -2
- package/dist/flag.d.ts +31 -22
- package/dist/flag.js +1 -1
- package/dist/flag.js.map +1 -1
- package/dist/hooks.d.ts +72 -59
- package/dist/hooks.js +1 -1
- package/dist/hooks.js.map +1 -1
- package/dist/hover-card.d.ts +97 -91
- package/dist/hover-card.js +1 -1
- package/dist/hover-card.js.map +1 -1
- package/dist/{icon-DXTMiV1L.d.ts → icon-B1XLv02t.d.ts} +11 -9
- package/dist/icon-B5oNYYrJ.js +2 -0
- package/dist/icon-B5oNYYrJ.js.map +1 -0
- package/dist/icon-button-2r6S3HVA.d.ts +98 -0
- package/dist/icon-button-D4e9-dq-.js +2 -0
- package/dist/icon-button-D4e9-dq-.js.map +1 -0
- package/dist/icon.d.ts +4 -4
- package/dist/icon.js +1 -2
- package/dist/icons.d.ts +54 -41
- package/dist/icons.js +1 -1
- package/dist/icons.js.map +1 -1
- package/dist/{in-view-aHeQHaUj.d.ts → in-view-CTQRT44m.d.ts} +29 -22
- package/dist/in-view-bPnaWEL4.js +2 -0
- package/dist/in-view-bPnaWEL4.js.map +1 -0
- package/dist/index-BLCvtjLi.d.ts +40 -0
- package/dist/index-DWqhfw9n.d.ts +103 -0
- package/dist/{button-group-BFnqgdtl.d.ts → index-ViSCOUrU.d.ts} +10 -8
- package/dist/index-s8rMcilU.d.ts +47 -0
- package/dist/input.d.ts +3 -100
- package/dist/input.js +1 -1
- package/dist/input.js.map +1 -1
- package/dist/is-input-BFR8yMM7.js +2 -0
- package/dist/is-input-BFR8yMM7.js.map +1 -0
- package/dist/kbd-pyj32aN4.js +2 -0
- package/dist/kbd-pyj32aN4.js.map +1 -0
- package/dist/kbd.d.ts +10 -4
- package/dist/kbd.js +1 -2
- package/dist/label.d.ts +8 -6
- package/dist/label.js +1 -1
- package/dist/label.js.map +1 -1
- package/dist/media-object.d.ts +70 -68
- package/dist/media-object.js +1 -1
- package/dist/media-object.js.map +1 -1
- package/dist/multi-select.d.ts +226 -218
- package/dist/multi-select.js +1 -1
- package/dist/multi-select.js.map +1 -1
- package/dist/pagination.d.ts +168 -164
- package/dist/pagination.js +1 -1
- package/dist/pagination.js.map +1 -1
- package/dist/popover.d.ts +119 -117
- package/dist/popover.js +1 -1
- package/dist/popover.js.map +1 -1
- package/dist/primitive-Cath9ASB.js +2 -0
- package/dist/primitive-Cath9ASB.js.map +1 -0
- package/dist/primitive-tuHqhoRE.d.ts +16 -0
- package/dist/progress.d.ts +175 -150
- package/dist/progress.js +1 -1
- package/dist/progress.js.map +1 -1
- package/dist/radio-group.d.ts +246 -230
- package/dist/radio-group.js +1 -1
- package/dist/radio-group.js.map +1 -1
- package/dist/sandboxed-on-click.d.ts +36 -31
- package/dist/sandboxed-on-click.js +1 -1
- package/dist/sandboxed-on-click.js.map +1 -1
- package/dist/select-39Jfc1Cb.d.ts +265 -0
- package/dist/select-DZ2ztBkI.js +2 -0
- package/dist/select-DZ2ztBkI.js.map +1 -0
- package/dist/select.d.ts +2 -263
- package/dist/select.js +1 -2
- package/dist/separator-BcCNbHBg.js +2 -0
- package/dist/separator-BcCNbHBg.js.map +1 -0
- package/dist/separator.d.ts +28 -21
- package/dist/separator.js +1 -2
- package/dist/sheet.d.ts +319 -305
- package/dist/sheet.js +1 -1
- package/dist/sheet.js.map +1 -1
- package/dist/skeleton.d.ts +8 -6
- package/dist/skeleton.js +1 -1
- package/dist/skeleton.js.map +1 -1
- package/dist/slider.d.ts +48 -35
- package/dist/slider.js +1 -1
- package/dist/slider.js.map +1 -1
- package/dist/slot-DdnjeV2n.js +2 -0
- package/dist/slot-DdnjeV2n.js.map +1 -0
- package/dist/slot.d.ts +6 -4
- package/dist/slot.js +1 -2
- package/dist/sort-CfPsu1Gs.js +2 -0
- package/dist/sort-CfPsu1Gs.js.map +1 -0
- package/dist/split-button.d.ts +158 -162
- package/dist/split-button.js +1 -1
- package/dist/split-button.js.map +1 -1
- package/dist/svg-only-BVLlbQ4e.js +2 -0
- package/dist/svg-only-BVLlbQ4e.js.map +1 -0
- package/dist/{svg-only-Cp8Mu_sh.d.ts → svg-only-Dti1FvNV.d.ts} +11 -9
- package/dist/switch.d.ts +10 -8
- package/dist/switch.js +1 -1
- package/dist/switch.js.map +1 -1
- package/dist/table-BWMp12sl.js +2 -0
- package/dist/table-BWMp12sl.js.map +1 -0
- package/dist/table-Dpt192qt.d.ts +398 -0
- package/dist/table.d.ts +2 -396
- package/dist/table.js +1 -2
- package/dist/tabs.d.ts +110 -104
- package/dist/tabs.js +1 -1
- package/dist/tabs.js.map +1 -1
- package/dist/text-area.d.ts +10 -8
- package/dist/text-area.js +1 -1
- package/dist/text-area.js.map +1 -1
- package/dist/theme-provider-C8F5nFrJ.js +2 -0
- package/dist/theme-provider-C8F5nFrJ.js.map +1 -0
- package/dist/theme.d.ts +66 -39
- package/dist/theme.js +1 -2
- package/dist/{themes-Bi46K9ZW.d.ts → themes-ClppRAGt.d.ts} +4 -2
- package/dist/toast-1AuBbrBS.js +2 -0
- package/dist/toast-1AuBbrBS.js.map +1 -0
- package/dist/toast.d.ts +95 -87
- package/dist/toast.js +1 -2
- package/dist/tooltip.d.ts +78 -73
- package/dist/tooltip.js +1 -1
- package/dist/tooltip.js.map +1 -1
- package/dist/{chunk-W2YQRWR5.js → traffic-policy-file-QnF-2YkY.js} +2 -2
- package/dist/traffic-policy-file-QnF-2YkY.js.map +1 -0
- package/dist/types-884RJJqm.js +2 -0
- package/dist/types-884RJJqm.js.map +1 -0
- package/dist/{types-DehRoXC5.d.ts → types-DgXUgkpc.d.ts} +38 -36
- package/dist/types-Dh4BVhXC.d.ts +9 -0
- package/dist/types.d.ts +6 -49
- package/dist/types.js +1 -2
- package/dist/use-copy-to-clipboard-BEbQOKHc.js +2 -0
- package/dist/use-copy-to-clipboard-BEbQOKHc.js.map +1 -0
- package/dist/use-matches-media-query-CojcYxlA.js +2 -0
- package/dist/use-matches-media-query-CojcYxlA.js.map +1 -0
- package/dist/use-prefers-reduced-motion-BiG6QGkf.js +2 -0
- package/dist/use-prefers-reduced-motion-BiG6QGkf.js.map +1 -0
- package/dist/utils.d.ts +6 -5
- package/dist/utils.js +1 -1
- package/dist/utils.js.map +1 -1
- package/dist/variant-props-UE-phTwh.d.ts +13 -0
- package/dist/with-style-props-D1QFTzj6.d.ts +29 -0
- package/package.json +6 -6
- package/dist/as-child-DJ7x3JFV.d.ts +0 -21
- package/dist/browser-only.js.map +0 -1
- package/dist/button-DLUUf_c-.d.ts +0 -173
- package/dist/button.js.map +0 -1
- package/dist/chunk-2FYR6IJV.js +0 -2
- package/dist/chunk-2FYR6IJV.js.map +0 -1
- package/dist/chunk-5VDCC3YW.js +0 -2
- package/dist/chunk-5VDCC3YW.js.map +0 -1
- package/dist/chunk-63ZAW25Z.js +0 -2
- package/dist/chunk-63ZAW25Z.js.map +0 -1
- package/dist/chunk-6J7D73WA.js +0 -2
- package/dist/chunk-6J7D73WA.js.map +0 -1
- package/dist/chunk-72TJUKMV.js +0 -1
- package/dist/chunk-72TJUKMV.js.map +0 -1
- package/dist/chunk-7MJQGBE4.js +0 -2
- package/dist/chunk-7MJQGBE4.js.map +0 -1
- package/dist/chunk-7YLII2US.js +0 -2
- package/dist/chunk-7YLII2US.js.map +0 -1
- package/dist/chunk-ADF5DAYG.js +0 -2
- package/dist/chunk-ADF5DAYG.js.map +0 -1
- package/dist/chunk-CBRSMQ26.js +0 -2
- package/dist/chunk-CBRSMQ26.js.map +0 -1
- package/dist/chunk-COQIVAQH.js +0 -2
- package/dist/chunk-COQIVAQH.js.map +0 -1
- package/dist/chunk-ELZLLG6G.js +0 -2
- package/dist/chunk-ELZLLG6G.js.map +0 -1
- package/dist/chunk-EVU5XGB4.js +0 -2
- package/dist/chunk-EVU5XGB4.js.map +0 -1
- package/dist/chunk-EYZYDUS2.js +0 -2
- package/dist/chunk-EYZYDUS2.js.map +0 -1
- package/dist/chunk-HKSO72E5.js +0 -2
- package/dist/chunk-HKSO72E5.js.map +0 -1
- package/dist/chunk-HL2HWYKP.js +0 -2
- package/dist/chunk-HL2HWYKP.js.map +0 -1
- package/dist/chunk-IVQ626TU.js +0 -2
- package/dist/chunk-IVQ626TU.js.map +0 -1
- package/dist/chunk-JQ5D5YZR.js +0 -2
- package/dist/chunk-JQ5D5YZR.js.map +0 -1
- package/dist/chunk-LBO5LEYM.js +0 -2
- package/dist/chunk-LBO5LEYM.js.map +0 -1
- package/dist/chunk-MLXONRJD.js +0 -2
- package/dist/chunk-MLXONRJD.js.map +0 -1
- package/dist/chunk-OHPGAB7U.js +0 -2
- package/dist/chunk-OHPGAB7U.js.map +0 -1
- package/dist/chunk-OP6JMBKJ.js +0 -2
- package/dist/chunk-OP6JMBKJ.js.map +0 -1
- package/dist/chunk-PFXFESEN.js +0 -2
- package/dist/chunk-PFXFESEN.js.map +0 -1
- package/dist/chunk-PNL7JOXI.js +0 -2
- package/dist/chunk-PNL7JOXI.js.map +0 -1
- package/dist/chunk-RED6SFAV.js +0 -2
- package/dist/chunk-RED6SFAV.js.map +0 -1
- package/dist/chunk-SBQHQ2SJ.js +0 -2
- package/dist/chunk-SBQHQ2SJ.js.map +0 -1
- package/dist/chunk-SGGOH2WW.js +0 -2
- package/dist/chunk-SGGOH2WW.js.map +0 -1
- package/dist/chunk-W2YQRWR5.js.map +0 -1
- package/dist/chunk-W5A5HSFE.js +0 -2
- package/dist/chunk-W5A5HSFE.js.map +0 -1
- package/dist/chunk-YPAUKPCE.js +0 -2
- package/dist/chunk-YPAUKPCE.js.map +0 -1
- package/dist/cx.js.map +0 -1
- package/dist/deep-non-nullable-SmpSvoSd.d.ts +0 -8
- package/dist/dialog.js.map +0 -1
- package/dist/dropdown-menu.js.map +0 -1
- package/dist/icon-button-CT71Ti9V.d.ts +0 -96
- package/dist/icon.js.map +0 -1
- package/dist/kbd.js.map +0 -1
- package/dist/primitive-CBR_XmVa.d.ts +0 -14
- package/dist/select.js.map +0 -1
- package/dist/separator.js.map +0 -1
- package/dist/slot.js.map +0 -1
- package/dist/table.js.map +0 -1
- package/dist/theme.js.map +0 -1
- package/dist/toast.js.map +0 -1
- package/dist/types-BuKAGhC-.d.ts +0 -7
- package/dist/types.js.map +0 -1
- package/dist/variant-props-oDo2u-We.d.ts +0 -11
- package/dist/with-style-props-VnLWm0Yd.d.ts +0 -27
package/dist/select.d.ts
CHANGED
|
@@ -1,263 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
import { ReactNode, FocusEvent, SelectHTMLAttributes } from 'react';
|
|
4
|
-
import * as SelectPrimitive from '@radix-ui/react-select';
|
|
5
|
-
import { W as WithValidation } from './types-DehRoXC5.js';
|
|
6
|
-
|
|
7
|
-
type WithAriaInvalid = Pick<SelectHTMLAttributes<HTMLSelectElement>, "aria-invalid">;
|
|
8
|
-
/**
|
|
9
|
-
* Displays a list of options for the user to pick from—triggered by a button.
|
|
10
|
-
*
|
|
11
|
-
* @see https://mantle.ngrok.com/components/select
|
|
12
|
-
*
|
|
13
|
-
* @example
|
|
14
|
-
* ```tsx
|
|
15
|
-
* <Select.Root>
|
|
16
|
-
* <Select.Trigger>
|
|
17
|
-
* <Select.Value placeholder="Select a fruit" />
|
|
18
|
-
* </Select.Trigger>
|
|
19
|
-
* <Select.Content>
|
|
20
|
-
* <Select.Group>
|
|
21
|
-
* <Select.Label>Fruits</Select.Label>
|
|
22
|
-
* <Select.Item value="apple">Apple</Select.Item>
|
|
23
|
-
* <Select.Item value="banana">Banana</Select.Item>
|
|
24
|
-
* <Select.Item value="cherry">Cherry</Select.Item>
|
|
25
|
-
* </Select.Group>
|
|
26
|
-
* <Select.Separator />
|
|
27
|
-
* <Select.Group>
|
|
28
|
-
* <Select.Label>Veggies</Select.Label>
|
|
29
|
-
* <Select.Item value="carrot">Carrot</Select.Item>
|
|
30
|
-
* <Select.Item value="cucumber">Cucumber</Select.Item>
|
|
31
|
-
* </Select.Group>
|
|
32
|
-
* </Select.Content>
|
|
33
|
-
* </Select.Root>
|
|
34
|
-
* ```
|
|
35
|
-
*/
|
|
36
|
-
declare const Select: {
|
|
37
|
-
/**
|
|
38
|
-
* Displays a list of options for the user to pick from—triggered by a button.
|
|
39
|
-
*
|
|
40
|
-
* @see https://mantle.ngrok.com/components/select#selectroot
|
|
41
|
-
*
|
|
42
|
-
* @example
|
|
43
|
-
* ```tsx
|
|
44
|
-
* <Select.Root>
|
|
45
|
-
* <Select.Trigger>
|
|
46
|
-
* <Select.Value placeholder="Select a fruit" />
|
|
47
|
-
* </Select.Trigger>
|
|
48
|
-
* <Select.Content>
|
|
49
|
-
* <Select.Group>
|
|
50
|
-
* <Select.Label>Fruits</Select.Label>
|
|
51
|
-
* <Select.Item value="apple">Apple</Select.Item>
|
|
52
|
-
* <Select.Item value="banana">Banana</Select.Item>
|
|
53
|
-
* <Select.Item value="cherry">Cherry</Select.Item>
|
|
54
|
-
* </Select.Group>
|
|
55
|
-
* <Select.Separator />
|
|
56
|
-
* <Select.Group>
|
|
57
|
-
* <Select.Label>Veggies</Select.Label>
|
|
58
|
-
* <Select.Item value="carrot">Carrot</Select.Item>
|
|
59
|
-
* <Select.Item value="cucumber">Cucumber</Select.Item>
|
|
60
|
-
* </Select.Group>
|
|
61
|
-
* </Select.Content>
|
|
62
|
-
* </Select.Root>
|
|
63
|
-
* ```
|
|
64
|
-
*/
|
|
65
|
-
readonly Root: react.ForwardRefExoticComponent<{
|
|
66
|
-
children?: ReactNode | undefined;
|
|
67
|
-
} & {
|
|
68
|
-
autoComplete?: string;
|
|
69
|
-
defaultOpen?: boolean;
|
|
70
|
-
defaultValue?: string;
|
|
71
|
-
dir?: "ltr" | "rtl";
|
|
72
|
-
disabled?: boolean;
|
|
73
|
-
form?: string;
|
|
74
|
-
id?: string;
|
|
75
|
-
name?: string;
|
|
76
|
-
/**
|
|
77
|
-
* Event handler called when Select blurs.
|
|
78
|
-
* @note this is a no-op for now until we can guarantee that it works identically to a native select onBlur
|
|
79
|
-
*/
|
|
80
|
-
onBlur?: (event: FocusEvent<HTMLButtonElement>) => void;
|
|
81
|
-
/**
|
|
82
|
-
* Event handler called when the value changes.
|
|
83
|
-
* @deprecated Use `onValueChange` instead.
|
|
84
|
-
*/
|
|
85
|
-
onChange?: (value: string) => void;
|
|
86
|
-
onOpenChange?(open: boolean): void;
|
|
87
|
-
onValueChange?(value: string): void;
|
|
88
|
-
open?: boolean;
|
|
89
|
-
required?: boolean;
|
|
90
|
-
value?: string;
|
|
91
|
-
} & WithValidation & WithAriaInvalid & react.RefAttributes<HTMLButtonElement>>;
|
|
92
|
-
/**
|
|
93
|
-
* The component that pops out when the select is open as a portal adjacent to the trigger button.
|
|
94
|
-
* It contains a scrolling viewport of the select items.
|
|
95
|
-
*
|
|
96
|
-
* @see https://mantle.ngrok.com/components/select#selectcontent
|
|
97
|
-
*
|
|
98
|
-
* @example
|
|
99
|
-
* <Select.Root>
|
|
100
|
-
* <Select.Trigger>
|
|
101
|
-
* <Select.Value placeholder="Select a fruit" />
|
|
102
|
-
* </Select.Trigger>
|
|
103
|
-
* <Select.Content>
|
|
104
|
-
* <Select.Item value="apple">Apple</Select.Item>
|
|
105
|
-
* <Select.Item value="banana">Banana</Select.Item>
|
|
106
|
-
* <Select.Item value="cherry">Cherry</Select.Item>
|
|
107
|
-
* </Select.Content>
|
|
108
|
-
* </Select.Root>
|
|
109
|
-
*/
|
|
110
|
-
readonly Content: react.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectContentProps & react.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
111
|
-
/**
|
|
112
|
-
* The width of the content. Defaults to the width of the trigger.
|
|
113
|
-
* If set to "content", the content will use the intrinsic content width; it will be the width of the longest/widest item.
|
|
114
|
-
* @default "trigger"
|
|
115
|
-
*/
|
|
116
|
-
width?: "trigger" | "content";
|
|
117
|
-
} & react.RefAttributes<HTMLDivElement>>;
|
|
118
|
-
/**
|
|
119
|
-
* A group of related options within a select menu. Similar to an html `<optgroup>` element.
|
|
120
|
-
* Use in conjunction with Select.Label to ensure good accessibility via automatic labelling.
|
|
121
|
-
*
|
|
122
|
-
* @see https://mantle.ngrok.com/components/select#selectgroup
|
|
123
|
-
*
|
|
124
|
-
* @example
|
|
125
|
-
* <Select.Root>
|
|
126
|
-
* <Select.Trigger>
|
|
127
|
-
* <Select.Value placeholder="Select a fruit" />
|
|
128
|
-
* </Select.Trigger>
|
|
129
|
-
* <Select.Content>
|
|
130
|
-
* <Select.Group>
|
|
131
|
-
* <Select.Label>Fruits</Select.Label>
|
|
132
|
-
* <Select.Item value="apple">Apple</Select.Item>
|
|
133
|
-
* <Select.Item value="banana">Banana</Select.Item>
|
|
134
|
-
* <Select.Item value="cherry">Cherry</Select.Item>
|
|
135
|
-
* </Select.Group>
|
|
136
|
-
* <Select.Group>
|
|
137
|
-
* <Select.Label>Veggies</Select.Label>
|
|
138
|
-
* <Select.Item value="carrot">Carrot</Select.Item>
|
|
139
|
-
* <Select.Item value="cucumber">Cucumber</Select.Item>
|
|
140
|
-
* </Select.Group>
|
|
141
|
-
* </Select.Content>
|
|
142
|
-
* </Select.Root>
|
|
143
|
-
*/
|
|
144
|
-
readonly Group: react.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectGroupProps & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
145
|
-
/**
|
|
146
|
-
* An option within a select menu. Similar to an html `<option>` element.
|
|
147
|
-
* Has a required `value` prop that will be passed to the `onChange` handler of the `Select` component when this item is selected.
|
|
148
|
-
* Displays the children as the option's text.
|
|
149
|
-
*
|
|
150
|
-
* @see https://mantle.ngrok.com/components/select#selectitem
|
|
151
|
-
*
|
|
152
|
-
* @example
|
|
153
|
-
* <Select.Root>
|
|
154
|
-
* <Select.Trigger>
|
|
155
|
-
* <Select.Value placeholder="Select a fruit" />
|
|
156
|
-
* </Select.Trigger>
|
|
157
|
-
* <Select.Content>
|
|
158
|
-
* <Select.Item value="apple">Apple</Select.Item>
|
|
159
|
-
* <Select.Item value="banana">Banana</Select.Item>
|
|
160
|
-
* <Select.Item value="cherry">Cherry</Select.Item>
|
|
161
|
-
* </Select.Content>
|
|
162
|
-
* </Select.Root>
|
|
163
|
-
*/
|
|
164
|
-
readonly Item: react.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectItemProps & react.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
165
|
-
icon?: ReactNode;
|
|
166
|
-
} & react.RefAttributes<HTMLDivElement>>;
|
|
167
|
-
/**
|
|
168
|
-
* Used to render the label of a group. It won't be focusable using arrow keys.
|
|
169
|
-
*
|
|
170
|
-
* @see https://mantle.ngrok.com/components/select#selectlabel
|
|
171
|
-
*
|
|
172
|
-
* @example
|
|
173
|
-
* <Select.Root>
|
|
174
|
-
* <Select.Trigger>
|
|
175
|
-
* <Select.Value placeholder="Select a fruit" />
|
|
176
|
-
* </Select.Trigger>
|
|
177
|
-
* <Select.Content>
|
|
178
|
-
* <Select.Group>
|
|
179
|
-
* <Select.Label>Fruits</Select.Label>
|
|
180
|
-
* <Select.Item value="apple">Apple</Select.Item>
|
|
181
|
-
* <Select.Item value="banana">Banana</Select.Item>
|
|
182
|
-
* <Select.Item value="cherry">Cherry</Select.Item>
|
|
183
|
-
* </Select.Group>
|
|
184
|
-
* <Select.Group>
|
|
185
|
-
* <Select.Label>Veggies</Select.Label>
|
|
186
|
-
* <Select.Item value="carrot">Carrot</Select.Item>
|
|
187
|
-
* <Select.Item value="cucumber">Cucumber</Select.Item>
|
|
188
|
-
* </Select.Group>
|
|
189
|
-
* </Select.Content>
|
|
190
|
-
* </Select.Root>
|
|
191
|
-
*/
|
|
192
|
-
readonly Label: react.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectLabelProps & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
193
|
-
/**
|
|
194
|
-
* Used to visually separate items or groups of items in the select content.
|
|
195
|
-
*
|
|
196
|
-
* @see https://mantle.ngrok.com/components/select#selectseparator
|
|
197
|
-
*
|
|
198
|
-
* @example
|
|
199
|
-
* <Select.Root>
|
|
200
|
-
* <Select.Trigger>
|
|
201
|
-
* <Select.Value placeholder="Select a fruit" />
|
|
202
|
-
* </Select.Trigger>
|
|
203
|
-
* <Select.Content>
|
|
204
|
-
* <Select.Group>
|
|
205
|
-
* <Select.Label>Fruits</Select.Label>
|
|
206
|
-
* <Select.Item value="apple">Apple</Select.Item>
|
|
207
|
-
* <Select.Item value="banana">Banana</Select.Item>
|
|
208
|
-
* <Select.Item value="cherry">Cherry</Select.Item>
|
|
209
|
-
* </Select.Group>
|
|
210
|
-
* <Select.Separator />
|
|
211
|
-
* <Select.Group>
|
|
212
|
-
* <Select.Label>Veggies</Select.Label>
|
|
213
|
-
* <Select.Item value="carrot">Carrot</Select.Item>
|
|
214
|
-
* <Select.Item value="cucumber">Cucumber</Select.Item>
|
|
215
|
-
* </Select.Group>
|
|
216
|
-
* </Select.Content>
|
|
217
|
-
* </Select.Root>
|
|
218
|
-
*/
|
|
219
|
-
readonly Separator: react.ForwardRefExoticComponent<Omit<Omit<react.ClassAttributes<HTMLDivElement> & react.HTMLAttributes<HTMLDivElement> & WithAsChild & {
|
|
220
|
-
orientation?: "horizontal" | "vertical";
|
|
221
|
-
semantic?: boolean;
|
|
222
|
-
}, "ref"> & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
223
|
-
/**
|
|
224
|
-
* The button that toggles the select. The Select.Content will position itself adjacent to the trigger.
|
|
225
|
-
*
|
|
226
|
-
* @see https://mantle.ngrok.com/components/select#selecttrigger
|
|
227
|
-
*
|
|
228
|
-
* @example
|
|
229
|
-
* ```tsx
|
|
230
|
-
* <Select.Root>
|
|
231
|
-
* <Select.Trigger>
|
|
232
|
-
* <Select.Value placeholder="Select a fruit" />
|
|
233
|
-
* </Select.Trigger>
|
|
234
|
-
* <Select.Content>
|
|
235
|
-
* <Select.Item value="apple">Apple</Select.Item>
|
|
236
|
-
* <Select.Item value="banana">Banana</Select.Item>
|
|
237
|
-
* <Select.Item value="cherry">Cherry</Select.Item>
|
|
238
|
-
* </Select.Content>
|
|
239
|
-
* </Select.Root>
|
|
240
|
-
* ```
|
|
241
|
-
*/
|
|
242
|
-
readonly Trigger: react.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectTriggerProps & react.RefAttributes<HTMLButtonElement>, "ref"> & WithAriaInvalid & WithValidation & react.RefAttributes<HTMLButtonElement>>;
|
|
243
|
-
/**
|
|
244
|
-
* The part that reflects the selected value. By default the selected item's text will be rendered. if you require more control, you can instead control the select and pass your own children. It should not be styled to ensure correct positioning. An optional placeholder prop is also available for when the select has no value.
|
|
245
|
-
*
|
|
246
|
-
* @see https://mantle.ngrok.com/components/select#selectvalue
|
|
247
|
-
*
|
|
248
|
-
* @example
|
|
249
|
-
* <Select.Root>
|
|
250
|
-
* <Select.Trigger>
|
|
251
|
-
* <Select.Value placeholder="Select a fruit" />
|
|
252
|
-
* </Select.Trigger>
|
|
253
|
-
* <Select.Content>
|
|
254
|
-
* <Select.Item value="apple">Apple</Select.Item>
|
|
255
|
-
* <Select.Item value="banana">Banana</Select.Item>
|
|
256
|
-
* <Select.Item value="cherry">Cherry</Select.Item>
|
|
257
|
-
* </Select.Content>
|
|
258
|
-
* </Select.Root>
|
|
259
|
-
*/
|
|
260
|
-
readonly Value: react.ForwardRefExoticComponent<SelectPrimitive.SelectValueProps & react.RefAttributes<HTMLSpanElement>>;
|
|
261
|
-
};
|
|
262
|
-
|
|
263
|
-
export { Select };
|
|
1
|
+
import { t as Select } from "./select-39Jfc1Cb.js";
|
|
2
|
+
export { Select };
|
package/dist/select.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
import{
|
|
2
|
-
//# sourceMappingURL=select.js.map
|
|
1
|
+
import{t as e}from"./select-DZ2ztBkI.js";export{e as Select};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{t as e}from"./cx-bKromGBh.js";import{t}from"./slot-DdnjeV2n.js";import{createContext as n,forwardRef as r,useContext as i}from"react";import{jsx as a}from"react/jsx-runtime";const o=[`horizontal`,`vertical`],s=n({}),c=({className:n,children:r,asChild:i,...o})=>{let c=i?t:`div`;return a(s.Provider,{value:{orientation:`horizontal`},children:a(c,{"data-horizontal-separator-group":!0,className:e(`group flex items-center gap-2 [&_*:not([data-separator])]:shrink-0`,n),...o,children:r})})};c.displayName=`HorizontalSeparatorGroup`;const l=r(({asChild:n=!1,children:r,className:o,orientation:c,semantic:l=!1,...d},f)=>{let p=n?t:`div`,m=i(s).orientation??(u(c)?c:`horizontal`),h=m===`vertical`?m:void 0,g=l?{"aria-orientation":h,role:`separator`}:{role:`none`};return a(p,{className:e(`separator`,`dark-high-contrast:bg-black high-contrast:bg-black bg-gray-500/20 dark:bg-gray-600/20`,m===`horizontal`?`h-px w-full group-data-horizontal-separator-group:flex-1`:`h-full w-px`,o),"data-orientation":m,"data-separator":!0,...g,ref:f,...n?{children:r}:{},...d})});l.displayName=`Separator`;function u(e){return typeof e==`string`&&o.includes(e)}export{l as n,c as t};
|
|
2
|
+
//# sourceMappingURL=separator-BcCNbHBg.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"separator-BcCNbHBg.js","names":[],"sources":["../src/components/separator/separator.tsx"],"sourcesContent":["import type { ComponentProps, ComponentRef, HTMLAttributes } from \"react\";\nimport { createContext, forwardRef, useContext } from \"react\";\nimport type { WithAsChild } from \"../../types/as-child.js\";\nimport { cx } from \"../../utils/cx/cx.js\";\nimport { Slot } from \"../slot/index.js\";\n\nconst orientations = [\"horizontal\", \"vertical\"] as const;\ntype Orientation = (typeof orientations)[number];\n\ntype SeparatorGroupContextShape = {\n\torientation?: Orientation;\n};\n\nconst SeparatorGroupContext = createContext<SeparatorGroupContextShape>({});\n\n/**\n * A container to layout a group of horizontal separators and other children.\n * Overrides all children `Separator`s to be `orientation=\"horizontal\"`.\n *\n * @see https://mantle.ngrok.com/components/separator\n *\n * @example\n * ```tsx\n * <HorizontalSeparatorGroup>\n * <Separator />\n * <h3>ngrok mantle</h3>\n * <Separator />\n * </HorizontalSeparatorGroup>\n *\n * <HorizontalSeparatorGroup>\n * <h3>ngrok mantle</h3>\n * <Separator />\n * </HorizontalSeparatorGroup>\n *\n * <HorizontalSeparatorGroup>\n * <Separator />\n * <h3>ngrok mantle</h3>\n * </HorizontalSeparatorGroup>\n * ```\n */\nconst HorizontalSeparatorGroup = ({\n\tclassName,\n\tchildren,\n\tasChild,\n\t...props\n}: HTMLAttributes<HTMLDivElement> & WithAsChild) => {\n\tconst Comp = asChild ? Slot : \"div\";\n\n\treturn (\n\t\t<SeparatorGroupContext.Provider value={{ orientation: \"horizontal\" }}>\n\t\t\t<Comp\n\t\t\t\tdata-horizontal-separator-group\n\t\t\t\tclassName={cx(\n\t\t\t\t\t\"group flex items-center gap-2 [&_*:not([data-separator])]:shrink-0\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</Comp>\n\t\t</SeparatorGroupContext.Provider>\n\t);\n};\nHorizontalSeparatorGroup.displayName = \"HorizontalSeparatorGroup\";\n\ntype SeparatorProps = ComponentProps<\"div\"> &\n\tWithAsChild & {\n\t\t/**\n\t\t * Either `horizontal` or `vertical`.\n\t\t *\n\t\t * @default \"horizontal\"\n\t\t */\n\t\torientation?: Orientation;\n\t\t/**\n\t\t * If `true`, the separator will be rendered with all accessibility-related attributes and role=\"separator\".\n\t\t * If `false`, the separator is purely decorative and all accessibility-related attributes\n\t\t * are updated so that that the rendered element is removed from the accessibility tree.\n\t\t *\n\t\t * @default false\n\t\t */\n\t\tsemantic?: boolean;\n\t};\n\n/**\n * Visually or semantically separates content.\n *\n * @see https://mantle.ngrok.com/components/separator\n *\n * @example\n * ```tsx\n * <Separator className=\"my-4\" />\n *\n * <Separator className=\"my-4\" semantic />\n *\n * <div className=\"flex h-5 items-center gap-4 text-sm\">\n * Blog\n * <Separator orientation=\"vertical\" />\n * Docs\n * <Separator orientation=\"vertical\" />\n * Source\n * </div>\n * ```\n */\nconst Separator = forwardRef<ComponentRef<\"div\">, SeparatorProps>(\n\t(\n\t\t{\n\t\t\tasChild = false,\n\t\t\tchildren,\n\t\t\tclassName,\n\t\t\torientation: propOrientation,\n\t\t\tsemantic = false,\n\t\t\t...props\n\t\t},\n\t\tref,\n\t) => {\n\t\tconst Component = asChild ? Slot : \"div\";\n\t\tconst ctx = useContext(SeparatorGroupContext);\n\t\t// Prefer the orientation from the context if it's set, else fallback to the prop and then to \"horizontal\".\n\t\tconst orientation =\n\t\t\tctx.orientation ?? (isOrientation(propOrientation) ? propOrientation : \"horizontal\");\n\t\t// `aria-orientation` defaults to `horizontal` so we only need it if `orientation` is vertical\n\t\tconst ariaOrientation = orientation === \"vertical\" ? orientation : undefined;\n\t\tconst semanticProps = semantic\n\t\t\t? { \"aria-orientation\": ariaOrientation, role: \"separator\" }\n\t\t\t: { role: \"none\" };\n\n\t\treturn (\n\t\t\t<Component\n\t\t\t\tclassName={cx(\n\t\t\t\t\t\"separator\",\n\t\t\t\t\t\"dark-high-contrast:bg-black high-contrast:bg-black bg-gray-500/20 dark:bg-gray-600/20\",\n\t\t\t\t\torientation === \"horizontal\"\n\t\t\t\t\t\t? \"h-px w-full group-data-horizontal-separator-group:flex-1\"\n\t\t\t\t\t\t: \"h-full w-px\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\tdata-orientation={orientation}\n\t\t\t\tdata-separator\n\t\t\t\t{...semanticProps}\n\t\t\t\tref={ref}\n\t\t\t\t{...(asChild ? { children } : {})} // only pass children if asChild is true\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t);\n\t},\n);\nSeparator.displayName = \"Separator\";\n\nexport {\n\t//,\n\tHorizontalSeparatorGroup,\n\tSeparator,\n};\n\nfunction isOrientation(value: unknown): value is Orientation {\n\treturn typeof value === \"string\" && orientations.includes(value as Orientation);\n}\n"],"mappings":"qLAMA,MAAM,EAAe,CAAC,aAAc,WAAW,CAOzC,EAAwB,EAA0C,EAAE,CAAC,CA2BrE,GAA4B,CACjC,YACA,WACA,UACA,GAAG,KACgD,CACnD,IAAM,EAAO,EAAU,EAAO,MAE9B,OACC,EAAC,EAAsB,SAAvB,CAAgC,MAAO,CAAE,YAAa,aAAc,UACnE,EAAC,EAAD,CACC,kCAAA,GACA,UAAW,EACV,qEACA,EACA,CACD,GAAI,EAEH,WACK,CAAA,CACyB,CAAA,EAGnC,EAAyB,YAAc,2BAwCvC,MAAM,EAAY,GAEhB,CACC,UAAU,GACV,WACA,YACA,YAAa,EACb,WAAW,GACX,GAAG,GAEJ,IACI,CACJ,IAAM,EAAY,EAAU,EAAO,MAG7B,EAFM,EAAW,EAAsB,CAGxC,cAAgB,EAAc,EAAgB,CAAG,EAAkB,cAElE,EAAkB,IAAgB,WAAa,EAAc,IAAA,GAC7D,EAAgB,EACnB,CAAE,mBAAoB,EAAiB,KAAM,YAAa,CAC1D,CAAE,KAAM,OAAQ,CAEnB,OACC,EAAC,EAAD,CACC,UAAW,EACV,YACA,wFACA,IAAgB,aACb,2DACA,cACH,EACA,CACD,mBAAkB,EAClB,iBAAA,GACA,GAAI,EACC,MACL,GAAK,EAAU,CAAE,WAAU,CAAG,EAAE,CAChC,GAAI,EACH,CAAA,EAGJ,CACD,EAAU,YAAc,YAQxB,SAAS,EAAc,EAAsC,CAC5D,OAAO,OAAO,GAAU,UAAY,EAAa,SAAS,EAAqB"}
|
package/dist/separator.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import { t as WithAsChild } from "./as-child-XMVTepJu.js";
|
|
2
|
+
import * as react from "react";
|
|
3
|
+
import { ComponentProps, HTMLAttributes } from "react";
|
|
4
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
5
5
|
|
|
6
|
+
//#region src/components/separator/separator.d.ts
|
|
6
7
|
declare const orientations: readonly ["horizontal", "vertical"];
|
|
7
8
|
type Orientation = (typeof orientations)[number];
|
|
8
9
|
/**
|
|
@@ -31,24 +32,29 @@ type Orientation = (typeof orientations)[number];
|
|
|
31
32
|
* ```
|
|
32
33
|
*/
|
|
33
34
|
declare const HorizontalSeparatorGroup: {
|
|
34
|
-
|
|
35
|
-
|
|
35
|
+
({
|
|
36
|
+
className,
|
|
37
|
+
children,
|
|
38
|
+
asChild,
|
|
39
|
+
...props
|
|
40
|
+
}: HTMLAttributes<HTMLDivElement> & WithAsChild): react_jsx_runtime0.JSX.Element;
|
|
41
|
+
displayName: string;
|
|
36
42
|
};
|
|
37
43
|
type SeparatorProps = ComponentProps<"div"> & WithAsChild & {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
44
|
+
/**
|
|
45
|
+
* Either `horizontal` or `vertical`.
|
|
46
|
+
*
|
|
47
|
+
* @default "horizontal"
|
|
48
|
+
*/
|
|
49
|
+
orientation?: Orientation;
|
|
50
|
+
/**
|
|
51
|
+
* If `true`, the separator will be rendered with all accessibility-related attributes and role="separator".
|
|
52
|
+
* If `false`, the separator is purely decorative and all accessibility-related attributes
|
|
53
|
+
* are updated so that that the rendered element is removed from the accessibility tree.
|
|
54
|
+
*
|
|
55
|
+
* @default false
|
|
56
|
+
*/
|
|
57
|
+
semantic?: boolean;
|
|
52
58
|
};
|
|
53
59
|
/**
|
|
54
60
|
* Visually or semantically separates content.
|
|
@@ -71,5 +77,6 @@ type SeparatorProps = ComponentProps<"div"> & WithAsChild & {
|
|
|
71
77
|
* ```
|
|
72
78
|
*/
|
|
73
79
|
declare const Separator: react.ForwardRefExoticComponent<Omit<SeparatorProps, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
74
|
-
|
|
80
|
+
//#endregion
|
|
75
81
|
export { HorizontalSeparatorGroup, Separator };
|
|
82
|
+
//# sourceMappingURL=separator.d.ts.map
|
package/dist/separator.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
import{
|
|
2
|
-
//# sourceMappingURL=separator.js.map
|
|
1
|
+
import{n as e,t}from"./separator-BcCNbHBg.js";export{t as HorizontalSeparatorGroup,e as Separator};
|