@basic-ui/material 1.0.0-alpha.1 → 1.0.0-alpha.10

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 (309) hide show
  1. package/build/cjs/index.js +248 -57
  2. package/build/cjs/index.js.map +1 -1
  3. package/build/esm/Alert/Alert.d.ts +1 -1
  4. package/build/esm/Alert/Alert.js +1 -1
  5. package/build/esm/Alert/Alert.js.map +1 -1
  6. package/build/esm/AppBar/AppBar.d.ts +3 -3
  7. package/build/esm/AppBar/AppBar.js +2 -2
  8. package/build/esm/AppBar/AppBar.js.map +1 -1
  9. package/build/esm/AppBar/AppBarButton.d.ts +1 -1
  10. package/build/esm/Badge/Badge.d.ts +1 -1
  11. package/build/esm/BaseLine/BaseLine.d.ts +1 -0
  12. package/build/esm/BottomSheet/BottomSheet.d.ts +1 -1
  13. package/build/esm/BottomSheet/BottomSheetSurface.d.ts +2 -2
  14. package/build/esm/BottomSheet/BottomSheetSurface.js +2 -2
  15. package/build/esm/BottomSheet/BottomSheetSurface.js.map +1 -1
  16. package/build/esm/Box/Box.d.ts +4 -4
  17. package/build/esm/Box/Box.js +1 -2
  18. package/build/esm/Box/Box.js.map +1 -1
  19. package/build/esm/Button/BaseButton.d.ts +3 -3
  20. package/build/esm/Button/BaseButton.js +0 -1
  21. package/build/esm/Button/BaseButton.js.map +1 -1
  22. package/build/esm/Button/Button.d.ts +4 -4
  23. package/build/esm/Button/Button.js +0 -1
  24. package/build/esm/Button/Button.js.map +1 -1
  25. package/build/esm/Button/ButtonGroup.d.ts +2 -2
  26. package/build/esm/Button/ButtonGroup.js +1 -1
  27. package/build/esm/Button/ButtonGroup.js.map +1 -1
  28. package/build/esm/Button/FilledButton.d.ts +1 -1
  29. package/build/esm/Button/FilledButton.js +6 -8
  30. package/build/esm/Button/FilledButton.js.map +1 -1
  31. package/build/esm/Button/OutlinedButton.d.ts +1 -1
  32. package/build/esm/Button/TransparentButton.d.ts +1 -1
  33. package/build/esm/CheckBox/CheckBox.d.ts +5 -5
  34. package/build/esm/CheckBox/CheckBox.js +0 -1
  35. package/build/esm/CheckBox/CheckBox.js.map +1 -1
  36. package/build/esm/CheckBox/CheckBoxIcon.d.ts +4 -4
  37. package/build/esm/CheckBox/CheckBoxIcon.js +2 -2
  38. package/build/esm/CheckBox/CheckBoxIcon.js.map +1 -1
  39. package/build/esm/Chip/ButtonChip.d.ts +4 -4
  40. package/build/esm/Chip/ButtonChip.js +0 -1
  41. package/build/esm/Chip/ButtonChip.js.map +1 -1
  42. package/build/esm/Chip/ChipBase.d.ts +3 -3
  43. package/build/esm/Chip/ChipBase.js +0 -1
  44. package/build/esm/Chip/ChipBase.js.map +1 -1
  45. package/build/esm/Chip/ChoiceChip.d.ts +5 -5
  46. package/build/esm/Chip/ChoiceChip.js +0 -1
  47. package/build/esm/Chip/ChoiceChip.js.map +1 -1
  48. package/build/esm/ColorMode/ColorModeProvider.d.ts +3 -3
  49. package/build/esm/ColorMode/ColorModeProvider.js +0 -1
  50. package/build/esm/ColorMode/ColorModeProvider.js.map +1 -1
  51. package/build/esm/Combobox/Combobox.d.ts +13 -13
  52. package/build/esm/Combobox/Combobox.js +3 -3
  53. package/build/esm/Combobox/Combobox.js.map +1 -1
  54. package/build/esm/Dialog/Dialog.d.ts +1 -1
  55. package/build/esm/Dialog/DialogBackdrop.d.ts +2 -2
  56. package/build/esm/Dialog/DialogBackdrop.js +0 -1
  57. package/build/esm/Dialog/DialogBackdrop.js.map +1 -1
  58. package/build/esm/Dialog/DialogSurface.d.ts +2 -2
  59. package/build/esm/Dialog/DialogSurface.js +0 -1
  60. package/build/esm/Dialog/DialogSurface.js.map +1 -1
  61. package/build/esm/Dialog/useDialogAnimation.js +3 -2
  62. package/build/esm/Dialog/useDialogAnimation.js.map +1 -1
  63. package/build/esm/Divider/Divider.d.ts +3 -3
  64. package/build/esm/Divider/Divider.js +0 -1
  65. package/build/esm/Divider/Divider.js.map +1 -1
  66. package/build/esm/FloatingLabel/FloatingLabel.d.ts +4 -4
  67. package/build/esm/FloatingLabel/FloatingLabel.js +3 -3
  68. package/build/esm/FloatingLabel/FloatingLabel.js.map +1 -1
  69. package/build/esm/LineRipple/LineRipple.d.ts +3 -3
  70. package/build/esm/LineRipple/LineRipple.js +2 -2
  71. package/build/esm/LineRipple/LineRipple.js.map +1 -1
  72. package/build/esm/Link/Link.d.ts +3 -3
  73. package/build/esm/Link/Link.js +0 -1
  74. package/build/esm/Link/Link.js.map +1 -1
  75. package/build/esm/List/List.d.ts +5 -5
  76. package/build/esm/List/List.js +0 -1
  77. package/build/esm/List/List.js.map +1 -1
  78. package/build/esm/ListItem/ListItem.d.ts +5 -5
  79. package/build/esm/ListItem/ListItem.js +3 -3
  80. package/build/esm/ListItem/ListItem.js.map +1 -1
  81. package/build/esm/ListItem/ListItemText.d.ts +6 -6
  82. package/build/esm/ListItem/ListItemText.js +1 -2
  83. package/build/esm/ListItem/ListItemText.js.map +1 -1
  84. package/build/esm/Menu/Menu.d.ts +6 -6
  85. package/build/esm/Menu/Menu.js +5 -3
  86. package/build/esm/Menu/Menu.js.map +1 -1
  87. package/build/esm/NavRail/NavRailItem.d.ts +15 -0
  88. package/build/esm/NavRail/NavRailItem.js +147 -0
  89. package/build/esm/NavRail/NavRailItem.js.map +1 -0
  90. package/build/esm/NavRail/index.d.ts +1 -0
  91. package/build/esm/NavRail/index.js +2 -0
  92. package/build/esm/NavRail/index.js.map +1 -0
  93. package/build/esm/NotchedOutline/NotchedOutline.d.ts +5 -5
  94. package/build/esm/NotchedOutline/NotchedOutline.js +0 -1
  95. package/build/esm/NotchedOutline/NotchedOutline.js.map +1 -1
  96. package/build/esm/NotchedOutline/styledComponents.d.ts +114 -1
  97. package/build/esm/NotchedOutline/styledComponents.js +3 -2
  98. package/build/esm/NotchedOutline/styledComponents.js.map +1 -1
  99. package/build/esm/Paper/Paper.d.ts +4 -4
  100. package/build/esm/Paper/Paper.js +0 -1
  101. package/build/esm/Paper/Paper.js.map +1 -1
  102. package/build/esm/ProgressSpinner/ProgressSpinner.js +2 -1
  103. package/build/esm/ProgressSpinner/ProgressSpinner.js.map +1 -1
  104. package/build/esm/RadioButton/RadioButton.js.map +1 -1
  105. package/build/esm/RadioButton/RadioButtonIcon.d.ts +3 -3
  106. package/build/esm/RadioButton/RadioButtonIcon.js +2 -2
  107. package/build/esm/RadioButton/RadioButtonIcon.js.map +1 -1
  108. package/build/esm/RadioButton/RadioGroup.d.ts +1 -1
  109. package/build/esm/Ripple/RippleBox.d.ts +1 -2
  110. package/build/esm/Ripple/RippleBox.js +0 -1
  111. package/build/esm/Ripple/RippleBox.js.map +1 -1
  112. package/build/esm/Ripple/useRippleHandlers.d.ts +3 -3
  113. package/build/esm/Ripple/useRippleHandlers.js.map +1 -1
  114. package/build/esm/Ripple/useRippleSurface.d.ts +5 -5
  115. package/build/esm/Ripple/useRippleSurface.js +61 -58
  116. package/build/esm/Ripple/useRippleSurface.js.map +1 -1
  117. package/build/esm/Select/Select.d.ts +6 -6
  118. package/build/esm/Select/Select.js +0 -1
  119. package/build/esm/Select/Select.js.map +1 -1
  120. package/build/esm/Select/SelectIcon.d.ts +3 -3
  121. package/build/esm/Select/SelectIcon.js +2 -2
  122. package/build/esm/Select/SelectIcon.js.map +1 -1
  123. package/build/esm/Select/context.d.ts +2 -2
  124. package/build/esm/Select/context.js.map +1 -1
  125. package/build/esm/Select/defaultRender.d.ts +2 -1
  126. package/build/esm/Select/defaultRender.js.map +1 -1
  127. package/build/esm/Select/styledComponents.d.ts +9 -9
  128. package/build/esm/Select/styledComponents.js +0 -1
  129. package/build/esm/Select/styledComponents.js.map +1 -1
  130. package/build/esm/SelectItem/SelectItem.d.ts +1 -1
  131. package/build/esm/SelectionControl/SelectionControlLabel.d.ts +5 -5
  132. package/build/esm/SelectionControl/SelectionControlLabel.js +0 -1
  133. package/build/esm/SelectionControl/SelectionControlLabel.js.map +1 -1
  134. package/build/esm/SelectionControl/SelectionControlText.d.ts +4 -4
  135. package/build/esm/SelectionControl/SelectionControlText.js +0 -1
  136. package/build/esm/SelectionControl/SelectionControlText.js.map +1 -1
  137. package/build/esm/Skeleton/DelayAppearance.d.ts +3 -3
  138. package/build/esm/Skeleton/DelayAppearance.js +0 -1
  139. package/build/esm/Skeleton/DelayAppearance.js.map +1 -1
  140. package/build/esm/Skeleton/Skeleton.d.ts +6 -6
  141. package/build/esm/Skeleton/Skeleton.js +0 -1
  142. package/build/esm/Skeleton/Skeleton.js.map +1 -1
  143. package/build/esm/Snackbar/Snackbar.d.ts +3 -3
  144. package/build/esm/Snackbar/Snackbar.js +1 -2
  145. package/build/esm/Snackbar/Snackbar.js.map +1 -1
  146. package/build/esm/Snackbar/Stack.d.ts +2 -3
  147. package/build/esm/Snackbar/Stack.js +0 -1
  148. package/build/esm/Snackbar/Stack.js.map +1 -1
  149. package/build/esm/Snackbar/useSnackbarAnimation.d.ts +2 -2
  150. package/build/esm/Snackbar/useSnackbarAnimation.js +2 -1
  151. package/build/esm/Snackbar/useSnackbarAnimation.js.map +1 -1
  152. package/build/esm/Switch/Switch.d.ts +4 -5
  153. package/build/esm/Switch/Switch.js +0 -1
  154. package/build/esm/Switch/Switch.js.map +1 -1
  155. package/build/esm/Switch/styledComponents.d.ts +1 -0
  156. package/build/esm/Switch/styledComponents.js +2 -1
  157. package/build/esm/Switch/styledComponents.js.map +1 -1
  158. package/build/esm/Tab/Tab.d.ts +3 -3
  159. package/build/esm/Tab/Tab.js +2 -3
  160. package/build/esm/Tab/Tab.js.map +1 -1
  161. package/build/esm/Tab/TabList.d.ts +1 -1
  162. package/build/esm/Tab/TabPanel.d.ts +1 -1
  163. package/build/esm/TabIndicator/TabIndicator.d.ts +1 -1
  164. package/build/esm/TabIndicator/TabIndicator.js +2 -1
  165. package/build/esm/TabIndicator/TabIndicator.js.map +1 -1
  166. package/build/esm/TabIndicator/context.d.ts +2 -2
  167. package/build/esm/TabIndicator/context.js.map +1 -1
  168. package/build/esm/Table/Table.d.ts +1 -1
  169. package/build/esm/Table/TableRow.d.ts +1 -1
  170. package/build/esm/Table/TableRow.js +1 -1
  171. package/build/esm/Table/TableRow.js.map +1 -1
  172. package/build/esm/Text/LoremIpsum.js +1 -1
  173. package/build/esm/Text/LoremIpsum.js.map +1 -1
  174. package/build/esm/Text/Text.d.ts +8 -4
  175. package/build/esm/Text/Text.js +5 -2
  176. package/build/esm/Text/Text.js.map +1 -1
  177. package/build/esm/TextField/FilledContainer.d.ts +4 -4
  178. package/build/esm/TextField/FilledContainer.js +0 -1
  179. package/build/esm/TextField/FilledContainer.js.map +1 -1
  180. package/build/esm/TextField/HelperText.d.ts +5 -5
  181. package/build/esm/TextField/HelperText.js +1 -2
  182. package/build/esm/TextField/HelperText.js.map +1 -1
  183. package/build/esm/TextField/IconContainer.d.ts +2 -3
  184. package/build/esm/TextField/IconContainer.js +0 -1
  185. package/build/esm/TextField/IconContainer.js.map +1 -1
  186. package/build/esm/TextField/Input.d.ts +4 -4
  187. package/build/esm/TextField/Input.js +2 -1
  188. package/build/esm/TextField/Input.js.map +1 -1
  189. package/build/esm/TextField/OutlinedContainer.d.ts +4 -4
  190. package/build/esm/TextField/OutlinedContainer.js +0 -1
  191. package/build/esm/TextField/OutlinedContainer.js.map +1 -1
  192. package/build/esm/TextField/TextField.d.ts +5 -5
  193. package/build/esm/TextField/TextField.js +0 -1
  194. package/build/esm/TextField/TextField.js.map +1 -1
  195. package/build/esm/ThemeExplorer/ThemeColors.d.ts +2 -2
  196. package/build/esm/ThemeExplorer/ThemeColors.js +1 -1
  197. package/build/esm/ThemeExplorer/ThemeColors.js.map +1 -1
  198. package/build/esm/ThemeExplorer/components.d.ts +5 -6
  199. package/build/esm/ThemeExplorer/components.js +4 -3
  200. package/build/esm/ThemeExplorer/components.js.map +1 -1
  201. package/build/esm/ThemeExplorer/makeColorScheme.js +2 -1
  202. package/build/esm/ThemeExplorer/makeColorScheme.js.map +1 -1
  203. package/build/esm/ThemeExplorer/useDeferredColor.js +2 -1
  204. package/build/esm/ThemeExplorer/useDeferredColor.js.map +1 -1
  205. package/build/esm/Tooltip/Tooltip.d.ts +3 -3
  206. package/build/esm/Tooltip/Tooltip.js +5 -8
  207. package/build/esm/Tooltip/Tooltip.js.map +1 -1
  208. package/build/esm/color.d.ts +2 -0
  209. package/build/esm/color.js +8 -3
  210. package/build/esm/color.js.map +1 -1
  211. package/build/esm/index.d.ts +2 -0
  212. package/build/esm/index.js +2 -0
  213. package/build/esm/index.js.map +1 -1
  214. package/build/esm/motion.d.ts +7 -0
  215. package/build/esm/motion.js +8 -0
  216. package/build/esm/motion.js.map +1 -0
  217. package/build/esm/theme/theme.d.ts +114 -1
  218. package/build/esm/theme/theme.js +42 -7
  219. package/build/esm/theme/theme.js.map +1 -1
  220. package/build/tsconfig-build.tsbuildinfo +1 -0
  221. package/build/tsconfig.tsbuildinfo +1 -1
  222. package/package.json +6 -6
  223. package/src/Alert/Alert.tsx +1 -1
  224. package/src/AppBar/AppBar.tsx +4 -3
  225. package/src/BottomSheet/BottomSheetSurface.tsx +5 -4
  226. package/src/Box/Box.tsx +6 -8
  227. package/src/Button/BaseButton.tsx +3 -11
  228. package/src/Button/Button.story.tsx +21 -4
  229. package/src/Button/Button.tsx +4 -4
  230. package/src/Button/ButtonGroup.tsx +1 -1
  231. package/src/Button/FilledButton.tsx +4 -9
  232. package/src/Button/SpinnerButton.story.tsx +1 -1
  233. package/src/CheckBox/CheckBox.story.tsx +2 -2
  234. package/src/CheckBox/CheckBox.tsx +6 -10
  235. package/src/CheckBox/CheckBoxIcon.tsx +5 -5
  236. package/src/Chip/ButtonChip.tsx +3 -3
  237. package/src/Chip/Chip.story.tsx +1 -1
  238. package/src/Chip/ChipBase.tsx +2 -2
  239. package/src/Chip/ChoiceChip.tsx +7 -7
  240. package/src/ColorMode/ColorModeProvider.tsx +3 -3
  241. package/src/Combobox/Combobox.story.tsx +3 -3
  242. package/src/Combobox/Combobox.tsx +9 -10
  243. package/src/Dialog/DialogBackdrop.tsx +3 -3
  244. package/src/Dialog/DialogSurface.tsx +2 -4
  245. package/src/Dialog/useDialogAnimation.tsx +3 -4
  246. package/src/Divider/Divider.tsx +2 -2
  247. package/src/FloatingLabel/FloatingLabel.tsx +7 -6
  248. package/src/LineRipple/LineRipple.story.tsx +1 -1
  249. package/src/LineRipple/LineRipple.tsx +4 -4
  250. package/src/Link/Link.tsx +2 -5
  251. package/src/List/List.tsx +4 -4
  252. package/src/ListItem/ListItem.tsx +6 -6
  253. package/src/ListItem/ListItemText.tsx +6 -7
  254. package/src/Menu/Menu.tsx +5 -5
  255. package/src/NavRail/NavRail.story.tsx +190 -0
  256. package/src/NavRail/NavRailItem.tsx +176 -0
  257. package/src/NavRail/index.ts +1 -0
  258. package/src/NotchedOutline/NotchedOutline.tsx +4 -5
  259. package/src/NotchedOutline/styledComponents.ts +2 -1
  260. package/src/Paper/Paper.story.tsx +3 -3
  261. package/src/Paper/Paper.tsx +3 -3
  262. package/src/ProgressSpinner/ProgressSpinner.tsx +2 -2
  263. package/src/RadioButton/RadioButton.story.tsx +2 -2
  264. package/src/RadioButton/RadioButton.tsx +1 -1
  265. package/src/RadioButton/RadioButtonIcon.tsx +4 -5
  266. package/src/Ripple/Ripple.story.tsx +1 -1
  267. package/src/Ripple/RippleBox.tsx +1 -2
  268. package/src/Ripple/useRippleHandlers.ts +3 -3
  269. package/src/Ripple/useRippleSurface.ts +77 -61
  270. package/src/Select/Select.tsx +11 -6
  271. package/src/Select/SelectIcon.tsx +3 -4
  272. package/src/Select/context.ts +2 -1
  273. package/src/Select/defaultRender.ts +2 -1
  274. package/src/Select/styledComponents.tsx +13 -11
  275. package/src/SelectionControl/SelectionControlLabel.tsx +4 -8
  276. package/src/SelectionControl/SelectionControlText.tsx +3 -3
  277. package/src/Skeleton/DelayAppearance.tsx +2 -2
  278. package/src/Skeleton/Skeleton.story.tsx +2 -2
  279. package/src/Skeleton/Skeleton.tsx +6 -6
  280. package/src/Snackbar/Snackbar.tsx +3 -3
  281. package/src/Snackbar/Stack.tsx +6 -9
  282. package/src/Snackbar/useSnackbarAnimation.ts +4 -3
  283. package/src/Switch/Switch.tsx +6 -10
  284. package/src/Switch/styledComponents.tsx +2 -2
  285. package/src/Tab/Tab.tsx +3 -7
  286. package/src/TabIndicator/TabIndicator.tsx +2 -1
  287. package/src/TabIndicator/context.ts +2 -1
  288. package/src/Table/TableRow.tsx +1 -1
  289. package/src/Text/LoremIpsum.tsx +1 -1
  290. package/src/Text/Text.story.tsx +42 -7
  291. package/src/Text/Text.tsx +25 -5
  292. package/src/TextField/FilledContainer.tsx +3 -3
  293. package/src/TextField/HelperText.tsx +5 -5
  294. package/src/TextField/IconContainer.tsx +2 -3
  295. package/src/TextField/Input.tsx +5 -4
  296. package/src/TextField/OutlinedContainer.tsx +3 -3
  297. package/src/TextField/TextField.tsx +4 -4
  298. package/src/ThemeExplorer/ThemeBuilder.story.tsx +29 -25
  299. package/src/ThemeExplorer/ThemeColors.tsx +1 -1
  300. package/src/ThemeExplorer/components.tsx +8 -3
  301. package/src/ThemeExplorer/makeColorScheme.tsx +1 -1
  302. package/src/ThemeExplorer/useDeferredColor.tsx +1 -1
  303. package/src/Tooltip/Tooltip.story.tsx +1 -1
  304. package/src/Tooltip/Tooltip.tsx +9 -11
  305. package/src/color.ts +25 -4
  306. package/src/index.ts +2 -0
  307. package/src/motion.ts +7 -0
  308. package/src/theme/theme.ts +47 -6
  309. package/src/ThemeExplorer/ThemeExplorer.story.tsx +0 -43
