@fldr/ui 0.3.8 → 0.3.10
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 +67 -448
- package/ai/component-registry.json +27 -14
- package/ai/component-registry.md +3 -3
- package/dist/.build-complete +1 -1
- package/dist/blocks-source/auth-card/auth-card.test.tsx +20 -14
- package/dist/blocks-source/auth-card/auth-card.tsx +73 -55
- package/dist/blocks-source/file-table/file-table.tsx +197 -150
- package/dist/blocks-source/login-page/login-page.tsx +3 -1
- package/dist/blocks-source/share-dialog/share-dialog.test.tsx +9 -3
- package/dist/blocks-source/share-dialog/share-dialog.tsx +50 -35
- package/dist/blocks.d.ts +24 -5
- package/dist/blocks.js +250 -197
- package/dist/brands.d.ts +143 -0
- package/dist/brands.js +92 -0
- package/dist/{button-DzavLWXm.d.ts → button-CS82eT0x.d.ts} +1 -1
- package/dist/chunks/{checkbox-eifiwbw34xwsikvf.js → checkbox-d5epe4dl78bzy4f8.js} +8 -8
- package/dist/chunks/{dropdown-e5zk0ez21busnt0b.js → dropdown-oec4g1w9kbsjsg15.js} +1 -1
- package/dist/chunks/highlighter-kb7huz24pcziin6d.js +57 -0
- package/dist/chunks/{layer-dialog-m8qb0wzfg3k7406a.js → layer-dialog-ioa3r4ayemppsspx.js} +4 -3
- package/dist/chunks/{table-ngl1b5yc8mcur662.js → table-bdye068ekayq3u1n.js} +1 -1
- package/dist/chunks/table-n5yarooiknhc18ln.js +448 -0
- package/dist/chunks/{table-of-contents-gkjv9ck8etbz64ej.js → table-of-contents-d3pmkrk223umdz9h.js} +1 -1
- package/dist/code/server.js +1 -1
- package/dist/code.js +4 -131
- package/dist/components/banner.d.ts +1 -1
- package/dist/components/button.d.ts +2 -2
- package/dist/components/checkbox.d.ts +1 -1
- package/dist/components/checkbox.js +1 -1
- package/dist/components/dropdown.js +1 -1
- package/dist/components/input-group.d.ts +2 -1
- package/dist/components/input.d.ts +2 -2
- package/dist/components/layer-dialog.js +1 -1
- package/dist/components/link.d.ts +2 -67
- package/dist/components/sidebar.d.ts +2 -1
- package/dist/components/table-of-contents.js +1 -1
- package/dist/components/table.d.ts +1 -1
- package/dist/components/table.js +1 -1
- package/dist/components/toast.d.ts +1 -1
- package/dist/components/toolbar.d.ts +1 -1
- package/dist/form.d.ts +207 -0
- package/dist/form.js +317 -0
- package/dist/hotkeys.d.ts +135 -0
- package/dist/hotkeys.js +203 -0
- package/dist/index-9LwQy84o.d.ts +1 -0
- package/dist/index-B7iG0qDU.d.ts +1 -0
- package/dist/{index-B6JNUfG9.d.ts → index-BMXHK-3k.d.ts} +2 -2
- package/dist/{index-B6Wo_iiN.d.ts → index-B_ug9XY7.d.ts} +1 -1
- package/dist/{index-RP_rt8vB.d.ts → index-Bh9kuAvN.d.ts} +1 -1
- package/dist/{index-DjSGDESy.d.ts → index-CAUjUp2G.d.ts} +1 -1
- package/dist/{index-NnHba-T1.d.ts → index-DK28YxxP.d.ts} +2 -2
- package/dist/{index-aahL-0Zw.d.ts → index-DOVlARA6.d.ts} +2 -2
- package/dist/index-DTj6M6kA.d.ts +1 -0
- package/dist/index.d.ts +14 -12
- package/dist/index.js +5 -6
- package/dist/{input-group-8gEtPiKw.d.ts → input-group-Swzit45o.d.ts} +1 -1
- package/dist/link-CoVXE5W2.d.ts +68 -0
- package/dist/query.d.ts +156 -0
- package/dist/query.js +204 -0
- package/dist/router.d.ts +95 -0
- package/dist/router.js +146 -0
- package/dist/skeleton.d.ts +3 -0
- package/dist/skeleton.js +4 -0
- package/dist/styles/kumo-binding.css +36 -0
- package/dist/styles/kumo-standalone.css +1 -1
- package/dist/styles/theme-fldr.css +18 -18
- package/dist/table.d.ts +245 -0
- package/dist/table.js +3 -0
- package/dist/theming.d.ts +4 -4
- package/dist/theming.js +2 -2
- package/package.json +46 -1
- package/dist/chunks/highlighter-mouttug0tu8xg1i8.js +0 -1364
- package/dist/index-DL1-uSuH.d.ts +0 -1
- /package/dist/{index-BkTAB4wj.d.ts → sidebar-BkTAB4wj.d.ts} +0 -0
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import { ComponentPropsWithoutRef, ReactElement, ReactNode } from "react";
|
|
2
|
+
import { DisplayHotkey, HotkeyCallback, HotkeyCallbackContextFor, HotkeyPlatform, RegisterableHotkey, UseHotkeyCommonOptions, UseHotkeyOptionsFor } from "@tanstack/react-hotkeys";
|
|
3
|
+
export * from "@tanstack/react-hotkeys";
|
|
4
|
+
//#region src/hotkeys/kbd.d.ts
|
|
5
|
+
interface KbdProps extends Omit<ComponentPropsWithoutRef<"kbd">, "children"> {
|
|
6
|
+
/** A key, chord (`"Mod+K"`) or sequence (`["G", "H"]`). */
|
|
7
|
+
keys: DisplayHotkey;
|
|
8
|
+
/** Force a platform instead of the provider's or the detected one. */
|
|
9
|
+
platform?: HotkeyPlatform;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Renders a key, chord or sequence as small flat keycaps. `Mod` reads ⌘ on
|
|
13
|
+
* Mac and Ctrl elsewhere, following `HotkeysProvider`'s `platform`.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```tsx
|
|
17
|
+
* <Button>Upload <Kbd keys="Mod+U" /></Button>
|
|
18
|
+
* <Kbd keys={["G", "H"]} />
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
export declare function Kbd({ keys, platform, className, ...props }: KbdProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
//#endregion
|
|
23
|
+
//#region src/hotkeys/shortcut.d.ts
|
|
24
|
+
/**
|
|
25
|
+
* Registers a hotkey while mounted and returns a `Kbd` showing it.
|
|
26
|
+
* Give it `meta: { name, group }` to list it in `ShortcutsDialog`.
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```tsx
|
|
30
|
+
* const kbd = useShortcut("Mod+U", upload, { meta: { name: "Upload" } });
|
|
31
|
+
* return <Button onClick={upload}>Upload {kbd}</Button>;
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
export declare function useShortcut<const T extends RegisterableHotkey>(hotkey: T, callback: HotkeyCallback<HotkeyCallbackContextFor<T>>, options?: UseHotkeyOptionsFor<T>): ReactElement;
|
|
35
|
+
type ShortcutHintProps<T extends RegisterableHotkey> = Omit<KbdProps, "keys"> & {
|
|
36
|
+
/** The hotkey to register and display. */
|
|
37
|
+
keys: T;
|
|
38
|
+
/** Runs when the hotkey is pressed. */
|
|
39
|
+
onTrigger: HotkeyCallback<HotkeyCallbackContextFor<T>>;
|
|
40
|
+
/** TanStack hotkey options such as `enabled`, `meta` or `ignoreInputs`. */
|
|
41
|
+
options?: UseHotkeyOptionsFor<T>;
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* Component form of `useShortcut`: registers `keys` and renders its `Kbd`.
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* ```tsx
|
|
48
|
+
* <Button onClick={upload}>
|
|
49
|
+
* Upload <ShortcutHint keys="Mod+U" onTrigger={upload} />
|
|
50
|
+
* </Button>
|
|
51
|
+
* ```
|
|
52
|
+
*/
|
|
53
|
+
export declare function ShortcutHint<const T extends RegisterableHotkey>({ keys, onTrigger, options, ...props }: ShortcutHintProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
54
|
+
type MenuShortcutProps = KbdProps;
|
|
55
|
+
/**
|
|
56
|
+
* A `Kbd` in `DropdownMenu.Shortcut`'s trailing slot. Display only: menu
|
|
57
|
+
* items unmount when the menu closes, so register the hotkey higher up with
|
|
58
|
+
* `useHotkey` or `useShortcut`.
|
|
59
|
+
*
|
|
60
|
+
* @example
|
|
61
|
+
* ```tsx
|
|
62
|
+
* <DropdownMenu.Item onClick={upload}>
|
|
63
|
+
* Upload <MenuShortcut keys="Mod+U" />
|
|
64
|
+
* </DropdownMenu.Item>
|
|
65
|
+
* ```
|
|
66
|
+
*/
|
|
67
|
+
export declare function MenuShortcut(props: MenuShortcutProps): import("react/jsx-runtime").JSX.Element;
|
|
68
|
+
//#endregion
|
|
69
|
+
//#region src/hotkeys/command-palette-trigger.d.ts
|
|
70
|
+
/**
|
|
71
|
+
* Toggles a command palette with `keys` (⌘K / Ctrl+K by default), including
|
|
72
|
+
* while its search input has focus. Returns the `Kbd` hint.
|
|
73
|
+
*
|
|
74
|
+
* @example
|
|
75
|
+
* ```tsx
|
|
76
|
+
* const [open, setOpen] = useState(false);
|
|
77
|
+
* useCommandPaletteHotkey(open, setOpen);
|
|
78
|
+
* return <CommandPalette.Root open={open} onOpenChange={setOpen} ... />;
|
|
79
|
+
* ```
|
|
80
|
+
*/
|
|
81
|
+
export declare function useCommandPaletteHotkey(open: boolean, setOpen: (open: boolean) => void, keys?: RegisterableHotkey, options?: UseHotkeyCommonOptions): ReactElement;
|
|
82
|
+
interface CommandPaletteTriggerProps {
|
|
83
|
+
/** Whether the palette is open. */
|
|
84
|
+
open: boolean;
|
|
85
|
+
/** Called with the next open state on click or hotkey. */
|
|
86
|
+
onOpenChange: (open: boolean) => void;
|
|
87
|
+
/** @default "Mod+K" */
|
|
88
|
+
keys?: RegisterableHotkey;
|
|
89
|
+
/** Options for the hotkey, e.g. `meta: { name: "Recherche" }`. */
|
|
90
|
+
options?: UseHotkeyCommonOptions;
|
|
91
|
+
/** Button label. @default "Search" */
|
|
92
|
+
children?: ReactNode;
|
|
93
|
+
className?: string;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* A search button that opens the command palette on click or ⌘K, with the
|
|
97
|
+
* hint shown inline.
|
|
98
|
+
*
|
|
99
|
+
* @example
|
|
100
|
+
* ```tsx
|
|
101
|
+
* <CommandPaletteTrigger open={open} onOpenChange={setOpen} />
|
|
102
|
+
* <CommandPalette.Root open={open} onOpenChange={setOpen} ... />
|
|
103
|
+
* ```
|
|
104
|
+
*/
|
|
105
|
+
export declare function CommandPaletteTrigger({ open, onOpenChange, keys, options, children, className }: CommandPaletteTriggerProps): import("react/jsx-runtime").JSX.Element;
|
|
106
|
+
//#endregion
|
|
107
|
+
//#region src/hotkeys/shortcuts-dialog.d.ts
|
|
108
|
+
interface ShortcutsDialogProps {
|
|
109
|
+
/** Controlled open state. Uncontrolled when omitted. */
|
|
110
|
+
open?: boolean;
|
|
111
|
+
onOpenChange?: (open: boolean) => void;
|
|
112
|
+
/** Hotkey that opens the dialog; `null` to disable. @default "?" */
|
|
113
|
+
keys?: RegisterableHotkey | null;
|
|
114
|
+
/** @default "Keyboard shortcuts" */
|
|
115
|
+
title?: string;
|
|
116
|
+
/** Name of the opening hotkey in the list. @default "Show keyboard shortcuts" */
|
|
117
|
+
name?: string;
|
|
118
|
+
/** Section for shortcuts without `meta.group`. @default "General" */
|
|
119
|
+
defaultGroup?: string;
|
|
120
|
+
/** Shown when no named shortcuts are registered. @default "No shortcuts" */
|
|
121
|
+
emptyLabel?: string;
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Lists every mounted hotkey that has `meta.name`, grouped by `meta.group`.
|
|
125
|
+
* Opens with `?` by default.
|
|
126
|
+
*
|
|
127
|
+
* @example
|
|
128
|
+
* ```tsx
|
|
129
|
+
* useHotkey("Mod+S", save, { meta: { name: "Save", group: "File" } });
|
|
130
|
+
* <ShortcutsDialog />
|
|
131
|
+
* ```
|
|
132
|
+
*/
|
|
133
|
+
export declare function ShortcutsDialog({ open: openProp, onOpenChange, keys, title, name, defaultGroup, emptyLabel }: ShortcutsDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
134
|
+
//#endregion
|
|
135
|
+
export type { CommandPaletteTriggerProps, KbdProps, MenuShortcutProps, ShortcutHintProps, ShortcutsDialogProps };
|
package/dist/hotkeys.js
ADDED
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { t as cn } from "./chunks/vendor-styling-gs32v7xt5znc8kg0.js";
|
|
3
|
+
import { t as Button } from "./chunks/button-hzvowfkbathmx8yg.js";
|
|
4
|
+
import { t as DropdownMenu } from "./chunks/dropdown-oec4g1w9kbsjsg15.js";
|
|
5
|
+
import { t as LayerDialog } from "./chunks/layer-dialog-ioa3r4ayemppsspx.js";
|
|
6
|
+
import { useState } from "react";
|
|
7
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
import { MagnifyingGlassIcon } from "@phosphor-icons/react";
|
|
9
|
+
import { useFormatForDisplay, useHotkey, useHotkeyRegistrations } from "@tanstack/react-hotkeys";
|
|
10
|
+
export * from "@tanstack/react-hotkeys";
|
|
11
|
+
//#region src/hotkeys/kbd.tsx
|
|
12
|
+
/**
|
|
13
|
+
* Renders a key, chord or sequence as small flat keycaps. `Mod` reads ⌘ on
|
|
14
|
+
* Mac and Ctrl elsewhere, following `HotkeysProvider`'s `platform`.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```tsx
|
|
18
|
+
* <Button>Upload <Kbd keys="Mod+U" /></Button>
|
|
19
|
+
* <Kbd keys={["G", "H"]} />
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
function Kbd({ keys, platform, className, ...props }) {
|
|
23
|
+
const format = useFormatForDisplay();
|
|
24
|
+
const label = format(keys, { platform });
|
|
25
|
+
const steps = isSequence(keys) ? format(keys, {
|
|
26
|
+
platform,
|
|
27
|
+
parts: true
|
|
28
|
+
}) : [format(keys, {
|
|
29
|
+
platform,
|
|
30
|
+
parts: true
|
|
31
|
+
})];
|
|
32
|
+
return /* @__PURE__ */ jsx("kbd", {
|
|
33
|
+
"aria-label": label,
|
|
34
|
+
className: cn("inline-flex shrink-0 items-center gap-1 align-middle font-sans", className),
|
|
35
|
+
...props,
|
|
36
|
+
children: steps.map((step, i) => /* @__PURE__ */ jsx("span", {
|
|
37
|
+
"aria-hidden": true,
|
|
38
|
+
className: "inline-flex items-center gap-0.5",
|
|
39
|
+
children: step.map((key, j) => /* @__PURE__ */ jsx("kbd", {
|
|
40
|
+
className: "inline-flex h-4.5 min-w-4.5 items-center justify-center rounded bg-kumo-recessed px-1 font-mono text-[11px] leading-none text-kumo-subtle",
|
|
41
|
+
children: key
|
|
42
|
+
}, j))
|
|
43
|
+
}, i))
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
function isSequence(keys) {
|
|
47
|
+
return Array.isArray(keys);
|
|
48
|
+
}
|
|
49
|
+
//#endregion
|
|
50
|
+
//#region src/hotkeys/shortcut.tsx
|
|
51
|
+
/**
|
|
52
|
+
* Registers a hotkey while mounted and returns a `Kbd` showing it.
|
|
53
|
+
* Give it `meta: { name, group }` to list it in `ShortcutsDialog`.
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* ```tsx
|
|
57
|
+
* const kbd = useShortcut("Mod+U", upload, { meta: { name: "Upload" } });
|
|
58
|
+
* return <Button onClick={upload}>Upload {kbd}</Button>;
|
|
59
|
+
* ```
|
|
60
|
+
*/
|
|
61
|
+
function useShortcut(hotkey, callback, options) {
|
|
62
|
+
useHotkey(hotkey, callback, options);
|
|
63
|
+
return /* @__PURE__ */ jsx(Kbd, { keys: hotkey });
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Component form of `useShortcut`: registers `keys` and renders its `Kbd`.
|
|
67
|
+
*
|
|
68
|
+
* @example
|
|
69
|
+
* ```tsx
|
|
70
|
+
* <Button onClick={upload}>
|
|
71
|
+
* Upload <ShortcutHint keys="Mod+U" onTrigger={upload} />
|
|
72
|
+
* </Button>
|
|
73
|
+
* ```
|
|
74
|
+
*/
|
|
75
|
+
function ShortcutHint({ keys, onTrigger, options, ...props }) {
|
|
76
|
+
useHotkey(keys, onTrigger, options);
|
|
77
|
+
return /* @__PURE__ */ jsx(Kbd, {
|
|
78
|
+
keys,
|
|
79
|
+
...props
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* A `Kbd` in `DropdownMenu.Shortcut`'s trailing slot. Display only: menu
|
|
84
|
+
* items unmount when the menu closes, so register the hotkey higher up with
|
|
85
|
+
* `useHotkey` or `useShortcut`.
|
|
86
|
+
*
|
|
87
|
+
* @example
|
|
88
|
+
* ```tsx
|
|
89
|
+
* <DropdownMenu.Item onClick={upload}>
|
|
90
|
+
* Upload <MenuShortcut keys="Mod+U" />
|
|
91
|
+
* </DropdownMenu.Item>
|
|
92
|
+
* ```
|
|
93
|
+
*/
|
|
94
|
+
function MenuShortcut(props) {
|
|
95
|
+
return /* @__PURE__ */ jsx(DropdownMenu.Shortcut, { children: /* @__PURE__ */ jsx(Kbd, { ...props }) });
|
|
96
|
+
}
|
|
97
|
+
//#endregion
|
|
98
|
+
//#region src/hotkeys/command-palette-trigger.tsx
|
|
99
|
+
/**
|
|
100
|
+
* Toggles a command palette with `keys` (⌘K / Ctrl+K by default), including
|
|
101
|
+
* while its search input has focus. Returns the `Kbd` hint.
|
|
102
|
+
*
|
|
103
|
+
* @example
|
|
104
|
+
* ```tsx
|
|
105
|
+
* const [open, setOpen] = useState(false);
|
|
106
|
+
* useCommandPaletteHotkey(open, setOpen);
|
|
107
|
+
* return <CommandPalette.Root open={open} onOpenChange={setOpen} ... />;
|
|
108
|
+
* ```
|
|
109
|
+
*/
|
|
110
|
+
function useCommandPaletteHotkey(open, setOpen, keys = "Mod+K", options) {
|
|
111
|
+
useHotkey(keys, () => setOpen(!open), {
|
|
112
|
+
ignoreInputs: false,
|
|
113
|
+
meta: { name: "Command palette" },
|
|
114
|
+
...options
|
|
115
|
+
});
|
|
116
|
+
return /* @__PURE__ */ jsx(Kbd, { keys });
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* A search button that opens the command palette on click or ⌘K, with the
|
|
120
|
+
* hint shown inline.
|
|
121
|
+
*
|
|
122
|
+
* @example
|
|
123
|
+
* ```tsx
|
|
124
|
+
* <CommandPaletteTrigger open={open} onOpenChange={setOpen} />
|
|
125
|
+
* <CommandPalette.Root open={open} onOpenChange={setOpen} ... />
|
|
126
|
+
* ```
|
|
127
|
+
*/
|
|
128
|
+
function CommandPaletteTrigger({ open, onOpenChange, keys, options, children = "Search", className }) {
|
|
129
|
+
const kbd = useCommandPaletteHotkey(open, onOpenChange, keys, options);
|
|
130
|
+
return /* @__PURE__ */ jsxs(Button, {
|
|
131
|
+
variant: "secondary",
|
|
132
|
+
icon: MagnifyingGlassIcon,
|
|
133
|
+
"aria-haspopup": "dialog",
|
|
134
|
+
"aria-expanded": open,
|
|
135
|
+
className: cn("gap-2 text-kumo-subtle", className),
|
|
136
|
+
onClick: () => onOpenChange(!open),
|
|
137
|
+
children: [children, kbd]
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
//#endregion
|
|
141
|
+
//#region src/hotkeys/shortcuts-dialog.tsx
|
|
142
|
+
/**
|
|
143
|
+
* Lists every mounted hotkey that has `meta.name`, grouped by `meta.group`.
|
|
144
|
+
* Opens with `?` by default.
|
|
145
|
+
*
|
|
146
|
+
* @example
|
|
147
|
+
* ```tsx
|
|
148
|
+
* useHotkey("Mod+S", save, { meta: { name: "Save", group: "File" } });
|
|
149
|
+
* <ShortcutsDialog />
|
|
150
|
+
* ```
|
|
151
|
+
*/
|
|
152
|
+
function ShortcutsDialog({ open: openProp, onOpenChange, keys = "?", title = "Keyboard shortcuts", name = "Show keyboard shortcuts", defaultGroup = "General", emptyLabel = "No shortcuts" }) {
|
|
153
|
+
const [openState, setOpenState] = useState(false);
|
|
154
|
+
const open = openProp ?? openState;
|
|
155
|
+
const setOpen = (next) => {
|
|
156
|
+
setOpenState(next);
|
|
157
|
+
onOpenChange?.(next);
|
|
158
|
+
};
|
|
159
|
+
useHotkey(keys, () => setOpen(!open), { meta: { name } });
|
|
160
|
+
const groups = groupRegistrations(useHotkeyRegistrations(), defaultGroup);
|
|
161
|
+
return /* @__PURE__ */ jsx(LayerDialog.Root, {
|
|
162
|
+
open,
|
|
163
|
+
onOpenChange: setOpen,
|
|
164
|
+
children: /* @__PURE__ */ jsxs(LayerDialog.Content, { children: [/* @__PURE__ */ jsx(LayerDialog.Title, { children: title }), /* @__PURE__ */ jsx(LayerDialog.Body, { children: groups.size === 0 ? /* @__PURE__ */ jsx("p", {
|
|
165
|
+
className: "text-sm text-kumo-subtle",
|
|
166
|
+
children: emptyLabel
|
|
167
|
+
}) : /* @__PURE__ */ jsx("div", {
|
|
168
|
+
className: "flex flex-col gap-4",
|
|
169
|
+
children: [...groups].map(([group, rows]) => /* @__PURE__ */ jsxs("section", {
|
|
170
|
+
className: "flex flex-col gap-1",
|
|
171
|
+
children: [/* @__PURE__ */ jsx("h3", {
|
|
172
|
+
className: "text-xs font-medium text-kumo-subtle",
|
|
173
|
+
children: group
|
|
174
|
+
}), /* @__PURE__ */ jsx("dl", {
|
|
175
|
+
className: "flex flex-col",
|
|
176
|
+
children: rows.map((row) => /* @__PURE__ */ jsxs("div", {
|
|
177
|
+
className: "flex items-center justify-between gap-4 py-1 text-sm",
|
|
178
|
+
children: [/* @__PURE__ */ jsx("dt", {
|
|
179
|
+
className: "text-kumo-default",
|
|
180
|
+
children: row.options.meta?.name
|
|
181
|
+
}), /* @__PURE__ */ jsx("dd", { children: /* @__PURE__ */ jsx(Kbd, { keys: row.hotkey }) })]
|
|
182
|
+
}, row.id))
|
|
183
|
+
})]
|
|
184
|
+
}, group))
|
|
185
|
+
}) })] })
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
function groupRegistrations(registrations, defaultGroup) {
|
|
189
|
+
const groups = /* @__PURE__ */ new Map();
|
|
190
|
+
const seen = /* @__PURE__ */ new Set();
|
|
191
|
+
for (const reg of registrations) {
|
|
192
|
+
const meta = reg.options.meta;
|
|
193
|
+
if (!meta?.name || reg.status === "disabled") continue;
|
|
194
|
+
const key = `${meta.name}\u0000${String(reg.hotkey)}`;
|
|
195
|
+
if (seen.has(key)) continue;
|
|
196
|
+
seen.add(key);
|
|
197
|
+
const group = meta.group ?? defaultGroup;
|
|
198
|
+
groups.set(group, [...groups.get(group) ?? [], reg]);
|
|
199
|
+
}
|
|
200
|
+
return groups;
|
|
201
|
+
}
|
|
202
|
+
//#endregion
|
|
203
|
+
export { CommandPaletteTrigger, Kbd, MenuShortcut, ShortcutHint, ShortcutsDialog, useCommandPaletteHotkey, useShortcut };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./button-CS82eT0x.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./input-group-Swzit45o.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as ButtonProps } from "./button-
|
|
2
|
-
import "./index-
|
|
1
|
+
import { n as ButtonProps } from "./button-CS82eT0x.js";
|
|
2
|
+
import "./index-9LwQy84o.js";
|
|
3
3
|
import { n as PortalContainer } from "./portal-provider-BAqPpq_a.js";
|
|
4
4
|
import React from "react";
|
|
5
5
|
import { Toast, ToastManagerAddOptions, ToastManagerUpdateOptions, ToastObject } from "@base-ui/react/toast";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as FieldErrorMatch } from "./field-DIjlHM8W.js";
|
|
2
2
|
import "./input-BeWEb-jD.js";
|
|
3
|
-
import "./
|
|
3
|
+
import "./index-B7iG0qDU.js";
|
|
4
4
|
import * as React$1 from "react";
|
|
5
5
|
import { ReactNode } from "react";
|
|
6
6
|
//#region src/components/input/input-area.d.ts
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as CheckboxChangeEventDetails } from "./index-
|
|
1
|
+
import { n as CheckboxChangeEventDetails } from "./index-CAUjUp2G.js";
|
|
2
2
|
//#region src/components/table/table.d.ts
|
|
3
3
|
/** Table layout and row variant definitions mapping names to their Tailwind classes. */
|
|
4
4
|
declare const KUMO_TABLE_VARIANTS: {
|
|
@@ -7,7 +7,7 @@ type CheckboxChangeEventDetails = Parameters<NonNullable<Checkbox.Root.Props["on
|
|
|
7
7
|
declare const KUMO_CHECKBOX_VARIANTS: {
|
|
8
8
|
readonly variant: {
|
|
9
9
|
readonly default: {
|
|
10
|
-
readonly classes: "[&:focus-within>span]:ring-kumo-focus [&:hover>span]:ring-kumo-
|
|
10
|
+
readonly classes: "[&:focus-within>span]:ring-kumo-focus [&:hover>span]:ring-kumo-interact";
|
|
11
11
|
readonly description: "Default checkbox appearance";
|
|
12
12
|
};
|
|
13
13
|
readonly error: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { n as ButtonProps, o as LinkButtonProps, r as KumoButtonVariant } from "./button-CS82eT0x.js";
|
|
2
2
|
import { HTMLAttributes, ReactNode } from "react";
|
|
3
3
|
//#region src/components/banner/banner-action.d.ts
|
|
4
4
|
/**
|
|
@@ -130,7 +130,7 @@ interface BannerProps extends Omit<HTMLAttributes<HTMLDivElement>, "children" |
|
|
|
130
130
|
* (`variant="primary" | "secondary" | "ghost"`).
|
|
131
131
|
*/
|
|
132
132
|
declare const Banner: import("react").ForwardRefExoticComponent<BannerProps & import("react").RefAttributes<HTMLDivElement>> & {
|
|
133
|
-
Action: import("react").ForwardRefExoticComponent<BannerActionProps & import("react").RefAttributes<
|
|
133
|
+
Action: import("react").ForwardRefExoticComponent<BannerActionProps & import("react").RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
|
|
134
134
|
};
|
|
135
135
|
//#endregion
|
|
136
136
|
export { BannerVariant as n, Banner as t };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { n as ButtonProps, o as LinkButtonProps } from "./button-CS82eT0x.js";
|
|
2
2
|
import { n as InputProps } from "./input-BeWEb-jD.js";
|
|
3
|
-
import { t as InputGroup } from "./input-group-
|
|
3
|
+
import { t as InputGroup } from "./input-group-Swzit45o.js";
|
|
4
4
|
import React from "react";
|
|
5
5
|
import { Toolbar } from "@base-ui/react/toolbar";
|
|
6
6
|
//#region src/components/toolbar/toolbar.d.ts
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./sidebar-BkTAB4wj.js";
|
package/dist/index.d.ts
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
import { A as SidebarProviderProps, C as SidebarMenuItem, D as SidebarMenuSubButtonProps, E as SidebarMenuSubButton, F as SidebarScrollAlign, G as SidebarVariant, I as SidebarScrollToItemOptions, K as useSidebar, L as SidebarSeparator, M as SidebarResizeHandle, N as SidebarRoot, O as SidebarMenuSubItem, P as SidebarRootProps, R as SidebarSide, S as SidebarMenuChevron, T as SidebarMenuSub, U as SidebarState, V as SidebarSlidingViews, W as SidebarTrigger, _ as SidebarMenu, a as SidebarCollapsible, b as SidebarMenuButtonProps, c as SidebarCollapsibleTrigger, d as SidebarContextValue, f as SidebarFooter, g as SidebarLoading, h as SidebarHeader, i as Sidebar, j as SidebarRail, k as SidebarProvider, m as SidebarGroupLabel, n as KUMO_SIDEBAR_STYLING, o as SidebarCollapsibleContent, p as SidebarGroup, r as KUMO_SIDEBAR_VARIANTS, t as KUMO_SIDEBAR_DEFAULT_VARIANTS, u as SidebarContent, v as SidebarMenuBadge, w as SidebarMenuItemProps, x as SidebarMenuButtonSize, y as SidebarMenuButton, z as SidebarSlidingView } from "./
|
|
1
|
+
import { A as SidebarProviderProps, C as SidebarMenuItem, D as SidebarMenuSubButtonProps, E as SidebarMenuSubButton, F as SidebarScrollAlign, G as SidebarVariant, I as SidebarScrollToItemOptions, K as useSidebar, L as SidebarSeparator, M as SidebarResizeHandle, N as SidebarRoot, O as SidebarMenuSubItem, P as SidebarRootProps, R as SidebarSide, S as SidebarMenuChevron, T as SidebarMenuSub, U as SidebarState, V as SidebarSlidingViews, W as SidebarTrigger, _ as SidebarMenu, a as SidebarCollapsible, b as SidebarMenuButtonProps, c as SidebarCollapsibleTrigger, d as SidebarContextValue, f as SidebarFooter, g as SidebarLoading, h as SidebarHeader, i as Sidebar, j as SidebarRail, k as SidebarProvider, m as SidebarGroupLabel, n as KUMO_SIDEBAR_STYLING, o as SidebarCollapsibleContent, p as SidebarGroup, r as KUMO_SIDEBAR_VARIANTS, t as KUMO_SIDEBAR_DEFAULT_VARIANTS, u as SidebarContent, v as SidebarMenuBadge, w as SidebarMenuItemProps, x as SidebarMenuButtonSize, y as SidebarMenuButton, z as SidebarSlidingView } from "./sidebar-BkTAB4wj.js";
|
|
2
|
+
import "./index-DTj6M6kA.js";
|
|
2
3
|
import { i as KUMO_DELETE_RESOURCE_VARIANTS, n as DeleteResourceProps, r as KUMO_DELETE_RESOURCE_DEFAULT_VARIANTS, t as DeleteResource } from "./delete-resource-DY-GFy2s.js";
|
|
3
4
|
import { n as TabsItem, r as TabsProps, t as Tabs } from "./index-gYC6cQVO.js";
|
|
4
5
|
import { a as PropSchema, i as ComponentType, n as ComponentSchema, o as SubComponentSchema, r as ComponentStyling, t as ComponentRegistry } from "./types-CBwdSmf-.js";
|
|
5
6
|
import { a as KUMO_FIELD_VARIANTS, i as KUMO_FIELD_DEFAULT_VARIANTS, n as FieldErrorMatch, o as fieldVariants, r as FieldProps, t as Field } from "./field-DIjlHM8W.js";
|
|
6
7
|
import { a as KUMO_AUTOCOMPLETE_VARIANTS, i as KUMO_AUTOCOMPLETE_DEFAULT_VARIANTS, n as Autocomplete, o as KumoAutocompleteSize, r as AutocompleteProps, s as autocompleteVariants } from "./index-T1sSoiWG.js";
|
|
7
8
|
import { n as BadgeVariant, t as Badge } from "./index-Bwhwpw_j.js";
|
|
8
|
-
import { a as
|
|
9
|
-
import { n as BannerVariant, t as Banner } from "./index-
|
|
9
|
+
import { a as LinkButton, c as buttonVariants, n as ButtonProps, o as LinkButtonProps, s as RefreshButton, t as Button } from "./button-CS82eT0x.js";
|
|
10
|
+
import { n as BannerVariant, t as Banner } from "./index-DK28YxxP.js";
|
|
10
11
|
import { n as BreadcrumbsProps, t as Breadcrumb } from "./index-5PpauI_2.js";
|
|
11
12
|
import { a as KUMO_BUTTON_GROUP_VARIANTS, i as KUMO_BUTTON_GROUP_STYLING, n as ButtonGroupProps, r as KUMO_BUTTON_GROUP_DEFAULT_VARIANTS, t as ButtonGroup } from "./index-C7RoG_CH.js";
|
|
12
|
-
import "./index-
|
|
13
|
+
import "./index-9LwQy84o.js";
|
|
13
14
|
import { C as TimeseriesChart, S as KumoChartOption, _ as SankeyTooltipParams, a as BubbleMap, c as ChoroplethMapProps, d as MapProjection, f as MapStyle, g as SankeyNodeData, h as SankeyLinkData, i as GlobeMapProps, l as MapAccessor, m as SankeyChartProps, n as GlobeMap, o as BubbleMapProps, p as SankeyChart, r as GlobeMapMarker, s as ChoroplethMap, t as ChartPalette, u as MapGeoJson, v as ChartLegend, y as Chart } from "./index-g-eFm1Bq.js";
|
|
14
|
-
import { a as CheckboxLegendProps, n as CheckboxChangeEventDetails, o as CheckboxProps, t as Checkbox } from "./index-
|
|
15
|
+
import { a as CheckboxLegendProps, n as CheckboxChangeEventDetails, o as CheckboxProps, t as Checkbox } from "./index-CAUjUp2G.js";
|
|
15
16
|
import { t as ClipboardText } from "./index-DHj_enN9.js";
|
|
16
17
|
import { a as CloudflareLogoSvgVariant, c as KUMO_CLOUDFLARE_LOGO_DEFAULT_VARIANTS, d as PoweredByCloudflareProps, f as generateCloudflareLogoSvg, i as CloudflareLogoSvgColor, l as KUMO_CLOUDFLARE_LOGO_VARIANTS, n as CloudflareLogoColor, o as CloudflareLogoVariant, r as CloudflareLogoProps, s as GenerateCloudflareLogoSvgOptions, t as CloudflareLogo, u as PoweredByCloudflare } from "./index-CYoiniZ4.js";
|
|
17
18
|
import { n as Code, r as CodeBlock } from "./index-Dsbm8Gcm.js";
|
|
@@ -30,16 +31,17 @@ import { a as KUMO_GRID_DEFAULT_VARIANTS, c as KumoGridVariant, i as GridProps,
|
|
|
30
31
|
import { r as Text } from "./text-CRRU2g-u.js";
|
|
31
32
|
import { a as KUMO_INLINE_COPY_TEXT_STYLING, i as KUMO_INLINE_COPY_TEXT_DEFAULT_VARIANTS, n as InlineCopyTextLabels, o as KUMO_INLINE_COPY_TEXT_VARIANTS, r as InlineCopyTextProps, t as InlineCopyText } from "./index-B9-RdY6D.js";
|
|
32
33
|
import { a as inputVariants, n as InputProps, t as Input } from "./input-BeWEb-jD.js";
|
|
33
|
-
import { a as InputGroupSuffixProps, c as InputGroupInputProps, i as InputGroupRootProps, o as InputGroupAddonProps, s as InputGroupButtonProps, t as InputGroup } from "./input-group-
|
|
34
|
+
import { a as InputGroupSuffixProps, c as InputGroupInputProps, i as InputGroupRootProps, o as InputGroupAddonProps, s as InputGroupButtonProps, t as InputGroup } from "./input-group-Swzit45o.js";
|
|
34
35
|
import { n as Tooltip, r as TooltipProvider } from "./tooltip-D_vhi1PN.js";
|
|
35
|
-
import "./
|
|
36
|
-
import { a as Textarea, i as InputAreaProps, r as InputArea } from "./index-
|
|
36
|
+
import "./index-B7iG0qDU.js";
|
|
37
|
+
import { a as Textarea, i as InputAreaProps, r as InputArea } from "./index-B_ug9XY7.js";
|
|
37
38
|
import { a as labelContentVariants, i as LabelProps, n as KUMO_LABEL_VARIANTS, o as labelVariants, r as Label, t as KUMO_LABEL_DEFAULT_VARIANTS } from "./index-CE09bLNb.js";
|
|
38
39
|
import { t as LayerCard } from "./layer-card-BNIn9pqy.js";
|
|
39
40
|
import "./components/layer-card.js";
|
|
40
41
|
import { a as LayerDialogActionProps, c as LayerDialogContentProps, d as LayerDialogProps, f as LayerDialogRootProps, i as LayerDialog, l as LayerDialogDescriptionProps, n as KumoLayerDialogSize, o as LayerDialogActionsProps, p as LayerDialogTitleProps, r as KumoLayerDialogVerticalAlign, s as LayerDialogBodyProps, t as KumoLayerDialogPrimaryVariant, u as LayerDialogPrimaryProps } from "./index-CNoz2NNg.js";
|
|
41
42
|
import { n as LinkProvider, r as useLinkComponent, t as LinkComponentProps } from "./link-provider-tz-NJp9x.js";
|
|
42
|
-
import {
|
|
43
|
+
import { a as Link, i as KumoLinkVariantsProps, n as KUMO_LINK_VARIANTS, o as LinkProps, r as KumoLinkVariant, s as linkVariants, t as KUMO_LINK_DEFAULT_VARIANTS } from "./link-CoVXE5W2.js";
|
|
44
|
+
import "./components/link.js";
|
|
43
45
|
import { n as Loader, t as SkeletonLine } from "./index-Dx7hOWUc.js";
|
|
44
46
|
import { n as MenuBar, t as useMenuNavigation } from "./index-B7epkoHc.js";
|
|
45
47
|
import { t as Meter } from "./index-yK3Hayg_.js";
|
|
@@ -52,11 +54,11 @@ import { a as Slider, i as KumoSliderVariantsProps, n as KUMO_SLIDER_VARIANTS, o
|
|
|
52
54
|
import { t as Surface } from "./index-CzIWigmH.js";
|
|
53
55
|
import { a as Switch, c as SwitchLegendProps } from "./index-AMEc1MEg.js";
|
|
54
56
|
import { a as KUMO_TABLE_OF_CONTENTS_VARIANTS, c as TableOfContentsGroupProps, d as TableOfContentsProps, f as TableOfContentsTitleProps, i as KUMO_TABLE_OF_CONTENTS_DEFAULT_VARIANTS, l as TableOfContentsItemProps, n as UseTableOfContentsActiveIdResult, o as KumoTableOfContentsState, r as useTableOfContentsActiveId, s as TableOfContents, t as UseTableOfContentsActiveIdOptions, u as TableOfContentsListProps } from "./index-DIV3riUd.js";
|
|
55
|
-
import { a as Table } from "./index-
|
|
57
|
+
import { a as Table } from "./index-Bh9kuAvN.js";
|
|
56
58
|
import { n as TagInputLabels, r as TagInputProps, t as TagInput } from "./index-2jvVmJ8P.js";
|
|
57
59
|
import "./components/text.js";
|
|
58
|
-
import { a as Toasty, i as ToastProvider, o as createKumoToastManager, s as useKumoToastManager, t as Toast } from "./index-
|
|
59
|
-
import { a as ToolbarInputGroupProps, c as ToolbarProps, i as ToolbarButtonProps, l as ToolbarSize, n as KUMO_TOOLBAR_VARIANTS, o as ToolbarInputProps, r as Toolbar, s as ToolbarLinkProps, t as KUMO_TOOLBAR_DEFAULT_VARIANTS } from "./index-
|
|
60
|
+
import { a as Toasty, i as ToastProvider, o as createKumoToastManager, s as useKumoToastManager, t as Toast } from "./index-BMXHK-3k.js";
|
|
61
|
+
import { a as ToolbarInputGroupProps, c as ToolbarProps, i as ToolbarButtonProps, l as ToolbarSize, n as KUMO_TOOLBAR_VARIANTS, o as ToolbarInputProps, r as Toolbar, s as ToolbarLinkProps, t as KUMO_TOOLBAR_DEFAULT_VARIANTS } from "./index-DOVlARA6.js";
|
|
60
62
|
import "./components/tooltip.js";
|
|
61
63
|
import { a as cn, i as KumoTranslationsPartial, n as KumoLocaleProviderProps, o as safeRandomId, r as KumoTranslations, t as KumoLocaleProvider } from "./locale-provider-CHMCQ0-J.js";
|
|
62
64
|
export { Autocomplete, type AutocompleteProps, Badge, type BadgeVariant, Banner, BannerVariant, Breadcrumb as Breadcrumbs, type BreadcrumbsProps, BubbleMap, type BubbleMapProps, Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, Chart, ChartLegend, ChartPalette, Checkbox, type CheckboxChangeEventDetails, type CheckboxLegendProps, type CheckboxProps, ChoroplethMap, type ChoroplethMapProps, ClipboardText, CloudflareLogo, type CloudflareLogoColor, type CloudflareLogoProps, type CloudflareLogoSvgColor, type CloudflareLogoSvgVariant, type CloudflareLogoVariant, Code, CodeBlock, Collapsible, type CollapsibleDefaultPanelProps, type CollapsibleDefaultTriggerProps, type CollapsiblePanelProps, type CollapsibleProps, type CollapsibleRootProps, type CollapsibleTriggerProps, Combobox, CommandPalette, type CommandPaletteEmptyProps, type CommandPaletteFooterProps, type CommandPaletteGroupLabelProps, type CommandPaletteGroupProps, type CommandPaletteInputProps, type CommandPaletteItemProps, type CommandPaletteListProps, type CommandPaletteLoadingProps, type CommandPaletteResultItemProps, type CommandPaletteRootProps, type ComponentRegistry, type ComponentSchema, type ComponentStyling, type ComponentType, DatePicker, type DatePickerProps, type DateRange, DateRangePicker, type DayPickerProps, DeleteResource, type DeleteResourceProps, Dialog, DialogClose, type DialogCloseProps, DialogDescription, type DialogDescriptionProps, type DialogProps, DialogRoot, type DialogRootProps, DialogTitle, type DialogTitleProps, DialogTrigger, type DialogTriggerProps, DropdownMenu, Empty, type EmptyProps, Field, type FieldErrorMatch, type FieldProps, Flow, type GenerateCloudflareLogoSvgOptions, GlobeMap, type GlobeMapMarker, type GlobeMapProps, Grid, GridItem, type GridItemProps, type GridProps, type HighlightRange, InlineCopyText, type InlineCopyTextLabels, type InlineCopyTextProps, Input, InputArea, type InputAreaProps, InputGroup, type InputGroupAddonProps, type InputGroupButtonProps, type InputGroupInputProps, type InputGroupRootProps, type InputGroupSuffixProps, type InputProps, KUMO_AUTOCOMPLETE_DEFAULT_VARIANTS, KUMO_AUTOCOMPLETE_VARIANTS, KUMO_BUTTON_GROUP_DEFAULT_VARIANTS, KUMO_BUTTON_GROUP_STYLING, KUMO_BUTTON_GROUP_VARIANTS, KUMO_CLOUDFLARE_LOGO_DEFAULT_VARIANTS, KUMO_CLOUDFLARE_LOGO_VARIANTS, KUMO_COMMAND_PALETTE_DEFAULT_VARIANTS, KUMO_COMMAND_PALETTE_VARIANTS, KUMO_DELETE_RESOURCE_DEFAULT_VARIANTS, KUMO_DELETE_RESOURCE_VARIANTS, KUMO_FIELD_DEFAULT_VARIANTS, KUMO_FIELD_VARIANTS, KUMO_GRID_DEFAULT_VARIANTS, KUMO_GRID_VARIANTS, KUMO_INLINE_COPY_TEXT_DEFAULT_VARIANTS, KUMO_INLINE_COPY_TEXT_STYLING, KUMO_INLINE_COPY_TEXT_VARIANTS, KUMO_LABEL_DEFAULT_VARIANTS, KUMO_LABEL_VARIANTS, KUMO_LINK_DEFAULT_VARIANTS, KUMO_LINK_VARIANTS, KUMO_POPOVER_DEFAULT_VARIANTS, KUMO_POPOVER_VARIANTS, KUMO_RADIO_DEFAULT_VARIANTS, KUMO_RADIO_VARIANTS, KUMO_SENSITIVE_INPUT_DEFAULT_VARIANTS, KUMO_SENSITIVE_INPUT_VARIANTS, KUMO_SIDEBAR_DEFAULT_VARIANTS, KUMO_SIDEBAR_STYLING, KUMO_SIDEBAR_VARIANTS, KUMO_SLIDER_DEFAULT_VARIANTS, KUMO_SLIDER_VARIANTS, KUMO_TABLE_OF_CONTENTS_DEFAULT_VARIANTS, KUMO_TABLE_OF_CONTENTS_VARIANTS, KUMO_TOOLBAR_DEFAULT_VARIANTS, KUMO_TOOLBAR_VARIANTS, type KumoAutocompleteSize, type KumoChartOption, type KumoGridGap, type KumoGridVariant, type KumoLayerDialogPrimaryVariant, type KumoLayerDialogSize, type KumoLayerDialogVerticalAlign, type KumoLinkVariant, type KumoLinkVariantsProps, KumoLocaleProvider, type KumoLocaleProviderProps, KumoPortalProvider, type KumoRadioAppearance, type KumoRadioVariant, type KumoRadioVariantsProps, type KumoSliderSize, type KumoSliderVariantsProps, type KumoTableOfContentsState, type KumoTranslations, type KumoTranslationsPartial, Label, type LabelProps, LayerCard, LayerDialog, type LayerDialogActionProps, type LayerDialogActionsProps, type LayerDialogBodyProps, type LayerDialogContentProps, type LayerDialogDescriptionProps, type LayerDialogPrimaryProps, type LayerDialogProps, type LayerDialogRootProps, type LayerDialogTitleProps, Link, LinkButton, type LinkButtonProps, type LinkComponentProps, type LinkProps, LinkProvider, Loader, type MapAccessor, type MapGeoJson, type MapProjection, type MapStyle, MenuBar, Meter, Pagination, Popover, type PopoverCloseProps, type PopoverContentProps, type PopoverDescriptionProps, type PopoverRootProps, type PopoverTitleProps, type PopoverTriggerProps, type PortalContainer, PoweredByCloudflare, type PoweredByCloudflareProps, type PropSchema, Radio, type RadioControlPosition, RadioGroup, type RadioGroupChangeEventDetails, type RadioGroupProps, type RadioItemProps, type RadioLegendProps, type RadioVariant, RefreshButton, SankeyChart, type SankeyChartProps, type SankeyLinkData, type SankeyNodeData, type SankeyTooltipParams, Select, SensitiveInput, type SensitiveInputProps, Sidebar, SidebarCollapsible, type SidebarCollapsible as SidebarCollapsibleType, SidebarCollapsibleContent, SidebarCollapsibleTrigger, SidebarContent, type SidebarContextValue, SidebarFooter, SidebarGroup, SidebarGroupLabel, SidebarHeader, SidebarLoading, SidebarMenu, SidebarMenuBadge, SidebarMenuButton, type SidebarMenuButtonProps, type SidebarMenuButtonSize, SidebarMenuChevron, SidebarMenuItem, type SidebarMenuItemProps, SidebarMenuSub, SidebarMenuSubButton, type SidebarMenuSubButtonProps, SidebarMenuSubItem, SidebarProvider, type SidebarProviderProps, SidebarRail, SidebarResizeHandle, SidebarRoot, type SidebarRootProps, type SidebarScrollAlign, type SidebarScrollToItemOptions, SidebarSeparator, type SidebarSide, SidebarSlidingView, SidebarSlidingViews, type SidebarState, SidebarTrigger, type SidebarVariant, SkeletonLine, Slider, type SliderProps, type SubComponentSchema, Surface, Switch, type SwitchLegendProps, Table, TableOfContents, type TableOfContentsGroupProps, type TableOfContentsItemProps, type TableOfContentsListProps, type TableOfContentsProps, type TableOfContentsTitleProps, Tabs, type TabsItem, type TabsProps, TagInput, type TagInputLabels, type TagInputProps, Text, Textarea, TimeseriesChart, Toast, ToastProvider, Toasty, Toolbar, type ToolbarButtonProps, type ToolbarInputGroupProps, type ToolbarInputProps, type ToolbarLinkProps, type ToolbarProps, type ToolbarSize, Tooltip, TooltipProvider, type UseTableOfContentsActiveIdOptions, type UseTableOfContentsActiveIdResult, autocompleteVariants, buttonVariants, cn, createKumoToastManager, fieldVariants, generateCloudflareLogoSvg, gridItemVariants, gridVariants, inputVariants, labelContentVariants, labelVariants, linkVariants, radioVariants, safeRandomId, sliderVariants, useKumoToastManager, useLinkComponent, useMenuNavigation, useSidebar, useTableOfContentsActiveId };
|
package/dist/index.js
CHANGED
|
@@ -12,7 +12,7 @@ import { n as BannerVariant, t as Banner } from "./chunks/banner-mo1xl9ww734kgsq
|
|
|
12
12
|
import { t as DateRangePicker } from "./chunks/date-range-picker-oivlshld01jbel29.js";
|
|
13
13
|
import { t as KumoLocaleProvider } from "./chunks/locale-provider-j4ii538ntyok36r6.js";
|
|
14
14
|
import { a as labelVariants, i as labelContentVariants, n as KUMO_LABEL_VARIANTS, r as Label, t as KUMO_LABEL_DEFAULT_VARIANTS } from "./chunks/label-f18fnpbv85jddo4q.js";
|
|
15
|
-
import { t as Checkbox } from "./chunks/checkbox-
|
|
15
|
+
import { t as Checkbox } from "./chunks/checkbox-d5epe4dl78bzy4f8.js";
|
|
16
16
|
import { t as index_parts_exports } from "./chunks/index.parts-db9pzsm9rrs9tp0t.js";
|
|
17
17
|
import { i as fieldVariants, n as KUMO_FIELD_DEFAULT_VARIANTS, r as KUMO_FIELD_VARIANTS, t as Field } from "./chunks/field-fowmq5smvp17pnqe.js";
|
|
18
18
|
import { r as inputVariants, t as Input } from "./chunks/input-kfi46426y22ocoo4.js";
|
|
@@ -26,9 +26,8 @@ import { t as Combobox } from "./chunks/combobox-m531jeqdbmqzt2gy.js";
|
|
|
26
26
|
import { n as KUMO_TOOLBAR_VARIANTS, r as Toolbar, t as KUMO_TOOLBAR_DEFAULT_VARIANTS } from "./chunks/toolbar-kh6pc12ii7b6dv1x.js";
|
|
27
27
|
import { t as LayerCard } from "./chunks/layer-card-lsmeuqic9i1isv2b.js";
|
|
28
28
|
import { a as DialogTitle, i as DialogRoot, n as DialogClose, o as DialogTrigger, r as DialogDescription, t as Dialog } from "./chunks/dialog-g7wavhkdv2gplwq9.js";
|
|
29
|
-
import { t as DropdownMenu } from "./chunks/dropdown-
|
|
29
|
+
import { t as DropdownMenu } from "./chunks/dropdown-oec4g1w9kbsjsg15.js";
|
|
30
30
|
import { t as Collapsible } from "./chunks/collapsible-ic6813hc4yv5s5hv.js";
|
|
31
|
-
import "./components/field.js";
|
|
32
31
|
import { n as KUMO_DELETE_RESOURCE_DEFAULT_VARIANTS, r as KUMO_DELETE_RESOURCE_VARIANTS, t as DeleteResource } from "./chunks/delete-resource-cmlptb61ih8s84r3.js";
|
|
33
32
|
import { t as SkeletonLine } from "./chunks/skeleton-line-kmhnp0lx3rxhioxa.js";
|
|
34
33
|
import { n as useMenuNavigation, t as MenuBar } from "./chunks/menubar-gzlyhmmc4i24prn1.js";
|
|
@@ -38,7 +37,7 @@ import { t as Pagination } from "./chunks/pagination-n96r3xdok9nc3pu5.js";
|
|
|
38
37
|
import { t as Surface } from "./chunks/surface-jr8x5hy0gucjk5ig.js";
|
|
39
38
|
import { r as Switch } from "./chunks/switch-nc8thi7ogd51m3gi.js";
|
|
40
39
|
import { t as Tabs } from "./chunks/tabs-cja62qojznpj99et.js";
|
|
41
|
-
import { r as Table } from "./chunks/table-
|
|
40
|
+
import { r as Table } from "./chunks/table-bdye068ekayq3u1n.js";
|
|
42
41
|
import { i as useKumoToastManager, n as Toasty, r as createKumoToastManager, t as ToastProvider } from "./chunks/toast-ljpenshot856xqq4.js";
|
|
43
42
|
import { n as KUMO_POPOVER_VARIANTS, r as Popover, t as KUMO_POPOVER_DEFAULT_VARIANTS } from "./chunks/popover-nqrt3ykqv6sic8pz.js";
|
|
44
43
|
import { n as KUMO_SENSITIVE_INPUT_VARIANTS, r as SensitiveInput, t as KUMO_SENSITIVE_INPUT_DEFAULT_VARIANTS } from "./chunks/sensitive-input-dvwlnntm7rdudwp0.js";
|
|
@@ -53,10 +52,10 @@ import { t as Flow } from "./chunks/flow-fak0fyldoaozd32s.js";
|
|
|
53
52
|
import { a as ChartLegend, c as ChartPalette, i as SankeyChart, n as BubbleMap, o as TimeseriesChart, r as ChoroplethMap, s as Chart, t as GlobeMap } from "./chunks/chart-dgh98nbzo2sux2bs.js";
|
|
54
53
|
import { i as autocompleteVariants, n as KUMO_AUTOCOMPLETE_DEFAULT_VARIANTS, r as KUMO_AUTOCOMPLETE_VARIANTS, t as Autocomplete } from "./chunks/autocomplete-nsvacdbq7uz0m71c.js";
|
|
55
54
|
import { A as useSidebar, C as SidebarRail, D as SidebarSlidingView, E as SidebarSeparator, O as SidebarSlidingViews, S as SidebarProvider, T as SidebarRoot, _ as SidebarMenuChevron, a as SidebarCollapsible, b as SidebarMenuSubButton, c as SidebarContent, d as SidebarGroupLabel, f as SidebarHeader, g as SidebarMenuButton, h as SidebarMenuBadge, i as Sidebar, k as SidebarTrigger, l as SidebarFooter, m as SidebarMenu, n as KUMO_SIDEBAR_STYLING, o as SidebarCollapsibleContent, p as SidebarLoading, r as KUMO_SIDEBAR_VARIANTS, s as SidebarCollapsibleTrigger, t as KUMO_SIDEBAR_DEFAULT_VARIANTS, u as SidebarGroup, v as SidebarMenuItem, w as SidebarResizeHandle, x as SidebarMenuSubItem, y as SidebarMenuSub } from "./chunks/sidebar-mhlgvpawixxoey2k.js";
|
|
56
|
-
import { i as TableOfContents, n as KUMO_TABLE_OF_CONTENTS_DEFAULT_VARIANTS, r as KUMO_TABLE_OF_CONTENTS_VARIANTS, t as useTableOfContentsActiveId } from "./chunks/table-of-contents-
|
|
55
|
+
import { i as TableOfContents, n as KUMO_TABLE_OF_CONTENTS_DEFAULT_VARIANTS, r as KUMO_TABLE_OF_CONTENTS_VARIANTS, t as useTableOfContentsActiveId } from "./chunks/table-of-contents-d3pmkrk223umdz9h.js";
|
|
57
56
|
import { i as KUMO_BUTTON_GROUP_VARIANTS, n as KUMO_BUTTON_GROUP_DEFAULT_VARIANTS, r as KUMO_BUTTON_GROUP_STYLING, t as ButtonGroup } from "./chunks/button-group-biv43ksvaipc3p5n.js";
|
|
58
57
|
import "./components/button-group.js";
|
|
59
58
|
import { t as TagInput } from "./chunks/tag-input-lbx9yzt33d4wu07o.js";
|
|
60
|
-
import { t as LayerDialog } from "./chunks/layer-dialog-
|
|
59
|
+
import { t as LayerDialog } from "./chunks/layer-dialog-ioa3r4ayemppsspx.js";
|
|
61
60
|
import { i as sliderVariants, n as KUMO_SLIDER_VARIANTS, r as Slider, t as KUMO_SLIDER_DEFAULT_VARIANTS } from "./chunks/slider-e395gihi5cjd62ss.js";
|
|
62
61
|
export { Autocomplete, Badge, Banner, BannerVariant, Breadcrumb as Breadcrumbs, BubbleMap, Button, ButtonGroup, Chart, ChartLegend, ChartPalette, Checkbox, ChoroplethMap, ClipboardText, CloudflareLogo, Code, CodeBlock, Collapsible, Combobox, CommandPalette, DatePicker, DateRangePicker, DeleteResource, Dialog, DialogClose, DialogDescription, DialogRoot, DialogTitle, DialogTrigger, DropdownMenu, Empty, Field, Flow, GlobeMap, Grid, GridItem, InlineCopyText, Input, InputArea, InputGroup, KUMO_AUTOCOMPLETE_DEFAULT_VARIANTS, KUMO_AUTOCOMPLETE_VARIANTS, KUMO_BUTTON_GROUP_DEFAULT_VARIANTS, KUMO_BUTTON_GROUP_STYLING, KUMO_BUTTON_GROUP_VARIANTS, KUMO_CLOUDFLARE_LOGO_DEFAULT_VARIANTS, KUMO_CLOUDFLARE_LOGO_VARIANTS, KUMO_COMMAND_PALETTE_DEFAULT_VARIANTS, KUMO_COMMAND_PALETTE_VARIANTS, KUMO_DELETE_RESOURCE_DEFAULT_VARIANTS, KUMO_DELETE_RESOURCE_VARIANTS, KUMO_FIELD_DEFAULT_VARIANTS, KUMO_FIELD_VARIANTS, KUMO_GRID_DEFAULT_VARIANTS, KUMO_GRID_VARIANTS, KUMO_INLINE_COPY_TEXT_DEFAULT_VARIANTS, KUMO_INLINE_COPY_TEXT_STYLING, KUMO_INLINE_COPY_TEXT_VARIANTS, KUMO_LABEL_DEFAULT_VARIANTS, KUMO_LABEL_VARIANTS, KUMO_LINK_DEFAULT_VARIANTS, KUMO_LINK_VARIANTS, KUMO_POPOVER_DEFAULT_VARIANTS, KUMO_POPOVER_VARIANTS, KUMO_RADIO_DEFAULT_VARIANTS, KUMO_RADIO_VARIANTS, KUMO_SENSITIVE_INPUT_DEFAULT_VARIANTS, KUMO_SENSITIVE_INPUT_VARIANTS, KUMO_SIDEBAR_DEFAULT_VARIANTS, KUMO_SIDEBAR_STYLING, KUMO_SIDEBAR_VARIANTS, KUMO_SLIDER_DEFAULT_VARIANTS, KUMO_SLIDER_VARIANTS, KUMO_TABLE_OF_CONTENTS_DEFAULT_VARIANTS, KUMO_TABLE_OF_CONTENTS_VARIANTS, KUMO_TOOLBAR_DEFAULT_VARIANTS, KUMO_TOOLBAR_VARIANTS, KumoLocaleProvider, KumoPortalProvider, Label, LayerCard, LayerDialog, Link, LinkButton, LinkProvider, Loader, MenuBar, Meter, Pagination, Popover, PoweredByCloudflare, Radio, RadioGroup, RefreshButton, SankeyChart, Select, SensitiveInput, Sidebar, SidebarCollapsible, SidebarCollapsibleContent, SidebarCollapsibleTrigger, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupLabel, SidebarHeader, SidebarLoading, SidebarMenu, SidebarMenuBadge, SidebarMenuButton, SidebarMenuChevron, SidebarMenuItem, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarResizeHandle, SidebarRoot, SidebarSeparator, SidebarSlidingView, SidebarSlidingViews, SidebarTrigger, SkeletonLine, Slider, Surface, Switch, Table, TableOfContents, Tabs, TagInput, Text, Textarea, TimeseriesChart, index_parts_exports as Toast, ToastProvider, Toasty, Toolbar, Tooltip, TooltipProvider, autocompleteVariants, buttonVariants, cn, createKumoToastManager, fieldVariants, generateCloudflareLogoSvg, gridItemVariants, gridVariants, inputVariants, labelContentVariants, labelVariants, linkVariants, radioVariants, safeRandomId, sliderVariants, useKumoToastManager, useLinkComponent, useMenuNavigation, useSidebar, useTableOfContentsActiveId };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as FieldProps } from "./field-DIjlHM8W.js";
|
|
2
|
-
import { n as ButtonProps } from "./button-
|
|
2
|
+
import { n as ButtonProps } from "./button-CS82eT0x.js";
|
|
3
3
|
import { n as InputProps, r as KumoInputSize } from "./input-BeWEb-jD.js";
|
|
4
4
|
import { t as KumoTooltipSide } from "./tooltip-D_vhi1PN.js";
|
|
5
5
|
import React, { HTMLAttributes, PropsWithChildren, ReactNode } from "react";
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { t as LinkComponentProps } from "./link-provider-tz-NJp9x.js";
|
|
2
|
+
import { SVGProps } from "react";
|
|
3
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
4
|
+
//#region src/components/link/link.d.ts
|
|
5
|
+
/** Link variant definitions mapping variant names to their Tailwind classes. */
|
|
6
|
+
declare const KUMO_LINK_VARIANTS: {
|
|
7
|
+
readonly variant: {
|
|
8
|
+
readonly inline: {
|
|
9
|
+
readonly classes: "text-kumo-link underline underline-offset-[0.15em] decoration-[0.0625em] link-current transition-colors";
|
|
10
|
+
readonly description: "Inline text link that flows with content";
|
|
11
|
+
};
|
|
12
|
+
readonly current: {
|
|
13
|
+
readonly classes: "text-current underline underline-offset-[0.15em] decoration-[0.0625em] link-current transition-colors";
|
|
14
|
+
readonly description: "Link that inherits color from parent text";
|
|
15
|
+
};
|
|
16
|
+
readonly plain: {
|
|
17
|
+
readonly classes: "text-kumo-link hover:text-kumo-link/70 transition-colors";
|
|
18
|
+
readonly description: "Link without underline decoration";
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
declare const KUMO_LINK_DEFAULT_VARIANTS: {
|
|
23
|
+
readonly variant: "inline";
|
|
24
|
+
};
|
|
25
|
+
type KumoLinkVariant = keyof typeof KUMO_LINK_VARIANTS.variant;
|
|
26
|
+
interface KumoLinkVariantsProps {
|
|
27
|
+
/**
|
|
28
|
+
* Visual style of the link.
|
|
29
|
+
* - `"inline"` — Inline text link that flows with content
|
|
30
|
+
* - `"current"` — Link that inherits color from parent text
|
|
31
|
+
* - `"plain"` — Link without underline decoration
|
|
32
|
+
* @default "inline"
|
|
33
|
+
*/
|
|
34
|
+
variant?: KumoLinkVariant;
|
|
35
|
+
}
|
|
36
|
+
declare function linkVariants({ variant }?: KumoLinkVariantsProps): string;
|
|
37
|
+
/**
|
|
38
|
+
* Link component props.
|
|
39
|
+
*
|
|
40
|
+
* Use `href` for the link destination. For framework-specific routing, use the
|
|
41
|
+
* `render` prop or configure a `LinkProvider` at the app root.
|
|
42
|
+
*
|
|
43
|
+
* @example Internal link
|
|
44
|
+
* ```tsx
|
|
45
|
+
* <Link href="/docs">Learn more</Link>
|
|
46
|
+
* ```
|
|
47
|
+
*
|
|
48
|
+
* @example External link
|
|
49
|
+
* ```tsx
|
|
50
|
+
* <Link href="https://cloudflare.com" target="_blank" rel="noopener noreferrer">
|
|
51
|
+
* Visit Cloudflare <Link.ExternalIcon />
|
|
52
|
+
* </Link>
|
|
53
|
+
* ```
|
|
54
|
+
*
|
|
55
|
+
* @example Composition with render prop
|
|
56
|
+
* ```tsx
|
|
57
|
+
* <Link render={<RouterLink to="/dashboard" />}>Dashboard</Link>
|
|
58
|
+
* ```
|
|
59
|
+
*/
|
|
60
|
+
type LinkProps = useRender.ComponentProps<"a"> & LinkComponentProps & KumoLinkVariantsProps;
|
|
61
|
+
declare const Link: import("react").ForwardRefExoticComponent<Omit<LinkProps, "ref"> & import("react").RefAttributes<HTMLAnchorElement>> & {
|
|
62
|
+
ExternalIcon: {
|
|
63
|
+
(props: SVGProps<SVGSVGElement>): import("react/jsx-runtime").JSX.Element;
|
|
64
|
+
displayName: string;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
//#endregion
|
|
68
|
+
export { Link as a, KumoLinkVariantsProps as i, KUMO_LINK_VARIANTS as n, LinkProps as o, KumoLinkVariant as r, linkVariants as s, KUMO_LINK_DEFAULT_VARIANTS as t };
|