@loadsmart/loadsmart-ui 6.0.15 → 6.1.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/dist/DragDropFile.context-c7cd1441.js.map +1 -1
- package/dist/components/Text/Text.d.ts +1 -1
- package/dist/index.js +198 -160
- package/dist/index.js.map +1 -1
- package/dist/miranda-compatibility.theme-22a9ce26.js +2 -0
- package/dist/miranda-compatibility.theme-22a9ce26.js.map +1 -0
- package/dist/{prop-82e9ff9d.js → prop-201ffe28.js} +2 -2
- package/dist/{prop-82e9ff9d.js.map → prop-201ffe28.js.map} +1 -1
- package/dist/testing/index.js +1 -1
- package/dist/theming/index.js +1 -1
- package/dist/theming/themes/alice.theme.d.ts +70 -15
- package/dist/theming/themes/loadsmart.theme.d.ts +70 -15
- package/dist/theming/themes/miranda-compatibility.theme.d.ts +141 -85
- package/dist/tools/index.js +1 -1
- package/package.json +17 -15
- package/src/common/CloseButton/CloseButton.tsx +4 -1
- package/src/common/SelectionWrapper.tsx +8 -0
- package/src/components/Button/Button.tsx +44 -21
- package/src/components/Calendar/Calendar.test.tsx +1 -1
- package/src/components/Card/Card.test.tsx +1 -1
- package/src/components/Checkbox/Checkbox.tsx +1 -1
- package/src/components/DatePicker/DatePicker.test.tsx +1 -1
- package/src/components/DatePicker/DateRangePicker.test.tsx +1 -1
- package/src/components/Dropdown/Dropdown.test.tsx +1 -1
- package/src/components/Dropdown/DropdownTrigger.tsx +9 -11
- package/src/components/EmptyState/EmptyState.test.tsx +1 -1
- package/src/components/HighlightMatch/HighlightMatch.test.tsx +1 -1
- package/src/components/IconFactory/IconFactory.test.tsx +1 -1
- package/src/components/Link/Link.tsx +9 -0
- package/src/components/Loaders/LoadingBar.test.tsx +1 -1
- package/src/components/Loaders/LoadingDots.test.tsx +1 -1
- package/src/components/Loaders/Spinner.test.tsx +1 -1
- package/src/components/Popover/Popover.test.tsx +1 -1
- package/src/components/Radio/Radio.tsx +1 -1
- package/src/components/Select/Select.test.tsx +1 -1
- package/src/components/Select/SelectTrigger.tsx +1 -1
- package/src/components/SideNavigation/Menu/MenuLink.tsx +4 -2
- package/src/components/Steps/Steps.test.tsx +1 -1
- package/src/components/Switch/Switch.test.tsx +1 -1
- package/src/components/Switch/Switch.tsx +3 -1
- package/src/components/Tag/Tag.tsx +24 -4
- package/src/components/TextField/TextField.tsx +5 -2
- package/src/components/Textarea/Textarea.tsx +5 -2
- package/src/components/ToggleGroup/Toggle.tsx +3 -1
- package/src/components/ToggleGroup/ToggleGroup.test.tsx +1 -1
- package/src/hooks/useFocusTrap/useFocusTrap.test.tsx +1 -1
- package/src/theming/themes/alice.theme.ts +83 -15
- package/src/theming/themes/loadsmart.theme.ts +85 -16
- package/src/theming/themes/miranda-compatibility.theme.ts +181 -113
- package/dist/miranda-compatibility.theme-f99913ed.js +0 -2
- package/dist/miranda-compatibility.theme-f99913ed.js.map +0 -1
|
@@ -142,11 +142,12 @@ const StyledButton = styled(BaseStyledButton)<{
|
|
|
142
142
|
|
|
143
143
|
color: ${conditional({
|
|
144
144
|
'button-primary-color': whenProps({ $variant: 'primary' }),
|
|
145
|
-
'button-secondary-color': whenProps({ $variant:
|
|
145
|
+
'button-secondary-color': whenProps({ $variant: 'secondary', $scheme: 'light' }),
|
|
146
146
|
'button-secondary-dark-color': whenProps({
|
|
147
|
-
$variant:
|
|
147
|
+
$variant: 'secondary',
|
|
148
148
|
$scheme: 'dark',
|
|
149
149
|
}),
|
|
150
|
+
'button-tertiary-color': whenProps({ $variant: 'tertiary' }),
|
|
150
151
|
'button-warning-color': whenProps({ $variant: 'warning' }),
|
|
151
152
|
'button-icon-color': whenProps({ $variant: 'icon' }),
|
|
152
153
|
})};
|
|
@@ -154,13 +155,16 @@ const StyledButton = styled(BaseStyledButton)<{
|
|
|
154
155
|
background: ${conditional({
|
|
155
156
|
'button-primary-background': whenProps({ $variant: 'primary' }),
|
|
156
157
|
'button-secondary-background': whenProps({
|
|
157
|
-
$variant:
|
|
158
|
+
$variant: 'secondary',
|
|
158
159
|
$scheme: 'light',
|
|
159
160
|
}),
|
|
160
161
|
'button-secondary-dark-background': whenProps({
|
|
161
|
-
$variant:
|
|
162
|
+
$variant: 'secondary',
|
|
162
163
|
$scheme: 'dark',
|
|
163
164
|
}),
|
|
165
|
+
'button-tertiary': whenProps({
|
|
166
|
+
$variant: 'tertiary',
|
|
167
|
+
}),
|
|
164
168
|
'button-warning-background': whenProps({ $variant: 'warning' }),
|
|
165
169
|
'button-icon-background': whenProps({ $variant: 'icon' }),
|
|
166
170
|
})};
|
|
@@ -169,9 +173,9 @@ const StyledButton = styled(BaseStyledButton)<{
|
|
|
169
173
|
'button-primary-border-color': whenProps({ $variant: 'primary' }),
|
|
170
174
|
'button-secondary-border-color': whenProps({ $variant: 'secondary', $scheme: 'light' }),
|
|
171
175
|
'button-secondary-dark-border-color': whenProps({ $variant: 'secondary', $scheme: 'dark' }),
|
|
176
|
+
'button-tertiary-border-color': whenProps({ $variant: 'tertiary' }),
|
|
172
177
|
'button-warning-border-color': whenProps({ $variant: 'warning' }),
|
|
173
178
|
'button-icon-border-color': whenProps({ $variant: 'icon' }),
|
|
174
|
-
'color-transparent': whenProps({ $variant: 'tertiary' }),
|
|
175
179
|
})};
|
|
176
180
|
border-radius: ${conditional({
|
|
177
181
|
'button-border-radius': whenProps({ $variant: ['primary', 'secondary', 'warning'] }),
|
|
@@ -182,13 +186,16 @@ const StyledButton = styled(BaseStyledButton)<{
|
|
|
182
186
|
background: ${conditional({
|
|
183
187
|
'button-primary-background--hover': whenProps({ $variant: 'primary' }),
|
|
184
188
|
'button-secondary-background--hover': whenProps({
|
|
185
|
-
$variant:
|
|
189
|
+
$variant: 'secondary',
|
|
186
190
|
$scheme: 'light',
|
|
187
191
|
}),
|
|
188
192
|
'button-secondary-dark-background--hover': whenProps({
|
|
189
|
-
$variant:
|
|
193
|
+
$variant: 'secondary',
|
|
190
194
|
$scheme: 'dark',
|
|
191
195
|
}),
|
|
196
|
+
'button-tertiary-background--hover': whenProps({
|
|
197
|
+
$variant: 'tertiary',
|
|
198
|
+
}),
|
|
192
199
|
'button-warning-background--hover': whenProps({ $variant: 'warning' }),
|
|
193
200
|
'button-icon-background--hover': whenProps({ $variant: 'icon' }),
|
|
194
201
|
})};
|
|
@@ -202,20 +209,21 @@ const StyledButton = styled(BaseStyledButton)<{
|
|
|
202
209
|
$variant: 'secondary',
|
|
203
210
|
$scheme: 'dark',
|
|
204
211
|
}),
|
|
212
|
+
'button-tertiary-border-color--hover': whenProps({ $variant: 'tertiary' }),
|
|
205
213
|
'button-warning-border-color--hover': whenProps({ $variant: 'warning' }),
|
|
206
214
|
'button-icon-border-color--hover': whenProps({ $variant: 'icon' }),
|
|
207
|
-
'color-transparent': whenProps({ $variant: 'tertiary' }),
|
|
208
215
|
})};
|
|
209
216
|
color: ${conditional({
|
|
210
217
|
'button-primary-color--hover': whenProps({ $variant: 'primary' }),
|
|
211
218
|
'button-secondary-color--hover': whenProps({
|
|
212
|
-
$variant:
|
|
219
|
+
$variant: 'secondary',
|
|
213
220
|
$scheme: 'light',
|
|
214
221
|
}),
|
|
215
222
|
'button-secondary-dark-color--hover': whenProps({
|
|
216
|
-
$variant:
|
|
223
|
+
$variant: 'secondary',
|
|
217
224
|
$scheme: 'dark',
|
|
218
225
|
}),
|
|
226
|
+
'button-tertiary-color--hover': whenProps({ $variant: 'tertiary' }),
|
|
219
227
|
'button-warning-color--hover': whenProps({ $variant: 'warning' }),
|
|
220
228
|
'button-icon-color--hover': whenProps({ $variant: 'icon' }),
|
|
221
229
|
})};
|
|
@@ -225,13 +233,14 @@ const StyledButton = styled(BaseStyledButton)<{
|
|
|
225
233
|
background: ${conditional({
|
|
226
234
|
'button-primary-background--disabled': whenProps({ $variant: 'primary' }),
|
|
227
235
|
'button-secondary-background--disabled': whenProps({
|
|
228
|
-
$variant:
|
|
236
|
+
$variant: 'secondary',
|
|
229
237
|
$scheme: 'light',
|
|
230
238
|
}),
|
|
231
239
|
'button-secondary-dark-background--disabled': whenProps({
|
|
232
|
-
$variant:
|
|
240
|
+
$variant: 'secondary',
|
|
233
241
|
$scheme: 'dark',
|
|
234
242
|
}),
|
|
243
|
+
'button-tertiary-background--disabled': whenProps({ $variant: 'tertiary' }),
|
|
235
244
|
'button-warning-background--disabled': whenProps({ $variant: 'warning' }),
|
|
236
245
|
'button-icon-background--disabled': whenProps({ $variant: 'icon' }),
|
|
237
246
|
})};
|
|
@@ -245,20 +254,21 @@ const StyledButton = styled(BaseStyledButton)<{
|
|
|
245
254
|
$variant: 'secondary',
|
|
246
255
|
$scheme: 'dark',
|
|
247
256
|
}),
|
|
257
|
+
'button-tertiary-border-color--disabled': whenProps({ $variant: 'tertiary' }),
|
|
248
258
|
'button-warning-border-color--disabled': whenProps({ $variant: 'warning' }),
|
|
249
259
|
'button-icon-border-color--disabled': whenProps({ $variant: 'icon' }),
|
|
250
|
-
'color-transparent': whenProps({ $variant: 'tertiary' }),
|
|
251
260
|
})};
|
|
252
261
|
color: ${conditional({
|
|
253
262
|
'button-primary-color--disabled': whenProps({ $variant: 'primary' }),
|
|
254
263
|
'button-secondary-color--disabled': whenProps({
|
|
255
|
-
$variant:
|
|
264
|
+
$variant: 'secondary',
|
|
256
265
|
$scheme: 'light',
|
|
257
266
|
}),
|
|
258
267
|
'button-secondary-dark-color--disabled': whenProps({
|
|
259
|
-
$variant:
|
|
268
|
+
$variant: 'secondary',
|
|
260
269
|
$scheme: 'dark',
|
|
261
270
|
}),
|
|
271
|
+
'button-tertiary-color--disabled': whenProps({ $variant: 'tertiary' }),
|
|
262
272
|
'button-warning-color--disabled': whenProps({ $variant: 'warning' }),
|
|
263
273
|
'button-icon-color--disabled': whenProps({ $variant: 'icon' }),
|
|
264
274
|
})};
|
|
@@ -268,13 +278,14 @@ const StyledButton = styled(BaseStyledButton)<{
|
|
|
268
278
|
background: ${conditional({
|
|
269
279
|
'button-primary-background--focus': whenProps({ $variant: 'primary' }),
|
|
270
280
|
'button-secondary-background--focus': whenProps({
|
|
271
|
-
$variant:
|
|
281
|
+
$variant: 'secondary',
|
|
272
282
|
$scheme: 'light',
|
|
273
283
|
}),
|
|
274
284
|
'button-secondary-dark-background--focus': whenProps({
|
|
275
|
-
$variant:
|
|
285
|
+
$variant: 'secondary',
|
|
276
286
|
$scheme: 'dark',
|
|
277
287
|
}),
|
|
288
|
+
'button-tertiary-background--focus': whenProps({ $variant: 'tertiary' }),
|
|
278
289
|
'button-warning-background--focus': whenProps({ $variant: 'warning' }),
|
|
279
290
|
'button-icon-background--focus': whenProps({ $variant: 'icon' }),
|
|
280
291
|
})};
|
|
@@ -285,30 +296,42 @@ const StyledButton = styled(BaseStyledButton)<{
|
|
|
285
296
|
$scheme: 'light',
|
|
286
297
|
}),
|
|
287
298
|
'button-secondary-dark-border-color--focus': whenProps({
|
|
288
|
-
$variant:
|
|
299
|
+
$variant: 'secondary',
|
|
289
300
|
$scheme: 'dark',
|
|
290
301
|
}),
|
|
302
|
+
'button-tertiary-border-color--focus': whenProps({ $variant: 'tertiary' }),
|
|
291
303
|
'button-warning-border-color--focus': whenProps({ $variant: 'warning' }),
|
|
292
304
|
'button-icon-border-color--focus': whenProps({ $variant: 'icon' }),
|
|
293
|
-
'color-transparent': whenProps({ $variant: 'tertiary' }),
|
|
294
305
|
})};
|
|
295
306
|
color: ${conditional({
|
|
296
307
|
'button-primary-color--focus': whenProps({ $variant: 'primary' }),
|
|
297
308
|
'button-secondary-color--focus': whenProps({
|
|
298
|
-
$variant:
|
|
309
|
+
$variant: 'secondary',
|
|
299
310
|
$scheme: 'light',
|
|
300
311
|
}),
|
|
301
312
|
'button-secondary-dark-color--focus': whenProps({ $variant: 'secondary', $scheme: 'dark' }),
|
|
313
|
+
'button-tertiary-color--focus': whenProps({ $variant: 'tertiary' }),
|
|
302
314
|
'button-warning-color--focus': whenProps({ $variant: 'warning' }),
|
|
303
315
|
'button-icon-color--focus': whenProps({ $variant: 'icon' }),
|
|
304
316
|
})};
|
|
305
317
|
|
|
306
318
|
box-shadow: ${conditional({
|
|
319
|
+
'button-primary-box-shadow': whenProps({ $variant: 'primary' }),
|
|
320
|
+
'button-secondary-box-shadow': whenProps({ $variant: 'secondary' }),
|
|
321
|
+
'button-warning-box-shadow': whenProps({ $variant: 'warning' }),
|
|
322
|
+
'button-tertiary-box-shadow': whenProps({ $variant: 'tertiary' }),
|
|
323
|
+
'button-icon-box-shadow': whenProps({ $variant: 'icon' }),
|
|
324
|
+
})};
|
|
325
|
+
|
|
326
|
+
outline: ${conditional({
|
|
307
327
|
'button-primary-outline': whenProps({ $variant: 'primary' }),
|
|
308
328
|
'button-secondary-outline': whenProps({ $variant: 'secondary' }),
|
|
329
|
+
'button-tertiary-outline': whenProps({ $variant: 'tertiary' }),
|
|
309
330
|
'button-warning-outline': whenProps({ $variant: 'warning' }),
|
|
310
331
|
'button-icon-outline': whenProps({ $variant: 'icon' }),
|
|
311
|
-
})}
|
|
332
|
+
})};
|
|
333
|
+
|
|
334
|
+
outline-offset: ${token('button-outline-offset')};
|
|
312
335
|
`}
|
|
313
336
|
|
|
314
337
|
${activatable`
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* eslint-disable testing-library/render-result-naming-convention */
|
|
2
2
|
import React from 'react'
|
|
3
|
-
import { composeStories } from '@storybook/
|
|
3
|
+
import { composeStories } from '@storybook/react'
|
|
4
4
|
|
|
5
5
|
import { getRenderableMonth } from './useCalendar'
|
|
6
6
|
import { TODAY } from './Date.helper'
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
|
-
import { composeStories } from '@storybook/
|
|
2
|
+
import { composeStories } from '@storybook/react'
|
|
3
3
|
|
|
4
4
|
import { ACTIONS, PROFILE_ACTIONS, SUBSCRIPTION_ACTIONS } from './Dropdown.fixtures'
|
|
5
5
|
import * as stories from './Dropdown.stories'
|
|
@@ -64,6 +64,8 @@ const TriggerButton = styled(
|
|
|
64
64
|
|
|
65
65
|
border: none;
|
|
66
66
|
|
|
67
|
+
height: ${token('dropdown-trigger-height')};
|
|
68
|
+
|
|
67
69
|
text-transform: ${conditional({
|
|
68
70
|
capitalize: whenProps({ outlined: false, variant: 'tertiary' }),
|
|
69
71
|
uppercase: whenProps({ outlined: true }),
|
|
@@ -159,21 +161,15 @@ const DropdownTriggerWrapper = styled.div<DropdownTriggerWrapperProps>`
|
|
|
159
161
|
border-width: ${token('button-border-width')};
|
|
160
162
|
border-style: solid;
|
|
161
163
|
border-color: ${conditional({
|
|
162
|
-
'
|
|
163
|
-
'
|
|
164
|
-
'color
|
|
164
|
+
'dropdown-trigger-border-color': whenProps({ scheme: 'light', $outlined: true }),
|
|
165
|
+
'dropdown-trigger-dark-border-color': whenProps({ scheme: 'dark', $outlined: true }),
|
|
166
|
+
'dropdown-trigger-outlined-border-color': whenProps({ $outlined: false }),
|
|
165
167
|
})};
|
|
166
168
|
|
|
167
169
|
font-size: ${token('font-size-4')};
|
|
168
170
|
|
|
169
171
|
color: ${token('color-neutral-darker')};
|
|
170
172
|
|
|
171
|
-
height: ${conditional({
|
|
172
|
-
'dropdown-trigger-height': whenProps({ $scale: 'default' }),
|
|
173
|
-
'dropdown-trigger-small-height': whenProps({ $scale: 'small' }),
|
|
174
|
-
'dropdown-trigger-large-height': whenProps({ $scale: 'large' }),
|
|
175
|
-
})};
|
|
176
|
-
|
|
177
173
|
box-sizing: border-box;
|
|
178
174
|
|
|
179
175
|
flex: 1;
|
|
@@ -210,7 +206,9 @@ const DropdownTriggerWrapper = styled.div<DropdownTriggerWrapperProps>`
|
|
|
210
206
|
'color-transparent': whenProps({ $outlined: false }),
|
|
211
207
|
})};
|
|
212
208
|
|
|
213
|
-
|
|
209
|
+
box-shadow: ${conditional({ 'dropdown-trigger-box-shadow': whenProps({ $outlined: true }) })};
|
|
210
|
+
outline: ${token('dropdown-trigger-outline')};
|
|
211
|
+
outline-offset: ${token('dropdown-trigger-outline-offset')};
|
|
214
212
|
`}
|
|
215
213
|
|
|
216
214
|
${activatable`
|
|
@@ -231,7 +229,7 @@ const TriggerHandle = styled(BaseButton)`
|
|
|
231
229
|
border-radius: 0 ${token('border-radius-s')} ${token('border-radius-s')} 0;
|
|
232
230
|
border: none;
|
|
233
231
|
|
|
234
|
-
height:
|
|
232
|
+
height: ${token('dropdown-trigger-height')};
|
|
235
233
|
`
|
|
236
234
|
|
|
237
235
|
const RotatableIcon = styled(DefaultIcon)<{ $rotate: boolean }>`
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-non-null-assertion */
|
|
2
2
|
import React from 'react'
|
|
3
|
-
import { composeStories } from '@storybook/
|
|
3
|
+
import { composeStories } from '@storybook/react'
|
|
4
4
|
import userEvent from '@testing-library/user-event'
|
|
5
5
|
|
|
6
6
|
import * as stories from './EmptyState.stories'
|
|
@@ -8,6 +8,7 @@ import font from 'styles/font'
|
|
|
8
8
|
import transition from 'styles/transition'
|
|
9
9
|
import ellipsizable from 'styles/ellipsizable'
|
|
10
10
|
import hoverable from 'styles/hoverable'
|
|
11
|
+
import focusable from 'styles/focusable'
|
|
11
12
|
import disableable from 'styles/disableable'
|
|
12
13
|
import { getToken as token } from 'theming'
|
|
13
14
|
|
|
@@ -37,11 +38,19 @@ const StyledBaseAnchor = styled.a`
|
|
|
37
38
|
|
|
38
39
|
min-height: 24px;
|
|
39
40
|
|
|
41
|
+
border-radius: ${token('border-radius-s')};
|
|
42
|
+
|
|
40
43
|
${hoverable`
|
|
41
44
|
text-decoration: underline;
|
|
42
45
|
font-weight: ${token('link-font-weight--hover')};
|
|
43
46
|
`}
|
|
44
47
|
|
|
48
|
+
${focusable`
|
|
49
|
+
box-shadow: ${token('link-box-shadow')};
|
|
50
|
+
outline: ${token('link-outline')};
|
|
51
|
+
outline-offset: ${token('link-outline-offset')};
|
|
52
|
+
`}
|
|
53
|
+
|
|
45
54
|
${disableable``}
|
|
46
55
|
|
|
47
56
|
${({ children }) =>
|
|
@@ -112,7 +112,7 @@ const Selector = styled.input<SelectionStyleProps>`
|
|
|
112
112
|
'radio-dark-selector-border-color--focus': whenProps({ scheme: 'dark' }),
|
|
113
113
|
})};
|
|
114
114
|
|
|
115
|
-
box-shadow: ${token('radio-selector-
|
|
115
|
+
box-shadow: ${token('radio-selector-box-shadow')};
|
|
116
116
|
`}
|
|
117
117
|
`
|
|
118
118
|
|
|
@@ -6,7 +6,9 @@ import { getToken as token } from 'theming'
|
|
|
6
6
|
import hoverable from 'styles/hoverable'
|
|
7
7
|
import MenuBaseItem from './MenuBaseItem'
|
|
8
8
|
|
|
9
|
-
const StyledMenuItem = styled((
|
|
9
|
+
const StyledMenuItem = styled(({ url, ...props }) => (
|
|
10
|
+
<MenuBaseItem as={url ? 'a' : 'button'} {...props} />
|
|
11
|
+
))`
|
|
10
12
|
${hoverable`
|
|
11
13
|
color: ${token('side-navigation-menu-link-color--hover')};
|
|
12
14
|
`}
|
|
@@ -29,7 +31,7 @@ export type MenuLinkProps = React.HTMLAttributes<HTMLAnchorElement> & {
|
|
|
29
31
|
}
|
|
30
32
|
|
|
31
33
|
function MenuLink({ url, ...props }: MenuLinkProps): JSX.Element {
|
|
32
|
-
return <StyledMenuItem href={url} {...props} role="menuitem" />
|
|
34
|
+
return <StyledMenuItem href={url} url={url} {...props} role="menuitem" />
|
|
33
35
|
}
|
|
34
36
|
|
|
35
37
|
export default styled(MenuLink)({})
|
|
@@ -64,7 +64,9 @@ const SwitchWrapper = styled.label<WithAdditionalProps>`
|
|
|
64
64
|
`}
|
|
65
65
|
|
|
66
66
|
${focusable`
|
|
67
|
-
box-shadow: ${token('switch-
|
|
67
|
+
box-shadow: ${token('switch-box-shadow')};
|
|
68
|
+
outline: ${token('switch-outline')};
|
|
69
|
+
outline-offset: ${token('switch-outline-offset')};
|
|
68
70
|
`}
|
|
69
71
|
|
|
70
72
|
${disableable``}
|
|
@@ -80,9 +80,14 @@ const StyledSpan = styled.span<TagProps>`
|
|
|
80
80
|
})};
|
|
81
81
|
|
|
82
82
|
padding: ${conditional({
|
|
83
|
-
'tag-spacing': whenProps({ removable: (removable) => !removable }),
|
|
84
|
-
'tag-spacing
|
|
85
|
-
|
|
83
|
+
'tag-small-spacing': whenProps({ size: 'small', removable: (removable) => !removable }),
|
|
84
|
+
'tag-spacing': whenProps({
|
|
85
|
+
size: (size) => !['small', 'large'].includes(size ?? ''),
|
|
86
|
+
removable: (removable) => !removable,
|
|
87
|
+
}),
|
|
88
|
+
'tag-large-spacing': whenProps({ size: 'large', removable: (removable) => !removable }),
|
|
89
|
+
'tag-removable-spacing': whenProps([{ size: (size) => size !== 'small', removable: true }]),
|
|
90
|
+
'tag-small-removable-spacing': whenProps([{ size: 'small', removable: true }]),
|
|
86
91
|
})};
|
|
87
92
|
|
|
88
93
|
min-width: ${token('tag-width')};
|
|
@@ -92,6 +97,12 @@ const StyledSpan = styled.span<TagProps>`
|
|
|
92
97
|
'tag-large-height': whenProps({ size: 'large' }),
|
|
93
98
|
})};
|
|
94
99
|
|
|
100
|
+
font-weight: ${conditional({
|
|
101
|
+
'tag-font-weight': whenProps({ size: 'default' }),
|
|
102
|
+
'tag-small-font-weight': whenProps({ size: 'small' }),
|
|
103
|
+
'tag-large-font-weight': whenProps({ size: 'large' }),
|
|
104
|
+
})};
|
|
105
|
+
|
|
95
106
|
color: ${conditional({
|
|
96
107
|
'tag-default-color': whenProps({ variant: 'default' }),
|
|
97
108
|
'tag-outlined-color': whenProps({ variant: 'outlined' }),
|
|
@@ -223,7 +234,16 @@ const StyledSpan = styled.span<TagProps>`
|
|
|
223
234
|
'tag-warning-background--focus': whenProps({ variant: 'warning' }),
|
|
224
235
|
'tag-danger-background--focus': whenProps({ variant: 'danger' }),
|
|
225
236
|
})};
|
|
226
|
-
box-shadow: ${token('tag-
|
|
237
|
+
box-shadow: ${token('tag-box-shadow')};
|
|
238
|
+
outline: ${conditional({
|
|
239
|
+
'tag-default-outline': whenProps({ variant: 'default' }),
|
|
240
|
+
'tag-outlined-outline': whenProps({ variant: 'outlined' }),
|
|
241
|
+
'tag-accent-outline': whenProps({ variant: 'accent' }),
|
|
242
|
+
'tag-success-outline': whenProps({ variant: 'success' }),
|
|
243
|
+
'tag-warning-outline': whenProps({ variant: 'warning' }),
|
|
244
|
+
'tag-danger-outline': whenProps({ variant: 'danger' }),
|
|
245
|
+
})};
|
|
246
|
+
outline-offset: ${token('tag-outline-offset')};
|
|
227
247
|
`}
|
|
228
248
|
|
|
229
249
|
${disableable`
|
|
@@ -96,9 +96,12 @@ const InputWrapper = styled.div<WithAdditionalProps>`
|
|
|
96
96
|
})};
|
|
97
97
|
|
|
98
98
|
box-shadow: ${conditional({
|
|
99
|
-
'text-field-
|
|
100
|
-
'text-field-dark-
|
|
99
|
+
'text-field-box-shadow': whenProps({ scheme: 'light' }),
|
|
100
|
+
'text-field-dark-box-shadow': whenProps({ scheme: 'dark' }),
|
|
101
101
|
})};
|
|
102
|
+
|
|
103
|
+
outline: ${token('text-field-outline')};
|
|
104
|
+
outline-offset: ${token('text-field-outline-offset')};
|
|
102
105
|
`}
|
|
103
106
|
|
|
104
107
|
${disableable()}
|
|
@@ -93,9 +93,12 @@ const TextareaWrapper = styled.div<WithAdditionalProps>`
|
|
|
93
93
|
})};
|
|
94
94
|
|
|
95
95
|
box-shadow: ${conditional({
|
|
96
|
-
'textarea-
|
|
97
|
-
'textarea-dark-
|
|
96
|
+
'textarea-box-shadow': whenProps({ scheme: 'light' }),
|
|
97
|
+
'textarea-dark-box-shadow': whenProps({ scheme: 'dark' }),
|
|
98
98
|
})};
|
|
99
|
+
|
|
100
|
+
outline: ${token('textarea-outline')};
|
|
101
|
+
outline-offset: ${token('textarea-outline-offset')};
|
|
99
102
|
`}
|
|
100
103
|
|
|
101
104
|
${disableable()}
|
|
@@ -68,7 +68,9 @@ const ToggleButton = styled(BaseButton)<{ $type: ToggleGroupType }>`
|
|
|
68
68
|
'toggle-checked-color--focus': whenProps({ 'aria-checked': true }),
|
|
69
69
|
})};
|
|
70
70
|
|
|
71
|
-
box-shadow: ${token('
|
|
71
|
+
box-shadow: ${token('toggle-box-shadow')};
|
|
72
|
+
outline: ${token('toggle-outline')};
|
|
73
|
+
outline-offset: ${token('toggle-outline-offset')};
|
|
72
74
|
`}
|
|
73
75
|
|
|
74
76
|
${activatable`
|