@marwes-ui/presets 0.0.4 → 1.0.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/LICENSE +1 -1
- package/README.md +271 -47
- package/dist/chunk-2JNIKK66.js +21 -0
- package/dist/chunk-2JNIKK66.js.map +1 -0
- package/dist/firstEdition/index.d.ts +3 -3
- package/dist/firstEdition/index.js +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/package.json +15 -9
- package/src/firstEdition/accordion.css +140 -0
- package/src/firstEdition/avatar.css +204 -0
- package/src/firstEdition/badge.css +139 -0
- package/src/firstEdition/button.css +219 -0
- package/src/firstEdition/card.css +136 -0
- package/src/firstEdition/checkbox.css +214 -0
- package/src/firstEdition/dialog.css +149 -0
- package/src/firstEdition/divider.css +37 -0
- package/src/firstEdition/icon.css +72 -0
- package/src/firstEdition/index.ts +19 -0
- package/src/firstEdition/input-otp.css +107 -0
- package/src/firstEdition/input.css +73 -0
- package/src/firstEdition/molecules/accordion-field.css +46 -0
- package/src/firstEdition/molecules/checkbox-field.css +53 -0
- package/src/firstEdition/molecules/checkbox-group-field.css +67 -0
- package/src/firstEdition/molecules/dialog-modal.css +34 -0
- package/src/firstEdition/molecules/input-field.css +260 -0
- package/src/firstEdition/molecules/radio-group-field.css +59 -0
- package/src/firstEdition/molecules/slider-field.css +83 -0
- package/src/firstEdition/molecules/switch-field.css +37 -0
- package/src/firstEdition/molecules/tab-group.css +26 -0
- package/src/firstEdition/molecules/toast-container.css +45 -0
- package/src/firstEdition/radio.css +121 -0
- package/src/firstEdition/rich-text.css +134 -0
- package/src/firstEdition/select.css +337 -0
- package/src/firstEdition/slider.css +228 -0
- package/src/firstEdition/spacing.css +6 -0
- package/src/firstEdition/spinner.css +94 -0
- package/src/firstEdition/styles.css +27 -0
- package/src/firstEdition/switch.css +156 -0
- package/src/firstEdition/tab.css +81 -0
- package/src/firstEdition/textarea.css +63 -0
- package/src/firstEdition/toast.css +318 -0
- package/src/firstEdition/tokens.css +35 -0
- package/src/firstEdition/tooltip.css +112 -0
- package/src/firstEdition/typography.css +33 -0
- package/dist/chunk-UJIVT75P.js +0 -26
- package/dist/chunk-UJIVT75P.js.map +0 -1
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Radio Component Styles
|
|
3
|
+
* Figma: 1368:6734 (light) / 1368:6900 (dark)
|
|
4
|
+
*
|
|
5
|
+
* Tokens (from Figma nodes.json):
|
|
6
|
+
* radio/surface (light): #f9fafb (dark): #141414
|
|
7
|
+
* radio/border (light): #e5e7eb (dark): #374151
|
|
8
|
+
* radio/dot (light): #2f31fc (dark): #2f31fc (= primary-base)
|
|
9
|
+
* radio/label (light): #141414 (dark): #f9fafb (= text)
|
|
10
|
+
* Dimensions: 18×18px circle, 10px inner dot (from Figma)
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
.mw-radio {
|
|
14
|
+
--mw-radio-surface: var(--mw-color-surface);
|
|
15
|
+
--mw-radio-border: var(--mw-color-border-subtle);
|
|
16
|
+
--mw-radio-dot: var(--mw-color-primary-base, #2f31fc);
|
|
17
|
+
|
|
18
|
+
/* Reset native appearance */
|
|
19
|
+
appearance: none;
|
|
20
|
+
-webkit-appearance: none;
|
|
21
|
+
|
|
22
|
+
/* Grid centering for ::before dot */
|
|
23
|
+
display: inline-grid;
|
|
24
|
+
place-content: center;
|
|
25
|
+
|
|
26
|
+
width: 18px;
|
|
27
|
+
height: 18px;
|
|
28
|
+
border-radius: 50%;
|
|
29
|
+
margin: 0;
|
|
30
|
+
border: 1.5px solid var(--mw-radio-border);
|
|
31
|
+
background: var(--mw-radio-surface);
|
|
32
|
+
|
|
33
|
+
cursor: pointer;
|
|
34
|
+
vertical-align: middle;
|
|
35
|
+
flex-shrink: 0;
|
|
36
|
+
transition: border-color 150ms ease, background 150ms ease;
|
|
37
|
+
font-family: var(--mw-font-primary, inherit);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/* Inner dot — hidden by default, scales in when checked */
|
|
41
|
+
.mw-radio::before {
|
|
42
|
+
content: "";
|
|
43
|
+
width: 10px;
|
|
44
|
+
height: 10px;
|
|
45
|
+
border-radius: 50%;
|
|
46
|
+
background: var(--mw-radio-dot);
|
|
47
|
+
transform: scale(0);
|
|
48
|
+
transition: transform 180ms ease;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/* ============================================
|
|
52
|
+
CHECKED STATE
|
|
53
|
+
============================================ */
|
|
54
|
+
|
|
55
|
+
.mw-radio:checked {
|
|
56
|
+
border-color: var(--mw-radio-border);
|
|
57
|
+
background: var(--mw-radio-surface);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.mw-radio:checked::before {
|
|
61
|
+
transform: scale(1);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/* ============================================
|
|
65
|
+
HOVER STATE
|
|
66
|
+
============================================ */
|
|
67
|
+
|
|
68
|
+
.mw-radio:hover:not(:disabled) {
|
|
69
|
+
border-color: color-mix(in srgb, var(--mw-radio-border) 60%, var(--mw-radio-dot));
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/* ============================================
|
|
73
|
+
FOCUS
|
|
74
|
+
============================================ */
|
|
75
|
+
|
|
76
|
+
.mw-radio:focus-visible {
|
|
77
|
+
outline: 2px solid var(--mw-color-focus);
|
|
78
|
+
outline-offset: 2px;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/* ============================================
|
|
82
|
+
DISABLED STATE
|
|
83
|
+
============================================ */
|
|
84
|
+
|
|
85
|
+
.mw-radio:disabled,
|
|
86
|
+
.mw-radio--disabled {
|
|
87
|
+
cursor: not-allowed;
|
|
88
|
+
opacity: 0.2;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/* ============================================
|
|
92
|
+
INVALID STATE
|
|
93
|
+
============================================ */
|
|
94
|
+
|
|
95
|
+
.mw-radio--invalid,
|
|
96
|
+
.mw-radio[aria-invalid="true"] {
|
|
97
|
+
border-color: var(--mw-color-danger-base);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.mw-radio:checked.mw-radio--invalid::before,
|
|
101
|
+
.mw-radio:checked[aria-invalid="true"]::before {
|
|
102
|
+
background: var(--mw-color-danger-base);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/* ============================================
|
|
106
|
+
DARK MODE OVERRIDES
|
|
107
|
+
============================================ */
|
|
108
|
+
|
|
109
|
+
.mw-theme--dark .mw-radio {
|
|
110
|
+
--mw-radio-surface: var(--mw-color-surface);
|
|
111
|
+
--mw-radio-border: var(--mw-color-border-subtle);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.mw-theme--dark .mw-radio:hover:not(:disabled) {
|
|
115
|
+
border-color: color-mix(in srgb, var(--mw-color-text) 40%, var(--mw-radio-dot));
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.mw-theme--dark .mw-radio:disabled,
|
|
119
|
+
.mw-theme--dark .mw-radio--disabled {
|
|
120
|
+
opacity: 0.4;
|
|
121
|
+
}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* RichText Component Styles
|
|
3
|
+
* Textarea-like rich text editor with inline formatting toolbar.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
.mw-rich-text {
|
|
7
|
+
width: 260px;
|
|
8
|
+
border-radius: var(--mw-ui-radius);
|
|
9
|
+
border: 1px solid var(--mw-color-border);
|
|
10
|
+
background: var(--mw-color-surface);
|
|
11
|
+
color: var(--mw-color-text);
|
|
12
|
+
transition: border-color 150ms ease, outline 150ms ease;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.mw-rich-text:hover:not([data-disabled="true"]):not(:has(.mw-rich-text__editor:focus-visible)) {
|
|
16
|
+
border-color: color-mix(in srgb, var(--mw-color-border) 70%, var(--mw-color-text));
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.mw-rich-text:has(.mw-rich-text__editor:focus-visible) {
|
|
20
|
+
outline: 2px solid var(--mw-color-focus);
|
|
21
|
+
outline-offset: 2px;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.mw-rich-text.is-invalid,
|
|
25
|
+
.mw-rich-text--danger,
|
|
26
|
+
.mw-input-field--invalid .mw-rich-text {
|
|
27
|
+
border-color: var(--mw-color-danger-base);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.mw-rich-text.is-invalid:has(.mw-rich-text__editor:focus-visible),
|
|
31
|
+
.mw-rich-text--danger:has(.mw-rich-text__editor:focus-visible),
|
|
32
|
+
.mw-input-field--invalid .mw-rich-text:has(.mw-rich-text__editor:focus-visible) {
|
|
33
|
+
outline-color: var(--mw-color-danger-base);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.mw-rich-text--success {
|
|
37
|
+
border-color: var(--mw-color-success-base);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.mw-rich-text--success:has(.mw-rich-text__editor:focus-visible) {
|
|
41
|
+
outline-color: var(--mw-color-success-base);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.mw-rich-text[data-disabled="true"] {
|
|
45
|
+
opacity: 0.2;
|
|
46
|
+
cursor: not-allowed;
|
|
47
|
+
border-color: var(--mw-color-border-disabled);
|
|
48
|
+
background: var(--mw-color-surface-disabled);
|
|
49
|
+
color: var(--mw-color-text-disabled);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.mw-rich-text__toolbar {
|
|
53
|
+
display: flex;
|
|
54
|
+
gap: var(--mw-spacing-sp-4, 4px);
|
|
55
|
+
padding: var(--mw-spacing-sp-8);
|
|
56
|
+
border-bottom: 1px solid var(--mw-color-border);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.mw-rich-text__toolbar-button {
|
|
60
|
+
display: inline-flex;
|
|
61
|
+
align-items: center;
|
|
62
|
+
justify-content: center;
|
|
63
|
+
width: 32px;
|
|
64
|
+
height: 32px;
|
|
65
|
+
padding: 0;
|
|
66
|
+
border: none;
|
|
67
|
+
border-radius: var(--mw-ui-radius, 4px);
|
|
68
|
+
background: transparent;
|
|
69
|
+
color: var(--mw-color-text-muted);
|
|
70
|
+
cursor: pointer;
|
|
71
|
+
transition: background 150ms ease, color 150ms ease;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.mw-rich-text__toolbar-button:hover:not(:disabled) {
|
|
75
|
+
background: var(--mw-color-surface-elevated, #f3f4f6);
|
|
76
|
+
color: var(--mw-color-text);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.mw-rich-text__toolbar-button:focus-visible {
|
|
80
|
+
outline: 2px solid var(--mw-color-focus);
|
|
81
|
+
outline-offset: 2px;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.mw-rich-text__toolbar-button[data-active="true"] {
|
|
85
|
+
background: color-mix(in srgb, var(--mw-color-primary-base) 12%, transparent);
|
|
86
|
+
color: var(--mw-color-primary-base);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.mw-rich-text__toolbar-button:disabled {
|
|
90
|
+
cursor: not-allowed;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.mw-rich-text__editor {
|
|
94
|
+
min-height: calc(var(--mw-density-height) * 3);
|
|
95
|
+
padding: var(--mw-density-padding-y) var(--mw-density-padding-x);
|
|
96
|
+
font-family: var(--mw-font-primary, inherit);
|
|
97
|
+
font-size: var(--mw-density-font-size);
|
|
98
|
+
line-height: 1.5;
|
|
99
|
+
color: inherit;
|
|
100
|
+
outline: none;
|
|
101
|
+
white-space: pre-wrap;
|
|
102
|
+
word-break: break-word;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.mw-rich-text__editor[data-empty="true"]::before {
|
|
106
|
+
content: attr(data-placeholder);
|
|
107
|
+
color: var(--mw-color-text-muted);
|
|
108
|
+
pointer-events: none;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.mw-rich-text__editor p {
|
|
112
|
+
margin: 0;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.mw-rich-text__editor p + p {
|
|
116
|
+
margin-top: var(--mw-spacing-sp-8);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.mw-rich-text__editor strong {
|
|
120
|
+
font-weight: 700;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.mw-rich-text__editor em {
|
|
124
|
+
font-style: italic;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.mw-rich-text__editor u {
|
|
128
|
+
text-decoration: underline;
|
|
129
|
+
text-underline-offset: 2px;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
.mw-rich-text[data-readonly="true"] .mw-rich-text__editor {
|
|
133
|
+
cursor: default;
|
|
134
|
+
}
|
|
@@ -0,0 +1,337 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Select Component Styles
|
|
3
|
+
* Figma references:
|
|
4
|
+
* - Compact select atom: 1364:7707
|
|
5
|
+
* - Dropdown field trigger: 1364:7701
|
|
6
|
+
* - Dropdown token mapping:
|
|
7
|
+
* dropdown/list-surface -> --mw-dropdown-list-surface
|
|
8
|
+
* dropdown/list-border -> --mw-dropdown-list-border
|
|
9
|
+
* dropdown/item-surface -> --mw-dropdown-item-surface
|
|
10
|
+
* dropdown/item-label -> --mw-dropdown-item-label
|
|
11
|
+
* dropdown/item-check -> --mw-dropdown-item-check
|
|
12
|
+
*
|
|
13
|
+
* Color-token guidance:
|
|
14
|
+
* - See packages/presets/COLORS.md
|
|
15
|
+
* - Use --mw-color-text for neutral black/white emphasis
|
|
16
|
+
* - Use --mw-color-primary-base for brand-accent emphasis
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
.mw-select__control {
|
|
20
|
+
position: relative;
|
|
21
|
+
display: inline-flex;
|
|
22
|
+
align-items: center;
|
|
23
|
+
width: auto;
|
|
24
|
+
min-width: 96px;
|
|
25
|
+
max-width: 100%;
|
|
26
|
+
max-inline-size: 100%;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.mw-select {
|
|
30
|
+
appearance: none;
|
|
31
|
+
-webkit-appearance: none;
|
|
32
|
+
-moz-appearance: none;
|
|
33
|
+
field-sizing: fixed;
|
|
34
|
+
box-sizing: border-box;
|
|
35
|
+
display: block;
|
|
36
|
+
min-height: 34px;
|
|
37
|
+
padding: 8px 32px 8px 12px; /* off-scale — no token */
|
|
38
|
+
border-radius: var(--mw-ui-radius);
|
|
39
|
+
border: 1px solid var(--mw-color-border);
|
|
40
|
+
background-color: var(--mw-color-surface);
|
|
41
|
+
color: var(--mw-color-text);
|
|
42
|
+
font-family: var(--mw-font-primary, inherit);
|
|
43
|
+
font-size: 14px;
|
|
44
|
+
line-height: 16px;
|
|
45
|
+
width: auto;
|
|
46
|
+
min-width: 96px;
|
|
47
|
+
max-width: 100%;
|
|
48
|
+
max-inline-size: 100%;
|
|
49
|
+
white-space: nowrap;
|
|
50
|
+
overflow: hidden;
|
|
51
|
+
text-overflow: ellipsis;
|
|
52
|
+
transition: border-color 150ms ease, outline 150ms ease, background-color 150ms ease;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.mw-select__control-icon {
|
|
56
|
+
position: absolute;
|
|
57
|
+
top: 50%;
|
|
58
|
+
right: 12px;
|
|
59
|
+
transform: translateY(-50%);
|
|
60
|
+
pointer-events: none;
|
|
61
|
+
color: var(--mw-color-text-muted);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.mw-select[data-placeholder-selected="true"] {
|
|
65
|
+
color: var(--mw-color-text-muted);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.mw-select--native {
|
|
69
|
+
appearance: auto;
|
|
70
|
+
-webkit-appearance: menulist;
|
|
71
|
+
-moz-appearance: menulist;
|
|
72
|
+
padding-right: 12px;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.mw-input-field__input-wrapper .mw-select__control {
|
|
76
|
+
width: 100%;
|
|
77
|
+
min-width: 0;
|
|
78
|
+
max-width: 100%;
|
|
79
|
+
inline-size: 100%;
|
|
80
|
+
min-inline-size: 0;
|
|
81
|
+
max-inline-size: 100%;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.mw-input-field__input-wrapper .mw-select {
|
|
85
|
+
width: 100%;
|
|
86
|
+
min-width: 0;
|
|
87
|
+
max-width: 100%;
|
|
88
|
+
inline-size: 100%;
|
|
89
|
+
min-inline-size: 0;
|
|
90
|
+
max-inline-size: 100%;
|
|
91
|
+
min-height: 42px;
|
|
92
|
+
padding: 12px 40px 12px 16px; /* off-scale — no token */
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.mw-input-field__input-wrapper .mw-select--native {
|
|
96
|
+
padding: 12px; /* off-scale — native select keeps browser arrow padding */
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.mw-input-field__input-wrapper .mw-select-field__control {
|
|
100
|
+
--mw-dropdown-list-surface: var(--mw-color-surface-elevated);
|
|
101
|
+
--mw-dropdown-list-border: var(--mw-color-border);
|
|
102
|
+
--mw-dropdown-item-surface: var(--mw-color-surface-elevated);
|
|
103
|
+
--mw-dropdown-item-surface-hover: var(--mw-color-surface-subtle, #f3f4f6);
|
|
104
|
+
--mw-dropdown-item-surface-pressed: var(--mw-color-border-subtle, #e5e7eb);
|
|
105
|
+
--mw-dropdown-item-label: var(--mw-color-text);
|
|
106
|
+
--mw-dropdown-item-check: var(--mw-color-primary-base);
|
|
107
|
+
position: relative;
|
|
108
|
+
width: 100%;
|
|
109
|
+
min-width: 0;
|
|
110
|
+
max-width: 100%;
|
|
111
|
+
inline-size: 100%;
|
|
112
|
+
min-inline-size: 0;
|
|
113
|
+
max-inline-size: 100%;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.mw-select-field__trigger {
|
|
117
|
+
appearance: none;
|
|
118
|
+
box-sizing: border-box;
|
|
119
|
+
display: flex;
|
|
120
|
+
align-items: center;
|
|
121
|
+
justify-content: space-between;
|
|
122
|
+
gap: 4px; /* off-scale — no token */
|
|
123
|
+
width: 100%;
|
|
124
|
+
max-width: 100%;
|
|
125
|
+
inline-size: 100%;
|
|
126
|
+
min-inline-size: 0;
|
|
127
|
+
max-inline-size: 100%;
|
|
128
|
+
min-height: 40px;
|
|
129
|
+
padding: 8px 12px; /* off-scale — no token */
|
|
130
|
+
border-radius: var(--mw-ui-radius);
|
|
131
|
+
border: 1px solid var(--mw-color-border);
|
|
132
|
+
background-color: var(--mw-color-surface);
|
|
133
|
+
color: var(--mw-color-text);
|
|
134
|
+
font-family: var(--mw-font-primary, inherit);
|
|
135
|
+
font-size: 14px;
|
|
136
|
+
line-height: 16px;
|
|
137
|
+
text-align: left;
|
|
138
|
+
overflow: hidden;
|
|
139
|
+
cursor: pointer;
|
|
140
|
+
transition: border-color 150ms ease, outline 150ms ease, background-color 150ms ease, color 150ms
|
|
141
|
+
ease;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.mw-select-field__trigger-text {
|
|
145
|
+
min-width: 0;
|
|
146
|
+
flex: 1;
|
|
147
|
+
overflow: hidden;
|
|
148
|
+
white-space: nowrap;
|
|
149
|
+
text-overflow: ellipsis;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.mw-select-field__trigger--placeholder,
|
|
153
|
+
.mw-select-field__trigger[data-placeholder-selected="true"] {
|
|
154
|
+
color: var(--mw-color-text-muted);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.mw-select-field__trigger-icon {
|
|
158
|
+
flex-shrink: 0;
|
|
159
|
+
color: var(--mw-color-text-muted);
|
|
160
|
+
transition: transform 150ms ease;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.mw-select__control:has(.mw-select:focus-visible) .mw-select__control-icon,
|
|
164
|
+
.mw-select__control:has(.mw-select:hover:not(:disabled):not(:focus)) .mw-select__control-icon {
|
|
165
|
+
color: var(--mw-color-text);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.mw-select-field__trigger:hover:not(:disabled):not(:focus-visible) {
|
|
169
|
+
border-color: color-mix(in srgb, var(--mw-color-border) 70%, var(--mw-color-text));
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.mw-select-field__trigger:focus-visible {
|
|
173
|
+
outline: 2px solid var(--mw-color-focus);
|
|
174
|
+
outline-offset: 2px;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.mw-select-field__trigger.is-invalid {
|
|
178
|
+
border-color: var(--mw-color-danger-base);
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.mw-select-field__trigger.is-invalid:focus-visible {
|
|
182
|
+
outline-color: var(--mw-color-danger-base);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.mw-select-field__trigger:disabled {
|
|
186
|
+
opacity: 0.2;
|
|
187
|
+
cursor: not-allowed;
|
|
188
|
+
pointer-events: none;
|
|
189
|
+
border-color: var(--mw-color-border-disabled);
|
|
190
|
+
background-color: var(--mw-color-surface-disabled);
|
|
191
|
+
color: var(--mw-color-text-disabled);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.mw-select-field__control--open .mw-select-field__trigger,
|
|
195
|
+
.mw-select-field__trigger--open {
|
|
196
|
+
border-color: var(--mw-color-border-strong);
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
.mw-select-field__control--open .mw-select-field__trigger-icon,
|
|
200
|
+
.mw-select-field__trigger--open .mw-select-field__trigger-icon {
|
|
201
|
+
color: var(--mw-color-text);
|
|
202
|
+
transform: rotate(180deg);
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
.mw-select-field__list {
|
|
206
|
+
position: absolute;
|
|
207
|
+
top: 100%;
|
|
208
|
+
left: 0;
|
|
209
|
+
z-index: 20;
|
|
210
|
+
width: 100%;
|
|
211
|
+
max-width: 100%;
|
|
212
|
+
padding: var(--mw-spacing-sp-4) 0;
|
|
213
|
+
border: 1px solid var(--mw-dropdown-list-border);
|
|
214
|
+
border-radius: var(--mw-ui-radius);
|
|
215
|
+
background-color: var(--mw-dropdown-list-surface);
|
|
216
|
+
box-shadow: 0 4px 12px rgb(0 0 0 / 0.08);
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
.mw-select-field__option {
|
|
220
|
+
display: flex;
|
|
221
|
+
align-items: center;
|
|
222
|
+
justify-content: space-between;
|
|
223
|
+
gap: 12px; /* off-scale — no token */
|
|
224
|
+
padding: var(--mw-spacing-sp-8) var(--mw-spacing-sp-16);
|
|
225
|
+
background-color: var(--mw-dropdown-item-surface);
|
|
226
|
+
color: var(--mw-dropdown-item-label);
|
|
227
|
+
font-family: var(--mw-font-primary, inherit);
|
|
228
|
+
font-size: 14px;
|
|
229
|
+
line-height: 16px;
|
|
230
|
+
cursor: pointer;
|
|
231
|
+
transition: background-color 150ms ease;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
.mw-select-field__option--active:not(.mw-select-field__option--disabled),
|
|
235
|
+
.mw-select-field__option:hover:not(.mw-select-field__option--disabled) {
|
|
236
|
+
background-color: var(--mw-dropdown-item-surface-hover);
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
.mw-select-field__option:active:not(.mw-select-field__option--disabled) {
|
|
240
|
+
background-color: var(--mw-dropdown-item-surface-pressed);
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
.mw-select-field__option--selected {
|
|
244
|
+
font-weight: 400;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
.mw-select-field__option--disabled {
|
|
248
|
+
opacity: 0.45;
|
|
249
|
+
cursor: not-allowed;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
.mw-select-field__option-label {
|
|
253
|
+
min-width: 0;
|
|
254
|
+
flex: 1;
|
|
255
|
+
overflow: hidden;
|
|
256
|
+
white-space: nowrap;
|
|
257
|
+
text-overflow: ellipsis;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
.mw-select-field__option-check {
|
|
261
|
+
flex-shrink: 0;
|
|
262
|
+
color: var(--mw-dropdown-item-check);
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
.mw-select:hover:not(:disabled):not(:focus) {
|
|
266
|
+
border-color: color-mix(in srgb, var(--mw-color-border) 70%, var(--mw-color-text));
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
.mw-select:focus-visible {
|
|
270
|
+
outline: 2px solid var(--mw-color-focus);
|
|
271
|
+
outline-offset: 2px;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
.mw-select.is-invalid,
|
|
275
|
+
.mw-select--danger {
|
|
276
|
+
border-color: var(--mw-color-danger-base);
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
.mw-select.is-invalid:focus-visible,
|
|
280
|
+
.mw-select--danger:focus-visible {
|
|
281
|
+
outline-color: var(--mw-color-danger-base);
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
.mw-select--success {
|
|
285
|
+
border-color: var(--mw-color-success-base);
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
.mw-select--success:focus-visible {
|
|
289
|
+
outline-color: var(--mw-color-success-base);
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
.mw-select:disabled {
|
|
293
|
+
opacity: 0.2;
|
|
294
|
+
cursor: not-allowed;
|
|
295
|
+
pointer-events: none;
|
|
296
|
+
border-color: var(--mw-color-border-disabled);
|
|
297
|
+
background-color: var(--mw-color-surface-disabled);
|
|
298
|
+
color: var(--mw-color-text-disabled);
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
.mw-select__control:has(.mw-select:disabled) .mw-select__control-icon {
|
|
302
|
+
color: var(--mw-color-text-disabled);
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
.mw-theme--dark .mw-select {
|
|
306
|
+
background-color: var(--mw-color-surface-elevated);
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
.mw-select-field__trigger:disabled .mw-select-field__trigger-icon {
|
|
310
|
+
color: var(--mw-color-text-disabled);
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
.mw-theme--dark .mw-select-field__trigger {
|
|
314
|
+
background-color: var(--mw-color-surface-elevated);
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
.mw-theme--dark .mw-input-field__input-wrapper .mw-select-field__control {
|
|
318
|
+
--mw-dropdown-list-surface: var(--mw-color-surface-elevated);
|
|
319
|
+
--mw-dropdown-list-border: var(--mw-color-border);
|
|
320
|
+
--mw-dropdown-item-surface: var(--mw-color-surface-elevated);
|
|
321
|
+
--mw-dropdown-item-surface-hover: color-mix(
|
|
322
|
+
in srgb,
|
|
323
|
+
var(--mw-color-surface-elevated) 88%,
|
|
324
|
+
var(--mw-color-text) 12%
|
|
325
|
+
);
|
|
326
|
+
--mw-dropdown-item-surface-pressed: color-mix(
|
|
327
|
+
in srgb,
|
|
328
|
+
var(--mw-color-surface-elevated) 78%,
|
|
329
|
+
var(--mw-color-text) 22%
|
|
330
|
+
);
|
|
331
|
+
--mw-dropdown-item-label: var(--mw-color-text);
|
|
332
|
+
--mw-dropdown-item-check: var(--mw-color-primary-base);
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
.mw-theme--dark .mw-select-field__list {
|
|
336
|
+
box-shadow: 0 4px 12px rgb(0 0 0 / 0.4);
|
|
337
|
+
}
|