@ngrok/mantle 0.65.0 → 0.66.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/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-jrBUqioz.js +2 -0
- package/dist/browser-only-jrBUqioz.js.map +1 -0
- package/dist/browser-only.d.ts +20 -15
- package/dist/browser-only.js +1 -2
- package/dist/button-CKL-3sIr.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-CGBjHvo_.js +2 -0
- package/dist/dialog-CGBjHvo_.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 +116 -50
- 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 +278 -0
- package/dist/multi-select.js +2 -0
- package/dist/multi-select.js.map +1 -0
- 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-W5Izf14l.js +2 -0
- package/dist/primitive-W5Izf14l.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-CbzLgte1.js +2 -0
- package/dist/theme-provider-CbzLgte1.js.map +1 -0
- package/dist/theme.d.ts +65 -38
- package/dist/theme.js +1 -2
- package/dist/{themes-Bi46K9ZW.d.ts → themes-ClppRAGt.d.ts} +4 -2
- package/dist/toast-B4gxB8U0.js +2 -0
- package/dist/toast-B4gxB8U0.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-BxTQ5f4i.js +2 -0
- package/dist/use-matches-media-query-BxTQ5f4i.js.map +1 -0
- package/dist/use-prefers-reduced-motion-BPlsKyCJ.js +2 -0
- package/dist/use-prefers-reduced-motion-BPlsKyCJ.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 +15 -7
- 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-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-EIEPGCIG.js +0 -2
- package/dist/chunk-EIEPGCIG.js.map +0 -1
- package/dist/chunk-ELZLLG6G.js +0 -2
- package/dist/chunk-ELZLLG6G.js.map +0 -1
- package/dist/chunk-EYZYDUS2.js +0 -2
- package/dist/chunk-EYZYDUS2.js.map +0 -1
- package/dist/chunk-HF3KJHO3.js +0 -2
- package/dist/chunk-HF3KJHO3.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-KCF3KPUB.js +0 -2
- package/dist/chunk-KCF3KPUB.js.map +0 -1
- package/dist/chunk-KMNACVH6.js +0 -2
- package/dist/chunk-KMNACVH6.js.map +0 -1
- package/dist/chunk-MLXONRJD.js +0 -2
- package/dist/chunk-MLXONRJD.js.map +0 -1
- package/dist/chunk-NJNFZ2EG.js +0 -2
- package/dist/chunk-NJNFZ2EG.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-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/command.d.ts
CHANGED
|
@@ -1,18 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import * as react from
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
import { Dialog } from './dialog.js';
|
|
8
|
-
import '@radix-ui/react-dialog';
|
|
9
|
-
import './icon-button-CT71Ti9V.js';
|
|
10
|
-
import 'class-variance-authority/types';
|
|
11
|
-
import './variant-props-oDo2u-We.js';
|
|
12
|
-
import 'class-variance-authority';
|
|
13
|
-
import './deep-non-nullable-SmpSvoSd.js';
|
|
14
|
-
import './primitive-CBR_XmVa.js';
|
|
1
|
+
import { t as WithAsChild } from "./as-child-XMVTepJu.js";
|
|
2
|
+
import { t as Dialog } from "./dialog-BuD_JQf_.js";
|
|
3
|
+
import * as react from "react";
|
|
4
|
+
import { ComponentProps, ComponentPropsWithoutRef } from "react";
|
|
5
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
6
|
+
import { Command as Command$1, useCommandState } from "cmdk";
|
|
15
7
|
|
|
8
|
+
//#region src/components/command/command.d.ts
|
|
16
9
|
type CommandRootProps = ComponentPropsWithoutRef<typeof Command$1>;
|
|
17
10
|
/**
|
|
18
11
|
* The props for the CommandDialog component.
|
|
@@ -20,34 +13,34 @@ type CommandRootProps = ComponentPropsWithoutRef<typeof Command$1>;
|
|
|
20
13
|
* @see https://mantle.ngrok.com/components/command#commanddialog
|
|
21
14
|
*/
|
|
22
15
|
type CommandDialogProps = ComponentPropsWithoutRef<typeof Dialog.Root> & {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
16
|
+
/**
|
|
17
|
+
* The title of the command dialog.
|
|
18
|
+
*/
|
|
19
|
+
title?: string;
|
|
20
|
+
/**
|
|
21
|
+
* The description of the command dialog.
|
|
22
|
+
*/
|
|
23
|
+
description?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Class name(s) to apply to the command dialog content.
|
|
26
|
+
*/
|
|
27
|
+
className?: string;
|
|
28
|
+
/**
|
|
29
|
+
* Whether to show the close button.
|
|
30
|
+
*/
|
|
31
|
+
showCloseButton?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Custom filter function for the command list.
|
|
34
|
+
*
|
|
35
|
+
* @see https://github.com/pacocoursey/cmdk?tab=readme-ov-file#filtering
|
|
36
|
+
*/
|
|
37
|
+
filter?: CommandRootProps["filter"];
|
|
38
|
+
/**
|
|
39
|
+
* Whether to enable filtering of command items. When false, disables built-in filtering.
|
|
40
|
+
*
|
|
41
|
+
* @see https://github.com/pacocoursey/cmdk?tab=readme-ov-file#filtering
|
|
42
|
+
*/
|
|
43
|
+
shouldFilter?: CommandRootProps["shouldFilter"];
|
|
51
44
|
};
|
|
52
45
|
/**
|
|
53
46
|
* The command component for the Command. It provides the command for the command palette.
|
|
@@ -75,189 +68,199 @@ type CommandDialogProps = ComponentPropsWithoutRef<typeof Dialog.Root> & {
|
|
|
75
68
|
* </Command.Dialog>
|
|
76
69
|
*/
|
|
77
70
|
declare const Command: {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
71
|
+
/**
|
|
72
|
+
* The root component for the Command component.
|
|
73
|
+
*
|
|
74
|
+
* @see https://mantle.ngrok.com/components/command#commandroot
|
|
75
|
+
*
|
|
76
|
+
* @example
|
|
77
|
+
* ```tsx
|
|
78
|
+
* <Command.Root>
|
|
79
|
+
* <Command.Input placeholder="Type a command or search..." />
|
|
80
|
+
* <Command.List>
|
|
81
|
+
* <Command.Empty>No results found.</Command.Empty>
|
|
82
|
+
* </Command.List>
|
|
83
|
+
* </Command.Root>
|
|
84
|
+
* ```
|
|
85
|
+
*/
|
|
86
|
+
readonly Root: react.ForwardRefExoticComponent<Omit<{
|
|
87
|
+
children?: React.ReactNode;
|
|
88
|
+
} & Pick<Pick<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof react.HTMLAttributes<HTMLDivElement>> & {
|
|
89
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
90
|
+
} & {
|
|
91
|
+
asChild?: boolean;
|
|
92
|
+
}, "key" | keyof react.HTMLAttributes<HTMLDivElement> | "asChild"> & {
|
|
93
|
+
label?: string;
|
|
94
|
+
shouldFilter?: boolean;
|
|
95
|
+
filter?: (value: string, search: string, keywords?: string[]) => number;
|
|
96
|
+
defaultValue?: string;
|
|
97
|
+
value?: string;
|
|
98
|
+
onValueChange?: (value: string) => void;
|
|
99
|
+
loop?: boolean;
|
|
100
|
+
disablePointerSelection?: boolean;
|
|
101
|
+
vimBindings?: boolean;
|
|
102
|
+
} & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
103
|
+
/**
|
|
104
|
+
* The dialog component for the Command component.
|
|
105
|
+
*
|
|
106
|
+
* @see https://mantle.ngrok.com/components/command#commanddialog
|
|
107
|
+
*
|
|
108
|
+
* @example
|
|
109
|
+
* ```tsx
|
|
110
|
+
* <Command.Dialog>
|
|
111
|
+
* <Command.Input placeholder="Type a command or search..." />
|
|
112
|
+
* <Command.List>
|
|
113
|
+
* <Command.Empty>No results found.</Command.Empty>
|
|
114
|
+
* </Command.List>
|
|
115
|
+
* </Command.Dialog>
|
|
116
|
+
* ```
|
|
117
|
+
*/
|
|
118
|
+
readonly Dialog: {
|
|
119
|
+
({
|
|
120
|
+
children,
|
|
121
|
+
className,
|
|
122
|
+
description,
|
|
123
|
+
filter,
|
|
124
|
+
shouldFilter,
|
|
125
|
+
showCloseButton,
|
|
126
|
+
title,
|
|
127
|
+
...props
|
|
128
|
+
}: CommandDialogProps): react_jsx_runtime0.JSX.Element;
|
|
129
|
+
displayName: string;
|
|
130
|
+
};
|
|
131
|
+
/**
|
|
132
|
+
* The input component for the Command component.
|
|
133
|
+
*
|
|
134
|
+
* @see https://mantle.ngrok.com/components/command#commandinput
|
|
135
|
+
*
|
|
136
|
+
* @example
|
|
137
|
+
* ```tsx
|
|
138
|
+
* <Command.Input placeholder="Type a command or search..." />
|
|
139
|
+
* ```
|
|
140
|
+
*/
|
|
141
|
+
readonly Input: react.ForwardRefExoticComponent<Omit<Omit<Pick<Pick<react.DetailedHTMLProps<react.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "key" | keyof react.InputHTMLAttributes<HTMLInputElement>> & {
|
|
142
|
+
ref?: React.Ref<HTMLInputElement>;
|
|
143
|
+
} & {
|
|
144
|
+
asChild?: boolean;
|
|
145
|
+
}, "key" | "asChild" | keyof react.InputHTMLAttributes<HTMLInputElement>>, "onChange" | "type" | "value"> & {
|
|
146
|
+
value?: string;
|
|
147
|
+
onValueChange?: (search: string) => void;
|
|
148
|
+
} & react.RefAttributes<HTMLInputElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
149
|
+
/**
|
|
150
|
+
* The list component for the Command component.
|
|
151
|
+
*
|
|
152
|
+
* @see https://mantle.ngrok.com/components/command#commandlist
|
|
153
|
+
*
|
|
154
|
+
* @example
|
|
155
|
+
* ```tsx
|
|
156
|
+
* <Command.List>
|
|
157
|
+
* <Command.Empty>No results found.</Command.Empty>
|
|
158
|
+
* </Command.List>
|
|
159
|
+
*/
|
|
160
|
+
readonly List: react.ForwardRefExoticComponent<Omit<{
|
|
161
|
+
children?: React.ReactNode;
|
|
162
|
+
} & Pick<Pick<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof react.HTMLAttributes<HTMLDivElement>> & {
|
|
163
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
164
|
+
} & {
|
|
165
|
+
asChild?: boolean;
|
|
166
|
+
}, "key" | keyof react.HTMLAttributes<HTMLDivElement> | "asChild"> & {
|
|
167
|
+
label?: string;
|
|
168
|
+
} & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
169
|
+
/**
|
|
170
|
+
* The empty component for the Command component.
|
|
171
|
+
*
|
|
172
|
+
* @see https://mantle.ngrok.com/components/command#commandempty
|
|
173
|
+
*
|
|
174
|
+
* @example
|
|
175
|
+
* ```tsx
|
|
176
|
+
* <Command.Empty>No results found.</Command.Empty>
|
|
177
|
+
* ```
|
|
178
|
+
*/
|
|
179
|
+
readonly Empty: react.ForwardRefExoticComponent<Omit<{
|
|
180
|
+
children?: React.ReactNode;
|
|
181
|
+
} & Pick<Pick<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof react.HTMLAttributes<HTMLDivElement>> & {
|
|
182
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
183
|
+
} & {
|
|
184
|
+
asChild?: boolean;
|
|
185
|
+
}, "key" | keyof react.HTMLAttributes<HTMLDivElement> | "asChild"> & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
186
|
+
/**
|
|
187
|
+
* The group component for the Command component.
|
|
188
|
+
*
|
|
189
|
+
* @see https://mantle.ngrok.com/components/command#commandgroup
|
|
190
|
+
*
|
|
191
|
+
* @example
|
|
192
|
+
* ```tsx
|
|
193
|
+
* <Command.Group heading="Suggestions">
|
|
194
|
+
* <Command.Item>
|
|
195
|
+
* Calendar
|
|
196
|
+
* </Command.Item>
|
|
197
|
+
* </Command.Group>
|
|
198
|
+
* ```
|
|
199
|
+
*/
|
|
200
|
+
readonly Group: react.ForwardRefExoticComponent<Omit<{
|
|
201
|
+
children?: React.ReactNode;
|
|
202
|
+
} & Omit<Pick<Pick<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof react.HTMLAttributes<HTMLDivElement>> & {
|
|
203
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
204
|
+
} & {
|
|
205
|
+
asChild?: boolean;
|
|
206
|
+
}, "key" | keyof react.HTMLAttributes<HTMLDivElement> | "asChild">, "heading" | "value"> & {
|
|
207
|
+
heading?: React.ReactNode;
|
|
208
|
+
value?: string;
|
|
209
|
+
forceMount?: boolean;
|
|
210
|
+
} & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
211
|
+
/**
|
|
212
|
+
* The item component for the Command component.
|
|
213
|
+
*
|
|
214
|
+
* @see https://mantle.ngrok.com/components/command#commanditem
|
|
215
|
+
*
|
|
216
|
+
* @example
|
|
217
|
+
* ```tsx
|
|
218
|
+
* <Command.Item>
|
|
219
|
+
* Calendar
|
|
220
|
+
* </Command.Item>
|
|
221
|
+
* ```
|
|
222
|
+
*/
|
|
223
|
+
readonly Item: react.ForwardRefExoticComponent<Omit<{
|
|
224
|
+
children?: React.ReactNode;
|
|
225
|
+
} & Omit<Pick<Pick<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof react.HTMLAttributes<HTMLDivElement>> & {
|
|
226
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
227
|
+
} & {
|
|
228
|
+
asChild?: boolean;
|
|
229
|
+
}, "key" | keyof react.HTMLAttributes<HTMLDivElement> | "asChild">, "onSelect" | "disabled" | "value"> & {
|
|
230
|
+
disabled?: boolean;
|
|
231
|
+
onSelect?: (value: string) => void;
|
|
232
|
+
value?: string;
|
|
233
|
+
keywords?: string[];
|
|
234
|
+
forceMount?: boolean;
|
|
235
|
+
} & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
236
|
+
/**
|
|
237
|
+
* The shortcut component for the Command component.
|
|
238
|
+
*
|
|
239
|
+
* @see https://mantle.ngrok.com/components/command#commandshortcut
|
|
240
|
+
*
|
|
241
|
+
* @example
|
|
242
|
+
* ```tsx
|
|
243
|
+
* <Command.Shortcut>⌘,</Command.Shortcut>
|
|
244
|
+
* ```
|
|
245
|
+
*/
|
|
246
|
+
readonly Shortcut: react.ForwardRefExoticComponent<Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & react.RefAttributes<HTMLSpanElement>>;
|
|
247
|
+
/**
|
|
248
|
+
* The separator component for the Command component.
|
|
249
|
+
*
|
|
250
|
+
* @see https://mantle.ngrok.com/components/command#commandseparator
|
|
251
|
+
*
|
|
252
|
+
* @example
|
|
253
|
+
* ```tsx
|
|
254
|
+
* <Command.Separator />
|
|
255
|
+
* ```
|
|
256
|
+
*/
|
|
257
|
+
readonly Separator: react.ForwardRefExoticComponent<Omit<Omit<react.ClassAttributes<HTMLDivElement> & react.HTMLAttributes<HTMLDivElement> & WithAsChild & {
|
|
258
|
+
orientation?: "horizontal" | "vertical";
|
|
259
|
+
semantic?: boolean;
|
|
260
|
+
}, "ref"> & react.RefAttributes<HTMLDivElement>, "ref"> & react.RefAttributes<HTMLDivElement>>;
|
|
259
261
|
};
|
|
260
|
-
|
|
262
|
+
//#endregion
|
|
263
|
+
//#region src/components/command/meta-key.d.ts
|
|
261
264
|
type Props = Omit<ComponentProps<"kbd">, "children">;
|
|
262
265
|
/**
|
|
263
266
|
* Renders the platform-appropriate meta key kbd (⌘ or ⌃).
|
|
@@ -265,6 +268,10 @@ type Props = Omit<ComponentProps<"kbd">, "children">;
|
|
|
265
268
|
* - Initializes to `"⌃"` to avoid SSR mismatch.
|
|
266
269
|
* - Updates on mount using `detectMetaKey()`.
|
|
267
270
|
*/
|
|
268
|
-
declare function MetaKey({
|
|
269
|
-
|
|
270
|
-
|
|
271
|
+
declare function MetaKey({
|
|
272
|
+
className,
|
|
273
|
+
...props
|
|
274
|
+
}: Props): react_jsx_runtime0.JSX.Element;
|
|
275
|
+
//#endregion
|
|
276
|
+
export { Command, MetaKey, useCommandState };
|
|
277
|
+
//# sourceMappingURL=command.d.ts.map
|
package/dist/command.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{t as e}from"./cx-bKromGBh.js";import{n as t}from"./separator-BcCNbHBg.js";import{t as n}from"./dialog-CGBjHvo_.js";import{t as r}from"./kbd-pyj32aN4.js";import{forwardRef as i,useEffect as a,useState as o}from"react";import{jsx as s,jsxs as c}from"react/jsx-runtime";import{MagnifyingGlassIcon as l}from"@phosphor-icons/react/MagnifyingGlass";import{Command as u,useCommandState as d}from"cmdk";const f=i(({className:t,...n},r)=>s(u,{ref:r,"data-slot":`command`,className:e(`bg-popover flex h-full w-full flex-col overflow-hidden rounded-md`,t),...n}));f.displayName=`Command`;const p=({children:t,className:r,description:i=`Search for a command to run...`,filter:a,shouldFilter:o,showCloseButton:l=!0,title:u=`Command Palette`,...d})=>c(n.Root,{...d,children:[c(n.Header,{className:`sr-only absolute`,children:[s(n.Title,{children:u}),s(n.Description,{children:i})]}),c(n.Content,{className:e(`overflow-hidden p-0 relative`,r),children:[s(f,{className:`**:[[cmdk-group-heading]]:text-muted **:data-[slot=command-input-wrapper]:h-12 **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:font-medium **:[[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 **:[[cmdk-input]]:h-12 **:[[cmdk-item]]:px-2 **:[[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5`,filter:a,shouldFilter:o,children:t}),l&&s(`div`,{className:`absolute top-1.5 right-1.5`,children:s(n.CloseIconButton,{})})]})]});p.displayName=`CommandDialog`;const m=i(({className:t,...n},r)=>c(`div`,{ref:r,"data-slot":`command-input-wrapper`,className:`flex h-9 items-center gap-2 border-b border-popover px-3`,children:[s(l,{className:`size-4 shrink-0 opacity-50`}),s(u.Input,{"data-slot":`command-input`,className:e(`placeholder:text-muted flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50`,t),...n})]}));m.displayName=`CommandInput`;const h=i(({className:t,...n},r)=>s(u.List,{ref:r,"data-slot":`command-list`,className:e(`max-h-75 scroll-py-1 overflow-x-hidden overflow-y-auto scrollbar`,t),...n}));h.displayName=`CommandList`;const g=i(({className:t,...n},r)=>s(u.Empty,{ref:r,"data-slot":`command-empty`,className:e(`py-6 text-center text-sm`,t),...n}));g.displayName=`CommandEmpty`;const _=i(({className:t,...n},r)=>s(u.Group,{ref:r,"data-slot":`command-group`,className:e(`**:[[cmdk-group-heading]]:text-muted overflow-hidden p-1 **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:py-1.5 **:[[cmdk-group-heading]]:text-xs **:[[cmdk-group-heading]]:font-medium`,t),...n}));_.displayName=`CommandGroup`;const v=i(({className:n,...r},i)=>s(t,{ref:i,"data-slot":`command-separator`,className:e(`-mx-1 my-1 w-auto`,n),...r}));v.displayName=`CommandSeparator`;const y=i(({className:t,...n},r)=>s(u.Item,{ref:r,"data-slot":`command-item`,className:e(`data-[selected=true]:bg-popover-hover [&_svg:not([class*='text-'])]:text-muted relative flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,t),...n}));y.displayName=`CommandItem`;const b=i(({className:t,...n},r)=>s(`span`,{ref:r,"data-slot":`command-shortcut`,className:e(`text-muted ml-auto text-xs tracking-widest`,t),...n}));b.displayName=`CommandShortcut`;const x={Root:f,Dialog:p,Input:m,List:h,Empty:g,Group:_,Item:y,Shortcut:b,Separator:v};function S({className:t,...n}){let[i,l]=o(`⌃`);a(()=>{l(w())},[]);let u=i===`⌘`?`Command`:`Control`;return c(r,{...n,suppressHydrationWarning:!0,className:e(i===`⌃`&&`font-medium`,t),children:[s(`span`,{className:`sr-only`,children:u}),i]})}function C(e){return`userAgentData`in e}function w(){if(typeof navigator>`u`)return`⌃`;let e=``;return C(navigator)&&(e=navigator.userAgentData.platform??``),e||=navigator.platform||navigator.userAgent||``,/mac|iphone|ipad|ipod/i.test(e)?`⌘`:`⌃`}export{x as Command,S as MetaKey,d as useCommandState};
|
|
2
2
|
//# sourceMappingURL=command.js.map
|