@loadsmart/loadsmart-ui 5.11.0 → 5.11.2-beta.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.
Files changed (56) hide show
  1. package/dist/index.js +490 -340
  2. package/dist/index.js.map +1 -1
  3. package/dist/testing/SelectEvent/SelectEvent.d.ts +2 -0
  4. package/dist/testing/index.js +1 -1
  5. package/dist/testing/index.js.map +1 -1
  6. package/package.json +8 -7
  7. package/src/common/CloseButton/CloseButton.tsx +11 -7
  8. package/src/common/SelectionWrapper.tsx +7 -7
  9. package/src/components/Accordion/Accordion.tsx +28 -22
  10. package/src/components/Banner/Banner.tsx +2 -2
  11. package/src/components/Breadcrumbs/Breadcrumb.tsx +3 -2
  12. package/src/components/Breadcrumbs/Breadcrumbs.tsx +1 -1
  13. package/src/components/Button/Button.tsx +20 -17
  14. package/src/components/Calendar/Calendar.tsx +8 -4
  15. package/src/components/Calendar/PickerModeToggle.tsx +6 -3
  16. package/src/components/Calendar/Pickers/DayPicker.tsx +1 -1
  17. package/src/components/Calendar/Pickers/MonthPicker.tsx +1 -1
  18. package/src/components/Calendar/Pickers/PickerButton.tsx +39 -29
  19. package/src/components/Calendar/Pickers/YearPicker.tsx +1 -1
  20. package/src/components/Card/Card.tsx +9 -6
  21. package/src/components/Card/CardTitle.tsx +3 -4
  22. package/src/components/Checkbox/Checkbox.tsx +26 -14
  23. package/src/components/Dialog/Dialog.tsx +5 -5
  24. package/src/components/DragDropFile/styles.tsx +11 -6
  25. package/src/components/Drawer/Drawer.tsx +6 -6
  26. package/src/components/Dropdown/DropdownMenu.tsx +28 -15
  27. package/src/components/Dropdown/DropdownTrigger.tsx +34 -24
  28. package/src/components/HighlightMatch/HighlightMatch.tsx +1 -2
  29. package/src/components/Label/Label.tsx +3 -3
  30. package/src/components/Link/Link.tsx +13 -9
  31. package/src/components/Loaders/LoadingBar.tsx +2 -2
  32. package/src/components/Modal/Modal.tsx +12 -7
  33. package/src/components/ProgressBar/ProgressBar.tsx +6 -4
  34. package/src/components/Radio/Radio.tsx +19 -11
  35. package/src/components/Section/Section.tsx +8 -6
  36. package/src/components/Select/Select.test.tsx +161 -161
  37. package/src/components/Select/SelectEmpty.tsx +5 -4
  38. package/src/components/Select/SelectTrigger.tsx +11 -6
  39. package/src/components/SideNavigation/Menu/Menu.tsx +3 -3
  40. package/src/components/SideNavigation/Menu/MenuBaseItem.tsx +5 -4
  41. package/src/components/SideNavigation/Menu/MenuExpandable.tsx +3 -2
  42. package/src/components/Steps/ProgressSteps/ProgressStep.tsx +39 -31
  43. package/src/components/Switch/Switch.tsx +18 -6
  44. package/src/components/Table/Table.tsx +2 -2
  45. package/src/components/Tabs/Tabs.tsx +32 -26
  46. package/src/components/Tag/Tag.tsx +44 -35
  47. package/src/components/TextField/TextField.tsx +22 -15
  48. package/src/components/Textarea/Textarea.tsx +22 -17
  49. package/src/components/Toast/Toast.tsx +3 -3
  50. package/src/components/ToggleGroup/Toggle.tsx +7 -7
  51. package/src/components/ToggleGroup/ToggleGroup.stories.tsx +14 -12
  52. package/src/components/Tooltip/Tooltip.tsx +22 -20
  53. package/src/components/TopNavigation/Menu/MenuItemDropdown.tsx +1 -1
  54. package/src/components/TopNavigation/OpenSideNavButton/OpenSideNavButton.tsx +1 -1
  55. package/src/styles/font.tsx +3 -3
  56. package/src/testing/SelectEvent/SelectEvent.ts +94 -66
