@basic-ui/material 0.1.16 → 1.0.0-alpha.2

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 (443) hide show
  1. package/build/cjs/index.js +586 -337
  2. package/build/cjs/index.js.map +1 -1
  3. package/build/esm/Alert/Alert.d.ts +2 -2
  4. package/build/esm/Alert/Alert.js +9 -9
  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 +25 -18
  8. package/build/esm/AppBar/AppBar.js.map +1 -1
  9. package/build/esm/AppBar/AppBarButton.d.ts +2 -2
  10. package/build/esm/AppBar/AppBarButton.js +8 -9
  11. package/build/esm/AppBar/AppBarButton.js.map +1 -1
  12. package/build/esm/AppBar/context.d.ts +1 -1
  13. package/build/esm/AppBar/context.js +6 -5
  14. package/build/esm/AppBar/context.js.map +1 -1
  15. package/build/esm/Badge/Badge.d.ts +2 -2
  16. package/build/esm/Badge/Badge.js +2 -2
  17. package/build/esm/Badge/Badge.js.map +1 -1
  18. package/build/esm/BaseLine/BaseLine.d.ts +0 -1
  19. package/build/esm/BaseLine/BaseLine.js +4 -4
  20. package/build/esm/BaseLine/BaseLine.js.map +1 -1
  21. package/build/esm/BottomSheet/BottomSheet.d.ts +2 -2
  22. package/build/esm/BottomSheet/BottomSheet.js +11 -13
  23. package/build/esm/BottomSheet/BottomSheet.js.map +1 -1
  24. package/build/esm/BottomSheet/BottomSheetSurface.d.ts +4 -4
  25. package/build/esm/BottomSheet/BottomSheetSurface.js +9 -9
  26. package/build/esm/BottomSheet/BottomSheetSurface.js.map +1 -1
  27. package/build/esm/Box/Box.d.ts +5 -5
  28. package/build/esm/Box/Box.js +27 -19
  29. package/build/esm/Box/Box.js.map +1 -1
  30. package/build/esm/Button/BaseButton.d.ts +4 -3
  31. package/build/esm/Button/BaseButton.js +11 -12
  32. package/build/esm/Button/BaseButton.js.map +1 -1
  33. package/build/esm/Button/Button.d.ts +5 -5
  34. package/build/esm/Button/Button.js +45 -24
  35. package/build/esm/Button/Button.js.map +1 -1
  36. package/build/esm/Button/ButtonGroup.d.ts +5 -0
  37. package/build/esm/Button/ButtonGroup.js +31 -0
  38. package/build/esm/Button/ButtonGroup.js.map +1 -0
  39. package/build/esm/Button/FilledButton.d.ts +3 -2
  40. package/build/esm/Button/FilledButton.js +62 -21
  41. package/build/esm/Button/FilledButton.js.map +1 -1
  42. package/build/esm/Button/FloatingActionButton.d.ts +1 -1
  43. package/build/esm/Button/FloatingActionButton.js.map +1 -1
  44. package/build/esm/Button/IconButton.d.ts +2 -1
  45. package/build/esm/Button/IconButton.js +2 -1
  46. package/build/esm/Button/IconButton.js.map +1 -1
  47. package/build/esm/Button/OutlinedButton.d.ts +1 -1
  48. package/build/esm/Button/OutlinedButton.js +36 -4
  49. package/build/esm/Button/OutlinedButton.js.map +1 -1
  50. package/build/esm/Button/TransparentButton.d.ts +3 -2
  51. package/build/esm/Button/TransparentButton.js +49 -15
  52. package/build/esm/Button/TransparentButton.js.map +1 -1
  53. package/build/esm/Button/context.d.ts +8 -0
  54. package/build/esm/Button/context.js +7 -0
  55. package/build/esm/Button/context.js.map +1 -0
  56. package/build/esm/Button/index.d.ts +1 -0
  57. package/build/esm/Button/index.js +1 -0
  58. package/build/esm/Button/index.js.map +1 -1
  59. package/build/esm/CheckBox/CheckBox.d.ts +3 -3
  60. package/build/esm/CheckBox/CheckBox.js +43 -36
  61. package/build/esm/CheckBox/CheckBox.js.map +1 -1
  62. package/build/esm/CheckBox/CheckBoxIcon.d.ts +3 -3
  63. package/build/esm/CheckBox/CheckBoxIcon.js +15 -13
  64. package/build/esm/CheckBox/CheckBoxIcon.js.map +1 -1
  65. package/build/esm/CheckBox/CheckPath.js +15 -14
  66. package/build/esm/CheckBox/CheckPath.js.map +1 -1
  67. package/build/esm/CheckBox/IndeterminatePath.js +14 -13
  68. package/build/esm/CheckBox/IndeterminatePath.js.map +1 -1
  69. package/build/esm/Chip/ButtonChip.d.ts +5 -5
  70. package/build/esm/Chip/ButtonChip.js +49 -65
  71. package/build/esm/Chip/ButtonChip.js.map +1 -1
  72. package/build/esm/Chip/ChipBase.d.ts +2 -2
  73. package/build/esm/Chip/ChipBase.js +42 -29
  74. package/build/esm/Chip/ChipBase.js.map +1 -1
  75. package/build/esm/Chip/ChoiceChip.d.ts +5 -4
  76. package/build/esm/Chip/ChoiceChip.js +38 -45
  77. package/build/esm/Chip/ChoiceChip.js.map +1 -1
  78. package/build/esm/ColorMode/ColorModeProvider.d.ts +1 -1
  79. package/build/esm/ColorMode/ColorModeProvider.js +32 -19
  80. package/build/esm/ColorMode/ColorModeProvider.js.map +1 -1
  81. package/build/esm/ColorMode/color-mode.js +3 -3
  82. package/build/esm/ColorMode/color-mode.js.map +1 -1
  83. package/build/esm/ColorMode/color-vars.js +20 -12
  84. package/build/esm/ColorMode/color-vars.js.map +1 -1
  85. package/build/esm/ColorMode/constants.js +3 -3
  86. package/build/esm/ColorMode/constants.js.map +1 -1
  87. package/build/esm/Combobox/Combobox.d.ts +15 -15
  88. package/build/esm/Combobox/Combobox.js +51 -57
  89. package/build/esm/Combobox/Combobox.js.map +1 -1
  90. package/build/esm/Dialog/Dialog.d.ts +5 -5
  91. package/build/esm/Dialog/Dialog.js +22 -23
  92. package/build/esm/Dialog/Dialog.js.map +1 -1
  93. package/build/esm/Dialog/DialogBackdrop.d.ts +4 -4
  94. package/build/esm/Dialog/DialogBackdrop.js +10 -11
  95. package/build/esm/Dialog/DialogBackdrop.js.map +1 -1
  96. package/build/esm/Dialog/DialogContainer.d.ts +1 -1
  97. package/build/esm/Dialog/DialogContainer.js +4 -6
  98. package/build/esm/Dialog/DialogContainer.js.map +1 -1
  99. package/build/esm/Dialog/DialogSurface.d.ts +7 -5
  100. package/build/esm/Dialog/DialogSurface.js +24 -12
  101. package/build/esm/Dialog/DialogSurface.js.map +1 -1
  102. package/build/esm/Dialog/Scrim.d.ts +1 -1
  103. package/build/esm/Dialog/Scrim.js +4 -6
  104. package/build/esm/Dialog/Scrim.js.map +1 -1
  105. package/build/esm/Dialog/useDialogAnimation.js +19 -20
  106. package/build/esm/Dialog/useDialogAnimation.js.map +1 -1
  107. package/build/esm/Divider/Divider.d.ts +3 -3
  108. package/build/esm/Divider/Divider.js +9 -8
  109. package/build/esm/Divider/Divider.js.map +1 -1
  110. package/build/esm/FloatingLabel/FloatingLabel.d.ts +1 -1
  111. package/build/esm/FloatingLabel/FloatingLabel.js +26 -22
  112. package/build/esm/FloatingLabel/FloatingLabel.js.map +1 -1
  113. package/build/esm/LineRipple/LineRipple.d.ts +3 -3
  114. package/build/esm/LineRipple/LineRipple.js +27 -18
  115. package/build/esm/LineRipple/LineRipple.js.map +1 -1
  116. package/build/esm/Link/Link.d.ts +3 -3
  117. package/build/esm/Link/Link.js +10 -9
  118. package/build/esm/Link/Link.js.map +1 -1
  119. package/build/esm/List/List.d.ts +3 -3
  120. package/build/esm/List/List.js +20 -13
  121. package/build/esm/List/List.js.map +1 -1
  122. package/build/esm/ListItem/ListItem.d.ts +3 -3
  123. package/build/esm/ListItem/ListItem.js +72 -50
  124. package/build/esm/ListItem/ListItem.js.map +1 -1
  125. package/build/esm/ListItem/ListItemText.d.ts +1 -1
  126. package/build/esm/ListItem/ListItemText.js +10 -15
  127. package/build/esm/ListItem/ListItemText.js.map +1 -1
  128. package/build/esm/Menu/Menu.d.ts +10 -10
  129. package/build/esm/Menu/Menu.js +23 -27
  130. package/build/esm/Menu/Menu.js.map +1 -1
  131. package/build/esm/Menu/animation.d.ts +1 -1
  132. package/build/esm/Menu/animation.js +1 -1
  133. package/build/esm/Menu/animation.js.map +1 -1
  134. package/build/esm/NotchedOutline/NotchedOutline.d.ts +1 -1
  135. package/build/esm/NotchedOutline/NotchedOutline.js +25 -21
  136. package/build/esm/NotchedOutline/NotchedOutline.js.map +1 -1
  137. package/build/esm/NotchedOutline/context.js +6 -5
  138. package/build/esm/NotchedOutline/context.js.map +1 -1
  139. package/build/esm/NotchedOutline/styledComponents.d.ts +96 -50
  140. package/build/esm/NotchedOutline/styledComponents.js +58 -63
  141. package/build/esm/NotchedOutline/styledComponents.js.map +1 -1
  142. package/build/esm/Paper/Paper.d.ts +4 -3
  143. package/build/esm/Paper/Paper.js +15 -13
  144. package/build/esm/Paper/Paper.js.map +1 -1
  145. package/build/esm/ProgressSpinner/ProgressSpinner.d.ts +1 -1
  146. package/build/esm/ProgressSpinner/ProgressSpinner.js +16 -16
  147. package/build/esm/ProgressSpinner/ProgressSpinner.js.map +1 -1
  148. package/build/esm/RadioButton/RadioButton.d.ts +1 -1
  149. package/build/esm/RadioButton/RadioButton.js +17 -20
  150. package/build/esm/RadioButton/RadioButton.js.map +1 -1
  151. package/build/esm/RadioButton/RadioButtonIcon.d.ts +1 -1
  152. package/build/esm/RadioButton/RadioButtonIcon.js +7 -8
  153. package/build/esm/RadioButton/RadioButtonIcon.js.map +1 -1
  154. package/build/esm/RadioButton/RadioGroup.d.ts +3 -3
  155. package/build/esm/RadioButton/RadioGroup.js +5 -4
  156. package/build/esm/RadioButton/RadioGroup.js.map +1 -1
  157. package/build/esm/Ripple/Ripple.d.ts +1 -1
  158. package/build/esm/Ripple/Ripple.js +21 -20
  159. package/build/esm/Ripple/Ripple.js.map +1 -1
  160. package/build/esm/Ripple/RippleBox.d.ts +4 -4
  161. package/build/esm/Ripple/RippleBox.js +22 -15
  162. package/build/esm/Ripple/RippleBox.js.map +1 -1
  163. package/build/esm/Ripple/constants.js +7 -7
  164. package/build/esm/Ripple/constants.js.map +1 -1
  165. package/build/esm/Ripple/keyframes.d.ts +1 -1
  166. package/build/esm/Ripple/keyframes.js +3 -3
  167. package/build/esm/Ripple/keyframes.js.map +1 -1
  168. package/build/esm/Ripple/useRipple.js +55 -48
  169. package/build/esm/Ripple/useRipple.js.map +1 -1
  170. package/build/esm/Ripple/useRippleHandlers.d.ts +1 -1
  171. package/build/esm/Ripple/useRippleHandlers.js +13 -15
  172. package/build/esm/Ripple/useRippleHandlers.js.map +1 -1
  173. package/build/esm/Ripple/useRippleSurface.d.ts +6 -5
  174. package/build/esm/Ripple/useRippleSurface.js +60 -37
  175. package/build/esm/Ripple/useRippleSurface.js.map +1 -1
  176. package/build/esm/Select/Select.d.ts +4 -4
  177. package/build/esm/Select/Select.js +69 -47
  178. package/build/esm/Select/Select.js.map +1 -1
  179. package/build/esm/Select/SelectIcon.d.ts +3 -3
  180. package/build/esm/Select/SelectIcon.js +6 -7
  181. package/build/esm/Select/SelectIcon.js.map +1 -1
  182. package/build/esm/Select/context.js +7 -6
  183. package/build/esm/Select/context.js.map +1 -1
  184. package/build/esm/Select/defaultRender.js +12 -10
  185. package/build/esm/Select/defaultRender.js.map +1 -1
  186. package/build/esm/Select/styledComponents.d.ts +2 -2
  187. package/build/esm/Select/styledComponents.js +16 -19
  188. package/build/esm/Select/styledComponents.js.map +1 -1
  189. package/build/esm/SelectItem/SelectItem.d.ts +2 -2
  190. package/build/esm/SelectItem/SelectItem.js +18 -19
  191. package/build/esm/SelectItem/SelectItem.js.map +1 -1
  192. package/build/esm/SelectionControl/SelectionControlLabel.d.ts +3 -3
  193. package/build/esm/SelectionControl/SelectionControlLabel.js +7 -7
  194. package/build/esm/SelectionControl/SelectionControlLabel.js.map +1 -1
  195. package/build/esm/SelectionControl/SelectionControlText.d.ts +3 -3
  196. package/build/esm/SelectionControl/SelectionControlText.js +8 -8
  197. package/build/esm/SelectionControl/SelectionControlText.js.map +1 -1
  198. package/build/esm/Skeleton/DelayAppearance.d.ts +4 -4
  199. package/build/esm/Skeleton/DelayAppearance.js +9 -9
  200. package/build/esm/Skeleton/DelayAppearance.js.map +1 -1
  201. package/build/esm/Skeleton/Skeleton.d.ts +3 -3
  202. package/build/esm/Skeleton/Skeleton.js +11 -10
  203. package/build/esm/Skeleton/Skeleton.js.map +1 -1
  204. package/build/esm/Skeleton/animation.d.ts +2 -2
  205. package/build/esm/Skeleton/animation.js +25 -22
  206. package/build/esm/Skeleton/animation.js.map +1 -1
  207. package/build/esm/Snackbar/Snackbar.d.ts +3 -3
  208. package/build/esm/Snackbar/Snackbar.js +24 -24
  209. package/build/esm/Snackbar/Snackbar.js.map +1 -1
  210. package/build/esm/Snackbar/Stack.d.ts +2 -3
  211. package/build/esm/Snackbar/Stack.js +78 -65
  212. package/build/esm/Snackbar/Stack.js.map +1 -1
  213. package/build/esm/Snackbar/useSnackbarAnimation.d.ts +1 -1
  214. package/build/esm/Snackbar/useSnackbarAnimation.js +113 -78
  215. package/build/esm/Snackbar/useSnackbarAnimation.js.map +1 -1
  216. package/build/esm/Switch/Switch.d.ts +3 -3
  217. package/build/esm/Switch/Switch.js +29 -28
  218. package/build/esm/Switch/Switch.js.map +1 -1
  219. package/build/esm/Switch/styledComponents.d.ts +2 -2
  220. package/build/esm/Switch/styledComponents.js +66 -40
  221. package/build/esm/Switch/styledComponents.js.map +1 -1
  222. package/build/esm/Tab/Tab.d.ts +4 -4
  223. package/build/esm/Tab/Tab.js +17 -19
  224. package/build/esm/Tab/Tab.js.map +1 -1
  225. package/build/esm/Tab/TabList.d.ts +3 -3
  226. package/build/esm/Tab/TabList.js +18 -19
  227. package/build/esm/Tab/TabList.js.map +1 -1
  228. package/build/esm/Tab/TabPanel.d.ts +3 -3
  229. package/build/esm/Tab/TabPanel.js +8 -11
  230. package/build/esm/Tab/TabPanel.js.map +1 -1
  231. package/build/esm/Tab/context.js +6 -5
  232. package/build/esm/Tab/context.js.map +1 -1
  233. package/build/esm/TabIndicator/TabIndicator.d.ts +2 -2
  234. package/build/esm/TabIndicator/TabIndicator.js +22 -21
  235. package/build/esm/TabIndicator/TabIndicator.js.map +1 -1
  236. package/build/esm/TabIndicator/context.js +6 -5
  237. package/build/esm/TabIndicator/context.js.map +1 -1
  238. package/build/esm/Table/Table.d.ts +2 -2
  239. package/build/esm/Table/Table.js +8 -8
  240. package/build/esm/Table/Table.js.map +1 -1
  241. package/build/esm/Table/TableBody.d.ts +1 -1
  242. package/build/esm/Table/TableBody.js +4 -6
  243. package/build/esm/Table/TableBody.js.map +1 -1
  244. package/build/esm/Table/TableCell.d.ts +1 -1
  245. package/build/esm/Table/TableCell.js +6 -8
  246. package/build/esm/Table/TableCell.js.map +1 -1
  247. package/build/esm/Table/TableHead.d.ts +1 -1
  248. package/build/esm/Table/TableHead.js +5 -7
  249. package/build/esm/Table/TableHead.js.map +1 -1
  250. package/build/esm/Table/TableRow.d.ts +2 -2
  251. package/build/esm/Table/TableRow.js +5 -7
  252. package/build/esm/Table/TableRow.js.map +1 -1
  253. package/build/esm/Table/context.js +6 -5
  254. package/build/esm/Table/context.js.map +1 -1
  255. package/build/esm/Text/LoremIpsum.d.ts +1 -1
  256. package/build/esm/Text/LoremIpsum.js +6 -6
  257. package/build/esm/Text/LoremIpsum.js.map +1 -1
  258. package/build/esm/Text/Text.d.ts +3 -3
  259. package/build/esm/Text/Text.js +9 -9
  260. package/build/esm/Text/Text.js.map +1 -1
  261. package/build/esm/TextField/FilledContainer.d.ts +3 -3
  262. package/build/esm/TextField/FilledContainer.js +61 -57
  263. package/build/esm/TextField/FilledContainer.js.map +1 -1
  264. package/build/esm/TextField/HelperText.d.ts +3 -3
  265. package/build/esm/TextField/HelperText.js +14 -13
  266. package/build/esm/TextField/HelperText.js.map +1 -1
  267. package/build/esm/TextField/IconContainer.d.ts +2 -2
  268. package/build/esm/TextField/IconContainer.js +15 -23
  269. package/build/esm/TextField/IconContainer.js.map +1 -1
  270. package/build/esm/TextField/Input.d.ts +3 -3
  271. package/build/esm/TextField/Input.js +14 -14
  272. package/build/esm/TextField/Input.js.map +1 -1
  273. package/build/esm/TextField/OutlinedContainer.d.ts +4 -4
  274. package/build/esm/TextField/OutlinedContainer.js +28 -22
  275. package/build/esm/TextField/OutlinedContainer.js.map +1 -1
  276. package/build/esm/TextField/TextField.d.ts +4 -4
  277. package/build/esm/TextField/TextField.js +59 -41
  278. package/build/esm/TextField/TextField.js.map +1 -1
  279. package/build/esm/TextField/consts.js +5 -5
  280. package/build/esm/TextField/consts.js.map +1 -1
  281. package/build/esm/ThemeExplorer/ColorPicker.d.ts +4 -4
  282. package/build/esm/ThemeExplorer/ColorPicker.js +16 -16
  283. package/build/esm/ThemeExplorer/ColorPicker.js.map +1 -1
  284. package/build/esm/ThemeExplorer/TextFieldColorPicker.d.ts +2 -2
  285. package/build/esm/ThemeExplorer/TextFieldColorPicker.js +49 -29
  286. package/build/esm/ThemeExplorer/TextFieldColorPicker.js.map +1 -1
  287. package/build/esm/ThemeExplorer/ThemeColors.d.ts +1 -1
  288. package/build/esm/ThemeExplorer/ThemeColors.js +3 -3
  289. package/build/esm/ThemeExplorer/ThemeColors.js.map +1 -1
  290. package/build/esm/ThemeExplorer/components.d.ts +2 -1
  291. package/build/esm/ThemeExplorer/components.js +64 -56
  292. package/build/esm/ThemeExplorer/components.js.map +1 -1
  293. package/build/esm/ThemeExplorer/makeColorScheme.d.ts +1 -1
  294. package/build/esm/ThemeExplorer/makeColorScheme.js.map +1 -1
  295. package/build/esm/ThemeExplorer/useDeferredColor.d.ts +1 -1
  296. package/build/esm/ThemeExplorer/useDeferredColor.js +10 -3
  297. package/build/esm/ThemeExplorer/useDeferredColor.js.map +1 -1
  298. package/build/esm/ThemeExplorer/useLocalStorageCachedState.js +9 -2
  299. package/build/esm/ThemeExplorer/useLocalStorageCachedState.js.map +1 -1
  300. package/build/esm/Tooltip/Tooltip.d.ts +3 -3
  301. package/build/esm/Tooltip/Tooltip.js +7 -8
  302. package/build/esm/Tooltip/Tooltip.js.map +1 -1
  303. package/build/esm/color.d.ts +5 -4
  304. package/build/esm/color.js +26 -16
  305. package/build/esm/color.js.map +1 -1
  306. package/build/esm/hooks/useAnimation.d.ts +1 -1
  307. package/build/esm/hooks/useAnimation.js +54 -41
  308. package/build/esm/hooks/useAnimation.js.map +1 -1
  309. package/build/esm/theme/theme.d.ts +96 -50
  310. package/build/esm/theme/theme.js +134 -94
  311. package/build/esm/theme/theme.js.map +1 -1
  312. package/build/esm/theme/typography-raleway.js +1 -1
  313. package/build/esm/theme/typography-raleway.js.map +1 -1
  314. package/build/esm/theme/typography-roboto.js +1 -1
  315. package/build/esm/theme/typography-roboto.js.map +1 -1
  316. package/build/esm/theme/useTheme.d.ts +1 -1
  317. package/build/esm/theme/useTheme.js +1 -1
  318. package/build/esm/theme/useTheme.js.map +1 -1
  319. package/build/tsconfig.tsbuildinfo +1 -1
  320. package/package.json +6 -4
  321. package/src/Alert/Alert.tsx +4 -2
  322. package/src/AppBar/AppBar.story.tsx +7 -6
  323. package/src/AppBar/AppBar.tsx +10 -9
  324. package/src/AppBar/AppBarButton.tsx +3 -1
  325. package/src/AppBar/context.ts +2 -1
  326. package/src/Badge/Badge.tsx +3 -1
  327. package/src/BaseLine/BaseLine.tsx +15 -11
  328. package/src/BottomSheet/BottomSheet.story.tsx +1 -0
  329. package/src/BottomSheet/BottomSheet.tsx +2 -1
  330. package/src/BottomSheet/BottomSheetSurface.tsx +9 -5
  331. package/src/Box/Box.tsx +21 -18
  332. package/src/Button/BaseButton.tsx +5 -2
  333. package/src/Button/Button.story.tsx +35 -35
  334. package/src/Button/Button.tsx +23 -8
  335. package/src/Button/ButtonGroup.story.tsx +106 -0
  336. package/src/Button/ButtonGroup.tsx +35 -0
  337. package/src/Button/FilledButton.tsx +41 -6
  338. package/src/Button/FloatingActionButton.tsx +9 -0
  339. package/src/Button/IconButton.tsx +2 -1
  340. package/src/Button/OutlinedButton.tsx +33 -4
  341. package/src/Button/SpinnerButton.story.tsx +10 -11
  342. package/src/Button/TransparentButton.tsx +35 -4
  343. package/src/Button/context.tsx +17 -0
  344. package/src/Button/index.ts +1 -0
  345. package/src/CheckBox/CheckBox.story.tsx +3 -2
  346. package/src/CheckBox/CheckBox.tsx +10 -6
  347. package/src/CheckBox/CheckBoxIcon.tsx +4 -2
  348. package/src/Chip/ButtonChip.tsx +47 -51
  349. package/src/Chip/Chip.story.tsx +48 -27
  350. package/src/Chip/ChipBase.tsx +44 -14
  351. package/src/Chip/ChoiceChip.tsx +28 -24
  352. package/src/ColorMode/ColorModeProvider.tsx +4 -2
  353. package/src/Combobox/Combobox.story.tsx +2 -1
  354. package/src/Combobox/Combobox.tsx +30 -18
  355. package/src/Dialog/Dialog.story.tsx +3 -1
  356. package/src/Dialog/Dialog.tsx +9 -4
  357. package/src/Dialog/DialogBackdrop.tsx +6 -6
  358. package/src/Dialog/DialogContainer.tsx +3 -1
  359. package/src/Dialog/DialogSurface.tsx +26 -9
  360. package/src/Dialog/Scrim.tsx +3 -1
  361. package/src/Divider/Divider.tsx +4 -2
  362. package/src/FloatingLabel/FloatingLabel.story.tsx +1 -0
  363. package/src/FloatingLabel/FloatingLabel.tsx +3 -2
  364. package/src/LineRipple/LineRipple.story.tsx +1 -0
  365. package/src/LineRipple/LineRipple.tsx +6 -3
  366. package/src/Link/Link.tsx +4 -2
  367. package/src/List/List.tsx +5 -2
  368. package/src/ListItem/ListItem.story.tsx +1 -0
  369. package/src/ListItem/ListItem.tsx +59 -34
  370. package/src/ListItem/ListItemText.tsx +4 -5
  371. package/src/Menu/Menu.tsx +21 -14
  372. package/src/Menu/animation.ts +1 -1
  373. package/src/NotchedOutline/NotchedOutline.story.tsx +3 -2
  374. package/src/NotchedOutline/NotchedOutline.tsx +2 -1
  375. package/src/NotchedOutline/styledComponents.ts +8 -7
  376. package/src/Paper/Paper.story.tsx +17 -3
  377. package/src/Paper/Paper.tsx +22 -5
  378. package/src/ProgressSpinner/ProgressSpinner.story.tsx +1 -0
  379. package/src/ProgressSpinner/ProgressSpinner.tsx +5 -2
  380. package/src/RadioButton/RadioButton.story.tsx +2 -1
  381. package/src/RadioButton/RadioButton.tsx +10 -8
  382. package/src/RadioButton/RadioButtonIcon.tsx +4 -3
  383. package/src/RadioButton/RadioGroup.tsx +5 -5
  384. package/src/Ripple/Ripple.story.tsx +9 -3
  385. package/src/Ripple/Ripple.tsx +3 -2
  386. package/src/Ripple/RippleBox.tsx +9 -4
  387. package/src/Ripple/keyframes.ts +2 -1
  388. package/src/Ripple/useRipple.ts +1 -0
  389. package/src/Ripple/useRippleHandlers.ts +3 -1
  390. package/src/Ripple/useRippleSurface.ts +39 -13
  391. package/src/Select/PaymentMethodSelect.story.tsx +3 -1
  392. package/src/Select/Select.story.tsx +1 -0
  393. package/src/Select/Select.tsx +6 -4
  394. package/src/Select/SelectIcon.tsx +6 -3
  395. package/src/Select/defaultRender.ts +13 -13
  396. package/src/Select/styledComponents.tsx +5 -3
  397. package/src/SelectItem/SelectItem.tsx +4 -2
  398. package/src/SelectionControl/SelectionControlLabel.tsx +6 -3
  399. package/src/SelectionControl/SelectionControlText.tsx +4 -2
  400. package/src/Skeleton/DelayAppearance.tsx +5 -3
  401. package/src/Skeleton/Skeleton.story.tsx +2 -2
  402. package/src/Skeleton/Skeleton.tsx +4 -2
  403. package/src/Skeleton/animation.ts +3 -2
  404. package/src/Snackbar/Snackbar.story.tsx +1 -0
  405. package/src/Snackbar/Snackbar.tsx +8 -6
  406. package/src/Snackbar/Stack.tsx +3 -3
  407. package/src/Snackbar/useSnackbarAnimation.ts +3 -1
  408. package/src/Switch/Switch.tsx +16 -11
  409. package/src/Switch/styledComponents.tsx +72 -22
  410. package/src/Tab/Tab.tsx +8 -4
  411. package/src/Tab/TabList.tsx +5 -5
  412. package/src/Tab/TabPanel.tsx +5 -5
  413. package/src/TabIndicator/TabIndicator.tsx +6 -3
  414. package/src/Table/Table.tsx +5 -2
  415. package/src/Table/TableBody.tsx +3 -1
  416. package/src/Table/TableCell.tsx +3 -1
  417. package/src/Table/TableHead.tsx +4 -2
  418. package/src/Table/TableRow.tsx +4 -2
  419. package/src/Text/LoremIpsum.tsx +2 -1
  420. package/src/Text/Text.tsx +4 -2
  421. package/src/TextField/FilledContainer.tsx +13 -8
  422. package/src/TextField/HelperText.tsx +3 -2
  423. package/src/TextField/IconContainer.tsx +3 -2
  424. package/src/TextField/Input.tsx +9 -4
  425. package/src/TextField/OutlinedContainer.tsx +5 -3
  426. package/src/TextField/TextField.story.tsx +1 -0
  427. package/src/TextField/TextField.tsx +6 -3
  428. package/src/ThemeExplorer/ColorPicker.tsx +104 -0
  429. package/src/ThemeExplorer/TextFieldColorPicker.tsx +115 -0
  430. package/src/ThemeExplorer/ThemeBuilder.story.tsx +165 -0
  431. package/src/ThemeExplorer/ThemeColors.tsx +89 -0
  432. package/src/ThemeExplorer/ThemeExplorer.story.tsx +43 -0
  433. package/src/ThemeExplorer/components.tsx +195 -0
  434. package/src/ThemeExplorer/makeColorScheme.tsx +74 -0
  435. package/src/ThemeExplorer/useDeferredColor.tsx +25 -0
  436. package/src/ThemeExplorer/useLocalStorageCachedState.ts +18 -0
  437. package/src/Tooltip/Tooltip.story.tsx +1 -0
  438. package/src/Tooltip/Tooltip.tsx +8 -4
  439. package/src/color.ts +36 -29
  440. package/src/hooks/useAnimation.ts +2 -1
  441. package/src/theme/theme.ts +131 -92
  442. package/src/theme/useTheme.ts +3 -1
  443. package/src/ListItem/context.ts +0 -13
