@cloudflare/kumo 1.2.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/ai/USAGE.md +193 -0
- package/ai/component-registry.json +1492 -215
- package/ai/component-registry.md +524 -66
- package/ai/schemas.ts +366 -107
- package/dist/.build-complete +1 -1
- package/dist/badge-Dc99vsfo.js.map +1 -1
- package/dist/banner-4fkH6Sbt.js.map +1 -1
- package/dist/breadcrumbs-DyKi7BcP.js.map +1 -1
- package/dist/button-Bh96oxRL.js.map +1 -1
- package/dist/catalog.js +1 -1
- package/dist/checkbox-C1LPq8eL.js.map +1 -1
- package/dist/clipboard-text-CJSI9X2m.js.map +1 -1
- package/dist/cloudflare-logo-Dqd1VD9z.js +166 -0
- package/dist/cloudflare-logo-Dqd1VD9z.js.map +1 -0
- package/dist/code-T2wPDiM0.js.map +1 -1
- package/dist/collapsible-OBNkTO48.js.map +1 -1
- package/dist/combobox-CWxn5aHA.js.map +1 -1
- package/dist/command-line/cli.js +43 -18
- package/dist/command-line/commands/ai.js +23 -0
- package/dist/command-line/commands/blocks.js +2 -2
- package/dist/command-line/commands/ls.js +2 -2
- package/dist/{command-palette-BxmGYxBv.js → command-palette-J50WKjS7.js} +14 -8
- package/dist/command-palette-J50WKjS7.js.map +1 -0
- package/dist/components/cloudflare-logo.js +10 -0
- package/dist/components/cloudflare-logo.js.map +1 -0
- package/dist/components/command-palette.js +1 -1
- package/dist/components/dialog.js +1 -1
- package/dist/components/popover.js +1 -1
- package/dist/date-range-picker-CbKEQ9pi.js.map +1 -1
- package/dist/{dialog-BxXPA2vI.js → dialog-x9n9wI13.js} +18 -18
- package/dist/dialog-x9n9wI13.js.map +1 -0
- package/dist/dropdown-BAyk1knz.js.map +1 -1
- package/dist/empty-D03cbzRS.js.map +1 -1
- package/dist/field-B7ORz5ej.js.map +1 -1
- package/dist/grid-DKajRHh8.js.map +1 -1
- package/dist/index.js +274 -122
- package/dist/index.js.map +1 -1
- package/dist/input-D6YgDfDG.js.map +1 -1
- package/dist/label-B4FY8MX_.js.map +1 -1
- package/dist/layer-card-C8j5Hkkj.js.map +1 -1
- package/dist/link-CcuZKqob.js.map +1 -1
- package/dist/loader-DHGMYlC6.js.map +1 -1
- package/dist/menubar-CzimiryS.js.map +1 -1
- package/dist/meter-BrJnHJ3Q.js.map +1 -1
- package/dist/pagination-D0x9KQSk.js.map +1 -1
- package/dist/{popover-BfGLC2s6.js → popover-CtKDH8Yc.js} +8 -8
- package/dist/popover-CtKDH8Yc.js.map +1 -0
- package/dist/radio-CYejLANA.js.map +1 -1
- package/dist/schemas-DCw6TIy0.js +3859 -0
- package/dist/{schemas-C2YJKpDC.js.map → schemas-DCw6TIy0.js.map} +1 -1
- package/dist/select-D4rKQAax.js.map +1 -1
- package/dist/sensitive-input-DYvAmxkN.js.map +1 -1
- package/dist/src/blocks/delete-resource/delete-resource.d.ts +46 -0
- package/dist/src/blocks/delete-resource/delete-resource.d.ts.map +1 -0
- package/dist/src/blocks/delete-resource/index.d.ts +2 -0
- package/dist/src/blocks/delete-resource/index.d.ts.map +1 -0
- package/dist/src/command-line/commands/ai.d.ts +10 -0
- package/dist/src/command-line/commands/ai.d.ts.map +1 -0
- package/dist/src/components/badge/badge.d.ts +31 -4
- package/dist/src/components/badge/badge.d.ts.map +1 -1
- package/dist/src/components/banner/banner.d.ts +39 -4
- package/dist/src/components/banner/banner.d.ts.map +1 -1
- package/dist/src/components/breadcrumbs/breadcrumbs.d.ts +35 -0
- package/dist/src/components/breadcrumbs/breadcrumbs.d.ts.map +1 -1
- package/dist/src/components/button/button.d.ts +86 -0
- package/dist/src/components/button/button.d.ts.map +1 -1
- package/dist/src/components/checkbox/checkbox.d.ts +7 -0
- package/dist/src/components/checkbox/checkbox.d.ts.map +1 -1
- package/dist/src/components/clipboard-text/clipboard-text.d.ts +28 -3
- package/dist/src/components/clipboard-text/clipboard-text.d.ts.map +1 -1
- package/dist/src/components/cloudflare-logo/cloudflare-logo.d.ts +133 -0
- package/dist/src/components/cloudflare-logo/cloudflare-logo.d.ts.map +1 -0
- package/dist/src/components/cloudflare-logo/index.d.ts +2 -0
- package/dist/src/components/cloudflare-logo/index.d.ts.map +1 -0
- package/dist/src/components/code/code.d.ts +38 -6
- package/dist/src/components/code/code.d.ts.map +1 -1
- package/dist/src/components/collapsible/collapsible.d.ts +10 -0
- package/dist/src/components/collapsible/collapsible.d.ts.map +1 -1
- package/dist/src/components/combobox/combobox.d.ts +61 -0
- package/dist/src/components/combobox/combobox.d.ts.map +1 -1
- package/dist/src/components/command-palette/command-palette.d.ts +41 -6
- package/dist/src/components/command-palette/command-palette.d.ts.map +1 -1
- package/dist/src/components/date-range-picker/date-range-picker.d.ts +57 -4
- package/dist/src/components/date-range-picker/date-range-picker.d.ts.map +1 -1
- package/dist/src/components/dialog/dialog.d.ts +28 -1
- package/dist/src/components/dialog/dialog.d.ts.map +1 -1
- package/dist/src/components/dropdown/dropdown.d.ts +33 -0
- package/dist/src/components/dropdown/dropdown.d.ts.map +1 -1
- package/dist/src/components/empty/empty.d.ts +35 -0
- package/dist/src/components/empty/empty.d.ts.map +1 -1
- package/dist/src/components/field/field.d.ts +34 -4
- package/dist/src/components/field/field.d.ts.map +1 -1
- package/dist/src/components/grid/grid.d.ts +45 -17
- package/dist/src/components/grid/grid.d.ts.map +1 -1
- package/dist/src/components/input/input.d.ts +15 -0
- package/dist/src/components/input/input.d.ts.map +1 -1
- package/dist/src/components/label/label.d.ts +16 -5
- package/dist/src/components/label/label.d.ts.map +1 -1
- package/dist/src/components/layer-card/layer-card.d.ts +13 -0
- package/dist/src/components/layer-card/layer-card.d.ts.map +1 -1
- package/dist/src/components/link/link.d.ts +20 -0
- package/dist/src/components/link/link.d.ts.map +1 -1
- package/dist/src/components/loader/loader.d.ts +34 -0
- package/dist/src/components/loader/loader.d.ts.map +1 -1
- package/dist/src/components/menubar/menubar.d.ts +44 -0
- package/dist/src/components/menubar/menubar.d.ts.map +1 -1
- package/dist/src/components/meter/meter.d.ts +26 -0
- package/dist/src/components/meter/meter.d.ts.map +1 -1
- package/dist/src/components/pagination/pagination.d.ts +25 -0
- package/dist/src/components/pagination/pagination.d.ts.map +1 -1
- package/dist/src/components/popover/popover.d.ts +33 -5
- package/dist/src/components/popover/popover.d.ts.map +1 -1
- package/dist/src/components/radio/radio.d.ts +22 -0
- package/dist/src/components/radio/radio.d.ts.map +1 -1
- package/dist/src/components/select/select.d.ts +42 -20
- package/dist/src/components/select/select.d.ts.map +1 -1
- package/dist/src/components/sensitive-input/sensitive-input.d.ts +30 -6
- package/dist/src/components/sensitive-input/sensitive-input.d.ts.map +1 -1
- package/dist/src/components/surface/surface.d.ts +18 -6
- package/dist/src/components/surface/surface.d.ts.map +1 -1
- package/dist/src/components/switch/switch.d.ts +14 -0
- package/dist/src/components/switch/switch.d.ts.map +1 -1
- package/dist/src/components/table/table.d.ts +33 -0
- package/dist/src/components/table/table.d.ts.map +1 -1
- package/dist/src/components/tabs/tabs.d.ts +48 -9
- package/dist/src/components/tabs/tabs.d.ts.map +1 -1
- package/dist/src/components/text/text.d.ts +35 -7
- package/dist/src/components/text/text.d.ts.map +1 -1
- package/dist/src/components/toast/toast.d.ts +34 -0
- package/dist/src/components/toast/toast.d.ts.map +1 -1
- package/dist/src/components/tooltip/tooltip.d.ts +41 -0
- package/dist/src/components/tooltip/tooltip.d.ts.map +1 -1
- package/dist/src/index.d.ts +31 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/styles/kumo-standalone.css +1 -1
- package/dist/surface-BIC6CXiz.js.map +1 -1
- package/dist/switch-z7FE1nQE.js.map +1 -1
- package/dist/table-Sd2Etb1N.js.map +1 -1
- package/dist/tabs-DAEeuQLd.js.map +1 -1
- package/dist/text-BEhqwMfe.js.map +1 -1
- package/dist/toast-B8ebpHaU.js.map +1 -1
- package/dist/tooltip-C4DRhJi1.js.map +1 -1
- package/package.json +6 -2
- package/dist/command-palette-BxmGYxBv.js.map +0 -1
- package/dist/dialog-BxXPA2vI.js.map +0 -1
- package/dist/popover-BfGLC2s6.js.map +0 -1
- package/dist/schemas-C2YJKpDC.js +0 -3543
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { CSSProperties, FC, ReactNode } from 'react';
|
|
2
2
|
import { Dialog as DialogBase } from '@base-ui/react/dialog';
|
|
3
|
+
/** Dialog size variant definitions mapping sizes to their minimum widths. */
|
|
3
4
|
export declare const KUMO_DIALOG_VARIANTS: {
|
|
4
5
|
readonly size: {
|
|
5
6
|
readonly base: {
|
|
6
|
-
readonly classes: "min-w-96";
|
|
7
|
+
readonly classes: "sm:min-w-96";
|
|
7
8
|
readonly description: "Default dialog width";
|
|
8
9
|
};
|
|
9
10
|
readonly sm: {
|
|
@@ -96,12 +97,38 @@ export declare const KUMO_DIALOG_STYLING: {
|
|
|
96
97
|
};
|
|
97
98
|
export type KumoDialogSize = keyof typeof KUMO_DIALOG_VARIANTS.size;
|
|
98
99
|
export interface KumoDialogVariantsProps {
|
|
100
|
+
/**
|
|
101
|
+
* Dialog width.
|
|
102
|
+
* - `"sm"` — Small (min 288px) for simple confirmations
|
|
103
|
+
* - `"base"` — Default (min 384px)
|
|
104
|
+
* - `"lg"` — Large (min 512px) for complex content
|
|
105
|
+
* - `"xl"` — Extra large (min 768px) for detailed views
|
|
106
|
+
* @default "base"
|
|
107
|
+
*/
|
|
99
108
|
size?: KumoDialogSize;
|
|
100
109
|
}
|
|
101
110
|
export declare function dialogVariants({ size, }?: KumoDialogVariantsProps): string;
|
|
111
|
+
/**
|
|
112
|
+
* Dialog component props — the modal content panel.
|
|
113
|
+
*
|
|
114
|
+
* @example
|
|
115
|
+
* ```tsx
|
|
116
|
+
* <Dialog.Root>
|
|
117
|
+
* <Dialog.Trigger render={(p) => <Button {...p}>Open</Button>} />
|
|
118
|
+
* <Dialog className="p-8">
|
|
119
|
+
* <Dialog.Title>Confirm Action</Dialog.Title>
|
|
120
|
+
* <Dialog.Description>Are you sure?</Dialog.Description>
|
|
121
|
+
* <Dialog.Close render={(p) => <Button {...p}>Cancel</Button>} />
|
|
122
|
+
* </Dialog>
|
|
123
|
+
* </Dialog.Root>
|
|
124
|
+
* ```
|
|
125
|
+
*/
|
|
102
126
|
export type DialogProps = KumoDialogVariantsProps & {
|
|
127
|
+
/** Additional CSS classes merged via `cn()`. */
|
|
103
128
|
className?: string;
|
|
129
|
+
/** Dialog content (typically Title, Description, Close, and action buttons). */
|
|
104
130
|
children: ReactNode;
|
|
131
|
+
/** Inline styles. */
|
|
105
132
|
style?: CSSProperties;
|
|
106
133
|
};
|
|
107
134
|
type DialogComponent = FC<DialogProps> & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../../../src/components/dialog/dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC1D,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAI7D,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;CAmBvB,CAAC;AAEX,eAAO,MAAM,4BAA4B;;CAE/B,CAAC;AAEX,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyDtB,CAAC;AAGX,MAAM,MAAM,cAAc,GAAG,MAAM,OAAO,oBAAoB,CAAC,IAAI,CAAC;AAEpE,MAAM,WAAW,uBAAuB;IACtC,IAAI,CAAC,EAAE,cAAc,CAAC;CACvB;AAED,wBAAgB,cAAc,CAAC,EAC7B,IAAwC,GACzC,GAAE,uBAA4B,UAO9B;AAED,MAAM,MAAM,WAAW,GAAG,uBAAuB,GAAG;IAClD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,SAAS,CAAC;IACpB,KAAK,CAAC,E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AAO,UAAU,CAAC,KAAK,CAAC;CAChC,CAAC;AAEF,QAAA,MAAM,MAAM,EAMN,eAAe,CAAC;AAEtB,QAAA,MAAM,UAAU,wBAAc,CAAC;AAC/B,QAAA,MAAM,aAAa,oBAAiB,CAAC;AACrC,QAAA,MAAM,WAAW,mJAAe,CAAC;AACjC,QAAA,MAAM,iBAAiB,yJAAqB,CAAC;AAC7C,QAAA,MAAM,WAAW,gJAAe,CAAC;AAEjC,OAAO,EACL,MAAM,EACN,UAAU,EACV,aAAa,EACb,WAAW,EACX,iBAAiB,EACjB,WAAW,GACZ,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Menu as DropdownMenuPrimitive } from '@base-ui/react/menu';
|
|
2
2
|
import { Icon } from '@phosphor-icons/react';
|
|
3
3
|
import * as React from "react";
|
|
4
|
+
/** Dropdown item variant definitions (default and danger styles). */
|
|
4
5
|
export declare const KUMO_DROPDOWN_VARIANTS: {
|
|
5
6
|
readonly variant: {
|
|
6
7
|
readonly default: {
|
|
@@ -18,9 +19,41 @@ export declare const KUMO_DROPDOWN_DEFAULT_VARIANTS: {
|
|
|
18
19
|
};
|
|
19
20
|
export type KumoDropdownVariant = keyof typeof KUMO_DROPDOWN_VARIANTS.variant;
|
|
20
21
|
export interface KumoDropdownVariantsProps {
|
|
22
|
+
/**
|
|
23
|
+
* Visual style of the dropdown item.
|
|
24
|
+
* - `"default"` — Standard item appearance
|
|
25
|
+
* - `"danger"` — Destructive action with red text
|
|
26
|
+
* @default "default"
|
|
27
|
+
*/
|
|
21
28
|
variant?: KumoDropdownVariant;
|
|
22
29
|
}
|
|
23
30
|
export declare function dropdownVariants({ variant, }?: KumoDropdownVariantsProps): string;
|
|
31
|
+
/**
|
|
32
|
+
* DropdownMenu — accessible dropdown menu anchored to a trigger.
|
|
33
|
+
*
|
|
34
|
+
* Compound component: `DropdownMenu` (Root), `.Trigger`, `.Content`, `.Item`,
|
|
35
|
+
* `.CheckboxItem`, `.RadioGroup`, `.RadioItem`, `.RadioItemIndicator`,
|
|
36
|
+
* `.Sub`, `.SubTrigger`, `.SubContent`, `.Label`, `.Separator`, `.Shortcut`, `.Group`.
|
|
37
|
+
*
|
|
38
|
+
* Built on `@base-ui/react/menu`.
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* ```tsx
|
|
42
|
+
* <DropdownMenu>
|
|
43
|
+
* <DropdownMenu.Trigger>
|
|
44
|
+
* <Button>Actions</Button>
|
|
45
|
+
* </DropdownMenu.Trigger>
|
|
46
|
+
* <DropdownMenu.Content>
|
|
47
|
+
* <DropdownMenu.Item>Edit</DropdownMenu.Item>
|
|
48
|
+
* <DropdownMenu.Item icon={CopyIcon}>Duplicate</DropdownMenu.Item>
|
|
49
|
+
* <DropdownMenu.Separator />
|
|
50
|
+
* <DropdownMenu.Item variant="danger">Delete</DropdownMenu.Item>
|
|
51
|
+
* </DropdownMenu.Content>
|
|
52
|
+
* </DropdownMenu>
|
|
53
|
+
* ```
|
|
54
|
+
*
|
|
55
|
+
* @see https://base-ui.com/react/components/menu
|
|
56
|
+
*/
|
|
24
57
|
export declare const DropdownMenu: typeof DropdownMenuPrimitive.Root & {
|
|
25
58
|
Trigger: React.ForwardRefExoticComponent<Omit<import('@base-ui/react/menu').MenuTriggerProps<unknown> & React.RefAttributes<HTMLElement>, "ref"> & React.RefAttributes<HTMLElement>>;
|
|
26
59
|
Portal: React.ForwardRefExoticComponent<import('@base-ui/react/menu').MenuPortalProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dropdown.d.ts","sourceRoot":"","sources":["../../../../src/components/dropdown/dropdown.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,IAAI,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AACpE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EAGL,KAAK,IAAI,EACV,MAAM,uBAAuB,CAAC;AAE/B,eA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AC,eAAe,CAAC;;;;CAuHtC,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/** Empty state size variant definitions mapping sizes to their Tailwind classes. */
|
|
1
2
|
export declare const KUMO_EMPTY_VARIANTS: {
|
|
2
3
|
readonly size: {
|
|
3
4
|
readonly sm: {
|
|
@@ -19,16 +20,50 @@ export declare const KUMO_EMPTY_DEFAULT_VARIANTS: {
|
|
|
19
20
|
};
|
|
20
21
|
export type KumoEmptySize = keyof typeof KUMO_EMPTY_VARIANTS.size;
|
|
21
22
|
export interface KumoEmptyVariantsProps {
|
|
23
|
+
/**
|
|
24
|
+
* Size of the empty state container.
|
|
25
|
+
* - `"sm"` — Compact empty state for smaller containers
|
|
26
|
+
* - `"base"` — Default empty state size
|
|
27
|
+
* - `"lg"` — Large empty state for prominent placement
|
|
28
|
+
* @default "base"
|
|
29
|
+
*/
|
|
22
30
|
size?: KumoEmptySize;
|
|
23
31
|
}
|
|
24
32
|
export declare function emptyVariants({ size, }?: KumoEmptyVariantsProps): string;
|
|
33
|
+
/**
|
|
34
|
+
* Empty state component props.
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```tsx
|
|
38
|
+
* <Empty
|
|
39
|
+
* icon={<PackageIcon size={48} />}
|
|
40
|
+
* title="No packages found"
|
|
41
|
+
* description="Get started by installing your first package."
|
|
42
|
+
* commandLine="npm install @cloudflare/kumo"
|
|
43
|
+
* />
|
|
44
|
+
* ```
|
|
45
|
+
*/
|
|
25
46
|
export interface EmptyProps extends KumoEmptyVariantsProps {
|
|
47
|
+
/** Decorative icon displayed above the title (e.g. from `@phosphor-icons/react`). */
|
|
26
48
|
icon?: React.ReactNode;
|
|
49
|
+
/** Primary heading text for the empty state. */
|
|
27
50
|
title: string;
|
|
51
|
+
/** Secondary description text displayed below the title. */
|
|
28
52
|
description?: string;
|
|
53
|
+
/** Shell command displayed in a copyable code block. */
|
|
29
54
|
commandLine?: string;
|
|
55
|
+
/** Additional content (buttons, links) rendered below the description. */
|
|
30
56
|
contents?: React.ReactNode;
|
|
57
|
+
/** Additional CSS classes merged via `cn()`. */
|
|
31
58
|
className?: string;
|
|
32
59
|
}
|
|
60
|
+
/**
|
|
61
|
+
* Placeholder shown when a list, table, or page has no content to display.
|
|
62
|
+
*
|
|
63
|
+
* @example
|
|
64
|
+
* ```tsx
|
|
65
|
+
* <Empty title="No results found" description="Try adjusting your search." />
|
|
66
|
+
* ```
|
|
67
|
+
*/
|
|
33
68
|
export declare function Empty({ icon, title, description, commandLine, contents, size, className, }: EmptyProps): import("react/jsx-runtime").JSX.Element;
|
|
34
69
|
//# sourceMappingURL=empty.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"empty.d.ts","sourceRoot":"","sources":["../../../../src/components/empty/empty.tsx"],"names":[],"mappings":"AAKA,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;CAetB,CAAC;AAEX,eAAO,MAAM,2BAA2B;;CAE9B,CAAC;AAEX,MAAM,MAAM,aAAa,GAAG,MAAM,OAAO,mBAAmB,CAAC,IAAI,CAAC;AAElE,MAAM,WAAW,sBAAsB;IACrC,IAAI,CAAC,EAAE,aAAa,CAAC;CACtB;AAED,wBAAgB,aAAa,CAAC,EAC5B,IAAuC,GACxC,GAAE,sBAA2B,UAK7B;AAED,MAAM,WAAW,UAAW,SAAQ,sBAAsB;IACxD,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,wBAAgB,KAAK,CAAC,EACpB,IAAI,EACJ,KAAK,EACL,WAAW,EACX,WAAW,EACX,QAAQ,EACR,IAAa,EACb,SAAS,GACV,EAAE,UAAU,2CAsDZ"}
|
|
1
|
+
{"version":3,"file":"empty.d.ts","sourceRoot":"","sources":["../../../../src/components/empty/empty.tsx"],"names":[],"mappings":"AAKA,oFAAoF;AACpF,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;CAetB,CAAC;AAEX,eAAO,MAAM,2BAA2B;;CAE9B,CAAC;AAEX,MAAM,MAAM,aAAa,GAAG,MAAM,OAAO,mBAAmB,CAAC,IAAI,CAAC;AAElE,MAAM,WAAW,sBAAsB;IACrC;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,aAAa,CAAC;CACtB;AAED,wBAAgB,aAAa,CAAC,EAC5B,IAAuC,GACxC,GAAE,sBAA2B,UAK7B;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,UAAW,SAAQ,sBAAsB;IACxD,qFAAqF;IACrF,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,gDAAgD;IAChD,KAAK,EAAE,MAAM,CAAC;IACd,4DAA4D;IAC5D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,wDAAwD;IACxD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,0EAA0E;IAC1E,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,gDAAgD;IAChD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;GAOG;AACH,wBAAgB,KAAK,CAAC,EACpB,IAAI,EACJ,KAAK,EACL,WAAW,EACX,WAAW,EACX,QAAQ,EACR,IAAa,EACb,SAAS,GACV,EAAE,UAAU,2CAsDZ"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
+
/** Field variant definitions (currently empty, reserved for future additions). */
|
|
2
3
|
export declare const KUMO_FIELD_VARIANTS: {};
|
|
3
4
|
export declare const KUMO_FIELD_DEFAULT_VARIANTS: {};
|
|
4
5
|
export interface KumoFieldVariantsProps {
|
|
@@ -16,23 +17,52 @@ export declare function fieldVariants({ controlFirst, }?: KumoFieldVariantsProps
|
|
|
16
17
|
* Source: BaseErrorProps["match"] (ComponentPropsWithoutRef<typeof FieldBase.Error>)
|
|
17
18
|
*/
|
|
18
19
|
export type FieldErrorMatch = boolean | "badInput" | "customError" | "patternMismatch" | "rangeOverflow" | "rangeUnderflow" | "stepMismatch" | "tooLong" | "tooShort" | "typeMismatch" | "valid" | "valueMissing";
|
|
20
|
+
/**
|
|
21
|
+
* Field component props — wraps a form control with label, description, and error message.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```tsx
|
|
25
|
+
* <Field label="Email" required>
|
|
26
|
+
* <Input placeholder="you@example.com" />
|
|
27
|
+
* </Field>
|
|
28
|
+
*
|
|
29
|
+
* <Field label="Phone" required={false} description="We'll only use this for account recovery.">
|
|
30
|
+
* <Input placeholder="+1 555-0000" />
|
|
31
|
+
* </Field>
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
19
34
|
export interface FieldProps extends KumoFieldVariantsProps {
|
|
35
|
+
/** The form control element(s) to wrap (Input, Select, Checkbox, etc.). */
|
|
20
36
|
children: ReactNode;
|
|
21
|
-
/** The label content
|
|
37
|
+
/** The label content — can be a string or any React node. */
|
|
22
38
|
label: ReactNode;
|
|
23
39
|
/**
|
|
24
|
-
* When explicitly false
|
|
25
|
-
* When true or undefined
|
|
40
|
+
* When explicitly `false`, shows gray "(optional)" text after the label.
|
|
41
|
+
* When `true` or `undefined`, no indicator is shown.
|
|
26
42
|
*/
|
|
27
43
|
required?: boolean;
|
|
28
|
-
/** Tooltip content
|
|
44
|
+
/** Tooltip content displayed next to the label via an info icon. */
|
|
29
45
|
labelTooltip?: ReactNode;
|
|
46
|
+
/** Validation error with a message and a browser `ValidityState` match key. */
|
|
30
47
|
error?: {
|
|
31
48
|
message: ReactNode;
|
|
32
49
|
match: FieldErrorMatch;
|
|
33
50
|
};
|
|
51
|
+
/** Helper text displayed below the control (hidden when `error` is present). */
|
|
34
52
|
description?: ReactNode;
|
|
53
|
+
/** When `true`, places the control before the label (for checkbox/switch layouts). */
|
|
35
54
|
controlFirst?: boolean;
|
|
36
55
|
}
|
|
56
|
+
/**
|
|
57
|
+
* Form field wrapper that provides a label, optional description, and error display
|
|
58
|
+
* around any form control. Built on Base UI Field primitives.
|
|
59
|
+
*
|
|
60
|
+
* @example
|
|
61
|
+
* ```tsx
|
|
62
|
+
* <Field label="Username">
|
|
63
|
+
* <Input placeholder="Choose a username" />
|
|
64
|
+
* </Field>
|
|
65
|
+
* ```
|
|
66
|
+
*/
|
|
37
67
|
export declare function Field({ children, label, required, labelTooltip, error, description, controlFirst, }: FieldProps): import("react/jsx-runtime").JSX.Element;
|
|
38
68
|
//# sourceMappingURL=field.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"field.d.ts","sourceRoot":"","sources":["../../../../src/components/field/field.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvC,eAAO,MAAM,mBAAmB,IAEtB,CAAC;AAEX,eAAO,MAAM,2BAA2B,IAAc,CAAC;AAGvD,MAAM,WAAW,sBAAsB;IACrC;;;;OAIG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,wBAAgB,aAAa,CAAC,EAC5B,YAAoB,GACrB,GAAE,sBAA2B,UAkB7B;AAED;;;;GAIG;AACH,MAAM,MAAM,eAAe,GACvB,OAAO,GACP,UAAU,GACV,aAAa,GACb,iBAAiB,GACjB,eAAe,GACf,gBAAgB,GAChB,cAAc,GACd,SAAS,GACT,UAAU,GACV,cAAc,GACd,OAAO,GACP,cAAc,CAAC;AAEnB,MAAM,WAAW,UAAW,SAAQ,sBAAsB;IACxD,QAAQ,EAAE,SAAS,CAAC;IACpB,
|
|
1
|
+
{"version":3,"file":"field.d.ts","sourceRoot":"","sources":["../../../../src/components/field/field.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvC,kFAAkF;AAClF,eAAO,MAAM,mBAAmB,IAEtB,CAAC;AAEX,eAAO,MAAM,2BAA2B,IAAc,CAAC;AAGvD,MAAM,WAAW,sBAAsB;IACrC;;;;OAIG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,wBAAgB,aAAa,CAAC,EAC5B,YAAoB,GACrB,GAAE,sBAA2B,UAkB7B;AAED;;;;GAIG;AACH,MAAM,MAAM,eAAe,GACvB,OAAO,GACP,UAAU,GACV,aAAa,GACb,iBAAiB,GACjB,eAAe,GACf,gBAAgB,GAChB,cAAc,GACd,SAAS,GACT,UAAU,GACV,cAAc,GACd,OAAO,GACP,cAAc,CAAC;AAEnB;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,UAAW,SAAQ,sBAAsB;IACxD,2EAA2E;IAC3E,QAAQ,EAAE,SAAS,CAAC;IACpB,6DAA6D;IAC7D,KAAK,EAAE,SAAS,CAAC;IACjB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,oEAAoE;IACpE,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,+EAA+E;IAC/E,KAAK,CAAC,EAAE;QACN,OAAO,EAAE,SAAS,CAAC;QACnB,KAAK,EAAE,eAAe,CAAC;KACxB,CAAC;IACF,gFAAgF;IAChF,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,sFAAsF;IACtF,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,KAAK,CAAC,EACpB,QAAQ,EACR,KAAK,EACL,QAAQ,EACR,YAAY,EACZ,KAAK,EACL,WAAW,EACX,YAAoB,GACrB,EAAE,UAAU,2CAsCZ"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
+
/** Grid variant and gap definitions mapping layout names to their responsive Tailwind classes. */
|
|
2
3
|
export declare const KUMO_GRID_VARIANTS: {
|
|
3
4
|
readonly variant: {
|
|
4
5
|
readonly "2up": {
|
|
@@ -62,36 +63,52 @@ export declare const KUMO_GRID_DEFAULT_VARIANTS: {
|
|
|
62
63
|
};
|
|
63
64
|
export type KumoGridVariant = keyof typeof KUMO_GRID_VARIANTS.variant;
|
|
64
65
|
export type KumoGridGap = keyof typeof KUMO_GRID_VARIANTS.gap;
|
|
66
|
+
/**
|
|
67
|
+
* Grid component props.
|
|
68
|
+
*
|
|
69
|
+
* @example
|
|
70
|
+
* ```tsx
|
|
71
|
+
* <Grid variant="3up" gap="sm">
|
|
72
|
+
* <GridItem><Surface className="p-4">1</Surface></GridItem>
|
|
73
|
+
* <GridItem><Surface className="p-4">2</Surface></GridItem>
|
|
74
|
+
* <GridItem><Surface className="p-4">3</Surface></GridItem>
|
|
75
|
+
* </Grid>
|
|
76
|
+
* ```
|
|
77
|
+
*/
|
|
65
78
|
export interface GridProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
66
|
-
/**
|
|
67
|
-
* Child node(s) that can be nested inside component
|
|
68
|
-
*/
|
|
79
|
+
/** Grid items to render. */
|
|
69
80
|
children?: React.ReactNode;
|
|
70
|
-
/**
|
|
71
|
-
* CSS class names that can be appended to the component
|
|
72
|
-
*/
|
|
81
|
+
/** Additional CSS classes merged via `cn()`. */
|
|
73
82
|
className?: string;
|
|
74
|
-
/**
|
|
75
|
-
* Show dividers between grid items on mobile (only works with 4up variant)
|
|
76
|
-
*/
|
|
83
|
+
/** Show dividers between grid items on mobile (only works with `"4up"` variant). */
|
|
77
84
|
mobileDivider?: boolean;
|
|
78
85
|
/**
|
|
79
|
-
* Gap size between grid items
|
|
86
|
+
* Gap size between grid items.
|
|
87
|
+
* - `"none"` — No gap
|
|
88
|
+
* - `"sm"` — 12px gap
|
|
89
|
+
* - `"base"` — Responsive gap (8px → 24px → 32px)
|
|
90
|
+
* - `"lg"` — 32px gap
|
|
91
|
+
* @default "base"
|
|
80
92
|
*/
|
|
81
93
|
gap?: KumoGridGap;
|
|
82
94
|
/**
|
|
83
|
-
*
|
|
95
|
+
* Responsive column layout variant.
|
|
96
|
+
* - `"2up"` — 1 col → 2 cols at md
|
|
97
|
+
* - `"side-by-side"` — Always 2 cols
|
|
98
|
+
* - `"2-1"` — 66%/33% split at md
|
|
99
|
+
* - `"1-2"` — 33%/66% split at md
|
|
100
|
+
* - `"3up"` — 1 → 2 → 3 cols
|
|
101
|
+
* - `"4up"` — 1 → 2 → 3 → 4 cols
|
|
102
|
+
* - `"6up"` — 2 → 3 → 4 → 6 cols
|
|
103
|
+
* - `"1-2-4up"` — 1 → 2 → 4 cols
|
|
84
104
|
*/
|
|
85
105
|
variant?: KumoGridVariant;
|
|
86
106
|
}
|
|
107
|
+
/** GridItem component props — a single cell within a Grid. */
|
|
87
108
|
export interface GridItemProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
88
|
-
/**
|
|
89
|
-
* Child node(s) that can be nested inside component
|
|
90
|
-
*/
|
|
109
|
+
/** Content for this grid cell. */
|
|
91
110
|
children?: React.ReactNode;
|
|
92
|
-
/**
|
|
93
|
-
* CSS class names that can be appended to the component
|
|
94
|
-
*/
|
|
111
|
+
/** Additional CSS classes merged via `cn()`. */
|
|
95
112
|
className?: string;
|
|
96
113
|
}
|
|
97
114
|
export declare function gridVariants({ variant, gap, }?: {
|
|
@@ -102,6 +119,17 @@ export declare function gridItemVariants({ variant, mobileDivider, }?: {
|
|
|
102
119
|
variant?: KumoGridVariant;
|
|
103
120
|
mobileDivider?: boolean;
|
|
104
121
|
}): string;
|
|
122
|
+
/**
|
|
123
|
+
* Responsive CSS grid layout container with preset column configurations.
|
|
124
|
+
*
|
|
125
|
+
* @example
|
|
126
|
+
* ```tsx
|
|
127
|
+
* <Grid variant="2up" gap="base">
|
|
128
|
+
* <GridItem>Left</GridItem>
|
|
129
|
+
* <GridItem>Right</GridItem>
|
|
130
|
+
* </Grid>
|
|
131
|
+
* ```
|
|
132
|
+
*/
|
|
105
133
|
export declare const Grid: React.ForwardRefExoticComponent<GridProps & React.RefAttributes<HTMLDivElement>>;
|
|
106
134
|
export declare const GridItem: React.ForwardRefExoticComponent<GridItemProps & React.RefAttributes<HTMLDivElement>>;
|
|
107
135
|
//# sourceMappingURL=grid.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"grid.d.ts","sourceRoot":"","sources":["../../../../src/components/grid/grid.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgErB,CAAC;AAEX,eAAO,MAAM,0BAA0B;;CAE7B,CAAC;AAEX,MAAM,MAAM,eAAe,GAAG,MAAM,OAAO,kBAAkB,CAAC,OAAO,CAAC;AACtE,MAAM,MAAM,WAAW,GAAG,MAAM,OAAO,kBAAkB,CAAC,GAAG,CAAC;AAE9D,MAAM,WAAW,SAAU,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IACrE
|
|
1
|
+
{"version":3,"file":"grid.d.ts","sourceRoot":"","sources":["../../../../src/components/grid/grid.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,kGAAkG;AAClG,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgErB,CAAC;AAEX,eAAO,MAAM,0BAA0B;;CAE7B,CAAC;AAEX,MAAM,MAAM,eAAe,GAAG,MAAM,OAAO,kBAAkB,CAAC,OAAO,CAAC;AACtE,MAAM,MAAM,WAAW,GAAG,MAAM,OAAO,kBAAkB,CAAC,GAAG,CAAC;AAE9D;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,SAAU,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IACrE,4BAA4B;IAC5B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,gDAAgD;IAChD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,oFAAoF;IACpF,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;;;;;;OAOG;IACH,GAAG,CAAC,EAAE,WAAW,CAAC;IAClB;;;;;;;;;;OAUG;IACH,OAAO,CAAC,EAAE,eAAe,CAAC;CAC3B;AAED,8DAA8D;AAC9D,MAAM,WAAW,aAAc,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IACzE,kCAAkC;IAClC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,gDAAgD;IAChD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAYD,wBAAgB,YAAY,CAAC,EAC3B,OAAO,EACP,GAAoC,GACrC,GAAE;IACD,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B,GAAG,CAAC,EAAE,WAAW,CAAC;CACd,UAML;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,OAAO,EACP,aAAa,GACd,GAAE;IACD,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B,aAAa,CAAC,EAAE,OAAO,CAAC;CACpB,UAML;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,IAAI,kFAwBhB,CAAC;AAIF,eAAO,MAAM,QAAQ,sFAcpB,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
2
|
import { Input as BaseInput } from '@base-ui/react/input';
|
|
3
3
|
import { FieldErrorMatch } from '../field/field';
|
|
4
|
+
/** Input size and variant definitions mapping names to their Tailwind classes. */
|
|
4
5
|
export declare const KUMO_INPUT_VARIANTS: {
|
|
5
6
|
readonly size: {
|
|
6
7
|
readonly xs: {
|
|
@@ -88,7 +89,21 @@ export declare const KUMO_INPUT_STYLING: {
|
|
|
88
89
|
export type KumoInputSize = keyof typeof KUMO_INPUT_VARIANTS.size;
|
|
89
90
|
export type KumoInputVariant = keyof typeof KUMO_INPUT_VARIANTS.variant;
|
|
90
91
|
export interface KumoInputVariantsProps {
|
|
92
|
+
/**
|
|
93
|
+
* Input size.
|
|
94
|
+
* - `"xs"` — Extra small for compact UIs
|
|
95
|
+
* - `"sm"` — Small for secondary fields
|
|
96
|
+
* - `"base"` — Default size
|
|
97
|
+
* - `"lg"` — Large for prominent fields
|
|
98
|
+
* @default "base"
|
|
99
|
+
*/
|
|
91
100
|
size?: KumoInputSize;
|
|
101
|
+
/**
|
|
102
|
+
* Visual variant.
|
|
103
|
+
* - `"default"` — Standard input
|
|
104
|
+
* - `"error"` — Error state for validation failures
|
|
105
|
+
* @default "default"
|
|
106
|
+
*/
|
|
92
107
|
variant?: KumoInputVariant;
|
|
93
108
|
parentFocusIndicator?: boolean;
|
|
94
109
|
focusIndicator?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../../src/components/input/input.tsx"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,wBAAwB,EAC7B,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAS,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAE7D,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6BtB,CAAC;AAEX,eAAO,MAAM,2BAA2B;;;CAG9B,CAAC;AAEX,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwBrB,CAAC;AAGX,MAAM,MAAM,aAAa,GAAG,MAAM,OAAO,mBAAmB,CAAC,IAAI,CAAC;AAClE,MAAM,MAAM,gBAAgB,GAAG,MAAM,OAAO,mBAAmB,CAAC,OAAO,CAAC;AAExE,MAAM,WAAW,sBAAsB;IACrC,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,OAAO,CAAC,EAAE,gBAAgB,CAA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Y,CAAC,EAAE,SAAS,CAAC;IACzB,4CAA4C;IAC5C,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,+CAA+C;IAC/C,KAAK,CAAC,EAAE,MAAM,GAAG;QAAE,OAAO,EAAE,SAAS,CAAC;QAAC,KAAK,EAAE,eAAe,CAAA;KAAE,CAAC;CACjE,CAAC"}
|
|
@@ -1,21 +1,32 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
+
/** Label variant definitions (currently empty, reserved for future additions). */
|
|
2
3
|
export declare const KUMO_LABEL_VARIANTS: {};
|
|
3
4
|
export declare const KUMO_LABEL_DEFAULT_VARIANTS: {};
|
|
4
5
|
export interface KumoLabelVariantsProps {
|
|
5
6
|
}
|
|
6
7
|
export declare function labelVariants(_props?: KumoLabelVariantsProps): string;
|
|
7
8
|
export declare function labelContentVariants(): string;
|
|
9
|
+
/**
|
|
10
|
+
* Label component props.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```tsx
|
|
14
|
+
* <Label>Email</Label>
|
|
15
|
+
* <Label showOptional>Middle Name</Label>
|
|
16
|
+
* <Label tooltip="We'll use this to send you updates">Email</Label>
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
8
19
|
export interface LabelProps extends KumoLabelVariantsProps {
|
|
9
|
-
/** The label content
|
|
20
|
+
/** The label content — can be a string or any React node. */
|
|
10
21
|
children: ReactNode;
|
|
11
|
-
/** When true
|
|
22
|
+
/** When `true`, shows gray "(optional)" text after the label. */
|
|
12
23
|
showOptional?: boolean;
|
|
13
|
-
/** Tooltip content
|
|
24
|
+
/** Tooltip content displayed next to the label via an info icon. */
|
|
14
25
|
tooltip?: ReactNode;
|
|
15
|
-
/** Additional CSS classes */
|
|
26
|
+
/** Additional CSS classes merged via `cn()`. */
|
|
16
27
|
className?: string;
|
|
17
28
|
/**
|
|
18
|
-
* When true
|
|
29
|
+
* When `true`, only renders the inline content (indicators, tooltip) without
|
|
19
30
|
* the outer span with font styling. Useful when composed inside another
|
|
20
31
|
* label element that already provides the text styling.
|
|
21
32
|
* @default false
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"label.d.ts","sourceRoot":"","sources":["../../../../src/components/label/label.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvC,eAAO,MAAM,mBAAmB,IAEtB,CAAC;AAEX,eAAO,MAAM,2BAA2B,IAAc,CAAC;AAGvD,MAAM,WAAW,sBAAsB;CAAG;AAE1C,wBAAgB,aAAa,CAAC,MAAM,GAAE,sBAA2B,UAMhE;AAED,wBAAgB,oBAAoB,WAKnC;AAED,MAAM,WAAW,UAAW,SAAQ,sBAAsB;IACxD,
|
|
1
|
+
{"version":3,"file":"label.d.ts","sourceRoot":"","sources":["../../../../src/components/label/label.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvC,kFAAkF;AAClF,eAAO,MAAM,mBAAmB,IAEtB,CAAC;AAEX,eAAO,MAAM,2BAA2B,IAAc,CAAC;AAGvD,MAAM,WAAW,sBAAsB;CAAG;AAE1C,wBAAgB,aAAa,CAAC,MAAM,GAAE,sBAA2B,UAMhE;AAED,wBAAgB,oBAAoB,WAKnC;AAED;;;;;;;;;GASG;AACH,MAAM,WAAW,UAAW,SAAQ,sBAAsB;IACxD,6DAA6D;IAC7D,QAAQ,EAAE,SAAS,CAAC;IACpB,iEAAiE;IACjE,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,oEAAoE;IACpE,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,gDAAgD;IAChD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,KAAK,CAAC,EACpB,QAAQ,EACR,YAAoB,EACpB,OAAO,EACP,SAAS,EACT,SAAiB,GAClB,EAAE,UAAU,2CA+BZ;yBArCe,KAAK"}
|
|
@@ -1,10 +1,23 @@
|
|
|
1
1
|
import { FC, PropsWithChildren } from 'react';
|
|
2
|
+
/** LayerCard variant definitions (currently empty, reserved for future additions). */
|
|
2
3
|
export declare const KUMO_LAYER_CARD_VARIANTS: {};
|
|
3
4
|
export declare const KUMO_LAYER_CARD_DEFAULT_VARIANTS: {};
|
|
4
5
|
export interface KumoLayerCardVariantsProps {
|
|
5
6
|
}
|
|
6
7
|
export declare function layerCardVariants(_props?: KumoLayerCardVariantsProps): string;
|
|
8
|
+
/**
|
|
9
|
+
* LayerCard component props.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```tsx
|
|
13
|
+
* <LayerCard>
|
|
14
|
+
* <LayerCard.Secondary>Next Steps</LayerCard.Secondary>
|
|
15
|
+
* <LayerCard.Primary>Get started with Kumo</LayerCard.Primary>
|
|
16
|
+
* </LayerCard>
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
7
19
|
export type LayerCardProps = PropsWithChildren<KumoLayerCardVariantsProps & {
|
|
20
|
+
/** Additional CSS classes merged via `cn()`. */
|
|
8
21
|
className?: string;
|
|
9
22
|
}>;
|
|
10
23
|
type LayerCardComponent = FC<LayerCardProps> & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layer-card.d.ts","sourceRoot":"","sources":["../../../../src/components/layer-card/layer-card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAGnD,eAAO,MAAM,wBAAwB,IAE3B,CAAC;AAEX,eAAO,MAAM,gCAAgC,IAAc,CAAC;AAG5D,MAAM,WAAW,0BAA0B;CAAG;AAE9C,wBAAgB,iBAAiB,CAAC,MAAM,GAAE,0BAA+B,UAKxE;AAED,MAAM,MAAM,cAAc,GAAG,iBAAiB,CAC5C,0BAA0B,GAAG;
|
|
1
|
+
{"version":3,"file":"layer-card.d.ts","sourceRoot":"","sources":["../../../../src/components/layer-card/layer-card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAGnD,sFAAsF;AACtF,eAAO,MAAM,wBAAwB,IAE3B,CAAC;AAEX,eAAO,MAAM,gCAAgC,IAAc,CAAC;AAG5D,MAAM,WAAW,0BAA0B;CAAG;AAE9C,wBAAgB,iBAAiB,CAAC,MAAM,GAAE,0BAA+B,UAKxE;AAED;;;;;;;;;;GAUG;AACH,MAAM,MAAM,cAAc,GAAG,iBAAiB,CAC5C,0BAA0B,GAAG;IAC3B,gDAAgD;IAChD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CACF,CAAC;AA2CF,KAAK,kBAAkB,GAAG,EAAE,CAAC,cAAc,CAAC,GAAG;IAC7C,OAAO,EAAE,EAAE,CAAC,cAAc,CAAC,CAAC;IAC5B,SAAS,EAAE,EAAE,CAAC,cAAc,CAAC,CAAC;CAC/B,CAAC;AAEF,QAAA,MAAM,SAAS,EAGT,kBAAkB,CAAC;AAEzB,OAAO,EAAE,SAAS,EAAE,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { SVGProps } from 'react';
|
|
2
2
|
import { useRender } from '@base-ui/react/use-render';
|
|
3
3
|
import { LinkComponentProps } from '../../utils/link-provider';
|
|
4
|
+
/** Link variant definitions mapping variant names to their Tailwind classes. */
|
|
4
5
|
export declare const KUMO_LINK_VARIANTS: {
|
|
5
6
|
readonly variant: {
|
|
6
7
|
readonly inline: {
|
|
@@ -22,9 +23,28 @@ export declare const KUMO_LINK_DEFAULT_VARIANTS: {
|
|
|
22
23
|
};
|
|
23
24
|
export type KumoLinkVariant = keyof typeof KUMO_LINK_VARIANTS.variant;
|
|
24
25
|
export interface KumoLinkVariantsProps {
|
|
26
|
+
/**
|
|
27
|
+
* Visual style of the link.
|
|
28
|
+
* - `"inline"` — Inline text link that flows with content
|
|
29
|
+
* - `"current"` — Link that inherits color from parent text
|
|
30
|
+
* - `"plain"` — Link without underline decoration
|
|
31
|
+
* @default "inline"
|
|
32
|
+
*/
|
|
25
33
|
variant?: KumoLinkVariant;
|
|
26
34
|
}
|
|
27
35
|
export declare function linkVariants({ variant, }?: KumoLinkVariantsProps): string;
|
|
36
|
+
/**
|
|
37
|
+
* Link component props.
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* ```tsx
|
|
41
|
+
* <Link href="/docs">Learn more</Link>
|
|
42
|
+
* <Link href="https://cloudflare.com" target="_blank" rel="noopener noreferrer">
|
|
43
|
+
* Visit Cloudflare <Link.ExternalIcon />
|
|
44
|
+
* </Link>
|
|
45
|
+
* <Link render={<RouterLink to="/dashboard" />}>Dashboard</Link>
|
|
46
|
+
* ```
|
|
47
|
+
*/
|
|
28
48
|
export type LinkProps = useRender.ComponentProps<"a"> & LinkComponentProps & KumoLinkVariantsProps;
|
|
29
49
|
export declare const Link: import('react').ForwardRefExoticComponent<Omit<LinkProps, "ref"> & import('react').RefAttributes<HTMLAnchorElement>> & {
|
|
30
50
|
ExternalIcon: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"link.d.ts","sourceRoot":"","sources":["../../../../src/components/link/link.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,QAAQ,EAAE,MAAM,OAAO,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAGtD,OAAO,EAEL,KAAK,kBAAkB,EACxB,MAAM,2BAA2B,CAAC;AAgCnC,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;CAiBrB,CAAC;AAEX,eAAO,MAAM,0BAA0B;;CAE7B,CAAC;AAEX,MAAM,MAAM,eAAe,GAAG,MAAM,OAAO,kBAAkB,CAAC,OAAO,CAAC;AAEtE,MAAM,WAAW,qBAAqB;IACpC,OAAO,CAAC,EAAE,eAAe,CAAC;CAC3B;AAED,wBAAgB,YAAY,CAAC,EAC3B,OAA4C,GAC7C,GAAE,qBAA0B,UAE5B;AAED,MAAM,MAAM,SAAS,GAAG,SAAS,CAAC,cAAc,CAAC,GAAG,CAAC,GACnD,kBAAkB,GAClB,qBAAqB,CAAC;AAqDxB,eAAO,MAAM,IAAI;;
|
|
1
|
+
{"version":3,"file":"link.d.ts","sourceRoot":"","sources":["../../../../src/components/link/link.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,QAAQ,EAAE,MAAM,OAAO,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAGtD,OAAO,EAEL,KAAK,kBAAkB,EACxB,MAAM,2BAA2B,CAAC;AAgCnC,gFAAgF;AAChF,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;CAiBrB,CAAC;AAEX,eAAO,MAAM,0BAA0B;;CAE7B,CAAC;AAEX,MAAM,MAAM,eAAe,GAAG,MAAM,OAAO,kBAAkB,CAAC,OAAO,CAAC;AAEtE,MAAM,WAAW,qBAAqB;IACpC;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,eAAe,CAAC;CAC3B;AAED,wBAAgB,YAAY,CAAC,EAC3B,OAA4C,GAC7C,GAAE,qBAA0B,UAE5B;AAED;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,SAAS,GAAG,SAAS,CAAC,cAAc,CAAC,GAAG,CAAC,GACnD,kBAAkB,GAClB,qBAAqB,CAAC;AAqDxB,eAAO,MAAM,IAAI;;gBAlIY,QAAQ,CAAC,aAAa,CAAC;;;CAoIlD,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/** Loader size variant definitions mapping sizes to their pixel values. */
|
|
1
2
|
export declare const KUMO_LOADER_VARIANTS: {
|
|
2
3
|
readonly size: {
|
|
3
4
|
readonly sm: {
|
|
@@ -19,12 +20,45 @@ export declare const KUMO_LOADER_DEFAULT_VARIANTS: {
|
|
|
19
20
|
};
|
|
20
21
|
export type KumoLoaderSize = keyof typeof KUMO_LOADER_VARIANTS.size;
|
|
21
22
|
export interface KumoLoaderVariantsProps {
|
|
23
|
+
/**
|
|
24
|
+
* Size of the loader. Use a preset name or a custom pixel number.
|
|
25
|
+
* - `"sm"` — 16px, small loader for inline use
|
|
26
|
+
* - `"base"` — 24px, default loader size
|
|
27
|
+
* - `"lg"` — 32px, large loader for prominent loading states
|
|
28
|
+
* @default "base"
|
|
29
|
+
*/
|
|
22
30
|
size?: KumoLoaderSize | number;
|
|
23
31
|
}
|
|
24
32
|
export declare function loaderVariants({ size, }?: KumoLoaderVariantsProps): number;
|
|
33
|
+
/**
|
|
34
|
+
* Loader component props.
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```tsx
|
|
38
|
+
* <Loader />
|
|
39
|
+
* <Loader size="sm" />
|
|
40
|
+
* <Loader size={24} />
|
|
41
|
+
* ```
|
|
42
|
+
*/
|
|
25
43
|
export interface LoaderProps {
|
|
44
|
+
/** Additional CSS classes merged via `cn()`. */
|
|
26
45
|
className?: string;
|
|
46
|
+
/**
|
|
47
|
+
* Size of the spinner. Use a preset name or a custom pixel number.
|
|
48
|
+
* - `"sm"` — 16px, for inline use
|
|
49
|
+
* - `"base"` — 24px, default size
|
|
50
|
+
* - `"lg"` — 32px, for prominent loading states
|
|
51
|
+
* @default "base"
|
|
52
|
+
*/
|
|
27
53
|
size?: KumoLoaderSize | number;
|
|
28
54
|
}
|
|
55
|
+
/**
|
|
56
|
+
* Animated circular spinner for indicating loading states.
|
|
57
|
+
*
|
|
58
|
+
* @example
|
|
59
|
+
* ```tsx
|
|
60
|
+
* <Loader />
|
|
61
|
+
* ```
|
|
62
|
+
*/
|
|
29
63
|
export declare const Loader: ({ className, size, }: LoaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
30
64
|
//# sourceMappingURL=loader.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../../../../src/components/loader/loader.tsx"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;CAevB,CAAC;AAEX,eAAO,MAAM,4BAA4B;;CAE/B,CAAC;AAGX,MAAM,MAAM,cAAc,GAAG,MAAM,OAAO,oBAAoB,CAAC,IAAI,CAAC;AAEpE,MAAM,WAAW,uBAAuB;IACtC,IAAI,CAAC,EAAE,cAAc,GAAG,MAAM,CAAC;CAChC;AAED,wBAAgB,cAAc,CAAC,EAC7B,IAAwC,GACzC,GAAE,uBAA4B,GAAG,MAAM,CAGvC;AAED,MAAM,WAAW,WAAW;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,cAAc,GAAG,MAAM,CAAC;CAChC;AAED,eAAO,MAAM,MAAM,GAAI,sBAGpB,WAAW,4CAsDb,CAAC"}
|
|
1
|
+
{"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../../../../src/components/loader/loader.tsx"],"names":[],"mappings":"AAAA,2EAA2E;AAC3E,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;CAevB,CAAC;AAEX,eAAO,MAAM,4BAA4B;;CAE/B,CAAC;AAGX,MAAM,MAAM,cAAc,GAAG,MAAM,OAAO,oBAAoB,CAAC,IAAI,CAAC;AAEpE,MAAM,WAAW,uBAAuB;IACtC;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,cAAc,GAAG,MAAM,CAAC;CAChC;AAED,wBAAgB,cAAc,CAAC,EAC7B,IAAwC,GACzC,GAAE,uBAA4B,GAAG,MAAM,CAGvC;AAED;;;;;;;;;GASG;AACH,MAAM,WAAW,WAAW;IAC1B,gDAAgD;IAChD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,cAAc,GAAG,MAAM,CAAC;CAChC;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,MAAM,GAAI,sBAGpB,WAAW,4CAsDb,CAAC"}
|
|
@@ -1,22 +1,66 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
+
/** MenuBar variant definitions (currently empty, reserved for future additions). */
|
|
2
3
|
export declare const KUMO_MENUBAR_VARIANTS: {};
|
|
3
4
|
export declare const KUMO_MENUBAR_DEFAULT_VARIANTS: {};
|
|
4
5
|
export interface KumoMenuBarVariantsProps {
|
|
5
6
|
}
|
|
6
7
|
export declare function menuBarVariants(_props?: KumoMenuBarVariantsProps): string;
|
|
8
|
+
/** Props for an individual menu option within a MenuBar. */
|
|
7
9
|
type MenuOptionProps = {
|
|
10
|
+
/** Icon element (typically from `@phosphor-icons/react`) rendered at 18px */
|
|
8
11
|
icon: React.ReactNode;
|
|
12
|
+
/** Unique identifier for the option (used when `optionIds` is true) */
|
|
9
13
|
id?: number | string;
|
|
14
|
+
/** Currently active value from the parent MenuBar */
|
|
10
15
|
isActive?: number | boolean | string | undefined;
|
|
16
|
+
/** Callback when this option is clicked */
|
|
11
17
|
onClick: () => void;
|
|
18
|
+
/** Tooltip text shown on hover */
|
|
12
19
|
tooltip: string;
|
|
13
20
|
};
|
|
21
|
+
/**
|
|
22
|
+
* MenuBar component props.
|
|
23
|
+
*
|
|
24
|
+
* Horizontal icon-button toolbar with keyboard navigation and tooltip labels.
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* ```tsx
|
|
28
|
+
* <MenuBar
|
|
29
|
+
* isActive={activeIndex}
|
|
30
|
+
* options={[
|
|
31
|
+
* { icon: <ListIcon />, tooltip: "List view", onClick: () => setView("list") },
|
|
32
|
+
* { icon: <GridFourIcon />, tooltip: "Grid view", onClick: () => setView("grid") },
|
|
33
|
+
* ]}
|
|
34
|
+
* />
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
14
37
|
type MenuBarProps = {
|
|
38
|
+
/** Additional CSS classes merged via `cn()`. */
|
|
15
39
|
className?: string;
|
|
40
|
+
/** The currently active option value — matched against option index or `id`. */
|
|
16
41
|
isActive: number | boolean | string | undefined;
|
|
42
|
+
/** Array of menu option configurations. */
|
|
17
43
|
options: MenuOptionProps[];
|
|
44
|
+
/** When true, each option's `id` field is used for matching instead of its array index. */
|
|
18
45
|
optionIds?: boolean;
|
|
19
46
|
};
|
|
47
|
+
/**
|
|
48
|
+
* MenuBar — horizontal icon-button toolbar with keyboard arrow-key navigation.
|
|
49
|
+
*
|
|
50
|
+
* Each option renders as a `<button>` with a Tooltip. The active option is
|
|
51
|
+
* visually highlighted with an elevated background.
|
|
52
|
+
*
|
|
53
|
+
* @example
|
|
54
|
+
* ```tsx
|
|
55
|
+
* <MenuBar
|
|
56
|
+
* isActive={0}
|
|
57
|
+
* options={[
|
|
58
|
+
* { icon: <ListIcon />, tooltip: "List", onClick: () => {} },
|
|
59
|
+
* { icon: <GridFourIcon />, tooltip: "Grid", onClick: () => {} },
|
|
60
|
+
* ]}
|
|
61
|
+
* />
|
|
62
|
+
* ```
|
|
63
|
+
*/
|
|
20
64
|
export declare const MenuBar: ({ className, isActive, options, optionIds, }: MenuBarProps) => import("react/jsx-runtime").JSX.Element;
|
|
21
65
|
export {};
|
|
22
66
|
//# sourceMappingURL=menubar.d.ts.map
|