@loadsmart/loadsmart-ui 5.9.0 → 5.10.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 (202) hide show
  1. package/dist/common/SelectionWrapper.d.ts +1 -1
  2. package/dist/components/Accordion/Accordion.d.ts +1 -1
  3. package/dist/components/Accordion/Accordion.stories.d.ts +1 -1
  4. package/dist/components/Banner/Banner.stories.d.ts +1 -1
  5. package/dist/components/Breadcrumbs/Breadcrumbs.stories.d.ts +1 -1
  6. package/dist/components/Button/Button.d.ts +4 -1
  7. package/dist/components/Button/Button.stories.d.ts +2 -1
  8. package/dist/components/Card/Card.stories.d.ts +1 -1
  9. package/dist/components/Checkbox/Checkbox.d.ts +1 -1
  10. package/dist/components/Checkbox/Checkbox.stories.d.ts +1 -1
  11. package/dist/components/Dialog/Dialog.stories.d.ts +1 -1
  12. package/dist/components/DragDropFile/DragDropFile.stories.d.ts +1 -1
  13. package/dist/components/Drawer/Drawer.stories.d.ts +1 -1
  14. package/dist/components/Dropdown/Dropdown.stories.d.ts +1 -1
  15. package/dist/components/EmptyState/EmptyState.stories.d.ts +1 -1
  16. package/dist/components/ErrorMessage/ErrorMessage.stories.d.ts +1 -1
  17. package/dist/components/HighlightMatch/HighlightMatch.stories.d.ts +1 -1
  18. package/dist/components/IconFactory/IconFactory.stories.d.ts +1 -1
  19. package/dist/components/Label/Label.d.ts +2 -2
  20. package/dist/components/Label/Label.stories.d.ts +1 -1
  21. package/dist/components/Layout/Box.d.ts +1 -1
  22. package/dist/components/Layout/Grid.d.ts +1 -1
  23. package/dist/components/Layout/Layout.stories.d.ts +1 -1
  24. package/dist/components/Layout/Sidebar.d.ts +1 -1
  25. package/dist/components/Layout/Switcher.d.ts +1 -1
  26. package/dist/components/Link/Link.stories.d.ts +1 -1
  27. package/dist/components/Link/useSafeLink.d.ts +1 -1
  28. package/dist/components/Loaders/LoadingBar.stories.d.ts +1 -1
  29. package/dist/components/Loaders/LoadingDots.stories.d.ts +1 -1
  30. package/dist/components/Loaders/Spinner.stories.d.ts +1 -1
  31. package/dist/components/Modal/Modal.stories.d.ts +1 -1
  32. package/dist/components/Pagination/Pagination.stories.d.ts +1 -1
  33. package/dist/components/Pagination/Pagination.types.d.ts +2 -2
  34. package/dist/components/Popover/Popover.stories.d.ts +1 -1
  35. package/dist/components/ProgressBar/ProgressBar.stories.d.ts +1 -1
  36. package/dist/components/Radio/Radio.d.ts +1 -1
  37. package/dist/components/Radio/Radio.stories.d.ts +1 -1
  38. package/dist/components/Section/Sections.stories.d.ts +1 -1
  39. package/dist/components/Select/Select.fixtures.d.ts +2 -2
  40. package/dist/components/Select/Select.stories.d.ts +1 -1
  41. package/dist/components/Select/Select.types.d.ts +2 -2
  42. package/dist/components/Select/SelectCreatableOption.d.ts +1 -1
  43. package/dist/components/Select/SelectEmpty.d.ts +1 -1
  44. package/dist/components/Select/components.d.ts +1 -1
  45. package/dist/components/Select/useSelectExternal.d.ts +1 -1
  46. package/dist/components/SideNavigation/SideNavigation.stories.d.ts +1 -1
  47. package/dist/components/Steps/Steps.d.ts +1 -1
  48. package/dist/components/Steps/Steps.stories.d.ts +1 -1
  49. package/dist/components/Steps/StepsStep.d.ts +1 -1
  50. package/dist/components/Switch/Switch.stories.d.ts +1 -1
  51. package/dist/components/Table/Table.stories.d.ts +1 -1
  52. package/dist/components/Table/Table.types.d.ts +3 -4
  53. package/dist/components/Table/TableSortHandle.d.ts +1 -1
  54. package/dist/components/TablePagination/RowsPerPage.d.ts +1 -1
  55. package/dist/components/TablePagination/TablePagination.stories.d.ts +1 -1
  56. package/dist/components/TablePagination/TablePagination.types.d.ts +1 -1
  57. package/dist/components/TablePagination/TablePaginationActions.d.ts +1 -1
  58. package/dist/components/Tag/Tag.stories.d.ts +1 -1
  59. package/dist/components/Text/Text.d.ts +1 -1
  60. package/dist/components/Text/Text.stories.d.ts +1 -1
  61. package/dist/components/TextField/TextField.d.ts +1 -1
  62. package/dist/components/TextField/TextField.stories.d.ts +1 -1
  63. package/dist/components/Textarea/Textarea.d.ts +1 -1
  64. package/dist/components/Textarea/Textarea.stories.d.ts +1 -1
  65. package/dist/components/Toast/Toast.stories.d.ts +1 -1
  66. package/dist/components/ToggleGroup/ToggleGroup.stories.d.ts +1 -1
  67. package/dist/components/Tooltip/Tooltip.d.ts +3 -2
  68. package/dist/components/Tooltip/Tooltip.stories.d.ts +1 -1
  69. package/dist/hooks/useFocusTrap/useFocusTrap.stories.d.ts +1 -1
  70. package/dist/hooks/useHeightExpansionToggler/useHeightExpansionToggler.d.ts +1 -1
  71. package/dist/index.js +769 -909
  72. package/dist/index.js.map +1 -1
  73. package/dist/styles/activatable.d.ts +1 -1
  74. package/dist/styles/disableable.d.ts +1 -1
  75. package/dist/styles/focusable.d.ts +1 -1
  76. package/dist/styles/hoverable.d.ts +1 -1
  77. package/dist/testing/getInterpolatedStyles/getInterpolatedStyles.d.ts +1 -1
  78. package/dist/testing/index.js.map +1 -1
  79. package/dist/theming/index.d.ts +2 -2
  80. package/dist/theming/index.js.map +1 -1
  81. package/package.json +9 -10
  82. package/src/common/CloseButton/CloseButton.tsx +7 -11
  83. package/src/common/SelectionWrapper.tsx +8 -8
  84. package/src/components/Accordion/Accordion.stories.tsx +1 -1
  85. package/src/components/Accordion/Accordion.tsx +24 -29
  86. package/src/components/Banner/Banner.stories.tsx +1 -1
  87. package/src/components/Banner/Banner.tsx +2 -2
  88. package/src/components/Breadcrumbs/Breadcrumb.tsx +3 -4
  89. package/src/components/Breadcrumbs/Breadcrumbs.stories.tsx +1 -1
  90. package/src/components/Breadcrumbs/Breadcrumbs.tsx +1 -1
  91. package/src/components/Button/Button.stories.tsx +33 -13
  92. package/src/components/Button/Button.test.tsx +24 -8
  93. package/src/components/Button/Button.tsx +139 -46
  94. package/src/components/Calendar/Calendar.tsx +4 -8
  95. package/src/components/Calendar/PickerModeToggle.tsx +3 -6
  96. package/src/components/Calendar/Pickers/DayPicker.tsx +1 -1
  97. package/src/components/Calendar/Pickers/MonthPicker.tsx +1 -1
  98. package/src/components/Calendar/Pickers/PickerButton.tsx +29 -39
  99. package/src/components/Calendar/Pickers/YearPicker.tsx +1 -1
  100. package/src/components/Card/Card.stories.tsx +1 -1
  101. package/src/components/Card/Card.tsx +6 -9
  102. package/src/components/Card/CardTitle.tsx +3 -3
  103. package/src/components/Checkbox/Checkbox.stories.tsx +1 -1
  104. package/src/components/Checkbox/Checkbox.tsx +15 -27
  105. package/src/components/Dialog/Dialog.stories.tsx +1 -1
  106. package/src/components/Dialog/Dialog.tsx +5 -5
  107. package/src/components/DragDropFile/DragDropFile.stories.tsx +1 -1
  108. package/src/components/DragDropFile/styles.tsx +6 -11
  109. package/src/components/Drawer/Drawer.stories.tsx +1 -1
  110. package/src/components/Drawer/Drawer.tsx +6 -6
  111. package/src/components/Dropdown/Dropdown.stories.tsx +1 -1
  112. package/src/components/Dropdown/DropdownMenu.tsx +15 -28
  113. package/src/components/Dropdown/DropdownTrigger.tsx +24 -34
  114. package/src/components/EmptyState/EmptyState.stories.tsx +1 -1
  115. package/src/components/ErrorMessage/ErrorMessage.stories.tsx +1 -1
  116. package/src/components/HighlightMatch/HighlightMatch.stories.tsx +1 -1
  117. package/src/components/HighlightMatch/HighlightMatch.test.tsx +1 -1
  118. package/src/components/HighlightMatch/HighlightMatch.tsx +1 -1
  119. package/src/components/IconFactory/IconFactory.stories.tsx +1 -1
  120. package/src/components/Label/Label.stories.tsx +1 -1
  121. package/src/components/Label/Label.tsx +5 -5
  122. package/src/components/Layout/Box.tsx +1 -1
  123. package/src/components/Layout/Grid.tsx +1 -1
  124. package/src/components/Layout/Layout.stories.tsx +1 -1
  125. package/src/components/Layout/Sidebar.tsx +1 -1
  126. package/src/components/Layout/Switcher.tsx +1 -1
  127. package/src/components/Link/Link.stories.tsx +1 -1
  128. package/src/components/Link/Link.tsx +9 -13
  129. package/src/components/Link/useSafeLink.ts +1 -1
  130. package/src/components/Loaders/LoadingBar.stories.tsx +1 -1
  131. package/src/components/Loaders/LoadingBar.tsx +2 -2
  132. package/src/components/Loaders/LoadingDots.stories.tsx +1 -1
  133. package/src/components/Loaders/Spinner.stories.tsx +1 -1
  134. package/src/components/Modal/Modal.stories.tsx +1 -1
  135. package/src/components/Modal/Modal.tsx +7 -12
  136. package/src/components/Pagination/Pagination.stories.tsx +1 -1
  137. package/src/components/Pagination/Pagination.test.tsx +1 -1
  138. package/src/components/Pagination/Pagination.types.ts +2 -2
  139. package/src/components/Popover/Popover.stories.tsx +1 -1
  140. package/src/components/ProgressBar/ProgressBar.stories.tsx +1 -1
  141. package/src/components/ProgressBar/ProgressBar.tsx +4 -6
  142. package/src/components/Radio/Radio.stories.tsx +1 -1
  143. package/src/components/Radio/Radio.tsx +12 -20
  144. package/src/components/Section/Section.tsx +6 -8
  145. package/src/components/Section/Sections.stories.tsx +1 -1
  146. package/src/components/Select/Select.fixtures.ts +3 -3
  147. package/src/components/Select/Select.stories.tsx +7 -5
  148. package/src/components/Select/Select.test.tsx +20 -40
  149. package/src/components/Select/Select.types.ts +2 -2
  150. package/src/components/Select/SelectCreatableOption.tsx +1 -1
  151. package/src/components/Select/SelectEmpty.tsx +5 -6
  152. package/src/components/Select/SelectOption.test.tsx +1 -1
  153. package/src/components/Select/SelectTrigger.tsx +6 -11
  154. package/src/components/Select/components.tsx +1 -1
  155. package/src/components/Select/useSelect.ts +1 -1
  156. package/src/components/Select/useSelectExternal.ts +1 -1
  157. package/src/components/SideNavigation/Menu/Menu.test.tsx +1 -1
  158. package/src/components/SideNavigation/Menu/Menu.tsx +3 -3
  159. package/src/components/SideNavigation/Menu/MenuBaseItem.tsx +4 -5
  160. package/src/components/SideNavigation/Menu/MenuExpandable.tsx +2 -3
  161. package/src/components/SideNavigation/SideNavigation.stories.tsx +1 -1
  162. package/src/components/Steps/ProgressSteps/ProgressStep.tsx +31 -39
  163. package/src/components/Steps/Steps.stories.tsx +1 -1
  164. package/src/components/Steps/Steps.tsx +2 -1
  165. package/src/components/Steps/StepsStep.tsx +2 -1
  166. package/src/components/Switch/Switch.stories.tsx +1 -1
  167. package/src/components/Switch/Switch.tsx +6 -18
  168. package/src/components/Table/Table.stories.tsx +1 -1
  169. package/src/components/Table/Table.tsx +2 -2
  170. package/src/components/Table/Table.types.ts +9 -4
  171. package/src/components/Table/TableSortHandle.tsx +1 -1
  172. package/src/components/TablePagination/RowsPerPage.tsx +2 -2
  173. package/src/components/TablePagination/TablePagination.stories.tsx +1 -1
  174. package/src/components/TablePagination/TablePagination.test.tsx +1 -1
  175. package/src/components/TablePagination/TablePagination.types.ts +1 -1
  176. package/src/components/TablePagination/TablePaginationActions.tsx +1 -1
  177. package/src/components/Tabs/Tabs.tsx +26 -32
  178. package/src/components/Tag/Tag.stories.tsx +1 -1
  179. package/src/components/Tag/Tag.tsx +35 -44
  180. package/src/components/Text/Text.stories.tsx +1 -1
  181. package/src/components/Text/Text.tsx +1 -1
  182. package/src/components/TextField/TextField.stories.tsx +1 -1
  183. package/src/components/TextField/TextField.tsx +16 -23
  184. package/src/components/Textarea/Textarea.stories.tsx +1 -1
  185. package/src/components/Textarea/Textarea.tsx +18 -23
  186. package/src/components/Toast/Toast.stories.tsx +1 -1
  187. package/src/components/Toast/Toast.tsx +3 -3
  188. package/src/components/ToggleGroup/Toggle.tsx +7 -7
  189. package/src/components/ToggleGroup/ToggleGroup.stories.tsx +1 -1
  190. package/src/components/Tooltip/Tooltip.stories.tsx +1 -1
  191. package/src/components/Tooltip/Tooltip.tsx +23 -24
  192. package/src/components/TopNavigation/Menu/MenuItemDropdown.tsx +1 -1
  193. package/src/components/TopNavigation/OpenSideNavButton/OpenSideNavButton.tsx +1 -1
  194. package/src/hooks/useFocusTrap/useFocusTrap.stories.tsx +1 -1
  195. package/src/hooks/useHeightExpansionToggler/useHeightExpansionToggler.ts +1 -1
  196. package/src/styles/activatable.tsx +1 -1
  197. package/src/styles/disableable.tsx +1 -1
  198. package/src/styles/focusable.tsx +1 -1
  199. package/src/styles/font.tsx +3 -3
  200. package/src/styles/hoverable.tsx +1 -1
  201. package/src/testing/getInterpolatedStyles/getInterpolatedStyles.ts +1 -1
  202. package/src/theming/index.ts +3 -2
