burne-ui 2.0.2 → 2.0.4
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/cli/templates/skin-tier-2/src/skin.css +1 -1
- package/cli/templates/skin-tier-3/src/skin.css +1 -1
- package/dist/components/composite/AlertDialog/alertDialogStyles.js +2 -2
- package/dist/components/composite/ButtonGroup/buttonGroupStyles.js +5 -2
- package/dist/components/core/Alert/alertStyles.js +2 -3
- package/dist/components/core/Avatar/avatarStyles.js +2 -2
- package/dist/components/core/Badge/badgeStyles.js +5 -4
- package/dist/components/core/Button/buttonStyles.js +3 -5
- package/dist/components/core/Calendar/calendarParts.js +15 -13
- package/dist/components/core/Calendar/calendarStyles.d.ts +5 -2
- package/dist/components/core/Calendar/calendarStyles.js +5 -5
- package/dist/components/core/Card/cardStyles.js +1 -0
- package/dist/components/core/CloseButton/closeButtonStyles.js +1 -0
- package/dist/components/core/ComboBox/comboBoxStyles.js +2 -3
- package/dist/components/core/DatePicker/datePickerAnimations.d.ts +2 -0
- package/dist/components/core/DatePicker/datePickerAnimations.js +31 -2
- package/dist/components/core/DatePicker/datePickerParts.js +20 -2
- package/dist/components/core/DatePicker/datePickerStyles.js +2 -3
- package/dist/components/core/Dialog/dialogStyles.js +2 -2
- package/dist/components/core/Disclosure/disclosureStyles.js +5 -3
- package/dist/components/core/Drawer/drawerStyles.js +2 -2
- package/dist/components/core/Dropdown/dropdownStyles.d.ts +1 -1
- package/dist/components/core/Dropdown/dropdownStyles.js +3 -3
- package/dist/components/core/Expandable/expandableStyles.js +2 -2
- package/dist/components/core/Input/inputControlParts.js +4 -4
- package/dist/components/core/Input/inputStyles.d.ts +2 -0
- package/dist/components/core/Input/inputStyles.js +9 -3
- package/dist/components/core/Kbd/kbdStyles.js +2 -3
- package/dist/components/core/ListBox/listBoxStyles.js +2 -2
- package/dist/components/core/NumberInput/numberInputAnimations.d.ts +21 -21
- package/dist/components/core/NumberInput/numberInputAnimations.js +22 -4
- package/dist/components/core/NumberInput/numberInputStyles.js +2 -3
- package/dist/components/core/PinInput/pinInputStyles.js +9 -4
- package/dist/components/core/Popover/popoverStyles.js +3 -3
- package/dist/components/core/SearchInput/searchInputStyles.js +1 -0
- package/dist/components/core/Select/selectStyles.js +2 -3
- package/dist/components/core/SelectionIndicator/selectionIndicatorStyles.js +6 -13
- package/dist/components/core/SelectionThumb/selectionThumbStyles.js +3 -4
- package/dist/components/core/Slider/sliderStyles.js +3 -2
- package/dist/components/core/Surface/surfaceStyles.js +2 -3
- package/dist/components/core/Switch/switchStyles.js +3 -4
- package/dist/components/core/Table/tableParts.js +21 -3
- package/dist/components/core/Table/tableStyles.d.ts +10 -1
- package/dist/components/core/Table/tableStyles.js +13 -7
- package/dist/components/core/Tabs/tabsStyles.js +4 -3
- package/dist/components/core/TagsInput/tagsInputStyles.js +2 -3
- package/dist/components/core/TextArea/textAreaStyles.js +1 -0
- package/dist/components/core/TimeField/timeFieldStyles.d.ts +5 -2
- package/dist/components/core/TimeField/timeFieldStyles.js +3 -1
- package/dist/components/core/Toast/toastStyles.js +2 -2
- package/dist/components/core/ToggleButton/toggleButtonStyles.js +1 -0
- package/dist/components/core/Tooltip/tooltipStyles.d.ts +1 -1
- package/dist/components/core/Tooltip/tooltipStyles.js +4 -4
- package/dist/components/core/utils/sizeLayout/iconSlot.d.ts +1 -1
- package/dist/skins/resolveVariantVisual.d.ts +6 -0
- package/dist/skins/resolveVariantVisual.js +7 -1
- package/dist/ui.css +43 -19
- package/package.json +1 -1
|
@@ -3,13 +3,19 @@ import { buttonGroupSegmentSurfaceClasses, buttonGroupRoundingClasses } from "..
|
|
|
3
3
|
import { FIELD_CONTROL_MOBILE_NO_ZOOM_CLASS } from "../utils/fieldControlMobileNoZoom.js";
|
|
4
4
|
import { hoverVariant, TEXT_COLOR_TRANSITION } from "../utils/hoverVariant.js";
|
|
5
5
|
import { resolveFieldShellSurfaceClass } from "../utils/fieldShellVariant.js";
|
|
6
|
-
import { resolveVariantVisual, usesKitElevation } from "../../../skins/resolveVariantVisual.js";
|
|
6
|
+
import { resolveVariantVisual, skinVisualClass, usesKitElevation } from "../../../skins/resolveVariantVisual.js";
|
|
7
7
|
import { KIT_INPUT_VARIANTS } from "./inputTypes.js";
|
|
8
8
|
import { cn } from "../../../utils/cn.js";
|
|
9
9
|
import { CONTROL_SIZE_LAYOUT } from "../utils/sizeLayout/control.js";
|
|
10
10
|
import { affixToggleMinWClass, affixSlotClass } from "../utils/inputAffixStyles.js";
|
|
11
11
|
const INPUT_AFFIX_SURFACE_CLASS = "bg-primary-tint";
|
|
12
12
|
const INPUT_SHELL_BASE_CLASS = "flex items-stretch";
|
|
13
|
+
function inputShellClipClass(variant) {
|
|
14
|
+
return cn(
|
|
15
|
+
"field-radius-clip flex min-w-0 flex-1 items-stretch",
|
|
16
|
+
variant === "outline" && "field-radius-clip-outline"
|
|
17
|
+
);
|
|
18
|
+
}
|
|
13
19
|
const INPUT_CONTROL_BASE_CLASS = `min-w-0 flex-1 bg-transparent text-foreground outline-none placeholder:text-muted ${FIELD_CONTROL_MOBILE_NO_ZOOM_CLASS}`;
|
|
14
20
|
const INPUT_FILE_INPUT_CLASS = `absolute inset-0 cursor-pointer opacity-0 disabled:cursor-not-allowed ${FIELD_CONTROL_MOBILE_NO_ZOOM_CLASS}`;
|
|
15
21
|
const INPUT_FILE_EMPTY_ICON_CLASS = "pointer-events-none size-12 shrink-0 text-muted";
|
|
@@ -76,8 +82,7 @@ function inputShellSurfaceClass({
|
|
|
76
82
|
variant
|
|
77
83
|
}) {
|
|
78
84
|
const visual = resolveVariantVisual(variant, KIT_INPUT_VARIANTS, "input.shell");
|
|
79
|
-
|
|
80
|
-
return resolveFieldShellSurfaceClass({ variant });
|
|
85
|
+
return skinVisualClass(visual, resolveFieldShellSurfaceClass({ variant }));
|
|
81
86
|
}
|
|
82
87
|
function inputShellRoundingClass(groupSegment) {
|
|
83
88
|
if (groupSegment != null) {
|
|
@@ -196,6 +201,7 @@ export {
|
|
|
196
201
|
inputFileRemoveButtonClass,
|
|
197
202
|
inputPasswordToggleButtonClass,
|
|
198
203
|
inputShellClass,
|
|
204
|
+
inputShellClipClass,
|
|
199
205
|
inputShellRoundingClass,
|
|
200
206
|
inputShellSurfaceClass
|
|
201
207
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { cn } from "../../../utils/cn.js";
|
|
2
|
-
import { resolveVariantVisual } from "../../../skins/resolveVariantVisual.js";
|
|
2
|
+
import { resolveVariantVisual, skinVisualClass } from "../../../skins/resolveVariantVisual.js";
|
|
3
3
|
import { KIT_KBD_VARIANTS } from "./kbdTypes.js";
|
|
4
4
|
const KBD_VARIANT_SURFACE = {
|
|
5
5
|
default: "bg-surface border-token text-foreground",
|
|
@@ -25,8 +25,7 @@ const KBD_GROUP_BASE_CLASS = "inline-flex items-center gap-xsmall";
|
|
|
25
25
|
const KBD_GROUP_SEPARATOR_CLASS = "select-none text-muted text-xsmall leading-none";
|
|
26
26
|
function kbdSurfaceClass(variant) {
|
|
27
27
|
const visual = resolveVariantVisual(variant, KIT_KBD_VARIANTS, "kbd.root");
|
|
28
|
-
|
|
29
|
-
return KBD_VARIANT_SURFACE[visual.key];
|
|
28
|
+
return skinVisualClass(visual, KBD_VARIANT_SURFACE[visual.key]);
|
|
30
29
|
}
|
|
31
30
|
function kbdRootClass({
|
|
32
31
|
variant,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SURFACE_COLOR_TRANSITION } from "../utils/hoverVariant.js";
|
|
2
|
-
import { resolveVariantVisual } from "../../../skins/resolveVariantVisual.js";
|
|
2
|
+
import { resolveVariantVisual, skinVisualClass } from "../../../skins/resolveVariantVisual.js";
|
|
3
3
|
import { cn } from "../../../utils/cn.js";
|
|
4
4
|
import { KIT_LIST_BOX_VARIANTS } from "./listBoxTypes.js";
|
|
5
5
|
import { CONTROL_SIZE_LAYOUT } from "../utils/sizeLayout/control.js";
|
|
@@ -31,7 +31,7 @@ function listBoxRootClass({
|
|
|
31
31
|
return cn(
|
|
32
32
|
LISTBOX_ROOT_CLASS,
|
|
33
33
|
virtualized ? LISTBOX_VIRTUAL_ROOT_CLASS : null,
|
|
34
|
-
visual
|
|
34
|
+
skinVisualClass(visual),
|
|
35
35
|
slotClass,
|
|
36
36
|
className
|
|
37
37
|
);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ForwardedRef, MutableRefObject, PointerEventHandler } from 'react';
|
|
1
|
+
import { ForwardedRef, MutableRefObject, PointerEvent as ReactPointerEvent, PointerEventHandler } from 'react';
|
|
2
2
|
import { MotionPartPhases } from '../utils/slotMotion/index.js';
|
|
3
3
|
import { InputVariant } from '../Input/inputTypes.js';
|
|
4
4
|
import { NumberInputMotion, NumberInputPartMotion } from './numberInputTypes.js';
|
|
@@ -18,10 +18,10 @@ export declare function resolveNumberInputMotionParams({ variant, disabled, poin
|
|
|
18
18
|
export declare function useNumberInputShellMotion(): {
|
|
19
19
|
setRef: (node: HTMLDivElement | null) => void;
|
|
20
20
|
pointerHandlers: {
|
|
21
|
-
onPointerOver: (e:
|
|
22
|
-
onPointerOut: (e:
|
|
23
|
-
onPointerDown: (e:
|
|
24
|
-
onPointerUp: (e:
|
|
21
|
+
onPointerOver: (e: ReactPointerEvent<HTMLDivElement>) => void;
|
|
22
|
+
onPointerOut: (e: ReactPointerEvent<HTMLDivElement>) => void;
|
|
23
|
+
onPointerDown: (e: ReactPointerEvent<HTMLDivElement>) => void;
|
|
24
|
+
onPointerUp: (e: ReactPointerEvent<HTMLDivElement>) => void;
|
|
25
25
|
};
|
|
26
26
|
shellHoverMotionClass: string;
|
|
27
27
|
};
|
|
@@ -36,10 +36,10 @@ export declare function useNumberInputControlMotion({ motion, forwardedRef, onPo
|
|
|
36
36
|
setRef: (node: HTMLInputElement | null) => void;
|
|
37
37
|
targetRef: import('react').RefObject<HTMLInputElement | null>;
|
|
38
38
|
pointerHandlers: {
|
|
39
|
-
onPointerOver: (e:
|
|
40
|
-
onPointerOut: (e:
|
|
41
|
-
onPointerDown: (e:
|
|
42
|
-
onPointerUp: (e:
|
|
39
|
+
onPointerOver: (e: ReactPointerEvent<HTMLInputElement>) => void;
|
|
40
|
+
onPointerOut: (e: ReactPointerEvent<HTMLInputElement>) => void;
|
|
41
|
+
onPointerDown: (e: ReactPointerEvent<HTMLInputElement>) => void;
|
|
42
|
+
onPointerUp: (e: ReactPointerEvent<HTMLInputElement>) => void;
|
|
43
43
|
};
|
|
44
44
|
};
|
|
45
45
|
export declare function useNumberInputDecrementMotion({ motion, forwardedRef, blocked, onPointerOver, onPointerOut, onPointerDown, onPointerUp, }: {
|
|
@@ -54,10 +54,10 @@ export declare function useNumberInputDecrementMotion({ motion, forwardedRef, bl
|
|
|
54
54
|
setRef: (node: HTMLButtonElement | null) => void;
|
|
55
55
|
targetRef: import('react').RefObject<HTMLButtonElement | null>;
|
|
56
56
|
pointerHandlers: {
|
|
57
|
-
onPointerOver: (e:
|
|
58
|
-
onPointerOut: (e:
|
|
59
|
-
onPointerDown: (e:
|
|
60
|
-
onPointerUp: (e:
|
|
57
|
+
onPointerOver: (e: ReactPointerEvent<HTMLButtonElement>) => void;
|
|
58
|
+
onPointerOut: (e: ReactPointerEvent<HTMLButtonElement>) => void;
|
|
59
|
+
onPointerDown: (e: ReactPointerEvent<HTMLButtonElement>) => void;
|
|
60
|
+
onPointerUp: (e: ReactPointerEvent<HTMLButtonElement>) => void;
|
|
61
61
|
};
|
|
62
62
|
};
|
|
63
63
|
export declare function useNumberInputIncrementMotion({ motion, forwardedRef, blocked, onPointerOver, onPointerOut, onPointerDown, onPointerUp, }: {
|
|
@@ -72,10 +72,10 @@ export declare function useNumberInputIncrementMotion({ motion, forwardedRef, bl
|
|
|
72
72
|
setRef: (node: HTMLButtonElement | null) => void;
|
|
73
73
|
targetRef: import('react').RefObject<HTMLButtonElement | null>;
|
|
74
74
|
pointerHandlers: {
|
|
75
|
-
onPointerOver: (e:
|
|
76
|
-
onPointerOut: (e:
|
|
77
|
-
onPointerDown: (e:
|
|
78
|
-
onPointerUp: (e:
|
|
75
|
+
onPointerOver: (e: ReactPointerEvent<HTMLButtonElement>) => void;
|
|
76
|
+
onPointerOut: (e: ReactPointerEvent<HTMLButtonElement>) => void;
|
|
77
|
+
onPointerDown: (e: ReactPointerEvent<HTMLButtonElement>) => void;
|
|
78
|
+
onPointerUp: (e: ReactPointerEvent<HTMLButtonElement>) => void;
|
|
79
79
|
};
|
|
80
80
|
};
|
|
81
81
|
export declare function useNumberInputChromeSlot(slot: "label" | "hint" | "error", { motion, forwardedRef, onPointerOver, onPointerOut, onPointerDown, onPointerUp, }?: {
|
|
@@ -89,9 +89,9 @@ export declare function useNumberInputChromeSlot(slot: "label" | "hint" | "error
|
|
|
89
89
|
setRef: (node: HTMLElement | null) => void;
|
|
90
90
|
targetRef: import('react').RefObject<HTMLElement | null>;
|
|
91
91
|
pointerHandlers: {
|
|
92
|
-
onPointerOver: (e:
|
|
93
|
-
onPointerOut: (e:
|
|
94
|
-
onPointerDown: (e:
|
|
95
|
-
onPointerUp: (e:
|
|
92
|
+
onPointerOver: (e: ReactPointerEvent<HTMLElement>) => void;
|
|
93
|
+
onPointerOut: (e: ReactPointerEvent<HTMLElement>) => void;
|
|
94
|
+
onPointerDown: (e: ReactPointerEvent<HTMLElement>) => void;
|
|
95
|
+
onPointerUp: (e: ReactPointerEvent<HTMLElement>) => void;
|
|
96
96
|
};
|
|
97
97
|
};
|
|
@@ -77,6 +77,18 @@ function useNumberInputShellMotion() {
|
|
|
77
77
|
shellHoverMotionClass: kitSurface ? shadow.motionClass : ""
|
|
78
78
|
};
|
|
79
79
|
}
|
|
80
|
+
const STEPPER_PRESS_PARAMS = {
|
|
81
|
+
hasHoverShadow: false,
|
|
82
|
+
restoreHover: false,
|
|
83
|
+
shadow: void 0,
|
|
84
|
+
shadowSize: void 0
|
|
85
|
+
};
|
|
86
|
+
function playStepperPress(scope, slot, motion, event) {
|
|
87
|
+
if (!scope || event.defaultPrevented) return;
|
|
88
|
+
const el = event.currentTarget;
|
|
89
|
+
if (!el) return;
|
|
90
|
+
scope.play(slot, "pressIn", { el, partMotion: motion, params: STEPPER_PRESS_PARAMS });
|
|
91
|
+
}
|
|
80
92
|
function useNumberInputControlMotion({
|
|
81
93
|
motion,
|
|
82
94
|
forwardedRef,
|
|
@@ -117,10 +129,13 @@ function useNumberInputDecrementMotion({
|
|
|
117
129
|
slot: "decrement",
|
|
118
130
|
motion,
|
|
119
131
|
forwardedRef,
|
|
120
|
-
pressPhases: !blocked,
|
|
121
132
|
onPointerOver,
|
|
122
133
|
onPointerOut,
|
|
123
|
-
onPointerDown
|
|
134
|
+
onPointerDown: (event) => {
|
|
135
|
+
onPointerDown?.(event);
|
|
136
|
+
if (blocked) return;
|
|
137
|
+
playStepperPress(scope, "decrement", motion, event);
|
|
138
|
+
},
|
|
124
139
|
onPointerUp
|
|
125
140
|
});
|
|
126
141
|
useOptionalEnterOnMount(scope, "decrement", part.targetRef);
|
|
@@ -141,10 +156,13 @@ function useNumberInputIncrementMotion({
|
|
|
141
156
|
slot: "increment",
|
|
142
157
|
motion,
|
|
143
158
|
forwardedRef,
|
|
144
|
-
pressPhases: !blocked,
|
|
145
159
|
onPointerOver,
|
|
146
160
|
onPointerOut,
|
|
147
|
-
onPointerDown
|
|
161
|
+
onPointerDown: (event) => {
|
|
162
|
+
onPointerDown?.(event);
|
|
163
|
+
if (blocked) return;
|
|
164
|
+
playStepperPress(scope, "increment", motion, event);
|
|
165
|
+
},
|
|
148
166
|
onPointerUp
|
|
149
167
|
});
|
|
150
168
|
useOptionalEnterOnMount(scope, "increment", part.targetRef);
|
|
@@ -4,7 +4,7 @@ import { iconSlotClass } from "../utils/sizeLayout/iconSlot.js";
|
|
|
4
4
|
import { TEXT_COLOR_TRANSITION } from "../utils/hoverVariant.js";
|
|
5
5
|
import { fieldShellHoverClass, FIELD_SHELL_TRANSITION_CLASS, fieldShellFocusRingClass } from "../utils/useFieldShellHoverLift.js";
|
|
6
6
|
import { KIT_INPUT_VARIANTS } from "../Input/inputTypes.js";
|
|
7
|
-
import { usesKitElevation, resolveVariantVisual } from "../../../skins/resolveVariantVisual.js";
|
|
7
|
+
import { usesKitElevation, resolveVariantVisual, skinVisualClass } from "../../../skins/resolveVariantVisual.js";
|
|
8
8
|
import { cn } from "../../../utils/cn.js";
|
|
9
9
|
import { CONTROL_SIZE_LAYOUT } from "../utils/sizeLayout/control.js";
|
|
10
10
|
const NUMBER_INPUT_ROOT_CLASS = "w-fit max-w-full min-w-0";
|
|
@@ -38,8 +38,7 @@ function numberInputIconClass(size) {
|
|
|
38
38
|
}
|
|
39
39
|
function numberInputShellSurface(variant) {
|
|
40
40
|
const visual = resolveVariantVisual(variant, KIT_INPUT_VARIANTS, "numberInput.shell");
|
|
41
|
-
|
|
42
|
-
return resolveFieldShellSurfaceClass({ variant });
|
|
41
|
+
return skinVisualClass(visual, resolveFieldShellSurfaceClass({ variant }));
|
|
43
42
|
}
|
|
44
43
|
function numberInputShellClass({
|
|
45
44
|
size,
|
|
@@ -2,7 +2,7 @@ import { FIELD_CONTROL_MOBILE_NO_ZOOM_CLASS } from "../utils/fieldControlMobileN
|
|
|
2
2
|
import { resolveFieldShellSurfaceClass } from "../utils/fieldShellVariant.js";
|
|
3
3
|
import { fieldShellHoverClass, FIELD_SHELL_TRANSITION_CLASS, fieldShellFocusRingClass } from "../utils/useFieldShellHoverLift.js";
|
|
4
4
|
import { KIT_INPUT_VARIANTS } from "../Input/inputTypes.js";
|
|
5
|
-
import { usesKitElevation, resolveVariantVisual } from "../../../skins/resolveVariantVisual.js";
|
|
5
|
+
import { usesKitElevation, resolveVariantVisual, skinVisualClass } from "../../../skins/resolveVariantVisual.js";
|
|
6
6
|
import { cn } from "../../../utils/cn.js";
|
|
7
7
|
import { CONTROL_SIZE_LAYOUT } from "../utils/sizeLayout/control.js";
|
|
8
8
|
const PIN_INPUT_ROOT_CLASS = "w-fit max-w-full min-w-0";
|
|
@@ -14,12 +14,17 @@ const PIN_INPUT_CELL_BOX = {
|
|
|
14
14
|
mid: "w-control-mid min-h-control-mid",
|
|
15
15
|
large: "w-control-large min-h-control-large"
|
|
16
16
|
};
|
|
17
|
+
const PIN_INPUT_CELL_TEXT = {
|
|
18
|
+
small: "p-0 text-center text-small",
|
|
19
|
+
base: "p-0 text-center text-base",
|
|
20
|
+
mid: "p-0 text-center text-mid",
|
|
21
|
+
large: "p-0 text-center text-mid"
|
|
22
|
+
};
|
|
17
23
|
const PIN_INPUT_DISABLED_CLASS = "cursor-not-allowed opacity-55";
|
|
18
24
|
const PIN_INPUT_MASK_CLASS = "[-webkit-text-security:disc] [text-security:disc]";
|
|
19
25
|
function pinInputFieldSurface(variant) {
|
|
20
26
|
const visual = resolveVariantVisual(variant, KIT_INPUT_VARIANTS, "pinInput.control");
|
|
21
|
-
|
|
22
|
-
return resolveFieldShellSurfaceClass({ variant });
|
|
27
|
+
return skinVisualClass(visual, resolveFieldShellSurfaceClass({ variant }));
|
|
23
28
|
}
|
|
24
29
|
function pinInputGroupClass({
|
|
25
30
|
slotClass,
|
|
@@ -42,7 +47,7 @@ function pinInputFieldClass({
|
|
|
42
47
|
"box-border shrink-0 border-1 text-center text-foreground outline-none tabular-nums placeholder:text-muted",
|
|
43
48
|
PIN_INPUT_CELL_BOX[size],
|
|
44
49
|
CONTROL_SIZE_LAYOUT[size].rounded,
|
|
45
|
-
|
|
50
|
+
PIN_INPUT_CELL_TEXT[size],
|
|
46
51
|
pinInputFieldSurface(variant),
|
|
47
52
|
fieldShellFocusRingClass(status),
|
|
48
53
|
FIELD_SHELL_TRANSITION_CLASS,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TOOLTIP_ARROW_SHELL_PAD } from "../Tooltip/tooltipPosition.js";
|
|
2
|
-
import { resolveVariantVisual } from "../../../skins/resolveVariantVisual.js";
|
|
2
|
+
import { resolveVariantVisual, skinVisualClass } from "../../../skins/resolveVariantVisual.js";
|
|
3
3
|
import { KIT_POPOVER_VARIANTS } from "./popoverTypes.js";
|
|
4
4
|
import { cn } from "../../../utils/cn.js";
|
|
5
5
|
import { panelSizeLayout } from "../utils/sizeLayout/panel.js";
|
|
@@ -86,7 +86,7 @@ function popoverDefaultPanelClass({
|
|
|
86
86
|
const visual = resolveVariantVisual(variant, KIT_POPOVER_VARIANTS, "popover.panel");
|
|
87
87
|
return cn(
|
|
88
88
|
POPOVER_PANEL_BASE_CLASS,
|
|
89
|
-
visual
|
|
89
|
+
skinVisualClass(visual, POPOVER_PANEL_SURFACE[visual.key]),
|
|
90
90
|
popoverSizedPanelClasses({ size, unstyled, contentGap, gapPropSet }),
|
|
91
91
|
slotClass,
|
|
92
92
|
contentSlot,
|
|
@@ -102,7 +102,7 @@ function popoverArrowClass({
|
|
|
102
102
|
const visual = resolveVariantVisual(variant, KIT_POPOVER_VARIANTS, "popover.arrow");
|
|
103
103
|
return cn(
|
|
104
104
|
POPOVER_ARROW_BASE_CLASS,
|
|
105
|
-
visual
|
|
105
|
+
skinVisualClass(visual, POPOVER_ARROW_FILL[visual.key]),
|
|
106
106
|
arrowSideClass,
|
|
107
107
|
slotClass,
|
|
108
108
|
className
|
|
@@ -157,6 +157,7 @@ function searchInputRootClass({
|
|
|
157
157
|
!expanded && !blocked ? SEARCH_INPUT_CURSOR_POINTER_CLASS : "",
|
|
158
158
|
blocked ? SEARCH_INPUT_BLOCKED_CLASS : "",
|
|
159
159
|
!expanded && !groupSegment && layout.shellWCollapsed,
|
|
160
|
+
visual.extend,
|
|
160
161
|
slotRoot,
|
|
161
162
|
className
|
|
162
163
|
);
|
|
@@ -2,7 +2,7 @@ import { fieldShellHoverClass, fieldShellFocusRingClass, FIELD_SHELL_TRANSITION_
|
|
|
2
2
|
import { buttonGroupSegmentSurfaceClasses, buttonGroupRoundingClasses } from "../../composite/ButtonGroup/buttonGroupStyles.js";
|
|
3
3
|
import { KIT_INPUT_VARIANTS } from "../Input/inputTypes.js";
|
|
4
4
|
import { resolveFieldShellSurfaceClass } from "../utils/fieldShellVariant.js";
|
|
5
|
-
import { usesKitElevation, resolveVariantVisual } from "../../../skins/resolveVariantVisual.js";
|
|
5
|
+
import { usesKitElevation, resolveVariantVisual, skinVisualClass } from "../../../skins/resolveVariantVisual.js";
|
|
6
6
|
import { cn } from "../../../utils/cn.js";
|
|
7
7
|
import { CONTROL_SIZE_LAYOUT } from "../utils/sizeLayout/control.js";
|
|
8
8
|
import { iconSlotClass } from "../utils/sizeLayout/iconSlot.js";
|
|
@@ -42,8 +42,7 @@ function selectShellSurface({
|
|
|
42
42
|
variant
|
|
43
43
|
}) {
|
|
44
44
|
const visual = resolveVariantVisual(variant, KIT_INPUT_VARIANTS, "select.shell");
|
|
45
|
-
|
|
46
|
-
return resolveFieldShellSurfaceClass({ variant });
|
|
45
|
+
return skinVisualClass(visual, resolveFieldShellSurfaceClass({ variant }));
|
|
47
46
|
}
|
|
48
47
|
function selectGroupShellClass(groupSegment) {
|
|
49
48
|
if (groupSegment) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { resolveVariantVisual } from "../../../skins/resolveVariantVisual.js";
|
|
1
|
+
import { resolveVariantVisual, skinVisualClass } from "../../../skins/resolveVariantVisual.js";
|
|
2
2
|
import { cn } from "../../../utils/cn.js";
|
|
3
3
|
import { KIT_SELECTION_INDICATOR_VARIANTS } from "./selectionIndicatorTypes.js";
|
|
4
4
|
const SELECTION_INDICATOR_SIZE_CLASS = {
|
|
@@ -100,7 +100,7 @@ function selectionIndicatorFillClass(variant) {
|
|
|
100
100
|
return cn(SELECTION_INDICATOR_FILL_BASE_CLASS, visual.className);
|
|
101
101
|
}
|
|
102
102
|
const surfaceClass = visual.key === "secondary" ? SELECTION_INDICATOR_FILL_SECONDARY_CLASS : SELECTION_INDICATOR_FILL_CLASS;
|
|
103
|
-
return cn(SELECTION_INDICATOR_FILL_BASE_CLASS, surfaceClass);
|
|
103
|
+
return cn(SELECTION_INDICATOR_FILL_BASE_CLASS, surfaceClass, visual.extend);
|
|
104
104
|
}
|
|
105
105
|
function selectionIndicatorMarkColorClass(variant) {
|
|
106
106
|
const key = resolveVariantVisual(
|
|
@@ -131,17 +131,10 @@ function selectionIndicatorVariantClass(variant, _selected) {
|
|
|
131
131
|
KIT_SELECTION_INDICATOR_VARIANTS,
|
|
132
132
|
"selectionIndicator.root"
|
|
133
133
|
);
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
case "secondary":
|
|
139
|
-
return "border-token bg-secondary";
|
|
140
|
-
case "outline":
|
|
141
|
-
return "border border-primary bg-surface";
|
|
142
|
-
default:
|
|
143
|
-
return "border border-primary bg-surface";
|
|
144
|
-
}
|
|
134
|
+
return skinVisualClass(
|
|
135
|
+
visual,
|
|
136
|
+
visual.key === "secondary" ? "border-token bg-secondary" : "border border-primary bg-surface"
|
|
137
|
+
);
|
|
145
138
|
}
|
|
146
139
|
export {
|
|
147
140
|
SELECTION_INDICATOR_DASH_CLASS,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { resolveVariantVisual } from "../../../skins/resolveVariantVisual.js";
|
|
1
|
+
import { resolveVariantVisual, skinVisualClass } from "../../../skins/resolveVariantVisual.js";
|
|
2
2
|
import { cn } from "../../../utils/cn.js";
|
|
3
3
|
import { SELECTION_INDICATOR_ICON_CLASS, SELECTION_INDICATOR_RADIUS_CLASS, SELECTION_INDICATOR_SHELL_CLASS } from "../SelectionIndicator/selectionIndicatorStyles.js";
|
|
4
4
|
import { KIT_SELECTION_THUMB_VARIANTS } from "./selectionThumbTypes.js";
|
|
@@ -17,7 +17,7 @@ function selectionThumbShellClass({
|
|
|
17
17
|
KIT_SELECTION_THUMB_VARIANTS,
|
|
18
18
|
"selectionIndicator.root"
|
|
19
19
|
);
|
|
20
|
-
const surface = visual.className !== void 0 ? cn(SELECTION_THUMB_SHELL_LAYOUT_CLASS, visual.className) : SELECTION_THUMB_SHELL_DEFAULT_CLASS;
|
|
20
|
+
const surface = visual.className !== void 0 ? cn(SELECTION_THUMB_SHELL_LAYOUT_CLASS, visual.className) : cn(SELECTION_THUMB_SHELL_DEFAULT_CLASS, visual.extend);
|
|
21
21
|
return cn(
|
|
22
22
|
SELECTION_INDICATOR_SHELL_CLASS,
|
|
23
23
|
SELECTION_INDICATOR_RADIUS_CLASS[size],
|
|
@@ -32,8 +32,7 @@ function selectionThumbIconColorClass(variant = "default") {
|
|
|
32
32
|
KIT_SELECTION_THUMB_VARIANTS,
|
|
33
33
|
"selectionThumbIcon.root"
|
|
34
34
|
);
|
|
35
|
-
|
|
36
|
-
return "text-primary";
|
|
35
|
+
return skinVisualClass(visual, "text-primary");
|
|
37
36
|
}
|
|
38
37
|
function selectionThumbIconRootClass({
|
|
39
38
|
variant = "default",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SELECTION_INDICATOR_RADIUS_CLASS } from "../SelectionIndicator/selectionIndicatorStyles.js";
|
|
2
2
|
import { scaleFieldRootClassName } from "../utils/scaleFieldRootClassName.js";
|
|
3
|
-
import { resolveVariantVisual, usesKitElevation } from "../../../skins/resolveVariantVisual.js";
|
|
3
|
+
import { resolveVariantVisual, skinVisualClass, usesKitElevation } from "../../../skins/resolveVariantVisual.js";
|
|
4
4
|
import { KIT_SLIDER_VARIANTS } from "./sliderTypes.js";
|
|
5
5
|
import { cn } from "../../../utils/cn.js";
|
|
6
6
|
function sliderThicknessToCss(thickness) {
|
|
@@ -72,7 +72,7 @@ function sliderFillClass({
|
|
|
72
72
|
className
|
|
73
73
|
}) {
|
|
74
74
|
const visual = resolveVariantVisual(variant, KIT_SLIDER_VARIANTS, "slider.fill");
|
|
75
|
-
const surface = visual
|
|
75
|
+
const surface = skinVisualClass(visual, SLIDER_FILL_DEFAULT_CLASS);
|
|
76
76
|
return cn(
|
|
77
77
|
SLIDER_FILL_LAYOUT_CLASS,
|
|
78
78
|
isHorizontal ? SLIDER_FILL_HORIZONTAL_CLASS : SLIDER_FILL_VERTICAL_CLASS,
|
|
@@ -102,6 +102,7 @@ function sliderTrackHitAreaClass({
|
|
|
102
102
|
skinSurface && SELECTION_INDICATOR_RADIUS_CLASS[size],
|
|
103
103
|
skinSurface && SLIDER_RAIL_SKIN_SHAPE_CLASS,
|
|
104
104
|
visual.className,
|
|
105
|
+
visual.extend,
|
|
105
106
|
slotClass,
|
|
106
107
|
className
|
|
107
108
|
);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { resolveVariantVisual } from "../../../skins/resolveVariantVisual.js";
|
|
1
|
+
import { resolveVariantVisual, skinVisualClass } from "../../../skins/resolveVariantVisual.js";
|
|
2
2
|
import { cn } from "../../../utils/cn.js";
|
|
3
3
|
import { KIT_SURFACE_VARIANTS } from "./surfaceTypes.js";
|
|
4
4
|
const SURFACE_VARIANT_CLASS = {
|
|
@@ -35,8 +35,7 @@ function surfaceRootClass({
|
|
|
35
35
|
}) {
|
|
36
36
|
const visual = resolveVariantVisual(variant, KIT_SURFACE_VARIANTS, "surface.root");
|
|
37
37
|
return cn(
|
|
38
|
-
visual
|
|
39
|
-
visual.className === void 0 && SURFACE_VARIANT_CLASS[visual.key],
|
|
38
|
+
skinVisualClass(visual, SURFACE_BASE_CLASS, SURFACE_VARIANT_CLASS[visual.key]),
|
|
40
39
|
SURFACE_RADIUS_CLASS[radius],
|
|
41
40
|
SURFACE_SHADOW_CLASS[shadow],
|
|
42
41
|
SURFACE_PADDING_CLASS[padding],
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SELECTION_INDICATOR_RADIUS_CLASS } from "../SelectionIndicator/selectionIndicatorStyles.js";
|
|
2
2
|
import { optionControlGridClass, optionSecondaryCellClass, optionErrorRow, optionLabelCellClass, optionControlCellClass } from "../utils/optionControlGridLayout.js";
|
|
3
3
|
import { sliderThicknessToCss } from "../Slider/sliderStyles.js";
|
|
4
|
-
import { resolveVariantVisual } from "../../../skins/resolveVariantVisual.js";
|
|
4
|
+
import { resolveVariantVisual, skinVisualClass } from "../../../skins/resolveVariantVisual.js";
|
|
5
5
|
import { SWITCH_LAYOUT } from "./switchGeometry.js";
|
|
6
6
|
import { KIT_SWITCH_VARIANTS } from "./switchTypes.js";
|
|
7
7
|
import { cn } from "../../../utils/cn.js";
|
|
@@ -80,7 +80,7 @@ function switchTrackClass({
|
|
|
80
80
|
KIT_SWITCH_VARIANTS,
|
|
81
81
|
"selectionIndicator.root"
|
|
82
82
|
);
|
|
83
|
-
const surface = visual
|
|
83
|
+
const surface = skinVisualClass(visual, SWITCH_TRACK_DEFAULT_CLASS);
|
|
84
84
|
return cn(
|
|
85
85
|
SWITCH_TRACK_BASE_CLASS,
|
|
86
86
|
SELECTION_INDICATOR_RADIUS_CLASS[size],
|
|
@@ -92,8 +92,7 @@ function switchTrackClass({
|
|
|
92
92
|
}
|
|
93
93
|
function switchFillSurfaceClass(variant = "default") {
|
|
94
94
|
const visual = resolveVariantVisual(variant, KIT_SWITCH_VARIANTS, "switch.fill");
|
|
95
|
-
|
|
96
|
-
return SWITCH_FILL_COLOR_CLASS;
|
|
95
|
+
return skinVisualClass(visual, SWITCH_FILL_COLOR_CLASS);
|
|
97
96
|
}
|
|
98
97
|
function switchTrackCustomStyle(thickness) {
|
|
99
98
|
if (thickness == null) return void 0;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
3
|
-
import { forwardRef, memo, useRef, useCallback,
|
|
3
|
+
import { forwardRef, memo, useRef, useCallback, useLayoutEffect, useState, Children, isValidElement, useMemo } from "react";
|
|
4
4
|
import { focusKeyboard } from "../utils/focusElement.js";
|
|
5
5
|
import { dataFlag } from "../utils/dataContract.js";
|
|
6
6
|
import { tableCellRole, tableRowRole, columnAriaSort, tableColumnHeaderRole, tableAriaMultiSelectable, tableContentRole, rowAriaSelected, tableIsSelectableGrid } from "./tableA11y.js";
|
|
7
7
|
import { isTableEmptyElement, resolveColumnSortDirection, resolveNextSortDescriptor, tableSortButtons, tableBumpSortButton, hasTableLabel, TONED_ROW_DEFAULT_TONE, moveVirtualTableRow, tableSelectableRows, tableBumpRow, TABLE_ROW_KEY_ATTR, TABLE_VIRTUAL_INDEX_ATTR } from "./tableAPI.js";
|
|
8
8
|
import { useTableSlotMotion, TableSortChevron, useTableRowSelectionMotion } from "./tableAnimations.js";
|
|
9
9
|
import { useTableClassNames, useTableContent, useTableVariant, useTableSize, useTableRow, useOptionalTableMotionScope, TableMotionProvider, useTableMotionScope, useTableRowIsSelected, useTableRowIsFocusTarget, useTableVirtual, TableRowProvider } from "./tableContext.js";
|
|
10
|
-
import { TABLE_FOOTER_CLASS, TABLE_BODY_EMPTY_CELL_CLASS, TABLE_CAPTION_CLASS, tableColumnLabelClass, TABLE_COLUMN_MIN_WIDTH, TABLE_COLUMN_INNER_CLASS, tableColumnSortButtonClass, TABLE_COLUMN_RESIZE_HANDLE_CLASS, tableColumnClass, TABLE_HEADER_ROW_VARIANT_CLASS, tableContentClass, TABLE_SCROLL_STICKY_CLASS, TABLE_SCROLL_CONTAINER_CLASS, tableCellClass, tableRowClass } from "./tableStyles.js";
|
|
10
|
+
import { TABLE_FOOTER_CLASS, TABLE_BODY_EMPTY_CELL_CLASS, TABLE_CAPTION_CLASS, tableColumnLabelClass, TABLE_COLUMN_MIN_WIDTH, TABLE_COLUMN_INNER_CLASS, tableColumnSortButtonClass, TABLE_COLUMN_RESIZE_HANDLE_CLASS, TABLE_COLUMN_RESIZE_GRIP_CLASS, TABLE_COLUMN_RESIZE_GRIP_MARK_CLASS, TABLE_COLUMN_RESIZE_GRIP_LINE_CLASS, tableColumnClass, TABLE_HEADER_ROW_VARIANT_CLASS, tableContentClass, TABLE_SCROLL_STICKY_CLASS, TABLE_SCROLL_CONTAINER_CLASS, tableCellClass, tableRowClass } from "./tableStyles.js";
|
|
11
11
|
import { TableVirtualRows } from "./tableVirtualRows.js";
|
|
12
12
|
import { isRtlElement } from "../utils/readingDirection.js";
|
|
13
13
|
import { formatBurneLabel } from "../../../theme/burneLabels.js";
|
|
@@ -289,6 +289,19 @@ const TableColumn = forwardRef(
|
|
|
289
289
|
const headerName = typeof children === "string" ? children : void 0;
|
|
290
290
|
const resizeLabel = headerName ? formatBurneLabel(labels.resizeColumnNamed, { name: headerName }) : labels.resizeColumn;
|
|
291
291
|
const columnRef = useRef(null);
|
|
292
|
+
useLayoutEffect(() => {
|
|
293
|
+
const cell = columnRef.current;
|
|
294
|
+
if (!cell || !columnResize) return;
|
|
295
|
+
const row = cell.parentElement;
|
|
296
|
+
if (!row) return;
|
|
297
|
+
const cells = [...row.children];
|
|
298
|
+
const index = cells.indexOf(cell);
|
|
299
|
+
if (index < 0) return;
|
|
300
|
+
cell.style.zIndex = String(10 + cells.length - index);
|
|
301
|
+
return () => {
|
|
302
|
+
cell.style.zIndex = "";
|
|
303
|
+
};
|
|
304
|
+
}, [columnResize]);
|
|
292
305
|
const [columnMax, setColumnMax] = useState();
|
|
293
306
|
useLayoutEffect(() => {
|
|
294
307
|
const table = columnRef.current?.closest("table");
|
|
@@ -403,7 +416,12 @@ const TableColumn = forwardRef(
|
|
|
403
416
|
onPointerUp: endResize,
|
|
404
417
|
onPointerCancel: endResize,
|
|
405
418
|
onLostPointerCapture: endResize,
|
|
406
|
-
onKeyDown: onResizeKeyDown
|
|
419
|
+
onKeyDown: onResizeKeyDown,
|
|
420
|
+
children: /* @__PURE__ */ jsxs("span", { className: TABLE_COLUMN_RESIZE_GRIP_CLASS, "aria-hidden": "true", children: [
|
|
421
|
+
/* @__PURE__ */ jsx("span", { className: TABLE_COLUMN_RESIZE_GRIP_MARK_CLASS }),
|
|
422
|
+
/* @__PURE__ */ jsx("span", { className: TABLE_COLUMN_RESIZE_GRIP_LINE_CLASS }),
|
|
423
|
+
/* @__PURE__ */ jsx("span", { className: TABLE_COLUMN_RESIZE_GRIP_MARK_CLASS })
|
|
424
|
+
] })
|
|
407
425
|
}
|
|
408
426
|
)
|
|
409
427
|
) : null
|
|
@@ -8,7 +8,16 @@ export declare const TABLE_SCROLL_STICKY_CLASS = "overflow-y-auto max-h-[var(--m
|
|
|
8
8
|
export declare const TABLE_VIRTUAL_SPACER_CELL_CLASS = "border-0 p-0";
|
|
9
9
|
export declare const TABLE_CONTENT_BASE_CLASS = "w-full";
|
|
10
10
|
export declare const TABLE_CONTENT_FIXED_CLASS = "table-fixed";
|
|
11
|
-
|
|
11
|
+
/**
|
|
12
|
+
* Sits on the column's inline end and shifts halfway across that edge,
|
|
13
|
+
* so the rule is the boundary with the next column. The last column has
|
|
14
|
+
* no next column: `in-[th:last-child]` hides its handle.
|
|
15
|
+
*/
|
|
16
|
+
export declare const TABLE_COLUMN_RESIZE_HANDLE_CLASS = "absolute inset-y-0 end-0 z-10 flex cursor-col-resize touch-none items-center justify-center focus-ring ltr:translate-x-1/2 rtl:-translate-x-1/2 in-[th:last-child]:hidden";
|
|
17
|
+
/** Decorative grip: one short mark, the column rule, one short mark. */
|
|
18
|
+
export declare const TABLE_COLUMN_RESIZE_GRIP_CLASS = "pointer-events-none flex h-full items-center gap-px";
|
|
19
|
+
export declare const TABLE_COLUMN_RESIZE_GRIP_MARK_CLASS = "h-mid w-px shrink-0 rounded-full bg-border";
|
|
20
|
+
export declare const TABLE_COLUMN_RESIZE_GRIP_LINE_CLASS = "h-full w-px shrink-0 self-stretch bg-border";
|
|
12
21
|
export declare const TABLE_COLUMN_MIN_WIDTH = 64;
|
|
13
22
|
export declare const TABLE_CONTENT_VARIANT_CLASS: Record<KitTableVariant, string>;
|
|
14
23
|
export declare const TABLE_HEADER_ROW_VARIANT_CLASS: Record<KitTableVariant, string>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TEXT_COLOR_TRANSITION, hoverVariant } from "../utils/hoverVariant.js";
|
|
2
|
-
import { resolveVariantVisual } from "../../../skins/resolveVariantVisual.js";
|
|
2
|
+
import { resolveVariantVisual, skinVisualClass } from "../../../skins/resolveVariantVisual.js";
|
|
3
3
|
import { cn } from "../../../utils/cn.js";
|
|
4
4
|
import { KIT_TABLE_VARIANTS } from "./tableTypes.js";
|
|
5
5
|
const TABLE_ROOT_BASE_CLASS = "w-full";
|
|
@@ -14,7 +14,10 @@ const TABLE_SCROLL_STICKY_CLASS = "overflow-y-auto max-h-[var(--max-component-2x
|
|
|
14
14
|
const TABLE_VIRTUAL_SPACER_CELL_CLASS = "border-0 p-0";
|
|
15
15
|
const TABLE_CONTENT_BASE_CLASS = "w-full";
|
|
16
16
|
const TABLE_CONTENT_FIXED_CLASS = "table-fixed";
|
|
17
|
-
const TABLE_COLUMN_RESIZE_HANDLE_CLASS = "absolute inset-y-0 end-0 z-10
|
|
17
|
+
const TABLE_COLUMN_RESIZE_HANDLE_CLASS = "absolute inset-y-0 end-0 z-10 flex cursor-col-resize touch-none items-center justify-center focus-ring ltr:translate-x-1/2 rtl:-translate-x-1/2 in-[th:last-child]:hidden";
|
|
18
|
+
const TABLE_COLUMN_RESIZE_GRIP_CLASS = "pointer-events-none flex h-full items-center gap-px";
|
|
19
|
+
const TABLE_COLUMN_RESIZE_GRIP_MARK_CLASS = "h-mid w-px shrink-0 rounded-full bg-border";
|
|
20
|
+
const TABLE_COLUMN_RESIZE_GRIP_LINE_CLASS = "h-full w-px shrink-0 self-stretch bg-border";
|
|
18
21
|
const TABLE_COLUMN_MIN_WIDTH = 64;
|
|
19
22
|
const TABLE_CONTENT_VARIANT_CLASS = {
|
|
20
23
|
default: "border-collapse",
|
|
@@ -96,7 +99,7 @@ function tableRootClass({
|
|
|
96
99
|
const kitDefault = visual.className === void 0 && visual.key === "default";
|
|
97
100
|
return cn(
|
|
98
101
|
TABLE_ROOT_BASE_CLASS,
|
|
99
|
-
visual
|
|
102
|
+
skinVisualClass(visual, TABLE_ROOT_VARIANT_CLASS[visual.key]),
|
|
100
103
|
kitDefault && !stickyHeader && TABLE_ROOT_CLIP_CLASS,
|
|
101
104
|
slotClass,
|
|
102
105
|
className
|
|
@@ -112,7 +115,7 @@ function tableContentClass({
|
|
|
112
115
|
return cn(
|
|
113
116
|
TABLE_CONTENT_BASE_CLASS,
|
|
114
117
|
columnResize && TABLE_CONTENT_FIXED_CLASS,
|
|
115
|
-
visual
|
|
118
|
+
skinVisualClass(visual, TABLE_CONTENT_VARIANT_CLASS[visual.key]),
|
|
116
119
|
slotClass,
|
|
117
120
|
className
|
|
118
121
|
);
|
|
@@ -129,7 +132,7 @@ function tableColumnClass({
|
|
|
129
132
|
const visual = resolveVariantVisual(variant, KIT_TABLE_VARIANTS, "table.column");
|
|
130
133
|
return cn(
|
|
131
134
|
TABLE_COLUMN_BASE_CLASS,
|
|
132
|
-
visual
|
|
135
|
+
skinVisualClass(visual, TABLE_COLUMN_VARIANT_CLASS[visual.key]),
|
|
133
136
|
stickyHeader && TABLE_COLUMN_STICKY_CLASS[visual.key],
|
|
134
137
|
TABLE_SIZE_TEXT_CLASS[size],
|
|
135
138
|
TABLE_SIZE_PAD_CLASS[size],
|
|
@@ -167,7 +170,7 @@ function tableRowClass({
|
|
|
167
170
|
const visual = resolveVariantVisual(variant, KIT_TABLE_VARIANTS, "table.row");
|
|
168
171
|
return cn(
|
|
169
172
|
TABLE_ROW_BASE_CLASS,
|
|
170
|
-
visual
|
|
173
|
+
skinVisualClass(visual, TABLE_ROW_VARIANT_CLASS[visual.key]),
|
|
171
174
|
isSelectable && TABLE_ROW_SELECTABLE_CLASS,
|
|
172
175
|
!isToned && (isSelected ? TABLE_ROW_SELECTED_CLASS : hoverVariant()),
|
|
173
176
|
isSelectable && TABLE_ROW_FOCUS_CLASS,
|
|
@@ -188,7 +191,7 @@ function tableCellClass({
|
|
|
188
191
|
const toneSurface = tone ? TABLE_ROW_TONE_SURFACE[tone] : void 0;
|
|
189
192
|
return cn(
|
|
190
193
|
TABLE_CELL_BASE_CLASS,
|
|
191
|
-
visual
|
|
194
|
+
skinVisualClass(visual, TABLE_CELL_VARIANT_CLASS[visual.key]),
|
|
192
195
|
TABLE_SIZE_TEXT_CLASS[size],
|
|
193
196
|
TABLE_SIZE_PAD_CLASS[size],
|
|
194
197
|
isToned && toneSurface,
|
|
@@ -215,6 +218,9 @@ export {
|
|
|
215
218
|
TABLE_COLUMN_INNER_CLASS,
|
|
216
219
|
TABLE_COLUMN_LABEL_CLASS,
|
|
217
220
|
TABLE_COLUMN_MIN_WIDTH,
|
|
221
|
+
TABLE_COLUMN_RESIZE_GRIP_CLASS,
|
|
222
|
+
TABLE_COLUMN_RESIZE_GRIP_LINE_CLASS,
|
|
223
|
+
TABLE_COLUMN_RESIZE_GRIP_MARK_CLASS,
|
|
218
224
|
TABLE_COLUMN_RESIZE_HANDLE_CLASS,
|
|
219
225
|
TABLE_COLUMN_SORTABLE_CLASS,
|
|
220
226
|
TABLE_COLUMN_SORT_BUTTON_CLASS,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TEXT_COLOR_TRANSITION } from "../utils/hoverVariant.js";
|
|
2
|
-
import { resolveVariantVisual } from "../../../skins/resolveVariantVisual.js";
|
|
2
|
+
import { resolveVariantVisual, skinVisualClass } from "../../../skins/resolveVariantVisual.js";
|
|
3
3
|
import { cn } from "../../../utils/cn.js";
|
|
4
4
|
import { KIT_TABS_VARIANTS } from "./tabsTypes.js";
|
|
5
5
|
import { CONTROL_SIZE_LAYOUT } from "../utils/sizeLayout/control.js";
|
|
@@ -51,7 +51,7 @@ function tabsListClass({
|
|
|
51
51
|
"flex flex-col gap-xsmall",
|
|
52
52
|
isSurface ? "items-start" : "items-stretch border-s-token"
|
|
53
53
|
),
|
|
54
|
-
visual
|
|
54
|
+
skinVisualClass(visual, LIST_VARIANT_CLASS[visual.key]),
|
|
55
55
|
slotClass,
|
|
56
56
|
className
|
|
57
57
|
);
|
|
@@ -64,7 +64,7 @@ function tabsIndicatorClass({
|
|
|
64
64
|
return cn(
|
|
65
65
|
"pointer-events-none absolute z-0 motion-reduce:transition-none",
|
|
66
66
|
visual.key === "default" ? "rounded-full" : tabsSurfaceRadiusClass(visual.key),
|
|
67
|
-
visual
|
|
67
|
+
skinVisualClass(visual, INDICATOR_VARIANT_CLASS[visual.key]),
|
|
68
68
|
slotClass
|
|
69
69
|
);
|
|
70
70
|
}
|
|
@@ -88,6 +88,7 @@ function tabsTabClass({
|
|
|
88
88
|
isDisabled ? "cursor-not-allowed opacity-45" : "cursor-pointer",
|
|
89
89
|
isSelected ? "text-primary" : "text-muted hover:text-primary",
|
|
90
90
|
!isSelected && !isDisabled && TEXT_COLOR_TRANSITION,
|
|
91
|
+
skinVisualClass(visual),
|
|
91
92
|
slotClass,
|
|
92
93
|
className
|
|
93
94
|
);
|