@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,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* AccordionField (Molecule)
|
|
3
|
+
*
|
|
4
|
+
* Layout for label + accordion items group + description/error text.
|
|
5
|
+
* The accordion items themselves are styled by accordion.css (atom).
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
.mw-accordion-field {
|
|
9
|
+
display: grid;
|
|
10
|
+
gap: var(--mw-density-field-gap, 8px);
|
|
11
|
+
border: none;
|
|
12
|
+
padding: 0;
|
|
13
|
+
margin: 0;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.mw-accordion-field__label {
|
|
17
|
+
display: block;
|
|
18
|
+
user-select: none;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.mw-accordion-field__items {
|
|
22
|
+
display: grid;
|
|
23
|
+
gap: var(--mw-density-gap, 4px);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.mw-accordion-field__description {
|
|
27
|
+
opacity: 0.6;
|
|
28
|
+
font-size: 0.875em;
|
|
29
|
+
color: var(--mw-color-text-muted, #6b7280);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.mw-accordion-field__error {
|
|
33
|
+
font-size: 0.875em;
|
|
34
|
+
color: var(--mw-color-danger-base, #dc2626);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/* State modifiers */
|
|
38
|
+
.mw-accordion-field--disabled {
|
|
39
|
+
opacity: 0.7;
|
|
40
|
+
cursor: not-allowed;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.mw-accordion-field--invalid .mw-accordion-field__label .mw-p,
|
|
44
|
+
.mw-accordion-field--invalid .mw-accordion-field__error .mw-p {
|
|
45
|
+
color: var(--mw-color-danger-base, #dc2626);
|
|
46
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
.mw-checkbox-field {
|
|
2
|
+
display: grid;
|
|
3
|
+
gap: var(--mw-density-gap);
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.mw-checkbox-field__row {
|
|
7
|
+
display: inline-flex;
|
|
8
|
+
align-items: center;
|
|
9
|
+
gap: var(--mw-density-gap);
|
|
10
|
+
border-radius: max(2px, calc(var(--mw-ui-radius, 4px) * 0.4));
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.mw-checkbox-field__label {
|
|
14
|
+
cursor: pointer;
|
|
15
|
+
user-select: none;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.mw-checkbox-field__description {
|
|
19
|
+
opacity: 0.75;
|
|
20
|
+
margin-left: calc(
|
|
21
|
+
var(--mw-density-checkbox-size) +
|
|
22
|
+
var(--mw-spacing-sp-8) +
|
|
23
|
+
var(--mw-density-gap) /* checkbox size + margin + spacing to textfield */
|
|
24
|
+
);
|
|
25
|
+
font-size: var(--mw-density-font-size-sm);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
@supports selector(:has(*)) {
|
|
29
|
+
.mw-checkbox-field__row:has(.mw-checkbox:focus-visible) {
|
|
30
|
+
outline: 2px solid var(--mw-color-focus);
|
|
31
|
+
outline-offset: 2px;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.mw-checkbox-field__row:has(.mw-checkbox:focus-visible) .mw-checkbox {
|
|
35
|
+
outline: none;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.mw-checkbox-field__error {
|
|
40
|
+
margin-left: calc(
|
|
41
|
+
var(--mw-density-checkbox-size) +
|
|
42
|
+
var(--mw-spacing-sp-8) +
|
|
43
|
+
var(--mw-density-gap) /* checkbox size + margin + spacing to textfield */
|
|
44
|
+
);
|
|
45
|
+
font-size: var(--mw-density-font-size-sm);
|
|
46
|
+
color: var(--mw-color-danger-base, #dc2626);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/* Optional state hooks */
|
|
50
|
+
.mw-checkbox-field--disabled .mw-checkbox-field__label {
|
|
51
|
+
cursor: not-allowed;
|
|
52
|
+
opacity: 0.7;
|
|
53
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
.mw-checkbox-group-field {
|
|
2
|
+
display: grid;
|
|
3
|
+
gap: 4px;
|
|
4
|
+
border: none;
|
|
5
|
+
padding: 0;
|
|
6
|
+
margin: 0;
|
|
7
|
+
min-inline-size: 0;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.mw-checkbox-group-field__label {
|
|
11
|
+
display: block;
|
|
12
|
+
inline-size: 100%;
|
|
13
|
+
padding: 0;
|
|
14
|
+
margin: 0;
|
|
15
|
+
user-select: none;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.mw-checkbox-group-field__options {
|
|
19
|
+
display: grid;
|
|
20
|
+
gap: 0;
|
|
21
|
+
margin-top: 4px;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.mw-checkbox-group-field__option {
|
|
25
|
+
display: inline-flex;
|
|
26
|
+
align-items: center;
|
|
27
|
+
gap: var(--mw-density-gap);
|
|
28
|
+
min-height: 32px;
|
|
29
|
+
border-radius: max(2px, calc(var(--mw-ui-radius, 4px) * 0.4));
|
|
30
|
+
cursor: pointer;
|
|
31
|
+
user-select: none;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.mw-checkbox-group-field__option .mw-p {
|
|
35
|
+
line-height: 1;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.mw-checkbox-group-field__description {
|
|
39
|
+
opacity: 0.75;
|
|
40
|
+
font-size: var(--mw-density-font-size-sm);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.mw-checkbox-group-field__error {
|
|
44
|
+
font-size: var(--mw-density-font-size-sm);
|
|
45
|
+
color: var(--mw-color-danger-base, #dc2626);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.mw-checkbox-group-field--disabled .mw-checkbox-group-field__option {
|
|
49
|
+
cursor: not-allowed;
|
|
50
|
+
opacity: 0.7;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.mw-checkbox-group-field--invalid .mw-checkbox-group-field__label .mw-p,
|
|
54
|
+
.mw-checkbox-group-field--invalid .mw-checkbox-group-field__error .mw-p {
|
|
55
|
+
color: var(--mw-color-danger-base, #dc2626);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
@supports selector(:has(*)) {
|
|
59
|
+
.mw-checkbox-group-field__option:has(.mw-checkbox:focus-visible) {
|
|
60
|
+
outline: 2px solid var(--mw-color-focus);
|
|
61
|
+
outline-offset: 2px;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.mw-checkbox-group-field__option:has(.mw-checkbox:focus-visible) .mw-checkbox {
|
|
65
|
+
outline: none;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
.mw-dialog-modal {
|
|
2
|
+
position: fixed;
|
|
3
|
+
inset: 0;
|
|
4
|
+
z-index: 1100;
|
|
5
|
+
display: flex;
|
|
6
|
+
align-items: center;
|
|
7
|
+
justify-content: center;
|
|
8
|
+
padding: var(--mw-spacing-sp-24);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.mw-dialog-modal__scrim {
|
|
12
|
+
position: absolute;
|
|
13
|
+
inset: 0;
|
|
14
|
+
background: rgba(0, 0, 0, 0.6);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.mw-dialog-modal__surface {
|
|
18
|
+
position: relative;
|
|
19
|
+
z-index: 1;
|
|
20
|
+
width: 100%;
|
|
21
|
+
display: flex;
|
|
22
|
+
justify-content: center;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.mw-dialog-modal__surface > .mw-dialog {
|
|
26
|
+
box-shadow: 0 4px 24px 0 rgba(0, 0, 0, 0.08);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
@media (max-width: 640px) {
|
|
30
|
+
.mw-dialog-modal {
|
|
31
|
+
padding: 12px; /* off-scale — no token */
|
|
32
|
+
align-items: flex-end;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* InputField (Molecule)
|
|
3
|
+
*
|
|
4
|
+
* Layout for label + input + helper/error text
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
.mw-input-field {
|
|
8
|
+
display: grid;
|
|
9
|
+
gap: var(--mw-density-field-gap);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.mw-input-field__label {
|
|
13
|
+
display: block;
|
|
14
|
+
padding: 0;
|
|
15
|
+
background: none;
|
|
16
|
+
border: none;
|
|
17
|
+
cursor: pointer;
|
|
18
|
+
user-select: none;
|
|
19
|
+
opacity: 0.6;
|
|
20
|
+
transition: opacity 0.2s ease;
|
|
21
|
+
text-align: left;
|
|
22
|
+
font: inherit;
|
|
23
|
+
|
|
24
|
+
p {
|
|
25
|
+
line-height: 1;
|
|
26
|
+
font-size: var(--mw-density-font-size);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.mw-input-field__input-wrapper {
|
|
31
|
+
position: relative;
|
|
32
|
+
display: flex;
|
|
33
|
+
align-items: center;
|
|
34
|
+
|
|
35
|
+
.mw-input,
|
|
36
|
+
.mw-select,
|
|
37
|
+
.mw-textarea {
|
|
38
|
+
flex: 1;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&:has(.mw-input-field__toggle-password) .mw-input,
|
|
42
|
+
&:has(.mw-input-field__search-icon) .mw-input,
|
|
43
|
+
&:has(.mw-input-field__clear-search) .mw-input {
|
|
44
|
+
padding-right: var(--mw-spacing-sp-40);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.mw-input-field__toggle-password {
|
|
49
|
+
position: absolute;
|
|
50
|
+
right: var(--mw-spacing-sp-8);
|
|
51
|
+
display: flex;
|
|
52
|
+
align-items: center;
|
|
53
|
+
justify-content: center;
|
|
54
|
+
padding: 6px; /* off-scale — no token */
|
|
55
|
+
background: transparent;
|
|
56
|
+
border: none;
|
|
57
|
+
cursor: pointer;
|
|
58
|
+
color: var(--mw-color-text-muted, #6b7280);
|
|
59
|
+
transition: color 0.2s ease;
|
|
60
|
+
border-radius: var(--mw-ui-radius, 4px);
|
|
61
|
+
|
|
62
|
+
&:hover {
|
|
63
|
+
color: var(--mw-color-text, #111827);
|
|
64
|
+
background: var(--mw-color-surface, #f3f4f6);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
&:focus {
|
|
68
|
+
outline: 2px solid var(--mw-color-primary-base, #3b82f6);
|
|
69
|
+
outline-offset: 2px;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
&:active {
|
|
73
|
+
background: var(--mw-color-border-subtle, #e5e7eb);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.mw-input-field__search-icon {
|
|
78
|
+
position: absolute;
|
|
79
|
+
right: var(--mw-spacing-sp-8);
|
|
80
|
+
display: flex;
|
|
81
|
+
align-items: center;
|
|
82
|
+
justify-content: center;
|
|
83
|
+
padding: 6px; /* off-scale — no token */
|
|
84
|
+
color: var(--mw-color-text-muted, #6b7280);
|
|
85
|
+
pointer-events: none;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.mw-input-field__clear-search {
|
|
89
|
+
position: absolute;
|
|
90
|
+
right: var(--mw-spacing-sp-8);
|
|
91
|
+
display: flex;
|
|
92
|
+
align-items: center;
|
|
93
|
+
justify-content: center;
|
|
94
|
+
padding: 6px; /* off-scale — no token */
|
|
95
|
+
background: transparent;
|
|
96
|
+
border: none;
|
|
97
|
+
cursor: pointer;
|
|
98
|
+
color: var(--mw-color-text-muted, #6b7280);
|
|
99
|
+
transition: color 0.2s ease;
|
|
100
|
+
border-radius: var(--mw-ui-radius, 4px);
|
|
101
|
+
|
|
102
|
+
&:hover {
|
|
103
|
+
color: var(--mw-color-text, #111827);
|
|
104
|
+
background: var(--mw-color-surface, #f3f4f6);
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
&:focus {
|
|
108
|
+
outline: 2px solid var(--mw-color-primary-base, #3b82f6);
|
|
109
|
+
outline-offset: 2px;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
&:active {
|
|
113
|
+
background: var(--mw-color-border-subtle, #e5e7eb);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.mw-input-field__leading-symbol {
|
|
118
|
+
display: flex;
|
|
119
|
+
align-items: center;
|
|
120
|
+
justify-content: center;
|
|
121
|
+
padding-left: var(--mw-spacing-sp-16);
|
|
122
|
+
white-space: nowrap;
|
|
123
|
+
color: var(--mw-color-text-muted, #6b7280);
|
|
124
|
+
pointer-events: none;
|
|
125
|
+
font-weight: 400;
|
|
126
|
+
font-family: var(--mw-font-primary, inherit);
|
|
127
|
+
font-size: var(--mw-density-font-size);
|
|
128
|
+
line-height: 1;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* When a leading symbol is present the wrapper takes over the input's border
|
|
133
|
+
* so the symbol appears visually inside the field boundary.
|
|
134
|
+
*/
|
|
135
|
+
.mw-input-field__input-wrapper:has(.mw-input-field__leading-symbol) {
|
|
136
|
+
border: 1px solid var(--mw-color-border);
|
|
137
|
+
border-radius: var(--mw-ui-radius);
|
|
138
|
+
background: var(--mw-color-surface);
|
|
139
|
+
transition: border-color 150ms ease, outline 150ms ease;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.mw-input-field__input-wrapper:has(.mw-input-field__leading-symbol) .mw-input {
|
|
143
|
+
width: 100%;
|
|
144
|
+
min-width: 0;
|
|
145
|
+
padding-left: var(--mw-spacing-sp-8);
|
|
146
|
+
border: none;
|
|
147
|
+
border-radius: 0;
|
|
148
|
+
background: transparent;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
/* Hover — forward to wrapper when symbol is present */
|
|
152
|
+
.mw-input-field__input-wrapper:has(.mw-input-field__leading-symbol):hover:not(:has(:disabled)):not(
|
|
153
|
+
:has(:focus)
|
|
154
|
+
) {
|
|
155
|
+
border-color: color-mix(in srgb, var(--mw-color-border) 70%, var(--mw-color-text));
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/* Focus — wrapper gets outline when symbol is present */
|
|
159
|
+
.mw-input-field__input-wrapper:has(.mw-input-field__leading-symbol):has(:focus-visible) {
|
|
160
|
+
outline: 2px solid var(--mw-color-focus);
|
|
161
|
+
outline-offset: 2px;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
/* Remove input's own focus outline when wrapper handles it */
|
|
165
|
+
.mw-input-field__input-wrapper:has(.mw-input-field__leading-symbol) .mw-input:focus-visible {
|
|
166
|
+
outline: none;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
/* Error/Danger — wrapper border when symbol is present */
|
|
170
|
+
.mw-input-field--invalid .mw-input-field__input-wrapper:has(.mw-input-field__leading-symbol),
|
|
171
|
+
.mw-input-field__input-wrapper:has(.mw-input-field__leading-symbol):has(.mw-input--danger) {
|
|
172
|
+
border-color: var(--mw-color-danger-base);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.mw-input-field--invalid
|
|
176
|
+
.mw-input-field__input-wrapper:has(.mw-input-field__leading-symbol):has(:focus-visible),
|
|
177
|
+
.mw-input-field__input-wrapper:has(.mw-input-field__leading-symbol):has(.mw-input--danger):has(
|
|
178
|
+
:focus-visible
|
|
179
|
+
) {
|
|
180
|
+
outline-color: var(--mw-color-danger-base);
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
/* Success — wrapper border when symbol is present */
|
|
184
|
+
.mw-input-field__input-wrapper:has(.mw-input-field__leading-symbol):has(.mw-input--success) {
|
|
185
|
+
border-color: var(--mw-color-success-base);
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.mw-input-field__input-wrapper:has(.mw-input-field__leading-symbol):has(.mw-input--success):has(
|
|
189
|
+
:focus-visible
|
|
190
|
+
) {
|
|
191
|
+
outline-color: var(--mw-color-success-base);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
/* Disabled — wrapper when symbol is present */
|
|
195
|
+
.mw-input-field__input-wrapper:has(.mw-input-field__leading-symbol):has(:disabled) {
|
|
196
|
+
opacity: 0.2;
|
|
197
|
+
cursor: not-allowed;
|
|
198
|
+
pointer-events: none;
|
|
199
|
+
border-color: var(--mw-color-border-disabled);
|
|
200
|
+
background: var(--mw-color-surface-disabled);
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.mw-input-field--textarea .mw-input-field__input-wrapper,
|
|
204
|
+
.mw-input-field--rich-text .mw-input-field__input-wrapper {
|
|
205
|
+
align-items: stretch;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
/* Hide native search input clear button */
|
|
209
|
+
.mw-input[type="search"]::-webkit-search-cancel-button {
|
|
210
|
+
display: none;
|
|
211
|
+
-webkit-appearance: none;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
/* Label opacity: 1 when input is focused */
|
|
215
|
+
.mw-input-field:focus-within .mw-input-field__label {
|
|
216
|
+
opacity: 1;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
/* Label opacity: 1 when hovering over input-field */
|
|
220
|
+
.mw-input-field:hover .mw-input-field__label {
|
|
221
|
+
opacity: 1;
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
/* Label opacity: 1 when input has value */
|
|
225
|
+
.mw-input-field[data-has-value="true"] .mw-input-field__label {
|
|
226
|
+
opacity: 1;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.mw-input-field__helper {
|
|
230
|
+
opacity: 0.6;
|
|
231
|
+
font-size: 0.875em;
|
|
232
|
+
color: var(--mw-color-text-muted, #6b7280);
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
.mw-input-field__error {
|
|
236
|
+
font-size: 0.875em;
|
|
237
|
+
color: var(--mw-color-danger-base, #dc2626);
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
/* State modifiers */
|
|
241
|
+
.mw-input-field--disabled .mw-input-field__label {
|
|
242
|
+
cursor: not-allowed;
|
|
243
|
+
opacity: 0.6;
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
/* Disabled state overwrite hover/focus states */
|
|
247
|
+
.mw-input-field--disabled:hover .mw-input-field__label,
|
|
248
|
+
.mw-input-field--disabled:focus-within .mw-input-field__label {
|
|
249
|
+
opacity: 0.6;
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
.mw-input-field--readonly .mw-input-field__label {
|
|
253
|
+
cursor: default;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
.mw-input-field--invalid .mw-input-field__label .mw-p,
|
|
257
|
+
.mw-input-field--invalid .mw-input-field__error .mw-p {
|
|
258
|
+
/* Label styling when field has error - could add red accent if needed */
|
|
259
|
+
color: var(--mw-color-danger-base, #dc2626);
|
|
260
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* RadioGroupField (Molecule)
|
|
3
|
+
*
|
|
4
|
+
* Layout for group label + radio options + description/error text.
|
|
5
|
+
* Each option renders a Radio atom beside its label text.
|
|
6
|
+
*
|
|
7
|
+
* Figma reference: Radio Group node 1368:6450
|
|
8
|
+
* Option row: 91 Fill × 32 Hug (fills width, 32px row height)
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
.mw-radio-group-field {
|
|
12
|
+
display: grid;
|
|
13
|
+
gap: var(--mw-density-gap);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.mw-radio-group-field__label {
|
|
17
|
+
cursor: default;
|
|
18
|
+
user-select: none;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.mw-radio-group-field__options {
|
|
22
|
+
display: grid;
|
|
23
|
+
gap: 0;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.mw-radio-group-field__option {
|
|
27
|
+
display: inline-flex;
|
|
28
|
+
align-items: center;
|
|
29
|
+
gap: var(--mw-density-gap);
|
|
30
|
+
height: 32px;
|
|
31
|
+
cursor: pointer;
|
|
32
|
+
user-select: none;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/* Tighten line-height so the <p> aligns with the 16px radio circle */
|
|
36
|
+
.mw-radio-group-field__option .mw-p {
|
|
37
|
+
line-height: 1;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.mw-radio-group-field__description {
|
|
41
|
+
opacity: 0.75;
|
|
42
|
+
font-size: var(--mw-density-font-size-sm);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.mw-radio-group-field__error {
|
|
46
|
+
font-size: var(--mw-density-font-size-sm);
|
|
47
|
+
color: var(--mw-color-danger-base, #dc2626);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
/* State modifiers */
|
|
51
|
+
.mw-radio-group-field--disabled .mw-radio-group-field__option {
|
|
52
|
+
cursor: not-allowed;
|
|
53
|
+
opacity: 0.7;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.mw-radio-group-field--invalid .mw-radio-group-field__label .mw-p,
|
|
57
|
+
.mw-radio-group-field--invalid .mw-radio-group-field__error .mw-p {
|
|
58
|
+
color: var(--mw-color-danger-base, #dc2626);
|
|
59
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
.mw-slider-field {
|
|
2
|
+
display: grid;
|
|
3
|
+
gap: 8px;
|
|
4
|
+
width: min(100%, 560px);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.mw-slider-field__header,
|
|
8
|
+
.mw-slider-field__values-row,
|
|
9
|
+
.mw-slider-field__control-row {
|
|
10
|
+
display: grid;
|
|
11
|
+
align-items: center;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.mw-slider-field__header {
|
|
15
|
+
gap: 0.25rem;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.mw-slider-field__values-row {
|
|
19
|
+
grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
|
|
20
|
+
gap: 0.5rem;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.mw-slider-field__control-row {
|
|
24
|
+
gap: 0.5rem;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.mw-slider-field--label-top .mw-slider-field__control-row {
|
|
28
|
+
grid-template-columns: minmax(0, 1fr);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.mw-slider-field--label-inline .mw-slider-field__control-row {
|
|
32
|
+
grid-template-columns: auto minmax(0, 1fr) auto;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.mw-slider-field__label {
|
|
36
|
+
cursor: default;
|
|
37
|
+
user-select: none;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.mw-slider-field__description {
|
|
41
|
+
opacity: 0.75;
|
|
42
|
+
font-size: var(--mw-density-font-size-sm);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.mw-slider-field__slider {
|
|
46
|
+
min-width: 0;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.mw-slider-field__slider > .mw-slider {
|
|
50
|
+
width: 100%;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.mw-slider-field__edge-value {
|
|
54
|
+
min-width: 2rem;
|
|
55
|
+
color: var(--mw-color-text-muted, #595959);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.mw-slider-field__edge-value--min {
|
|
59
|
+
text-align: left;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.mw-slider-field__edge-value--max {
|
|
63
|
+
text-align: right;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.mw-slider-field__error {
|
|
67
|
+
font-size: var(--mw-density-font-size-sm);
|
|
68
|
+
color: var(--mw-color-danger-base, #dc2626);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.mw-slider-field--disabled {
|
|
72
|
+
opacity: 0.7;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.mw-slider-field--disabled .mw-slider-field__label,
|
|
76
|
+
.mw-slider-field--disabled .mw-slider-field__edge-value {
|
|
77
|
+
cursor: not-allowed;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.mw-slider-field--invalid .mw-slider-field__label .mw-p,
|
|
81
|
+
.mw-slider-field--invalid .mw-slider-field__error .mw-p {
|
|
82
|
+
color: var(--mw-color-danger-base, #dc2626);
|
|
83
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
.mw-switch-field {
|
|
2
|
+
display: grid;
|
|
3
|
+
gap: var(--mw-density-gap);
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.mw-switch-field__row {
|
|
7
|
+
display: inline-flex;
|
|
8
|
+
align-items: center;
|
|
9
|
+
gap: var(--mw-density-gap);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.mw-switch-field__label {
|
|
13
|
+
cursor: default;
|
|
14
|
+
user-select: none;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.mw-switch-field__description {
|
|
18
|
+
opacity: 0.75;
|
|
19
|
+
margin-left: calc(var(--mw-spacing-sp-24) + var(--mw-density-gap));
|
|
20
|
+
font-size: var(--mw-density-font-size-sm);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.mw-switch-field__error {
|
|
24
|
+
margin-left: calc(var(--mw-spacing-sp-24) + var(--mw-density-gap));
|
|
25
|
+
font-size: var(--mw-density-font-size-sm);
|
|
26
|
+
color: var(--mw-color-danger-base, #dc2626);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.mw-switch-field--disabled .mw-switch-field__label {
|
|
30
|
+
cursor: not-allowed;
|
|
31
|
+
opacity: 0.7;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.mw-switch-field--invalid .mw-switch-field__label .mw-p,
|
|
35
|
+
.mw-switch-field--invalid .mw-switch-field__error .mw-p {
|
|
36
|
+
color: var(--mw-color-danger-base, #dc2626);
|
|
37
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
.mw-tab-group {
|
|
2
|
+
display: grid;
|
|
3
|
+
gap: var(--mw-density-gap);
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.mw-tab-group__header {
|
|
7
|
+
display: flex;
|
|
8
|
+
align-items: center;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.mw-tab-group__list {
|
|
12
|
+
display: inline-flex;
|
|
13
|
+
align-items: stretch;
|
|
14
|
+
gap: 0;
|
|
15
|
+
width: fit-content;
|
|
16
|
+
border-bottom: 1px solid color-mix(in srgb, var(--mw-color-text, #141414) 20%, transparent);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.mw-tab-group__panels {
|
|
20
|
+
display: grid;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.mw-tab-group__panel {
|
|
24
|
+
padding-top: calc(var(--mw-density-gap) * 0.75);
|
|
25
|
+
outline: none;
|
|
26
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
.mw-toast-container {
|
|
2
|
+
position: fixed;
|
|
3
|
+
z-index: 1000;
|
|
4
|
+
display: grid;
|
|
5
|
+
gap: 12px; /* off-scale — no token */
|
|
6
|
+
width: min(420px, calc(100vw - var(--mw-spacing-sp-32)));
|
|
7
|
+
pointer-events: none;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.mw-toast-container--top-right {
|
|
11
|
+
top: var(--mw-spacing-sp-16);
|
|
12
|
+
right: var(--mw-spacing-sp-16);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.mw-toast-container--top-left {
|
|
16
|
+
top: var(--mw-spacing-sp-16);
|
|
17
|
+
left: var(--mw-spacing-sp-16);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.mw-toast-container--bottom-right {
|
|
21
|
+
right: var(--mw-spacing-sp-16);
|
|
22
|
+
bottom: var(--mw-spacing-sp-16);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.mw-toast-container--bottom-left {
|
|
26
|
+
bottom: var(--mw-spacing-sp-16);
|
|
27
|
+
left: var(--mw-spacing-sp-16);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.mw-toast-container__item {
|
|
31
|
+
pointer-events: auto;
|
|
32
|
+
animation: mw-toast-enter 180ms ease-out;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
@keyframes mw-toast-enter {
|
|
36
|
+
from {
|
|
37
|
+
opacity: 0;
|
|
38
|
+
transform: translateY(-6px);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
to {
|
|
42
|
+
opacity: 1;
|
|
43
|
+
transform: translateY(0);
|
|
44
|
+
}
|
|
45
|
+
}
|