@basic-ui/material 1.0.0-alpha.51 → 1.0.0-alpha.54

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 (673) hide show
  1. package/README.md +3 -3
  2. package/build/cjs/index.js +520 -447
  3. package/build/cjs/index.js.map +1 -1
  4. package/build/esm/Alert/Alert.d.ts +5 -6
  5. package/build/esm/Alert/Alert.js +14 -16
  6. package/build/esm/Alert/Alert.js.map +1 -1
  7. package/build/esm/Alert/index.d.ts +1 -1
  8. package/build/esm/Alert/index.js.map +1 -1
  9. package/build/esm/AppBar/AppBar.d.ts +9 -9
  10. package/build/esm/AppBar/AppBar.js +25 -34
  11. package/build/esm/AppBar/AppBar.js.map +1 -1
  12. package/build/esm/AppBar/AppBarButton.d.ts +3 -4
  13. package/build/esm/AppBar/AppBarButton.js +12 -14
  14. package/build/esm/AppBar/AppBarButton.js.map +1 -1
  15. package/build/esm/AppBar/context.d.ts +4 -5
  16. package/build/esm/AppBar/context.js +8 -6
  17. package/build/esm/AppBar/context.js.map +1 -1
  18. package/build/esm/AppBar/index.d.ts +3 -3
  19. package/build/esm/AppBar/index.js.map +1 -1
  20. package/build/esm/Badge/Badge.d.ts +5 -6
  21. package/build/esm/Badge/Badge.js +25 -26
  22. package/build/esm/Badge/Badge.js.map +1 -1
  23. package/build/esm/Badge/index.d.ts +1 -1
  24. package/build/esm/Badge/index.js.map +1 -1
  25. package/build/esm/BaseLine/BaseLine.d.ts +1 -1
  26. package/build/esm/BaseLine/BaseLine.js +4 -6
  27. package/build/esm/BaseLine/BaseLine.js.map +1 -1
  28. package/build/esm/BaseLine/index.d.ts +1 -1
  29. package/build/esm/BaseLine/index.js.map +1 -1
  30. package/build/esm/BottomSheet/BottomSheet.d.ts +6 -7
  31. package/build/esm/BottomSheet/BottomSheet.js +17 -21
  32. package/build/esm/BottomSheet/BottomSheet.js.map +1 -1
  33. package/build/esm/BottomSheet/BottomSheetSurface.d.ts +4 -5
  34. package/build/esm/BottomSheet/BottomSheetSurface.js +14 -14
  35. package/build/esm/BottomSheet/BottomSheetSurface.js.map +1 -1
  36. package/build/esm/BottomSheet/index.d.ts +1 -1
  37. package/build/esm/BottomSheet/index.js.map +1 -1
  38. package/build/esm/Box/Box.d.ts +23 -23
  39. package/build/esm/Box/Box.js +26 -26
  40. package/build/esm/Box/Box.js.map +1 -1
  41. package/build/esm/Box/index.d.ts +1 -1
  42. package/build/esm/Box/index.js.map +1 -1
  43. package/build/esm/Button/BaseButton.d.ts +14 -7
  44. package/build/esm/Button/BaseButton.js +107 -36
  45. package/build/esm/Button/BaseButton.js.map +1 -1
  46. package/build/esm/Button/Button.d.ts +14 -13
  47. package/build/esm/Button/Button.js +66 -48
  48. package/build/esm/Button/Button.js.map +1 -1
  49. package/build/esm/Button/ButtonGroup.d.ts +4 -5
  50. package/build/esm/Button/ButtonGroup.js +119 -21
  51. package/build/esm/Button/ButtonGroup.js.map +1 -1
  52. package/build/esm/Button/FilledButton.d.ts +10 -11
  53. package/build/esm/Button/FilledButton.js +18 -60
  54. package/build/esm/Button/FilledButton.js.map +1 -1
  55. package/build/esm/Button/FloatingActionButton.d.ts +9 -7
  56. package/build/esm/Button/FloatingActionButton.js +5 -4
  57. package/build/esm/Button/FloatingActionButton.js.map +1 -1
  58. package/build/esm/Button/IconButton.d.ts +8 -8
  59. package/build/esm/Button/IconButton.js +3 -3
  60. package/build/esm/Button/IconButton.js.map +1 -1
  61. package/build/esm/Button/IconFilledButton.d.ts +2 -0
  62. package/build/esm/Button/IconFilledButton.js +3 -0
  63. package/build/esm/Button/IconFilledButton.js.map +1 -0
  64. package/build/esm/Button/IconOutlinedButton.d.ts +2 -0
  65. package/build/esm/Button/IconOutlinedButton.js +3 -0
  66. package/build/esm/Button/IconOutlinedButton.js.map +1 -0
  67. package/build/esm/Button/OutlinedButton.d.ts +3 -4
  68. package/build/esm/Button/OutlinedButton.js +3 -43
  69. package/build/esm/Button/OutlinedButton.js.map +1 -1
  70. package/build/esm/Button/SplitButton.d.ts +9 -0
  71. package/build/esm/Button/SplitButton.js +32 -0
  72. package/build/esm/Button/SplitButton.js.map +1 -0
  73. package/build/esm/Button/TransparentButton.d.ts +10 -11
  74. package/build/esm/Button/TransparentButton.js +11 -54
  75. package/build/esm/Button/TransparentButton.js.map +1 -1
  76. package/build/esm/Button/context.d.ts +9 -8
  77. package/build/esm/Button/context.js +5 -4
  78. package/build/esm/Button/context.js.map +1 -1
  79. package/build/esm/Button/index.d.ts +3 -2
  80. package/build/esm/Button/index.js +1 -0
  81. package/build/esm/Button/index.js.map +1 -1
  82. package/build/esm/CheckBox/CheckBox.d.ts +13 -13
  83. package/build/esm/CheckBox/CheckBox.js +45 -61
  84. package/build/esm/CheckBox/CheckBox.js.map +1 -1
  85. package/build/esm/CheckBox/CheckBoxIcon.d.ts +10 -10
  86. package/build/esm/CheckBox/CheckBoxIcon.js +19 -24
  87. package/build/esm/CheckBox/CheckBoxIcon.js.map +1 -1
  88. package/build/esm/CheckBox/CheckPath.d.ts +3 -3
  89. package/build/esm/CheckBox/CheckPath.js +15 -16
  90. package/build/esm/CheckBox/CheckPath.js.map +1 -1
  91. package/build/esm/CheckBox/IndeterminatePath.d.ts +3 -3
  92. package/build/esm/CheckBox/IndeterminatePath.js +14 -16
  93. package/build/esm/CheckBox/IndeterminatePath.js.map +1 -1
  94. package/build/esm/CheckBox/index.d.ts +1 -1
  95. package/build/esm/CheckBox/index.js.map +1 -1
  96. package/build/esm/Chip/ButtonChip.d.ts +9 -9
  97. package/build/esm/Chip/ButtonChip.js +20 -24
  98. package/build/esm/Chip/ButtonChip.js.map +1 -1
  99. package/build/esm/Chip/Chip.d.ts +4 -4
  100. package/build/esm/Chip/Chip.js.map +1 -1
  101. package/build/esm/Chip/ChipBase.d.ts +10 -10
  102. package/build/esm/Chip/ChipBase.js +50 -54
  103. package/build/esm/Chip/ChipBase.js.map +1 -1
  104. package/build/esm/Chip/ChoiceChip.d.ts +10 -10
  105. package/build/esm/Chip/ChoiceChip.js +34 -38
  106. package/build/esm/Chip/ChoiceChip.js.map +1 -1
  107. package/build/esm/Chip/index.d.ts +2 -2
  108. package/build/esm/Chip/index.js.map +1 -1
  109. package/build/esm/Combobox/Combobox.d.ts +23 -23
  110. package/build/esm/Combobox/Combobox.js +126 -107
  111. package/build/esm/Combobox/Combobox.js.map +1 -1
  112. package/build/esm/Combobox/index.d.ts +1 -1
  113. package/build/esm/Combobox/index.js.map +1 -1
  114. package/build/esm/Dialog/Dialog.d.ts +19 -20
  115. package/build/esm/Dialog/Dialog.js +38 -42
  116. package/build/esm/Dialog/Dialog.js.map +1 -1
  117. package/build/esm/Dialog/DialogBackdrop.d.ts +6 -7
  118. package/build/esm/Dialog/DialogBackdrop.js +18 -17
  119. package/build/esm/Dialog/DialogBackdrop.js.map +1 -1
  120. package/build/esm/Dialog/DialogContainer.d.ts +3 -4
  121. package/build/esm/Dialog/DialogContainer.js +12 -12
  122. package/build/esm/Dialog/DialogContainer.js.map +1 -1
  123. package/build/esm/Dialog/DialogSurface.d.ts +6 -7
  124. package/build/esm/Dialog/DialogSurface.js +26 -26
  125. package/build/esm/Dialog/DialogSurface.js.map +1 -1
  126. package/build/esm/Dialog/Scrim.d.ts +3 -4
  127. package/build/esm/Dialog/Scrim.js +12 -12
  128. package/build/esm/Dialog/Scrim.js.map +1 -1
  129. package/build/esm/Dialog/index.d.ts +2 -2
  130. package/build/esm/Dialog/index.js.map +1 -1
  131. package/build/esm/Dialog/useDialogAnimation.d.ts +57 -824
  132. package/build/esm/Dialog/useDialogAnimation.js +23 -24
  133. package/build/esm/Dialog/useDialogAnimation.js.map +1 -1
  134. package/build/esm/Divider/Divider.d.ts +7 -7
  135. package/build/esm/Divider/Divider.js +27 -28
  136. package/build/esm/Divider/Divider.js.map +1 -1
  137. package/build/esm/Divider/index.d.ts +1 -1
  138. package/build/esm/Divider/index.js.map +1 -1
  139. package/build/esm/FloatingLabel/FloatingLabel.d.ts +13 -13
  140. package/build/esm/FloatingLabel/FloatingLabel.js +27 -33
  141. package/build/esm/FloatingLabel/FloatingLabel.js.map +1 -1
  142. package/build/esm/FloatingLabel/index.d.ts +1 -1
  143. package/build/esm/FloatingLabel/index.js.map +1 -1
  144. package/build/esm/LineRipple/LineRipple.d.ts +9 -9
  145. package/build/esm/LineRipple/LineRipple.js +30 -38
  146. package/build/esm/LineRipple/LineRipple.js.map +1 -1
  147. package/build/esm/LineRipple/index.d.ts +1 -1
  148. package/build/esm/LineRipple/index.js.map +1 -1
  149. package/build/esm/Link/Link.d.ts +9 -9
  150. package/build/esm/Link/Link.js +15 -17
  151. package/build/esm/Link/Link.js.map +1 -1
  152. package/build/esm/Link/index.d.ts +1 -1
  153. package/build/esm/Link/index.js.map +1 -1
  154. package/build/esm/List/List.d.ts +8 -8
  155. package/build/esm/List/List.js +19 -26
  156. package/build/esm/List/List.js.map +1 -1
  157. package/build/esm/List/index.d.ts +1 -1
  158. package/build/esm/List/index.js.map +1 -1
  159. package/build/esm/ListItem/ListItem.d.ts +14 -14
  160. package/build/esm/ListItem/ListItem.js +28 -31
  161. package/build/esm/ListItem/ListItem.js.map +1 -1
  162. package/build/esm/ListItem/ListItemText.d.ts +7 -7
  163. package/build/esm/ListItem/ListItemText.js +12 -16
  164. package/build/esm/ListItem/ListItemText.js.map +1 -1
  165. package/build/esm/ListItem/index.d.ts +2 -2
  166. package/build/esm/ListItem/index.js.map +1 -1
  167. package/build/esm/Menu/Menu.d.ts +18 -18
  168. package/build/esm/Menu/Menu.js +70 -60
  169. package/build/esm/Menu/Menu.js.map +1 -1
  170. package/build/esm/Menu/animation.d.ts +2 -2
  171. package/build/esm/Menu/animation.js +3 -3
  172. package/build/esm/Menu/animation.js.map +1 -1
  173. package/build/esm/Menu/index.d.ts +2 -2
  174. package/build/esm/Menu/index.js.map +1 -1
  175. package/build/esm/NavRail/NavRailItem.d.ts +15 -15
  176. package/build/esm/NavRail/NavRailItem.js +82 -86
  177. package/build/esm/NavRail/NavRailItem.js.map +1 -1
  178. package/build/esm/NavRail/icons/test-icons.d.ts +4 -4
  179. package/build/esm/NavRail/icons/test-icons.js +33 -40
  180. package/build/esm/NavRail/icons/test-icons.js.map +1 -1
  181. package/build/esm/NavRail/index.d.ts +1 -1
  182. package/build/esm/NavRail/index.js.map +1 -1
  183. package/build/esm/NotchedOutline/NotchedOutline.d.ts +14 -14
  184. package/build/esm/NotchedOutline/NotchedOutline.js +26 -34
  185. package/build/esm/NotchedOutline/NotchedOutline.js.map +1 -1
  186. package/build/esm/NotchedOutline/context.d.ts +5 -6
  187. package/build/esm/NotchedOutline/context.js +8 -7
  188. package/build/esm/NotchedOutline/context.js.map +1 -1
  189. package/build/esm/NotchedOutline/index.d.ts +1 -1
  190. package/build/esm/NotchedOutline/index.js.map +1 -1
  191. package/build/esm/NotchedOutline/styledComponents.d.ts +15 -575
  192. package/build/esm/NotchedOutline/styledComponents.js +65 -64
  193. package/build/esm/NotchedOutline/styledComponents.js.map +1 -1
  194. package/build/esm/Paper/Paper.d.ts +11 -11
  195. package/build/esm/Paper/Paper.js +25 -25
  196. package/build/esm/Paper/Paper.js.map +1 -1
  197. package/build/esm/Paper/index.d.ts +1 -1
  198. package/build/esm/Paper/index.js.map +1 -1
  199. package/build/esm/Popover/Popover.d.ts +13 -14
  200. package/build/esm/Popover/Popover.js +33 -39
  201. package/build/esm/Popover/Popover.js.map +1 -1
  202. package/build/esm/Popover/PopoverContainer.d.ts +3 -4
  203. package/build/esm/Popover/PopoverContainer.js +12 -12
  204. package/build/esm/Popover/PopoverContainer.js.map +1 -1
  205. package/build/esm/Popover/PopoverSurface.d.ts +4 -5
  206. package/build/esm/Popover/PopoverSurface.js +15 -15
  207. package/build/esm/Popover/PopoverSurface.js.map +1 -1
  208. package/build/esm/Popover/index.d.ts +1 -1
  209. package/build/esm/Popover/index.js.map +1 -1
  210. package/build/esm/ProgressSpinner/ProgressSpinner.d.ts +7 -8
  211. package/build/esm/ProgressSpinner/ProgressSpinner.js +31 -33
  212. package/build/esm/ProgressSpinner/ProgressSpinner.js.map +1 -1
  213. package/build/esm/ProgressSpinner/index.d.ts +1 -1
  214. package/build/esm/ProgressSpinner/index.js.map +1 -1
  215. package/build/esm/RadioButton/RadioButton.d.ts +3 -4
  216. package/build/esm/RadioButton/RadioButton.js +29 -32
  217. package/build/esm/RadioButton/RadioButton.js.map +1 -1
  218. package/build/esm/RadioButton/RadioButtonIcon.d.ts +6 -6
  219. package/build/esm/RadioButton/RadioButtonIcon.js +10 -12
  220. package/build/esm/RadioButton/RadioButtonIcon.js.map +1 -1
  221. package/build/esm/RadioButton/RadioGroup.d.ts +4 -5
  222. package/build/esm/RadioButton/RadioGroup.js +9 -11
  223. package/build/esm/RadioButton/RadioGroup.js.map +1 -1
  224. package/build/esm/RadioButton/index.d.ts +2 -2
  225. package/build/esm/RadioButton/index.js.map +1 -1
  226. package/build/esm/Ripple/Ripple.d.ts +10 -11
  227. package/build/esm/Ripple/Ripple.js +12 -10
  228. package/build/esm/Ripple/Ripple.js.map +1 -1
  229. package/build/esm/Ripple/RippleBox.d.ts +5 -5
  230. package/build/esm/Ripple/RippleBox.js +32 -29
  231. package/build/esm/Ripple/RippleBox.js.map +1 -1
  232. package/build/esm/Ripple/constants.d.ts +7 -7
  233. package/build/esm/Ripple/constants.js +7 -7
  234. package/build/esm/Ripple/constants.js.map +1 -1
  235. package/build/esm/Ripple/index.d.ts +5 -5
  236. package/build/esm/Ripple/index.js.map +1 -1
  237. package/build/esm/Ripple/keyframes.d.ts +4 -4
  238. package/build/esm/Ripple/keyframes.js +7 -7
  239. package/build/esm/Ripple/keyframes.js.map +1 -1
  240. package/build/esm/Ripple/useRipple.d.ts +14 -14
  241. package/build/esm/Ripple/useRipple.js +79 -84
  242. package/build/esm/Ripple/useRipple.js.map +1 -1
  243. package/build/esm/Ripple/useRippleHandlers.d.ts +8 -8
  244. package/build/esm/Ripple/useRippleHandlers.js +21 -30
  245. package/build/esm/Ripple/useRippleHandlers.js.map +1 -1
  246. package/build/esm/Ripple/useRippleSurface.d.ts +22 -787
  247. package/build/esm/Ripple/useRippleSurface.js +87 -88
  248. package/build/esm/Ripple/useRippleSurface.js.map +1 -1
  249. package/build/esm/SearchBar/SearchBar.d.ts +15 -15
  250. package/build/esm/SearchBar/SearchBar.js +48 -63
  251. package/build/esm/SearchBar/SearchBar.js.map +1 -1
  252. package/build/esm/SearchBar/index.d.ts +1 -1
  253. package/build/esm/SearchBar/index.js.map +1 -1
  254. package/build/esm/Select/CustomContainerExample.d.ts +2 -3
  255. package/build/esm/Select/CustomContainerExample.js +29 -34
  256. package/build/esm/Select/CustomContainerExample.js.map +1 -1
  257. package/build/esm/Select/Select.d.ts +33 -32
  258. package/build/esm/Select/Select.js +68 -113
  259. package/build/esm/Select/Select.js.map +1 -1
  260. package/build/esm/Select/SelectIcon.d.ts +6 -6
  261. package/build/esm/Select/SelectIcon.js +11 -13
  262. package/build/esm/Select/SelectIcon.js.map +1 -1
  263. package/build/esm/Select/context.d.ts +9 -9
  264. package/build/esm/Select/context.js +10 -8
  265. package/build/esm/Select/context.js.map +1 -1
  266. package/build/esm/Select/defaultRender.d.ts +3 -3
  267. package/build/esm/Select/defaultRender.js +33 -38
  268. package/build/esm/Select/defaultRender.js.map +1 -1
  269. package/build/esm/Select/index.d.ts +1 -1
  270. package/build/esm/Select/index.js.map +1 -1
  271. package/build/esm/Select/styledComponents.d.ts +15 -15
  272. package/build/esm/Select/styledComponents.js +20 -23
  273. package/build/esm/Select/styledComponents.js.map +1 -1
  274. package/build/esm/SelectItem/SelectItem.d.ts +11 -11
  275. package/build/esm/SelectItem/SelectItem.js +37 -47
  276. package/build/esm/SelectItem/SelectItem.js.map +1 -1
  277. package/build/esm/SelectItem/index.d.ts +1 -1
  278. package/build/esm/SelectItem/index.js.map +1 -1
  279. package/build/esm/SelectionControl/SelectionControlLabel.d.ts +7 -7
  280. package/build/esm/SelectionControl/SelectionControlLabel.js +13 -14
  281. package/build/esm/SelectionControl/SelectionControlLabel.js.map +1 -1
  282. package/build/esm/SelectionControl/SelectionControlText.d.ts +8 -8
  283. package/build/esm/SelectionControl/SelectionControlText.js +20 -20
  284. package/build/esm/SelectionControl/SelectionControlText.js.map +1 -1
  285. package/build/esm/SelectionControl/index.d.ts +2 -2
  286. package/build/esm/SelectionControl/index.js.map +1 -1
  287. package/build/esm/Skeleton/DelayAppearance.d.ts +13 -13
  288. package/build/esm/Skeleton/DelayAppearance.js +18 -20
  289. package/build/esm/Skeleton/DelayAppearance.js.map +1 -1
  290. package/build/esm/Skeleton/Skeleton.d.ts +9 -9
  291. package/build/esm/Skeleton/Skeleton.js +18 -19
  292. package/build/esm/Skeleton/Skeleton.js.map +1 -1
  293. package/build/esm/Skeleton/animation.d.ts +8 -8
  294. package/build/esm/Skeleton/animation.js +11 -11
  295. package/build/esm/Skeleton/animation.js.map +1 -1
  296. package/build/esm/Skeleton/index.d.ts +2 -2
  297. package/build/esm/Skeleton/index.js.map +1 -1
  298. package/build/esm/Slider/Slider.d.ts +17 -17
  299. package/build/esm/Slider/Slider.js +93 -85
  300. package/build/esm/Slider/Slider.js.map +1 -1
  301. package/build/esm/Slider/index.d.ts +1 -1
  302. package/build/esm/Slider/index.js.map +1 -1
  303. package/build/esm/Snackbar/Snackbar.d.ts +10 -8
  304. package/build/esm/Snackbar/Snackbar.js +33 -33
  305. package/build/esm/Snackbar/Snackbar.js.map +1 -1
  306. package/build/esm/Snackbar/Stack.d.ts +31 -31
  307. package/build/esm/Snackbar/Stack.js +74 -106
  308. package/build/esm/Snackbar/Stack.js.map +1 -1
  309. package/build/esm/Snackbar/index.d.ts +3 -3
  310. package/build/esm/Snackbar/index.js.map +1 -1
  311. package/build/esm/Snackbar/useSnackbarAnimation.d.ts +6 -6
  312. package/build/esm/Snackbar/useSnackbarAnimation.js +103 -132
  313. package/build/esm/Snackbar/useSnackbarAnimation.js.map +1 -1
  314. package/build/esm/Switch/Switch.d.ts +13 -13
  315. package/build/esm/Switch/Switch.js +59 -56
  316. package/build/esm/Switch/Switch.js.map +1 -1
  317. package/build/esm/Switch/index.d.ts +1 -1
  318. package/build/esm/Switch/index.js.map +1 -1
  319. package/build/esm/Switch/styledComponents.d.ts +13 -13
  320. package/build/esm/Switch/styledComponents.js +47 -47
  321. package/build/esm/Switch/styledComponents.js.map +1 -1
  322. package/build/esm/Tab/Tab.d.ts +5 -5
  323. package/build/esm/Tab/Tab.js +47 -55
  324. package/build/esm/Tab/Tab.js.map +1 -1
  325. package/build/esm/Tab/TabList.d.ts +9 -10
  326. package/build/esm/Tab/TabList.js +28 -32
  327. package/build/esm/Tab/TabList.js.map +1 -1
  328. package/build/esm/Tab/TabPanel.d.ts +4 -5
  329. package/build/esm/Tab/TabPanel.js +18 -19
  330. package/build/esm/Tab/TabPanel.js.map +1 -1
  331. package/build/esm/Tab/TabPanels.d.ts +4 -4
  332. package/build/esm/Tab/TabPanels.js.map +1 -1
  333. package/build/esm/Tab/Tabs.d.ts +4 -4
  334. package/build/esm/Tab/Tabs.js.map +1 -1
  335. package/build/esm/Tab/context.d.ts +8 -9
  336. package/build/esm/Tab/context.js +8 -7
  337. package/build/esm/Tab/context.js.map +1 -1
  338. package/build/esm/Tab/index.d.ts +5 -5
  339. package/build/esm/Tab/index.js.map +1 -1
  340. package/build/esm/TabIndicator/TabIndicator.d.ts +9 -9
  341. package/build/esm/TabIndicator/TabIndicator.js +69 -86
  342. package/build/esm/TabIndicator/TabIndicator.js.map +1 -1
  343. package/build/esm/TabIndicator/context.d.ts +6 -6
  344. package/build/esm/TabIndicator/context.js +8 -7
  345. package/build/esm/TabIndicator/context.js.map +1 -1
  346. package/build/esm/TabIndicator/index.d.ts +2 -2
  347. package/build/esm/TabIndicator/index.js.map +1 -1
  348. package/build/esm/Table/Table.d.ts +3 -4
  349. package/build/esm/Table/Table.js +13 -14
  350. package/build/esm/Table/Table.js.map +1 -1
  351. package/build/esm/Table/TableBody.d.ts +3 -4
  352. package/build/esm/Table/TableBody.js +9 -11
  353. package/build/esm/Table/TableBody.js.map +1 -1
  354. package/build/esm/Table/TableCell.d.ts +3 -4
  355. package/build/esm/Table/TableCell.js +14 -15
  356. package/build/esm/Table/TableCell.js.map +1 -1
  357. package/build/esm/Table/TableHead.d.ts +3 -4
  358. package/build/esm/Table/TableHead.js +13 -14
  359. package/build/esm/Table/TableHead.js.map +1 -1
  360. package/build/esm/Table/TableRow.d.ts +3 -4
  361. package/build/esm/Table/TableRow.js +13 -14
  362. package/build/esm/Table/TableRow.js.map +1 -1
  363. package/build/esm/Table/context.d.ts +2 -3
  364. package/build/esm/Table/context.js +7 -7
  365. package/build/esm/Table/context.js.map +1 -1
  366. package/build/esm/Table/index.d.ts +5 -5
  367. package/build/esm/Table/index.js.map +1 -1
  368. package/build/esm/Text/LoremIpsum.d.ts +4 -4
  369. package/build/esm/Text/LoremIpsum.js +10 -12
  370. package/build/esm/Text/LoremIpsum.js.map +1 -1
  371. package/build/esm/Text/Text.d.ts +10 -11
  372. package/build/esm/Text/Text.js +15 -19
  373. package/build/esm/Text/Text.js.map +1 -1
  374. package/build/esm/Text/index.d.ts +1 -1
  375. package/build/esm/Text/index.js.map +1 -1
  376. package/build/esm/TextField/FilledContainer.d.ts +18 -18
  377. package/build/esm/TextField/FilledContainer.js +75 -80
  378. package/build/esm/TextField/FilledContainer.js.map +1 -1
  379. package/build/esm/TextField/HelperText.d.ts +10 -10
  380. package/build/esm/TextField/HelperText.js +19 -26
  381. package/build/esm/TextField/HelperText.js.map +1 -1
  382. package/build/esm/TextField/IconContainer.d.ts +5 -5
  383. package/build/esm/TextField/IconContainer.js +21 -9
  384. package/build/esm/TextField/IconContainer.js.map +1 -1
  385. package/build/esm/TextField/Input.d.ts +11 -11
  386. package/build/esm/TextField/Input.js +39 -40
  387. package/build/esm/TextField/Input.js.map +1 -1
  388. package/build/esm/TextField/OutlinedContainer.d.ts +17 -17
  389. package/build/esm/TextField/OutlinedContainer.js +30 -47
  390. package/build/esm/TextField/OutlinedContainer.js.map +1 -1
  391. package/build/esm/TextField/TextField.d.ts +19 -19
  392. package/build/esm/TextField/TextField.js +50 -77
  393. package/build/esm/TextField/TextField.js.map +1 -1
  394. package/build/esm/TextField/consts.d.ts +5 -5
  395. package/build/esm/TextField/consts.js +5 -5
  396. package/build/esm/TextField/consts.js.map +1 -1
  397. package/build/esm/TextField/index.d.ts +4 -4
  398. package/build/esm/TextField/index.js.map +1 -1
  399. package/build/esm/ThemeExplorer/BorderSlider.d.ts +7 -7
  400. package/build/esm/ThemeExplorer/BorderSlider.js +8 -14
  401. package/build/esm/ThemeExplorer/BorderSlider.js.map +1 -1
  402. package/build/esm/ThemeExplorer/ColorPicker.d.ts +8 -8
  403. package/build/esm/ThemeExplorer/ColorPicker.js +19 -24
  404. package/build/esm/ThemeExplorer/ColorPicker.js.map +1 -1
  405. package/build/esm/ThemeExplorer/ColorSchemePicker.d.ts +10 -10
  406. package/build/esm/ThemeExplorer/ColorSchemePicker.js +16 -21
  407. package/build/esm/ThemeExplorer/ColorSchemePicker.js.map +1 -1
  408. package/build/esm/ThemeExplorer/FontAutoComplete.d.ts +9 -9
  409. package/build/esm/ThemeExplorer/FontAutoComplete.js +28 -48
  410. package/build/esm/ThemeExplorer/FontAutoComplete.js.map +1 -1
  411. package/build/esm/ThemeExplorer/TextFieldColorPicker.d.ts +8 -9
  412. package/build/esm/ThemeExplorer/TextFieldColorPicker.js +29 -60
  413. package/build/esm/ThemeExplorer/TextFieldColorPicker.js.map +1 -1
  414. package/build/esm/ThemeExplorer/ThemeBuilder.d.ts +11 -11
  415. package/build/esm/ThemeExplorer/ThemeBuilder.js +155 -184
  416. package/build/esm/ThemeExplorer/ThemeBuilder.js.map +1 -1
  417. package/build/esm/ThemeExplorer/ThemeColors.d.ts +4 -5
  418. package/build/esm/ThemeExplorer/ThemeColors.js +54 -54
  419. package/build/esm/ThemeExplorer/ThemeColors.js.map +1 -1
  420. package/build/esm/ThemeExplorer/components.d.ts +31 -31
  421. package/build/esm/ThemeExplorer/components.js +52 -61
  422. package/build/esm/ThemeExplorer/components.js.map +1 -1
  423. package/build/esm/ThemeExplorer/googleFonts.d.ts +1 -1
  424. package/build/esm/ThemeExplorer/googleFonts.js +1 -1
  425. package/build/esm/ThemeExplorer/googleFonts.js.map +1 -1
  426. package/build/esm/ThemeExplorer/index.d.ts +1 -1
  427. package/build/esm/ThemeExplorer/index.js.map +1 -1
  428. package/build/esm/ThemeExplorer/makeColorScheme.d.ts +98 -98
  429. package/build/esm/ThemeExplorer/makeColorScheme.js +0 -1
  430. package/build/esm/ThemeExplorer/makeColorScheme.js.map +1 -1
  431. package/build/esm/ThemeExplorer/makeTailwindTheme.d.ts +2 -2
  432. package/build/esm/ThemeExplorer/makeTailwindTheme.js +20 -20
  433. package/build/esm/ThemeExplorer/makeTailwindTheme.js.map +1 -1
  434. package/build/esm/ThemeExplorer/updateGoogleFonts.js +23 -64
  435. package/build/esm/ThemeExplorer/updateGoogleFonts.js.map +1 -1
  436. package/build/esm/ThemeExplorer/useDeferredColor.d.ts +3 -3
  437. package/build/esm/ThemeExplorer/useDeferredColor.js +2 -9
  438. package/build/esm/ThemeExplorer/useDeferredColor.js.map +1 -1
  439. package/build/esm/ThemeExplorer/useLocalStorageCachedState.d.ts +1 -1
  440. package/build/esm/ThemeExplorer/useLocalStorageCachedState.js +2 -10
  441. package/build/esm/ThemeExplorer/useLocalStorageCachedState.js.map +1 -1
  442. package/build/esm/Tooltip/Tooltip.d.ts +8 -8
  443. package/build/esm/Tooltip/Tooltip.js +21 -25
  444. package/build/esm/Tooltip/Tooltip.js.map +1 -1
  445. package/build/esm/Tooltip/index.d.ts +1 -1
  446. package/build/esm/Tooltip/index.js.map +1 -1
  447. package/build/esm/color.d.ts +8 -8
  448. package/build/esm/color.js +23 -31
  449. package/build/esm/color.js.map +1 -1
  450. package/build/esm/css.d.ts +1 -1
  451. package/build/esm/css.js.map +1 -1
  452. package/build/esm/hooks/useAnimation.d.ts +20 -20
  453. package/build/esm/hooks/useAnimation.js +42 -53
  454. package/build/esm/hooks/useAnimation.js.map +1 -1
  455. package/build/esm/index.d.ts +42 -42
  456. package/build/esm/index.js.map +1 -1
  457. package/build/esm/motion.d.ts +7 -7
  458. package/build/esm/motion.js +7 -7
  459. package/build/esm/motion.js.map +1 -1
  460. package/build/esm/tailwind/extendColors.d.ts +5 -5
  461. package/build/esm/tailwind/extendColors.js +17 -29
  462. package/build/esm/tailwind/extendColors.js.map +1 -1
  463. package/build/esm/tailwind/index.d.ts +8 -8
  464. package/build/esm/tailwind/index.js +17 -29
  465. package/build/esm/tailwind/index.js.map +1 -1
  466. package/build/esm/theme/index.d.ts +2 -2
  467. package/build/esm/theme/index.js.map +1 -1
  468. package/build/esm/theme/theme.d.ts +590 -562
  469. package/build/esm/theme/theme.js +49 -22
  470. package/build/esm/theme/theme.js.map +1 -1
  471. package/build/esm/theme/typography-raleway.d.ts +112 -112
  472. package/build/esm/theme/typography-raleway.js +1 -1
  473. package/build/esm/theme/typography-raleway.js.map +1 -1
  474. package/build/esm/theme/typography-roboto.d.ts +111 -111
  475. package/build/esm/theme/typography-roboto.js +1 -1
  476. package/build/esm/theme/typography-roboto.js.map +1 -1
  477. package/build/esm/theme/useTheme.d.ts +594 -566
  478. package/build/esm/theme/useTheme.js +1 -3
  479. package/build/esm/theme/useTheme.js.map +1 -1
  480. package/build/tsconfig-build.tsbuildinfo +1 -1
  481. package/package.json +12 -11
  482. package/src/Alert/index.ts +1 -1
  483. package/src/AppBar/AppBar.story.tsx +69 -69
  484. package/src/AppBar/AppBar.tsx +85 -85
  485. package/src/AppBar/AppBarButton.tsx +25 -25
  486. package/src/AppBar/context.ts +13 -13
  487. package/src/AppBar/index.ts +3 -3
  488. package/src/Badge/Badge.story.tsx +68 -68
  489. package/src/Badge/Badge.tsx +47 -47
  490. package/src/Badge/index.ts +1 -1
  491. package/src/BaseLine/BaseLine.tsx +100 -100
  492. package/src/BaseLine/index.ts +1 -1
  493. package/src/BottomSheet/BottomSheet.story.tsx +35 -35
  494. package/src/BottomSheet/BottomSheet.tsx +39 -39
  495. package/src/BottomSheet/BottomSheetSurface.tsx +49 -49
  496. package/src/BottomSheet/index.ts +1 -1
  497. package/src/Box/Box.tsx +133 -127
  498. package/src/Box/index.ts +1 -1
  499. package/src/Button/BaseButton.tsx +123 -18
  500. package/src/Button/Button.story.tsx +236 -72
  501. package/src/Button/Button.tsx +44 -15
  502. package/src/Button/ButtonGroup.story.tsx +263 -101
  503. package/src/Button/ButtonGroup.tsx +103 -7
  504. package/src/Button/FilledButton.tsx +2 -43
  505. package/src/Button/FloatingActionButton.tsx +14 -9
  506. package/src/Button/IconFilledButton.tsx +3 -0
  507. package/src/Button/IconOutlinedButton.tsx +3 -0
  508. package/src/Button/OutlinedButton.tsx +2 -41
  509. package/src/Button/SpinnerButton.story.tsx +91 -91
  510. package/src/Button/SplitButton.story.tsx +110 -0
  511. package/src/Button/SplitButton.tsx +40 -0
  512. package/src/Button/TransparentButton.tsx +1 -43
  513. package/src/Button/context.tsx +19 -17
  514. package/src/Button/index.ts +3 -2
  515. package/src/CheckBox/CheckBox.story.tsx +155 -155
  516. package/src/CheckBox/CheckBox.tsx +170 -170
  517. package/src/CheckBox/CheckBoxIcon.tsx +63 -64
  518. package/src/CheckBox/CheckPath.tsx +18 -18
  519. package/src/CheckBox/IndeterminatePath.tsx +16 -16
  520. package/src/CheckBox/index.ts +1 -1
  521. package/src/Chip/ButtonChip.tsx +86 -86
  522. package/src/Chip/Chip.story.tsx +242 -242
  523. package/src/Chip/Chip.tsx +5 -5
  524. package/src/Chip/ChipBase.tsx +141 -141
  525. package/src/Chip/ChoiceChip.tsx +127 -127
  526. package/src/Chip/index.ts +2 -2
  527. package/src/Combobox/Combobox.tsx +274 -274
  528. package/src/Combobox/index.ts +1 -1
  529. package/src/Dialog/Dialog.story.tsx +53 -53
  530. package/src/Dialog/Dialog.tsx +73 -73
  531. package/src/Dialog/DialogBackdrop.tsx +42 -42
  532. package/src/Dialog/DialogContainer.tsx +31 -31
  533. package/src/Dialog/DialogSurface.tsx +55 -55
  534. package/src/Dialog/Scrim.tsx +35 -35
  535. package/src/Dialog/index.ts +2 -2
  536. package/src/Dialog/useDialogAnimation.tsx +59 -49
  537. package/src/Divider/Divider.story.tsx +39 -39
  538. package/src/Divider/Divider.tsx +48 -48
  539. package/src/Divider/index.ts +1 -1
  540. package/src/FloatingLabel/FloatingLabel.story.tsx +55 -55
  541. package/src/FloatingLabel/FloatingLabel.tsx +77 -77
  542. package/src/FloatingLabel/index.ts +1 -1
  543. package/src/LineRipple/LineRipple.story.tsx +43 -43
  544. package/src/LineRipple/LineRipple.tsx +81 -81
  545. package/src/LineRipple/index.ts +1 -1
  546. package/src/Link/Link.story.tsx +14 -14
  547. package/src/Link/Link.tsx +65 -65
  548. package/src/Link/index.ts +1 -1
  549. package/src/List/List.tsx +46 -46
  550. package/src/List/index.ts +1 -1
  551. package/src/ListItem/ListItem.story.tsx +43 -43
  552. package/src/ListItem/ListItem.tsx +104 -104
  553. package/src/ListItem/ListItemText.tsx +35 -35
  554. package/src/ListItem/index.ts +2 -2
  555. package/src/Menu/ContextMenu.story.tsx +34 -34
  556. package/src/Menu/Menu.story.tsx +54 -54
  557. package/src/Menu/Menu.tsx +124 -124
  558. package/src/Menu/animation.ts +16 -16
  559. package/src/Menu/index.ts +2 -2
  560. package/src/NavRail/NavRail.story.tsx +146 -146
  561. package/src/NavRail/NavRailItem.tsx +176 -175
  562. package/src/NavRail/icons/test-icons.tsx +46 -46
  563. package/src/NavRail/index.ts +1 -1
  564. package/src/NotchedOutline/NotchedOutline.story.tsx +99 -99
  565. package/src/NotchedOutline/NotchedOutline.tsx +80 -80
  566. package/src/NotchedOutline/context.ts +12 -12
  567. package/src/NotchedOutline/index.ts +1 -1
  568. package/src/NotchedOutline/styledComponents.ts +122 -122
  569. package/src/Paper/Paper.story.tsx +50 -50
  570. package/src/Paper/Paper.tsx +67 -67
  571. package/src/Paper/index.ts +1 -1
  572. package/src/Popover/PopoverSurface.tsx +51 -51
  573. package/src/Popover/index.ts +1 -1
  574. package/src/ProgressSpinner/ProgressSpinner.story.tsx +35 -35
  575. package/src/ProgressSpinner/ProgressSpinner.tsx +119 -119
  576. package/src/ProgressSpinner/index.ts +1 -1
  577. package/src/RadioButton/RadioButton.story.tsx +109 -109
  578. package/src/RadioButton/RadioButton.tsx +112 -112
  579. package/src/RadioButton/RadioButtonIcon.tsx +44 -44
  580. package/src/RadioButton/RadioGroup.tsx +26 -27
  581. package/src/RadioButton/index.ts +2 -2
  582. package/src/Ripple/Ripple.story.tsx +78 -78
  583. package/src/Ripple/Ripple.tsx +33 -33
  584. package/src/Ripple/RippleBox.tsx +52 -52
  585. package/src/Ripple/constants.ts +15 -15
  586. package/src/Ripple/index.ts +5 -5
  587. package/src/Ripple/keyframes.ts +36 -36
  588. package/src/Ripple/useRipple.ts +209 -209
  589. package/src/Ripple/useRippleHandlers.ts +54 -54
  590. package/src/Ripple/useRippleSurface.ts +162 -155
  591. package/src/SearchBar/SearchBar.tsx +5 -6
  592. package/src/Select/CustomContainerExample.tsx +59 -59
  593. package/src/Select/PaymentMethodSelect.story.tsx +320 -316
  594. package/src/Select/Select.story.tsx +225 -225
  595. package/src/Select/Select.tsx +284 -283
  596. package/src/Select/SelectIcon.tsx +43 -43
  597. package/src/Select/SelectMultiple.story.tsx +214 -215
  598. package/src/Select/context.ts +22 -22
  599. package/src/Select/defaultRender.tsx +60 -49
  600. package/src/Select/index.ts +1 -1
  601. package/src/Select/styledComponents.tsx +38 -38
  602. package/src/SelectItem/SelectItem.tsx +92 -92
  603. package/src/SelectItem/index.ts +1 -1
  604. package/src/SelectionControl/SelectionControlLabel.tsx +34 -34
  605. package/src/SelectionControl/SelectionControlText.tsx +37 -37
  606. package/src/SelectionControl/index.ts +2 -2
  607. package/src/Skeleton/DelayAppearance.tsx +41 -41
  608. package/src/Skeleton/Skeleton.story.tsx +57 -57
  609. package/src/Skeleton/Skeleton.tsx +40 -40
  610. package/src/Skeleton/animation.ts +54 -54
  611. package/src/Skeleton/index.ts +2 -2
  612. package/src/Slider/Slider.story.tsx +36 -36
  613. package/src/Slider/Slider.tsx +275 -275
  614. package/src/Slider/index.ts +1 -1
  615. package/src/Snackbar/Snackbar.story.tsx +99 -99
  616. package/src/Snackbar/Snackbar.tsx +19 -16
  617. package/src/Switch/Switch.story.tsx +97 -98
  618. package/src/Switch/Switch.tsx +170 -170
  619. package/src/Switch/index.ts +1 -1
  620. package/src/Switch/styledComponents.tsx +117 -117
  621. package/src/Tab/Tab.story.tsx +209 -209
  622. package/src/Tab/Tab.tsx +120 -120
  623. package/src/Tab/TabList.tsx +61 -61
  624. package/src/Tab/TabPanel.tsx +31 -31
  625. package/src/Tab/TabPanels.tsx +5 -5
  626. package/src/Tab/Tabs.tsx +5 -5
  627. package/src/Tab/context.ts +17 -17
  628. package/src/Tab/index.ts +5 -5
  629. package/src/TabIndicator/TabIndicator.tsx +146 -146
  630. package/src/TabIndicator/context.ts +13 -13
  631. package/src/TabIndicator/index.ts +2 -2
  632. package/src/Table/context.ts +6 -6
  633. package/src/Text/LoremIpsum.tsx +18 -18
  634. package/src/Text/Text.story.tsx +79 -75
  635. package/src/Text/Text.tsx +84 -84
  636. package/src/Text/index.ts +1 -1
  637. package/src/TextField/FilledContainer.tsx +173 -173
  638. package/src/TextField/HelperText.tsx +63 -63
  639. package/src/TextField/OutlinedContainer.tsx +116 -116
  640. package/src/TextField/consts.ts +7 -7
  641. package/src/TextField/index.ts +4 -4
  642. package/src/ThemeExplorer/BorderSlider.tsx +73 -73
  643. package/src/ThemeExplorer/ColorPicker.tsx +104 -104
  644. package/src/ThemeExplorer/ColorSchemePicker.tsx +55 -55
  645. package/src/ThemeExplorer/FontAutoComplete.tsx +139 -139
  646. package/src/ThemeExplorer/TextFieldColorPicker.tsx +112 -115
  647. package/src/ThemeExplorer/ThemeBuilder.story.tsx +8 -8
  648. package/src/ThemeExplorer/ThemeBuilder.tsx +437 -353
  649. package/src/ThemeExplorer/ThemeColors.tsx +122 -118
  650. package/src/ThemeExplorer/components.tsx +195 -195
  651. package/src/ThemeExplorer/googleFonts.ts +1436 -1436
  652. package/src/ThemeExplorer/index.ts +1 -1
  653. package/src/ThemeExplorer/makeColorScheme.tsx +111 -111
  654. package/src/ThemeExplorer/makeTailwindTheme.ts +44 -44
  655. package/src/ThemeExplorer/updateGoogleFonts.js +32 -33
  656. package/src/ThemeExplorer/useDeferredColor.tsx +21 -21
  657. package/src/ThemeExplorer/useLocalStorageCachedState.ts +18 -18
  658. package/src/Tooltip/Tooltip.story.tsx +35 -35
  659. package/src/Tooltip/Tooltip.tsx +67 -67
  660. package/src/Tooltip/index.ts +1 -1
  661. package/src/css.ts +2 -2
  662. package/src/hooks/useAnimation.ts +111 -111
  663. package/src/motion.ts +7 -7
  664. package/src/tailwind/extendColors.ts +51 -51
  665. package/src/tailwind/index.ts +57 -56
  666. package/src/tailwind/tests/extendColors.test.ts +123 -123
  667. package/src/theme/index.ts +2 -2
  668. package/src/theme/theme.ts +36 -8
  669. package/src/theme/typography-raleway.ts +114 -114
  670. package/src/theme/typography-roboto.ts +113 -113
  671. package/src/theme/useTheme.ts +17 -18
  672. package/tailwind/package.json +5 -5
  673. package/theme-explorer/package.json +5 -5