@@ -5,19 +5,20 @@ import { getToken as token } from 'theming'
5
5
  import type { SelectEmptyProps } from './Select.types'
6
6
 
7
7
  const Wrapper = styled.div`
8
- box-sizing: border-box;
9
8
  display: flex;
10
9
  flex-direction: column;
11
10
  align-items: flex-start;
12
11
  justify-content: center;
13
- padding: ${token('space-s')};
12
+
13
+ box-sizing: border-box;
14
14
  margin: 0 ${token('space-s')};
15
+ padding: ${token('space-s')};
16
+
17
+ color: ${token('color-neutral')};
15
18
 
16
19
  font-size: 1em;
17
20
  line-height: ${token('font-height-3')};
18
21
 
19
- color: ${token('color-neutral')};
20
-
21
22
  background: ${token('color-transparent')};
22
23
  `
23
24
 
@@ -13,14 +13,19 @@ const GenericSelectTrigger = styled(GenericDropdownTrigger)`
13
13
  `
14
14
 
15
15
  const SelectTriggerSearchField = styled(TextField)`
16
- flex: 1;
17
- height: 100%;
18
- background-color: transparent;
19
- border: none;
20
- border-radius: ${token('border-radius-s')} 0 0 ${token('border-radius-s')};
21
16
  ${focusable`
22
17
  box-shadow: none;
23
18
  `}
19
+
20
+ background-color: transparent;
21
+
22
+ border: none;
23
+ border-radius: ${token('border-radius-s')} 0 0 ${token('border-radius-s')};
24
+
25
+ height: 100%;
26
+
27
+ flex: 1;
28
+
24
29
  ${Trailing} {
25
30
  margin: 0 ${token('space-xs')} 0 0;
26
31
  }
@@ -32,8 +37,8 @@ const Separator = styled.span`
32
37
  margin: 0;
33
38
 
34
39
  border-right-color: ${token('color-neutral-light')};
35
- border-right-style: solid;
36
40
  border-right-width: 1px;
41
+ border-right-style: solid;
37
42
  `
38
43
 
39
44
  const SelectTrigger = forwardRef<HTMLInputElement, SelectTriggerProps>(function SelectTrigger(
@@ -13,11 +13,11 @@ import { styledCompounds } from 'utils/toolset/styledCompounds'
13
13
  const MenuTitle = styled.div`
14
14
  padding: ${token('space-s')} 0;
15
15
  padding-left: ${token('space-l')};
16
- font-size: ${token('font-size-5')};
17
- font-weight: ${token('font-weight-bold')};
18
- line-height: ${token('font-height-3')};
19
16
 
20
17
  color: ${token('color-neutral')};
18
+ font-weight: ${token('font-weight-bold')};
19
+ font-size: ${token('font-size-5')};
20
+ line-height: ${token('font-height-3')};
21
21
  text-transform: uppercase;
22
22
  `
23
23
 
@@ -17,22 +17,23 @@ export type MenuBaseItemProps = HTMLAttributes<HTMLElement> & {
17
17
  }
18
18
 
19
19
  const StyledMenuItem = styled.button`
20
+ ${transition({ duration: '0.25s' })};
21
+
20
22
  display: flex;
23
+ width: 100%;
21
24
  align-items: center;
22
25
  justify-content: space-between;
23
- width: 100%;
24
26
  padding: ${token('space-s')} 0;
25
27
  padding-right: ${rem('12px')};
26
28
  padding-left: ${token('space-l')};
27
29
 
28
- font-size: ${token('font-size-4')};
30
+ color: ${token('color-neutral-white')};
29
31
  font-weight: ${token('font-weight-bold')};
32
+ font-size: ${token('font-size-4')};
30
33
  line-height: ${token('font-height-3')};
31
- color: ${token('color-neutral-white')};
32
34
 
33
35
  cursor: pointer;
34
36
 
35
- ${transition({ duration: '0.25s' })};
36
37
  ${focusable`
37
38
  color: ${token('color-primary')};
38
39
  `}
