@simplybusiness/mobius 9.3.4 → 10.0.0
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/CHANGELOG.md +24 -0
- package/package.json +2 -2
- package/src/components/Accordion/Accordion.css +79 -71
- package/src/components/Accordion/AccordionList.css +25 -23
- package/src/components/Alert/Alert.css +46 -44
- package/src/components/Box/Box.css +4 -2
- package/src/components/Breadcrumbs/Breadcrumbs.css +25 -23
- package/src/components/Button/Button.css +227 -219
- package/src/components/Button/Button.story.styles.css +9 -7
- package/src/components/Checkbox/Checkbox.css +106 -104
- package/src/components/Checkbox/CheckboxGroup.css +22 -20
- package/src/components/Combobox/Combobox.css +96 -94
- package/src/components/Container/Container.css +11 -9
- package/src/components/Divider/Divider.css +14 -12
- package/src/components/Drawer/Drawer.css +157 -155
- package/src/components/DropdownMenu/DropdownMenu.css +54 -52
- package/src/components/DropdownMenu/DropdownMenu.story.styles.css +11 -9
- package/src/components/ErrorMessage/ErrorMessage.css +30 -28
- package/src/components/ExpandableText/ExpandableText.css +11 -9
- package/src/components/Fieldset/Fieldset.css +13 -11
- package/src/components/Flex/Flex.css +5 -3
- package/src/components/Grid/Grid.story.styles.css +18 -16
- package/src/components/Icon/Icon.css +37 -35
- package/src/components/Label/Label.css +13 -11
- package/src/components/Link/Link.css +29 -27
- package/src/components/List/List.css +47 -45
- package/src/components/LoadingIndicator/LoadingIndicator.css +4 -2
- package/src/components/Modal/Modal.css +122 -120
- package/src/components/NumberField/NumberField.css +58 -56
- package/src/components/PasswordField/PasswordField.css +27 -25
- package/src/components/Popover/Popover.css +32 -30
- package/src/components/Popover/Popover.story.styles.css +24 -22
- package/src/components/Progress/Progress.css +25 -23
- package/src/components/Radio/Radio.css +167 -163
- package/src/components/Segment/Segment.css +163 -161
- package/src/components/Select/Select.css +82 -80
- package/src/components/Slider/Slider.css +113 -111
- package/src/components/Stack/Stack.css +24 -22
- package/src/components/Switch/Switch.css +58 -56
- package/src/components/Table/Table.css +52 -50
- package/src/components/Text/Text.css +92 -90
- package/src/components/TextArea/TextArea.css +41 -39
- package/src/components/TextField/TextField.css +132 -130
- package/src/components/Title/Title.css +32 -30
- package/src/components/Toast/Toast.css +234 -232
|
@@ -1,242 +1,250 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
border-style: solid;
|
|
14
|
-
position: relative;
|
|
15
|
-
margin: 0;
|
|
16
|
-
transition:
|
|
17
|
-
color var(--transition-standard),
|
|
18
|
-
background var(--transition-standard);
|
|
19
|
-
|
|
20
|
-
&:where(.--has-icon) {
|
|
21
|
-
display: inline-flex;
|
|
22
|
-
gap: var(--button-gap);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
/* Sizes */
|
|
26
|
-
/* TODO: CSS variables for line-height do not produce desired height for buttons. */
|
|
27
|
-
/* These hard-coded line-height values should be replaced with CSS variables. */
|
|
28
|
-
&:where(.--size-sm) {
|
|
29
|
-
font-size: var(--font-size-3);
|
|
30
|
-
line-height: 16px;
|
|
31
|
-
padding: var(--button-padding-sm);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
&:where(.--size-md) {
|
|
35
|
-
font-size: var(--font-size-4);
|
|
36
|
-
line-height: 24px;
|
|
37
|
-
padding: var(--button-padding-md);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
&:where(.--size-lg) {
|
|
41
|
-
font-size: var(--font-size-5);
|
|
42
|
-
line-height: 32px;
|
|
43
|
-
padding: var(--button-padding-lg);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
/* Primary */
|
|
47
|
-
&:where(.--variant-primary) {
|
|
48
|
-
--button-content-color: var(--button-primary-content-color);
|
|
49
|
-
background: var(--button-primary-color);
|
|
50
|
-
font-variation-settings: var(--button-primary-font-variation);
|
|
51
|
-
|
|
52
|
-
&:where(:active),
|
|
53
|
-
&:where(:hover) {
|
|
54
|
-
background: var(--button-primary-hover-color);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
&:where(:focus-visible) {
|
|
58
|
-
box-shadow: var(--box-shadow-default);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
&:where(.--is-disabled) {
|
|
62
|
-
--button-content-color: var(--color-text-light);
|
|
63
|
-
background: var(--color-background-medium);
|
|
64
|
-
cursor: not-allowed;
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
/* Secondary */
|
|
69
|
-
&:where(.--variant-secondary) {
|
|
70
|
-
--button-content-color: var(--button-secondary-color);
|
|
71
|
-
background: transparent;
|
|
72
|
-
border-color: var(--button-secondary-color);
|
|
73
|
-
|
|
74
|
-
&:where(:active),
|
|
75
|
-
&:where(:hover) {
|
|
76
|
-
--button-content-color: var(--color-text-inverted);
|
|
77
|
-
background: var(--button-secondary-hover-color);
|
|
78
|
-
border-color: var(--button-secondary-hover-color);
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
&:where(:focus-visible) {
|
|
82
|
-
box-shadow: var(--box-shadow-default);
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
&:where(.--is-disabled) {
|
|
86
|
-
--button-content-color: var(--color-text-light);
|
|
87
|
-
border-color: transparent;
|
|
88
|
-
background: var(--color-background-medium);
|
|
89
|
-
cursor: not-allowed;
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
/* Ghost */
|
|
94
|
-
&:where(.--variant-ghost) {
|
|
95
|
-
--button-content-color: var(--color-secondary);
|
|
96
|
-
background: var(--color-background-highlight);
|
|
97
|
-
border: var(--border-default);
|
|
1
|
+
@layer atoms {
|
|
2
|
+
.mobius-button {
|
|
3
|
+
box-sizing: border-box;
|
|
4
|
+
display: inline-block;
|
|
5
|
+
outline: none;
|
|
6
|
+
text-decoration: none;
|
|
7
|
+
font-family: var(--font-family);
|
|
8
|
+
cursor: pointer;
|
|
9
|
+
color: var(--button-content-color);
|
|
10
|
+
font-weight: var(--font-weight-bold);
|
|
11
|
+
border-radius: var(--button-border-radius);
|
|
12
|
+
border-width: var(--size-border-width);
|
|
98
13
|
border-color: transparent;
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
14
|
+
border-style: solid;
|
|
15
|
+
position: relative;
|
|
16
|
+
margin: 0;
|
|
17
|
+
transition:
|
|
18
|
+
color var(--transition-standard),
|
|
19
|
+
background var(--transition-standard);
|
|
20
|
+
|
|
21
|
+
&:where(.--has-icon) {
|
|
22
|
+
display: inline-flex;
|
|
23
|
+
gap: var(--button-gap);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/* Sizes */
|
|
27
|
+
/* TODO: CSS variables for line-height do not produce desired height for buttons. */
|
|
28
|
+
/* These hard-coded line-height values should be replaced with CSS variables. */
|
|
29
|
+
&:where(.--size-sm) {
|
|
30
|
+
font-size: var(--font-size-3);
|
|
31
|
+
line-height: 16px;
|
|
32
|
+
padding: var(--button-padding-sm);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
&:where(.--size-md) {
|
|
36
|
+
font-size: var(--font-size-4);
|
|
37
|
+
line-height: 24px;
|
|
38
|
+
padding: var(--button-padding-md);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&:where(.--size-lg) {
|
|
42
|
+
font-size: var(--font-size-5);
|
|
43
|
+
line-height: 32px;
|
|
44
|
+
padding: var(--button-padding-lg);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/* Primary */
|
|
48
|
+
&:where(.--variant-primary) {
|
|
49
|
+
--button-content-color: var(--button-primary-content-color);
|
|
50
|
+
background: var(--button-primary-color);
|
|
51
|
+
font-variation-settings: var(--button-primary-font-variation);
|
|
52
|
+
|
|
53
|
+
&:where(:active),
|
|
54
|
+
&:where(:hover) {
|
|
55
|
+
background: var(--button-primary-hover-color);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
&:where(:focus-visible) {
|
|
59
|
+
box-shadow: var(--box-shadow-default);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
&:where(.--is-disabled) {
|
|
63
|
+
--button-content-color: var(--color-text-light);
|
|
64
|
+
background: var(--color-background-medium);
|
|
65
|
+
cursor: not-allowed;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/* Secondary */
|
|
70
|
+
&:where(.--variant-secondary) {
|
|
71
|
+
--button-content-color: var(--button-secondary-color);
|
|
72
|
+
background: transparent;
|
|
73
|
+
border-color: var(--button-secondary-color);
|
|
74
|
+
|
|
75
|
+
&:where(:active),
|
|
76
|
+
&:where(:hover) {
|
|
77
|
+
--button-content-color: var(--color-text-inverted);
|
|
78
|
+
background: var(--button-secondary-hover-color);
|
|
79
|
+
border-color: var(--button-secondary-hover-color);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
&:where(:focus-visible) {
|
|
83
|
+
box-shadow: var(--box-shadow-default);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
&:where(.--is-disabled) {
|
|
87
|
+
--button-content-color: var(--color-text-light);
|
|
88
|
+
border-color: transparent;
|
|
89
|
+
background: var(--color-background-medium);
|
|
90
|
+
cursor: not-allowed;
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/* Ghost */
|
|
95
|
+
&:where(.--variant-ghost) {
|
|
96
|
+
--button-content-color: var(--color-secondary);
|
|
97
|
+
background: var(--color-background-highlight);
|
|
98
|
+
border: var(--border-default);
|
|
106
99
|
border-color: transparent;
|
|
107
|
-
background: var(--color-secondary-hover);
|
|
108
|
-
}
|
|
109
100
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
101
|
+
&:where(:active) {
|
|
102
|
+
background: var(--color-secondary-hover);
|
|
103
|
+
}
|
|
113
104
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
/* Basic */
|
|
123
|
-
&:where(.--variant-basic) {
|
|
124
|
-
--button-content-color: var(--color-text);
|
|
125
|
-
border-color: transparent;
|
|
126
|
-
background: transparent;
|
|
127
|
-
|
|
128
|
-
&:where(:active) {
|
|
129
|
-
background: var(--color-background-light);
|
|
130
|
-
}
|
|
105
|
+
&:where(:hover) {
|
|
106
|
+
--button-content-color: var(--color-text-inverted);
|
|
107
|
+
border-color: transparent;
|
|
108
|
+
background: var(--color-secondary-hover);
|
|
109
|
+
}
|
|
131
110
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
111
|
+
&:where(:focus-visible) {
|
|
112
|
+
box-shadow: var(--box-shadow-default);
|
|
113
|
+
}
|
|
135
114
|
|
|
136
|
-
|
|
137
|
-
|
|
115
|
+
&:where(.--is-disabled) {
|
|
116
|
+
--button-content-color: var(--color-text-light);
|
|
117
|
+
border-color: transparent;
|
|
118
|
+
background: var(--color-background-medium);
|
|
119
|
+
cursor: not-allowed;
|
|
120
|
+
}
|
|
138
121
|
}
|
|
139
122
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
}
|
|
123
|
+
/* Basic */
|
|
124
|
+
&:where(.--variant-basic) {
|
|
125
|
+
--button-content-color: var(--color-text);
|
|
126
|
+
border-color: transparent;
|
|
127
|
+
background: transparent;
|
|
146
128
|
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
border-color: var(--color-valid);
|
|
151
|
-
color: transparent;
|
|
129
|
+
&:where(:active) {
|
|
130
|
+
background: var(--color-background-light);
|
|
131
|
+
}
|
|
152
132
|
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
visibility: hidden;
|
|
157
|
-
}
|
|
133
|
+
&:where(:hover) {
|
|
134
|
+
background: var(--color-background-light);
|
|
135
|
+
}
|
|
158
136
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
}
|
|
137
|
+
&:where(:focus-visible) {
|
|
138
|
+
box-shadow: var(--box-shadow-default);
|
|
139
|
+
}
|
|
163
140
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
141
|
+
&:where(.--is-disabled) {
|
|
142
|
+
--button-content-color: var(--color-text-light);
|
|
143
|
+
background: var(--color-background-medium);
|
|
144
|
+
cursor: not-allowed;
|
|
145
|
+
}
|
|
167
146
|
}
|
|
168
147
|
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
border-color: var(--color-valid-hover);
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
&:where(:active) {
|
|
148
|
+
/* Success */
|
|
149
|
+
&:where(.--is-success) {
|
|
175
150
|
background: var(--color-valid);
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
&:where(.--is-disabled) {
|
|
179
|
-
border-color: transparent;
|
|
151
|
+
border-color: var(--color-valid);
|
|
180
152
|
color: transparent;
|
|
181
|
-
background: var(--color-background-medium);
|
|
182
|
-
cursor: not-allowed;
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
/* Loading */
|
|
187
|
-
&:where(.--is-loading) {
|
|
188
|
-
/* Hide text */
|
|
189
|
-
color: transparent;
|
|
190
153
|
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
154
|
+
/* Hide content, but keep same space occupied */
|
|
155
|
+
& > :not(.mobius-button__icon-wrapper) {
|
|
156
|
+
opacity: 0;
|
|
157
|
+
visibility: hidden;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/* Show succces/tick icon */
|
|
161
|
+
& [data-icon="tick"] path {
|
|
162
|
+
fill: var(--color-text-inverted);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/* Link variant is the exception */
|
|
166
|
+
&:where(.--variant-link) [data-icon="tick"] path {
|
|
167
|
+
fill: var(--button-content-color);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
&:where(:hover) {
|
|
171
|
+
background: var(--color-valid-hover);
|
|
172
|
+
border-color: var(--color-valid-hover);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
&:where(:active) {
|
|
176
|
+
background: var(--color-valid);
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
&:where(.--is-disabled) {
|
|
180
|
+
border-color: transparent;
|
|
181
|
+
color: transparent;
|
|
182
|
+
background: var(--color-background-medium);
|
|
183
|
+
cursor: not-allowed;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
/* Loading */
|
|
188
|
+
&:where(.--is-loading) {
|
|
189
|
+
/* Hide text */
|
|
190
|
+
color: transparent;
|
|
196
191
|
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
192
|
+
/* Hide content, but keep same space occupied */
|
|
193
|
+
& > :not(.mobius-button__icon-wrapper) {
|
|
194
|
+
opacity: 0;
|
|
195
|
+
visibility: hidden;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
/* Show loading icon */
|
|
199
|
+
& [data-icon="loading"] path {
|
|
200
|
+
fill: var(--button-content-color);
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
/* Link */
|
|
205
|
+
&:where(.--variant-link) {
|
|
206
|
+
--button-content-color: var(--button-link-color, var(--color-secondary));
|
|
207
|
+
appearance: none;
|
|
208
|
+
padding: var(--size-xxs);
|
|
209
|
+
background: transparent;
|
|
210
|
+
font-weight: normal;
|
|
211
|
+
border-radius: var(
|
|
212
|
+
--button-link-border-radius,
|
|
213
|
+
var(--button-border-radius)
|
|
214
|
+
);
|
|
215
|
+
|
|
216
|
+
&:where(:not(.--is-loading)) {
|
|
217
|
+
text-decoration: underline;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
&:hover,
|
|
221
|
+
&:active {
|
|
222
|
+
--button-content-color: var(
|
|
223
|
+
--button-link-hover-color,
|
|
224
|
+
var(--color-secondary-hover)
|
|
225
|
+
);
|
|
226
|
+
text-decoration: var(--button-link-hover-text-decoration, underline);
|
|
227
|
+
cursor: pointer;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
&:focus-visible {
|
|
231
|
+
box-shadow: var(--button-link-box-shadow, var(--box-shadow-default));
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
&.--is-disabled {
|
|
235
|
+
--button-content-color: var(--color-text-light);
|
|
236
|
+
cursor: not-allowed;
|
|
237
|
+
}
|
|
200
238
|
}
|
|
201
239
|
}
|
|
202
240
|
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
&:where(:not(.--is-loading)) {
|
|
213
|
-
text-decoration: underline;
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
&:hover,
|
|
217
|
-
&:active {
|
|
218
|
-
--button-content-color: var(--button-link-hover-color, var(--color-secondary-hover));
|
|
219
|
-
text-decoration: var(--button-link-hover-text-decoration, underline);
|
|
220
|
-
cursor: pointer;
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
&:focus-visible {
|
|
224
|
-
box-shadow: var(--button-link-box-shadow, var(--box-shadow-default));
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
&.--is-disabled {
|
|
228
|
-
--button-content-color: var(--color-text-light);
|
|
229
|
-
cursor: not-allowed;
|
|
230
|
-
}
|
|
241
|
+
.mobius-button__icon-wrapper {
|
|
242
|
+
position: absolute;
|
|
243
|
+
top: 0;
|
|
244
|
+
left: 0;
|
|
245
|
+
right: 0;
|
|
246
|
+
bottom: 0;
|
|
247
|
+
display: grid;
|
|
248
|
+
place-items: center;
|
|
231
249
|
}
|
|
232
250
|
}
|
|
233
|
-
|
|
234
|
-
.mobius-button__icon-wrapper {
|
|
235
|
-
position: absolute;
|
|
236
|
-
top: 0;
|
|
237
|
-
left: 0;
|
|
238
|
-
right: 0;
|
|
239
|
-
bottom: 0;
|
|
240
|
-
display: grid;
|
|
241
|
-
place-items: center;
|
|
242
|
-
}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
@layer atoms {
|
|
2
|
+
.button-example-with-theme.mobius-button {
|
|
3
|
+
background-color: darkred;
|
|
4
|
+
}
|
|
4
5
|
|
|
5
|
-
.button-example-with-icon.mobius-button {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
.button-example-with-icon.mobius-button {
|
|
7
|
+
display: inline-flex;
|
|
8
|
+
gap: var(--size-xs);
|
|
9
|
+
align-items: center;
|
|
10
|
+
}
|
|
9
11
|
}
|