burne-ui 2.0.3 → 2.0.5
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/skin-build.mjs +4 -2
- package/cli/skin-stylesheet.d.mts +9 -6
- package/cli/skin-stylesheet.mjs +20 -4
- package/dist/cli/skin-stylesheet.js +11 -4
- 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/calendarStyles.js +2 -2
- 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/datePickerParts.js +7 -0
- 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.js +2 -2
- package/dist/components/core/Expandable/expandableStyles.js +2 -2
- package/dist/components/core/Field/fieldParts.d.ts +1 -1
- package/dist/components/core/Input/inputStyles.js +2 -3
- package/dist/components/core/Kbd/kbdStyles.js +2 -3
- package/dist/components/core/ListBox/listBoxStyles.js +2 -2
- package/dist/components/core/NumberInput/numberInputStyles.js +2 -3
- package/dist/components/core/PinInput/pinInputStyles.js +2 -3
- 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/tableStyles.js +6 -6
- package/dist/components/core/Tabs/tabsParts.js +2 -2
- package/dist/components/core/Tabs/tabsStyles.d.ts +3 -1
- package/dist/components/core/Tabs/tabsStyles.js +8 -3
- package/dist/components/core/Tabs/useSlidingTabIndicator.d.ts +2 -2
- package/dist/components/core/TagsInput/tagsInputStyles.js +2 -3
- package/dist/components/core/TextArea/textAreaStyles.js +1 -0
- package/dist/components/core/TimeField/timeFieldStyles.js +1 -0
- package/dist/components/core/Toast/toastStyles.js +2 -2
- package/dist/components/core/ToggleButton/toggleButtonStyles.js +1 -0
- package/dist/components/core/Tooltip/tooltipStyles.js +3 -3
- package/dist/components/core/utils/slotMotion/createMotionScope.js +4 -0
- package/dist/components/core/utils/slotMotion/useMotionPart.js +3 -3
- package/dist/internal.js +1 -2
- package/dist/skins/resolveVariantVisual.d.ts +6 -0
- package/dist/skins/resolveVariantVisual.js +7 -1
- package/dist/skins/skinDocument.d.ts +10 -3
- package/dist/skins/skinDocument.js +11 -6
- package/dist/skins/skinTypes.d.ts +11 -3
- package/dist/studio/designDocument.js +1 -2
- package/dist/studio/liveSkinSlots.d.ts +2 -0
- package/dist/studio/liveSkinSlots.js +8 -0
- package/dist/studio/studioMode.d.ts +4 -4
- package/dist/studio/studioMode.js +3 -17
- package/dist/studio/studioModeContext.d.ts +4 -2
- package/dist/studio/studioModeContext.js +7 -6
- package/dist/studio.d.ts +3 -2
- package/dist/studio.js +3 -3
- package/package.json +1 -1
package/cli/skin-build.mjs
CHANGED
|
@@ -18,11 +18,13 @@ function authorCss(css) {
|
|
|
18
18
|
|
|
19
19
|
export function buildSkin(dir) {
|
|
20
20
|
const loaded = loadSkinPackage(dir);
|
|
21
|
-
const
|
|
21
|
+
const live = readSkinLiveSlots();
|
|
22
|
+
const errors = validateSkin({ ...loaded, slots: readSkinSlots(), live });
|
|
22
23
|
if (errors.length > 0) {
|
|
23
24
|
throw new Error(errors.join("\n"));
|
|
24
25
|
}
|
|
25
|
-
const
|
|
26
|
+
const targets = new Set(live.targets);
|
|
27
|
+
const generated = renderSkinStylesheet(loaded.definition, { isTarget: (slot) => targets.has(slot) }).trimEnd();
|
|
26
28
|
const extra = authorCss(loaded.css);
|
|
27
29
|
const css = extra ? `${generated}\n\n${extra}\n` : `${generated}\n`;
|
|
28
30
|
const outDir = join(dir, "dist");
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
export function renderSkinStylesheet(
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
export function renderSkinStylesheet(
|
|
2
|
+
skin: {
|
|
3
|
+
name: string;
|
|
4
|
+
tokens?: Record<string, string>;
|
|
5
|
+
tokensLight?: Record<string, string>;
|
|
6
|
+
tokensDark?: Record<string, string>;
|
|
7
|
+
},
|
|
8
|
+
options?: { isTarget?: (slot: string) => boolean },
|
|
9
|
+
): string;
|
package/cli/skin-stylesheet.mjs
CHANGED
|
@@ -21,7 +21,12 @@ function sameTokenRecord(a, b) {
|
|
|
21
21
|
return aKeys.every((key) => a[key] === b[key]);
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
/**
|
|
25
|
+
* `options.isTarget(slot)` tells a target slot (class) from a part (`data-skin-slot`).
|
|
26
|
+
* Without it every rule slot is a target.
|
|
27
|
+
*/
|
|
28
|
+
export function renderSkinStylesheet(skin, options = {}) {
|
|
29
|
+
const isTarget = typeof options.isTarget === "function" ? options.isTarget : () => true;
|
|
25
30
|
const name = String(skin.name).replace(/"/g, "");
|
|
26
31
|
const dark = mergedSkinTokens(skin.tokens, skin.tokensDark);
|
|
27
32
|
const light = mergedSkinTokens(skin.tokens, skin.tokensLight);
|
|
@@ -39,7 +44,7 @@ export function renderSkinStylesheet(skin) {
|
|
|
39
44
|
lightDiffers ? cssBlock(darkSelector, dark).trimEnd() : "",
|
|
40
45
|
renderSkinFonts(skin),
|
|
41
46
|
renderSkinProperties(skin),
|
|
42
|
-
renderSkinRules(skin),
|
|
47
|
+
renderSkinRules(skin, isTarget),
|
|
43
48
|
"",
|
|
44
49
|
]
|
|
45
50
|
.filter((part) => part !== "")
|
|
@@ -58,13 +63,24 @@ function declarationBlock(selector, style) {
|
|
|
58
63
|
return `${selector} {\n${body}\n}`;
|
|
59
64
|
}
|
|
60
65
|
|
|
61
|
-
|
|
66
|
+
/**
|
|
67
|
+
* A target slot keeps its `.skin-{name}-{slot}` class. Any other rule slot is a part
|
|
68
|
+
* (`card.title`) marked by `data-skin-slot`, scoped to a node the skin paints.
|
|
69
|
+
*/
|
|
70
|
+
function ruleSelector(skin, slot, isTarget) {
|
|
71
|
+
if (isTarget(slot)) return `.${ruleClass(skin.name, slot)}`;
|
|
72
|
+
const name = String(skin.name).replace(/"/g, "");
|
|
73
|
+
const part = String(slot).replace(/"/g, "");
|
|
74
|
+
return `:is([data-variant="${name}"], [data-skin="${name}"]) [data-skin-slot~="${part}"]`;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
function renderSkinRules(skin, isTarget) {
|
|
62
78
|
const rules = skin.rules;
|
|
63
79
|
if (!rules || typeof rules !== "object") return "";
|
|
64
80
|
const blocks = [];
|
|
65
81
|
for (const [slot, spec] of Object.entries(rules)) {
|
|
66
82
|
if (!spec || typeof spec !== "object") continue;
|
|
67
|
-
const selector =
|
|
83
|
+
const selector = ruleSelector(skin, slot, isTarget);
|
|
68
84
|
// Theme branches before :hover. `:where` keeps the dark page rule at class
|
|
69
85
|
// specificity, so a later `:hover` of the same class still wins.
|
|
70
86
|
// `<html>` in the dark theme has no attribute, so the page matches `:root:not([data-theme="light"])`.
|
|
@@ -14,7 +14,8 @@ function sameTokenRecord(a, b) {
|
|
|
14
14
|
if (aKeys.length !== Object.keys(b).length) return false;
|
|
15
15
|
return aKeys.every((key) => a[key] === b[key]);
|
|
16
16
|
}
|
|
17
|
-
function renderSkinStylesheet(skin) {
|
|
17
|
+
function renderSkinStylesheet(skin, options = {}) {
|
|
18
|
+
const isTarget = typeof options.isTarget === "function" ? options.isTarget : () => true;
|
|
18
19
|
const name = String(skin.name).replace(/"/g, "");
|
|
19
20
|
const dark = mergedSkinTokens(skin.tokens, skin.tokensDark);
|
|
20
21
|
const light = mergedSkinTokens(skin.tokens, skin.tokensLight);
|
|
@@ -32,7 +33,7 @@ function renderSkinStylesheet(skin) {
|
|
|
32
33
|
lightDiffers ? cssBlock(darkSelector, dark).trimEnd() : "",
|
|
33
34
|
renderSkinFonts(skin),
|
|
34
35
|
renderSkinProperties(skin),
|
|
35
|
-
renderSkinRules(skin),
|
|
36
|
+
renderSkinRules(skin, isTarget),
|
|
36
37
|
""
|
|
37
38
|
].filter((part) => part !== "").join("\n\n");
|
|
38
39
|
}
|
|
@@ -48,13 +49,19 @@ function declarationBlock(selector, style) {
|
|
|
48
49
|
${body}
|
|
49
50
|
}`;
|
|
50
51
|
}
|
|
51
|
-
function
|
|
52
|
+
function ruleSelector(skin, slot, isTarget) {
|
|
53
|
+
if (isTarget(slot)) return `.${ruleClass(skin.name, slot)}`;
|
|
54
|
+
const name = String(skin.name).replace(/"/g, "");
|
|
55
|
+
const part = String(slot).replace(/"/g, "");
|
|
56
|
+
return `:is([data-variant="${name}"], [data-skin="${name}"]) [data-skin-slot~="${part}"]`;
|
|
57
|
+
}
|
|
58
|
+
function renderSkinRules(skin, isTarget) {
|
|
52
59
|
const rules = skin.rules;
|
|
53
60
|
if (!rules || typeof rules !== "object") return "";
|
|
54
61
|
const blocks = [];
|
|
55
62
|
for (const [slot, spec] of Object.entries(rules)) {
|
|
56
63
|
if (!spec || typeof spec !== "object") continue;
|
|
57
|
-
const selector =
|
|
64
|
+
const selector = ruleSelector(skin, slot, isTarget);
|
|
58
65
|
const darkSelector = `:where(:root:not([data-theme="light"])) ${selector}, [data-theme="dark"] ${selector}`;
|
|
59
66
|
blocks.push(declarationBlock(selector, spec.style));
|
|
60
67
|
blocks.push(declarationBlock(darkSelector, spec.dark));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { alertIndicatorWrapperTextClass, alertSurfaceClass } from "../../core/Alert/alertStyles.js";
|
|
2
2
|
import { KIT_ALERT_VARIANTS } from "../../core/Alert/alertTypes.js";
|
|
3
3
|
import { dialogOverlayEnterStyle, dialogOverlayClass } from "../../core/Dialog/dialogStyles.js";
|
|
4
|
-
import { resolveVariantVisual } from "../../../skins/resolveVariantVisual.js";
|
|
4
|
+
import { resolveVariantVisual, skinVisualClass } from "../../../skins/resolveVariantVisual.js";
|
|
5
5
|
import { cn } from "../../../utils/cn.js";
|
|
6
6
|
import { panelSizeLayout, PANEL_SIZE_LAYOUT } from "../../core/utils/sizeLayout/panel.js";
|
|
7
7
|
const ALERT_DIALOG_CONTENT_CLASS = "flex min-h-0 flex-1 flex-col text-start";
|
|
@@ -83,7 +83,7 @@ function alertDialogPanelClass({
|
|
|
83
83
|
sizePreset.rounded,
|
|
84
84
|
ALERT_DIALOG_PANEL_SURFACE_CLASS,
|
|
85
85
|
sizePreset.maxHeight,
|
|
86
|
-
visual
|
|
86
|
+
skinVisualClass(visual, alertDialogPanelSurfaceClass(variant)),
|
|
87
87
|
slotClass,
|
|
88
88
|
className
|
|
89
89
|
);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { KIT_BUTTON_VARIANTS } from "../../core/Button/buttonTypes.js";
|
|
2
|
-
import { usesKitElevation, resolveVariantVisual } from "../../../skins/resolveVariantVisual.js";
|
|
2
|
+
import { usesKitElevation, resolveVariantVisual, skinVisualClass } from "../../../skins/resolveVariantVisual.js";
|
|
3
3
|
import { cn } from "../../../utils/cn.js";
|
|
4
4
|
import { CONTROL_SIZE_LAYOUT } from "../../core/utils/sizeLayout/control.js";
|
|
5
5
|
const BUTTON_GROUP_TEXT_VARIANT = {
|
|
@@ -74,7 +74,10 @@ function buttonGroupRootClass({
|
|
|
74
74
|
// border-color come from the root so `rounded-*` / `border-primary` on
|
|
75
75
|
// classNames.root retarget the visible frame without `after:*` overrides.
|
|
76
76
|
"relative rounded-base border-border",
|
|
77
|
-
|
|
77
|
+
skinVisualClass(
|
|
78
|
+
visual,
|
|
79
|
+
"after:pointer-events-none after:absolute after:inset-0 after:rounded-[inherit] after:border-solid after:[border-width:var(--border-width,1px)] after:border-inherit after:content-['']"
|
|
80
|
+
)
|
|
78
81
|
),
|
|
79
82
|
orientation === "horizontal" ? cn("flex-row flex-nowrap items-stretch", segmented && "gap-xsmall") : cn("flex-col flex-nowrap items-stretch", segmented && "gap-xsmall"),
|
|
80
83
|
className
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SEMANTIC_STATUS_TEXT } from "../utils/semanticStatusSurface.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_ALERT_VARIANTS } from "./alertTypes.js";
|
|
5
5
|
const ALERT_VARIANT_SURFACE = {
|
|
@@ -9,8 +9,7 @@ const ALERT_VARIANT_SURFACE = {
|
|
|
9
9
|
};
|
|
10
10
|
function alertSurfaceClass(variant, _status = "default") {
|
|
11
11
|
const visual = resolveVariantVisual(variant, KIT_ALERT_VARIANTS, "alert.root");
|
|
12
|
-
|
|
13
|
-
return ALERT_VARIANT_SURFACE[visual.key];
|
|
12
|
+
return skinVisualClass(visual, ALERT_VARIANT_SURFACE[visual.key]);
|
|
14
13
|
}
|
|
15
14
|
function alertIndicatorWrapperTextClass(status) {
|
|
16
15
|
if (status !== "default") return SEMANTIC_STATUS_TEXT[status];
|
|
@@ -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_AVATAR_VARIANTS } from "./avatarTypes.js";
|
|
4
4
|
const AVATAR_SIZE_CLASS = {
|
|
@@ -18,7 +18,7 @@ function avatarRootClass(size, variant, className) {
|
|
|
18
18
|
const visual = resolveVariantVisual(variant, KIT_AVATAR_VARIANTS, "avatar.root");
|
|
19
19
|
return cn(
|
|
20
20
|
"relative inline-flex shrink-0 select-none overflow-hidden text-start",
|
|
21
|
-
visual
|
|
21
|
+
skinVisualClass(visual, AVATAR_KIT_SURFACE),
|
|
22
22
|
AVATAR_SIZE_CLASS[size].root,
|
|
23
23
|
className
|
|
24
24
|
);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SEMANTIC_STATUS_TEXT, SEMANTIC_STATUS_OUTLINE_BORDER, SEMANTIC_STATUS_FILL } from "../utils/semanticStatusSurface.js";
|
|
2
2
|
import { cn } from "../../../utils/cn.js";
|
|
3
3
|
import { KIT_BADGE_VARIANTS } from "./badgeTypes.js";
|
|
4
|
-
import { resolveVariantVisual, isKitVariant } from "../../../skins/resolveVariantVisual.js";
|
|
4
|
+
import { resolveVariantVisual, skinVisualClass, isKitVariant } from "../../../skins/resolveVariantVisual.js";
|
|
5
5
|
import { ICON_SLOT_CLASS, iconSlotSizeClass } from "../utils/sizeLayout/iconSlot.js";
|
|
6
6
|
const BADGE_VARIANT_SURFACE = {
|
|
7
7
|
default: "bg-surface border-token text-foreground",
|
|
@@ -69,7 +69,9 @@ function dotFillClass(variant, status) {
|
|
|
69
69
|
}
|
|
70
70
|
function badgeVariantRootClass(variant, status) {
|
|
71
71
|
const visual = resolveVariantVisual(variant, KIT_BADGE_VARIANTS, "badge.root");
|
|
72
|
-
|
|
72
|
+
return skinVisualClass(visual, badgeKitSurfaceClass(variant, status));
|
|
73
|
+
}
|
|
74
|
+
function badgeKitSurfaceClass(variant, status) {
|
|
73
75
|
if (variant === "outline" && status !== "default") {
|
|
74
76
|
return "bg-transparent text-foreground";
|
|
75
77
|
}
|
|
@@ -104,8 +106,7 @@ function badgeSurfaceClass(variant, status = "default") {
|
|
|
104
106
|
}
|
|
105
107
|
function badgeDotSurfaceClass(variant, status) {
|
|
106
108
|
const visual = resolveVariantVisual(variant, KIT_BADGE_VARIANTS, "badge.root");
|
|
107
|
-
|
|
108
|
-
return dotFillClass(variant, status);
|
|
109
|
+
return skinVisualClass(visual, dotFillClass(variant, status));
|
|
109
110
|
}
|
|
110
111
|
const BADGE_ICON_SLOT_BASE = `inline-flex shrink-0 ${ICON_SLOT_CLASS}`;
|
|
111
112
|
function badgeIconSlotClass(size, slotClass) {
|
|
@@ -3,7 +3,7 @@ import { hoverVariant } from "../utils/hoverVariant.js";
|
|
|
3
3
|
import { SHADOW_LIFT_MOTION_CLASS } from "../utils/useShadowMotion.js";
|
|
4
4
|
import { colorToken } from "../../../tokens/index.js";
|
|
5
5
|
import { cn } from "../../../utils/cn.js";
|
|
6
|
-
import { resolveVariantVisual } from "../../../skins/resolveVariantVisual.js";
|
|
6
|
+
import { resolveVariantVisual, skinVisualClass } from "../../../skins/resolveVariantVisual.js";
|
|
7
7
|
import { KIT_BUTTON_VARIANTS } from "./buttonTypes.js";
|
|
8
8
|
import { CONTROL_SIZE_LAYOUT } from "../utils/sizeLayout/control.js";
|
|
9
9
|
import { ICON_SLOT_CLASS, iconSlotSizeClass } from "../utils/sizeLayout/iconSlot.js";
|
|
@@ -264,10 +264,8 @@ function buttonRippleTone(variant, status = "default") {
|
|
|
264
264
|
}
|
|
265
265
|
function buttonSurfaceMotionClass(status, variant, hasGroupSegment, blocked) {
|
|
266
266
|
const visual = resolveVariantVisual(variant, KIT_BUTTON_VARIANTS, "button.root");
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
}
|
|
270
|
-
return cn(
|
|
267
|
+
return skinVisualClass(
|
|
268
|
+
visual,
|
|
271
269
|
buttonVariantRootClass(variant, status),
|
|
272
270
|
buttonStatusClass(variant, status),
|
|
273
271
|
hasGroupSegment && "border-0 shadow-none",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TEXT_COLOR_TRANSITION, hoverVariant, 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_CALENDAR_VARIANTS } from "./calendarTypes.js";
|
|
5
5
|
const CALENDAR_WEEKDAY_CELL = {
|
|
@@ -120,7 +120,7 @@ function calendarRootClass(variant, size, className) {
|
|
|
120
120
|
const visual = resolveVariantVisual(variant, KIT_CALENDAR_VARIANTS, "calendar.root");
|
|
121
121
|
return cn(
|
|
122
122
|
CALENDAR_ROOT_SHELL_CLASS,
|
|
123
|
-
visual
|
|
123
|
+
skinVisualClass(visual, CALENDAR_ROOT_SURFACE[visual.key]),
|
|
124
124
|
CALENDAR_ROOT_PAD[size],
|
|
125
125
|
CALENDAR_ROOT_MIN_W[size],
|
|
126
126
|
className
|
|
@@ -88,6 +88,7 @@ function closeButtonRootClass({
|
|
|
88
88
|
usesKitElevation(variant, KIT_CLOSE_BUTTON_VARIANTS) && SHADOW_LIFT_MOTION_CLASS,
|
|
89
89
|
!disabled && hoverVariant(CLOSE_BUTTON_HOVER_VARIANT[visual.key]),
|
|
90
90
|
INTERACTIVE_VARIANT_ROOT[visual.key],
|
|
91
|
+
visual.extend,
|
|
91
92
|
sizeClasses.root,
|
|
92
93
|
disabled && CLOSE_BUTTON_DISABLED_CLASS,
|
|
93
94
|
slotRoot,
|
|
@@ -3,7 +3,7 @@ import { fieldShellHoverClass, fieldShellFocusRingClass, FIELD_SHELL_TRANSITION_
|
|
|
3
3
|
import { buttonGroupSegmentSurfaceClasses, buttonGroupRoundingClasses } from "../../composite/ButtonGroup/buttonGroupStyles.js";
|
|
4
4
|
import { KIT_INPUT_VARIANTS } from "../Input/inputTypes.js";
|
|
5
5
|
import { resolveFieldShellSurfaceClass } from "../utils/fieldShellVariant.js";
|
|
6
|
-
import { usesKitElevation, resolveVariantVisual } from "../../../skins/resolveVariantVisual.js";
|
|
6
|
+
import { usesKitElevation, resolveVariantVisual, skinVisualClass } from "../../../skins/resolveVariantVisual.js";
|
|
7
7
|
import { cn } from "../../../utils/cn.js";
|
|
8
8
|
import { CONTROL_SIZE_LAYOUT } from "../utils/sizeLayout/control.js";
|
|
9
9
|
import { iconSlotClass } from "../utils/sizeLayout/iconSlot.js";
|
|
@@ -34,8 +34,7 @@ function comboBoxShellSurface({
|
|
|
34
34
|
variant
|
|
35
35
|
}) {
|
|
36
36
|
const visual = resolveVariantVisual(variant, KIT_INPUT_VARIANTS, "comboBox.shell");
|
|
37
|
-
|
|
38
|
-
return resolveFieldShellSurfaceClass({ variant });
|
|
37
|
+
return skinVisualClass(visual, resolveFieldShellSurfaceClass({ variant }));
|
|
39
38
|
}
|
|
40
39
|
function comboBoxGroupShellClass(groupSegment) {
|
|
41
40
|
if (groupSegment) {
|
|
@@ -74,16 +74,23 @@ const DatePickerTrigger = forwardRef(
|
|
|
74
74
|
});
|
|
75
75
|
const icon = useDatePickerIconMotion(field.open);
|
|
76
76
|
const text = field.empty ? field.placeholder : field.display;
|
|
77
|
+
const openedByPointerRef = useRef(false);
|
|
77
78
|
const handleClick = (event) => {
|
|
78
79
|
onClick?.(event);
|
|
79
80
|
if (event.defaultPrevented || field.disabled || field.readOnly) return;
|
|
81
|
+
if (openedByPointerRef.current) {
|
|
82
|
+
openedByPointerRef.current = false;
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
80
85
|
if (field.open) field.setOpen(false);
|
|
86
|
+
else if (!trigger.openingRef.current) trigger.openAfterSqueeze(() => field.setOpen(true));
|
|
81
87
|
};
|
|
82
88
|
const handlePointerDown = (event) => {
|
|
83
89
|
trigger.pointerHandlers.onPointerDown?.(event);
|
|
84
90
|
if (event.defaultPrevented || field.disabled || field.readOnly) return;
|
|
85
91
|
if (field.open || trigger.openingRef.current || event.button !== 0) return;
|
|
86
92
|
event.preventDefault();
|
|
93
|
+
openedByPointerRef.current = true;
|
|
87
94
|
trigger.openAfterSqueeze(() => field.setOpen(true));
|
|
88
95
|
};
|
|
89
96
|
const handleKeyDown = (event) => {
|
|
@@ -2,7 +2,7 @@ import { resolveFieldShellSurfaceClass } from "../utils/fieldShellVariant.js";
|
|
|
2
2
|
import { iconSlotClass } from "../utils/sizeLayout/iconSlot.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 DATE_PICKER_ROOT_CLASS = "w-fit max-w-full min-w-0";
|
|
@@ -35,8 +35,7 @@ function datePickerIconClass(size) {
|
|
|
35
35
|
}
|
|
36
36
|
function datePickerShellSurface(variant) {
|
|
37
37
|
const visual = resolveVariantVisual(variant, KIT_INPUT_VARIANTS, "datePicker.trigger");
|
|
38
|
-
|
|
39
|
-
return resolveFieldShellSurfaceClass({ variant });
|
|
38
|
+
return skinVisualClass(visual, resolveFieldShellSurfaceClass({ variant }));
|
|
40
39
|
}
|
|
41
40
|
function datePickerTriggerClass({
|
|
42
41
|
size,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { modalOverlayEnterStyle } from "../utils/modalSurfaceMotion.js";
|
|
2
2
|
import { KIT_DIALOG_VARIANTS } from "./dialogTypes.js";
|
|
3
|
-
import { resolveVariantVisual } from "../../../skins/resolveVariantVisual.js";
|
|
3
|
+
import { resolveVariantVisual, skinVisualClass } from "../../../skins/resolveVariantVisual.js";
|
|
4
4
|
import { cn } from "../../../utils/cn.js";
|
|
5
5
|
import { panelSizeLayout, PANEL_SIZE_LAYOUT } from "../utils/sizeLayout/panel.js";
|
|
6
6
|
const DIALOG_CONTENT_CLASS = "flex min-h-0 flex-1 flex-col text-start";
|
|
@@ -78,7 +78,7 @@ function dialogPanelClass({
|
|
|
78
78
|
DIALOG_PANEL_LAYOUT_CLASS,
|
|
79
79
|
sizePreset.panelMax,
|
|
80
80
|
sizePreset.rounded,
|
|
81
|
-
visual
|
|
81
|
+
skinVisualClass(visual, DIALOG_PANEL_SURFACE[visual.key]),
|
|
82
82
|
sizePreset.maxHeight,
|
|
83
83
|
slotClass,
|
|
84
84
|
className
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { hoverVariant } from "../utils/hoverVariant.js";
|
|
2
2
|
import { TEXT_COLOR_TRANSITION } from "../utils/hoverVariant.js";
|
|
3
|
-
import { resolveVariantVisual } from "../../../skins/resolveVariantVisual.js";
|
|
3
|
+
import { resolveVariantVisual, skinVisualClass } from "../../../skins/resolveVariantVisual.js";
|
|
4
4
|
import { cn } from "../../../utils/cn.js";
|
|
5
5
|
import { KIT_DISCLOSURE_VARIANTS } from "./disclosureTypes.js";
|
|
6
6
|
import { collapsibleSizeLayout } from "../utils/sizeLayout/collapsible.js";
|
|
@@ -76,7 +76,7 @@ function disclosureRootClass({
|
|
|
76
76
|
slotClass
|
|
77
77
|
}) {
|
|
78
78
|
const visual = resolveVariantVisual(variant, KIT_DISCLOSURE_VARIANTS, "disclosure.root");
|
|
79
|
-
const rootCls = visual.key === "card" && groupedCardShell ? "" : visual
|
|
79
|
+
const rootCls = visual.key === "card" && groupedCardShell ? "" : skinVisualClass(visual, VARIANT_ROOT[visual.key]);
|
|
80
80
|
return cn(rootCls, slotClass, className);
|
|
81
81
|
}
|
|
82
82
|
function disclosureTriggerClass({
|
|
@@ -91,7 +91,7 @@ function disclosureTriggerClass({
|
|
|
91
91
|
return cn(
|
|
92
92
|
DISCLOSURE_TRIGGER_BASE_CLASS,
|
|
93
93
|
shell.pad,
|
|
94
|
-
visual
|
|
94
|
+
skinVisualClass(visual, VARIANT_TRIGGER[visual.key]),
|
|
95
95
|
disabled ? DISCLOSURE_TRIGGER_DISABLED_CLASS : DISCLOSURE_TRIGGER_ENABLED_CLASS,
|
|
96
96
|
slotClass,
|
|
97
97
|
className
|
|
@@ -128,6 +128,7 @@ function disclosureContentClass({
|
|
|
128
128
|
key === "card" && "border-t-token",
|
|
129
129
|
key === "ghost" && "text-muted",
|
|
130
130
|
key === "default" && "text-muted",
|
|
131
|
+
visual.extend,
|
|
131
132
|
slotClass,
|
|
132
133
|
className
|
|
133
134
|
);
|
|
@@ -147,6 +148,7 @@ function disclosureGroupClass({
|
|
|
147
148
|
!separated && key === "card" && "rounded-mid border-token bg-surface",
|
|
148
149
|
!separated && (key === "outline" || key === "secondary" || key === "ghost") && "gap-small",
|
|
149
150
|
visual.className,
|
|
151
|
+
visual.extend,
|
|
150
152
|
slotClass,
|
|
151
153
|
className
|
|
152
154
|
);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { modalOverlayEnterStyle } from "../utils/modalSurfaceMotion.js";
|
|
2
2
|
import { KIT_DRAWER_VARIANTS } from "./drawerTypes.js";
|
|
3
|
-
import { resolveVariantVisual } from "../../../skins/resolveVariantVisual.js";
|
|
3
|
+
import { resolveVariantVisual, skinVisualClass } from "../../../skins/resolveVariantVisual.js";
|
|
4
4
|
import { cn } from "../../../utils/cn.js";
|
|
5
5
|
import { panelSizeLayout, PANEL_SIZE_LAYOUT } from "../utils/sizeLayout/panel.js";
|
|
6
6
|
const PANEL_PLACEMENT_CLASS = {
|
|
@@ -143,7 +143,7 @@ function drawerPanelClass({
|
|
|
143
143
|
const visual = resolveVariantVisual(variant, KIT_DRAWER_VARIANTS, "drawer.panel");
|
|
144
144
|
return cn(
|
|
145
145
|
DRAWER_PANEL_BASE_CLASS,
|
|
146
|
-
visual
|
|
146
|
+
skinVisualClass(visual, DRAWER_PANEL_SURFACE[visual.key]),
|
|
147
147
|
PANEL_PLACEMENT_CLASS[placement],
|
|
148
148
|
drawerExtentClass(placement, extent),
|
|
149
149
|
drawerEdgeRoundedClass(placement, size, extent),
|
|
@@ -2,7 +2,7 @@ import { hoverVariant } from "../utils/hoverVariant.js";
|
|
|
2
2
|
import { optionListItemGridClass } from "../utils/optionControlGridLayout.js";
|
|
3
3
|
import { BUTTON_GROUP_RADIUS_BRIDGE_CLASS } from "../../composite/ButtonGroup/buttonGroupStyles.js";
|
|
4
4
|
import { KIT_POPOVER_VARIANTS } from "../Popover/popoverTypes.js";
|
|
5
|
-
import { resolveVariantVisual } from "../../../skins/resolveVariantVisual.js";
|
|
5
|
+
import { resolveVariantVisual, skinVisualClass } from "../../../skins/resolveVariantVisual.js";
|
|
6
6
|
import { cn } from "../../../utils/cn.js";
|
|
7
7
|
import { OPTION_CONTROL_SIZE_LAYOUT } from "../utils/sizeLayout/option.js";
|
|
8
8
|
const DROPDOWN_ROOT_CLASS = "relative inline-flex";
|
|
@@ -93,7 +93,7 @@ function dropdownSubContentClass({
|
|
|
93
93
|
return cn(
|
|
94
94
|
DROPDOWN_SUB_CONTENT_BASE_CLASS,
|
|
95
95
|
DROPDOWN_SUB_CONTENT_LAYOUT_CLASS,
|
|
96
|
-
visual
|
|
96
|
+
skinVisualClass(visual, DROPDOWN_SUB_CONTENT_SURFACE_CLASS),
|
|
97
97
|
!subOpen && portalMounted && "pointer-events-none",
|
|
98
98
|
slotClass,
|
|
99
99
|
className
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { messageBannerGridClass } from "../utils/messageBannerGridLayout.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_EXPANDABLE_VARIANTS } from "./expandableTypes.js";
|
|
5
5
|
import { collapsibleSizeLayout } from "../utils/sizeLayout/collapsible.js";
|
|
@@ -35,7 +35,7 @@ function expandableRootClass({
|
|
|
35
35
|
const visual = resolveVariantVisual(variant, KIT_EXPANDABLE_VARIANTS, "expandable.root");
|
|
36
36
|
return cn(
|
|
37
37
|
EXPANDABLE_ROOT_BASE_CLASS,
|
|
38
|
-
visual
|
|
38
|
+
skinVisualClass(visual, EXPANDABLE_VARIANT_SURFACE[visual.key]),
|
|
39
39
|
slotClass,
|
|
40
40
|
className
|
|
41
41
|
);
|
|
@@ -37,6 +37,6 @@ export declare const FieldSetActions: import('react').ForwardRefExoticComponent<
|
|
|
37
37
|
motion?: import('../../../index.js').Prettify<import('./fieldTypes.js').FieldPartMotion>;
|
|
38
38
|
} & import('react').RefAttributes<HTMLDivElement>>;
|
|
39
39
|
export declare function FieldSetStack({ legend, loose, groups, actions, }: UseFieldSetRootStateResult): import("react/jsx-runtime").JSX.Element | null;
|
|
40
|
-
export declare const FieldSetRootInner: import('react').ForwardRefExoticComponent<Omit<FieldSetProps, "size" | "
|
|
40
|
+
export declare const FieldSetRootInner: import('react').ForwardRefExoticComponent<Omit<FieldSetProps, "size" | "children" | "motion" | "motionState" | "motionPayload" | "playInitialState" | "motionController" | "classNames"> & {
|
|
41
41
|
state: UseFieldSetRootStateResult;
|
|
42
42
|
} & import('react').RefAttributes<HTMLFieldSetElement>>;
|
|
@@ -3,7 +3,7 @@ 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";
|
|
@@ -82,8 +82,7 @@ function inputShellSurfaceClass({
|
|
|
82
82
|
variant
|
|
83
83
|
}) {
|
|
84
84
|
const visual = resolveVariantVisual(variant, KIT_INPUT_VARIANTS, "input.shell");
|
|
85
|
-
|
|
86
|
-
return resolveFieldShellSurfaceClass({ variant });
|
|
85
|
+
return skinVisualClass(visual, resolveFieldShellSurfaceClass({ variant }));
|
|
87
86
|
}
|
|
88
87
|
function inputShellRoundingClass(groupSegment) {
|
|
89
88
|
if (groupSegment != null) {
|
|
@@ -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
|
);
|
|
@@ -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";
|
|
@@ -24,8 +24,7 @@ const PIN_INPUT_DISABLED_CLASS = "cursor-not-allowed opacity-55";
|
|
|
24
24
|
const PIN_INPUT_MASK_CLASS = "[-webkit-text-security:disc] [text-security:disc]";
|
|
25
25
|
function pinInputFieldSurface(variant) {
|
|
26
26
|
const visual = resolveVariantVisual(variant, KIT_INPUT_VARIANTS, "pinInput.control");
|
|
27
|
-
|
|
28
|
-
return resolveFieldShellSurfaceClass({ variant });
|
|
27
|
+
return skinVisualClass(visual, resolveFieldShellSurfaceClass({ variant }));
|
|
29
28
|
}
|
|
30
29
|
function pinInputGroupClass({
|
|
31
30
|
slotClass,
|
|
@@ -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) {
|