@@ -35,10 +35,11 @@ const StyledIcon = styled(Icon)<IExpandable>`
35
35
  `
36
36
 
37
37
  const ExpandableItems = styled.div<IExpandable>`
38
- height: ${prop('$height', 0)}px;
39
38
  overflow: hidden;
40
-
41
39
  ${transition({ property: 'height' })}
40
+
41
+ height: ${prop('$height', 0)}px;
42
+
42
43
  ${MenuLink} {
43
44
  padding-left: ${token('space-xl')};
44
45
  }
@@ -60,18 +60,32 @@ const ProgressStepContainer = styled.div`
60
60
  `
61
61
 
62
62
  const StepIndicator = styled.span<{ current: boolean; complete: boolean }>`
63
+ ${transition()}
64
+
65
+ ${font({
66
+ weight: 'font-weight-bold',
67
+ height: 'steps-indicator-size',
68
+ })}
69
+
70
+ font-size: ${token('font-size-4')};
71
+
72
+ height: ${token('steps-indicator-size')};
73
+ width: ${token('steps-indicator-size')};
74
+
63
75
  display: flex;
64
- align-items: center;
65
76
  justify-content: center;
66
- width: ${token('steps-indicator-size')};
67
- height: ${token('steps-indicator-size')};
68
- font-size: ${token('font-size-4')};
77
+ align-items: center;
69
78
 
70
- color: ${conditional({
79
+ border-width: 2px;
80
+ border-style: solid;
81
+ border-color: ${conditional({
82
+ 'color-accent': whenProps([
83
+ { current: true, complete: [true, false] },
84
+ { current: false, complete: true },
85
+ ]),
71
86
  'color-neutral': whenProps({ current: false, complete: false }),
72
- 'color-neutral-white': whenProps({ current: false, complete: true }),
73
- 'color-accent': whenProps({ current: true }),
74
87
  })};
88
+ border-radius: ${token('border-radius-circle')};
75
89
 
76
90
  background: ${conditional({
77
91
  'color-accent': whenProps([{ current: false, complete: true }]),
@@ -81,47 +95,41 @@ const StepIndicator = styled.span<{ current: boolean; complete: boolean }>`
81
95
  ]),
82
96
  })};
83
97
 
84
- border-color: ${conditional({
85
- 'color-accent': whenProps([
86
- { current: true, complete: [true, false] },
87
- { current: false, complete: true },
88
- ]),
98
+ color: ${conditional({
89
99
  'color-neutral': whenProps({ current: false, complete: false }),
100
+ 'color-neutral-white': whenProps({ current: false, complete: true }),
101
+ 'color-accent': whenProps({ current: true }),
90
102
  })};
91
- border-style: solid;
92
- border-width: 2px;
93
- border-radius: ${token('border-radius-circle')};
103
+ `
94
104
 
95
- ${transition()}
105
+ const StepLabel = styled.span<{ current: boolean; complete: boolean }>`
96
106
  ${font({
97
- weight: 'font-weight-bold',
98
- height: 'steps-indicator-size',
107
+ height: 'font-height-2',
99
108
  })}
100
- `
101
109
 
102
- const StepLabel = styled.span<{ current: boolean; complete: boolean }>`
103
110
  position: relative;
104
111
 
105
- display: flex;
106
- flex-direction: row;
107
-
108
- align-items: center;
109
- justify-content: center;
110
-
111
- margin: ${token('space-xs')} 0 0 0;
112
- font-size: ${token('font-size-4')};
113
112
  font-weight: ${conditional({
114
113
  'font-weight-medium': whenProps({ current: false }),
115
114
  'font-weight-bold': whenProps({ current: true }),
116
115
  })};
116
+
117
117
  color: ${conditional({
118
118
  'color-neutral-darker': whenProps([{ current: true }, { current: false, complete: true }]),
119
119
  'color-neutral': whenProps({ current: false, complete: false }),
120
120
  })};
121
+
122
+ font-size: ${token('font-size-4')};
123
+
124
+ display: flex;
125
+ flex-direction: row;
126
+
127
+ align-items: center;
128
+ justify-content: center;
129
+
121
130
  text-align: center;
122
- ${font({
123
- height: 'font-height-2',
124
- })}
131
+
132
+ margin: ${token('space-xs')} 0 0 0;
125
133
  `
126
134
 
127
135
  function ProgressStep(props: { step: Step; current: boolean; indicator: ReactNode }): JSX.Element {
@@ -24,8 +24,19 @@ export interface SwitchProps extends InputHTMLAttributes<HTMLInputElement>, With
24
24
  }
25
25
 
26
26
  const SwitchWrapper = styled.label<WithAdditionalProps>`
27
+ ${transition()}
28
+
29
+ ${font({})};
30
+
31
+ user-select: none;
32
+
33
+ cursor: pointer;
34
+ -webkit-tap-highlight-color: transparent;
35
+
27
36
  position: relative;
37
+
28
38
  display: inline-flex;
39
+
29
40
  width: ${conditional({
30
41
  'switch-width': whenProps({ scale: 'default' }),
31
42
  'switch-large-width': whenProps({ scale: 'large' }),
@@ -34,28 +45,28 @@ const SwitchWrapper = styled.label<WithAdditionalProps>`
34
45
  'switch-height': whenProps({ scale: 'default' }),
35
46
  'switch-large-height': whenProps({ scale: 'large' }),
36
47
  })};
37
- cursor: pointer;
38
- user-select: none;
39
- -webkit-tap-highlight-color: transparent;
48
+
40
49
  background-color: ${conditional({
41
50
  'switch-inactive-background-color': whenProps({ active: false }),
42
51
  'switch-active-background-color': whenProps({ active: true }),
43
52
  })};
53
+
44
54
  border-radius: ${conditional({
45
55
  'switch-border-radius': whenProps({ scale: 'default' }),
46
56
  'switch-large-border-radius': whenProps({ scale: 'large' }),
47
57
  })};
48
- ${transition()}
49
- ${font({})};
58
+
50
59
  ${hoverable`
51
60
  background: ${conditional({
52
61
  'switch-inactive-background-color--hover': whenProps({ active: false }),
53
62
  'switch-active-background-color--hover': whenProps({ active: true }),
54
63
  })};
55
64
  `}
65
+
56
66
  ${focusable`
57
67
  box-shadow: ${token('switch-outline')}
58
68
  `}
69
+
59
70
  ${disableable``}
60
71
  `
61
72
 
@@ -91,7 +102,6 @@ const Slider = styled.span<WithAdditionalProps>`
91
102
  'switch-slider-large-size': whenProps({ scale: 'large' }),
92
103
  })};