@@ -1,11 +1,18 @@
1
1
  import { forwardRef } from 'react';
2
- import type * as React from 'react';
2
+ import * as React from 'react';
3
3
  import { variant } from 'styled-system';
4
- import { Box, BoxProps } from '../Box';
5
- import { useTheme } from '../theme';
6
- import { alpha } from '../color';
7
4
  import { rem } from 'polished';
8
5
 
6
+ import type { BoxProps } from '../Box';
7
+ import { Box } from '../Box';
8
+ import type { Theme } from '../theme';
9
+ import { useTheme } from '../theme';
10
+ import {
11
+ alpha,
12
+ getDarkThemeBackgroundOverlay,
13
+ getColorOverlay,
14
+ } from '../color';
15
+
9
16
  export type ChipBaseProps<
10
17
  H = HTMLDivElement,
11
18
  Attr = React.HTMLAttributes<H>
@@ -17,15 +24,24 @@ export type ChipBaseProps<
17
24
  disabled?: boolean;
18
25
  };
19
26
 
20
- function getFilledCSS(bg: string, color: string) {
27
+ function getFilledCSS(
28
+ theme: Theme,
29
+ bg: string,
30
+ color: string,
31
+ disabled: boolean
32
+ ) {
21
33
  return {
22
- bg,
23
- color: alpha(color, 0.87),
34
+ ...(!disabled && bg !== 'surface'
35
+ ? { bg }
36
+ : {
37
+ ...getColorOverlay(theme, 'surface', 'primary', 0.05),
38
+ }),
39
+ color,
24
40
  '&::before': {
25
41
  backgroundColor: 'currentColor',
26
42
  position: 'absolute',
27
43
  content: '""',
28
- opacity: 0.12,
44
+ opacity: 0,
29
45
  pointerEvents: 'none',
30
46
  top: 0,
31
47
  right: 0,
@@ -38,13 +54,19 @@ function getFilledCSS(bg: string, color: string) {
38
54
  '& > *': {
39
55
  zIndex: 1,
40
56
  },
57
+ ...(disabled && { boxShadow: 0, bg: alpha('on.surface', 0.32) }),
41
58
  };
42
59
  }
43
60
 
44
- function getOutlinedCSS(bg: string, color: string, borderOpacity: number) {
61
+ function getOutlinedCSS(
62
+ theme: Theme,
63
+ bg: string,
64
+ color: string,
65
+ borderOpacity: number
66
+ ) {
45
67
  return {
46
- bg,
47
- color: alpha(color, 0.87),
68
+ ...(bg !== 'surface' ? { bg } : getDarkThemeBackgroundOverlay(theme, 2)),
69
+ color: color,
48
70
  borderColor: alpha(color, borderOpacity),
49
71
  borderStyle: 'solid',
50
72
  borderWidth: rem(1),
@@ -71,6 +93,7 @@ export const ChipBase = forwardRef<HTMLDivElement, ChipBaseProps>(function Chip(
71
93
  return (
72
94
  <Box
73
95
  as={as}
96
+ data-disabled={disabled ? '' : undefined}
74
97
  ref={forwardedRef}
75
98
  __css={{
76
99
  boxSizing: 'border-box',
@@ -84,9 +107,11 @@ export const ChipBase = forwardRef<HTMLDivElement, ChipBaseProps>(function Chip(
84
107
  fontSize: 'inherit',
85
108
  border: 0,
86
109
  overflow: 'hidden',
110
+ whiteSpace: 'nowrap',
87
111
  cursor: 'default',
88
112
  WebkitTapHighlightColor: 'transparent',
89
113
  willChange: 'transform,opacity',
114
+ minWidth: 'auto',
90
115
  '&::-moz-focus-inner': {
91
116
  border: 0,
92
117
  },
@@ -98,9 +123,14 @@ export const ChipBase = forwardRef<HTMLDivElement, ChipBaseProps>(function Chip(
98
123
  },
99
124
  })({ variant: variantProp, theme }),
100
125
  ...(variantProp === 'filled'
101
- ? getFilledCSS(backgroundColorProp, colorProp)
102
- : getOutlinedCSS(backgroundColorProp, colorProp, borderOpacityProp)),
103
- opacity: disabled ? 0.37 : 1,
126
+ ? getFilledCSS(theme, backgroundColorProp, colorProp, disabled)
127
+ : getOutlinedCSS(
128
+ theme,
129
+ backgroundColorProp,
130
+ colorProp,
131
+ borderOpacityProp
132
+ )),
133
+ opacity: disabled ? 0.38 : 1,
104
134
  ...__css,
105
135
  }}
106
136
  {...otherProps}
@@ -1,11 +1,14 @@
1
1
  import { forwardRef } from 'react';
2
- import type * as React from 'react';
2
+ import * as React from 'react';
3
3
  import { RadioButton, CheckBox } from '@basic-ui/core';
4
- import { ChipBaseProps, ChipBase } from './ChipBase';
5
- import { RippleBox, RippleBoxProps } from '../Ripple';
4
+ import { rem } from 'polished';
5
+
6
+ import type { ChipBaseProps } from './ChipBase';
7
+ import { ChipBase } from './ChipBase';
8
+ import type { RippleBoxProps } from '../Ripple';
9
+ import { RippleBox } from '../Ripple';
6
10
  import { useTheme } from '../theme';
7
11
  import { Box } from '../Box';
8
- import { rem } from 'polished';
9
12
 
10
13
  export type ChoiceChipProps = ChipBaseProps<
11
14
  HTMLInputElement,
@@ -14,7 +17,8 @@ export type ChoiceChipProps = ChipBaseProps<
14
17
  checked?: boolean;
15
18
  disabled?: boolean;
16
19
  type: 'checkbox' | 'radio';
17
- leftIcon?: React.ReactNode;
20
+ leadingIcon?: React.ReactNode;
21
+ trailingIcon?: React.ReactNode;
18
22
  };
19
23
 
20
24
  const InnerInput: React.FC<any> = forwardRef<HTMLInputElement, ChoiceChipProps>(
@@ -30,21 +34,23 @@ const InnerInput: React.FC<any> = forwardRef<HTMLInputElement, ChoiceChipProps>(
30
34
  defaultValue,
31
35
  disabled,
32
36
  onChange,
33
- leftIcon,
37
+ leadingIcon,
38
+ trailingIcon,
34
39
  children,
40
+ __css,
35
41
  ...otherProps
36
42
  } = props;
37
43
 
38
44
  const theme = useTheme();
39
- const sumOpacity = checked ? 0.12 : 0;
40
45
 
41
46
  return (
42
47
  <ChipBase
43
48
  as="label"
44
49
  disabled={disabled}
45
- backgroundColor={'surface'}
46
- color={checked ? color : 'on.surface'}
47
- borderOpacity={checked ? 0.6 : 0.24}
50
+ backgroundColor={checked ? color + '-container' : 'surface'}
51
+ color={checked ? 'on.' + color + '-container' : 'on.surface'}
52
+ borderOpacity={checked ? 0 : 0.24}
53
+ __css={__css}
48
54
  {...otherProps}
49
55
  >
50
56
  <Box
@@ -56,6 +62,8 @@ const InnerInput: React.FC<any> = forwardRef<HTMLInputElement, ChoiceChipProps>(
56
62
  display: 'inline-flex',
57
63
  alignItems: 'center',
58
64
  justifyContent: 'center',
65
+ pl: leadingIcon ? rem(8) : rem(12),
66
+ pr: trailingIcon ? rem(8) : rem(12),
59
67
  }}
60
68
  >
61
69
  <RippleBox<
@@ -75,13 +83,13 @@ const InnerInput: React.FC<any> = forwardRef<HTMLInputElement, ChoiceChipProps>(
75
83
  theme={theme}
76
84
  disabled={disabled}
77
85
  rippleColor={color}
78
- baseOpacity={0 + sumOpacity}
79
- hoverOpacity={0.12 + sumOpacity}
80
- focusOpacity={0.24 + sumOpacity}
86
+ baseOpacity={0}
87
+ hoverOpacity={0.12}
88
+ focusOpacity={0.24}
81
89
  name={name}
82
90
  ref={forwardedRef}
83
91
  __css={{
84
- backgroundColor: 'rgba(0,0,0,0)',
92
+ bg: 'transparent',
85
93
  top: 0,
86
94
  left: 0,
87
95
  width: '100%',
@@ -93,15 +101,11 @@ const InnerInput: React.FC<any> = forwardRef<HTMLInputElement, ChoiceChipProps>(
93
101
  border: 'none',
94
102
  borderRadius: 0,
95
103
  position: 'absolute',
96
- color: 'inherit',
97
104
  }}
98
105
  />
99
- <Box as="span" pl={rem(4)} pr={rem(8)}>
100
- {leftIcon}
101
- </Box>
102
- <Box as="span" pr={rem(12)}>
103
- {children}
104
- </Box>
106
+ {leadingIcon}
107
+ {children}
108
+ {trailingIcon}
105
109
  </Box>
106
110
  </ChipBase>
107
111
  );
@@ -112,9 +116,9 @@ export const ChoiceChip = forwardRef<HTMLInputElement, ChoiceChipProps>(
112
116
  function ChoiceChip(props, forwardedRef) {
113
117
  const { type = 'checkbox', ...otherProps } = props;
114
118
 
115
- const Comp: React.FC<ChoiceChipProps> = (type === 'radio'
116
- ? RadioButton
117
- : CheckBox) as any;
119
+ const Comp: React.FC<ChoiceChipProps> = (
120
+ type === 'radio' ? RadioButton : CheckBox
121
+ ) as any;
118
122
 
119
123
  return (
120
124
  <Comp ref={forwardedRef} as={InnerInput} type={type} {...otherProps} />
@@ -1,7 +1,9 @@
1
1
  import { useState, useEffect, useMemo, useCallback } from 'react';
2
- import type * as React from 'react';
2
+ import * as React from 'react';
3
3
  import { Global } from '@emotion/react';
4
- import { ColorMode, ColorModeContext } from './color-mode';
4
+
5
+ import type { ColorMode } from './color-mode';
6
+ import { ColorModeContext } from './color-mode';
5
7
  import {
6
8
  DARK_THEME_CLASS,
7
9
  DEFAULT_THEME_CLASS,
@@ -1,5 +1,6 @@
1
1
  import { useMemo, useState } from 'react';
2
- import type * as React from 'react';
2
+ import * as React from 'react';
3
+
3
4
  import {
4
5
  Combobox,
5
6
  ComboboxOption,
@@ -1,31 +1,41 @@
1
- import { FC, forwardRef } from 'react';
2
- import type * as React from 'react';
1
+ import type { FC } from 'react';
2
+ import { forwardRef } from 'react';
3
+ import * as React from 'react';
4
+ import type {
5
+ ComboboxProps as ComboboxPropsCore,
6
+ ComboboxInputProps as ComboboxInputPropsCore,
7
+ ComboboxLabelProps as ComboboxLabelPropsCore,
8
+ ComboboxListProps as ComboboxListPropsCore,
9
+ ComboboxOptionProps as ComboboxOptionPropsCore,
10
+ ComboboxPopoverProps as ComboboxPopoverPropsCore,
11
+ ComboboxButtonProps as ComboboxButtonPropsCore,
12
+ PopperProps as PopperCoreProps,
13
+ } from '@basic-ui/core';
3
14
  import {
4
15
  Combobox as _ComboboxCore,
5
- ComboboxProps as ComboboxPropsCore,
6
16
  ComboboxInput as _ComboboxInputCore,
7
- ComboboxInputProps as ComboboxInputPropsCore,
8
17
  ComboboxLabel as _ComboboxLabelCore,
9
- ComboboxLabelProps as ComboboxLabelPropsCore,
10
18
  ComboboxList as _ComboboxListCore,
11
- ComboboxListProps as ComboboxListPropsCore,
12
19
  ComboboxOption as _ComboboxOptionCore,
13
- ComboboxOptionProps as ComboboxOptionPropsCore,
14
20
  ComboboxPopover as _ComboboxPopoverCore,
15
- ComboboxPopoverProps as ComboboxPopoverPropsCore,
16
21
  ComboboxButton as _ComboboxButtonCore,
17
- ComboboxButtonProps as ComboboxButtonPropsCore,
18
22
  Popper as _PopperCore,
19
- PopperProps as PopperCoreProps,
20
23
  useComboBoxContext,
21
24
  } from '@basic-ui/core';
22
- import { Box, BoxProps } from '../Box';
23
- import { TextField, TextFieldProps } from '../TextField';
24
- import { List, ListProps } from '../List';
25
- import { ListItem, ListItemProps } from '../ListItem';
26
- import { Text, TextProps } from '../Text';
27
- import { Button, ButtonProps } from '../Button';
28
25
  import { rem } from 'polished';
26
+
27
+ import type { BoxProps } from '../Box';
28
+ import { Box } from '../Box';
29
+ import type { TextFieldProps } from '../TextField';
30
+ import { TextField } from '../TextField';
31
+ import type { ListProps } from '../List';
32
+ import { List } from '../List';
33
+ import type { ListItemProps } from '../ListItem';
34
+ import { ListItem } from '../ListItem';
35
+ import type { TextProps } from '../Text';
36
+ import { Text } from '../Text';
37
+ import type { ButtonProps } from '../Button';
38
+ import { Button } from '../Button';
29
39
  import { alpha } from '../color';
30
40
 
31
41
  export { useComboBoxContext } from '@basic-ui/core';
@@ -98,7 +108,8 @@ export const ComboboxList = forwardRef<HTMLUListElement, ComboboxListProps>(
98
108
  ref={forwardedRef}
99
109
  innerAs={as}
100
110
  outlined={false}
101
- elevation={8}
111
+ elevation={2}
112
+ darkThemeBackgroundOverlay={2}
102
113
  __css={{
103
114
  maxHeight: rem(300),
104
115
  overflowY: 'auto',
@@ -145,7 +156,8 @@ const ComboboxPopperBox = forwardRef<HTMLDivElement, PopperProps>(
145
156
 
146
157
  export type ComboboxPopoverProps = ComboboxPopoverPropsCore & ListProps;
147
158
 
148
- const ComboboxPopoverCore: FC<ComboboxPopoverProps> = _ComboboxPopoverCore as any;
159
+ const ComboboxPopoverCore: FC<ComboboxPopoverProps> =
160
+ _ComboboxPopoverCore as any;
149
161
 
150
162
  export const ComboboxPopover = forwardRef<HTMLDivElement, ComboboxPopoverProps>(
151
163
  (props, forwardedRef) => {
@@ -1,5 +1,7 @@
1
1
  import { useState } from 'react';
2
- import { Dialog, DialogAnimationModes } from './';
2
+
3
+ import type { DialogAnimationModes } from './';
4
+ import { Dialog } from './';
3
5
  import { Button } from '../Button';
4
6
  import { LoremIpsum } from '../Text/LoremIpsum';
5
7
  import { Box } from '../Box';
@@ -1,10 +1,15 @@
1
1
  import { forwardRef } from 'react';
2
2
  import { Portal } from '@basic-ui/core';
3
- import { Scrim, ScrimProps } from './Scrim';
4
- import { DialogContainer, DialogContainerProps } from './DialogContainer';
5
- import { DialogSurface, DialogSurfaceProps } from './DialogSurface';
3
+
4
+ import type { ScrimProps } from './Scrim';
5
+ import { Scrim } from './Scrim';
6
+ import type { DialogContainerProps } from './DialogContainer';
7
+ import { DialogContainer } from './DialogContainer';
8
+ import type { DialogSurfaceProps } from './DialogSurface';
9
+ import { DialogSurface } from './DialogSurface';
6
10
  import { useDialogAnimation } from './useDialogAnimation';
7
- import { DialogBackdrop, DialogBackdropProps } from './DialogBackdrop';
11
+ import type { DialogBackdropProps } from './DialogBackdrop';
12
+ import { DialogBackdrop } from './DialogBackdrop';
8
13
  import type { DialogAnimationModes } from './useDialogAnimation';
9
14
  export type { DialogAnimationModes } from './useDialogAnimation';
10
15
 
@@ -1,10 +1,10 @@
1
1
  import { forwardRef } from 'react';
2
- import type * as React from 'react';
3
- import {
4
- ModalBackdrop as _ModalBackdrop,
5
- ModalBackdropProps,
6
- } from '@basic-ui/core';
7
- import { Box, BoxProps } from '../Box';
2
+ import * as React from 'react';
3
+ import type { ModalBackdropProps } from '@basic-ui/core';
4
+ import { ModalBackdrop as _ModalBackdrop } from '@basic-ui/core';
5
+
6
+ import type { BoxProps } from '../Box';
7
+ import { Box } from '../Box';
8
8
 
9
9
  const ModalBackdrop = _ModalBackdrop as React.FC<
10
10
  DialogBackdropProps & { ref?: React.Ref<HTMLDivElement> }
@@ -1,5 +1,7 @@
1
1
  import { forwardRef } from 'react';
2
- import { Box, BoxProps } from '../Box';
2
+
3
+ import type { BoxProps } from '../Box';
4
+ import { Box } from '../Box';
3
5
 
4
6
  export type DialogContainerProps = BoxProps;
5
7
 
@@ -1,36 +1,53 @@
1
1
  import { forwardRef } from 'react';
2
- import type * as React from 'react';
3
- import { Modal as _Modal, ModalProps } from '@basic-ui/core';
4
- import { Paper, PaperProps } from '../Paper';
5
- import { useTheme } from '../theme';
2
+ import * as React from 'react';
3
+ import type { ModalProps } from '@basic-ui/core';
4
+ import { Modal as _Modal } from '@basic-ui/core';
6
5
  import { rem } from 'polished';
6
+ import { get, variant } from 'styled-system';
7
+
8
+ import type { PaperProps } from '../Paper';
9
+ import { Paper } from '../Paper';
10
+ import { useTheme } from '../theme';
7
11
 
8
12
  const Modal = _Modal as React.FC<
9
13
  DialogSurfaceProps & { ref?: React.Ref<HTMLDivElement> }
10
14
  >;
11
15
 
12
- export type DialogSurfaceProps = ModalProps & PaperProps;
16
+ export type DialogSurfaceProps = ModalProps &
17
+ PaperProps & {
18
+ variant?: 'base';
19
+ };
13
20
 
14
21
  export const DialogSurface = forwardRef<HTMLDivElement, DialogSurfaceProps>(
15
22
  function DialogSurface(props, forwardedRef) {
16
- const { __css, ...otherProps } = props;
23
+ const { __css, variant: variantProp = 'base', ...otherProps } = props;
17
24
  const theme = useTheme();
18
25
 
26
+ const overlayValue =
27
+ (get(theme, 'dialogs.backgroundColorOverlay') as number) || 0;
28
+
19
29
  return (
20
30
  <Modal
21
31
  ref={forwardedRef}
22
32
  as={Paper}
23
33
  theme={theme}
24
- elevation={24}
34
+ elevation={3}
35
+ darkThemeBackgroundOverlay={overlayValue}
25
36
  __css={{
26
37
  position: 'relative',
27
- bg: 'surface',
28
- borderRadius: rem(8),
38
+ borderRadius: 'small',
29
39
  width: '100%',
30
40
  maxWidth: rem(600),
31
41
  maxHeight: '100%',
32
42
  overflow: 'auto',
33
43
  pointerEvents: 'auto',
44
+ ...variant({
45
+ scale: 'dialogs.variants',
46
+ prop: 'variant',
47
+ variants: {
48
+ base: {},
49
+ },
50
+ })({ variant: variantProp, theme }),
34
51
  ...__css,
35
52
  }}
36
53
  {...otherProps}
@@ -1,5 +1,7 @@
1
1
  import { forwardRef } from 'react';
2
- import { Box, BoxProps } from '../Box';
2
+
3
+ import type { BoxProps } from '../Box';
4
+ import { Box } from '../Box';
3
5
  import { alpha } from '../color';
4
6
 
5
7
  export type ScrimProps = BoxProps;
@@ -1,7 +1,9 @@
1
1
  import { forwardRef } from 'react';
2
- import type * as React from 'react';
3
- import { Box, BoxProps } from '../Box';
2
+ import * as React from 'react';
4
3
  import { rem } from 'polished';
4
+
5
+ import type { BoxProps } from '../Box';
6
+ import { Box } from '../Box';
5
7
  import { alpha } from '../color';
6
8
 
7
9
  export interface DividerProps extends BoxProps {
@@ -1,4 +1,5 @@
1
1
  import { useRef, useState } from 'react';
2
+
2
3
  import { FloatingLabel as FloatingLabelComponent } from './FloatingLabel';
3
4
  import { Box } from '../Box';
4
5
  import { Button } from '../Button';
@@ -1,7 +1,8 @@
1
1
  import { forwardRef } from 'react';
2
- import type * as React from 'react';
3
- import { Text as _Text } from '../Text';
2
+ import * as React from 'react';
4
3
  import { rem } from 'polished';
4
+
5
+ import { Text as _Text } from '../Text';
5
6
  import { useNotchedOutlineContext } from '../NotchedOutline/context';
6
7
 
7
8
  export interface FloatingLabelProps
@@ -1,4 +1,5 @@
1
1
  import { useRef, useState } from 'react';
2
+
2
3
  import { LineRipple } from './';
3
4
  import { Box } from '../Box';
4
5
  import { Text } from '../Text';
@@ -1,8 +1,11 @@
1
- import { forwardRef, useState, useRef, useEffect, CSSProperties } from 'react';
2
- import type * as React from 'react';
1
+ import type { CSSProperties } from 'react';
2
+ import { forwardRef, useState, useRef, useEffect } from 'react';
3
+ import * as React from 'react';
3
4
  import { rem } from 'polished';
5
+
4
6
  import { useTheme } from '../theme';
5
- import { Box, BoxProps } from '../Box';
7
+ import type { BoxProps } from '../Box';
8
+ import { Box } from '../Box';
6
9
 
7
10
  export interface LineRippleProps extends BoxProps {
8
11
  active?: boolean;
package/src/Link/Link.tsx CHANGED
@@ -1,7 +1,9 @@
1
1
  import { forwardRef } from 'react';
2
- import type * as React from 'react';
3
- import { Box, BoxProps } from '../Box';
2
+ import * as React from 'react';
4
3
  import { rem } from 'polished';
4
+
5
+ import type { BoxProps } from '../Box';
6
+ import { Box } from '../Box';
5
7
  import { alpha } from '../color';
6
8
 
7
9
  export interface LinkProps
package/src/List/List.tsx CHANGED
@@ -1,6 +1,8 @@
1
1
  import { forwardRef } from 'react';
2
- import type * as React from 'react';
3
- import { Paper, PaperProps } from '../Paper';
2
+ import * as React from 'react';
3
+
4
+ import type { PaperProps } from '../Paper';
5
+ import { Paper } from '../Paper';
4
6
 
5
7
  export interface ListProps extends PaperProps {
6
8
  as?: React.ElementType<any>;
@@ -31,6 +33,7 @@ export const List = forwardRef<HTMLDivElement, ListProps>(function List(
31
33
  py={py}
32
34
  px={px}
33
35
  elevation={elevation}
36
+ darkThemeBackgroundOverlay={elevation}
34
37
  variant={variant}
35
38
  outlined={outlined}
36
39
  __css={{
@@ -1,4 +1,5 @@
1
1
  import { useState } from 'react';
2
+
2
3
  import { ListItem, ListItemText } from './';
3
4
  import { List } from '../List';
4
5
  // import './styles.css';
@@ -1,11 +1,11 @@
1
1
  import { forwardRef } from 'react';
2
- import type * as React from 'react';
3
- import { BoxProps } from '../Box';
2
+ import * as React from 'react';
4
3
  import { rem } from 'polished';
5
- import { RippleBox } from '../Ripple';
6
- import { useTheme } from '../theme';
7
- import { ListItemProvider } from './context';
8
4
  import { get } from '@styled-system/css';
5
+
6
+ import type { BoxProps } from '../Box';
7
+ import { Box } from '../Box';
8
+ import { useTheme } from '../theme';
9
9
  import { alpha } from '../color';
10
10
 
11
11
  export interface ListItemProps extends BoxProps {
@@ -33,41 +33,66 @@ export const ListItem = forwardRef<HTMLDivElement, ListItemProps>(
33
33
  ...otherProps
34
34
  } = props;
35
35
  const selected = ariaSelectedProp || selectedProp;
36
- const color = colorProp ? colorProp : selected ? 'primary' : 'on.surface';
36
+ const color = rippleColor || colorProp || 'primary';
37
37
  const theme = useTheme();
38
38
 
39
+ const baseOpacity = 0.12;
40
+ const hoverOpacity = 0.16;
41
+ const focusOpacity = 0.24;
42
+
39
43
  return (
40
- <ListItemProvider value={{ color, disabled }}>
41
- <RippleBox
42
- ref={forwardedRef}
43
- as={innerAs || as}
44
- theme={theme}
45
- display="flex"
46
- data-disabled={disabled ? '' : undefined}
47
- rippleColor={rippleColor || color}
48
- baseOpacity={selected ? 0.12 : 0}
49
- hoverOpacity={selected ? 0.16 : 0.04}
50
- focusOpacity={selected ? 0.24 : 0.12}
51
- aria-selected={selected ? 'true' : undefined}
52
- disabled={disabled}
53
- {...otherProps}
54
- __css={{
55
- px: 3,
56
- py: rem(12),
57
- backgroundColor: 'transparent',
58
- color: disabled ? alpha(color, 0.6) : alpha(color, 0.87),
44
+ <Box
45
+ ref={forwardedRef}
46
+ as={innerAs || as}
47
+ theme={theme}
48
+ display="flex"
49
+ data-disabled={disabled ? '' : undefined}
50
+ aria-selected={selected ? 'true' : undefined}
51
+ disabled={disabled}
52
+ {...otherProps}
53
+ __css={{
54
+ px: 3,
55
+ py: rem(12),
56
+ transition: 'background-color 75ms linear',
57
+ backgroundColor: 'transparent',
58
+ color: alpha('on.surface', 0.87),
59
+ cursor: 'pointer',
60
+ ':hover': {
61
+ backgroundColor: alpha('on.surface', hoverOpacity),
62
+ },
63
+ ':focus': {
64
+ outline: 'none',
65
+ backgroundColor: alpha('on.surface', focusOpacity),
66
+ },
67
+ ':active': {
68
+ backgroundColor: alpha('on.surface', baseOpacity + 0.12),
69
+ },
70
+ '&[aria-selected="true"]': {
71
+ backgroundColor: alpha(color, baseOpacity + 0.12),
72
+ ':hover': {
73
+ backgroundColor: alpha(color, hoverOpacity + 0.12),
74
+ },
59
75
  ':focus': {
60
76
  outline: 'none',
77
+ backgroundColor: alpha(color, focusOpacity + 0.12),
61
78
  },
62
- textDecoration: 'none',
63
- WebkitTapHighlightColor: 'transparent',
64
- ...get(theme, 'text.subtitle1'),
65
- ...__css,
66
- }}
67
- >
68
- {children}
69
- </RippleBox>
70
- </ListItemProvider>
79
+ ':active': {
80
+ backgroundColor: alpha(color, baseOpacity + 0.24),
81
+ },
82
+ },
83
+ '&[data-disabled]': {
84
+ color: alpha('on.surface', 0.6),
85
+ backgroundColor: 'transparent',
86
+ cursor: 'default',
87
+ },
88
+ textDecoration: 'none',
89
+ WebkitTapHighlightColor: 'transparent',
90
+ ...get(theme, 'text.subtitle1'),
91
+ ...__css,
92
+ }}
93
+ >
94
+ {children}
95
+ </Box>
71
96
  );
72
97
  }
73
98
  );