@@ -1,7 +1,3 @@
1
- import _extends from "@babel/runtime/helpers/extends";
2
- import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
- import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
4
- var _excluded = ["type", "id", "variant", "color", "value", "defaultValue", "error", "disabled", "maxLength", "hideCharacterCounter", "label", "placeholder", "helperText", "multiline", "onChange", "onFocus", "onBlur", "leadingIcon", "trailingIcon", "containerProps"];
5
1
  import { forwardRef, useState, useId } from 'react';
6
2
  import { wrapEvent, useControlledState } from '@basic-ui/core';
7
3
  import { Input } from './Input';
@@ -11,89 +7,65 @@ import { OutlinedContainer } from './OutlinedContainer';
11
7
  import { HelperText } from './HelperText';
12
8
  import { Box } from '../Box';
13
9
  import { IconContainer } from './IconContainer';
14
- import { jsx as _jsx } from "react/jsx-runtime";
15
- import { jsxs as _jsxs } from "react/jsx-runtime";
16
- var componentMap = {
10
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
11
+ const componentMap = {
17
12
  outlined: OutlinedContainer,
18
13
  filled: FilledContainer
19
14
  };
20
-
21
15
  function characterCounter(value, maxLength) {
22
16
  if (maxLength === undefined) {
23
17
  return null;
24
18
  }
25
-
26
- return "".concat(typeof value === 'string' ? value.length : 0, " / ").concat(maxLength);
19
+ return `${typeof value === 'string' ? value.length : 0} / ${maxLength}`;
27
20
  }
28
-
29
- export var TextField = /*#__PURE__*/forwardRef(function TextField(props, forwardedRef) {
30
- var _props$type = props.type,
31
- type = _props$type === void 0 ? 'text' : _props$type,
32
- idProp = props.id,
33
- _props$variant = props.variant,
34
- variant = _props$variant === void 0 ? 'outlined' : _props$variant,
35
- _props$color = props.color,
36
- color = _props$color === void 0 ? 'primary' : _props$color,
37
- valueProp = props.value,
38
- _props$defaultValue = props.defaultValue,
39
- defaultValue = _props$defaultValue === void 0 ? '' : _props$defaultValue,
40
- error = props.error,
41
- disabled = props.disabled,
42
- maxLength = props.maxLength,
43
- _props$hideCharacterC = props.hideCharacterCounter,
44
- hideCharacterCounter = _props$hideCharacterC === void 0 ? false : _props$hideCharacterC,
45
- _props$label = props.label,
46
- label = _props$label === void 0 ? null : _props$label,
47
- placeholder = props.placeholder,
48
- helperTextProp = props.helperText,
49
- multiline = props.multiline,
50
- onChangeProp = props.onChange,
51
- onFocus = props.onFocus,
52
- onBlur = props.onBlur,
53
- _props$leadingIcon = props.leadingIcon,
54
- leadingIcon = _props$leadingIcon === void 0 ? null : _props$leadingIcon,
55
- _props$trailingIcon = props.trailingIcon,
56
- trailingIcon = _props$trailingIcon === void 0 ? null : _props$trailingIcon,
57
- containerProps = props.containerProps,
58
- otherProps = _objectWithoutProperties(props, _excluded);
59
-
60
- var _useControlledState = useControlledState(valueProp, onChangeProp, defaultValue, function (setState) {
61
- return function (e) {
62
- setState(e.target.value);
63
- };
64
- }),
65
- _useControlledState2 = _slicedToArray(_useControlledState, 2),
66
- value = _useControlledState2[0],
67
- onChange = _useControlledState2[1];
68
-
69
- var _useState = useState(false),
70
- _useState2 = _slicedToArray(_useState, 2),
71
- hasFocus = _useState2[0],
72
- setHasFocus = _useState2[1];
73
-
74
- var Container = componentMap[variant] || OutlinedContainer;
75
- var fallbackId = useId();
76
- var theme = useTheme();
77
-
78
- var handleFocus = function handleFocus() {
21
+ export const TextField = /*#__PURE__*/forwardRef(function TextField(props, forwardedRef) {
22
+ const {
23
+ type = 'text',
24
+ id: idProp,
25
+ variant = 'outlined',
26
+ color = 'primary',
27
+ value: valueProp,
28
+ defaultValue = '',
29
+ error,
30
+ disabled,
31
+ maxLength,
32
+ hideCharacterCounter = false,
33
+ label = null,
34
+ placeholder,
35
+ helperText: helperTextProp,
36
+ multiline,
37
+ onChange: onChangeProp,
38
+ onFocus,
39
+ onBlur,
40
+ leadingIcon = null,
41
+ trailingIcon = null,
42
+ containerProps,
43
+ ...otherProps
44
+ } = props;
45
+ const [value, onChange] = useControlledState(valueProp, onChangeProp, defaultValue, setState => e => {
46
+ setState(e.target.value);
47
+ });
48
+ const [hasFocus, setHasFocus] = useState(false);
49
+ const Container = componentMap[variant] || OutlinedContainer;
50
+ const fallbackId = useId();
51
+ const theme = useTheme();
52
+ const handleFocus = () => {
79
53
  setHasFocus(true);
80
54
  };
81
-
82
- var handleBlur = function handleBlur() {
55
+ const handleBlur = () => {
83
56
  setHasFocus(false);
84
57
  };
85
-
86
- var hasError = Boolean(error);
87
- var helperText = typeof error === 'string' ? error : helperTextProp;
88
- var id = idProp || fallbackId;
89
- var inputId = "".concat(id, "-text-field");
90
- var helperTextId = helperText ? "".concat(id, "-helper-text") : undefined;
91
- var labelIsFloating = hasFocus || typeof value === 'string' && value.length > 0;
58
+ const hasError = Boolean(error);
59
+ const helperText = typeof error === 'string' ? error : helperTextProp;
60
+ const id = idProp || fallbackId;
61
+ const inputId = `${id}-text-field`;
62
+ const helperTextId = helperText ? `${id}-helper-text` : undefined;
63
+ const labelIsFloating = hasFocus || typeof value === 'string' && value.length > 0;
92
64
  return /*#__PURE__*/_jsxs(Box, {
93
65
  display: "inline-flex",
94
66
  flexDirection: "column",
95
67
  width: "100%",
96
- children: [/*#__PURE__*/_jsxs(Container, _extends(_extends({
68
+ children: [/*#__PURE__*/_jsxs(Container, {
97
69
  theme: theme,
98
70
  label: label,
99
71
  color: color,
@@ -102,12 +74,12 @@ export var TextField = /*#__PURE__*/forwardRef(function TextField(props, forward
102
74
  inputId: inputId,
103
75
  hasFocus: hasFocus,
104
76
  disabled: disabled,
105
- leadingIcon: Boolean(leadingIcon)
106
- }, containerProps), {}, {
77
+ leadingIcon: Boolean(leadingIcon),
78
+ ...containerProps,
107
79
  children: [leadingIcon && /*#__PURE__*/_jsx(IconContainer, {
108
80
  position: "start",
109
81
  children: leadingIcon
110
- }), /*#__PURE__*/_jsx(Input, _extends({
82
+ }), /*#__PURE__*/_jsx(Input, {
111
83
  ref: forwardedRef,
112
84
  as: multiline ? 'textarea' : 'input',
113
85
  variant: variant,
@@ -126,12 +98,13 @@ export var TextField = /*#__PURE__*/forwardRef(function TextField(props, forward
126
98
  "aria-describedby": helperTextId,
127
99
  hasLabel: !!label,
128
100
  leadingIcon: Boolean(leadingIcon),
129
- trailingIcon: Boolean(trailingIcon)
130
- }, otherProps)), trailingIcon && /*#__PURE__*/_jsx(IconContainer, {
101
+ trailingIcon: Boolean(trailingIcon),
102
+ ...otherProps
103
+ }), trailingIcon && /*#__PURE__*/_jsx(IconContainer, {
131
104
  position: "end",
132
105
  children: trailingIcon
133
106
  })]
134
- })), /*#__PURE__*/_jsx(HelperText, {
107
+ }), /*#__PURE__*/_jsx(HelperText, {
135
108
  error: hasError,
136
109
  disabled: disabled,
137
110
  leftSide: helperText && /*#__PURE__*/_jsx("span", {
@@ -1 +1 @@
1
- {"version":3,"file":"TextField.js","names":["forwardRef","useState","useId","wrapEvent","useControlledState","Input","useTheme","FilledContainer","OutlinedContainer","HelperText","Box","IconContainer","componentMap","outlined","filled","characterCounter","value","maxLength","undefined","length","TextField","props","forwardedRef","type","idProp","id","variant","color","valueProp","defaultValue","error","disabled","hideCharacterCounter","label","placeholder","helperTextProp","helperText","multiline","onChangeProp","onChange","onFocus","onBlur","leadingIcon","trailingIcon","containerProps","otherProps","setState","e","target","hasFocus","setHasFocus","Container","fallbackId","theme","handleFocus","handleBlur","hasError","Boolean","inputId","helperTextId","labelIsFloating"],"sources":["../../../src/TextField/TextField.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport { forwardRef, useState, useId } from 'react';\nimport { wrapEvent, useControlledState } from '@basic-ui/core';\n\nimport type { InputProps } from './Input';\nimport { Input } from './Input';\nimport { useTheme } from '../theme';\nimport { FilledContainer } from './FilledContainer';\nimport { OutlinedContainer } from './OutlinedContainer';\nimport { HelperText } from './HelperText';\nimport type { BoxProps } from '../Box';\nimport { Box } from '../Box';\nimport { IconContainer } from './IconContainer';\n\nconst componentMap = {\n outlined: OutlinedContainer,\n filled: FilledContainer,\n};\n\nfunction characterCounter(\n value: string | number | string[],\n maxLength?: number\n) {\n if (maxLength === undefined) {\n return null;\n }\n\n return `${typeof value === 'string' ? value.length : 0} / ${maxLength}`;\n}\n\nexport type TextFieldProps = Omit<InputProps, 'value' | 'defaultValue'> & {\n variant?: 'outlined' | 'filled';\n containerProps?: Omit<BoxProps, 'color'>;\n color?: 'primary' | 'secondary';\n label?: ReactNode;\n helperText?: string;\n maxLength?: number;\n hideCharacterCounter?: boolean;\n defaultValue?: string;\n value?: string;\n multiline?: boolean;\n error?: boolean | string;\n leadingIcon?: ReactNode;\n trailingIcon?: ReactNode;\n};\n\nexport const TextField = forwardRef<HTMLInputElement, TextFieldProps>(\n function TextField(props, forwardedRef) {\n const {\n type = 'text',\n id: idProp,\n variant = 'outlined',\n color = 'primary',\n value: valueProp,\n defaultValue = '',\n error,\n disabled,\n maxLength,\n hideCharacterCounter = false,\n label = null,\n placeholder,\n helperText: helperTextProp,\n multiline,\n onChange: onChangeProp,\n onFocus,\n onBlur,\n leadingIcon = null,\n trailingIcon = null,\n containerProps,\n ...otherProps\n } = props;\n const [value, onChange] = useControlledState(\n valueProp,\n onChangeProp,\n defaultValue,\n (setState) => (e) => {\n setState(e.target.value);\n }\n );\n const [hasFocus, setHasFocus] = useState(false);\n\n const Container = componentMap[variant] || OutlinedContainer;\n\n const fallbackId = useId();\n\n const theme = useTheme();\n\n const handleFocus = () => {\n setHasFocus(true);\n };\n\n const handleBlur = () => {\n setHasFocus(false);\n };\n\n const hasError = Boolean(error);\n const helperText = typeof error === 'string' ? error : helperTextProp;\n\n const id = idProp || fallbackId;\n const inputId = `${id}-text-field`;\n const helperTextId = helperText ? `${id}-helper-text` : undefined;\n\n const labelIsFloating =\n hasFocus || (typeof value === 'string' && value.length > 0);\n\n return (\n <Box display=\"inline-flex\" flexDirection=\"column\" width=\"100%\">\n <Container\n theme={theme}\n label={label}\n color={color}\n error={hasError}\n labelIsFloating={labelIsFloating}\n inputId={inputId}\n hasFocus={hasFocus}\n disabled={disabled}\n leadingIcon={Boolean(leadingIcon)}\n {...containerProps}\n >\n {leadingIcon && (\n <IconContainer position=\"start\">{leadingIcon}</IconContainer>\n )}\n <Input\n ref={forwardedRef}\n as={multiline ? 'textarea' : 'input'}\n variant={variant}\n type={type}\n id={inputId}\n onFocus={wrapEvent(onFocus, handleFocus)}\n onBlur={wrapEvent(onBlur, handleBlur)}\n onChange={onChange}\n value={value}\n theme={theme}\n placeholder={placeholder}\n disabled={disabled}\n aria-disabled={disabled ? 'true' : undefined}\n maxLength={maxLength}\n multiline={multiline}\n aria-describedby={helperTextId}\n hasLabel={!!label}\n leadingIcon={Boolean(leadingIcon)}\n trailingIcon={Boolean(trailingIcon)}\n {...otherProps}\n />\n {trailingIcon && (\n <IconContainer position=\"end\">{trailingIcon}</IconContainer>\n )}\n </Container>\n\n <HelperText\n error={hasError}\n disabled={disabled}\n leftSide={helperText && <span id={helperTextId}>{helperText}</span>}\n rightSide={\n !hideCharacterCounter &&\n characterCounter(value as string, maxLength)\n }\n />\n </Box>\n );\n }\n);\n"],"mappings":";;;;AACA,SAASA,UAAT,EAAqBC,QAArB,EAA+BC,KAA/B,QAA4C,OAA5C;AACA,SAASC,SAAT,EAAoBC,kBAApB,QAA8C,gBAA9C;AAGA,SAASC,KAAT,QAAsB,SAAtB;AACA,SAASC,QAAT,QAAyB,UAAzB;AACA,SAASC,eAAT,QAAgC,mBAAhC;AACA,SAASC,iBAAT,QAAkC,qBAAlC;AACA,SAASC,UAAT,QAA2B,cAA3B;AAEA,SAASC,GAAT,QAAoB,QAApB;AACA,SAASC,aAAT,QAA8B,iBAA9B;;;AAEA,IAAMC,YAAY,GAAG;EACnBC,QAAQ,EAAEL,iBADS;EAEnBM,MAAM,EAAEP;AAFW,CAArB;;AAKA,SAASQ,gBAAT,CACEC,KADF,EAEEC,SAFF,EAGE;EACA,IAAIA,SAAS,KAAKC,SAAlB,EAA6B;IAC3B,OAAO,IAAP;EACD;;EAED,iBAAU,OAAOF,KAAP,KAAiB,QAAjB,GAA4BA,KAAK,CAACG,MAAlC,GAA2C,CAArD,gBAA4DF,SAA5D;AACD;;AAkBD,OAAO,IAAMG,SAAS,gBAAGpB,UAAU,CACjC,SAASoB,SAAT,CAAmBC,KAAnB,EAA0BC,YAA1B,EAAwC;EACtC,kBAsBID,KAtBJ,CACEE,IADF;EAAA,IACEA,IADF,4BACS,MADT;EAAA,IAEMC,MAFN,GAsBIH,KAtBJ,CAEEI,EAFF;EAAA,qBAsBIJ,KAtBJ,CAGEK,OAHF;EAAA,IAGEA,OAHF,+BAGY,UAHZ;EAAA,mBAsBIL,KAtBJ,CAIEM,KAJF;EAAA,IAIEA,KAJF,6BAIU,SAJV;EAAA,IAKSC,SALT,GAsBIP,KAtBJ,CAKEL,KALF;EAAA,0BAsBIK,KAtBJ,CAMEQ,YANF;EAAA,IAMEA,YANF,oCAMiB,EAN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QAEE,EAAE,EAAEe,SAAS,GAAG,UAAH,GAAgB,OAF/B;QAGE,OAAO,EAAEX,OAHX;QAIE,IAAI,EAAEH,IAJR;QAKE,EAAE,EAAEmC,OALN;QAME,OAAO,EAAEvD,SAAS,CAACqC,OAAD,EAAUc,WAAV,CANpB;QAOE,MAAM,EAAEnD,SAAS,CAACsC,MAAD,EAASc,UAAT,CAPnB;QAQE,QAAQ,EAAEhB,QARZ;QASE,KAAK,EAAEvB,KATT;QAUE,KAAK,EAAEqC,KAVT;QAWE,WAAW,EAAEnB,WAXf;QAYE,QAAQ,EAAEH,QAZZ;QAaE,iBAAeA,QAAQ,GAAG,MAAH,GAAYb,SAbrC;QAcE,SAAS,EAAED,SAdb;QAeE,SAAS,EAAEoB,SAfb;QAgBE,oBAAkBsB,YAhBpB;QAiBE,QAAQ,EAAE,CAAC,CAAC1B,KAjBd;QAkBE,WAAW,EAAEwB,OAAO,CAACf,WAAD,CAlBtB;QAmBE,YAAY,EAAEe,OAAO,CAACd,YAAD;MAnBvB,GAoBME,UApBN,EAfF,EAqCGF,YAAY,iBACX,KAAC,aAAD;QAAe,QAAQ,EAAC,KAAxB;QAAA,UAA+BA;MAA/B,EAtCJ;IAAA,GADF,eA2CE,KAAC,UAAD;MACE,KAAK,EAAEa,QADT;MAEE,QAAQ,EAAEzB,QAFZ;MAGE,QAAQ,EAAEK,UAAU,iBAAI;QAAM,EAAE,EAAEuB,YAAV;QAAA,UAAyBvB;MAAzB,EAH1B;MAIE,SAAS,EACP,CAACJ,oBAAD,IACAjB,gBAAgB,CAACC,KAAD,EAAkBC,SAAlB;IANpB,EA3CF;EAAA,EADF;AAuDD,CAlHgC,CAA5B"}
1
+ {"version":3,"file":"TextField.js","names":["forwardRef","useState","useId","wrapEvent","useControlledState","Input","useTheme","FilledContainer","OutlinedContainer","HelperText","Box","IconContainer","jsx","_jsx","jsxs","_jsxs","componentMap","outlined","filled","characterCounter","value","maxLength","undefined","length","TextField","props","forwardedRef","type","id","idProp","variant","color","valueProp","defaultValue","error","disabled","hideCharacterCounter","label","placeholder","helperText","helperTextProp","multiline","onChange","onChangeProp","onFocus","onBlur","leadingIcon","trailingIcon","containerProps","otherProps","setState","e","target","hasFocus","setHasFocus","Container","fallbackId","theme","handleFocus","handleBlur","hasError","Boolean","inputId","helperTextId","labelIsFloating","display","flexDirection","width","children","position","ref","as","hasLabel","leftSide","rightSide"],"sources":["../../../src/TextField/TextField.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport { forwardRef, useState, useId } from 'react';\nimport { wrapEvent, useControlledState } from '@basic-ui/core';\n\nimport type { InputProps } from './Input';\nimport { Input } from './Input';\nimport { useTheme } from '../theme';\nimport { FilledContainer } from './FilledContainer';\nimport { OutlinedContainer } from './OutlinedContainer';\nimport { HelperText } from './HelperText';\nimport type { BoxProps } from '../Box';\nimport { Box } from '../Box';\nimport { IconContainer } from './IconContainer';\n\nconst componentMap = {\n outlined: OutlinedContainer,\n filled: FilledContainer,\n};\n\nfunction characterCounter(\n value: string | number | string[],\n maxLength?: number\n) {\n if (maxLength === undefined) {\n return null;\n }\n\n return `${typeof value === 'string' ? value.length : 0} / ${maxLength}`;\n}\n\nexport type TextFieldProps = Omit<InputProps, 'value' | 'defaultValue'> & {\n variant?: 'outlined' | 'filled';\n containerProps?: Omit<BoxProps, 'color'>;\n color?: 'primary' | 'secondary';\n label?: ReactNode;\n helperText?: string;\n maxLength?: number;\n hideCharacterCounter?: boolean;\n defaultValue?: string;\n value?: string;\n multiline?: boolean;\n error?: boolean | string;\n leadingIcon?: ReactNode;\n trailingIcon?: ReactNode;\n};\n\nexport const TextField = forwardRef<HTMLInputElement, TextFieldProps>(\n function TextField(props, forwardedRef) {\n const {\n type = 'text',\n id: idProp,\n variant = 'outlined',\n color = 'primary',\n value: valueProp,\n defaultValue = '',\n error,\n disabled,\n maxLength,\n hideCharacterCounter = false,\n label = null,\n placeholder,\n helperText: helperTextProp,\n multiline,\n onChange: onChangeProp,\n onFocus,\n onBlur,\n leadingIcon = null,\n trailingIcon = null,\n containerProps,\n ...otherProps\n } = props;\n const [value, onChange] = useControlledState(\n valueProp,\n onChangeProp,\n defaultValue,\n (setState) => (e) => {\n setState(e.target.value);\n }\n );\n const [hasFocus, setHasFocus] = useState(false);\n\n const Container = componentMap[variant] || OutlinedContainer;\n\n const fallbackId = useId();\n\n const theme = useTheme();\n\n const handleFocus = () => {\n setHasFocus(true);\n };\n\n const handleBlur = () => {\n setHasFocus(false);\n };\n\n const hasError = Boolean(error);\n const helperText = typeof error === 'string' ? error : helperTextProp;\n\n const id = idProp || fallbackId;\n const inputId = `${id}-text-field`;\n const helperTextId = helperText ? `${id}-helper-text` : undefined;\n\n const labelIsFloating =\n hasFocus || (typeof value === 'string' && value.length > 0);\n\n return (\n <Box display=\"inline-flex\" flexDirection=\"column\" width=\"100%\">\n <Container\n theme={theme}\n label={label}\n color={color}\n error={hasError}\n labelIsFloating={labelIsFloating}\n inputId={inputId}\n hasFocus={hasFocus}\n disabled={disabled}\n leadingIcon={Boolean(leadingIcon)}\n {...containerProps}\n >\n {leadingIcon && (\n <IconContainer position=\"start\">{leadingIcon}</IconContainer>\n )}\n <Input\n ref={forwardedRef}\n as={multiline ? 'textarea' : 'input'}\n variant={variant}\n type={type}\n id={inputId}\n onFocus={wrapEvent(onFocus, handleFocus)}\n onBlur={wrapEvent(onBlur, handleBlur)}\n onChange={onChange}\n value={value}\n theme={theme}\n placeholder={placeholder}\n disabled={disabled}\n aria-disabled={disabled ? 'true' : undefined}\n maxLength={maxLength}\n multiline={multiline}\n aria-describedby={helperTextId}\n hasLabel={!!label}\n leadingIcon={Boolean(leadingIcon)}\n trailingIcon={Boolean(trailingIcon)}\n {...otherProps}\n />\n {trailingIcon && (\n <IconContainer position=\"end\">{trailingIcon}</IconContainer>\n )}\n </Container>\n\n <HelperText\n error={hasError}\n disabled={disabled}\n leftSide={helperText && <span id={helperTextId}>{helperText}</span>}\n rightSide={\n !hideCharacterCounter &&\n characterCounter(value as string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D,QAAA,EAAErB;MAAY,CAAgB,CAC5D;IAAA,CACQ,CAAC,eAEZlC,IAAA,CAACJ,UAAU;MACTyB,KAAK,EAAE0B,QAAS;MAChBzB,QAAQ,EAAEA,QAAS;MACnBsC,QAAQ,EAAElC,UAAU,iBAAI1B,IAAA;QAAMe,EAAE,EAAEmC,YAAa;QAAAK,QAAA,EAAE7B;MAAU,CAAO,CAAE;MACpEmC,SAAS,EACP,CAACtC,oBAAoB,IACrBjB,gBAAgB,CAACC,KAAK,EAAYC,SAAS;IAC5C,CACF,CAAC;EAAA,CACC,CAAC;AAEV,CACF,CAAC","ignoreList":[]}
@@ -1,5 +1,5 @@
1
- export declare const PADDING_LEFT_WITH_ICON = 14;
2
- export declare const PADDING_LEFT_WITHOUT_ICON = 16;
3
- export declare const ICON_WIDTH = 24;
4
- export declare const PADDING_RIGHT_WITH_ICON = 12;
5
- export declare const PADDING_RIGHT_WITHOUT_ICON = 16;
1
+ export declare const PADDING_LEFT_WITH_ICON = 14;
2
+ export declare const PADDING_LEFT_WITHOUT_ICON = 16;
3
+ export declare const ICON_WIDTH = 24;
4
+ export declare const PADDING_RIGHT_WITH_ICON = 12;
5
+ export declare const PADDING_RIGHT_WITHOUT_ICON = 16;
@@ -1,6 +1,6 @@
1
- export var PADDING_LEFT_WITH_ICON = 14;
2
- export var PADDING_LEFT_WITHOUT_ICON = 16;
3
- export var ICON_WIDTH = 24;
4
- export var PADDING_RIGHT_WITH_ICON = 12;
5
- export var PADDING_RIGHT_WITHOUT_ICON = 16;
1
+ export const PADDING_LEFT_WITH_ICON = 14;
2
+ export const PADDING_LEFT_WITHOUT_ICON = 16;
3
+ export const ICON_WIDTH = 24;
4
+ export const PADDING_RIGHT_WITH_ICON = 12;
5
+ export const PADDING_RIGHT_WITHOUT_ICON = 16;
6
6
  //# sourceMappingURL=consts.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"consts.js","names":["PADDING_LEFT_WITH_ICON","PADDING_LEFT_WITHOUT_ICON","ICON_WIDTH","PADDING_RIGHT_WITH_ICON","PADDING_RIGHT_WITHOUT_ICON"],"sources":["../../../src/TextField/consts.ts"],"sourcesContent":["export const PADDING_LEFT_WITH_ICON = 14;\r\nexport const PADDING_LEFT_WITHOUT_ICON = 16;\r\n\r\nexport const ICON_WIDTH = 24;\r\n\r\nexport const PADDING_RIGHT_WITH_ICON = 12;\r\nexport const PADDING_RIGHT_WITHOUT_ICON = 16;\r\n"],"mappings":"AAAA,OAAO,IAAMA,sBAAsB,GAAG,EAA/B;AACP,OAAO,IAAMC,yBAAyB,GAAG,EAAlC;AAEP,OAAO,IAAMC,UAAU,GAAG,EAAnB;AAEP,OAAO,IAAMC,uBAAuB,GAAG,EAAhC;AACP,OAAO,IAAMC,0BAA0B,GAAG,EAAnC"}
1
+ {"version":3,"file":"consts.js","names":["PADDING_LEFT_WITH_ICON","PADDING_LEFT_WITHOUT_ICON","ICON_WIDTH","PADDING_RIGHT_WITH_ICON","PADDING_RIGHT_WITHOUT_ICON"],"sources":["../../../src/TextField/consts.ts"],"sourcesContent":["export const PADDING_LEFT_WITH_ICON = 14;\nexport const PADDING_LEFT_WITHOUT_ICON = 16;\n\nexport const ICON_WIDTH = 24;\n\nexport const PADDING_RIGHT_WITH_ICON = 12;\nexport const PADDING_RIGHT_WITHOUT_ICON = 16;\n"],"mappings":"AAAA,OAAO,MAAMA,sBAAsB,GAAG,EAAE;AACxC,OAAO,MAAMC,yBAAyB,GAAG,EAAE;AAE3C,OAAO,MAAMC,UAAU,GAAG,EAAE;AAE5B,OAAO,MAAMC,uBAAuB,GAAG,EAAE;AACzC,OAAO,MAAMC,0BAA0B,GAAG,EAAE","ignoreList":[]}
@@ -1,4 +1,4 @@
1
- export * from './TextField';
2
- export * from './FilledContainer';
3
- export * from './OutlinedContainer';
4
- export * from './HelperText';
1
+ export * from './TextField';
2
+ export * from './FilledContainer';
3
+ export * from './OutlinedContainer';
4
+ export * from './HelperText';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../src/TextField/index.ts"],"sourcesContent":["export * from './TextField';\r\nexport * from './FilledContainer';\r\nexport * from './OutlinedContainer';\r\nexport * from './HelperText';\r\n"],"mappings":"AAAA,cAAc,aAAd;AACA,cAAc,mBAAd;AACA,cAAc,qBAAd;AACA,cAAc,cAAd"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../src/TextField/index.ts"],"sourcesContent":["export * from './TextField';\nexport * from './FilledContainer';\nexport * from './OutlinedContainer';\nexport * from './HelperText';\n"],"mappings":"AAAA,cAAc,aAAa;AAC3B,cAAc,mBAAmB;AACjC,cAAc,qBAAqB;AACnC,cAAc,cAAc","ignoreList":[]}
@@ -1,7 +1,7 @@
1
- export declare function BorderSlider(props: {
2
- label: string;
3
- defaultValue: number;
4
- onChange: (value: number) => void;
5
- onReset: () => void;
6
- resetDisabled: boolean;
7
- }): JSX.Element;
1
+ export declare function BorderSlider(props: {
2
+ label: string;
3
+ defaultValue: number;
4
+ onChange: (value: number) => void;
5
+ onReset: () => void;
6
+ resetDisabled: boolean;
7
+ }): import("react/jsx-runtime").JSX.Element;
@@ -1,20 +1,14 @@
1
- import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
1
  import { startTransition, useEffect, useRef, useState } from 'react';
3
2
  import { Box } from '../Box';
4
3
  import { Link as BaseLink } from '../Link';
5
4
  import { Slider, SliderMarker } from '../Slider';
6
5
  import { Text } from '../Text';
7
- import { jsx as _jsx } from "react/jsx-runtime";
8
- import { jsxs as _jsxs } from "react/jsx-runtime";
9
- var Link = BaseLink;
6
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
7
+ const Link = BaseLink;
10
8
  export function BorderSlider(props) {
11
- var _useState = useState(props.defaultValue),
12
- _useState2 = _slicedToArray(_useState, 2),
13
- value = _useState2[0],
14
- setValue = _useState2[1];
15
-
16
- var resetting = useRef(false);
17
- useEffect(function () {
9
+ const [value, setValue] = useState(props.defaultValue);
10
+ const resetting = useRef(false);
11
+ useEffect(() => {
18
12
  if (resetting.current) {
19
13
  setValue(props.defaultValue);
20
14
  resetting.current = false;
@@ -33,7 +27,7 @@ export function BorderSlider(props) {
33
27
  children: [props.label, ' ', /*#__PURE__*/_jsx(Link, {
34
28
  as: "button",
35
29
  disabled: props.resetDisabled ? true : undefined,
36
- onClick: function onClick() {
30
+ onClick: () => {
37
31
  resetting.current = true;
38
32
  props.onReset();
39
33
  },
@@ -44,9 +38,9 @@ export function BorderSlider(props) {
44
38
  })]
45
39
  }), /*#__PURE__*/_jsxs(Slider, {
46
40
  value: value,
47
- onChange: function onChange(e, v) {
41
+ onChange: (e, v) => {
48
42
  setValue(v);
49
- startTransition(function () {
43
+ startTransition(() => {
50
44
  props.onChange(v);
51
45
  });
52
46
  },
@@ -1 +1 @@
1
- {"version":3,"file":"BorderSlider.js","names":["startTransition","useEffect","useRef","useState","Box","Link","BaseLink","Slider","SliderMarker","Text","BorderSlider","props","defaultValue","value","setValue","resetting","current","label","resetDisabled","undefined","onReset","e","v","onChange"],"sources":["../../../src/ThemeExplorer/BorderSlider.tsx"],"sourcesContent":["import type { ButtonHTMLAttributes, FC } from 'react';\r\nimport { startTransition, useEffect, useRef, useState } from 'react';\r\n\r\nimport type { BoxProps } from '../Box';\r\nimport { Box } from '../Box';\r\nimport { Link as BaseLink } from '../Link';\r\nimport { Slider, SliderMarker } from '../Slider';\r\nimport { Text } from '../Text';\r\n\r\nconst Link: FC<\r\n BoxProps<HTMLButtonElement, ButtonHTMLAttributes<HTMLButtonElement>>\r\n> = BaseLink as any;\r\n\r\nexport function BorderSlider(props: {\r\n label: string;\r\n defaultValue: number;\r\n onChange: (value: number) => void;\r\n onReset: () => void;\r\n resetDisabled: boolean;\r\n}) {\r\n const [value, setValue] = useState(props.defaultValue);\r\n\r\n const resetting = useRef(false);\r\n useEffect(() => {\r\n if (resetting.current) {\r\n setValue(props.defaultValue);\r\n resetting.current = false;\r\n }\r\n }, [props.defaultValue]);\r\n\r\n return (\r\n <Box width=\"100%\" display=\"flex\" flexDirection=\"column\">\r\n <Text display=\"flex\" justifyContent=\"space-between\" width=\"100%\" pb={2}>\r\n <span>\r\n {props.label}{' '}\r\n <Link\r\n as=\"button\"\r\n disabled={props.resetDisabled ? true : undefined}\r\n onClick={() => {\r\n resetting.current = true;\r\n props.onReset();\r\n }}\r\n >\r\n Reset\r\n </Link>\r\n </span>\r\n <span>{value}px</span>\r\n </Text>\r\n <Slider\r\n value={value}\r\n onChange={(e, v) => {\r\n setValue(v);\r\n startTransition(() => {\r\n props.onChange(v);\r\n });\r\n }}\r\n min={0}\r\n max={64}\r\n step={2}\r\n >\r\n <SliderMarker value={2} />\r\n <SliderMarker value={4} />\r\n <SliderMarker value={8} />\r\n <SliderMarker value={12} />\r\n <SliderMarker value={16} />\r\n <SliderMarker value={24} />\r\n <SliderMarker value={32} />\r\n <SliderMarker value={40} />\r\n <SliderMarker value={48} />\r\n </Slider>\r\n </Box>\r\n );\r\n}\r\n"],"mappings":";AACA,SAASA,eAAT,EAA0BC,SAA1B,EAAqCC,MAArC,EAA6CC,QAA7C,QAA6D,OAA7D;AAGA,SAASC,GAAT,QAAoB,QAApB;AACA,SAASC,IAAI,IAAIC,QAAjB,QAAiC,SAAjC;AACA,SAASC,MAAT,EAAiBC,YAAjB,QAAqC,WAArC;AACA,SAASC,IAAT,QAAqB,SAArB;;;AAEA,IAAMJ,IAEL,GAAGC,QAFJ;AAIA,OAAO,SAASI,YAAT,CAAsBC,KAAtB,EAMJ;EACD,gBAA0BR,QAAQ,CAACQ,KAAK,CAACC,YAAP,CAAlC;EAAA;EAAA,IAAOC,KAAP;EAAA,IAAcC,QAAd;;EAEA,IAAMC,SAAS,GAAGb,MAAM,CAAC,KAAD,CAAxB;EACAD,SAAS,CAAC,YAAM;IACd,IAAIc,SAAS,CAACC,OAAd,EAAuB;MACrBF,QAAQ,CAACH,KAAK,CAACC,YAAP,CAAR;MACAG,SAAS,CAACC,OAAV,GAAoB,KAApB;IACD;EACF,CALQ,E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AArB,EAlBF,eAmBE,KAAC,YAAD;QAAc,KAAK,EAAE;MAArB,EAnBF,eAoBE,KAAC,YAAD;QAAc,KAAK,EAAE;MAArB,EApBF;IAAA,EAjBF;EAAA,EADF;AA0CD"}
1
+ {"version":3,"file":"BorderSlider.js","names":["startTransition","useEffect","useRef","useState","Box","Link","BaseLink","Slider","SliderMarker","Text","jsx","_jsx","jsxs","_jsxs","BorderSlider","props","value","setValue","defaultValue","resetting","current","width","display","flexDirection","children","justifyContent","pb","label","as","disabled","resetDisabled","undefined","onClick","onReset","onChange","e","v","min","max","step"],"sources":["../../../src/ThemeExplorer/BorderSlider.tsx"],"sourcesContent":["import type { ButtonHTMLAttributes, FC } from 'react';\nimport { startTransition, useEffect, useRef, useState } from 'react';\n\nimport type { BoxProps } from '../Box';\nimport { Box } from '../Box';\nimport { Link as BaseLink } from '../Link';\nimport { Slider, SliderMarker } from '../Slider';\nimport { Text } from '../Text';\n\nconst Link: FC<\n BoxProps<HTMLButtonElement, ButtonHTMLAttributes<HTMLButtonElement>>\n> = BaseLink as any;\n\nexport function BorderSlider(props: {\n label: string;\n defaultValue: number;\n onChange: (value: number) => void;\n onReset: () => void;\n resetDisabled: boolean;\n}) {\n const [value, setValue] = useState(props.defaultValue);\n\n const resetting = useRef(false);\n useEffect(() => {\n if (resetting.current) {\n setValue(props.defaultValue);\n resetting.current = false;\n }\n }, [props.defaultValue]);\n\n return (\n <Box width=\"100%\" display=\"flex\" flexDirection=\"column\">\n <Text display=\"flex\" justifyContent=\"space-between\" width=\"100%\" pb={2}>\n <span>\n {props.label}{' '}\n <Link\n as=\"button\"\n disabled={props.resetDisabled ? true : undefined}\n onClick={() => {\n resetting.current = true;\n props.onReset();\n }}\n >\n Reset\n </Link>\n </span>\n <span>{value}px</span>\n </Text>\n <Slider\n value={value}\n onChange={(e, v) => {\n setValue(v);\n startTransition(() => {\n props.onChange(v);\n });\n }}\n min={0}\n max={64}\n step={2}\n >\n <SliderMarker value={2} />\n <SliderMarker value={4} />\n <SliderMarker value={8} />\n <SliderMarker value={12} />\n <SliderMarker value={16} />\n <SliderMarker value={24} />\n <SliderMarker value={32} />\n <SliderMarker value={40} />\n <SliderMarker value={48} />\n </Slider>\n </Box>\n );\n}\n"],"mappings":"AACA,SAASA,eAAe,EAAEC,SAAS,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AAGpE,SAASC,GAAG,QAAQ,QAAQ;AAC5B,SAASC,IAAI,IAAIC,QAAQ,QAAQ,SAAS;AAC1C,SAASC,MAAM,EAAEC,YAAY,QAAQ,WAAW;AAChD,SAASC,IAAI,QAAQ,SAAS;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAE/B,MAAMR,IAEL,GAAGC,QAAe;AAEnB,OAAO,SAASQ,YAAYA,CAACC,KAM5B,EAAE;EACD,MAAM,CAACC,KAAK,EAAEC,QAAQ,CAAC,GAAGd,QAAQ,CAACY,KAAK,CAACG,YAAY,CAAC;EAEtD,MAAMC,SAAS,GAAGjB,MAAM,CAAC,KAAK,CAAC;EAC/BD,SAAS,CAAC,MAAM;IACd,IAAIkB,SAAS,CAACC,OAAO,EAAE;MACrBH,QAAQ,CAACF,KAAK,CAACG,YAAY,CAAC;MAC5BC,SAAS,CAACC,OAAO,GAAG,KAAK;IAC3B;EACF,CAAC,EAAE,CAACL,KAAK,CAACG,YAAY,CAAC,CAAC;EAExB,oBACEL,KAAA,CAACT,GAAG;IAACiB,KAAK,EAAC,MAAM;IAACC,OAAO,EAAC,MAAM;IAACC,aAAa,EAAC,QAAQ;IAAAC,QAAA,gBACrDX,KAAA,CAACJ,IAAI;MAACa,OAAO,EAAC,MAAM;MAACG,cAAc,EAAC,eAAe;MAACJ,KAAK,EAAC,MAAM;MAACK,EAAE,EAAE,CAAE;MAAAF,QAAA,gBACrEX,KAAA;QAAAW,QAAA,GACGT,KAAK,CAACY,KAAK,EAAE,GAAG,eACjBhB,IAAA,CAACN,IAAI;UACHuB,EA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C;IAAA,CACrB,CAAC;EAAA,CACN,CAAC;AAEV","ignoreList":[]}
@@ -1,8 +1,8 @@
1
- import type { Color, ColorPickerProps as BaseColorPickerProps } from '@basic-ui/color-picker';
2
- import type { FC } from 'react';
3
- import type { BoxProps } from '../Box';
4
- export declare type ColorPickerProps = (Omit<BoxProps, 'color' | 'onChange'> & BaseColorPickerProps) & {
5
- color: Color;
6
- onChange: (color: Color) => void;
7
- };
8
- export declare const ColorPicker: FC<ColorPickerProps>;
1
+ import type { Color, ColorPickerProps as BaseColorPickerProps } from '@basic-ui/color-picker';
2
+ import type { FC } from 'react';
3
+ import type { BoxProps } from '../Box';
4
+ export type ColorPickerProps = (Omit<BoxProps, 'color' | 'onChange'> & BaseColorPickerProps) & {
5
+ color: Color;
6
+ onChange: (color: Color) => void;
7
+ };
8
+ export declare const ColorPicker: FC<ColorPickerProps>;
@@ -1,31 +1,26 @@
1
- import _extends from "@babel/runtime/helpers/extends";
2
- import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
- var _excluded = ["color", "onChange", "width", "height"];
4
1
  import { ColorPicker as _BaseColorPicker, Hue as _Hue, HueCursor as _HueCursor, Saturation as _Saturation, SaturationCursor as _SaturationCursor } from '@basic-ui/color-picker';
5
2
  import { Box } from '../Box';
6
- import { jsx as _jsx } from "react/jsx-runtime";
7
- import { jsxs as _jsxs } from "react/jsx-runtime";
8
- var BaseColorPicker = _BaseColorPicker;
9
- var Hue = _Hue;
10
- var HueCursor = _HueCursor;
11
- var Saturation = _Saturation;
12
- var SaturationCursor = _SaturationCursor;
13
- export var ColorPicker = function ColorPicker(_ref) {
14
- var color = _ref.color,
15
- onChange = _ref.onChange,
16
- _ref$width = _ref.width,
17
- width = _ref$width === void 0 ? 450 : _ref$width,
18
- _ref$height = _ref.height,
19
- height = _ref$height === void 0 ? 225 : _ref$height,
20
- otherProps = _objectWithoutProperties(_ref, _excluded);
21
-
22
- return /*#__PURE__*/_jsxs(BaseColorPicker, _extends(_extends({
3
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
4
+ const BaseColorPicker = _BaseColorPicker;
5
+ const Hue = _Hue;
6
+ const HueCursor = _HueCursor;
7
+ const Saturation = _Saturation;
8
+ const SaturationCursor = _SaturationCursor;
9
+ export const ColorPicker = _ref => {
10
+ let {
11
+ color,
12
+ onChange,
13
+ width = 450,
14
+ height = 225,
15
+ ...otherProps
16
+ } = _ref;
17
+ return /*#__PURE__*/_jsxs(BaseColorPicker, {
23
18
  as: Box,
24
19
  width: width,
25
20
  height: height,
26
21
  onChange: onChange,
27
- color: color
28
- }, otherProps), {}, {
22
+ color: color,
23
+ ...otherProps,
29
24
  children: [/*#__PURE__*/_jsx(Saturation, {
30
25
  as: Box,
31
26
  sx: {
@@ -56,7 +51,7 @@ export var ColorPicker = function ColorPicker(_ref) {
56
51
  userSelect: 'none',
57
52
  width: '100%',
58
53
  height: '12px',
59
- backgroundImage: "linear-gradient(to right, rgb(255, 0, 0), rgb(255, 255, 0), rgb(0, 255, 0), rgb(0, 255, 255), rgb(0, 0, 255), rgb(255, 0, 255), rgb(255, 0, 0))"
54
+ backgroundImage: `linear-gradient(to right, rgb(255, 0, 0), rgb(255, 255, 0), rgb(0, 255, 0), rgb(0, 255, 255), rgb(0, 0, 255), rgb(255, 0, 255), rgb(255, 0, 0))`
60
55
  },
61
56
  children: /*#__PURE__*/_jsx(HueCursor, {
62
57
  as: Box,
@@ -72,6 +67,6 @@ export var ColorPicker = function ColorPicker(_ref) {
72
67
  }
73
68
  })
74
69
  })]
75
- }));
70
+ });
76
71
  };
77
72
  //# sourceMappingURL=ColorPicker.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ColorPicker.js","names":["ColorPicker","_BaseColorPicker","Hue","_Hue","HueCursor","_HueCursor","Saturation","_Saturation","SaturationCursor","_SaturationCursor","Box","BaseColorPicker","color","onChange","width","height","otherProps","position","touchAction","userSelect","backgroundImage","border","borderRadius","boxShadow","boxSizing","transform"],"sources":["../../../src/ThemeExplorer/ColorPicker.tsx"],"sourcesContent":["import type {\r\n Color,\r\n ColorPickerProps as BaseColorPickerProps,\r\n HueProps,\r\n HueCursorProps,\r\n SaturationProps,\r\n SaturationCursorProps,\r\n} from '@basic-ui/color-picker';\r\nimport {\r\n ColorPicker as _BaseColorPicker,\r\n Hue as _Hue,\r\n HueCursor as _HueCursor,\r\n Saturation as _Saturation,\r\n SaturationCursor as _SaturationCursor,\r\n} from '@basic-ui/color-picker';\r\nimport type { FC } from 'react';\r\n\r\nimport type { BoxProps } from '../Box';\r\nimport { Box } from '../Box';\r\n\r\nexport type ColorPickerProps = (Omit<BoxProps, 'color' | 'onChange'> &\r\n BaseColorPickerProps) & {\r\n color: Color;\r\n onChange: (color: Color) => void;\r\n};\r\n\r\nconst BaseColorPicker: FC<\r\n Omit<BoxProps, 'color' | 'onChange'> & BaseColorPickerProps\r\n> = _BaseColorPicker as any;\r\nconst Hue: FC<BoxProps & HueProps> = _Hue as any;\r\nconst HueCursor: FC<BoxProps & HueCursorProps> = _HueCursor as any;\r\nconst Saturation: FC<BoxProps & SaturationProps> = _Saturation as any;\r\nconst SaturationCursor: FC<BoxProps & SaturationCursorProps> =\r\n _SaturationCursor as any;\r\n\r\nexport const ColorPicker: FC<ColorPickerProps> = ({\r\n color,\r\n onChange,\r\n width = 450,\r\n height = 225,\r\n ...otherProps\r\n}) => {\r\n return (\r\n <BaseColorPicker\r\n as={Box}\r\n width={width}\r\n height={height}\r\n onChange={onChange}\r\n color={color}\r\n {...otherProps}\r\n >\r\n <Saturation\r\n as={Box}\r\n sx={{\r\n position: 'relative',\r\n touchAction: 'none',\r\n userSelect: 'none',\r\n width: '100%',\r\n backgroundImage:\r\n 'linear-gradient(transparent, black), linear-gradient(to right, white, transparent)',\r\n }}\r\n >\r\n <SaturationCursor\r\n as={Box}\r\n sx={{\r\n position: 'absolute',\r\n width: '20px',\r\n height: '20px',\r\n border: '2px solid #ffffff',\r\n borderRadius: 'full',\r\n boxShadow: '0 0 15px 0 rgba(0, 0, 0, 0.15)',\r\n boxSizing: 'border-box',\r\n transform: 'translate(-10px, -10px)',\r\n }}\r\n />\r\n </Saturation>\r\n <Hue\r\n as={Box}\r\n sx={{\r\n position: 'relative',\r\n touchAction: 'none',\r\n userSelect: 'none',\r\n width: '100%',\r\n height: '12px',\r\n backgroundImage: `linear-gradient(to right, rgb(255, 0, 0), rgb(255, 255, 0), rgb(0, 255, 0), rgb(0, 255, 255), rgb(0, 0, 255), rgb(255, 0, 255), rgb(255, 0, 0))`,\r\n }}\r\n >\r\n <HueCursor\r\n as={Box}\r\n sx={{\r\n position: 'absolute',\r\n width: '20px',\r\n height: '20px',\r\n border: '2px solid #ffffff',\r\n borderRadius: 'full',\r\n boxShadow: 'rgba(0, 0, 0, 0.2) 0px 0px 0px 0.5px',\r\n boxSizing: 'border-box',\r\n transform: 'translate(-10px, -4px)',\r\n }}\r\n />\r\n </Hue>\r\n </BaseColorPicker>\r\n );\r\n};\r\n"],"mappings":";;;AAQA,SACEA,WAAW,IAAIC,gBADjB,EAEEC,GAAG,IAAIC,IAFT,EAGEC,SAAS,IAAIC,UAHf,EAIEC,UAAU,IAAIC,WAJhB,EAKEC,gBAAgB,IAAIC,iBALtB,QAMO,wBANP;AAUA,SAASC,GAAT,QAAoB,QAApB;;;AAQA,IAAMC,eAEL,GAAGV,gBAFJ;AAGA,IAAMC,GAA4B,GAAGC,IAArC;AACA,IAAMC,SAAwC,GAAGC,UAAjD;AACA,IAAMC,UAA0C,GAAGC,WAAnD;AACA,IAAMC,gBAAsD,GAC1DC,iBADF;AAGA,OAAO,IAAMT,WAAiC,GAAG,SAApCA,WAAoC,OAM3C;EAAA,IALJY,KAKI,QALJA,KAKI;EAAA,IAJJC,QAII,QAJJA,QAII;EAAA,sBAHJC,KAGI;EAAA,IAHJA,KAGI,2BAHI,GAGJ;EAAA,uBAFJC,MAEI;EAAA,IAFJA,MAEI,4BAFK,GAEL;EAAA,IADDC,UACC;;EACJ,oBACE,MA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turation","SaturationCursor","_SaturationCursor","Box","jsx","_jsx","jsxs","_jsxs","BaseColorPicker","_ref","color","onChange","width","height","otherProps","as","children","sx","position","touchAction","userSelect","backgroundImage","border","borderRadius","boxShadow","boxSizing","transform"],"sources":["../../../src/ThemeExplorer/ColorPicker.tsx"],"sourcesContent":["import type {\n Color,\n ColorPickerProps as BaseColorPickerProps,\n HueProps,\n HueCursorProps,\n SaturationProps,\n SaturationCursorProps,\n} from '@basic-ui/color-picker';\nimport {\n ColorPicker as _BaseColorPicker,\n Hue as _Hue,\n HueCursor as _HueCursor,\n Saturation as _Saturation,\n SaturationCursor as _SaturationCursor,\n} from '@basic-ui/color-picker';\nimport type { FC } from 'react';\n\nimport type { BoxProps } from '../Box';\nimport { Box } from '../Box';\n\nexport type ColorPickerProps = (Omit<BoxProps, 'color' | 'onChange'> &\n BaseColorPickerProps) & {\n color: Color;\n onChange: (color: Color) => void;\n};\n\nconst BaseColorPicker: FC<\n Omit<BoxProps, 'color' | 'onChange'> & BaseColorPickerProps\n> = _BaseColorPicker as any;\nconst Hue: FC<BoxProps & HueProps> = _Hue as any;\nconst HueCursor: FC<BoxProps & HueCursorProps> = _HueCursor as any;\nconst Saturation: FC<BoxProps & SaturationProps> = _Saturation as any;\nconst SaturationCursor: FC<BoxProps & SaturationCursorProps> =\n _SaturationCursor as any;\n\nexport const ColorPicker: FC<ColorPickerProps> = ({\n color,\n onChange,\n width = 450,\n height = 225,\n ...otherProps\n}) => {\n return (\n <BaseColorPicker\n as={Box}\n width={width}\n height={height}\n onChange={onChange}\n color={color}\n {...otherProps}\n >\n <Saturation\n as={Box}\n sx={{\n position: 'relative',\n touchAction: 'none',\n userSelect: 'none',\n width: '100%',\n backgroundImage:\n 'linear-gradient(transparent, black), linear-gradient(to right, white, transparent)',\n }}\n >\n <SaturationCursor\n as={Box}\n sx={{\n position: 'absolute',\n width: '20px',\n height: '20px',\n border: '2px solid #ffffff',\n borderRadius: 'full',\n boxShadow: '0 0 15px 0 rgba(0, 0, 0, 0.15)',\n boxSizing: 'border-box',\n transform: 'translate(-10px, -10px)',\n }}\n />\n </Saturation>\n <Hue\n as={Box}\n sx={{\n position: 'relative',\n touchAction: 'none',\n userSelect: 'none',\n width: '100%',\n height: '12px',\n backgroundImage: `linear-gradient(to right, rgb(255, 0, 0), rgb(255, 255, 0), rgb(0, 255, 0), rgb(0, 255, 255), rgb(0, 0, 255), rgb(255, 0, 255), rgb(255, 0, 0))`,\n }}\n >\n <HueCursor\n as={Box}\n sx={{\n position: 'absolute',\n width: '20px',\n height: '20px',\n border: '2px solid #ffffff',\n borderRadius: 'full',\n boxShadow: 'rgba(0, 0, 0, 0.2) 0px 0px 0px 0.5px',\n boxSizing: 'border-box',\n transform: 'translate(-10px, -4px)',\n }}\n />\n </Hue>\n </BaseColorPicker>\n );\n};\n"],"mappings":"AAQA,SACEA,WAAW,IAAIC,gBAAgB,EAC/BC,GAAG,IAAIC,IAAI,EACXC,SAAS,IAAIC,UAAU,EACvBC,UAAU,IAAIC,WAAW,EACzBC,gBAAgB,IAAIC,iBAAiB,QAChC,wBAAwB;AAI/B,SAASC,GAAG,QAAQ,QAAQ;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAQ7B,MAAMC,eAEL,GAAGd,gBAAuB;AAC3B,MAAMC,GAA4B,GAAGC,IAAW;AAChD,MAAMC,SAAwC,GAAGC,UAAiB;AAClE,MAAMC,UAA0C,GAAGC,WAAkB;AACrE,MAAMC,gBAAsD,GAC1DC,iBAAwB;AAE1B,OAAO,MAAMT,WAAiC,GAAGgB,IAAA,IAM3C;EAAA,IAN4C;IAChDC,KAAK;IACLC,QAAQ;IACRC,KAAK,GAAG,GAAG;IACXC,MAAM,GAAG,GAAG;IACZ,GAAGC;EACL,CAAC,GAAAL,IAAA;EACC,oBACEF,KAAA,CAACC,eAAe;IACdO,EAAE,EAAEZ,GAAI;IACRS,KAAK,EAAEA,KAAM;IACbC,MAAM,EAAEA,MAAO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ui/color-picker';
2
- interface ColorSchemePickerProps {
3
- label: string;
4
- initialValue: Color;
5
- onChange: (c: Color) => void;
6
- onReset: () => void;
7
- resetDisabled: boolean;
8
- }
9
- export declare function ColorSchemePicker(props: ColorSchemePickerProps): JSX.Element;
10
- export {};
1
+ import type { Color } from '@basic-ui/color-picker';
2
+ interface ColorSchemePickerProps {
3
+ label: string;
4
+ initialValue: Color;
5
+ onChange: (c: Color) => void;
6
+ onReset: () => void;
7
+ resetDisabled: boolean;
8
+ }
9
+ export declare function ColorSchemePicker(props: ColorSchemePickerProps): import("react/jsx-runtime").JSX.Element;
10
+ export {};
@@ -1,25 +1,20 @@
1
- import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
1
  import { startTransition, useEffect, useRef, useState } from 'react';
3
2
  import { Box } from '../Box';
4
3
  import { Button } from '../Button';
5
4
  import { TextFieldColorPicker } from './TextFieldColorPicker';
6
- import { jsx as _jsx } from "react/jsx-runtime";
7
- import { jsxs as _jsxs } from "react/jsx-runtime";
5
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
8
6
  export function ColorSchemePicker(props) {
9
- var label = props.label,
10
- initialValue = props.initialValue,
11
- _onChange = props.onChange,
12
- onReset = props.onReset,
13
- resetDisabled = props.resetDisabled;
14
-
15
- var _useState = useState(initialValue),
16
- _useState2 = _slicedToArray(_useState, 2),
17
- value = _useState2[0],
18
- setValue = _useState2[1];
19
-
20
- var remountKey = useRef(0);
21
- var resetting = useRef(false);
22
- useEffect(function () {
7
+ const {
8
+ label,
9
+ initialValue,
10
+ onChange,
11
+ onReset,
12
+ resetDisabled
13
+ } = props;
14
+ const [value, setValue] = useState(initialValue);
15
+ const remountKey = useRef(0);
16
+ const resetting = useRef(false);
17
+ useEffect(() => {
23
18
  if (resetting.current) {
24
19
  remountKey.current++;
25
20
  resetting.current = false;
@@ -34,16 +29,16 @@ export function ColorSchemePicker(props) {
34
29
  children: [/*#__PURE__*/_jsx(TextFieldColorPicker, {
35
30
  label: label,
36
31
  value: value,
37
- onChange: function onChange(c) {
32
+ onChange: c => {
38
33
  setValue(c);
39
- startTransition(function () {
40
- _onChange(c);
34
+ startTransition(() => {
35
+ onChange(c);
41
36
  });
42
37
  }
43
38
  }, remountKey.current), /*#__PURE__*/_jsx(Button, {
44
39
  variant: "text",
45
40
  disabled: resetDisabled,
46
- onClick: function onClick() {
41
+ onClick: () => {
47
42
  resetting.current = true;
48
43
  onReset();
49
44
  },