93
104
 
94
- content: '';
95
105
  background-color: ${token('switch-slider-background-color')};
96
106
  border-radius: ${token('switch-slider-border-radius')};
97
107
 
@@ -99,6 +109,8 @@ const Slider = styled.span<WithAdditionalProps>`
99
109
  timingFunction: 'ease-out',
100
110
  duration: '150ms',
101
111
  })}
112
+
113
+ content: '';
102
114
  }
103
115
  `
104
116
 
@@ -152,10 +152,10 @@ const StyledTable = styled.table<{ scale?: string }>`
152
152
 
153
153
  white-space: nowrap;
154
154
 
155
- border-collapse: collapse;
156
-
157
155
  background-color: ${token('color-neutral-white')};
158
156
 
157
+ border-collapse: collapse;
158
+
159
159
  ${StyledTableBody} ${StyledTableRow},
160
160
  ${StyledTableBody} ${StyledExpandableTableRow} {
161
161
  height: ${conditional({
@@ -26,8 +26,8 @@ const TabsItemsWrapper = styled.ul`
26
26
  padding: 0;
27
27
 
28
28
  border-bottom-color: ${token('color-neutral-lighter')};
29
- border-bottom-style: solid;
30
29
  border-bottom-width: 2px;
30
+ border-bottom-style: solid;
31
31
  `
32
32
 
33
33
  const StyledSpan = styled.span`
@@ -48,44 +48,50 @@ const Leading = styled(StyledSpan)`
48
48
  `
49
49
 
