@marwes-ui/presets 1.3.0 → 1.4.1
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/README.md +19 -9
- package/dist/chunk-PWG4S55U.js +131 -0
- package/dist/chunk-PWG4S55U.js.map +1 -0
- package/dist/firstEdition/index.d.ts +18 -1
- package/dist/firstEdition/index.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/package.json +3 -3
- package/src/firstEdition/accordion.css +25 -12
- package/src/firstEdition/avatar.css +20 -6
- package/src/firstEdition/badge.css +18 -15
- package/src/firstEdition/banner.css +190 -0
- package/src/firstEdition/breadcrumb.css +125 -0
- package/src/firstEdition/button.css +77 -18
- package/src/firstEdition/card.css +28 -24
- package/src/firstEdition/checkbox.css +9 -9
- package/src/firstEdition/context-menu.css +114 -0
- package/src/firstEdition/date-picker.css +6 -9
- package/src/firstEdition/dialog.css +17 -10
- package/src/firstEdition/drawer.css +258 -0
- package/src/firstEdition/index.ts +10 -0
- package/src/firstEdition/input-otp.css +16 -8
- package/src/firstEdition/input.css +7 -4
- package/src/firstEdition/molecules/accordion-field.css +9 -5
- package/src/firstEdition/molecules/checkbox-field.css +12 -12
- package/src/firstEdition/molecules/checkbox-group-field.css +29 -17
- package/src/firstEdition/molecules/date-picker-field.css +28 -0
- package/src/firstEdition/molecules/dialog-modal.css +16 -1
- package/src/firstEdition/molecules/input-field.css +31 -13
- package/src/firstEdition/molecules/input-otp-field.css +26 -0
- package/src/firstEdition/molecules/pagination-field.css +23 -0
- package/src/firstEdition/molecules/radio-group-field.css +30 -9
- package/src/firstEdition/molecules/segmented-control-field.css +23 -0
- package/src/firstEdition/molecules/slider-field.css +9 -4
- package/src/firstEdition/molecules/switch-field.css +8 -4
- package/src/firstEdition/molecules/tab-group.css +15 -2
- package/src/firstEdition/pagination.css +180 -0
- package/src/firstEdition/personality.css +66 -0
- package/src/firstEdition/presets.ts +97 -0
- package/src/firstEdition/progress-bar.css +108 -0
- package/src/firstEdition/radio.css +10 -5
- package/src/firstEdition/rich-text.css +5 -2
- package/src/firstEdition/segmented-control.css +133 -0
- package/src/firstEdition/select.css +26 -31
- package/src/firstEdition/skip-link.css +45 -0
- package/src/firstEdition/slider.css +10 -4
- package/src/firstEdition/spinner.css +1 -1
- package/src/firstEdition/styles.css +20 -0
- package/src/firstEdition/switch.css +4 -4
- package/src/firstEdition/tab.css +4 -4
- package/src/firstEdition/textarea.css +9 -6
- package/src/firstEdition/toast.css +25 -25
- package/src/firstEdition/tokens.css +6 -5
- package/src/firstEdition/tooltip.css +5 -5
- package/src/firstEdition/typography.css +21 -0
- package/dist/chunk-62D3F6GN.js +0 -49
- package/dist/chunk-62D3F6GN.js.map +0 -1
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Personality signatures
|
|
3
|
+
*
|
|
4
|
+
* Opt-in visual identity effects layered on top of the token layer. Selected
|
|
5
|
+
* via `personality` on ThemeInput, which lands on the MarwesProvider wrapper
|
|
6
|
+
* as `data-marwes-personality="<value>"`. All rules reference design-system
|
|
7
|
+
* CSS variables so they follow the active palette automatically — no
|
|
8
|
+
* literal colors here.
|
|
9
|
+
*
|
|
10
|
+
* The default "flat" personality intentionally ships no rules; the wrapper
|
|
11
|
+
* still gets `data-marwes-personality="flat"` but there is nothing for the
|
|
12
|
+
* selector to match, so default themes stay byte-identical.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
/* ─── glow ────────────────────────────────────────────────────────────────
|
|
16
|
+
* Neon glow on primary interactives. Reads primary via `--mw-color-primary-base`
|
|
17
|
+
* (falls back to currentColor if a consumer bypasses the token layer).
|
|
18
|
+
*/
|
|
19
|
+
[data-marwes-personality="glow"] .mw-btn--primary,
|
|
20
|
+
[data-marwes-personality="glow"] .mw-switch[data-checked="true"] .mw-switch__thumb,
|
|
21
|
+
[data-marwes-personality="glow"] .mw-switch[aria-checked="true"] .mw-switch__thumb {
|
|
22
|
+
box-shadow: 0 0 12px
|
|
23
|
+
color-mix(in srgb, var(--mw-color-primary-base, currentColor) 55%, transparent);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/* ─── print ───────────────────────────────────────────────────────────────
|
|
27
|
+
* Hard-offset shadow evocative of print/editorial. Hover/active add a subtle
|
|
28
|
+
* translate to make the effect tactile. Motion is skipped for users who
|
|
29
|
+
* requested reduced motion.
|
|
30
|
+
*/
|
|
31
|
+
[data-marwes-personality="print"] .mw-btn--primary {
|
|
32
|
+
box-shadow: 3px 3px 0 var(--mw-color-text, currentColor);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
@media (not (prefers-reduced-motion: reduce)) {
|
|
36
|
+
[data-marwes-personality="print"] .mw-btn--primary:hover:not(:disabled) {
|
|
37
|
+
transform: translate(-1px, -1px);
|
|
38
|
+
box-shadow: 4px 4px 0 var(--mw-color-text, currentColor);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
[data-marwes-personality="print"] .mw-btn--primary:active:not(:disabled) {
|
|
42
|
+
transform: translate(1px, 1px);
|
|
43
|
+
box-shadow: 1px 1px 0 var(--mw-color-text, currentColor);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/* ─── soft ────────────────────────────────────────────────────────────────
|
|
48
|
+
* Blurred elevation under cards. Preserves the existing 1px inset border so
|
|
49
|
+
* the card outline stays intact, then layers the outer glow on top.
|
|
50
|
+
*/
|
|
51
|
+
[data-marwes-personality="soft"] .mw-card {
|
|
52
|
+
box-shadow: inset 0 0 0 1px var(--mw-card-border, transparent), 0 12px 32px -18px
|
|
53
|
+
color-mix(in srgb, var(--mw-color-primary-base, #000) 55%, transparent);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/* ─── outlined ────────────────────────────────────────────────────────────
|
|
57
|
+
* Crisp muted outline on primary actions — subtle presence without heavy
|
|
58
|
+
* shadow. Uses inset shadow so it respects the button's border-radius.
|
|
59
|
+
*/
|
|
60
|
+
[data-marwes-personality="outlined"] .mw-btn--primary {
|
|
61
|
+
box-shadow: inset 0 0 0 1px var(--mw-color-border-strong, currentColor);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/* ─── flat ────────────────────────────────────────────────────────────────
|
|
65
|
+
* No rules. The default personality intentionally ships no additional CSS.
|
|
66
|
+
*/
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import type { ThemeInput } from "@marwes-ui/core"
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Curated preset themes shipped with the firstEdition CSS. Each preset is a
|
|
5
|
+
* `ThemeInput` — pass it directly to `<MarwesProvider theme={cyberPreset}>`
|
|
6
|
+
* or spread it into a larger theme. The `personality` field maps to the
|
|
7
|
+
* matching CSS signature block in `personality.css`.
|
|
8
|
+
*
|
|
9
|
+
* Presets do not include font imports. The consumer app must load fonts
|
|
10
|
+
* separately (e.g. via Fontsource) when a preset references a non-default
|
|
11
|
+
* font family.
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
const marwesPreset: ThemeInput = {
|
|
15
|
+
mode: "light",
|
|
16
|
+
personality: "flat",
|
|
17
|
+
color: {
|
|
18
|
+
primary: "#2F31FC",
|
|
19
|
+
},
|
|
20
|
+
ui: { radius: 4, density: "comfortable" },
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const cyberPreset: ThemeInput = {
|
|
24
|
+
mode: "dark",
|
|
25
|
+
tone: "digital",
|
|
26
|
+
personality: "glow",
|
|
27
|
+
color: {
|
|
28
|
+
primary: "#FFE500",
|
|
29
|
+
background: "#0A0A0F",
|
|
30
|
+
surface: "#12121A",
|
|
31
|
+
surfaceElevated: "#1B1B26",
|
|
32
|
+
text: "#F4F4F5",
|
|
33
|
+
textMuted: "#A1A1AA",
|
|
34
|
+
border: "#27272A",
|
|
35
|
+
borderStrong: "#3F3F46",
|
|
36
|
+
},
|
|
37
|
+
font: { primary: "'Fira Code', ui-monospace, monospace" },
|
|
38
|
+
ui: { radius: 0, density: "compact" },
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
const editorialPreset: ThemeInput = {
|
|
42
|
+
mode: "light",
|
|
43
|
+
personality: "outlined",
|
|
44
|
+
color: {
|
|
45
|
+
primary: "#8B1E3F",
|
|
46
|
+
background: "#FBF7F0",
|
|
47
|
+
surface: "#FFFFFF",
|
|
48
|
+
text: "#1B1B1F",
|
|
49
|
+
textMuted: "#5C5C63",
|
|
50
|
+
border: "#E5DFD2",
|
|
51
|
+
borderStrong: "#C6BFB0",
|
|
52
|
+
},
|
|
53
|
+
font: { primary: "'Playfair Display', Georgia, serif" },
|
|
54
|
+
ui: { radius: 12, density: "spacious" },
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
const sunsetPreset: ThemeInput = {
|
|
58
|
+
mode: "light",
|
|
59
|
+
personality: "soft",
|
|
60
|
+
color: {
|
|
61
|
+
primary: "#F97316",
|
|
62
|
+
background: "#FFF8F2",
|
|
63
|
+
surface: "#FFFFFF",
|
|
64
|
+
text: "#2B1E17",
|
|
65
|
+
textMuted: "#8B6E5A",
|
|
66
|
+
border: "#F5DFC7",
|
|
67
|
+
borderStrong: "#E9C29A",
|
|
68
|
+
},
|
|
69
|
+
font: { primary: "'Nunito', system-ui, sans-serif" },
|
|
70
|
+
ui: { radius: 16, density: "comfortable" },
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
const nordicPreset: ThemeInput = {
|
|
74
|
+
mode: "light",
|
|
75
|
+
personality: "outlined",
|
|
76
|
+
color: {
|
|
77
|
+
primary: "#475569",
|
|
78
|
+
background: "#F1F5F9",
|
|
79
|
+
surface: "#F8FAFC",
|
|
80
|
+
text: "#0F172A",
|
|
81
|
+
textMuted: "#64748B",
|
|
82
|
+
border: "#CBD5E1",
|
|
83
|
+
borderStrong: "#94A3B8",
|
|
84
|
+
},
|
|
85
|
+
font: { primary: "'Fira Code', ui-monospace, monospace" },
|
|
86
|
+
ui: { radius: 2, density: "compact" },
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
const themePresets: readonly ThemeInput[] = [
|
|
90
|
+
marwesPreset,
|
|
91
|
+
cyberPreset,
|
|
92
|
+
editorialPreset,
|
|
93
|
+
sunsetPreset,
|
|
94
|
+
nordicPreset,
|
|
95
|
+
]
|
|
96
|
+
|
|
97
|
+
export { cyberPreset, editorialPreset, marwesPreset, nordicPreset, sunsetPreset, themePresets }
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* ProgressBar Component Styles
|
|
3
|
+
*
|
|
4
|
+
* Figma references:
|
|
5
|
+
* - .figma/marwes/components/progress-bar.json
|
|
6
|
+
* - .figma/marwes/pages/-progress-bar/-progress-bar_1727-3932.json
|
|
7
|
+
* - .figma/marwes/pages/-progress-bar/-progress-bar-dark_1727-4018.json
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
.mw-progress-bar {
|
|
11
|
+
--mw-progress-bar-value-percentage: 0%;
|
|
12
|
+
--mw-progress-bar-width: 240px;
|
|
13
|
+
--mw-progress-bar-track-height: 8px;
|
|
14
|
+
--mw-progress-bar-gap: 8px;
|
|
15
|
+
--mw-progress-bar-track-color: color-mix(in srgb, var(--mw-color-text, #141414) 15%, transparent);
|
|
16
|
+
--mw-progress-bar-fill-color: var(--mw-color-primary-base, #2f31fc);
|
|
17
|
+
--mw-progress-bar-label-color: var(--mw-color-text, #141414);
|
|
18
|
+
--mw-progress-bar-percentage-color: var(--mw-color-text-muted, #595959);
|
|
19
|
+
--mw-progress-bar-focus-ring: var(--mw-color-focus, #2f31fc);
|
|
20
|
+
|
|
21
|
+
display: grid;
|
|
22
|
+
gap: var(--mw-progress-bar-gap);
|
|
23
|
+
width: var(--mw-progress-bar-width);
|
|
24
|
+
max-width: 100%;
|
|
25
|
+
color: var(--mw-progress-bar-label-color);
|
|
26
|
+
font-family: var(--mw-font-primary, inherit);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.mw-progress-bar--small {
|
|
30
|
+
--mw-progress-bar-track-height: 4px;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.mw-progress-bar__label-row {
|
|
34
|
+
display: flex;
|
|
35
|
+
align-items: start;
|
|
36
|
+
min-width: 0;
|
|
37
|
+
gap: 8px;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.mw-progress-bar__label,
|
|
41
|
+
.mw-progress-bar__percentage {
|
|
42
|
+
font-size: 14px;
|
|
43
|
+
font-weight: 500;
|
|
44
|
+
line-height: 16px;
|
|
45
|
+
letter-spacing: 0;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.mw-progress-bar__label {
|
|
49
|
+
min-width: 0;
|
|
50
|
+
flex: 1 1 auto;
|
|
51
|
+
color: var(--mw-progress-bar-label-color);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.mw-progress-bar__percentage {
|
|
55
|
+
flex: 0 0 auto;
|
|
56
|
+
color: var(--mw-progress-bar-percentage-color);
|
|
57
|
+
text-align: right;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.mw-progress-bar__track {
|
|
61
|
+
position: relative;
|
|
62
|
+
width: 100%;
|
|
63
|
+
height: var(--mw-progress-bar-track-height);
|
|
64
|
+
overflow: hidden;
|
|
65
|
+
border-radius: 999px;
|
|
66
|
+
background: var(--mw-progress-bar-track-color);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.mw-progress-bar__fill {
|
|
70
|
+
display: block;
|
|
71
|
+
width: var(--mw-progress-bar-value-percentage);
|
|
72
|
+
height: 100%;
|
|
73
|
+
border-radius: inherit;
|
|
74
|
+
background: var(--mw-progress-bar-fill-color);
|
|
75
|
+
transition: width 180ms ease, background-color 140ms ease;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.mw-progress-bar:hover,
|
|
79
|
+
.mw-progress-bar--state-hover {
|
|
80
|
+
--mw-progress-bar-fill-color: var(--mw-color-primary-hover, #2527ca);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.mw-progress-bar:active,
|
|
84
|
+
.mw-progress-bar--state-pressed {
|
|
85
|
+
--mw-progress-bar-fill-color: var(--mw-color-primary-pressed, #1b1d97);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.mw-progress-bar--state-focus .mw-progress-bar__track {
|
|
89
|
+
box-shadow: 0 0 0 2px var(--mw-color-surface, #ffffff), 0 0 0 4px
|
|
90
|
+
var(--mw-progress-bar-focus-ring);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.mw-progress-bar--disabled {
|
|
94
|
+
--mw-progress-bar-track-color: var(--mw-color-border-subtle, #f5f5f5);
|
|
95
|
+
--mw-progress-bar-fill-color: var(--mw-color-primary-disabled, #8182fc);
|
|
96
|
+
--mw-progress-bar-label-color: var(--mw-color-text-muted, #737373);
|
|
97
|
+
--mw-progress-bar-percentage-color: var(--mw-color-text-muted, #737373);
|
|
98
|
+
|
|
99
|
+
pointer-events: none;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.mw-theme--dark .mw-progress-bar {
|
|
103
|
+
--mw-progress-bar-track-color: color-mix(in srgb, var(--mw-color-text, #f5f5f5) 18%, transparent);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.mw-theme--dark .mw-progress-bar--disabled {
|
|
107
|
+
--mw-progress-bar-track-color: color-mix(in srgb, var(--mw-color-text, #f5f5f5) 10%, transparent);
|
|
108
|
+
}
|
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
.mw-radio {
|
|
14
|
-
--mw-radio-surface: var(--mw-color-surface);
|
|
15
|
-
--mw-radio-border: var(--mw-color-border-
|
|
14
|
+
--mw-radio-surface: var(--mw-color-surface-subtle);
|
|
15
|
+
--mw-radio-border: var(--mw-color-border-low);
|
|
16
16
|
--mw-radio-dot: var(--mw-color-primary-base, #2f31fc);
|
|
17
17
|
|
|
18
18
|
/* Reset native appearance */
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
height: 18px;
|
|
28
28
|
border-radius: 50%;
|
|
29
29
|
margin: 0;
|
|
30
|
-
border:
|
|
30
|
+
border: 1px solid var(--mw-radio-border);
|
|
31
31
|
background: var(--mw-radio-surface);
|
|
32
32
|
|
|
33
33
|
cursor: pointer;
|
|
@@ -66,7 +66,11 @@
|
|
|
66
66
|
============================================ */
|
|
67
67
|
|
|
68
68
|
.mw-radio:hover:not(:disabled) {
|
|
69
|
-
border-color:
|
|
69
|
+
border-color: var(--mw-color-border-strong);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.mw-radio:active:not(:disabled) {
|
|
73
|
+
border-color: var(--mw-color-border-brand);
|
|
70
74
|
}
|
|
71
75
|
|
|
72
76
|
/* ============================================
|
|
@@ -86,6 +90,7 @@
|
|
|
86
90
|
.mw-radio--disabled {
|
|
87
91
|
cursor: not-allowed;
|
|
88
92
|
opacity: 0.2;
|
|
93
|
+
color: var(--mw-color-text-disabled);
|
|
89
94
|
}
|
|
90
95
|
|
|
91
96
|
/* ============================================
|
|
@@ -107,7 +112,7 @@
|
|
|
107
112
|
============================================ */
|
|
108
113
|
|
|
109
114
|
.mw-theme--dark .mw-radio {
|
|
110
|
-
--mw-radio-surface: var(--mw-color-surface);
|
|
115
|
+
--mw-radio-surface: var(--mw-color-surface-primary);
|
|
111
116
|
--mw-radio-border: var(--mw-color-border-subtle);
|
|
112
117
|
}
|
|
113
118
|
|
|
@@ -4,10 +4,13 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
.mw-rich-text {
|
|
7
|
-
|
|
7
|
+
box-sizing: border-box;
|
|
8
|
+
width: 100%;
|
|
9
|
+
min-width: 0;
|
|
10
|
+
max-width: 100%;
|
|
8
11
|
border-radius: var(--mw-ui-radius);
|
|
9
12
|
border: 1px solid var(--mw-color-border);
|
|
10
|
-
background: var(--mw-color-surface);
|
|
13
|
+
background: var(--mw-color-surface-primary);
|
|
11
14
|
color: var(--mw-color-text);
|
|
12
15
|
transition: border-color 150ms ease, outline 150ms ease;
|
|
13
16
|
}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Segmented Control Styles
|
|
3
|
+
* Figma refs: 1571:19333 (component set)
|
|
4
|
+
*
|
|
5
|
+
* Variant=default: subtle track, elevated active pill
|
|
6
|
+
* Variant=inverse: surface track with strong border, inverted active pill
|
|
7
|
+
* Variant=pill: fully rounded track (used for compact icon toggles)
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
.mw-segmented-control {
|
|
11
|
+
--mw-sc-track: var(--mw-color-surface-subtle, #f5f5f5);
|
|
12
|
+
--mw-sc-track-border: var(--mw-color-border, #d8d8d8);
|
|
13
|
+
--mw-sc-item-active-bg: var(--mw-color-surface-primary, #ffffff);
|
|
14
|
+
--mw-sc-item-active-text: var(--mw-color-text, #141414);
|
|
15
|
+
--mw-sc-item-inactive-text: var(--mw-color-text-muted, #595959);
|
|
16
|
+
--mw-sc-item-hover-text: var(--mw-color-text, #141414);
|
|
17
|
+
--mw-sc-item-disabled-text: var(--mw-color-text-disabled, #737373);
|
|
18
|
+
--mw-sc-radius: 8px;
|
|
19
|
+
--mw-sc-item-radius: 6px;
|
|
20
|
+
--mw-sc-height: 32px;
|
|
21
|
+
--mw-sc-padding: 4px;
|
|
22
|
+
--mw-sc-gap: 2px;
|
|
23
|
+
--mw-sc-font-size: var(--mw-density-font-size, 14px);
|
|
24
|
+
|
|
25
|
+
display: inline-flex;
|
|
26
|
+
box-sizing: border-box;
|
|
27
|
+
inline-size: fit-content;
|
|
28
|
+
block-size: calc(var(--mw-sc-height) + (var(--mw-sc-padding) * 2));
|
|
29
|
+
max-inline-size: 100%;
|
|
30
|
+
gap: var(--mw-sc-gap);
|
|
31
|
+
padding: var(--mw-sc-padding);
|
|
32
|
+
background: var(--mw-sc-track);
|
|
33
|
+
border: 0;
|
|
34
|
+
border-radius: var(--mw-sc-radius);
|
|
35
|
+
box-shadow: inset 0 0 0 1px var(--mw-sc-track-border);
|
|
36
|
+
align-items: center;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/* Size: sm */
|
|
40
|
+
.mw-segmented-control--sm {
|
|
41
|
+
--mw-sc-height: 28px;
|
|
42
|
+
--mw-sc-padding: 3px;
|
|
43
|
+
--mw-sc-radius: 6px;
|
|
44
|
+
--mw-sc-font-size: 12px;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/* Variant: inverse */
|
|
48
|
+
.mw-segmented-control--inverse {
|
|
49
|
+
--mw-sc-track: var(--mw-color-surface, #f8f8f8);
|
|
50
|
+
--mw-sc-track-border: var(--mw-color-border, #d8d8d8);
|
|
51
|
+
--mw-sc-item-active-bg: var(--mw-color-surface-inverted, #141414);
|
|
52
|
+
--mw-sc-item-active-text: var(--mw-color-text-inverted, #ffffff);
|
|
53
|
+
--mw-sc-item-inactive-text: var(--mw-color-text-muted, #595959);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/* Variant: pill */
|
|
57
|
+
.mw-segmented-control--pill {
|
|
58
|
+
--mw-sc-radius: 18px;
|
|
59
|
+
--mw-sc-item-radius: 14px;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/* Disabled state */
|
|
63
|
+
.mw-segmented-control--disabled {
|
|
64
|
+
opacity: 0.5;
|
|
65
|
+
pointer-events: none;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/* Full-width modifier: stretches the track to fill its container */
|
|
69
|
+
.mw-segmented-control--full-width {
|
|
70
|
+
display: flex;
|
|
71
|
+
inline-size: 100%;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/* ─── Item ─────────────────────────────────────────────────── */
|
|
75
|
+
|
|
76
|
+
.mw-segmented-control__item {
|
|
77
|
+
appearance: none;
|
|
78
|
+
display: inline-flex;
|
|
79
|
+
align-items: center;
|
|
80
|
+
justify-content: center;
|
|
81
|
+
gap: 6px;
|
|
82
|
+
flex: 1;
|
|
83
|
+
height: var(--mw-sc-height);
|
|
84
|
+
padding: 0 16px;
|
|
85
|
+
background: transparent;
|
|
86
|
+
color: var(--mw-sc-item-inactive-text);
|
|
87
|
+
font-family: var(--mw-font-primary, inherit);
|
|
88
|
+
font-size: var(--mw-sc-font-size);
|
|
89
|
+
font-weight: 400;
|
|
90
|
+
line-height: 16px;
|
|
91
|
+
letter-spacing: 0;
|
|
92
|
+
white-space: nowrap;
|
|
93
|
+
border: none;
|
|
94
|
+
border-radius: var(--mw-sc-item-radius);
|
|
95
|
+
cursor: pointer;
|
|
96
|
+
transition: background 200ms ease, color 200ms ease;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.mw-segmented-control__item--icon-only {
|
|
100
|
+
flex: 0 0 var(--mw-sc-height);
|
|
101
|
+
width: var(--mw-sc-height);
|
|
102
|
+
padding: 0;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.mw-segmented-control__item--selected {
|
|
106
|
+
background: var(--mw-sc-item-active-bg);
|
|
107
|
+
color: var(--mw-sc-item-active-text);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.mw-segmented-control__item:hover:not(:disabled):not(.mw-segmented-control__item--disabled):not(
|
|
111
|
+
.mw-segmented-control__item--selected
|
|
112
|
+
) {
|
|
113
|
+
background: color-mix(in srgb, var(--mw-color-text, #000000) 5%, transparent);
|
|
114
|
+
color: var(--mw-sc-item-hover-text);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.mw-segmented-control__item--disabled,
|
|
118
|
+
.mw-segmented-control__item:disabled {
|
|
119
|
+
color: var(--mw-sc-item-disabled-text);
|
|
120
|
+
cursor: not-allowed;
|
|
121
|
+
pointer-events: none;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.mw-segmented-control__item:focus-visible {
|
|
125
|
+
outline: none;
|
|
126
|
+
box-shadow: inset 0 0 0 2px var(--mw-color-focus, #2f31fc);
|
|
127
|
+
z-index: 1;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/* Item content should not capture pointer events; the button owns the full hit area. */
|
|
131
|
+
.mw-segmented-control__item * {
|
|
132
|
+
pointer-events: none;
|
|
133
|
+
}
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
display: inline-flex;
|
|
22
22
|
align-items: center;
|
|
23
23
|
width: auto;
|
|
24
|
-
min-width:
|
|
24
|
+
min-width: 0;
|
|
25
25
|
max-width: 100%;
|
|
26
26
|
max-inline-size: 100%;
|
|
27
27
|
}
|
|
@@ -33,17 +33,20 @@
|
|
|
33
33
|
field-sizing: fixed;
|
|
34
34
|
box-sizing: border-box;
|
|
35
35
|
display: block;
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
height: 32px;
|
|
37
|
+
min-height: 32px;
|
|
38
|
+
padding: 0 calc(var(--mw-spacing-sp-12) + 16px + var(--mw-spacing-sp-4)) 0 var(--mw-spacing-sp-12);
|
|
38
39
|
border-radius: var(--mw-ui-radius);
|
|
39
40
|
border: 1px solid var(--mw-color-border);
|
|
40
|
-
background-color: var(--mw-color-surface);
|
|
41
|
+
background-color: var(--mw-color-surface-primary);
|
|
41
42
|
color: var(--mw-color-text);
|
|
42
43
|
font-family: var(--mw-font-primary, inherit);
|
|
43
44
|
font-size: 14px;
|
|
44
45
|
line-height: 16px;
|
|
45
|
-
|
|
46
|
-
|
|
46
|
+
/* Fill wrapper so the absolutely-positioned chevron aligns with the
|
|
47
|
+
visible input edge when consumers size .mw-select__control. */
|
|
48
|
+
width: 100%;
|
|
49
|
+
min-width: 0;
|
|
47
50
|
max-width: 100%;
|
|
48
51
|
max-inline-size: 100%;
|
|
49
52
|
white-space: nowrap;
|
|
@@ -55,8 +58,10 @@
|
|
|
55
58
|
.mw-select__control-icon {
|
|
56
59
|
position: absolute;
|
|
57
60
|
top: 50%;
|
|
58
|
-
right:
|
|
61
|
+
right: var(--mw-spacing-sp-12);
|
|
59
62
|
transform: translateY(-50%);
|
|
63
|
+
width: 16px;
|
|
64
|
+
height: 16px;
|
|
60
65
|
pointer-events: none;
|
|
61
66
|
color: var(--mw-color-text-muted);
|
|
62
67
|
}
|
|
@@ -66,10 +71,9 @@
|
|
|
66
71
|
}
|
|
67
72
|
|
|
68
73
|
.mw-select--native {
|
|
69
|
-
appearance:
|
|
70
|
-
-webkit-appearance:
|
|
71
|
-
-moz-appearance:
|
|
72
|
-
padding-right: 12px;
|
|
74
|
+
appearance: none;
|
|
75
|
+
-webkit-appearance: none;
|
|
76
|
+
-moz-appearance: none;
|
|
73
77
|
}
|
|
74
78
|
|
|
75
79
|
.mw-input-field__input-wrapper .mw-select__control {
|
|
@@ -88,12 +92,14 @@
|
|
|
88
92
|
inline-size: 100%;
|
|
89
93
|
min-inline-size: 0;
|
|
90
94
|
max-inline-size: 100%;
|
|
91
|
-
|
|
92
|
-
|
|
95
|
+
height: var(--mw-density-height);
|
|
96
|
+
min-height: var(--mw-density-height);
|
|
97
|
+
padding: 0 calc(var(--mw-density-padding-x) + var(--mw-density-icon-size) + var(--mw-density-gap))
|
|
98
|
+
0 var(--mw-density-padding-x);
|
|
93
99
|
}
|
|
94
100
|
|
|
95
|
-
.mw-input-field__input-wrapper .mw-
|
|
96
|
-
|
|
101
|
+
.mw-input-field__input-wrapper .mw-select__control-icon {
|
|
102
|
+
right: var(--mw-density-padding-x);
|
|
97
103
|
}
|
|
98
104
|
|
|
99
105
|
.mw-input-field__input-wrapper .mw-select-field__control {
|
|
@@ -129,7 +135,7 @@
|
|
|
129
135
|
padding: 8px 12px; /* off-scale — no token */
|
|
130
136
|
border-radius: var(--mw-ui-radius);
|
|
131
137
|
border: 1px solid var(--mw-color-border);
|
|
132
|
-
background-color: var(--mw-color-surface);
|
|
138
|
+
background-color: var(--mw-color-surface-primary);
|
|
133
139
|
color: var(--mw-color-text);
|
|
134
140
|
font-family: var(--mw-font-primary, inherit);
|
|
135
141
|
font-size: 14px;
|
|
@@ -302,10 +308,6 @@
|
|
|
302
308
|
color: var(--mw-color-text-disabled);
|
|
303
309
|
}
|
|
304
310
|
|
|
305
|
-
.mw-theme--dark .mw-select {
|
|
306
|
-
background-color: var(--mw-color-surface-elevated);
|
|
307
|
-
}
|
|
308
|
-
|
|
309
311
|
.mw-select-field__trigger:disabled .mw-select-field__trigger-icon {
|
|
310
312
|
color: var(--mw-color-text-disabled);
|
|
311
313
|
}
|
|
@@ -344,17 +346,10 @@
|
|
|
344
346
|
opacity: 1;
|
|
345
347
|
}
|
|
346
348
|
|
|
347
|
-
.mw-input-field--select-date .mw-input-field__label
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
.mw-input-field--select-date .mw-input-field__helper p,
|
|
354
|
-
.mw-input-field--select-date .mw-input-field__error p {
|
|
355
|
-
font-size: 12px;
|
|
356
|
-
font-weight: 500;
|
|
357
|
-
line-height: 16px;
|
|
349
|
+
.mw-input-field--select-date .mw-input-field__label .mw-text,
|
|
350
|
+
.mw-input-field--select-date .mw-input-field__helper .mw-text,
|
|
351
|
+
.mw-input-field--select-date .mw-input-field__error .mw-text {
|
|
352
|
+
color: inherit;
|
|
358
353
|
}
|
|
359
354
|
|
|
360
355
|
.mw-input-field--select-date .mw-select-field__trigger {
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Skip Link Styles
|
|
3
|
+
*
|
|
4
|
+
* Visually hidden anchor that becomes visible on keyboard focus.
|
|
5
|
+
* Provides keyboard-only users a way to jump to a landmark
|
|
6
|
+
* (typically <main>) without tabbing through the header.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
.mw-skip-link {
|
|
10
|
+
position: absolute;
|
|
11
|
+
inset-inline-start: var(--mw-spacing-sp8, 8px);
|
|
12
|
+
inset-block-start: var(--mw-spacing-sp8, 8px);
|
|
13
|
+
z-index: 1000;
|
|
14
|
+
|
|
15
|
+
/* Visually hidden but focusable */
|
|
16
|
+
inline-size: 1px;
|
|
17
|
+
block-size: 1px;
|
|
18
|
+
padding: 0;
|
|
19
|
+
overflow: hidden;
|
|
20
|
+
clip: rect(0 0 0 0);
|
|
21
|
+
clip-path: inset(50%);
|
|
22
|
+
white-space: nowrap;
|
|
23
|
+
|
|
24
|
+
background: var(--mw-color-surface-primary, #ffffff);
|
|
25
|
+
color: var(--mw-color-text, #141414);
|
|
26
|
+
border: 1px solid var(--mw-color-border, #d8d8d8);
|
|
27
|
+
border-radius: var(--mw-ui-radius, 6px);
|
|
28
|
+
font-family: var(--mw-font-primary, inherit);
|
|
29
|
+
font-size: 14px;
|
|
30
|
+
font-weight: 600;
|
|
31
|
+
text-decoration: none;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.mw-skip-link:focus-visible,
|
|
35
|
+
.mw-skip-link:focus {
|
|
36
|
+
/* Reveal on focus */
|
|
37
|
+
inline-size: auto;
|
|
38
|
+
block-size: auto;
|
|
39
|
+
padding: var(--mw-spacing-sp8, 8px) var(--mw-spacing-sp16, 16px);
|
|
40
|
+
overflow: visible;
|
|
41
|
+
clip: auto;
|
|
42
|
+
clip-path: none;
|
|
43
|
+
outline: 2px solid var(--mw-color-focus, #2f31fc);
|
|
44
|
+
outline-offset: 2px;
|
|
45
|
+
}
|
|
@@ -9,13 +9,16 @@
|
|
|
9
9
|
|
|
10
10
|
.mw-slider {
|
|
11
11
|
--mw-slider-fill-percentage: 50%;
|
|
12
|
-
--mw-slider-track-height:
|
|
12
|
+
--mw-slider-track-height: 6px;
|
|
13
13
|
--mw-slider-thumb-size: 16px;
|
|
14
14
|
--mw-slider-touch-area-size: 32px;
|
|
15
15
|
--mw-slider-tooltip-gap: 2px;
|
|
16
|
-
--mw-slider-track-background: var(
|
|
16
|
+
--mw-slider-track-background: var(
|
|
17
|
+
--mw-color-border-subtle,
|
|
18
|
+
color-mix(in srgb, var(--mw-color-text, #141414) 20%, transparent)
|
|
19
|
+
);
|
|
17
20
|
--mw-slider-track-fill: var(--mw-color-primary-base, #2f31fc);
|
|
18
|
-
--mw-slider-thumb-background: var(--mw-color-surface, #ffffff);
|
|
21
|
+
--mw-slider-thumb-background: var(--mw-color-surface-primary, #ffffff);
|
|
19
22
|
--mw-slider-thumb-border: var(--mw-color-primary-base, #2f31fc);
|
|
20
23
|
--mw-slider-touch-area-background: var(--mw-color-primary-base, #2f31fc);
|
|
21
24
|
--mw-slider-tooltip-background: var(--mw-color-text, #141414);
|
|
@@ -220,7 +223,10 @@
|
|
|
220
223
|
}
|
|
221
224
|
|
|
222
225
|
.mw-theme--dark .mw-slider {
|
|
223
|
-
--mw-slider-track-background: var(
|
|
226
|
+
--mw-slider-track-background: var(
|
|
227
|
+
--mw-color-border-subtle,
|
|
228
|
+
color-mix(in srgb, var(--mw-color-text, #ffffff) 30%, transparent)
|
|
229
|
+
);
|
|
224
230
|
--mw-slider-thumb-background: var(--mw-color-surface-inverted);
|
|
225
231
|
--mw-slider-tooltip-background: var(--mw-color-surface-inverted);
|
|
226
232
|
--mw-slider-tooltip-color: var(--mw-color-text-inverted);
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
.mw-spinner {
|
|
16
16
|
--mw-spinner-size: 24px;
|
|
17
|
-
--mw-spinner-track-color:
|
|
17
|
+
--mw-spinner-track-color: #a3a3a3;
|
|
18
18
|
--mw-spinner-indicator-color: var(--mw-color-primary-base, #2f31fc);
|
|
19
19
|
--mw-spinner-rotation-duration: 800ms;
|
|
20
20
|
|