@stll/ui 0.75.0 → 0.77.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/dist/components/button-classes.d.ts +66 -0
- package/dist/components/button-classes.js +62 -0
- package/dist/components/button.d.ts +11 -4
- package/dist/components/button.js +8 -48
- package/dist/components/checkbox.js +1 -1
- package/dist/components/command.js +1 -1
- package/dist/components/composer-tokens.d.ts +9 -1
- package/dist/components/composer-tokens.js +9 -1
- package/dist/components/composer.d.ts +2 -2
- package/dist/components/composer.js +4 -4
- package/dist/components/control-face.d.ts +158 -0
- package/dist/components/control-face.js +192 -0
- package/dist/components/court-badge.d.ts +4 -2
- package/dist/components/court-badge.js +5 -3
- package/dist/components/details-grid.d.ts +8 -3
- package/dist/components/details-grid.js +28 -15
- package/dist/components/details-list-face.d.ts +7 -0
- package/dist/components/details-list-face.js +25 -0
- package/dist/components/document-mark.shared.d.ts +149 -0
- package/dist/components/document-mark.shared.js +62 -0
- package/dist/components/field-classes.d.ts +4 -0
- package/dist/components/field-classes.js +6 -0
- package/dist/components/field.js +5 -3
- package/dist/components/frame.d.ts +5 -1
- package/dist/components/frame.js +2 -2
- package/dist/components/input-otp-face.d.ts +4 -0
- package/dist/components/input-otp-face.js +15 -0
- package/dist/components/input-otp.d.ts +1 -1
- package/dist/components/input-otp.js +3 -8
- package/dist/components/label-classes.d.ts +20 -0
- package/dist/components/label-classes.js +21 -0
- package/dist/components/label.d.ts +2 -20
- package/dist/components/label.js +2 -19
- package/dist/components/landing-shell.d.ts +64 -0
- package/dist/components/landing-shell.js +189 -0
- package/dist/components/landing.d.ts +2 -39
- package/dist/components/landing.js +2 -66
- package/dist/components/list-shell.d.ts +39 -0
- package/dist/components/list-shell.js +99 -0
- package/dist/components/list.d.ts +3 -24
- package/dist/components/list.js +2 -49
- package/dist/components/outcome-screen-core.d.ts +25 -0
- package/dist/components/outcome-screen-core.js +76 -0
- package/dist/components/outcome-screen-face.d.ts +3 -0
- package/dist/components/outcome-screen-face.js +6 -0
- package/dist/components/outcome-screen-view.d.ts +9 -21
- package/dist/components/outcome-screen-view.js +36 -101
- package/dist/components/segmented-icon-toggle.d.ts +4 -1
- package/dist/components/segmented-icon-toggle.js +5 -4
- package/dist/components/select-classes.d.ts +10 -0
- package/dist/components/select-classes.js +13 -0
- package/dist/components/select.js +3 -7
- package/dist/components/skeleton.d.ts +3 -1
- package/dist/components/skeleton.js +9 -2
- package/dist/components/split-button.d.ts +2 -1
- package/dist/components/split-button.js +6 -14
- package/dist/components/switch.d.ts +1 -5
- package/dist/components/switch.js +2 -5
- package/dist/components/table-cell.d.ts +35 -0
- package/dist/components/table-cell.js +26 -0
- package/dist/components/table-shell.d.ts +131 -0
- package/dist/components/table-shell.js +141 -0
- package/dist/components/table.d.ts +4 -88
- package/dist/components/table.js +21 -70
- package/dist/components/tabs-classes.d.ts +8 -0
- package/dist/components/tabs-classes.js +10 -0
- package/dist/components/tabs.js +4 -3
- package/dist/components/toggle-classes.d.ts +13 -0
- package/dist/components/toggle-classes.js +10 -0
- package/dist/components/toggle-group-classes.d.ts +12 -0
- package/dist/components/toggle-group-classes.js +13 -0
- package/dist/components/toggle-group.js +3 -2
- package/dist/components/truncated-text-face.d.ts +33 -0
- package/dist/components/truncated-text-face.js +30 -0
- package/dist/components/truncated-text.d.ts +1 -6
- package/dist/components/truncated-text.js +1 -15
- package/dist/components/view-toolbar-classes.d.ts +13 -0
- package/dist/components/view-toolbar-classes.js +15 -0
- package/dist/components/view-toolbar-shell.d.ts +24 -0
- package/dist/components/view-toolbar-shell.js +43 -0
- package/dist/components/view-toolbar.d.ts +2 -15
- package/dist/components/view-toolbar.js +8 -26
- package/dist/data-table/table.js +2 -1
- package/dist/icons.d.ts +2 -2
- package/dist/icons.js +2 -2
- package/dist/index.d.ts +15 -9
- package/dist/index.js +11 -8
- package/dist/kanban/card-shell.js +1 -1
- package/dist/kanban/column-bands.d.ts +0 -8
- package/dist/kanban/column-bands.js +1 -18
- package/dist/kanban/column-header-shell.d.ts +39 -0
- package/dist/kanban/column-header-shell.js +48 -0
- package/dist/kanban/column-header.js +9 -12
- package/dist/kanban/index.d.ts +2 -2
- package/dist/kanban/index.js +3 -3
- package/dist/kanban/layout-tokens.d.ts +18 -1
- package/dist/kanban/layout-tokens.js +18 -1
- package/dist/kanban/sticky-lane.d.ts +2 -7
- package/dist/kanban/sticky-lane.js +1 -6
- package/dist/kanban/subgroup-board.js +2 -2
- package/dist/lib/{menu-row.js → list-row-metric.js} +1 -1
- package/package.json +52 -4
- /package/dist/lib/{menu-row.d.ts → list-row-metric.d.ts} +0 -0
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { ButtonSize } from "./button.shared.js";
|
|
2
|
+
/** Every size a button's face draws: all of the button's own. */
|
|
3
|
+
export type ButtonFaceSize = ButtonSize;
|
|
4
|
+
/** The box every sized button shares: layout, border, type, focus ring. */
|
|
5
|
+
export declare const BUTTON_BASE_CLASS = "focus-visible:ring-ring focus-visible:ring-offset-background relative inline-flex max-w-full shrink-0 cursor-pointer items-center justify-center gap-2 rounded-lg border text-base font-medium whitespace-nowrap outline-none select-none before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] focus-visible:ring-2 focus-visible:ring-offset-1 disabled:pointer-events-none disabled:opacity-64 sm:text-sm pointer-coarse:after:absolute pointer-coarse:after:size-full pointer-coarse:after:min-h-11 pointer-coarse:after:min-w-11 [&_svg]:pointer-events-none [&_svg]:-mx-0.5 [&_svg]:shrink-0 [&_svg:not([class*='opacity-'])]:opacity-80 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4";
|
|
6
|
+
export declare const BUTTON_DEFAULT_SIZE = "default";
|
|
7
|
+
/**
|
|
8
|
+
* Every shared size (./button.shared.ts) in the web's metrics, but `row`:
|
|
9
|
+
* a menu row's metric belongs to the menu module, and the button adds it.
|
|
10
|
+
*/
|
|
11
|
+
export declare const BUTTON_FACE_SIZE_CLASS_NAMES: {
|
|
12
|
+
readonly chip: "h-7 gap-1.5 rounded-full px-2.5 text-xs before:rounded-full sm:text-xs";
|
|
13
|
+
readonly default: "h-9 px-[calc(--spacing(3)-1px)] sm:h-8";
|
|
14
|
+
readonly icon: "size-9 sm:size-8";
|
|
15
|
+
readonly "icon-lg": "size-10 sm:size-9";
|
|
16
|
+
readonly "icon-round": "size-7 rounded-full sm:size-7";
|
|
17
|
+
readonly "icon-sm": "size-8 sm:size-7";
|
|
18
|
+
readonly "icon-xl": "size-11 sm:size-10 [&_svg:not([class*='size-'])]:size-5 sm:[&_svg:not([class*='size-'])]:size-4.5";
|
|
19
|
+
readonly "icon-2xs": "size-5 rounded-md before:rounded-[calc(var(--radius-md)-1px)] sm:size-4 [&_svg:not([class*='size-'])]:size-3.5 sm:[&_svg:not([class*='size-'])]:size-3";
|
|
20
|
+
readonly "icon-xs": "size-7 rounded-md before:rounded-[calc(var(--radius-md)-1px)] sm:size-6 not-in-data-[slot=input-group]:[&_svg:not([class*='size-'])]:size-4 sm:not-in-data-[slot=input-group]:[&_svg:not([class*='size-'])]:size-3.5";
|
|
21
|
+
readonly inline: "inline h-auto rounded-sm border-0 p-0 text-start text-[length:inherit] leading-[inherit] font-normal whitespace-normal select-text before:rounded-[calc(var(--radius-sm)-1px)] sm:text-[length:inherit] [&_svg]:mx-0 [&_svg]:inline [&_svg]:align-[-0.125em] [&_svg:not(:last-child)]:me-1";
|
|
22
|
+
readonly "inspector-row": "h-12 justify-start rounded-none px-3";
|
|
23
|
+
readonly lg: "h-10 px-[calc(--spacing(3.5)-1px)] sm:h-9";
|
|
24
|
+
readonly sm: "h-8 gap-1.5 px-[calc(--spacing(2.5)-1px)] text-sm sm:h-7 sm:text-xs";
|
|
25
|
+
readonly touch: "min-h-[44px] min-w-[44px] px-[calc(--spacing(3.5)-1px)]";
|
|
26
|
+
readonly xl: "h-11 px-[calc(--spacing(4)-1px)] text-lg sm:h-10 sm:text-base [&_svg:not([class*='size-'])]:size-5 sm:[&_svg:not([class*='size-'])]:size-4.5";
|
|
27
|
+
readonly xs: "h-7 gap-1 rounded-md px-[calc(--spacing(2)-1px)] text-sm before:rounded-[calc(var(--radius-md)-1px)] sm:h-6 sm:text-xs [&_svg:not([class*='size-'])]:size-4 sm:[&_svg:not([class*='size-'])]:size-3.5";
|
|
28
|
+
};
|
|
29
|
+
/** Every size's metrics, the menu row's included: the button's and its
|
|
30
|
+
* face's. */
|
|
31
|
+
export declare const BUTTON_SIZE_CLASS_NAMES: {
|
|
32
|
+
readonly chip: "h-7 gap-1.5 rounded-full px-2.5 text-xs before:rounded-full sm:text-xs";
|
|
33
|
+
readonly default: "h-9 px-[calc(--spacing(3)-1px)] sm:h-8";
|
|
34
|
+
readonly icon: "size-9 sm:size-8";
|
|
35
|
+
readonly "icon-lg": "size-10 sm:size-9";
|
|
36
|
+
readonly "icon-round": "size-7 rounded-full sm:size-7";
|
|
37
|
+
readonly "icon-sm": "size-8 sm:size-7";
|
|
38
|
+
readonly "icon-xl": "size-11 sm:size-10 [&_svg:not([class*='size-'])]:size-5 sm:[&_svg:not([class*='size-'])]:size-4.5";
|
|
39
|
+
readonly "icon-2xs": "size-5 rounded-md before:rounded-[calc(var(--radius-md)-1px)] sm:size-4 [&_svg:not([class*='size-'])]:size-3.5 sm:[&_svg:not([class*='size-'])]:size-3";
|
|
40
|
+
readonly "icon-xs": "size-7 rounded-md before:rounded-[calc(var(--radius-md)-1px)] sm:size-6 not-in-data-[slot=input-group]:[&_svg:not([class*='size-'])]:size-4 sm:not-in-data-[slot=input-group]:[&_svg:not([class*='size-'])]:size-3.5";
|
|
41
|
+
readonly inline: "inline h-auto rounded-sm border-0 p-0 text-start text-[length:inherit] leading-[inherit] font-normal whitespace-normal select-text before:rounded-[calc(var(--radius-sm)-1px)] sm:text-[length:inherit] [&_svg]:mx-0 [&_svg]:inline [&_svg]:align-[-0.125em] [&_svg:not(:last-child)]:me-1";
|
|
42
|
+
readonly "inspector-row": "h-12 justify-start rounded-none px-3";
|
|
43
|
+
readonly lg: "h-10 px-[calc(--spacing(3.5)-1px)] sm:h-9";
|
|
44
|
+
readonly sm: "h-8 gap-1.5 px-[calc(--spacing(2.5)-1px)] text-sm sm:h-7 sm:text-xs";
|
|
45
|
+
readonly touch: "min-h-[44px] min-w-[44px] px-[calc(--spacing(3.5)-1px)]";
|
|
46
|
+
readonly xl: "h-11 px-[calc(--spacing(4)-1px)] text-lg sm:h-10 sm:text-base [&_svg:not([class*='size-'])]:size-5 sm:[&_svg:not([class*='size-'])]:size-4.5";
|
|
47
|
+
readonly xs: "h-7 gap-1 rounded-md px-[calc(--spacing(2)-1px)] text-sm before:rounded-[calc(var(--radius-md)-1px)] sm:h-6 sm:text-xs [&_svg:not([class*='size-'])]:size-4 sm:[&_svg:not([class*='size-'])]:size-3.5";
|
|
48
|
+
readonly row: "min-h-8 w-full min-w-0 justify-start gap-2 px-2 py-1 pointer-coarse:min-h-11 text-start text-sm sm:text-sm [&_[data-slot=checkbox]]:size-4 [&_[data-slot=checkbox]_svg]:size-3 [&_svg:not([class*='size-'])]:size-4 sm:[&_svg:not([class*='size-'])]:size-4 [&_svg]:mx-0";
|
|
49
|
+
};
|
|
50
|
+
export declare const BUTTON_PRIMARY_STATE_CLASS = "shadow-primary/24 data-pressed:bg-primary/80 [:hover:not([data-pressed])]:bg-primary/90 shadow-xs not-disabled:inset-shadow-[0_1px_--theme(--color-white/16%)] [:active,[data-pressed]]:inset-shadow-[0_1px_--theme(--color-black/8%)] [:disabled,:active,[data-pressed]]:shadow-none";
|
|
51
|
+
export declare const BUTTON_VARIANT_CLASS_NAMES: {
|
|
52
|
+
readonly composer: `${string} shadow-primary/24 data-pressed:bg-primary/80 [:hover:not([data-pressed])]:bg-primary/90 shadow-xs not-disabled:inset-shadow-[0_1px_--theme(--color-white/16%)] [:active,[data-pressed]]:inset-shadow-[0_1px_--theme(--color-black/8%)] [:disabled,:active,[data-pressed]]:shadow-none hover:bg-foreground/90`;
|
|
53
|
+
readonly default: `${string} shadow-primary/24 data-pressed:bg-primary/80 [:hover:not([data-pressed])]:bg-primary/90 shadow-xs not-disabled:inset-shadow-[0_1px_--theme(--color-white/16%)] [:active,[data-pressed]]:inset-shadow-[0_1px_--theme(--color-black/8%)] [:disabled,:active,[data-pressed]]:shadow-none`;
|
|
54
|
+
readonly destructive: `${string} shadow-destructive/8 data-pressed:border-destructive/56 data-pressed:bg-destructive/20 [:hover:not([data-pressed])]:border-destructive/40 [:hover:not([data-pressed])]:bg-destructive/14 active:bg-destructive/18 shadow-xs not-dark:bg-clip-padding not-disabled:not-active:not-data-pressed:before:shadow-[0_1px_--theme(--color-black/4%)] [:disabled,:active,[data-pressed]]:shadow-none`;
|
|
55
|
+
readonly "destructive-outline": `${string} dark:bg-input/32 data-pressed:border-destructive/56 data-pressed:bg-destructive/8 [:hover:not([data-pressed])]:border-destructive/32 [:hover:not([data-pressed])]:bg-destructive/4 shadow-xs/5 not-dark:bg-clip-padding not-disabled:not-active:not-data-pressed:before:shadow-[0_1px_--theme(--color-black/4%)] dark:not-disabled:before:shadow-[0_-1px_--theme(--color-white/2%)] dark:not-disabled:not-active:not-data-pressed:before:shadow-[0_-1px_--theme(--color-white/6%)] [:disabled,:active,[data-pressed]]:shadow-none`;
|
|
56
|
+
readonly "destructive-ghost": `${string} data-pressed:bg-destructive/14 data-pressed:inset-ring-destructive/32 [:hover:not([data-pressed])]:bg-destructive/10 data-pressed:inset-ring`;
|
|
57
|
+
readonly ghost: `${string} data-pressed:bg-accent data-pressed:inset-ring-input [:hover:not([data-pressed])]:bg-accent data-pressed:shadow-xs/5 data-pressed:inset-ring`;
|
|
58
|
+
readonly link: `${string} underline-offset-4 data-pressed:underline data-pressed:decoration-2 [:hover:not([data-pressed])]:underline`;
|
|
59
|
+
readonly "muted-destructive": `${string} data-pressed:bg-destructive/14 data-pressed:text-destructive data-pressed:inset-ring-destructive/32 [:hover:not([data-pressed])]:bg-destructive/10 [:hover:not([data-pressed])]:text-destructive data-pressed:inset-ring`;
|
|
60
|
+
readonly muted: `${string} data-pressed:bg-accent data-pressed:text-foreground data-pressed:inset-ring-input [:hover:not([data-pressed])]:bg-accent [:hover:not([data-pressed])]:text-foreground data-pressed:shadow-xs/5 data-pressed:inset-ring`;
|
|
61
|
+
readonly outline: `${string} dark:bg-input/32 data-pressed:border-primary/48 data-pressed:bg-accent dark:data-pressed:bg-input/64 [:hover:not([data-pressed])]:bg-accent/50 dark:[:hover:not([data-pressed])]:bg-input/64 shadow-xs/5 not-dark:bg-clip-padding not-disabled:not-active:not-data-pressed:before:shadow-[0_1px_--theme(--color-black/4%)] dark:not-disabled:before:shadow-[0_-1px_--theme(--color-white/2%)] dark:not-disabled:not-active:not-data-pressed:before:shadow-[0_-1px_--theme(--color-white/6%)] [:disabled,:active,[data-pressed]]:shadow-none`;
|
|
62
|
+
readonly secondary: `${string} data-pressed:bg-background data-pressed:inset-ring-input active:bg-secondary/80 [:hover:not([data-pressed])]:bg-secondary/90 data-pressed:shadow-xs/5 data-pressed:inset-ring`;
|
|
63
|
+
};
|
|
64
|
+
export declare const BUTTON_LAYOUT_CLASS_NAMES: {
|
|
65
|
+
readonly wrap: "h-auto min-h-11 items-start justify-start py-2 text-start whitespace-normal sm:h-auto";
|
|
66
|
+
};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { TOOLBAR_ROW_HEIGHT } from "../inspector/layout-tokens.js";
|
|
2
|
+
import { MENU_ROW_CLASS_NAME } from "../lib/list-row-metric.js";
|
|
3
|
+
import { BUTTON_VARIANT_TOKENS } from "./button.shared.js";
|
|
4
|
+
// src/components/button-classes.ts
|
|
5
|
+
/** The box every sized button shares: layout, border, type, focus ring. */
|
|
6
|
+
const BUTTON_BASE_CLASS = "focus-visible:ring-ring focus-visible:ring-offset-background relative inline-flex max-w-full shrink-0 cursor-pointer items-center justify-center gap-2 rounded-lg border text-base font-medium whitespace-nowrap outline-none select-none before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] focus-visible:ring-2 focus-visible:ring-offset-1 disabled:pointer-events-none disabled:opacity-64 sm:text-sm pointer-coarse:after:absolute pointer-coarse:after:size-full pointer-coarse:after:min-h-11 pointer-coarse:after:min-w-11 [&_svg]:pointer-events-none [&_svg]:-mx-0.5 [&_svg]:shrink-0 [&_svg:not([class*='opacity-'])]:opacity-80 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4";
|
|
7
|
+
const BUTTON_DEFAULT_SIZE = "default";
|
|
8
|
+
/** A variant's shared colours (./button.shared.ts), before the web's states. */
|
|
9
|
+
const tokens = (variant) => {
|
|
10
|
+
const { surface, label } = BUTTON_VARIANT_TOKENS[variant];
|
|
11
|
+
return label === "" ? surface : `${surface} ${label}`;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Every shared size (./button.shared.ts) in the web's metrics, but `row`:
|
|
15
|
+
* a menu row's metric belongs to the menu module, and the button adds it.
|
|
16
|
+
*/
|
|
17
|
+
const BUTTON_FACE_SIZE_CLASS_NAMES = {
|
|
18
|
+
chip: "h-7 gap-1.5 rounded-full px-2.5 text-xs before:rounded-full sm:text-xs",
|
|
19
|
+
default: "h-9 px-[calc(--spacing(3)-1px)] sm:h-8",
|
|
20
|
+
icon: "size-9 sm:size-8",
|
|
21
|
+
"icon-lg": "size-10 sm:size-9",
|
|
22
|
+
"icon-round": "size-7 rounded-full sm:size-7",
|
|
23
|
+
"icon-sm": "size-8 sm:size-7",
|
|
24
|
+
"icon-xl": "size-11 sm:size-10 [&_svg:not([class*='size-'])]:size-5 sm:[&_svg:not([class*='size-'])]:size-4.5",
|
|
25
|
+
"icon-2xs": "size-5 rounded-md before:rounded-[calc(var(--radius-md)-1px)] sm:size-4 [&_svg:not([class*='size-'])]:size-3.5 sm:[&_svg:not([class*='size-'])]:size-3",
|
|
26
|
+
"icon-xs": "size-7 rounded-md before:rounded-[calc(var(--radius-md)-1px)] sm:size-6 not-in-data-[slot=input-group]:[&_svg:not([class*='size-'])]:size-4 sm:not-in-data-[slot=input-group]:[&_svg:not([class*='size-'])]:size-3.5",
|
|
27
|
+
inline: "inline h-auto rounded-sm border-0 p-0 text-start text-[length:inherit] leading-[inherit] font-normal whitespace-normal select-text before:rounded-[calc(var(--radius-sm)-1px)] sm:text-[length:inherit] [&_svg]:mx-0 [&_svg]:inline [&_svg]:align-[-0.125em] [&_svg:not(:last-child)]:me-1",
|
|
28
|
+
"inspector-row": `${TOOLBAR_ROW_HEIGHT} justify-start rounded-none px-3`,
|
|
29
|
+
lg: "h-10 px-[calc(--spacing(3.5)-1px)] sm:h-9",
|
|
30
|
+
sm: "h-8 gap-1.5 px-[calc(--spacing(2.5)-1px)] text-sm sm:h-7 sm:text-xs",
|
|
31
|
+
touch: "min-h-[44px] min-w-[44px] px-[calc(--spacing(3.5)-1px)]",
|
|
32
|
+
xl: "h-11 px-[calc(--spacing(4)-1px)] text-lg sm:h-10 sm:text-base [&_svg:not([class*='size-'])]:size-5 sm:[&_svg:not([class*='size-'])]:size-4.5",
|
|
33
|
+
xs: "h-7 gap-1 rounded-md px-[calc(--spacing(2)-1px)] text-sm before:rounded-[calc(var(--radius-md)-1px)] sm:h-6 sm:text-xs [&_svg:not([class*='size-'])]:size-4 sm:[&_svg:not([class*='size-'])]:size-3.5"
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* One row of a menu list. The metric is shared with `CommandItem`; the rest
|
|
37
|
+
* undoes the base button's centred content and its icon inset, so a button
|
|
38
|
+
* row and a command row read as the same box.
|
|
39
|
+
*/
|
|
40
|
+
const BUTTON_ROW_SIZE_CLASS = `${MENU_ROW_CLASS_NAME} [&_svg]:mx-0`;
|
|
41
|
+
/** Every size's metrics, the menu row's included: the button's and its
|
|
42
|
+
* face's. */
|
|
43
|
+
const BUTTON_SIZE_CLASS_NAMES = {
|
|
44
|
+
...BUTTON_FACE_SIZE_CLASS_NAMES,
|
|
45
|
+
row: BUTTON_ROW_SIZE_CLASS
|
|
46
|
+
};
|
|
47
|
+
const BUTTON_PRIMARY_STATE_CLASS = "shadow-primary/24 data-pressed:bg-primary/80 [:hover:not([data-pressed])]:bg-primary/90 shadow-xs not-disabled:inset-shadow-[0_1px_--theme(--color-white/16%)] [:active,[data-pressed]]:inset-shadow-[0_1px_--theme(--color-black/8%)] [:disabled,:active,[data-pressed]]:shadow-none";
|
|
48
|
+
const BUTTON_VARIANT_CLASS_NAMES = {
|
|
49
|
+
composer: `${tokens("composer")} ${BUTTON_PRIMARY_STATE_CLASS} hover:bg-foreground/90`,
|
|
50
|
+
default: `${tokens("default")} ${BUTTON_PRIMARY_STATE_CLASS}`,
|
|
51
|
+
destructive: `${tokens("destructive")} shadow-destructive/8 data-pressed:border-destructive/56 data-pressed:bg-destructive/20 [:hover:not([data-pressed])]:border-destructive/40 [:hover:not([data-pressed])]:bg-destructive/14 active:bg-destructive/18 shadow-xs not-dark:bg-clip-padding not-disabled:not-active:not-data-pressed:before:shadow-[0_1px_--theme(--color-black/4%)] [:disabled,:active,[data-pressed]]:shadow-none`,
|
|
52
|
+
"destructive-outline": `${tokens("destructive-outline")} dark:bg-input/32 data-pressed:border-destructive/56 data-pressed:bg-destructive/8 [:hover:not([data-pressed])]:border-destructive/32 [:hover:not([data-pressed])]:bg-destructive/4 shadow-xs/5 not-dark:bg-clip-padding not-disabled:not-active:not-data-pressed:before:shadow-[0_1px_--theme(--color-black/4%)] dark:not-disabled:before:shadow-[0_-1px_--theme(--color-white/2%)] dark:not-disabled:not-active:not-data-pressed:before:shadow-[0_-1px_--theme(--color-white/6%)] [:disabled,:active,[data-pressed]]:shadow-none`,
|
|
53
|
+
"destructive-ghost": `${tokens("destructive-ghost")} data-pressed:bg-destructive/14 data-pressed:inset-ring-destructive/32 [:hover:not([data-pressed])]:bg-destructive/10 data-pressed:inset-ring`,
|
|
54
|
+
ghost: `${tokens("ghost")} data-pressed:bg-accent data-pressed:inset-ring-input [:hover:not([data-pressed])]:bg-accent data-pressed:shadow-xs/5 data-pressed:inset-ring`,
|
|
55
|
+
link: `${tokens("link")} underline-offset-4 data-pressed:underline data-pressed:decoration-2 [:hover:not([data-pressed])]:underline`,
|
|
56
|
+
"muted-destructive": `${tokens("muted-destructive")} data-pressed:bg-destructive/14 data-pressed:text-destructive data-pressed:inset-ring-destructive/32 [:hover:not([data-pressed])]:bg-destructive/10 [:hover:not([data-pressed])]:text-destructive data-pressed:inset-ring`,
|
|
57
|
+
muted: `${tokens("muted")} data-pressed:bg-accent data-pressed:text-foreground data-pressed:inset-ring-input [:hover:not([data-pressed])]:bg-accent [:hover:not([data-pressed])]:text-foreground data-pressed:shadow-xs/5 data-pressed:inset-ring`,
|
|
58
|
+
outline: `${tokens("outline")} dark:bg-input/32 data-pressed:border-primary/48 data-pressed:bg-accent dark:data-pressed:bg-input/64 [:hover:not([data-pressed])]:bg-accent/50 dark:[:hover:not([data-pressed])]:bg-input/64 shadow-xs/5 not-dark:bg-clip-padding not-disabled:not-active:not-data-pressed:before:shadow-[0_1px_--theme(--color-black/4%)] dark:not-disabled:before:shadow-[0_-1px_--theme(--color-white/2%)] dark:not-disabled:not-active:not-data-pressed:before:shadow-[0_-1px_--theme(--color-white/6%)] [:disabled,:active,[data-pressed]]:shadow-none`,
|
|
59
|
+
secondary: `${tokens("secondary")} data-pressed:bg-background data-pressed:inset-ring-input active:bg-secondary/80 [:hover:not([data-pressed])]:bg-secondary/90 data-pressed:shadow-xs/5 data-pressed:inset-ring`
|
|
60
|
+
};
|
|
61
|
+
const BUTTON_LAYOUT_CLASS_NAMES = { wrap: "h-auto min-h-11 items-start justify-start py-2 text-start whitespace-normal sm:h-auto" };
|
|
62
|
+
export { BUTTON_BASE_CLASS, BUTTON_DEFAULT_SIZE, BUTTON_FACE_SIZE_CLASS_NAMES, BUTTON_LAYOUT_CLASS_NAMES, BUTTON_PRIMARY_STATE_CLASS, BUTTON_SIZE_CLASS_NAMES, BUTTON_VARIANT_CLASS_NAMES };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { BUTTON_LAYOUT_CLASS_NAMES } from "./button-classes.js";
|
|
1
2
|
import { ButtonContract, ButtonSize, ButtonVariant } from "./button.shared.js";
|
|
2
3
|
import { ReactNode } from "react";
|
|
3
4
|
import { useRender } from "@base-ui/react/use-render";
|
|
@@ -11,9 +12,6 @@ import { useRender } from "@base-ui/react/use-render";
|
|
|
11
12
|
* swaps the cursor so the control still reads as unavailable on hover.
|
|
12
13
|
*/
|
|
13
14
|
declare const buttonAccessibleDisabledClass = "cursor-not-allowed opacity-64";
|
|
14
|
-
declare const BUTTON_LAYOUT_CLASS_NAMES: {
|
|
15
|
-
readonly wrap: "h-auto min-h-11 items-start justify-start py-2 text-start whitespace-normal sm:h-auto";
|
|
16
|
-
};
|
|
17
15
|
declare const buttonVariants: (props?: ({
|
|
18
16
|
size?: "chip" | "default" | "icon" | "icon-2xs" | "icon-lg" | "icon-round" | "icon-sm" | "icon-xl" | "icon-xs" | "inline" | "inspector-row" | "lg" | "row" | "sm" | "touch" | "xl" | "xs" | null | undefined;
|
|
19
17
|
layout?: "wrap" | null | undefined;
|
|
@@ -80,12 +78,21 @@ declare const BUTTON_SIZE_CONTENT: {
|
|
|
80
78
|
type ButtonProps = Omit<ButtonContract, "children" | "disabled"> & {
|
|
81
79
|
layout?: keyof typeof BUTTON_LAYOUT_CLASS_NAMES;
|
|
82
80
|
tooltip?: ReactNode;
|
|
81
|
+
/**
|
|
82
|
+
* Why the button cannot act right now, in the reader's terms ("Type a
|
|
83
|
+
* message to send it."). While `disabled`, it is the button's tooltip, in
|
|
84
|
+
* place of `tooltip`, and the button stays hoverable and focusable
|
|
85
|
+
* (`aria-disabled`) with activation blocked, so whoever reaches for it
|
|
86
|
+
* learns what to do. The `disabled-control-needs-reason` rule asks for it
|
|
87
|
+
* on every disabled Button.
|
|
88
|
+
*/
|
|
89
|
+
disabledReason?: ReactNode;
|
|
83
90
|
focusRing?: ButtonFocusRing | undefined;
|
|
84
91
|
/** `variant="plain"` only: the outline its focus ring follows. */
|
|
85
92
|
shape?: ButtonPlainShape | undefined;
|
|
86
93
|
"data-accessible-disabled"?: "";
|
|
87
94
|
} & useRender.ComponentProps<"button">;
|
|
88
|
-
declare function Button({ className, variant: variantProp, size, render, layout, loading, icon, children, disabled, tooltip, selected, focusRing, shape, "data-accessible-disabled": accessibleDisabled, ...props }: ButtonProps): import("react").JSX.Element;
|
|
95
|
+
declare function Button({ className, variant: variantProp, size, render, layout, loading, icon, children, disabled, disabledReason, tooltip, selected, focusRing, shape, "data-accessible-disabled": accessibleDisabled, ...props }: ButtonProps): import("react").JSX.Element;
|
|
89
96
|
/**
|
|
90
97
|
* How a run shows it can be pressed: underlined like a link, or `plain`, by
|
|
91
98
|
* what it holds (a claim's text mark, which draws its own line), as a plain
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { TOOLBAR_ROW_HEIGHT } from "../inspector/layout-tokens.js";
|
|
3
2
|
import { BUTTON_DISPOSITION, blockDisabledActivation, blockDisabledKeyActivation, resolveButtonDisposition } from "../lib/button-disposition.js";
|
|
4
|
-
import { MENU_ROW_CLASS_NAME } from "../lib/menu-row.js";
|
|
5
3
|
import { rendersNothing } from "../lib/renders-nothing.js";
|
|
6
4
|
import { cn } from "../lib/utils.js";
|
|
7
|
-
import {
|
|
5
|
+
import { BUTTON_BASE_CLASS, BUTTON_DEFAULT_SIZE, BUTTON_LAYOUT_CLASS_NAMES, BUTTON_SIZE_CLASS_NAMES, BUTTON_VARIANT_CLASS_NAMES } from "./button-classes.js";
|
|
6
|
+
import { BUTTON_PLAIN_VARIANT } from "./button.shared.js";
|
|
8
7
|
import { Loader } from "./loader.js";
|
|
9
8
|
import { renderTooltipTrigger } from "./tooltip-trigger-helper.js";
|
|
10
9
|
import { TruncatedText } from "./truncated-text.js";
|
|
@@ -35,46 +34,7 @@ const buttonAccessibleDisabledClass = "cursor-not-allowed opacity-64";
|
|
|
35
34
|
* buttons keep the treatment of their surface instead.
|
|
36
35
|
*/
|
|
37
36
|
const buttonPressClass = "motion-safe:transition-transform motion-safe:duration-150 ease-out motion-safe:active:scale-[0.98]";
|
|
38
|
-
const
|
|
39
|
-
/** A variant's shared colours (./button.shared.ts), before the web's states. */
|
|
40
|
-
const tokens = (variant) => {
|
|
41
|
-
const { surface, label } = BUTTON_VARIANT_TOKENS[variant];
|
|
42
|
-
return label === "" ? surface : `${surface} ${label}`;
|
|
43
|
-
};
|
|
44
|
-
const BUTTON_SIZE_CLASS_NAMES = {
|
|
45
|
-
chip: "h-7 gap-1.5 rounded-full px-2.5 text-xs before:rounded-full sm:text-xs",
|
|
46
|
-
default: "h-9 px-[calc(--spacing(3)-1px)] sm:h-8",
|
|
47
|
-
icon: "size-9 sm:size-8",
|
|
48
|
-
"icon-lg": "size-10 sm:size-9",
|
|
49
|
-
"icon-round": "size-7 rounded-full sm:size-7",
|
|
50
|
-
"icon-sm": "size-8 sm:size-7",
|
|
51
|
-
"icon-xl": "size-11 sm:size-10 [&_svg:not([class*='size-'])]:size-5 sm:[&_svg:not([class*='size-'])]:size-4.5",
|
|
52
|
-
"icon-2xs": "size-5 rounded-md before:rounded-[calc(var(--radius-md)-1px)] sm:size-4 [&_svg:not([class*='size-'])]:size-3.5 sm:[&_svg:not([class*='size-'])]:size-3",
|
|
53
|
-
"icon-xs": "size-7 rounded-md before:rounded-[calc(var(--radius-md)-1px)] sm:size-6 not-in-data-[slot=input-group]:[&_svg:not([class*='size-'])]:size-4 sm:not-in-data-[slot=input-group]:[&_svg:not([class*='size-'])]:size-3.5",
|
|
54
|
-
inline: "inline h-auto rounded-sm border-0 p-0 text-start text-[length:inherit] leading-[inherit] font-normal whitespace-normal select-text before:rounded-[calc(var(--radius-sm)-1px)] sm:text-[length:inherit] [&_svg]:mx-0 [&_svg]:inline [&_svg]:align-[-0.125em] [&_svg:not(:last-child)]:me-1",
|
|
55
|
-
"inspector-row": `${TOOLBAR_ROW_HEIGHT} justify-start rounded-none px-3`,
|
|
56
|
-
lg: "h-10 px-[calc(--spacing(3.5)-1px)] sm:h-9",
|
|
57
|
-
row: `${MENU_ROW_CLASS_NAME} [&_svg]:mx-0`,
|
|
58
|
-
sm: "h-8 gap-1.5 px-[calc(--spacing(2.5)-1px)] text-sm sm:h-7 sm:text-xs",
|
|
59
|
-
touch: "min-h-[44px] min-w-[44px] px-[calc(--spacing(3.5)-1px)]",
|
|
60
|
-
xl: "h-11 px-[calc(--spacing(4)-1px)] text-lg sm:h-10 sm:text-base [&_svg:not([class*='size-'])]:size-5 sm:[&_svg:not([class*='size-'])]:size-4.5",
|
|
61
|
-
xs: "h-7 gap-1 rounded-md px-[calc(--spacing(2)-1px)] text-sm before:rounded-[calc(var(--radius-md)-1px)] sm:h-6 sm:text-xs [&_svg:not([class*='size-'])]:size-4 sm:[&_svg:not([class*='size-'])]:size-3.5"
|
|
62
|
-
};
|
|
63
|
-
const BUTTON_PRIMARY_STATE_CLASS = "shadow-primary/24 data-pressed:bg-primary/80 [:hover:not([data-pressed])]:bg-primary/90 shadow-xs not-disabled:inset-shadow-[0_1px_--theme(--color-white/16%)] [:active,[data-pressed]]:inset-shadow-[0_1px_--theme(--color-black/8%)] [:disabled,:active,[data-pressed]]:shadow-none";
|
|
64
|
-
const BUTTON_VARIANT_CLASS_NAMES = {
|
|
65
|
-
composer: `${tokens("composer")} ${BUTTON_PRIMARY_STATE_CLASS} hover:bg-foreground/90`,
|
|
66
|
-
default: `${tokens("default")} ${BUTTON_PRIMARY_STATE_CLASS}`,
|
|
67
|
-
destructive: `${tokens("destructive")} shadow-destructive/8 data-pressed:border-destructive/56 data-pressed:bg-destructive/20 [:hover:not([data-pressed])]:border-destructive/40 [:hover:not([data-pressed])]:bg-destructive/14 active:bg-destructive/18 shadow-xs not-dark:bg-clip-padding not-disabled:not-active:not-data-pressed:before:shadow-[0_1px_--theme(--color-black/4%)] [:disabled,:active,[data-pressed]]:shadow-none`,
|
|
68
|
-
"destructive-outline": `${tokens("destructive-outline")} dark:bg-input/32 data-pressed:border-destructive/56 data-pressed:bg-destructive/8 [:hover:not([data-pressed])]:border-destructive/32 [:hover:not([data-pressed])]:bg-destructive/4 shadow-xs/5 not-dark:bg-clip-padding not-disabled:not-active:not-data-pressed:before:shadow-[0_1px_--theme(--color-black/4%)] dark:not-disabled:before:shadow-[0_-1px_--theme(--color-white/2%)] dark:not-disabled:not-active:not-data-pressed:before:shadow-[0_-1px_--theme(--color-white/6%)] [:disabled,:active,[data-pressed]]:shadow-none`,
|
|
69
|
-
"destructive-ghost": `${tokens("destructive-ghost")} data-pressed:bg-destructive/14 data-pressed:inset-ring-destructive/32 [:hover:not([data-pressed])]:bg-destructive/10 data-pressed:inset-ring`,
|
|
70
|
-
ghost: `${tokens("ghost")} data-pressed:bg-accent data-pressed:inset-ring-input [:hover:not([data-pressed])]:bg-accent data-pressed:shadow-xs/5 data-pressed:inset-ring`,
|
|
71
|
-
link: `${tokens("link")} underline-offset-4 data-pressed:underline data-pressed:decoration-2 [:hover:not([data-pressed])]:underline`,
|
|
72
|
-
"muted-destructive": `${tokens("muted-destructive")} data-pressed:bg-destructive/14 data-pressed:text-destructive data-pressed:inset-ring-destructive/32 [:hover:not([data-pressed])]:bg-destructive/10 [:hover:not([data-pressed])]:text-destructive data-pressed:inset-ring`,
|
|
73
|
-
muted: `${tokens("muted")} data-pressed:bg-accent data-pressed:text-foreground data-pressed:inset-ring-input [:hover:not([data-pressed])]:bg-accent [:hover:not([data-pressed])]:text-foreground data-pressed:shadow-xs/5 data-pressed:inset-ring`,
|
|
74
|
-
outline: `${tokens("outline")} dark:bg-input/32 data-pressed:border-primary/48 data-pressed:bg-accent dark:data-pressed:bg-input/64 [:hover:not([data-pressed])]:bg-accent/50 dark:[:hover:not([data-pressed])]:bg-input/64 shadow-xs/5 not-dark:bg-clip-padding not-disabled:not-active:not-data-pressed:before:shadow-[0_1px_--theme(--color-black/4%)] dark:not-disabled:before:shadow-[0_-1px_--theme(--color-white/2%)] dark:not-disabled:not-active:not-data-pressed:before:shadow-[0_-1px_--theme(--color-white/6%)] [:disabled,:active,[data-pressed]]:shadow-none`,
|
|
75
|
-
secondary: `${tokens("secondary")} data-pressed:bg-background data-pressed:inset-ring-input active:bg-secondary/80 [:hover:not([data-pressed])]:bg-secondary/90 data-pressed:shadow-xs/5 data-pressed:inset-ring`
|
|
76
|
-
};
|
|
77
|
-
const buttonVariants = cva("focus-visible:ring-ring focus-visible:ring-offset-background relative inline-flex max-w-full shrink-0 cursor-pointer items-center justify-center gap-2 rounded-lg border text-base font-medium whitespace-nowrap outline-none select-none before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] focus-visible:ring-2 focus-visible:ring-offset-1 disabled:pointer-events-none disabled:opacity-64 sm:text-sm pointer-coarse:after:absolute pointer-coarse:after:size-full pointer-coarse:after:min-h-11 pointer-coarse:after:min-w-11 [&_svg]:pointer-events-none [&_svg]:-mx-0.5 [&_svg]:shrink-0 [&_svg:not([class*='opacity-'])]:opacity-80 [&_svg:not([class*='size-'])]:size-4.5 sm:[&_svg:not([class*='size-'])]:size-4", {
|
|
37
|
+
const buttonVariants = cva(BUTTON_BASE_CLASS, {
|
|
78
38
|
compoundVariants: [{
|
|
79
39
|
className: "[:hover:not([data-pressed])]:bg-transparent",
|
|
80
40
|
size: "inline",
|
|
@@ -96,7 +56,7 @@ const buttonVariants = cva("focus-visible:ring-ring focus-visible:ring-offset-ba
|
|
|
96
56
|
},
|
|
97
57
|
variants: {
|
|
98
58
|
size: BUTTON_SIZE_CLASS_NAMES,
|
|
99
|
-
layout:
|
|
59
|
+
layout: BUTTON_LAYOUT_CLASS_NAMES,
|
|
100
60
|
variant: BUTTON_VARIANT_CLASS_NAMES
|
|
101
61
|
}
|
|
102
62
|
});
|
|
@@ -170,7 +130,7 @@ const BUTTON_SIZE_CONTENT = {
|
|
|
170
130
|
* and a plain button lays out its own content, so neither has a one-line
|
|
171
131
|
* label to cut.
|
|
172
132
|
*/
|
|
173
|
-
const cutsLabel = ({ layout, size, variant }) => layout === void 0 && variant !== "plain" && variant !== "link" && size !== "inline" && BUTTON_SIZE_CONTENT[size ??
|
|
133
|
+
const cutsLabel = ({ layout, size, variant }) => layout === void 0 && variant !== "plain" && variant !== "link" && size !== "inline" && BUTTON_SIZE_CONTENT[size ?? "default"] === BUTTON_CONTENT.text;
|
|
174
134
|
/**
|
|
175
135
|
* Each run of adjacent text among the children, cut to the button's width.
|
|
176
136
|
* Adjacent text (`Save {count} files`) stays one run, as it is one flex item
|
|
@@ -207,17 +167,17 @@ const containedLabel = (children) => {
|
|
|
207
167
|
return parts;
|
|
208
168
|
};
|
|
209
169
|
const implicitTooltip = (size, accessibleName) => {
|
|
210
|
-
const content = BUTTON_SIZE_CONTENT[size ??
|
|
170
|
+
const content = BUTTON_SIZE_CONTENT[size ?? "default"];
|
|
211
171
|
switch (content) {
|
|
212
172
|
case BUTTON_CONTENT.icon: return accessibleName;
|
|
213
173
|
case BUTTON_CONTENT.text: return;
|
|
214
174
|
default: return panic(`Unhandled button content: ${String(content)}`);
|
|
215
175
|
}
|
|
216
176
|
};
|
|
217
|
-
function Button({ className, variant: variantProp, size, render, layout, loading, icon, children, disabled, tooltip, selected, focusRing = "outside", shape = "box", "data-accessible-disabled": accessibleDisabled, ...props }) {
|
|
177
|
+
function Button({ className, variant: variantProp, size, render, layout, loading, icon, children, disabled, disabledReason, tooltip, selected, focusRing = "outside", shape = "box", "data-accessible-disabled": accessibleDisabled, ...props }) {
|
|
218
178
|
const variant = variantProp ?? (size === "inline" ? "link" : void 0);
|
|
219
179
|
const typeValue = render ? void 0 : "button";
|
|
220
|
-
const tooltipContent = tooltip ?? implicitTooltip(size, props["aria-label"] ?? props.title);
|
|
180
|
+
const tooltipContent = disabled === true && disabledReason !== void 0 ? disabledReason : tooltip ?? implicitTooltip(size, props["aria-label"] ?? props.title);
|
|
221
181
|
const disposition = resolveButtonDisposition({
|
|
222
182
|
disabled,
|
|
223
183
|
loading,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn } from "../lib/utils.js";
|
|
3
3
|
import { TABLE_FIRST_LINE } from "./table-layout.js";
|
|
4
|
+
import { CHECKBOX_CLASS_NAME } from "./toggle-classes.js";
|
|
4
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
6
|
import { Checkbox as Checkbox$1 } from "@base-ui/react/checkbox";
|
|
6
7
|
// src/components/checkbox.tsx
|
|
@@ -57,7 +58,6 @@ const renderCellCheckbox = ({ appearance, rowLabel, firstLine, checked, ...props
|
|
|
57
58
|
})
|
|
58
59
|
})]
|
|
59
60
|
});
|
|
60
|
-
const CHECKBOX_CLASS_NAME = "border-input bg-background ring-ring focus-visible:ring-offset-background aria-invalid:border-destructive/36 focus-visible:aria-invalid:border-destructive/64 focus-visible:aria-invalid:ring-destructive/48 dark:not-data-checked:bg-input/32 dark:aria-invalid:ring-destructive/24 relative inline-flex size-4.5 shrink-0 items-center justify-center rounded-sm border shadow-xs/5 outline-none not-dark:bg-clip-padding before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-sm)-1px)] not-data-disabled:not-data-checked:not-aria-invalid:before:shadow-[0_1px_--theme(--color-black/4%)] focus-visible:ring-2 focus-visible:ring-offset-1 data-disabled:opacity-64 sm:size-4 dark:not-data-disabled:not-data-checked:not-aria-invalid:before:shadow-[0_-1px_--theme(--color-white/6%)] [[data-disabled],[data-checked],[aria-invalid]]:shadow-none";
|
|
61
61
|
const CHECKBOX_INDICATOR_CLASS_NAME = "text-primary-foreground data-checked:bg-primary data-indeterminate:text-foreground absolute -inset-px flex items-center justify-center rounded-sm data-unchecked:hidden";
|
|
62
62
|
const CheckboxGlyph = ({ indeterminate }) => indeterminate ? /* @__PURE__ */ jsxs("svg", {
|
|
63
63
|
"aria-hidden": "true",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { useContentDir } from "../hooks/use-content-dir.js";
|
|
3
3
|
import { SearchIcon } from "../icons.js";
|
|
4
4
|
import { CONTROL_SIZE } from "../lib/control-size.js";
|
|
5
|
-
import { MENU_ROW_CLASS_NAME } from "../lib/
|
|
5
|
+
import { MENU_ROW_CLASS_NAME } from "../lib/list-row-metric.js";
|
|
6
6
|
import { cn } from "../lib/utils.js";
|
|
7
7
|
import { DialogContent as DialogPopup } from "./dialog.js";
|
|
8
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -71,4 +71,12 @@ export declare const COMPOSER_SEND_BUTTON_CLASS = "bg-foreground text-background
|
|
|
71
71
|
* law home's scope and jurisdiction): quiet text with a hover surface, so
|
|
72
72
|
* the row stays subordinate to the box above it.
|
|
73
73
|
*/
|
|
74
|
-
export declare const COMPOSER_PICKER_TRIGGER_CLASS = "text-muted-foreground hover:text-foreground hover:bg-accent inline-flex min-w-0 shrink items-center gap-1 rounded-md px-1.5 py-0.5 text-2xs";
|
|
74
|
+
export declare const COMPOSER_PICKER_TRIGGER_CLASS = "text-muted-foreground hover:text-foreground hover:bg-accent inline-flex min-w-0 shrink items-center gap-1 rounded-md px-1.5 py-0.5 text-2xs";
|
|
75
|
+
/**
|
|
76
|
+
* The slim status row under a composer box (`ComposerStatusRow`), with a
|
|
77
|
+
* middle slot: three columns whose sides share the remaining width, so the
|
|
78
|
+
* middle stays centred. A loading view draws the row from the same class.
|
|
79
|
+
*/
|
|
80
|
+
export declare const COMPOSER_STATUS_ROW_CENTERED_CLASS = "text-muted-foreground @container mt-1.5 grid grid-cols-[minmax(0,1fr)_auto_minmax(0,1fr)] items-center gap-2 px-1 text-xs";
|
|
81
|
+
/** The status row without a middle slot: a start cluster and an end slot. */
|
|
82
|
+
export declare const COMPOSER_STATUS_ROW_CLASS = "text-muted-foreground mt-1.5 flex items-center justify-between gap-2 px-1 text-xs";
|
|
@@ -73,4 +73,12 @@ const COMPOSER_SEND_BUTTON_CLASS = "bg-foreground text-background hover:bg-foreg
|
|
|
73
73
|
* the row stays subordinate to the box above it.
|
|
74
74
|
*/
|
|
75
75
|
const COMPOSER_PICKER_TRIGGER_CLASS = "text-muted-foreground hover:text-foreground hover:bg-accent inline-flex min-w-0 shrink items-center gap-1 rounded-md px-1.5 py-0.5 text-2xs";
|
|
76
|
-
|
|
76
|
+
/**
|
|
77
|
+
* The slim status row under a composer box (`ComposerStatusRow`), with a
|
|
78
|
+
* middle slot: three columns whose sides share the remaining width, so the
|
|
79
|
+
* middle stays centred. A loading view draws the row from the same class.
|
|
80
|
+
*/
|
|
81
|
+
const COMPOSER_STATUS_ROW_CENTERED_CLASS = "text-muted-foreground @container mt-1.5 grid grid-cols-[minmax(0,1fr)_auto_minmax(0,1fr)] items-center gap-2 px-1 text-xs";
|
|
82
|
+
/** The status row without a middle slot: a start cluster and an end slot. */
|
|
83
|
+
const COMPOSER_STATUS_ROW_CLASS = "text-muted-foreground mt-1.5 flex items-center justify-between gap-2 px-1 text-xs";
|
|
84
|
+
export { COMPOSER_BOX_ANONYMIZED_CLASS, COMPOSER_BOX_CLASS, COMPOSER_BOX_FOCUS_CLASS, COMPOSER_COMPACT_ROW_CLASS, COMPOSER_COMPACT_TEXT_CELL_CLASS, COMPOSER_CONTROL_BUTTON_SIZE, COMPOSER_LARGE_ACTION_ROW_CLASS, COMPOSER_LARGE_EDITOR_CLASS, COMPOSER_LARGE_TEXT_WELL_CLASS, COMPOSER_LEADING_GROUP_CLASS, COMPOSER_PICKER_TRIGGER_CLASS, COMPOSER_PLACEHOLDER_CLASS, COMPOSER_SEND_BUTTON_CLASS, COMPOSER_STATUS_ROW_CENTERED_CLASS, COMPOSER_STATUS_ROW_CLASS, COMPOSER_TEXT_CLASS };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { COMPOSER_BOX_ANONYMIZED_CLASS, COMPOSER_BOX_CLASS, COMPOSER_BOX_FOCUS_CLASS, COMPOSER_COMPACT_ROW_CLASS, COMPOSER_COMPACT_TEXT_CELL_CLASS, COMPOSER_CONTROL_BUTTON_SIZE, COMPOSER_LARGE_ACTION_ROW_CLASS, COMPOSER_LARGE_EDITOR_CLASS, COMPOSER_LARGE_TEXT_WELL_CLASS, COMPOSER_LEADING_GROUP_CLASS, COMPOSER_PICKER_TRIGGER_CLASS, COMPOSER_PLACEHOLDER_CLASS, COMPOSER_SEND_BUTTON_CLASS, COMPOSER_TEXT_CLASS } from "./composer-tokens.js";
|
|
1
|
+
import { COMPOSER_BOX_ANONYMIZED_CLASS, COMPOSER_BOX_CLASS, COMPOSER_BOX_FOCUS_CLASS, COMPOSER_COMPACT_ROW_CLASS, COMPOSER_COMPACT_TEXT_CELL_CLASS, COMPOSER_CONTROL_BUTTON_SIZE, COMPOSER_LARGE_ACTION_ROW_CLASS, COMPOSER_LARGE_EDITOR_CLASS, COMPOSER_LARGE_TEXT_WELL_CLASS, COMPOSER_LEADING_GROUP_CLASS, COMPOSER_PICKER_TRIGGER_CLASS, COMPOSER_PLACEHOLDER_CLASS, COMPOSER_SEND_BUTTON_CLASS, COMPOSER_STATUS_ROW_CENTERED_CLASS, COMPOSER_STATUS_ROW_CLASS, COMPOSER_TEXT_CLASS } from "./composer-tokens.js";
|
|
2
2
|
import { ReactNode } from "react";
|
|
3
3
|
/** Where the placeholder sits over the editor, in each stature. */
|
|
4
4
|
declare const COMPOSER_PLACEHOLDER_POSITION_CLASS: {
|
|
@@ -55,4 +55,4 @@ type ComposerPickerProps<Value extends string> = {
|
|
|
55
55
|
* kind of control.
|
|
56
56
|
*/
|
|
57
57
|
export declare const ComposerPicker: <Value extends string>({ ariaLabel, icon, onChange, options, value }: ComposerPickerProps<Value>) => import("react").JSX.Element;
|
|
58
|
-
export { COMPOSER_BOX_ANONYMIZED_CLASS, COMPOSER_BOX_CLASS, COMPOSER_BOX_FOCUS_CLASS, COMPOSER_COMPACT_ROW_CLASS, COMPOSER_COMPACT_TEXT_CELL_CLASS, COMPOSER_CONTROL_BUTTON_SIZE, COMPOSER_LARGE_ACTION_ROW_CLASS, COMPOSER_LARGE_EDITOR_CLASS, COMPOSER_LARGE_TEXT_WELL_CLASS, COMPOSER_LEADING_GROUP_CLASS, COMPOSER_PICKER_TRIGGER_CLASS, COMPOSER_PLACEHOLDER_CLASS, COMPOSER_SEND_BUTTON_CLASS, COMPOSER_TEXT_CLASS };
|
|
58
|
+
export { COMPOSER_BOX_ANONYMIZED_CLASS, COMPOSER_BOX_CLASS, COMPOSER_BOX_FOCUS_CLASS, COMPOSER_COMPACT_ROW_CLASS, COMPOSER_COMPACT_TEXT_CELL_CLASS, COMPOSER_CONTROL_BUTTON_SIZE, COMPOSER_LARGE_ACTION_ROW_CLASS, COMPOSER_LARGE_EDITOR_CLASS, COMPOSER_LARGE_TEXT_WELL_CLASS, COMPOSER_LEADING_GROUP_CLASS, COMPOSER_PICKER_TRIGGER_CLASS, COMPOSER_PLACEHOLDER_CLASS, COMPOSER_SEND_BUTTON_CLASS, COMPOSER_STATUS_ROW_CENTERED_CLASS, COMPOSER_STATUS_ROW_CLASS, COMPOSER_TEXT_CLASS };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { ChevronDownIcon } from "../icons.js";
|
|
3
3
|
import { cn } from "../lib/utils.js";
|
|
4
|
-
import { COMPOSER_BOX_ANONYMIZED_CLASS, COMPOSER_BOX_CLASS, COMPOSER_BOX_FOCUS_CLASS, COMPOSER_COMPACT_ROW_CLASS, COMPOSER_COMPACT_TEXT_CELL_CLASS, COMPOSER_CONTROL_BUTTON_SIZE, COMPOSER_LARGE_ACTION_ROW_CLASS, COMPOSER_LARGE_EDITOR_CLASS, COMPOSER_LARGE_TEXT_WELL_CLASS, COMPOSER_LEADING_GROUP_CLASS, COMPOSER_PICKER_TRIGGER_CLASS, COMPOSER_PLACEHOLDER_CLASS, COMPOSER_SEND_BUTTON_CLASS, COMPOSER_TEXT_CLASS } from "./composer-tokens.js";
|
|
4
|
+
import { COMPOSER_BOX_ANONYMIZED_CLASS, COMPOSER_BOX_CLASS, COMPOSER_BOX_FOCUS_CLASS, COMPOSER_COMPACT_ROW_CLASS, COMPOSER_COMPACT_TEXT_CELL_CLASS, COMPOSER_CONTROL_BUTTON_SIZE, COMPOSER_LARGE_ACTION_ROW_CLASS, COMPOSER_LARGE_EDITOR_CLASS, COMPOSER_LARGE_TEXT_WELL_CLASS, COMPOSER_LEADING_GROUP_CLASS, COMPOSER_PICKER_TRIGGER_CLASS, COMPOSER_PLACEHOLDER_CLASS, COMPOSER_SEND_BUTTON_CLASS, COMPOSER_STATUS_ROW_CENTERED_CLASS, COMPOSER_STATUS_ROW_CLASS, COMPOSER_TEXT_CLASS } from "./composer-tokens.js";
|
|
5
5
|
import { DropdownMenu as Menu, DropdownMenuContent as MenuPopup, DropdownMenuRadioGroup as MenuRadioGroup, DropdownMenuRadioItem as MenuRadioItem, DropdownMenuTrigger as MenuTrigger } from "./menu.js";
|
|
6
6
|
import { TruncatedText } from "./truncated-text.js";
|
|
7
7
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -30,7 +30,7 @@ const ComposerPlaceholder = ({ children, stature }) => /* @__PURE__ */ jsx(Trunc
|
|
|
30
30
|
const ComposerStatusRow = ({ start, end, center, className }) => {
|
|
31
31
|
if (start === void 0 && end === void 0 && center === void 0) return null;
|
|
32
32
|
if (center !== void 0) return /* @__PURE__ */ jsxs("div", {
|
|
33
|
-
className: cn(
|
|
33
|
+
className: cn(COMPOSER_STATUS_ROW_CENTERED_CLASS, className),
|
|
34
34
|
children: [
|
|
35
35
|
/* @__PURE__ */ jsx("div", {
|
|
36
36
|
className: "flex min-w-0 items-center",
|
|
@@ -47,7 +47,7 @@ const ComposerStatusRow = ({ start, end, center, className }) => {
|
|
|
47
47
|
]
|
|
48
48
|
});
|
|
49
49
|
return /* @__PURE__ */ jsxs("div", {
|
|
50
|
-
className: cn(
|
|
50
|
+
className: cn(COMPOSER_STATUS_ROW_CLASS, className),
|
|
51
51
|
children: [start, end !== void 0 && /* @__PURE__ */ jsx("div", {
|
|
52
52
|
className: "ms-auto",
|
|
53
53
|
children: end
|
|
@@ -92,4 +92,4 @@ const ComposerPicker = ({ ariaLabel, icon, onChange, options, value }) => {
|
|
|
92
92
|
})
|
|
93
93
|
})] });
|
|
94
94
|
};
|
|
95
|
-
export { COMPOSER_BOX_ANONYMIZED_CLASS, COMPOSER_BOX_CLASS, COMPOSER_BOX_FOCUS_CLASS, COMPOSER_COMPACT_ROW_CLASS, COMPOSER_COMPACT_TEXT_CELL_CLASS, COMPOSER_CONTROL_BUTTON_SIZE, COMPOSER_LARGE_ACTION_ROW_CLASS, COMPOSER_LARGE_EDITOR_CLASS, COMPOSER_LARGE_TEXT_WELL_CLASS, COMPOSER_LEADING_GROUP_CLASS, COMPOSER_PICKER_TRIGGER_CLASS, COMPOSER_PLACEHOLDER_CLASS, COMPOSER_SEND_BUTTON_CLASS, COMPOSER_TEXT_CLASS, ComposerPicker, ComposerPlaceholder, ComposerStatusRow };
|
|
95
|
+
export { COMPOSER_BOX_ANONYMIZED_CLASS, COMPOSER_BOX_CLASS, COMPOSER_BOX_FOCUS_CLASS, COMPOSER_COMPACT_ROW_CLASS, COMPOSER_COMPACT_TEXT_CELL_CLASS, COMPOSER_CONTROL_BUTTON_SIZE, COMPOSER_LARGE_ACTION_ROW_CLASS, COMPOSER_LARGE_EDITOR_CLASS, COMPOSER_LARGE_TEXT_WELL_CLASS, COMPOSER_LEADING_GROUP_CLASS, COMPOSER_PICKER_TRIGGER_CLASS, COMPOSER_PLACEHOLDER_CLASS, COMPOSER_SEND_BUTTON_CLASS, COMPOSER_STATUS_ROW_CENTERED_CLASS, COMPOSER_STATUS_ROW_CLASS, COMPOSER_TEXT_CLASS, ComposerPicker, ComposerPlaceholder, ComposerStatusRow };
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import { BUTTON_LAYOUT_CLASS_NAMES, ButtonFaceSize } from "./button-classes.js";
|
|
2
|
+
import { ButtonTokenVariant } from "./button.shared.js";
|
|
3
|
+
import { ComponentType, ReactNode } from "react";
|
|
4
|
+
import { ControlSize } from "../lib/control-size.js";
|
|
5
|
+
import { SegmentedIconToggleSize } from "./toggle-group-classes.js";
|
|
6
|
+
import { SwitchSize } from "./toggle-classes.js";
|
|
7
|
+
type ButtonFaceProps = {
|
|
8
|
+
children?: ReactNode;
|
|
9
|
+
className?: string | undefined;
|
|
10
|
+
layout?: keyof typeof BUTTON_LAYOUT_CLASS_NAMES;
|
|
11
|
+
size: ButtonFaceSize;
|
|
12
|
+
variant: ButtonTokenVariant;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* A button face's classes: the box, size and variant colours of the button
|
|
16
|
+
* it stands in for, unavailable. For the face of a button its caller
|
|
17
|
+
* restyles, on an element of that caller's own.
|
|
18
|
+
*/
|
|
19
|
+
export declare const buttonFaceClassName: ({ size, variant }: {
|
|
20
|
+
size: ButtonFaceSize;
|
|
21
|
+
variant: ButtonTokenVariant;
|
|
22
|
+
}) => string;
|
|
23
|
+
/** A button's face: its box, colours and content, disabled. */
|
|
24
|
+
export declare const ButtonFace: ({ children, className, layout, size, variant }: ButtonFaceProps) => import("react").JSX.Element;
|
|
25
|
+
/**
|
|
26
|
+
* A bar on the line of text that waits on data (a chip's current choice, a
|
|
27
|
+
* picker's selection, a message's line): one line box of the surrounding
|
|
28
|
+
* text, so the text that replaces it keeps the line's height.
|
|
29
|
+
*/
|
|
30
|
+
export declare const FaceLabelPending: ({ className }: {
|
|
31
|
+
/** The bar's width, roughly the label's. */
|
|
32
|
+
className?: string | undefined;
|
|
33
|
+
}) => import("react").JSX.Element;
|
|
34
|
+
type InputFaceProps = {
|
|
35
|
+
/** The glyph at the field's start (a search field's magnifier). */
|
|
36
|
+
icon?: ReactNode;
|
|
37
|
+
/** The placeholder line, as the field shows it while empty. */
|
|
38
|
+
children?: ReactNode;
|
|
39
|
+
className?: string | undefined;
|
|
40
|
+
size?: ControlSize;
|
|
41
|
+
/** Classes for the line the placeholder sits on (the field's own box). */
|
|
42
|
+
fieldClassName?: string | undefined;
|
|
43
|
+
};
|
|
44
|
+
/** A text field's face: its box and the placeholder. */
|
|
45
|
+
export declare const InputFace: ({ children, className, fieldClassName, icon, size }: InputFaceProps) => import("react").JSX.Element;
|
|
46
|
+
type SelectTriggerFaceProps = {
|
|
47
|
+
/** The chosen value's text, or a bar while it waits on data. */
|
|
48
|
+
children?: ReactNode;
|
|
49
|
+
className?: string | undefined;
|
|
50
|
+
size?: ControlSize;
|
|
51
|
+
};
|
|
52
|
+
/** A select trigger's face: its box, the chosen value and the chevrons. */
|
|
53
|
+
export declare const SelectTriggerFace: ({ children, className, size }: SelectTriggerFaceProps) => import("react").JSX.Element;
|
|
54
|
+
type SegmentedIconToggleFaceProps<T extends string> = {
|
|
55
|
+
options: readonly {
|
|
56
|
+
value: T;
|
|
57
|
+
icon: ComponentType<{
|
|
58
|
+
className?: string;
|
|
59
|
+
}>;
|
|
60
|
+
}[];
|
|
61
|
+
/** The chosen option, or none while the choice is not read yet. */
|
|
62
|
+
value?: T | undefined;
|
|
63
|
+
size?: SegmentedIconToggleSize;
|
|
64
|
+
};
|
|
65
|
+
/**
|
|
66
|
+
* A segmented icon toggle's face (./segmented-icon-toggle.tsx): the tray and
|
|
67
|
+
* its icon items, the chosen one raised as the toggle raises it.
|
|
68
|
+
*/
|
|
69
|
+
export declare const SegmentedIconToggleFace: <T extends string>({ options, size, value }: SegmentedIconToggleFaceProps<T>) => import("react").JSX.Element;
|
|
70
|
+
/**
|
|
71
|
+
* The face of a picker's trigger inside a form (a select, a combobox with
|
|
72
|
+
* `variant="field"`): the field box, the current choice, and the up-down
|
|
73
|
+
* chevron at the end.
|
|
74
|
+
*/
|
|
75
|
+
export declare const FieldTriggerFace: ({ children, className }: {
|
|
76
|
+
/** The current choice, or a bar while it waits on data. */
|
|
77
|
+
children?: ReactNode;
|
|
78
|
+
className?: string | undefined;
|
|
79
|
+
}) => import("react").JSX.Element;
|
|
80
|
+
/** A checkbox's face: its box, unticked (the value waits on data). */
|
|
81
|
+
export declare const CheckboxFace: ({ className }: {
|
|
82
|
+
className?: string | undefined;
|
|
83
|
+
}) => import("react").JSX.Element;
|
|
84
|
+
/** A switch's face: its track, off (the value waits on data). */
|
|
85
|
+
export declare const SwitchFace: ({ className, size }: {
|
|
86
|
+
className?: string | undefined;
|
|
87
|
+
size?: SwitchSize | undefined;
|
|
88
|
+
}) => import("react").JSX.Element;
|
|
89
|
+
/**
|
|
90
|
+
* A field's caption, as `Label` draws it (its `default` variant), for a
|
|
91
|
+
* label whose text a pending view renders itself (a bar until the app's
|
|
92
|
+
* messages are there).
|
|
93
|
+
*/
|
|
94
|
+
export declare const LabelFace: ({ children, className }: {
|
|
95
|
+
children: ReactNode;
|
|
96
|
+
className?: string | undefined;
|
|
97
|
+
}) => import("react").JSX.Element;
|
|
98
|
+
/**
|
|
99
|
+
* How a field's face lays out its parts, in `Form`'s names: `stack` puts the
|
|
100
|
+
* caption over the control over its lines (the field's column), `inline` a
|
|
101
|
+
* checkbox or switch beside its caption.
|
|
102
|
+
*/
|
|
103
|
+
type FieldFaceLayout = "stack" | "inline";
|
|
104
|
+
/**
|
|
105
|
+
* How close a field's face sets its parts: `snug` a step closer (a checkbox
|
|
106
|
+
* row over its line).
|
|
107
|
+
*/
|
|
108
|
+
type FieldFaceDensity = "default" | "snug";
|
|
109
|
+
/**
|
|
110
|
+
* A form field's face, as `Field` draws it: the caption, the control's face
|
|
111
|
+
* and the quiet lines a pending view puts in, in the field's own box.
|
|
112
|
+
*/
|
|
113
|
+
export declare const FieldFace: ({ children, className, density, layout }: {
|
|
114
|
+
children: ReactNode;
|
|
115
|
+
className?: string | undefined;
|
|
116
|
+
density?: FieldFaceDensity | undefined;
|
|
117
|
+
layout?: FieldFaceLayout | undefined;
|
|
118
|
+
}) => import("react").JSX.Element;
|
|
119
|
+
/** A field's quiet line, as `FieldDescription` draws it. */
|
|
120
|
+
export declare const FieldDescriptionFace: ({ children, className }: {
|
|
121
|
+
children: ReactNode;
|
|
122
|
+
className?: string | undefined;
|
|
123
|
+
}) => import("react").JSX.Element;
|
|
124
|
+
/**
|
|
125
|
+
* A `default` tab strip's face: the well, each tab's box and label, and the
|
|
126
|
+
* raised chip under the tab that opens first.
|
|
127
|
+
*/
|
|
128
|
+
export declare const TabsFace: ({ activeIndex, tabs }: {
|
|
129
|
+
/** The tabs in order, each with its label (or a bar). */
|
|
130
|
+
tabs: readonly {
|
|
131
|
+
key: string;
|
|
132
|
+
label: ReactNode;
|
|
133
|
+
}[];
|
|
134
|
+
/** Which tab is open when the strip mounts. */
|
|
135
|
+
activeIndex?: number | undefined;
|
|
136
|
+
}) => import("react").JSX.Element;
|
|
137
|
+
/** A split button's sizes (./split-button.tsx), one class set per part. */
|
|
138
|
+
export type SplitButtonSize = "sm" | "md";
|
|
139
|
+
/** The quiet chrome around both halves. */
|
|
140
|
+
export declare const SPLIT_BUTTON_ROOT_CLASS = "group/split hover:border-border focus-within:border-border has-[[data-popup-open]]:border-border inline-flex shrink-0 items-center rounded-lg border border-transparent p-0.5";
|
|
141
|
+
/** The primary half, over the `sm` ghost button it is built on. */
|
|
142
|
+
export declare const SPLIT_BUTTON_PRIMARY_CLASS: {
|
|
143
|
+
readonly md: "active:bg-accent/80 rounded-md [&_svg]:mx-0 [&_svg]:size-3.5 [&_svg:not([class*='size-'])]:size-3.5 sm:[&_svg:not([class*='size-'])]:size-3.5 h-8 ps-2 pe-0.5 sm:h-8 pointer-coarse:min-h-11 pointer-coarse:min-w-11";
|
|
144
|
+
readonly sm: "active:bg-accent/80 rounded-md [&_svg]:mx-0 [&_svg]:size-3.5 [&_svg:not([class*='size-'])]:size-3.5 sm:[&_svg:not([class*='size-'])]:size-3.5 h-7 ps-1.5 pe-0.5 sm:h-7 pointer-coarse:min-h-11 pointer-coarse:min-w-11";
|
|
145
|
+
};
|
|
146
|
+
/** The chevron half, over the `sm` ghost button it is built on. */
|
|
147
|
+
export declare const SPLIT_BUTTON_TRIGGER_CLASS: {
|
|
148
|
+
readonly md: "group-hover/split:bg-muted group-focus-within/split:bg-muted hover:bg-accent active:bg-accent/80 data-popup-open:bg-accent rounded-md [&_svg]:mx-0 h-8 w-4 px-0 sm:h-8 pointer-coarse:min-h-11 pointer-coarse:min-w-11";
|
|
149
|
+
readonly sm: "group-hover/split:bg-muted group-focus-within/split:bg-muted hover:bg-accent active:bg-accent/80 data-popup-open:bg-accent rounded-md [&_svg]:mx-0 h-7 w-3.5 px-0 sm:h-7 pointer-coarse:min-h-11 pointer-coarse:min-w-11";
|
|
150
|
+
};
|
|
151
|
+
/** The chevron that opens the secondary surface. */
|
|
152
|
+
export declare const SplitButtonChevron: () => import("react").JSX.Element;
|
|
153
|
+
/** A split button's face: both halves, the primary glyph, the chevron. */
|
|
154
|
+
export declare const SplitButtonFace: ({ children, size }: {
|
|
155
|
+
children: ReactNode;
|
|
156
|
+
size?: SplitButtonSize;
|
|
157
|
+
}) => import("react").JSX.Element;
|
|
158
|
+
export {};
|