burne-ui 1.6.6 → 1.6.7
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/composite/Accordion/Accordion.d.ts +1 -1
- package/dist/components/composite/Accordion/index.d.ts +1 -1
- package/dist/components/composite/AlertDialog/alertDialogStyles.d.ts +10 -6
- package/dist/components/composite/AlertDialog/alertDialogTypes.d.ts +5 -14
- package/dist/components/composite/ButtonGroup/ButtonGroup.d.ts +1 -1
- package/dist/components/composite/ButtonGroup/buttonGroupStyles.d.ts +2 -2
- package/dist/components/composite/ButtonGroup/index.d.ts +1 -1
- package/dist/components/composite/CheckboxGroup/checkboxGroupTypes.d.ts +1 -1
- package/dist/components/composite/Form/formTypes.d.ts +1 -1
- package/dist/components/composite/RadioGroup/radioGroupTypes.d.ts +1 -1
- package/dist/components/core/Alert/alertTypes.d.ts +1 -1
- package/dist/components/core/Alert/useAlertRootState.d.ts +2 -2
- package/dist/components/core/Button/buttonStyles.d.ts +1 -1
- package/dist/components/core/Button/buttonTypes.d.ts +1 -1
- package/dist/components/core/Button/useButtonRootState.d.ts +2 -2
- package/dist/components/core/Calendar/calendarParts.d.ts +2 -2
- package/dist/components/core/Calendar/calendarStyles.d.ts +2 -1
- package/dist/components/core/Calendar/index.d.ts +2 -2
- package/dist/components/core/Card/Card.d.ts +2 -1
- package/dist/components/core/Card/cardContext.d.ts +9 -2
- package/dist/components/core/Card/cardStyles.d.ts +15 -8
- package/dist/components/core/Card/cardTypes.d.ts +7 -2
- package/dist/components/core/Card/index.d.ts +2 -1
- package/dist/components/core/Card/useCardRootState.d.ts +2 -1
- package/dist/components/core/Checkbox/Checkbox.d.ts +1 -1
- package/dist/components/core/Checkbox/checkboxStyles.d.ts +1 -7
- package/dist/components/core/Checkbox/index.d.ts +1 -1
- package/dist/components/core/Checkbox/useCheckboxRootState.d.ts +1 -5
- package/dist/components/core/CloseButton/closeButtonTypes.d.ts +1 -1
- package/dist/components/core/CloseButton/useCloseButtonRootState.d.ts +2 -2
- package/dist/components/core/ColorPicker/colorPickerStyles.d.ts +3 -2
- package/dist/components/core/ColorPicker/colorSliderStyles.d.ts +2 -1
- package/dist/components/core/ColorPicker/colorUtils.d.ts +2 -0
- package/dist/components/core/ColorPicker/useColorPickerRootState.d.ts +6 -0
- package/dist/components/core/ComboBox/useComboBoxInputState.d.ts +1 -1
- package/dist/components/core/Dialog/dialogStyles.d.ts +11 -7
- package/dist/components/core/Dialog/dialogTypes.d.ts +4 -15
- package/dist/components/core/Disclosure/disclosureTypes.d.ts +1 -1
- package/dist/components/core/Drawer/Drawer.d.ts +2 -2
- package/dist/components/core/Drawer/drawerAPI.d.ts +2 -0
- package/dist/components/core/Drawer/drawerStyles.d.ts +13 -11
- package/dist/components/core/Drawer/drawerTypes.d.ts +12 -1
- package/dist/components/core/Drawer/index.d.ts +1 -1
- package/dist/components/core/Drawer/useDrawerRootState.d.ts +1 -1
- package/dist/components/core/Expandable/expandableTypes.d.ts +1 -1
- package/dist/components/core/Field/fieldContext.d.ts +1 -1
- package/dist/components/core/Field/fieldStyles.d.ts +1 -1
- package/dist/components/core/Field/fieldTypes.d.ts +1 -1
- package/dist/components/core/Input/inputTypes.d.ts +1 -1
- package/dist/components/core/Input/useInputRootState.d.ts +1 -1
- package/dist/components/core/Link/linkTypes.d.ts +1 -1
- package/dist/components/core/Link/useLinkRootState.d.ts +1 -1
- package/dist/components/core/ListBox/listBoxAPI.d.ts +5 -2
- package/dist/components/core/ListBox/listBoxParts.d.ts +1 -1
- package/dist/components/core/ListBox/listBoxStyles.d.ts +5 -2
- package/dist/components/core/ListBox/useListBoxItemState.d.ts +1 -0
- package/dist/components/core/Loading/loadingTypes.d.ts +1 -1
- package/dist/components/core/Pagination/paginationStyles.d.ts +5 -4
- package/dist/components/core/Popover/popoverStyles.d.ts +21 -14
- package/dist/components/core/Popover/popoverTypes.d.ts +3 -5
- package/dist/components/core/Radio/Radio.d.ts +1 -1
- package/dist/components/core/Radio/index.d.ts +1 -1
- package/dist/components/core/Radio/radioStyles.d.ts +1 -7
- package/dist/components/core/Radio/useRadioRootState.d.ts +1 -5
- package/dist/components/core/SearchInput/searchInputStyles.d.ts +1 -1
- package/dist/components/core/SearchInput/searchInputTypes.d.ts +1 -1
- package/dist/components/core/SearchInput/useSearchInputRootState.d.ts +1 -1
- package/dist/components/core/SelectionIndicator/index.d.ts +1 -1
- package/dist/components/core/SelectionIndicator/selectionIndicatorTokens.d.ts +9 -6
- package/dist/components/core/SelectionThumb/SelectionThumb.d.ts +2 -2
- package/dist/components/core/SelectionThumb/selectionThumbStyles.d.ts +5 -11
- package/dist/components/core/SelectionThumb/selectionThumbTypes.d.ts +0 -4
- package/dist/components/core/Slider/sliderStyles.d.ts +7 -5
- package/dist/components/core/Slider/sliderThumbParts.d.ts +1 -1
- package/dist/components/core/Slider/useSliderTrackState.d.ts +16 -16
- package/dist/components/core/Switch/Switch.d.ts +1 -1
- package/dist/components/core/Switch/index.d.ts +2 -2
- package/dist/components/core/Switch/switchAnimations.d.ts +1 -1
- package/dist/components/core/Switch/switchControlParts.d.ts +1 -1
- package/dist/components/core/Switch/switchGeometry.d.ts +3 -3
- package/dist/components/core/Switch/switchStyles.d.ts +3 -2
- package/dist/components/core/Switch/switchTypes.d.ts +0 -2
- package/dist/components/core/Switch/useSwitchRootState.d.ts +14 -14
- package/dist/components/core/Tabs/tabsTypes.d.ts +1 -1
- package/dist/components/core/TextArea/textAreaStyles.d.ts +4 -3
- package/dist/components/core/TextArea/textAreaTypes.d.ts +1 -1
- package/dist/components/core/TextArea/useTextAreaResize.d.ts +1 -1
- package/dist/components/core/TextArea/useTextAreaRootState.d.ts +1 -1
- package/dist/components/core/TimeField/timeFieldStyles.d.ts +4 -3
- package/dist/components/core/TimeField/timeFieldTypes.d.ts +1 -1
- package/dist/components/core/TimeField/useTimeFieldControlState.d.ts +1 -1
- package/dist/components/core/TimeField/useTimeFieldRootState.d.ts +1 -1
- package/dist/components/core/Toast/toastTypes.d.ts +1 -1
- package/dist/components/core/Toast/useToastProviderState.d.ts +1 -1
- package/dist/components/core/Toast/useToastRootState.d.ts +1 -1
- package/dist/components/core/ToggleButton/ToggleButton.d.ts +1 -1
- package/dist/components/core/ToggleButton/index.d.ts +1 -1
- package/dist/components/core/ToggleButton/toggleButtonStyles.d.ts +1 -1
- package/dist/components/core/ToggleButton/toggleButtonTypes.d.ts +1 -1
- package/dist/components/core/ToggleButton/useToggleButtonRootState.d.ts +1 -1
- package/dist/components/core/utils/controlHeightMeasure.d.ts +1 -1
- package/dist/components/core/utils/hoverInteractiveLift.d.ts +13 -6
- package/dist/components/core/utils/inputAffixLayout.d.ts +1 -1
- package/dist/components/core/utils/motionConfig.d.ts +1 -1
- package/dist/components/core/utils/optionListItemParts.d.ts +6 -2
- package/dist/components/core/utils/{messageBannerSize.d.ts → sizeLayout/banner.d.ts} +5 -3
- package/dist/components/core/utils/{componentSize.d.ts → sizeLayout/componentSize.d.ts} +1 -0
- package/dist/components/core/utils/{controlSizeLayout.d.ts → sizeLayout/control.d.ts} +3 -1
- package/dist/components/core/utils/sizeLayout/index.d.ts +14 -0
- package/dist/components/core/utils/sizeLayout/option.d.ts +15 -0
- package/dist/components/core/utils/sizeLayout/panel.d.ts +52 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +10571 -10331
- package/dist/internal.cjs +1 -1
- package/dist/internal.d.ts +2 -2
- package/dist/internal.js +28 -26
- package/dist/{themeRuntimeContext-cixzM5Ix.js → themeRuntimeContext-CE8HsqSx.js} +1355 -1334
- package/dist/themeRuntimeContext-zhfbKb8L.cjs +50 -0
- package/dist/tokens/breakpoints.d.ts +14 -0
- package/dist/tokens/config.d.ts +7 -1
- package/dist/tokens/index.d.ts +2 -1
- package/dist/ui.css +221 -85
- package/package.json +1 -1
- package/dist/themeRuntimeContext-DHGARM65.cjs +0 -50
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
+
import { ButtonSize } from '../Button/buttonTypes';
|
|
2
3
|
import { GsapMotionVars } from '../utils/modalSurfaceMotion';
|
|
3
4
|
import { DrawerPanelSegment, DrawerPlacement } from './drawerTypes';
|
|
4
5
|
export declare function readDrawerPartDisplayName(type: unknown): string | undefined;
|
|
6
|
+
export declare function injectFooterButtonSize(children: ReactNode, buttonSize: ButtonSize): ReactNode;
|
|
5
7
|
export declare function partitionDrawerChildren(children: ReactNode): {
|
|
6
8
|
backdropIsDismissable: boolean;
|
|
7
9
|
panelSegments: DrawerPanelSegment[];
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ButtonSize } from '../Button/buttonTypes';
|
|
2
|
+
import { DrawerExtent, DrawerPlacement, DrawerSize, DrawerSizePreset, DrawerVariant } from './drawerTypes';
|
|
2
3
|
export declare const HANDLE_EDGE_PADDING_CLASS: Record<DrawerPlacement, string>;
|
|
3
|
-
export declare const
|
|
4
|
-
export declare const
|
|
5
|
-
export declare const DRAWER_BODY_PADDING = "px-large py-base";
|
|
6
|
-
export declare const DRAWER_FOOTER_PADDING = "px-large pb-mid";
|
|
4
|
+
export declare const DRAWER_SIZE: Record<DrawerSize, DrawerSizePreset>;
|
|
5
|
+
export declare const DRAWER_CONTENT_CLASS = "flex min-h-0 flex-1 flex-col text-left";
|
|
7
6
|
export declare const DRAWER_NATIVE_CLASS = "m-0 h-full w-full max-h-none max-w-none border-0 bg-transparent p-0 open:block [&::backdrop]:bg-transparent";
|
|
8
7
|
export declare const DRAWER_NATIVE_POSITION_FIXED_CLASS = "fixed inset-0 z-dialog";
|
|
9
8
|
export declare const DRAWER_NATIVE_POSITION_CONTAINED_CLASS = "absolute inset-0 z-dialog";
|
|
@@ -14,10 +13,9 @@ export declare const DRAWER_PANEL_BASE_CLASS = "absolute z-10 flex flex-col outl
|
|
|
14
13
|
export declare const DRAWER_PANEL_SURFACE_CLASS = "border-token bg-surface text-foreground shadow-token-large";
|
|
15
14
|
export declare const DRAWER_GLOSS_PANEL_CLASS = "gloss-panel gloss-deep flex min-h-0 flex-1 flex-col text-foreground";
|
|
16
15
|
export declare const DRAWER_GLOSS_CONTENT_WRAP_CLASS = "gloss-content flex min-h-0 min-w-0 flex-1 flex-col";
|
|
17
|
-
export declare const DRAWER_HEADER_CLASS = "flex shrink-0 items-start
|
|
18
|
-
export declare const DRAWER_HEADING_BLOCK_CLASS = "flex min-w-0 flex-1 flex-col
|
|
16
|
+
export declare const DRAWER_HEADER_CLASS = "flex shrink-0 items-start text-left";
|
|
17
|
+
export declare const DRAWER_HEADING_BLOCK_CLASS = "flex min-w-0 flex-1 flex-col text-left";
|
|
19
18
|
export declare const DRAWER_TITLE_CLASS = "min-w-0";
|
|
20
|
-
export declare const DRAWER_DESCRIPTION_CLASS = "text-muted";
|
|
21
19
|
export declare const DRAWER_BODY_BASE_CLASS = "min-h-0 flex-1 overflow-y-auto";
|
|
22
20
|
export declare const DRAWER_FOOTER_CLASS = "flex shrink-0 flex-wrap items-center justify-end gap-base";
|
|
23
21
|
export declare const DRAWER_CLOSE_CLASS = "shrink-0";
|
|
@@ -34,21 +32,23 @@ export declare function drawerOverlayClass({ lightUi, dismissable, slotClass, }:
|
|
|
34
32
|
dismissable: boolean;
|
|
35
33
|
slotClass?: string;
|
|
36
34
|
}): string;
|
|
37
|
-
export declare function drawerPanelClass({ variant, placement, extent, className, slotClass, }: {
|
|
35
|
+
export declare function drawerPanelClass({ variant, placement, extent, size, className, slotClass, }: {
|
|
38
36
|
variant: DrawerVariant;
|
|
39
37
|
placement: DrawerPlacement;
|
|
40
38
|
extent: DrawerExtent;
|
|
39
|
+
size: DrawerSize;
|
|
41
40
|
className?: string;
|
|
42
41
|
slotClass?: string;
|
|
43
42
|
}): string;
|
|
44
|
-
export declare function drawerGlossPanelClass({ placement, extent, slotClass, }: {
|
|
43
|
+
export declare function drawerGlossPanelClass({ placement, extent, size, slotClass, }: {
|
|
45
44
|
placement: DrawerPlacement;
|
|
46
45
|
extent: DrawerExtent;
|
|
46
|
+
size: DrawerSize;
|
|
47
47
|
slotClass?: string;
|
|
48
48
|
}): string;
|
|
49
49
|
export declare function drawerContentClass(slotClass?: string): string;
|
|
50
50
|
export declare function drawerGlossContentWrapClass(slotClass?: string): string;
|
|
51
|
-
export declare function drawerBodyClass(slotClass?: string): string;
|
|
51
|
+
export declare function drawerBodyClass(bodyPadding: string, slotClass?: string): string;
|
|
52
52
|
export declare function drawerHandleClass({ placement, slotClass, className, }: {
|
|
53
53
|
placement: DrawerPlacement;
|
|
54
54
|
slotClass?: string;
|
|
@@ -58,3 +58,5 @@ export declare function drawerHandleGripClass({ placement, slotClass, }: {
|
|
|
58
58
|
placement: DrawerPlacement;
|
|
59
59
|
slotClass?: string;
|
|
60
60
|
}): string;
|
|
61
|
+
export declare function footerButtonSizeForDrawer(drawerSize: DrawerSize): ButtonSize;
|
|
62
|
+
export declare function closeButtonSizeForDrawer(drawerSize: DrawerSize): ButtonSize;
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
import { ButtonHTMLAttributes, HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
import { ButtonSize } from '../Button';
|
|
2
3
|
import { CloseButtonProps } from '../CloseButton';
|
|
4
|
+
import { PanelSize, PanelSizeLayout } from '../utils/sizeLayout';
|
|
3
5
|
export type DrawerPlacement = "left" | "right" | "top" | "bottom";
|
|
6
|
+
/** Viewport extent of the panel (orthogonal to chrome `size`). */
|
|
4
7
|
export type DrawerExtent = "default" | "mid" | "full";
|
|
5
8
|
export type DrawerVariant = "default" | "gloss";
|
|
9
|
+
export type DrawerSize = PanelSize;
|
|
10
|
+
/** Chrome tokens from shared `PANEL_SIZE_LAYOUT` (Drawer slice). */
|
|
11
|
+
export type DrawerSizePreset = Pick<PanelSizeLayout, "rounded" | "headerGap" | "headerPadding" | "bodyPadding" | "footerPadding" | "headingGap" | "titleVariant" | "descVariant" | "descClassName" | "bodyVariant" | "footerButtonSize" | "closeButtonSize">;
|
|
6
12
|
export type DrawerClassNames = {
|
|
7
13
|
trigger?: string;
|
|
8
14
|
dialog?: string;
|
|
@@ -27,6 +33,8 @@ export type DrawerProps = {
|
|
|
27
33
|
onOpenChange?: (open: boolean) => void;
|
|
28
34
|
/** Slide direction (structural, used in context). */
|
|
29
35
|
placement?: DrawerPlacement;
|
|
36
|
+
/** Chrome density — padding, type, close/footer button sizes (`PANEL_SIZE_LAYOUT`). */
|
|
37
|
+
size?: DrawerSize;
|
|
30
38
|
children?: ReactNode;
|
|
31
39
|
/** DOM node for the portal. Default: `document.body`. */
|
|
32
40
|
portalContainer?: HTMLElement | null;
|
|
@@ -55,6 +63,9 @@ export type DrawerContextValue = {
|
|
|
55
63
|
setHasDescription: (value: boolean) => void;
|
|
56
64
|
onOpenChange: (open: boolean) => void;
|
|
57
65
|
placement: DrawerPlacement;
|
|
66
|
+
size: DrawerSize;
|
|
67
|
+
sizePreset: DrawerSizePreset;
|
|
68
|
+
footerButtonSize: ButtonSize;
|
|
58
69
|
overlayRef: React.RefObject<HTMLDivElement | null>;
|
|
59
70
|
panelRef: React.RefObject<HTMLDivElement | null>;
|
|
60
71
|
skipCloseAnimRef: React.RefObject<boolean>;
|
|
@@ -85,7 +96,7 @@ export type DrawerPanelSegment = {
|
|
|
85
96
|
kind: "content";
|
|
86
97
|
children: ReactNode[];
|
|
87
98
|
};
|
|
88
|
-
export type UseDrawerRootStateProps = Pick<DrawerProps, "open" | "defaultOpen" | "onOpenChange" | "portalContainer">;
|
|
99
|
+
export type UseDrawerRootStateProps = Pick<DrawerProps, "open" | "defaultOpen" | "onOpenChange" | "size" | "portalContainer">;
|
|
89
100
|
export type UseDrawerPanelStateProps = {
|
|
90
101
|
open: boolean;
|
|
91
102
|
themeAnchor: HTMLElement | null | undefined;
|
|
@@ -27,4 +27,4 @@ export declare const Drawer: typeof DrawerRoot & {
|
|
|
27
27
|
Body: import('react').ForwardRefExoticComponent<import('./drawerTypes').DrawerBodyProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
28
28
|
Footer: import('react').ForwardRefExoticComponent<import('./drawerTypes').DrawerFooterProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
29
29
|
};
|
|
30
|
-
export type { DrawerProps, DrawerPanelProps, DrawerTriggerProps, DrawerPlacement, DrawerExtent, DrawerVariant, DrawerClassNames, DrawerBackdropProps, DrawerHandleProps, DrawerHeaderProps, DrawerHeadingBlockProps, DrawerTitleProps, DrawerDescriptionProps, DrawerBodyProps, DrawerFooterProps, DrawerCloseProps, DrawerContentProps, } from './drawerTypes';
|
|
30
|
+
export type { DrawerProps, DrawerPanelProps, DrawerTriggerProps, DrawerPlacement, DrawerExtent, DrawerSize, DrawerVariant, DrawerClassNames, DrawerBackdropProps, DrawerHandleProps, DrawerHeaderProps, DrawerHeadingBlockProps, DrawerTitleProps, DrawerDescriptionProps, DrawerBodyProps, DrawerFooterProps, DrawerCloseProps, DrawerContentProps, } from './drawerTypes';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DrawerContextValue, DrawerPlacement, UseDrawerRootStateProps } from './drawerTypes';
|
|
2
|
-
export declare function useDrawerRootState({ open: openProp, defaultOpen, onOpenChange, placement, portalContainer, }: UseDrawerRootStateProps & {
|
|
2
|
+
export declare function useDrawerRootState({ open: openProp, defaultOpen, onOpenChange, placement, size, portalContainer, }: UseDrawerRootStateProps & {
|
|
3
3
|
placement?: DrawerPlacement;
|
|
4
4
|
}): {
|
|
5
5
|
contextValue: DrawerContextValue;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ButtonHTMLAttributes, HTMLAttributes, ReactNode, Ref } from 'react';
|
|
2
|
-
import { ComponentSize } from '../utils/
|
|
2
|
+
import { ComponentSize } from '../utils/sizeLayout';
|
|
3
3
|
export type ExpandableSize = ComponentSize;
|
|
4
4
|
export type ExpandableVariant = "default" | "gloss";
|
|
5
5
|
export type ExpandableClassNames = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { ComponentSize } from '../utils/
|
|
2
|
+
import { ComponentSize } from '../utils/sizeLayout';
|
|
3
3
|
import { FieldClassNames, FieldClassNamesProviderProps, FieldSetClassNames, FieldSetClassNamesProviderProps } from './fieldTypes';
|
|
4
4
|
export declare function FieldClassNamesProvider({ classNames, children, }: FieldClassNamesProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
export declare function useFieldClassNames(): FieldClassNames;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FieldsetHTMLAttributes, HTMLAttributes, ReactNode } from 'react';
|
|
2
2
|
import { LabelProps } from '../Label';
|
|
3
3
|
import { TextVariant } from '../Text';
|
|
4
|
-
import { ComponentSize } from '../utils/
|
|
4
|
+
import { ComponentSize } from '../utils/sizeLayout';
|
|
5
5
|
import { SemanticStatus } from '../utils/semanticStatusIcons';
|
|
6
6
|
export type FieldHintStatus = SemanticStatus;
|
|
7
7
|
export type FieldSetSize = ComponentSize;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HTMLAttributes, InputHTMLAttributes, PointerEventHandler, ReactNode } from 'react';
|
|
2
2
|
import { ButtonGroupSegment } from '../../composite/ButtonGroup/buttonGroupTypes';
|
|
3
|
-
import { ComponentSize } from '../utils/
|
|
3
|
+
import { ComponentSize } from '../utils/sizeLayout';
|
|
4
4
|
import { SemanticStatus } from '../utils/semanticStatusIcons';
|
|
5
5
|
export type InputVariant = "default" | "outline" | "secondary" | "gloss";
|
|
6
6
|
export type InputStatus = SemanticStatus;
|
|
@@ -12,5 +12,5 @@ export declare function useInputRootState({ children, label, hint, error, id: id
|
|
|
12
12
|
hint: import('react').ReactNode;
|
|
13
13
|
error: import('react').ReactNode;
|
|
14
14
|
status: import('../utils/semanticStatusIcons').SemanticStatus;
|
|
15
|
-
size: import('../utils/
|
|
15
|
+
size: import('../utils/sizeLayout').ComponentSize;
|
|
16
16
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AnchorHTMLAttributes, ForwardedRef, PointerEvent, ReactNode } from 'react';
|
|
2
|
-
import { ComponentSize } from '../utils/
|
|
2
|
+
import { ComponentSize } from '../utils/sizeLayout';
|
|
3
3
|
import { IconPosition } from '../utils/iconPosition';
|
|
4
4
|
export type LinkSize = ComponentSize;
|
|
5
5
|
export type LinkIconPosition = IconPosition;
|
|
@@ -7,7 +7,7 @@ export declare function useLinkRootState({ size, underline, icon, iconPosition,
|
|
|
7
7
|
endIconMuted: boolean;
|
|
8
8
|
usesDefaultAtStart: boolean;
|
|
9
9
|
usesDefaultAtEnd: boolean;
|
|
10
|
-
size: import('../utils/
|
|
10
|
+
size: import('../utils/sizeLayout').ComponentSize;
|
|
11
11
|
underline: boolean;
|
|
12
12
|
textVariant: import('../Text').TextVariant;
|
|
13
13
|
};
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { SelectionIndicatorClassNames } from '../SelectionIndicator';
|
|
3
|
-
import { ListBoxClassNames, ListBoxItemIndicatorClassNames, UseListBoxItemStateProps } from './listBoxTypes';
|
|
2
|
+
import { SelectionIndicatorClassNames, SelectionIndicatorSize } from '../SelectionIndicator';
|
|
3
|
+
import { ListBoxClassNames, ListBoxItemIndicatorClassNames, ListBoxSize, UseListBoxItemStateProps } from './listBoxTypes';
|
|
4
|
+
/** List size → indicator: one step smaller than the list (dense menus). */
|
|
5
|
+
export declare const LISTBOX_INDICATOR_SIZE: Record<ListBoxSize, SelectionIndicatorSize>;
|
|
6
|
+
export declare function resolveListBoxIndicatorSize(listSize: ListBoxSize, sizeProp?: SelectionIndicatorSize): SelectionIndicatorSize;
|
|
4
7
|
export declare function resolveListBoxItemIndicatorClassNames({ slotClassNames, classNames, }: {
|
|
5
8
|
slotClassNames: ListBoxClassNames;
|
|
6
9
|
classNames?: ListBoxItemIndicatorClassNames;
|
|
@@ -38,7 +38,7 @@ export declare function ListBoxIcon({ className, ...props }: ListBoxIconProps):
|
|
|
38
38
|
export declare namespace ListBoxIcon {
|
|
39
39
|
var displayName: string;
|
|
40
40
|
}
|
|
41
|
-
export declare function ListBoxItemIndicator({ variant, size, check, children, className, classNames: classNamesProp, ...rest }: ListBoxItemIndicatorProps): import("react/jsx-runtime").JSX.Element | null;
|
|
41
|
+
export declare function ListBoxItemIndicator({ variant, size: sizeProp, check, children, className, classNames: classNamesProp, ...rest }: ListBoxItemIndicatorProps): import("react/jsx-runtime").JSX.Element | null;
|
|
42
42
|
export declare namespace ListBoxItemIndicator {
|
|
43
43
|
var displayName: string;
|
|
44
44
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ListBoxSize } from './listBoxTypes';
|
|
1
2
|
export declare const LISTBOX_ROOT_CLASS = "flex min-h-0 flex-col gap-xsmall text-left outline-none";
|
|
2
3
|
export declare const LISTBOX_ROOT_GLOSS_CLASS = "gloss-panel gloss-deep rounded-mid p-mid text-foreground";
|
|
3
4
|
export declare const LISTBOX_SECTION_CLASS = "flex min-w-0 flex-col gap-xsmall";
|
|
@@ -5,7 +6,8 @@ export declare const LISTBOX_HEADER_CLASS = "px-mid text-left";
|
|
|
5
6
|
export declare const LISTBOX_HEADER_TEXT_CLASS = "text-muted";
|
|
6
7
|
export declare const LISTBOX_SEPARATOR_CLASS = "my-xsmall h-0 w-full shrink-0 border-t-token";
|
|
7
8
|
export declare const LISTBOX_EMPTY_CLASS = "px-large py-small text-center text-muted";
|
|
8
|
-
export declare const LISTBOX_ITEM_BASE_CLASS = "w-full min-w-0 rounded-mid
|
|
9
|
+
export declare const LISTBOX_ITEM_BASE_CLASS = "w-full min-w-0 rounded-mid text-left outline-none";
|
|
10
|
+
export declare const LISTBOX_ITEM_PAD: Record<ListBoxSize, string>;
|
|
9
11
|
export declare const LISTBOX_ITEM_INTERACTIVE_CLASS = "cursor-pointer text-foreground focus-ring";
|
|
10
12
|
export declare const LISTBOX_ITEM_DISABLED_CLASS = "cursor-not-allowed bg-transparent text-muted opacity-45";
|
|
11
13
|
export declare const LISTBOX_ITEM_ACTIVE_CLASS = "bg-default-hover";
|
|
@@ -34,7 +36,8 @@ export declare function listBoxEmptyClass({ slotClass, className, }: {
|
|
|
34
36
|
slotClass?: string;
|
|
35
37
|
className?: string;
|
|
36
38
|
}): string;
|
|
37
|
-
export declare function listBoxItemClass({ disabled, isActive, slotClass, className, }: {
|
|
39
|
+
export declare function listBoxItemClass({ size, disabled, isActive, slotClass, className, }: {
|
|
40
|
+
size: ListBoxSize;
|
|
38
41
|
disabled: boolean;
|
|
39
42
|
isActive: boolean;
|
|
40
43
|
slotClass?: string;
|
|
@@ -7,6 +7,7 @@ export declare function useListBoxItemState({ children, label, hint, icon, value
|
|
|
7
7
|
isCompound: boolean;
|
|
8
8
|
hasLabel: boolean;
|
|
9
9
|
showIndicatorSlot: boolean;
|
|
10
|
+
size: import('./listBoxTypes').ListBoxSize;
|
|
10
11
|
disabled: boolean;
|
|
11
12
|
isSelected: boolean;
|
|
12
13
|
isActive: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
|
-
import { ComponentSize } from '../utils/
|
|
2
|
+
import { ComponentSize } from '../utils/sizeLayout';
|
|
3
3
|
export type LoadingSize = ComponentSize;
|
|
4
4
|
export type LoadingType = "spinner" | "dots";
|
|
5
5
|
export type LoadingColor = "primary" | "foreground" | "muted" | "secondary" | "danger" | "success" | "info" | "warning";
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
export declare const PAGINATION_ROOT_CLASS = "flex w-full min-w-0 flex-wrap items-center justify-between gap-xsmall gap-y-xsmall text-left";
|
|
2
|
-
export declare const PAGINATION_SUMMARY_CLASS = "flex min-w-0 flex-1 basis-
|
|
2
|
+
export declare const PAGINATION_SUMMARY_CLASS = "flex min-w-0 flex-1 basis-component-xsmall";
|
|
3
3
|
export declare const PAGINATION_SUMMARY_TEXT_CLASS = "min-w-0 truncate text-muted";
|
|
4
4
|
export declare const PAGINATION_CONTENT_CLASS = "m-0 ms-auto flex max-w-full min-w-0 list-none flex-wrap items-center justify-start gap-xsmall p-0";
|
|
5
5
|
export declare const PAGINATION_ITEM_CLASS = "flex shrink-0 items-center";
|
|
6
6
|
export declare const PAGINATION_INTERACTIVE_BUTTON_CLASS = "inline-flex min-w-0 origin-center cursor-pointer items-center justify-center gap-xsmall rounded-mid border-0 bg-transparent px-xsmall py-xsmall font-[inherit] text-muted no-underline outline-none hover:text-foreground focus-ring disabled:cursor-not-allowed disabled:opacity-48 disabled:hover:text-muted disabled:hover:bg-transparent motion-reduce:animate-none";
|
|
7
|
-
|
|
8
|
-
export declare const
|
|
9
|
-
export declare const
|
|
7
|
+
/** Page digit column — `--size-scale-2xlarge` (≈1.75rem), not panel max-width. */
|
|
8
|
+
export declare const PAGINATION_PAGE_ACTIVE_CLASS = "inline-flex min-w-[length:var(--size-scale-2xlarge)] items-center justify-center px-xsmall py-xsmall font-w-mid text-foreground tabular-nums text-base";
|
|
9
|
+
export declare const PAGINATION_PAGE_TEXT_CLASS = "min-w-[length:var(--size-scale-2xlarge)] tabular-nums";
|
|
10
|
+
export declare const PAGINATION_ELLIPSIS_CLASS = "inline-flex min-w-[length:var(--size-scale-2xlarge)] items-center justify-center px-xsmall py-xsmall text-muted tabular-nums";
|
|
10
11
|
export declare const PAGINATION_NAV_TEXT_CLASS = "";
|
|
11
12
|
export declare const PAGINATION_PREVIOUS_ICON_CLASS = "shrink-0 icon-small opacity-75";
|
|
12
13
|
export declare const PAGINATION_NEXT_ICON_CLASS = "shrink-0 icon-small opacity-75";
|
|
@@ -1,23 +1,21 @@
|
|
|
1
1
|
import { TextVariant } from '../Text';
|
|
2
|
-
import { PopoverContentGap,
|
|
2
|
+
import { PopoverContentGap, PopoverSide, PopoverSize } from './popoverTypes';
|
|
3
3
|
export declare const POPOVER_DEFAULT_OFFSET = 6;
|
|
4
|
-
|
|
5
|
-
export declare const
|
|
6
|
-
|
|
7
|
-
export declare const
|
|
8
|
-
export declare const POPOVER_PADDING_CLASS: Record<PopoverSize, string>;
|
|
4
|
+
/** Popover title scale — lighter than Dialog `titleVariant` (compact overlay). */
|
|
5
|
+
export declare const POPOVER_TITLE_VARIANT: Record<PopoverSize, TextVariant>;
|
|
6
|
+
/** Description one step below title so header hierarchy stays readable. */
|
|
7
|
+
export declare const POPOVER_DESCRIPTION_VARIANT: Record<PopoverSize, TextVariant>;
|
|
9
8
|
export declare const POPOVER_GAP_CLASS: Record<PopoverContentGap, string>;
|
|
10
|
-
export declare const POPOVER_DEFAULT_GAP: Record<PopoverSize, PopoverContentGap>;
|
|
11
9
|
export declare const POPOVER_TRIGGER_CLASS = "inline-flex shrink-0 border-0 bg-transparent p-0 outline-none focus-ring";
|
|
12
10
|
export declare const POPOVER_CONTENT_CLASS = "pointer-events-auto z-popover w-max min-w-0 overflow-visible text-left outline-none will-change-transform";
|
|
13
11
|
export declare const POPOVER_PANEL_RELATIVE_CLASS = "relative overflow-visible";
|
|
14
|
-
export declare const POPOVER_GLOSS_PANEL_CLASS = "gloss-panel gloss-deep relative z-[1] flex min-w-0 origin-center flex-col overflow-hidden
|
|
12
|
+
export declare const POPOVER_GLOSS_PANEL_CLASS = "gloss-panel gloss-deep relative z-[1] flex min-w-0 origin-center flex-col overflow-hidden text-foreground";
|
|
15
13
|
export declare const POPOVER_GLOSS_CONTENT_CLASS = "gloss-content flex min-w-0 flex-col";
|
|
16
|
-
export declare const POPOVER_DEFAULT_PANEL_CLASS = "relative z-[1] flex min-w-0 flex-col overflow-hidden
|
|
14
|
+
export declare const POPOVER_DEFAULT_PANEL_CLASS = "relative z-[1] flex min-w-0 flex-col overflow-hidden border-token bg-surface text-foreground animate-shadow";
|
|
17
15
|
export declare const POPOVER_ARROW_BASE_CLASS = "pointer-events-none absolute z-0 size-2 rotate-45";
|
|
18
16
|
export declare const POPOVER_ARROW_GLOSS_CLASS = "border-0 bg-[var(--color-surface)]";
|
|
19
17
|
export declare const POPOVER_ARROW_DEFAULT_CLASS = "border-token bg-surface";
|
|
20
|
-
export declare const POPOVER_HEADER_CLASS = "flex shrink-0 flex-col
|
|
18
|
+
export declare const POPOVER_HEADER_CLASS = "flex shrink-0 flex-col text-left";
|
|
21
19
|
export declare const POPOVER_LABEL_CLASS = "min-w-0 font-w-mid";
|
|
22
20
|
export declare const POPOVER_BODY_CLASS = "min-h-0 min-w-0 text-left";
|
|
23
21
|
export declare function popoverTriggerClass({ rootSlot, slotClass, className, }: {
|
|
@@ -31,17 +29,23 @@ export declare function popoverContentClass({ resolvedSide, showArrow, slotClass
|
|
|
31
29
|
slotClass?: string;
|
|
32
30
|
className?: string;
|
|
33
31
|
}): string;
|
|
34
|
-
export declare function popoverGlossPanelClass({ size, unstyled,
|
|
32
|
+
export declare function popoverGlossPanelClass({ size, unstyled, slotClass, }: {
|
|
33
|
+
size: PopoverSize;
|
|
34
|
+
unstyled: boolean;
|
|
35
|
+
slotClass?: string;
|
|
36
|
+
}): string;
|
|
37
|
+
export declare function popoverGlossContentClass({ size, unstyled, contentGap, gapPropSet, slotClass, }: {
|
|
35
38
|
size: PopoverSize;
|
|
36
39
|
unstyled: boolean;
|
|
37
40
|
contentGap: PopoverContentGap;
|
|
41
|
+
gapPropSet: boolean;
|
|
38
42
|
slotClass?: string;
|
|
39
43
|
}): string;
|
|
40
|
-
export declare function
|
|
41
|
-
export declare function popoverDefaultPanelClass({ size, unstyled, contentGap, slotClass, }: {
|
|
44
|
+
export declare function popoverDefaultPanelClass({ size, unstyled, contentGap, gapPropSet, slotClass, }: {
|
|
42
45
|
size: PopoverSize;
|
|
43
46
|
unstyled: boolean;
|
|
44
47
|
contentGap: PopoverContentGap;
|
|
48
|
+
gapPropSet: boolean;
|
|
45
49
|
slotClass?: string;
|
|
46
50
|
}): string;
|
|
47
51
|
export declare function popoverArrowClass({ isGloss, arrowSideClass, slotClass, className, }: {
|
|
@@ -51,7 +55,8 @@ export declare function popoverArrowClass({ isGloss, arrowSideClass, slotClass,
|
|
|
51
55
|
slotClass?: string;
|
|
52
56
|
className?: string;
|
|
53
57
|
}): string;
|
|
54
|
-
export declare function popoverHeaderClass({ slotClass, className, }: {
|
|
58
|
+
export declare function popoverHeaderClass({ size, slotClass, className, }: {
|
|
59
|
+
size: PopoverSize;
|
|
55
60
|
slotClass?: string;
|
|
56
61
|
className?: string;
|
|
57
62
|
}): string;
|
|
@@ -65,3 +70,5 @@ export declare function popoverBodyClass({ slotClass, className, }: {
|
|
|
65
70
|
}): string;
|
|
66
71
|
export declare function popoverTitleVariant(size: PopoverSize): TextVariant;
|
|
67
72
|
export declare function popoverDescriptionVariant(size: PopoverSize): TextVariant;
|
|
73
|
+
/** Default content gap matches panel size step (`small`→`large`). */
|
|
74
|
+
export declare function popoverDefaultContentGap(size: PopoverSize): PopoverContentGap;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { FieldHintProps } from '../Field';
|
|
2
|
-
import { TextVariant } from '../Text';
|
|
3
2
|
import { FloatingAlign, TooltipSide } from '../Tooltip/tooltipPosition';
|
|
3
|
+
import { PanelSize } from '../utils/sizeLayout';
|
|
4
4
|
import { HTMLAttributes, ReactNode, RefObject } from 'react';
|
|
5
5
|
export type PopoverSide = TooltipSide;
|
|
6
|
-
export type PopoverSize =
|
|
6
|
+
export type PopoverSize = PanelSize;
|
|
7
7
|
export type PopoverVariant = "default" | "gloss";
|
|
8
|
-
export type PopoverContentGap =
|
|
8
|
+
export type PopoverContentGap = PanelSize;
|
|
9
9
|
export type PopoverClassNames = {
|
|
10
10
|
root?: string;
|
|
11
11
|
trigger?: string;
|
|
@@ -77,8 +77,6 @@ export type PopoverContentProps = HTMLAttributes<HTMLDivElement> & {
|
|
|
77
77
|
/** Overrides Root `portalContainer`. Default: `document.body`. */
|
|
78
78
|
portalContainer?: HTMLElement | null;
|
|
79
79
|
};
|
|
80
|
-
export type PopoverTitleVariantMap = Record<PopoverSize, TextVariant>;
|
|
81
|
-
export type PopoverDescriptionVariantMap = Record<PopoverSize, TextVariant>;
|
|
82
80
|
export type UsePopoverContentLifecycleProps = {
|
|
83
81
|
open: boolean;
|
|
84
82
|
side: PopoverSide;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export type { RadioProps, RadioControlProps, RadioIndicatorProps, RadioContentProps, RadioLabelProps, RadioHintProps, RadioErrorProps, RadioSize, RadioVariant, RadioClassNames, } from './radioTypes';
|
|
2
|
-
export declare const RadioRoot: import('react').ForwardRefExoticComponent<Omit<import('react').LabelHTMLAttributes<HTMLLabelElement>, "children" | "
|
|
2
|
+
export declare const RadioRoot: import('react').ForwardRefExoticComponent<Omit<import('react').LabelHTMLAttributes<HTMLLabelElement>, "children" | "onChange" | "onPointerDown" | "htmlFor"> & Omit<import('react').InputHTMLAttributes<HTMLInputElement>, "type" | "size" | "className" | "children"> & {
|
|
3
3
|
children?: import('react').ReactNode;
|
|
4
4
|
label?: import('react').ReactNode;
|
|
5
5
|
hint?: import('react').ReactNode;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RadioError, RadioHint, RadioIndicator, RadioLabel } from './Radio';
|
|
2
|
-
export declare const Radio: import('react').ForwardRefExoticComponent<Omit<import('react').LabelHTMLAttributes<HTMLLabelElement>, "children" | "
|
|
2
|
+
export declare const Radio: import('react').ForwardRefExoticComponent<Omit<import('react').LabelHTMLAttributes<HTMLLabelElement>, "children" | "onChange" | "onPointerDown" | "htmlFor"> & Omit<import('react').InputHTMLAttributes<HTMLInputElement>, "type" | "size" | "className" | "children"> & {
|
|
3
3
|
children?: import('react').ReactNode;
|
|
4
4
|
label?: import('react').ReactNode;
|
|
5
5
|
hint?: import('react').ReactNode;
|
|
@@ -1,10 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import { RadioSize } from './radioTypes';
|
|
3
|
-
export declare const RADIO_SIZE_LAYOUT: Record<RadioSize, {
|
|
4
|
-
title: TextVariant;
|
|
5
|
-
desc: TextVariant;
|
|
6
|
-
gridGap: string;
|
|
7
|
-
}>;
|
|
1
|
+
export declare const RADIO_SIZE_LAYOUT: Record<import('../utils/sizeLayout').ComponentSize, import('../utils/sizeLayout').OptionControlSizeLayout>;
|
|
8
2
|
export declare const RADIO_INPUT_VISUALLY_HIDDEN_CLASS = "absolute m-[-1px] h-px w-px overflow-hidden border-0 p-0 opacity-0 [clip:rect(0,0,0,0)]";
|
|
9
3
|
export declare const RADIO_CONTROL_CLASS = "relative inline-flex shrink-0 items-center justify-center";
|
|
10
4
|
export declare const RADIO_CONTROL_TRACK_CLASS = "relative inline-flex items-center justify-center";
|
|
@@ -8,11 +8,7 @@ export declare function useRadioRootState({ size, variant, danger, disabled, che
|
|
|
8
8
|
enableTextMotion: boolean;
|
|
9
9
|
textColRef: import('react').RefObject<HTMLElement | null>;
|
|
10
10
|
secondaryLines: number;
|
|
11
|
-
sz:
|
|
12
|
-
title: import('../Text').TextVariant;
|
|
13
|
-
desc: import('../Text').TextVariant;
|
|
14
|
-
gridGap: string;
|
|
15
|
-
};
|
|
11
|
+
sz: import('../utils/sizeLayout').OptionControlSizeLayout;
|
|
16
12
|
hasHint: boolean;
|
|
17
13
|
hasError: boolean;
|
|
18
14
|
label: ReactNode;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ButtonGroupSegment } from '../../composite/ButtonGroup/buttonGroupTypes';
|
|
2
|
-
import { ComponentSize } from '../utils/
|
|
2
|
+
import { ComponentSize } from '../utils/sizeLayout';
|
|
3
3
|
import { SearchInputSize, SearchInputVariant, SearchSizeLayout } from './searchInputTypes';
|
|
4
4
|
export declare const SEARCH_INPUT_EXPAND_TRIGGER_CLASS = "absolute inset-0 z-[2] m-0 cursor-pointer border-0 bg-transparent p-0 outline-none focus-ring-inset rounded-[inherit]";
|
|
5
5
|
export declare const SEARCH_INPUT_ICON_WRAP_CLASS = "pointer-events-none absolute inset-y-0 z-[1] flex items-center justify-center text-muted";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ChangeEvent, FocusEvent, InputHTMLAttributes, KeyboardEvent } from 'react';
|
|
2
2
|
import { ButtonGroupSegment } from '../../composite/ButtonGroup/buttonGroupTypes';
|
|
3
|
-
import { ComponentSize } from '../utils/
|
|
3
|
+
import { ComponentSize } from '../utils/sizeLayout';
|
|
4
4
|
export type SearchInputSize = ComponentSize;
|
|
5
5
|
export type SearchInputVariant = "default" | "outline" | "secondary" | "gloss";
|
|
6
6
|
export type SearchInputClassNames = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ChangeEvent, FocusEvent, KeyboardEvent, MouseEvent, PointerEvent } from 'react';
|
|
2
2
|
import { SearchInputVariant, UseSearchInputRootStateProps } from './searchInputTypes';
|
|
3
3
|
export declare function useSearchInputRootState({ size: sizeProp, variant: variantProp, expandedWidth, defaultExpanded, expanded: expandedProp, onExpandedChange, collapseOnBlur, disabled, readOnly, placeholder, value: valueProp, defaultValue, onChange, onBlur, onKeyDown, id: idProp, "aria-label": ariaLabelProp, ripple, groupSegment: groupSegmentProp, className, classNames, forwardedRef, }: UseSearchInputRootStateProps): {
|
|
4
|
-
size: import('../utils/
|
|
4
|
+
size: import('../utils/sizeLayout').ComponentSize;
|
|
5
5
|
variant: SearchInputVariant;
|
|
6
6
|
expanded: boolean;
|
|
7
7
|
blocked: boolean;
|
|
@@ -6,6 +6,6 @@ export declare const SelectionIndicator: typeof SelectionIndicatorRoot & {
|
|
|
6
6
|
} & import('react').RefAttributes<HTMLSpanElement>>;
|
|
7
7
|
};
|
|
8
8
|
export type { SelectionIndicatorProps, SelectionIndicatorClassNames, SelectionIndicatorFillProps, SelectionIndicatorMarkProps, } from './selectionIndicatorTypes';
|
|
9
|
-
export { SELECTION_INDICATOR_FILL_CLASS, SELECTION_INDICATOR_ICON_CLASS, SELECTION_INDICATOR_SHELL_CLASS, SELECTION_INDICATOR_SIZE_CLASS, selectionIndicatorFallbackPx, selectionIndicatorShellClass, selectionIndicatorVariantClass, type SelectionIndicatorSize, type SelectionIndicatorVariant, } from './selectionIndicatorTokens';
|
|
9
|
+
export { SELECTION_INDICATOR_FILL_CLASS, SELECTION_INDICATOR_ICON_CLASS, SELECTION_INDICATOR_RADIUS_CLASS, SELECTION_INDICATOR_SHELL_CLASS, SELECTION_INDICATOR_SIZE_CLASS, selectionIndicatorFallbackPx, selectionIndicatorShellClass, selectionIndicatorVariantClass, type SelectionIndicatorSize, type SelectionIndicatorVariant, } from './selectionIndicatorTokens';
|
|
10
10
|
export { SELECTION_INDICATOR_FILL_DISPLAY_NAME, SELECTION_INDICATOR_MARK_DISPLAY_NAME, } from './selectionIndicatorAPI';
|
|
11
11
|
export { useSelectionIndicatorAnimation } from './useSelectionIndicatorAnimation';
|
|
@@ -1,19 +1,22 @@
|
|
|
1
|
-
export type SelectionIndicatorSize = "small" | "base" | "mid" | "large";
|
|
1
|
+
export type SelectionIndicatorSize = "xsmall" | "small" | "base" | "mid" | "large";
|
|
2
2
|
export type SelectionIndicatorVariant = "default" | "secondary" | "outline" | "gloss";
|
|
3
3
|
export declare const SELECTION_INDICATOR_SIZE_CLASS: Record<SelectionIndicatorSize, string>;
|
|
4
|
+
/** Corner radius from `--selection-indicator-radius-*` (`--radius-*` × 0.75). */
|
|
5
|
+
export declare const SELECTION_INDICATOR_RADIUS_CLASS: Record<SelectionIndicatorSize, string>;
|
|
6
|
+
/** Mark icon box — `--icon-size-*` × 0.75 so marks fit inside the indicator ring. */
|
|
4
7
|
export declare const SELECTION_INDICATOR_ICON_CLASS: Record<SelectionIndicatorSize, string>;
|
|
5
8
|
export declare const SELECTION_INDICATOR_MARK_CLASS = "pointer-events-none relative z-[2] inline-flex items-center justify-center";
|
|
6
9
|
export declare function selectionIndicatorMarkCheckIconClass(size: SelectionIndicatorSize): string;
|
|
7
10
|
/** Custom mark icons: no `[&_svg]:size-full` — `icon-*` on the icon itself controls size. */
|
|
8
11
|
export declare function selectionIndicatorMarkCustomIconClass(size: SelectionIndicatorSize): string;
|
|
9
12
|
export declare const SELECTION_INDICATOR_DOT_CLASS: Record<SelectionIndicatorSize, string>;
|
|
10
|
-
export declare const SELECTION_INDICATOR_DOT_INNER_CLASS = "shrink-0
|
|
11
|
-
export declare const SELECTION_INDICATOR_DOT_INNER_GLOSS_CLASS = "shrink-0
|
|
12
|
-
export declare const SELECTION_INDICATOR_SHELL_CLASS = "relative box-border inline-flex shrink-0 items-center justify-center overflow-hidden
|
|
13
|
-
export declare const SELECTION_INDICATOR_FILL_BASE_CLASS = "pointer-events-none absolute inset-
|
|
13
|
+
export declare const SELECTION_INDICATOR_DOT_INNER_CLASS = "shrink-0 bg-indicator-foreground";
|
|
14
|
+
export declare const SELECTION_INDICATOR_DOT_INNER_GLOSS_CLASS = "shrink-0 bg-foreground";
|
|
15
|
+
export declare const SELECTION_INDICATOR_SHELL_CLASS = "relative box-border inline-flex shrink-0 items-center justify-center overflow-hidden";
|
|
16
|
+
export declare const SELECTION_INDICATOR_FILL_BASE_CLASS = "pointer-events-none absolute -inset-[var(--border-width)] z-[0] flex origin-center items-center justify-center rounded-[inherit]";
|
|
14
17
|
export declare const SELECTION_INDICATOR_FILL_CLASS = "bg-indicator text-indicator-foreground";
|
|
15
18
|
export declare const SELECTION_INDICATOR_FILL_SECONDARY_CLASS = "bg-secondary text-secondary-foreground";
|
|
16
|
-
export declare const SELECTION_INDICATOR_FILL_GLOSS_CLASS
|
|
19
|
+
export declare const SELECTION_INDICATOR_FILL_GLOSS_CLASS: string;
|
|
17
20
|
/** Gloss fill for Switch/Slider thumb — primary-tint like ToggleButton, without gloss-indicator-fill. */
|
|
18
21
|
export declare const SELECTION_INDICATOR_FILL_GLOSS_TINT_CLASS: string;
|
|
19
22
|
export declare function selectionIndicatorFallbackPx(size: SelectionIndicatorSize, rootPx?: number): number;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { SelectionThumbIconProps, SelectionThumbProps } from './selectionThumbTypes';
|
|
2
2
|
export type { SelectionThumbClassNames, SelectionThumbIconClassNames, SelectionThumbIconProps, SelectionThumbProps, } from './selectionThumbTypes';
|
|
3
|
-
export declare function SelectionThumb({
|
|
3
|
+
export declare function SelectionThumb({ size, gloss, shellRef, className, classNames, children, ...rest }: SelectionThumbProps): import("react/jsx-runtime").JSX.Element;
|
|
4
4
|
export declare namespace SelectionThumb {
|
|
5
5
|
var displayName: string;
|
|
6
6
|
}
|
|
7
|
-
export declare function SelectionThumbIcon({ size,
|
|
7
|
+
export declare function SelectionThumbIcon({ size, gloss, iconRef, className, classNames, children, style, ...rest }: SelectionThumbIconProps): import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
export declare namespace SelectionThumbIcon {
|
|
9
9
|
var displayName: string;
|
|
10
10
|
}
|
|
@@ -3,22 +3,16 @@ export declare const SELECTION_THUMB_SHELL_GLOSS_CLASS = "gloss-indicator size-f
|
|
|
3
3
|
export declare const SELECTION_THUMB_SHELL_DEFAULT_CLASS = "size-full min-h-0 min-w-0 origin-center border border-primary bg-surface";
|
|
4
4
|
export declare const SELECTION_THUMB_ICON_WRAP_CLASS = "pointer-events-none z-[2] flex items-center justify-center";
|
|
5
5
|
export declare const SELECTION_THUMB_ICON_INNER_CLASS = "inline-flex shrink-0 items-center justify-center [&_svg]:size-full";
|
|
6
|
-
export declare function selectionThumbShellClass({ gloss, className, slotRoot, }: {
|
|
6
|
+
export declare function selectionThumbShellClass({ gloss, size, className, slotRoot, }: {
|
|
7
7
|
gloss: boolean;
|
|
8
|
+
size: SelectionIndicatorSize;
|
|
8
9
|
className?: string;
|
|
9
10
|
slotRoot?: string;
|
|
10
11
|
}): string;
|
|
11
|
-
|
|
12
|
+
/** Icon color is stable (no on/off / active tint swap). */
|
|
13
|
+
export declare function selectionThumbIconColorClass(gloss: boolean): string;
|
|
14
|
+
export declare function selectionThumbIconRootClass({ gloss, className, slotRoot, }: {
|
|
12
15
|
gloss: boolean;
|
|
13
|
-
slotFill?: string;
|
|
14
|
-
}): string;
|
|
15
|
-
export declare function selectionThumbIconColorClass({ gloss, highlighted, }: {
|
|
16
|
-
gloss: boolean;
|
|
17
|
-
highlighted: boolean;
|
|
18
|
-
}): string;
|
|
19
|
-
export declare function selectionThumbIconRootClass({ gloss, highlighted, className, slotRoot, }: {
|
|
20
|
-
gloss: boolean;
|
|
21
|
-
highlighted: boolean;
|
|
22
16
|
className?: string;
|
|
23
17
|
slotRoot?: string;
|
|
24
18
|
}): string;
|
|
@@ -2,24 +2,20 @@ import { HTMLAttributes, ReactNode, RefObject } from 'react';
|
|
|
2
2
|
import { SelectionIndicatorSize } from '../SelectionIndicator/selectionIndicatorTokens';
|
|
3
3
|
export type SelectionThumbClassNames = {
|
|
4
4
|
root?: string;
|
|
5
|
-
fill?: string;
|
|
6
5
|
};
|
|
7
6
|
export type SelectionThumbIconClassNames = {
|
|
8
7
|
root?: string;
|
|
9
8
|
icon?: string;
|
|
10
9
|
};
|
|
11
10
|
export type SelectionThumbProps = Omit<HTMLAttributes<HTMLSpanElement>, "children"> & {
|
|
12
|
-
active: boolean;
|
|
13
11
|
size?: SelectionIndicatorSize;
|
|
14
12
|
shellRef?: RefObject<HTMLSpanElement | null>;
|
|
15
|
-
fillRef?: RefObject<HTMLSpanElement | null>;
|
|
16
13
|
gloss?: boolean;
|
|
17
14
|
children?: ReactNode;
|
|
18
15
|
classNames?: SelectionThumbClassNames;
|
|
19
16
|
};
|
|
20
17
|
export type SelectionThumbIconProps = Omit<HTMLAttributes<HTMLSpanElement>, "children"> & {
|
|
21
18
|
size?: SelectionIndicatorSize;
|
|
22
|
-
highlighted?: boolean;
|
|
23
19
|
gloss?: boolean;
|
|
24
20
|
iconRef?: RefObject<HTMLSpanElement | null>;
|
|
25
21
|
children?: ReactNode;
|
|
@@ -6,12 +6,13 @@ export declare const SLIDER_SCALE_HEADER_VERTICAL_CLASS = "min-w-[8rem]";
|
|
|
6
6
|
export declare const SLIDER_SCALE_VALUE_CLASS = "tabular-nums text-muted";
|
|
7
7
|
export declare const SLIDER_RAIL_HEIGHT: Record<SliderSize, string>;
|
|
8
8
|
export declare const SLIDER_RAIL_WIDTH: Record<SliderSize, string>;
|
|
9
|
-
export declare const SLIDER_RAIL_LAYOUT_CLASS = "pointer-events-none absolute inset-0 overflow-hidden
|
|
9
|
+
export declare const SLIDER_RAIL_LAYOUT_CLASS = "pointer-events-none absolute inset-0 overflow-hidden";
|
|
10
10
|
export declare const SLIDER_RAIL_DEFAULT_CLASS = "bg-primary-tint";
|
|
11
11
|
export declare const SLIDER_RAIL_GLOSS_CLASS = "gloss-indicator border-0";
|
|
12
|
-
export declare const SLIDER_RAIL_GLOSS_SHAPE_CLASS = "overflow-hidden
|
|
12
|
+
export declare const SLIDER_RAIL_GLOSS_SHAPE_CLASS = "overflow-hidden";
|
|
13
13
|
export declare const SLIDER_RAIL_DISABLED_CLASS = "opacity-48";
|
|
14
|
-
|
|
14
|
+
/** Rail fill — clipped by rail `overflow-hidden` (same radius as thumb). */
|
|
15
|
+
export declare const SLIDER_FILL_LAYOUT_CLASS = "absolute rounded-[inherit]";
|
|
15
16
|
export declare const SLIDER_FILL_DEFAULT_CLASS = "bg-primary";
|
|
16
17
|
export declare const SLIDER_FILL_GLOSS_CLASS = "bg-primary-tint";
|
|
17
18
|
export declare const SLIDER_FILL_GLOSS_LAYER_CLASS = "z-[1]";
|
|
@@ -20,7 +21,7 @@ export declare const SLIDER_FILL_VERTICAL_CLASS = "inset-x-0";
|
|
|
20
21
|
export declare const SLIDER_TRACK_HIT_BASE_CLASS = "relative touch-none select-none";
|
|
21
22
|
export declare const SLIDER_TRACK_HIT_HORIZONTAL_CLASS = "w-full";
|
|
22
23
|
export declare const SLIDER_TRACK_HIT_VERTICAL_CLASS = "h-48";
|
|
23
|
-
export declare const SLIDER_MARK_CLASS = "pointer-events-none absolute z-[1] size-1 rounded-
|
|
24
|
+
export declare const SLIDER_MARK_CLASS = "pointer-events-none absolute z-[1] size-1 rounded-[var(--selection-indicator-radius-xsmall)] bg-primary/30";
|
|
24
25
|
export declare const SLIDER_THUMB_BUTTON_BASE_CLASS = "absolute z-[2] box-border flex shrink-0 origin-center items-center justify-center m-0 appearance-none border-0 bg-transparent p-0 focus-ring";
|
|
25
26
|
export declare const SLIDER_THUMB_BUTTON_HORIZONTAL_CLASS = "top-0 h-full w-auto -translate-x-1/2 aspect-square";
|
|
26
27
|
export declare const SLIDER_THUMB_BUTTON_VERTICAL_CLASS = "left-0 w-full h-auto -translate-y-1/2 aspect-square";
|
|
@@ -31,7 +32,8 @@ export declare function sliderRootClass({ orientation, slotClass, className, }:
|
|
|
31
32
|
slotClass?: string;
|
|
32
33
|
className?: string;
|
|
33
34
|
}): string;
|
|
34
|
-
export declare function sliderRailClass({ disabled, gloss, slotClass, className, }: {
|
|
35
|
+
export declare function sliderRailClass({ size, disabled, gloss, slotClass, className, }: {
|
|
36
|
+
size: SliderSize;
|
|
35
37
|
disabled?: boolean;
|
|
36
38
|
gloss?: boolean;
|
|
37
39
|
slotClass?: string;
|