50
50
  const StyledLabel = styled.label<WithActiveProps & WithDirectionProps>`
51
- position: relative;
52
- bottom: -2px;
53
- display: inline-flex;
54
- flex-direction: ${conditional({
55
- row: whenProps({ direction: 'horizontal' }),
56
- column: whenProps({ direction: 'vertical' }),
57
- })};
58
- padding: ${token('space-m')} ${token('space-l')};
59
- font-size: ${token('font-size-4')};
60
-
61
- color: ${conditional({
62
- 'color-neutral': whenProps({ active: false }),
63
- 'neutral-darker': whenProps({ active: true }),
64
- })};
65
- text-transform: uppercase;
66
-
67
- cursor: pointer;
68
-
69
- border-color: ${conditional({
70
- 'color-transparent': whenProps({ active: false }),
71
- 'color-primary': whenProps({ active: true }),
72
- })};
73
- border-bottom-style: solid;
74
- border-bottom-width: 2px;
75
-
76
51
  ${font({
77
52
  height: 'font-height-2',
78
53
  weight: 'font-weight-bold',
79
54
  })}
80
55
  ${transition()}
56
+
57
+ font-size: ${token('font-size-4')};
58
+ text-transform: uppercase;
59
+
81
60
  ${hoverable`
82
61
  color: ${token('color-neutral-darker')};
83
62
  background-color: ${token('color-neutral-light')}33;
84
63
  `}
64
+
85
65
  ${disableable`
86
66
  color: ${token('color-neutral-dark')}33;
87
67
  background-color: ${token('color-neutral-light')}33;
88
68
  `}
69
+
70
+ padding: ${token('space-m')} ${token('space-l')};
71
+ display: inline-flex;
72
+ flex-direction: ${conditional({
73
+ row: whenProps({ direction: 'horizontal' }),
74
+ column: whenProps({ direction: 'vertical' }),
75
+ })};
76
+
77
+ cursor: pointer;
78
+
79
+ position: relative;
80
+ bottom: -2px;
81
+
82
+ border-bottom-width: 2px;
83
+ border-bottom-style: solid;
84
+
85
+ border-color: ${conditional({
86
+ 'color-transparent': whenProps({ active: false }),
87
+ 'color-primary': whenProps({ active: true }),
88
+ })};
89
+
90
+ color: ${conditional({
91
+ 'color-neutral': whenProps({ active: false }),
92
+ 'neutral-darker': whenProps({ active: true }),
93
+ })};
94
+
89
95
  ${Leading} + ${Children} {
90
96
  margin: ${conditional({
91
97
  '0': whenProps({ direction: 'horizontal' }),
@@ -39,28 +39,44 @@ export interface TagProps extends React.HTMLAttributes<HTMLElement>, WithSizePro
39
39
 
40
40
  // styled elements
41
41
  const StyledTag = styled.span`
42
- position: relative;
43
- z-index: 0;
44
42
  display: inline-flex;
45
43
 
44
+ position: relative;
45
+
46
46
  width: auto;
47
47
 
48
+ z-index: 0;
49
+
48
50
  ${disableable`
49
51
  opacity: ${token('opacity-60')};
50
52
  `}
51
53
  `
52
54
 
53
55
  const StyledSpan = styled.span<TagProps>`
54
- box-sizing: border-box;
56
+ ${transition()}
57
+
55
58
  display: inline-flex;
56
59
  align-items: center;
57
60
  justify-content: center;
58
61
 