@@ -19,7 +19,7 @@ export const TableRow = forwardRef<HTMLDivElement, TableRowProps>(
19
19
  display="flex"
20
20
  flexDirection="row"
21
21
  width="100%"
22
- variant="body1"
22
+ variant="body-medium"
23
23
  px={2}
24
24
  __css={{
25
25
  borderBottomStyle: 'solid',
@@ -9,7 +9,7 @@ export const LoremIpsum: FC<{ count: number }> = ({ count = 50 }) => {
9
9
  const phrases = [];
10
10
  for (let i = 0; i < count; i++) {
11
11
  phrases.push(
12
- <Text variant="body1" key={`p-${i}`} m={'1.2em'}>
12
+ <Text variant="body-medium" key={`p-${i}`} m={'1.2em'}>
13
13
  {phrase}
14
14
  </Text>
15
15
  );
@@ -6,7 +6,46 @@ export default {
6
6
  title: 'components/Text',
7
7
  };
8
8
 
9
+ const loremIpsum =
10
+ 'Lorem ipsum dolor sit amet consectetur adipisicing elit.' +
11
+ 'Cupiditate aliquid ad quas sunt voluptatum officia dolorum cumque,' +
12
+ 'possimus nihil molestias sapiente necessitatibus dolor saepe inventore,' +
13
+ 'soluta id accusantium voluptas beatae.';
14
+
9
15
  const Example = () => {
16
+ const variantMapping = {
17
+ 'display-large': 'Display large',
18
+ 'display-medium': 'Display medium',
19
+ 'display-small': 'Display small',
20
+ 'headline-large': 'Headline large',
21
+ 'headline-medium': 'Headline medium',
22
+ 'headline-small': 'Headline small',
23
+ 'title-large': 'Title large',
24
+ 'title-medium': 'Title medium',
25
+ 'title-small': 'Title small',
26
+ 'label-large': 'Label large',
27
+ 'label-medium': 'Label medium',
28
+ 'label-small': 'Label small',
29
+ 'body-large': `Body large. ${loremIpsum}`,
30
+ 'body-medium': `Body medium. ${loremIpsum}`,
31
+ 'body-small': `Body small. ${loremIpsum}`,
32
+ };
33
+ const variants = Object.keys(variantMapping).map((v) => (
34
+ <Text key={v} variant={v as keyof typeof variantMapping} mb={2}>
35
+ {variantMapping[v]}
36
+ </Text>
37
+ ));
38
+
39
+ return (
40
+ <Box bg="surface" p="2">
41
+ {variants}
42
+ </Box>
43
+ );
44
+ };
45
+
46
+ export const AllVariants = () => <Example />;
47
+
48
+ export const LegacyVariants = () => {
10
49
  const variantMapping = {
11
50
  h1: 'Heading 1',
12
51
  h2: 'Heading 2',
@@ -16,16 +55,14 @@ const Example = () => {
16
55
  h6: 'Heading 6',
17
56
  subtitle1: 'Subtitle 1',
18
57
  subtitle2: 'Subtitle 2',
19
- body1:
20
- 'Body 1. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Quos blanditiis tenetur unde suscipit, quam beatae rerum inventore consectetur, neque doloribus, cupiditate numquam dignissimos laborum fugiat deleniti? Eum quasi quidem quibusdam.',
21
- body2:
22
- 'Body 2. Lorem ipsum dolor sit amet consectetur adipisicing elit. Cupiditate aliquid ad quas sunt voluptatum officia dolorum cumque, possimus nihil molestias sapiente necessitatibus dolor saepe inventore, soluta id accusantium voluptas beatae.',
58
+ body1: `Body 1. ${loremIpsum}`,
59
+ body2: `Body 2. ${loremIpsum}`,
23
60
  button: 'Button text',
24
61
  caption: 'Caption text',
25
62
  overline: 'Overline text',
26
63
  };
27
64
  const variants = Object.keys(variantMapping).map((v) => (
28
- <Text key={v} variant={v} mb={2}>
65
+ <Text key={v} variant={v as keyof typeof variantMapping} mb={2}>
29
66
  {variantMapping[v]}
30
67
  </Text>
31
68
  ));
@@ -36,5 +73,3 @@ const Example = () => {
36
73
  </Box>
37
74
  );
38
75
  };
39
-
40
- export const AllVariants = () => <Example />;
package/src/Text/Text.tsx CHANGED
@@ -1,10 +1,13 @@
1
+ import type { ElementType } from 'react';
1
2
  import { forwardRef } from 'react';
2
- import * as React from 'react';
3
3
 
4
4
  import type { BoxProps } from '../Box';
5
5
  import { Box } from '../Box';
6
6
 
7
- export type TextVariants =
7
+ /**
8
+ * @deprecated
9
+ */
10
+ export type LegacyTextVariants =
8
11
  | 'h1'
9
12
  | 'h2'
10
13
  | 'h3'
@@ -19,11 +22,28 @@ export type TextVariants =
19
22
  | 'overline'
20
23
  | 'button';
21
24
 
25
+ export type TextVariants =
26
+ | 'display-large'
27
+ | 'display-medium'
28
+ | 'display-small'
29
+ | 'headline-large'
30
+ | 'headline-medium'
31
+ | 'headline-small'
32
+ | 'title-large'
33
+ | 'title-medium'
34
+ | 'title-small'
35
+ | 'label-large'
36
+ | 'label-medium'
37
+ | 'label-small'
38
+ | 'body-large'
39
+ | 'body-medium'
40
+ | 'body-small';
41
+
22
42
  export interface TextProps extends BoxProps {
23
- variant?: TextVariants;
43
+ variant?: LegacyTextVariants | TextVariants;
24
44
  }
25
45
 
26
- const mappings: { [key: string]: React.ElementType<any> } = {
46
+ const mappings: { [key: string]: ElementType<any> } = {
27
47
  h1: 'h1',
28
48
  h2: 'h2',
29
49
  h3: 'h3',
@@ -43,7 +63,7 @@ export const Text = forwardRef<HTMLParagraphElement, TextProps>(function Text(
43
63
  props,
44
64
  forwardedRef
45
65
  ) {
46
- const { as, variant = 'body1', ...otherProps } = props;
66
+ const { as, variant = 'body-medium', ...otherProps } = props;
47
67
  let Comp = as;
48
68
  if (!Comp) {
49
69
  Comp = mappings[variant] || 'p';
@@ -1,5 +1,5 @@
1
+ import type { ReactNode } from 'react';
1
2
  import { forwardRef } from 'react';
2
- import * as React from 'react';
3
3
  import { get } from '@styled-system/css';
4
4
  import { rem } from 'polished';
5
5
 
@@ -78,10 +78,10 @@ const BorderBottom = () => (
78
78
  );
79
79
 
80
80
  export interface FilledContainerProps extends Omit<BoxProps, 'color'> {
81
- children?: React.ReactNode;
81
+ children?: ReactNode;
82
82
  color?: string;
83
83
  hasFocus?: boolean;
84
- label?: React.ReactNode;
84
+ label?: ReactNode;
85
85
  labelIsFloating: boolean;
86
86
  inputId: string;
87
87
  error?: boolean;
@@ -1,5 +1,5 @@
1
+ import type { ReactNode } from 'react';
1
2
  import { forwardRef } from 'react';
2
- import * as React from 'react';
3
3
 
4
4
  import { Box } from '../Box';
5
5
  import { Text } from '../Text';
@@ -7,9 +7,9 @@ import { alpha } from '../color';
7
7
  import type { TextProps } from '../Text/Text';
8
8
 
9
9
  export interface HelperTextProps extends TextProps {
10
- children?: React.ReactNode;
11
- leftSide?: React.ReactNode;
12
- rightSide?: React.ReactNode;
10
+ children?: ReactNode;
11
+ leftSide?: ReactNode;
12
+ rightSide?: ReactNode;
13
13
  error?: boolean;
14
14
  disabled?: boolean;
15
15
  }
@@ -46,7 +46,7 @@ export const HelperText = forwardRef<HTMLDivElement, HelperTextProps>(
46
46
  display="flex"
47
47
  pt={1}
48
48
  color={color}
49
- variant="caption"
49
+ variant="label-small"
50
50
  ref={forwardedRef}
51
51
  lineHeight="normal"
52
52
  __css={{
@@ -1,13 +1,12 @@
1
1
  import { rem } from 'polished';
2
- import type { FC } from 'react';
3
- import * as React from 'react';
2
+ import type { FC, ReactNode } from 'react';
4
3
 
5
4
  import { Box } from '../Box';
6
5
  import { alpha } from '../color';
7
6
  import { ICON_WIDTH, PADDING_LEFT_WITH_ICON } from './consts';
8
7
 
9
8
  export const IconContainer: FC<{
10
- children?: React.ReactNode;
9
+ children?: ReactNode;
11
10
  position: 'start' | 'end';
12
11
  }> = ({ position, children }) => (
13
12
  <Box
@@ -1,10 +1,11 @@
1
1
  import { rem } from 'polished';
2
- import type { InputHTMLAttributes } from 'react';
2
+ import type { InputHTMLAttributes, ReactNode } from 'react';
3
3
  import { forwardRef } from 'react';
4
4
 
5
5
  import type { BoxProps } from '../Box';
6
6
  import { Box } from '../Box';
7
7
  import { alpha } from '../color';
8
+ import { EASING_STANDARD } from '../motion';
8
9
  import {
9
10
  ICON_WIDTH,
10
11
  PADDING_LEFT_WITHOUT_ICON,
@@ -19,8 +20,8 @@ export interface InputProps
19
20
  multiline?: boolean;
20
21
  variant?: 'filled' | 'outlined';
21
22
  hasLabel?: boolean;
22
- leadingIcon?: React.ReactNode;
23
- trailingIcon?: React.ReactNode;
23
+ leadingIcon?: ReactNode;
24
+ trailingIcon?: ReactNode;
24
25
  }
25
26
 
26
27
  export const Input = forwardRef<HTMLDivElement, InputProps>(function Input(
@@ -72,7 +73,7 @@ export const Input = forwardRef<HTMLDivElement, InputProps>(function Input(
72
73
  variant === 'filled'
73
74
  ? alpha('on.surface-variant', 0.87)
74
75
  : alpha('on.surface-variant', 0.6),
75
- transition: `opacity .18s cubic-bezier(.4,0,.2,1)`,
76
+ transition: `opacity .18s ${EASING_STANDARD}`,
76
77
  },
77
78
  ':disabled::placeholder': {
78
79
  color: alpha('on.surface', 0.38),
@@ -1,3 +1,4 @@
1
+ import type { ReactNode } from 'react';
1
2
  import {
2
3
  forwardRef,
3
4
  useEffect,
@@ -5,7 +6,6 @@ import {
5
6
  useState,
6
7
  useRef,
7
8
  } from 'react';
8
- import * as React from 'react';
9
9
 
10
10
  import { NotchedOutline } from '../NotchedOutline';
11
11
  import type { BoxProps } from '../Box';
@@ -22,8 +22,8 @@ const useEnhancedEffect =
22
22
  typeof window !== 'undefined' ? useLayoutEffect : useEffect;
23
23
 
24
24
  export interface OutlinedContainerProps extends BoxProps {
25
- children?: React.ReactNode;
26
- label?: React.ReactNode;
25
+ children?: ReactNode;
26
+ label?: ReactNode;
27
27
  color?: string;
28
28
  error?: boolean;
29
29
  theme: Theme;
@@ -1,5 +1,5 @@
1
+ import type { ReactNode } from 'react';
1
2
  import { forwardRef, useState, useId } from 'react';
2
- import * as React from 'react';
3
3
  import { wrapEvent, useControlledState } from '@basic-ui/core';
4
4
 
5
5
  import type { InputProps } from './Input';
@@ -32,7 +32,7 @@ export type TextFieldProps = Omit<InputProps, 'value' | 'defaultValue'> & {
32
32
  variant?: 'outlined' | 'filled';
33
33
  containerProps?: Omit<BoxProps, 'color'>;
34
34
  color?: 'primary' | 'secondary';
35
- label?: React.ReactNode;
35
+ label?: ReactNode;
36
36
  helperText?: string;
37
37
  maxLength?: number;
38
38
  hideCharacterCounter?: boolean;
@@ -40,8 +40,8 @@ export type TextFieldProps = Omit<InputProps, 'value' | 'defaultValue'> & {
40
40
  value?: string;
41
41
  multiline?: boolean;
42
42
  error?: boolean | string;
43
- leadingIcon?: React.ReactNode;
44
- trailingIcon?: React.ReactNode;
43
+ leadingIcon?: ReactNode;
44
+ trailingIcon?: ReactNode;
45
45
  };
46
46
 
47
47
  export const TextField = forwardRef<HTMLInputElement, TextFieldProps>(
@@ -1,9 +1,9 @@
1
- import React, { useMemo, useDeferredValue, useEffect } from 'react';
1
+ import { useMemo, useDeferredValue, useEffect } from 'react';
2
2
  import {
3
3
  CorePalette,
4
4
  argbFromHex,
5
5
  hexFromArgb,
6
- } from '@material/material-color-utilities';
6
+ } from '@material/material-color-utilities'; // eslint-disable-line import/no-unresolved
7
7
  import type { Color } from '@basic-ui/color-picker';
8
8
  import { toColor } from '@basic-ui/color-picker';
9
9
 
@@ -68,6 +68,8 @@ const ThemeBuilder = () => {
68
68
  sx={{ gap: 3 }}
69
69
  flexDirection="column"
70
70
  width="300px"
71
+ position="fixed"
72
+ top="0"
71
73
  >
72
74
  <Box display="flex">
73
75
  <TextFieldColorPicker
@@ -131,31 +133,33 @@ const ThemeBuilder = () => {
131
133
  </Button>
132
134
  </Box>
133
135
  </Box>
134
- <Box width="600px" mx="auto">
135
- <Box display="flex" flexDirection="column" sx={{ gap: 4 }}>
136
- <Box flex="1">
137
- <Text variant="h5" as="h1" pb={'0.3em'}>
138
- Light theme
139
- </Text>
140
- <ThemeColors scheme={scheme} />
136
+ <Box width="100%" pl="300px">
137
+ <Box width="600px" mx="auto">
138
+ <Box display="flex" flexDirection="column" sx={{ gap: 4 }}>
139
+ <Box flex="1">
140
+ <Text variant="title-medium" as="h1" pb={'0.3em'}>
141
+ Light theme
142
+ </Text>
143
+ <ThemeColors scheme={scheme} />
144
+ </Box>
145
+ <Box flex="1">
146
+ <Text variant="title-medium" as="h1" pb={'0.3em'}>
147
+ Dark theme
148
+ </Text>
149
+ <ThemeColors scheme={scheme.modes.dark} />
150
+ </Box>
141
151
  </Box>
142
- <Box flex="1">
143
- <Text variant="h5" as="h1" pb={'0.3em'}>
144
- Dark theme
145
- </Text>
146
- <ThemeColors scheme={scheme.modes.dark} />
152
+ <Box my={4} display="flex" sx={{ gap: 3 }} flexDirection="column">
153
+ <TonalColors palette={a1} />
154
+ <TonalColors palette={secondaryColorTonal} />
155
+ <TonalColors palette={tertiaryColorTonal} />
156
+ <TonalColors palette={error} />
157
+ <TonalColors palette={neutralColorTonal} />
158
+ <TonalColors palette={n2} />
159
+ </Box>
160
+ <Box as="pre" fontFamily="monospace" fontSize="12px">
161
+ {JSON.stringify({ colors: scheme }, null, 2)}
147
162
  </Box>
148
- </Box>
149
- <Box my={4} display="flex" sx={{ gap: 3 }} flexDirection="column">
150
- <TonalColors palette={a1} />
151
- <TonalColors palette={secondaryColorTonal} />
152
- <TonalColors palette={tertiaryColorTonal} />
153
- <TonalColors palette={error} />
154
- <TonalColors palette={neutralColorTonal} />
155
- <TonalColors palette={n2} />
156
- </Box>
157
- <Box as="pre" fontFamily="monospace" fontSize="12px">
158
- {JSON.stringify({ colors: scheme }, null, 2)}
159
163
  </Box>
160
164
  </Box>
161
165
  </Box>
@@ -1,4 +1,4 @@
1
- import React, { memo } from 'react';
1
+ import { memo } from 'react';
2
2
 
3
3
  import { Box } from '..';
4
4
  import { ColorRow } from './components';
@@ -1,7 +1,7 @@
1
1
  import type { CSSProperties } from 'react';
2
- import React, { memo, useState } from 'react';
2
+ import { memo, useState } from 'react';
3
3
  import { rgb, parseToHsl, parseToRgb } from 'polished';
4
- import { hexFromArgb, TonalPalette } from '@material/material-color-utilities';
4
+ import { hexFromArgb, TonalPalette } from '@material/material-color-utilities'; // eslint-disable-line import/no-unresolved
5
5
 
6
6
  import { Box, Text, Tooltip } from '../';
7
7
 
@@ -53,7 +53,12 @@ export const ColorItem = memo(
53
53
  }
54
54
  }}
55
55
  >
56
- <Text variant="body2" as="span" fontSize="11px" lineHeight="11px">
56
+ <Text
57
+ variant="body-small"
58
+ as="span"
59
+ fontSize="11px"
60
+ lineHeight="11px"
61
+ >
57
62
  {token}
58
63
  </Text>
59
64
  </Box>
@@ -1,5 +1,5 @@
1
1
  import type { TonalPalette } from '@material/material-color-utilities';
2
- import { hexFromArgb } from '@material/material-color-utilities';
2
+ import { hexFromArgb } from '@material/material-color-utilities'; // eslint-disable-line import/no-unresolved
3
3
 
4
4
  export function makeColorScheme(opts: {
5
5
  primary: TonalPalette;
@@ -1,5 +1,5 @@
1
1
  import { useMemo, useDeferredValue } from 'react';
2
- import { TonalPalette, argbFromHex } from '@material/material-color-utilities';
2
+ import { TonalPalette, argbFromHex } from '@material/material-color-utilities'; // eslint-disable-line import/no-unresolved
3
3
  import type { Color } from '@basic-ui/color-picker';
4
4
 
5
5
  import { useLocalStorageCachedState } from './useLocalStorageCachedState';
@@ -1,4 +1,4 @@
1
- import React, { useEffect, useRef, useState } from 'react';
1
+ import { useEffect, useRef, useState } from 'react';
2
2
 
3
3
  import { Tooltip } from './';
4
4
  import { Button } from '../Button';
@@ -1,7 +1,7 @@
1
1
  import type { PopperProps } from '@basic-ui/core';
2
2
  import { Tooltip as _BaseTooltip, Popper } from '@basic-ui/core';
3
- import type { FC } from 'react';
4
- import React, { forwardRef } from 'react';
3
+ import type { ElementType, FC, ReactNode } from 'react';
4
+ import { forwardRef } from 'react';
5
5
 
6
6
  import type { BoxProps } from '../Box';
7
7
  import { Box } from '../Box';
@@ -10,15 +10,16 @@ import { alpha } from '../color';
10
10
  export interface TooltipProps
11
11
  extends BoxProps,
12
12
  Omit<PopperProps, 'color' | 'anchorEl'> {
13
- label: React.ReactNode;
13
+ label: ReactNode;
14
14
  disabled?: boolean;
15
15
  }
16
16
 
17
17
  const BaseTooltip: FC<
18
18
  BoxProps & {
19
- innerAs?: React.ElementType<any>;
19
+ innerAs?: ElementType<any>;
20
20
  } & Omit<PopperProps, 'color' | 'anchorEl'>
21
21
  > = _BaseTooltip as any;
22
+
22
23
  export const Tooltip = forwardRef<HTMLDivElement, TooltipProps>(
23
24
  function Tooltip(props, forwardedRef) {
24
25
  const { placement = 'bottom', __css, ...otherProps } = props;
@@ -31,15 +32,12 @@ export const Tooltip = forwardRef<HTMLDivElement, TooltipProps>(
31
32
  placement={placement}
32
33
  distance={8}
33
34
  __css={{
35
+ variant: ['text.body-medium', 'text.body-small'],
34
36
  bg: alpha('#616161', 0.9),
35
37
  color: '#fff',
36
- fontSize: [2, 2, 1],
37
- fontFamily: 'body',
38
- fontWeight: 'regular',
39
- lineHeight: [1.2, 1.2, 1.33],
40
- px: [3, 3, 2],
41
- py: [2, 2, 1],
42
- borderRadius: '4px',
38
+ px: 2,
39
+ py: 1,
40
+ borderRadius: 'extra-small',
43
41
  zIndex: 'tooltip',
44
42
  ...__css,
45
43
  }}
package/src/color.ts CHANGED
@@ -17,17 +17,38 @@ export const alpha =
17
17
  return `rgba(${rgb.red},${rgb.green},${rgb.blue},${alphaValue})`;
18
18
  };
19
19
 
20
+ export function mixColor(
21
+ baseColor: string,
22
+ overlayColor: string
23
+ ): (theme: any) => string;
24
+ export function mixColor(
25
+ baseColor: string,
26
+ overlayColor: string,
27
+ overlayOpacity: number
28
+ ): (theme: any) => string;
29
+ export function mixColor(
30
+ baseColor: string,
31
+ overlayColor: string,
32
+ overlayOpacity?: number
33
+ ): (theme: any) => string {
34
+ return (theme) => {
35
+ baseColor = get(theme, `colors.${baseColor}`, baseColor);
36
+ overlayColor = overlayOpacity
37
+ ? alpha(overlayColor, overlayOpacity)(theme)
38
+ : get(theme, `colors.${overlayColor}`, overlayColor);
39
+
40
+ return `linear-gradient(${overlayColor}, ${overlayColor}), ${baseColor}`;
41
+ };
42
+ }
43
+
20
44
  export function getColorOverlay(
21
45
  theme: Theme,
22
46
  baseColor: string,
23
47
  overlayColor: string,
24
48
  overlayOpacity: number
25
49
  ): SystemStyleObject {
26
- baseColor = get(theme, `colors.${baseColor}`) || baseColor;
27
- overlayColor = alpha(overlayColor, overlayOpacity)(theme);
28
-
29
50
  return {
30
- background: `linear-gradient(${overlayColor}, ${overlayColor}), ${baseColor}`,
51
+ background: mixColor(baseColor, overlayColor, overlayOpacity)(theme),
31
52
  };
32
53
  }
33
54
 
package/src/index.ts CHANGED
@@ -17,6 +17,7 @@ export * from './Link';
17
17
  export * from './List';
18
18
  export * from './ListItem';
19
19
  export * from './Menu';
20
+ export * from './NavRail';
20
21
  export * from './NotchedOutline';
21
22
  export * from './Paper';
22
23
  export * from './ProgressSpinner';
@@ -33,5 +34,6 @@ export * from './Table';
33
34
  export * from './Text';
34
35
  export * from './TextField';
35
36
  export * from './Tooltip';
37
+ export * from './motion';
36
38
  export * from './theme';
37
39
  export * from './color';
package/src/motion.ts ADDED
@@ -0,0 +1,7 @@
1
+ export const EASING_EMPHASIZED = 'cubic-bezier(0.2, 0, 0, 1)';
2
+ export const EASING_EMPHASIZED_ACCELERATE = 'cubic-bezier(0.3, 0, 0.8, 0.15)';
3
+ export const EASING_EMPHASIZED_DECELERATE = 'cubic-bezier(0.05, 0.7, 0.1, 1)';
4
+ export const EASING_LINEAR = 'cubic-bezier(0, 0, 1, 1)';
5
+ export const EASING_STANDARD = 'cubic-bezier(0.2, 0, 0, 1)';
6
+ export const EASING_STANDARD_ACCELERATE = 'cubic-bezier(0.3, 0, 1, 1)';
7
+ export const EASING_STANDARD_DECELERATE = 'cubic-bezier(0, 0, 0, 1)';
@@ -5,6 +5,24 @@
5
5
  // - https://material.io/design/typography/the-type-system.html#type-scale
6
6
  import { rem, em } from 'polished';
7
7
 
8
+ import { EASING_STANDARD } from '../motion';
9
+
10
+ function font(
11
+ fontFamily: 'plain' | 'brand',
12
+ lineHeight: number,
13
+ fontSize: number,
14
+ letterSpacing: number,
15
+ weight: number
16
+ ) {
17
+ return {
18
+ fontFamily,
19
+ lineHeight: rem(lineHeight),
20
+ fontSize: rem(fontSize),
21
+ letterSpacing: rem(letterSpacing),
22
+ fontWeight: weight,
23
+ };
24
+ }
25
+
8
26
  export const theme = {
9
27
  googleFonts:
10
28
  'https://fonts.googleapis.com/css?family=Roboto+Mono|Roboto:300,400,500,600,700&display=swap',
@@ -123,6 +141,8 @@ export const theme = {
123
141
  fonts: {
124
142
  body: 'Roboto, sans-serif',
125
143
  heading: 'Roboto, sans-serif',
144
+ brand: 'Roboto, sans-serif',
145
+ plain: 'Roboto, sans-serif',
126
146
  monospace: '"Roboto Mono", monospace',
127
147
  },
128
148
  fontSizes: {
@@ -172,6 +192,21 @@ export const theme = {
172
192
  fontFamily: 'body',
173
193
  lineHeight: 'body',
174
194
  },
195
+ 'display-large': font('brand', 64, 57, 0, 400),
196
+ 'display-medium': font('brand', 52, 45, 0, 400),
197
+ 'display-small': font('brand', 44, 36, 0, 400),
198
+ 'headline-large': font('brand', 40, 32, 0, 400),
199
+ 'headline-medium': font('brand', 36, 28, 0, 400),
200
+ 'headline-small': font('brand', 32, 24, 0, 400),
201
+ 'title-large': font('brand', 28, 22, 0, 400),
202
+ 'title-medium': font('plain', 24, 16, 0.15, 500),
203
+ 'title-small': font('plain', 20, 14, 0.1, 500),
204
+ 'label-large': font('plain', 20, 14, 0.1, 500),
205
+ 'label-medium': font('plain', 16, 12, 0.5, 500),
206
+ 'label-small': font('plain', 16, 11, 0.5, 500),
207
+ 'body-large': font('plain', 24, 16, 0.5, 400),
208
+ 'body-medium': font('plain', 20, 14, 0.25, 400),
209
+ 'body-small': font('plain', 16, 12, 0.4, 400),
175
210
  h1: {
176
211
  variant: 'text.heading',
177
212
  fontWeight: 'light',
@@ -297,7 +332,7 @@ export const theme = {
297
332
  buttons: {
298
333
  variants: {
299
334
  base: {
300
- variant: 'text.button',
335
+ variant: 'text.label-large',
301
336
  boxShadow: 'none',
302
337
  py: 0,
303
338
  px: rem(24),
@@ -362,30 +397,36 @@ export const theme = {
362
397
  elevations: {
363
398
  none: {},
364
399
  default: {
365
- transition: 'box-shadow .28s cubic-bezier(.4,0,.2,1)',
400
+ transition: `box-shadow .28s ${EASING_STANDARD}`,
366
401
  '&:hover': {
367
402
  boxShadow: 1,
368
403
  },
369
- '&:hover:disabled': {
404
+ '&:active,&:focus-visible,&:disabled': {
370
405
  boxShadow: 0,
371
406
  },
372
407
  },
373
408
  elevated: {
374
- transition: 'box-shadow .28s cubic-bezier(.4,0,.2,1)',
409
+ transition: `box-shadow .28s ${EASING_STANDARD}`,
375
410
  boxShadow: 1,
376
411
  '&:hover': {
377
412
  boxShadow: 2,
378
413
  },
414
+ '&:active,&:focus-visible': {
415
+ boxShadow: 1,
416
+ },
379
417
  '&:disabled,&:disabled:hover,&:disabled:focus,&:disabled:active': {
380
418
  boxShadow: 0,
381
419
  },
382
420
  },
383
421
  floating: {
384
- transition: 'box-shadow .28s cubic-bezier(.4,0,.2,1)',
422
+ transition: `box-shadow .28s ${EASING_STANDARD}`,
385
423
  boxShadow: 3,
386
424
  ':hover': {
387
425
  boxShadow: 4,
388
426
  },
427
+ '&:active,&:focus-visible': {
428
+ boxShadow: 3,
429
+ },
389
430
  '&:disabled,&:disabled:hover,&:disabled:focus,&:disabled:active': {
390
431
  boxShadow: 0,
391
432
  },
@@ -426,7 +467,7 @@ export const theme = {
426
467
  height: rem(32),
427
468
  borderRadius: 'small',
428
469
  outline: 'none',
429
- transition: 'box-shadow .28s cubic-bezier(.4,0,.2,1)',
470
+ transition: `box-shadow .28s ${EASING_STANDARD}`,
430
471
  },
431
472
  filled: {
432
473
  variant: 'chips.variants.base',