@@ -4,7 +4,7 @@ import clsx from 'clsx'
4
4
 
5
5
  import { getToken as token } from 'theming'
6
6
  import { useFocusWithin } from 'hooks/useFocusWithin'
7
- import ColorScheme from 'utils/types/ColorScheme'
7
+ import type ColorScheme from 'utils/types/ColorScheme'
8
8
  import conditional, { whenProps } from 'tools/conditional'
9
9
  import disableable from 'styles/disableable'
10
10
  import focusable from 'styles/focusable'
@@ -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;
37
38
  height: ${conditional({
38
39
  'text-field-height': whenProps({ scale: 'default' }),
39
40
  'text-field-small-height': whenProps({ scale: 'small' }),
40
41
  'text-field-large-height': whenProps({ scale: 'large' }),
41
42
  })};
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
- border-radius: ${token('text-field-border-radius')};
55
- border-width: 1px;
56
- border-style: solid;
57
-
54
+ color: ${conditional({
55
+ 'text-field-color': whenProps({ scheme: 'light' }),
56
+ 'text-field-dark-color': whenProps({ scheme: 'dark' }),
57
+ })};
58
58
  background: ${conditional({
59
59
  'text-field-background': whenProps({ scheme: 'light' }),
60
60
  'text-field-dark-background': whenProps({ scheme: 'dark' }),
@@ -66,11 +66,9 @@ 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
-
70
- color: ${conditional({
71
- 'text-field-color': whenProps({ scheme: 'light' }),
72
- 'text-field-dark-color': whenProps({ scheme: 'dark' }),
73
- })};
69
+ border-style: solid;
70
+ border-width: 1px;
71
+ border-radius: ${token('text-field-border-radius')};
74
72
 
75
73
  ${hoverable`
76
74
  background: ${conditional({
@@ -138,14 +136,8 @@ export const Trailing = styled(StyledSpan)<WithAdditionalProps>`
138
136
  `
139
137
 
140
138
  const StyledInput = styled.input<WithAdditionalProps>`
141
- ${transition()}
142
-
143
- ${font({
144
- height: 'text-field-font-height',
145
- })}
146
-
147
- background: transparent;
148
-
139
+ flex: 1;
140
+ min-width: 0;
149
141
  padding: ${conditional({
150
142
  'text-field-padding-y': whenProps({ scale: 'default' }),
151
143
  'text-field-small-padding-y': whenProps({ scale: 'small' }),
@@ -159,12 +151,13 @@ const StyledInput = styled.input<WithAdditionalProps>`
159
151
  'text-field-small-padding-x': whenProps({ scale: 'small' }),
160
152
  })};
161
153
 
154
+ background: transparent;
162
155
  border: none;
163
156
 
164
- flex: 1;
165
-
166
- min-width: 0;
167
-
157
+ ${transition()}
158
+ ${font({
159
+ height: 'text-field-font-height',
160
+ })}
168
161
  ${focusable()}
169
162
  ${disableable()}
170
163
 
@@ -1,6 +1,6 @@
1
1
  import React, { useState, ChangeEvent } from 'react'
2
2
  import Textarea, { TextareaProps } from './Textarea'
3
- import { Meta } from '@storybook/react/types-6-0'
3
+ import type { Meta } from '@storybook/react/types-6-0'
4
4
 
5
5
  import { Icon } from 'components/Icon'
6
6
  import Status from 'utils/types/Status'
@@ -4,7 +4,7 @@ import clsx from 'clsx'
4
4
 
5
5
  import { getToken as token } from 'theming'
6
6
  import { useFocusWithin } from 'hooks/useFocusWithin'
7
- import ColorScheme from 'utils/types/ColorScheme'
7
+ import type ColorScheme from 'utils/types/ColorScheme'
8
8
  import conditional, { whenProps } from 'tools/conditional'
9
9
  import disableable from 'styles/disableable'
10
10
  import focusable from 'styles/focusable'
@@ -48,9 +48,10 @@ const TextareaWrapper = styled.div<WithAdditionalProps>`
48
48
  'textarea-large-font-size': whenProps({ scale: 'large' }),
49
49
  })};
50
50
 
51
- border-radius: ${token('textarea-border-radius')};
52
- border-width: 1px;
53
- border-style: solid;
51
+ color: ${conditional({
52
+ 'textarea-color': whenProps({ scheme: 'light' }),
53
+ 'textarea-dark-color': whenProps({ scheme: 'dark' }),
54
+ })};
54
55
 
55
56
  background: ${conditional({
56
57
  'textarea-background': whenProps({ scheme: 'light' }),
@@ -63,11 +64,9 @@ const TextareaWrapper = styled.div<WithAdditionalProps>`
63
64
  'textarea-danger-border-color': whenProps({ status: Status.Danger }),
64
65
  'textarea-success-border-color': whenProps({ status: Status.Success }),
65
66
  })};
66
-
67
- color: ${conditional({
68
- 'textarea-color': whenProps({ scheme: 'light' }),
69
- 'textarea-dark-color': whenProps({ scheme: 'dark' }),
70
- })};
67
+ border-style: solid;
68
+ border-width: 1px;
69
+ border-radius: ${token('textarea-border-radius')};
71
70
 
72
71
  ${hoverable`
73
72
  background: ${conditional({
@@ -120,36 +119,30 @@ const StyledSpan = styled.span<WithAdditionalProps>`
120
119
  const Leading = styled(StyledSpan)<WithAdditionalProps>`
121
120
  align-items: flex-start;
122
121
 
122
+ padding: ${token('space-s')} 0;
123
+
123
124
  margin: 0 0 0
124
125
  ${conditional({
125
126
  'text-field-padding-x': whenProps({ scale: ['default', 'large'] }),
126
127
  'text-field-small-padding-x': whenProps({ scale: 'small' }),
127
128
  })};
128
-
129
- padding: ${token('space-s')} 0;
130
129
  `
131
130
 
132
131
  const Trailing = styled(StyledSpan)<WithAdditionalProps>`
133
132
  align-items: flex-start;
134
133
 
134
+ padding: ${token('space-s')} 0;
135
+
135
136
  margin: 0
136
137
  ${conditional({
137
138
  'text-field-padding-x': whenProps({ scale: ['default', 'large'] }),
138
139
  'text-field-small-padding-x': whenProps({ scale: 'small' }),
139
140
  })}
140
141
  0 0;
141
-
142
- padding: ${token('space-s')} 0;
143
142
  `
144
143
 
145
144
  const StyledTextarea = styled.textarea<WithAdditionalProps>`
146
- ${transition()}
147
-
148
- ${font({
149
- height: 'textarea-font-height',
150
- })}
151
-
152
- background: transparent;
145
+ flex: 1 0 auto;
153
146
 
154
147
  padding: ${conditional({
155
148
  'textarea-padding-y': whenProps({ scale: 'default' }),
@@ -157,17 +150,19 @@ const StyledTextarea = styled.textarea<WithAdditionalProps>`
157
150
  'textarea-large-padding-y': whenProps({ scale: 'large' }),
158
151
  })}
159
152
  0;
160
-
161
153
  margin: 0
162
154
  ${conditional({
163
155
  'textarea-padding-x': whenProps({ scale: ['default', 'large'] }),
164
156
  'textarea-small-padding-x': whenProps({ scale: 'small' }),
165
157
  })};
166
158
 
159
+ background: transparent;
167
160
  border: none;
168
161
 
169
- flex: 1 0 auto;
170
-
162
+ ${transition()}
163
+ ${font({
164
+ height: 'textarea-font-height',
165
+ })}
171
166
  ${focusable()}
172
167
  ${disableable()}
173
168
  `
@@ -1,6 +1,6 @@
1
1
  import React from 'react'
2
2
  import Toast, { ToastProps } from './Toast'
3
- import { Meta } from '@storybook/react/types-6-0'
3
+ import type { Meta } from '@storybook/react/types-6-0'
4
4
  import Status from 'utils/types/Status'
5
5
 
6
6
  export default {
@@ -18,12 +18,12 @@ const Container = styled.div<ContainerProps>`
18
18
  max-width: 100%;
19
19
  padding: ${token('toast-padding-y')} ${token('toast-padding-x')};
20
20
  overflow: hidden;
21
-
22
- color: ${token('toast-font-color')};
23
- font-weight: ${token('toast-font-weight')};
24
21
  font-size: ${token('toast-font-size')};
22
+ font-weight: ${token('toast-font-weight')};
25
23
  line-height: ${token('toast-font-height')};
26
24
 
25
+ color: ${token('toast-font-color')};
26
+
27
27
  background: ${conditional({
28
28
  'toast-neutral-background': whenProps({ status: Status.Neutral }),
29
29
  'toast-success-background': whenProps({ status: Status.Success }),
@@ -14,6 +14,13 @@ import ToggleGroupContext, { SelectableContext } from './ToggleGroupContext'
14
14
  import type { ToggleGroupOptionProps, ToggleGroupType } from './ToggleGroup.types'
15
15
 
16
16
  const ToggleButton = styled(BaseButton)<{ $type: ToggleGroupType }>`
17
+ padding: ${token('space-xs')} ${token('space-s')};
18
+
19
+ color: ${conditional({
20
+ 'color-neutral-darker': whenProps({ 'aria-checked': false }),
21
+ 'color-neutral-white': whenProps({ 'aria-checked': true }),
22
+ })};
23
+
17
24
  background: ${conditional({
18
25
  'color-transparent': whenProps({ 'aria-checked': false }),
19
26
  'color-neutral-darkest': whenProps({ 'aria-checked': true }),
@@ -27,13 +34,6 @@ const ToggleButton = styled(BaseButton)<{ $type: ToggleGroupType }>`
27
34
  'color-transparent': whenProps({ $type: 'single', 'aria-checked': false }),
28
35
  })};
29
36
 
30
- color: ${conditional({
31
- 'color-neutral-darker': whenProps({ 'aria-checked': false }),
32
- 'color-neutral-white': whenProps({ 'aria-checked': true }),
33
- })};
34
-
35
- padding: ${token('space-xs')} ${token('space-s')};
36
-
37
37
  ${hoverable`
38
38
  border-color: ${conditional({
39
39
  'color-neutral-dark': whenProps({ $type: 'multiple' }),
@@ -1,5 +1,5 @@
1
1
  import React from 'react'
2
- import { Story, Meta } from '@storybook/react/types-6-0'
2
+ import type { Story, Meta } from '@storybook/react/types-6-0'
3
3
 
4
4
  import { Icon } from '../Icon'
5
5
  import { Label } from '../Label'
@@ -1,6 +1,6 @@
1
1
  import React from 'react'
2
2
  import Tooltip, { TooltipAlign, TooltipPosition, TooltipProps } from './Tooltip'
3
- import { Meta } from '@storybook/react/types-6-0'
3
+ import type { Meta } from '@storybook/react/types-6-0'
4
4
 
5
5
  export default {
6
6
  title: 'Components/Tooltip',
@@ -1,7 +1,8 @@
1
- import React, { HTMLAttributes, PropsWithChildren, ReactNode, useCallback, useState } from 'react'
1
+ import React, { HTMLAttributes, ReactNode, useCallback, useState } from 'react'
2
+ import type { PropsWithChildren } from 'react'
2
3
  import styled, { css } from 'styled-components'
3
4
 
4
- import ColorScheme from 'utils/types/ColorScheme'
5
+ import type ColorScheme from 'utils/types/ColorScheme'
5
6
  import focusable from 'styles/focusable'
6
7
  import transition from 'styles/transition'
7
8
  import font from 'styles/font'
@@ -31,10 +32,10 @@ export interface TooltipProps extends HTMLAttributes<HTMLDivElement> {
31
32
  type ContainerProps = Pick<TooltipProps, 'scheme'>
32
33
 
33
34
  const Container = styled.div<ContainerProps>`
34
- display: inline-block;
35
-
36
35
  position: relative;
37
36
 
37
+ display: inline-block;
38
+
38
39
  cursor: help;
39
40
 
40
41
  ${focusable`
@@ -48,31 +49,22 @@ const Container = styled.div<ContainerProps>`
48
49
  type BubbleProps = Pick<TooltipProps, 'position' | 'align'>
49
50
 
50
51
  const Bubble = styled.span<BubbleProps>`
51
- ${font({
52
- weight: 'font-weight-medium',
53
- height: 'font-height-3',
54
- })}
55
-
56
- ${transition()}
57
-
58
- white-space: initial;
59
-
60
- min-width: ${token('tooltip-min-width')};
61
- max-width: ${token('tooltip-max-width')};
62
- width: max-content;
63
-
64
52
  position: absolute;
65
53
  z-index: ${token('z-index-tooltip')};
66
54
 
67
- background: ${token('tooltip-background')};
68
- box-shadow: ${token('tooltip-shadow')};
69
- border-radius: ${token('tooltip-border-radius')};
55
+ width: max-content;
56
+ min-width: ${token('tooltip-min-width')};
57
+ max-width: ${token('tooltip-max-width')};
70
58
 
71
59
  padding: ${token('tooltip-padding-y')} ${token('tooltip-padding-x')};
72
60
 
73
- color: ${token('tooltip-color')};
74
61
  font-size: ${token('tooltip-font-size')};
75
62
  line-height: ${token('tooltip-font-height')};
63
+ color: ${token('tooltip-color')};
64
+ white-space: initial;
65
+ background: ${token('tooltip-background')};
66
+ border-radius: ${token('tooltip-border-radius')};
67
+ box-shadow: ${token('tooltip-shadow')};
76
68
 
77
69
  ${({ position }) =>
78
70
  position === TooltipPosition.Top &&
@@ -117,19 +109,26 @@ const Bubble = styled.span<BubbleProps>`
117
109
 
118
110
  transform: translate(100%, -50%);
119
111
  `};
112
+
113
+ ${font({
114
+ weight: 'font-weight-medium',
115
+ height: 'font-height-3',
116
+ })}
117
+
118
+ ${transition()}
120
119
  `
121
120
 
122
121
  type ArrowProps = Pick<TooltipProps, 'position'>
123
122
  const Arrow = styled.span<ArrowProps>`
123
+ position: absolute;
124
+ z-index: 1;
125
+
124
126
  width: 0;
125
127
  height: 0;
126
128
 
127
129
  background: transparent;
128
130
  border-style: solid;
129
131
 
130
- position: absolute;
131
- z-index: 1;
132
-
133
132
  ${({ position }) =>
134
133
  position === TooltipPosition.Top &&
135
134
  css`
@@ -27,8 +27,8 @@ const MenuDropdownTrigger = styled(DropdownTrigger.Handle)`
27
27
  export const MenuDropdownLabel = styled.label`
28
28
  ${transition()}
29
29
 
30
- align-items: center;
31
30
  display: flex;
31
+ align-items: center;
32
32
 
33
33
  ${typography('body-bold', { color: 'top-navigation-item-color' })}
34
34
 
@@ -11,10 +11,10 @@ export type OpenSideNavButtonProps = {
11
11
 
12
12
  const Container = styled.button`
13
13
  margin-right: ${token('space-2xl')};
14
+ cursor: pointer;
14
15
 
15
16
  background: none;
16
17
  border: none;
17
- cursor: pointer;
18
18
  `
19
19
 
20
20
  function OpenSideNavButton({ className, onClick }: OpenSideNavButtonProps): JSX.Element {
@@ -1,6 +1,6 @@
1
1
  import React from 'react'
2
2
  import clsx from 'clsx'
3
- import { Story, Meta } from '@storybook/react/types-6-0'
3
+ import type { Story, Meta } from '@storybook/react/types-6-0'
4
4
 
5
5
  import range from 'utils/toolset/range'
6
6
  import useFocusTrap from './useFocusTrap'
@@ -1,5 +1,5 @@
1
1
  import { RefObject, useEffect, useLayoutEffect, useReducer, useState } from 'react'
2
- import { CSSProperties } from 'styled-components'
2
+ import type { CSSProperties } from 'styled-components'
3
3
 
4
4
  import { useDidMount } from 'hooks/useDidMount'
5
5
 
@@ -1,6 +1,6 @@
1
1
  /* eslint-disable @typescript-eslint/no-explicit-any */
2
2
  import interleave from 'utils/toolset/interleave'
3
- import { InterpolatedStyle } from 'utils/types/InterpolatedStyle'
3
+ import type { InterpolatedStyle } from 'utils/types/InterpolatedStyle'
4
4
 
5
5
  /**
6
6
  * Add basic CSS style wrapping block for `:active` state.
@@ -1,6 +1,6 @@
1
1
  /* eslint-disable @typescript-eslint/no-explicit-any */
2
2
  import interleave from 'utils/toolset/interleave'
3
- import { InterpolatedStyle } from 'utils/types/InterpolatedStyle'
3
+ import type { InterpolatedStyle } from 'utils/types/InterpolatedStyle'
4
4
 
5
5
  /**
6
6
  * Add basic CSS style wrapping block for `:disabled` state or `.is-disabled` class.
@@ -1,6 +1,6 @@
1
1
  /* eslint-disable @typescript-eslint/no-explicit-any */
2
2
  import interleave from 'utils/toolset/interleave'
3
- import { InterpolatedStyle } from 'utils/types/InterpolatedStyle'
3
+ import type { InterpolatedStyle } from 'utils/types/InterpolatedStyle'
4
4
  /**
5
5
  * Add basic CSS style wrapping block for `:active` state.
6
6
  * It returns an array to allow handling of nested interpolation
@@ -26,11 +26,11 @@ function fontStyle({
26
26
  transform = 'none',
27
27
  }: FontStyleOptions): FlattenInterpolation<ThemedProps> {
28
28
  return css`
29
- color: ${getToken(color)};
30
- font-weight: ${getToken(weight)};
31
- font-size: ${getToken(size)};
32
29
  font-family: ${getToken(family)};
30
+ font-size: ${getToken(size)};
31
+ font-weight: ${getToken(weight)};
33
32
  line-height: ${getToken(height)};
33
+ color: ${getToken(color)};
34
34
  text-transform: ${transform};
35
35
  -webkit-font-smoothing: antialiased;
36
36
  -moz-osx-font-smoothing: grayscale;
@@ -1,6 +1,6 @@
1
1
  /* eslint-disable @typescript-eslint/no-explicit-any */
2
2
  import interleave from 'utils/toolset/interleave'
3
- import { InterpolatedStyle } from 'utils/types/InterpolatedStyle'
3
+ import type { InterpolatedStyle } from 'utils/types/InterpolatedStyle'
4
4
 
5
5
  /**
6
6
  * Add basic CSS style wrapping block for `:hover` state; it includes check for non-disabled (`:enabled` or not `.is-disabled`) elements.
@@ -1,4 +1,4 @@
1
- import { Interpolation, ThemeProps } from 'styled-components'
1
+ import type { Interpolation, ThemeProps } from 'styled-components'
2
2
  import { isFunction } from '@loadsmart/utils-function'
3
3
 
4
4
  import { Alice } from '../../theming/themes'
@@ -1,6 +1,7 @@
1
- import { ThemeProps } from 'styled-components'
2
1
  import { isFunction } from '@loadsmart/utils-function'
3
- import ThemeAlice from './themes/alice.theme'
2
+
3
+ import type { ThemeProps } from 'styled-components'
4
+ import type ThemeAlice from './themes/alice.theme'
4
5
 
5
6
  export type ThemeToken = keyof typeof ThemeAlice
6
7
  export type ThemeTokenValue = string | number