59
- min-width: ${token('tag-width')};
60
- height: ${conditional({
61
- 'tag-height': whenProps({ size: 'default' }),
62
- 'tag-small-height': whenProps({ size: 'small' }),
63
- 'tag-large-height': whenProps({ size: 'large' }),
62
+ box-sizing: border-box;
63
+
64
+ text-decoration: none;
65
+
66
+ ${typography(
67
+ conditional({
68
+ 'chips-sm': whenProps({ size: 'small' }),
69
+ 'caption-bold': whenProps({ size: 'default' }),
70
+ 'body-bold': whenProps({ size: 'large' }),
71
+ })
72
+ )}
73
+
74
+ line-height: initial;
75
+
76
+ text-transform: ${conditional({
77
+ 'tag-transform': whenProps({ size: 'default' }),
78
+ 'tag-small-transform': whenProps({ size: 'small' }),
79
+ 'tag-large-transform': whenProps({ size: 'large' }),
64
80
  })};
65
81
 
66
82
  padding: ${conditional({
@@ -69,7 +85,13 @@ const StyledSpan = styled.span<TagProps>`
69
85
  'tag-small-spacing-removable': whenProps([{ size: 'small', removable: true }]),
70
86
  })};
71
87
 
72
- line-height: initial;
88
+ min-width: ${token('tag-width')};
89
+ height: ${conditional({
90
+ 'tag-height': whenProps({ size: 'default' }),
91
+ 'tag-small-height': whenProps({ size: 'small' }),
92
+ 'tag-large-height': whenProps({ size: 'large' }),
93
+ })};
94
+
73
95
  color: ${conditional({
74
96
  'tag-default-color': whenProps({ variant: 'default' }),
75
97
  'tag-outlined-color': whenProps({ variant: 'outlined' }),
@@ -79,14 +101,6 @@ const StyledSpan = styled.span<TagProps>`
79
101
  'tag-danger-color': whenProps({ variant: 'danger' }),
80
102
  })};
81
103
 
82
- text-decoration: none;
83
-
84
- text-transform: ${conditional({
85
- 'tag-transform': whenProps({ size: 'default' }),
86
- 'tag-small-transform': whenProps({ size: 'small' }),
87
- 'tag-large-transform': whenProps({ size: 'large' }),
88
- })};
89
-
90
104
  background: ${conditional({
91
105
  'tag-default-background': whenProps({ variant: 'default' }),
92
106
  'tag-outlined-background': whenProps({ variant: 'outlined' }),
@@ -96,6 +110,10 @@ const StyledSpan = styled.span<TagProps>`
96
110
  'tag-danger-background': whenProps({ variant: 'danger' }),
97
111
  })};
98
112
 
113
+ border-radius: ${token('tag-border-radius')};
114
+ border-width: ${token('tag-border-width')};
115
+ border-style: solid;
116
+
99
117
  border-color: ${conditional({
100
118
  'tag-default-border-color': whenProps({ variant: 'default' }),
101
119
  'tag-outlined-border-color': whenProps({ variant: 'outlined' }),
@@ -104,18 +122,7 @@ const StyledSpan = styled.span<TagProps>`
104
122
  'tag-warning-border-color': whenProps({ variant: 'warning' }),
105
123
  'tag-danger-border-color': whenProps({ variant: 'danger' }),
106
124
  })};
107
- border-style: solid;
108
- border-width: ${token('tag-border-width')};
109
- border-radius: ${token('tag-border-radius')};
110
125
 
111
- ${transition()}
112
- ${typography(
113
- conditional({
114
- 'chips-sm': whenProps({ size: 'small' }),
115
- 'caption-bold': whenProps({ size: 'default' }),
116
- 'body-bold': whenProps({ size: 'large' }),
117
- })
118
- )}
119
126
  ${hoverable`
120
127
  background: ${conditional({
121
128
  'tag-default-background--hover': whenProps([
@@ -198,6 +205,7 @@ const StyledSpan = styled.span<TagProps>`
198
205
  ]),
199
206
  })};
200
207
  `}
208
+
201
209
  ${focusable`
202
210
  color: ${conditional({
203
211
  'tag-default-color--focus': whenProps({ variant: 'default' }),
@@ -217,6 +225,7 @@ const StyledSpan = styled.span<TagProps>`
217
225
  })};
218
226
  box-shadow: ${token('tag-outline')};
219
227
  `}
228
+
220
229
  ${disableable`
221
230
  opacity: ${token('opacity-60')};
222
231
  `}
@@ -239,8 +248,14 @@ const StyledCloseButton = styled.button<WithSizeProps & WithVariantProps>`
239
248
  z-index: 2;
240
249
 
241
250
  display: inline-flex;
242
- align-items: center;
243
251
  justify-content: center;
252
+ align-items: center;
253
+
254
+ cursor: pointer;
255
+
256
+ background: ${token('tag-remove-button-background')};
257
+ border-radius: ${token('tag-remove-button-border-radius')};
258
+ border: 0;
244
259
 
245
260
  width: ${conditional({
246
261
  'tag-remove-button-size': whenProps({ size: 'default' }),
@@ -256,12 +271,6 @@ const StyledCloseButton = styled.button<WithSizeProps & WithVariantProps>`
256
271
 
257
272
  padding: 0;
258
273
 
259
- cursor: pointer;
260
-
261
- background: ${token('tag-remove-button-background')};
262
- border: 0;
263
- border-radius: ${token('tag-remove-button-border-radius')};
264
-
265
274
  ${disableable`
266
275
  opacity: ${token('opacity-60')};
267
276
  `}
@@ -34,12 +34,12 @@ const InputWrapper = styled.div<WithAdditionalProps>`
34
34
  display: inline-flex;
35
35
  flex-flow: row nowrap;
36
36
 
37
- min-width: 0;
38
37
  height: ${conditional({
39
38
  'text-field-height': whenProps({ scale: 'default' }),
40
39
  'text-field-small-height': whenProps({ scale: 'small' }),
41
40
  'text-field-large-height': whenProps({ scale: 'large' }),
42
41
  })};
42
+ min-width: 0;
43
43
 
44
44
  ${font({
45
45
  height: 'text-field-font-height',
@@ -51,10 +51,10 @@ const InputWrapper = styled.div<WithAdditionalProps>`
51
51
  'text-field-large-font-size': whenProps({ scale: 'large' }),
52
52
  })};
53
53
 
54
- color: ${conditional({
55
- 'text-field-color': whenProps({ scheme: 'light' }),
56
- 'text-field-dark-color': whenProps({ scheme: 'dark' }),
57
- })};
54
+ border-radius: ${token('text-field-border-radius')};
55
+ border-width: 1px;
56
+ border-style: solid;
57
+
58
58
  background: ${conditional({
59
59
  'text-field-background': whenProps({ scheme: 'light' }),
60
60
  'text-field-dark-background': whenProps({ scheme: 'dark' }),
@@ -66,9 +66,11 @@ const InputWrapper = styled.div<WithAdditionalProps>`
66
66
  'text-field-danger-border-color': whenProps({ status: Status.Danger }),
67
67
  'text-field-success-border-color': whenProps({ status: Status.Success }),
68
68
  })};
69
- border-style: solid;
70
- border-width: 1px;
71
- border-radius: ${token('text-field-border-radius')};
69
+
70
+ color: ${conditional({
71
+ 'text-field-color': whenProps({ scheme: 'light' }),
72
+ 'text-field-dark-color': whenProps({ scheme: 'dark' }),
73
+ })};
72
74
 
73
75
  ${hoverable`
74
76
  background: ${conditional({
@@ -136,8 +138,14 @@ export const Trailing = styled(StyledSpan)<WithAdditionalProps>`
136
138
  `
137
139
 
138
140
  const StyledInput = styled.input<WithAdditionalProps>`
139
- flex: 1;
140
- min-width: 0;
141
+ ${transition()}
142
+
143
+ ${font({
144
+ height: 'text-field-font-height',
145
+ })}
146
+
147
+ background: transparent;
148
+
141
149
  padding: ${conditional({
142
150
  'text-field-padding-y': whenProps({ scale: 'default' }),
143
151
  'text-field-small-padding-y': whenProps({ scale: 'small' }),
@@ -151,13 +159,12 @@ const StyledInput = styled.input<WithAdditionalProps>`
151
159
  'text-field-small-padding-x': whenProps({ scale: 'small' }),
152
160
  })};
153
161
 
154
- background: transparent;
155
162
  border: none;
156
163
 
157
- ${transition()}
158
- ${font({
159
- height: 'text-field-font-height',
160
- })}
164
+ flex: 1;
165
+
166
+ min-width: 0;
167
+
161
168
  ${focusable()}
162
169
  ${disableable()}
163
170