@bspk/ui 1.3.7 → 1.3.9

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 (398) hide show
  1. package/dist/components/Accordion/Accordion.d.ts +19 -3
  2. package/dist/components/Accordion/Accordion.js +20 -3
  3. package/dist/components/Accordion/Accordion.js.map +1 -1
  4. package/dist/components/Avatar/Avatar.d.ts +13 -14
  5. package/dist/components/Avatar/Avatar.js +13 -14
  6. package/dist/components/Avatar/Avatar.js.map +1 -1
  7. package/dist/components/AvatarGroup/AvatarGroup.d.ts +29 -12
  8. package/dist/components/AvatarGroup/AvatarGroup.js +29 -12
  9. package/dist/components/AvatarGroup/AvatarGroup.js.map +1 -1
  10. package/dist/components/Badge/Badge.d.ts +1 -3
  11. package/dist/components/Badge/Badge.js +1 -3
  12. package/dist/components/Badge/Badge.js.map +1 -1
  13. package/dist/components/BadgeDot/BadgeDot.d.ts +4 -4
  14. package/dist/components/BadgeDot/BadgeDot.js +5 -4
  15. package/dist/components/BadgeDot/BadgeDot.js.map +1 -1
  16. package/dist/components/BannerAlert/BannerAlert.d.ts +11 -12
  17. package/dist/components/BannerAlert/BannerAlert.js +11 -12
  18. package/dist/components/BannerAlert/BannerAlert.js.map +1 -1
  19. package/dist/components/BottomNavigation/BottomNavigation.d.ts +6 -3
  20. package/dist/components/BottomNavigation/BottomNavigation.js +6 -3
  21. package/dist/components/BottomNavigation/BottomNavigation.js.map +1 -1
  22. package/dist/components/BottomNavigation/BottomNavigationExample.js +31 -36
  23. package/dist/components/BottomNavigation/BottomNavigationExample.js.map +1 -1
  24. package/dist/components/BottomNavigation/bottom-navigation.css +8 -1
  25. package/dist/components/BottomNavigation/bottom-navigation.css.js +8 -1
  26. package/dist/components/Breadcrumb/Breadcrumb.d.ts +17 -18
  27. package/dist/components/Breadcrumb/Breadcrumb.js +17 -18
  28. package/dist/components/Breadcrumb/Breadcrumb.js.map +1 -1
  29. package/dist/components/Button/Button.d.ts +1 -11
  30. package/dist/components/Button/Button.js +1 -11
  31. package/dist/components/Button/Button.js.map +1 -1
  32. package/dist/components/Button/ButtonExample.js +1 -3
  33. package/dist/components/Button/ButtonExample.js.map +1 -1
  34. package/dist/components/ButtonDock/ButtonDock.d.ts +10 -14
  35. package/dist/components/ButtonDock/ButtonDock.js +10 -14
  36. package/dist/components/ButtonDock/ButtonDock.js.map +1 -1
  37. package/dist/components/Card/Card.d.ts +8 -10
  38. package/dist/components/Card/Card.js +6 -10
  39. package/dist/components/Card/Card.js.map +1 -1
  40. package/dist/components/Carousel/Carousel.d.ts +9 -13
  41. package/dist/components/Carousel/Carousel.js +9 -13
  42. package/dist/components/Carousel/Carousel.js.map +1 -1
  43. package/dist/components/Carousel/CarouselExample.js +14 -14
  44. package/dist/components/Carousel/CarouselExample.js.map +1 -1
  45. package/dist/components/Checkbox/Checkbox.d.ts +7 -4
  46. package/dist/components/Checkbox/Checkbox.js +7 -4
  47. package/dist/components/Checkbox/Checkbox.js.map +1 -1
  48. package/dist/components/Checkbox/CheckboxExample.js +4 -1
  49. package/dist/components/Checkbox/CheckboxExample.js.map +1 -1
  50. package/dist/components/CheckboxGroup/CheckboxGroup.d.ts +3 -3
  51. package/dist/components/CheckboxGroup/CheckboxGroup.js +3 -3
  52. package/dist/components/CheckboxOption/CheckboxOption.d.ts +4 -4
  53. package/dist/components/CheckboxOption/CheckboxOption.js +4 -4
  54. package/dist/components/Chip/Chip.d.ts +3 -7
  55. package/dist/components/Chip/Chip.js +3 -7
  56. package/dist/components/Chip/Chip.js.map +1 -1
  57. package/dist/components/Chip/ChipExample.js +50 -3
  58. package/dist/components/Chip/ChipExample.js.map +1 -1
  59. package/dist/components/ChipGroup/ChipGroup.d.ts +21 -10
  60. package/dist/components/ChipGroup/ChipGroup.js +21 -10
  61. package/dist/components/ChipGroup/ChipGroup.js.map +1 -1
  62. package/dist/components/ChipGroup/ChipGroupExample.js +1 -0
  63. package/dist/components/ChipGroup/ChipGroupExample.js.map +1 -1
  64. package/dist/components/DatePicker/DatePicker.d.ts +13 -12
  65. package/dist/components/DatePicker/DatePicker.js +13 -12
  66. package/dist/components/DatePicker/DatePicker.js.map +1 -1
  67. package/dist/components/Dialog/Dialog.d.ts +11 -6
  68. package/dist/components/Dialog/Dialog.js +11 -6
  69. package/dist/components/Dialog/Dialog.js.map +1 -1
  70. package/dist/components/Divider/Divider.d.ts +5 -9
  71. package/dist/components/Divider/Divider.js +5 -9
  72. package/dist/components/Divider/Divider.js.map +1 -1
  73. package/dist/components/Divider/DividerExample.js +16 -1
  74. package/dist/components/Divider/DividerExample.js.map +1 -1
  75. package/dist/components/Drawer/Drawer.d.ts +3 -3
  76. package/dist/components/Drawer/Drawer.js +3 -3
  77. package/dist/components/EmptyState/EmptyState.d.ts +3 -7
  78. package/dist/components/EmptyState/EmptyState.js +3 -7
  79. package/dist/components/EmptyState/EmptyState.js.map +1 -1
  80. package/dist/components/Fab/Fab.d.ts +4 -5
  81. package/dist/components/Fab/Fab.js +4 -6
  82. package/dist/components/Fab/Fab.js.map +1 -1
  83. package/dist/components/Fab/FabExample.d.ts +2 -1
  84. package/dist/components/Fab/FabExample.js +20 -2
  85. package/dist/components/Fab/FabExample.js.map +1 -1
  86. package/dist/components/Field/Field.d.ts +4 -5
  87. package/dist/components/Field/Field.js +4 -5
  88. package/dist/components/Field/Field.js.map +1 -1
  89. package/dist/components/FileUpload/FileUpload.d.ts +3 -3
  90. package/dist/components/FileUpload/FileUpload.js +3 -3
  91. package/dist/components/FileUploadItem/FileUploadItem.d.ts +6 -10
  92. package/dist/components/FileUploadItem/FileUploadItem.js +6 -10
  93. package/dist/components/FileUploadItem/FileUploadItem.js.map +1 -1
  94. package/dist/components/FormField/FormField.d.ts +5 -16
  95. package/dist/components/FormField/FormField.js +5 -16
  96. package/dist/components/FormField/FormField.js.map +1 -1
  97. package/dist/components/Img/Img.d.ts +1 -3
  98. package/dist/components/Img/Img.js +1 -3
  99. package/dist/components/Img/Img.js.map +1 -1
  100. package/dist/components/InlineAlert/InlineAlert.d.ts +1 -3
  101. package/dist/components/InlineAlert/InlineAlert.js +1 -3
  102. package/dist/components/InlineAlert/InlineAlert.js.map +1 -1
  103. package/dist/components/Input/Input.d.ts +13 -13
  104. package/dist/components/Input/Input.js +13 -13
  105. package/dist/components/Input/InputElement.d.ts +11 -5
  106. package/dist/components/Input/InputElement.js +11 -5
  107. package/dist/components/Input/InputElement.js.map +1 -1
  108. package/dist/components/Input/InputExample.js +1 -0
  109. package/dist/components/Input/InputExample.js.map +1 -1
  110. package/dist/components/InputNumber/InputNumber.d.ts +20 -20
  111. package/dist/components/InputNumber/InputNumber.js +20 -20
  112. package/dist/components/InputNumber/InputNumberExample.js +3 -0
  113. package/dist/components/InputNumber/InputNumberExample.js.map +1 -1
  114. package/dist/components/InputPhone/InputPhone.d.ts +21 -16
  115. package/dist/components/InputPhone/InputPhone.js +21 -16
  116. package/dist/components/InputPhone/InputPhone.js.map +1 -1
  117. package/dist/components/InputPhone/InputPhoneExample.js +3 -0
  118. package/dist/components/InputPhone/InputPhoneExample.js.map +1 -1
  119. package/dist/components/Layout/Layout.d.ts +1 -3
  120. package/dist/components/Layout/Layout.js +1 -3
  121. package/dist/components/Layout/Layout.js.map +1 -1
  122. package/dist/components/Link/Link.d.ts +1 -3
  123. package/dist/components/Link/Link.js +1 -3
  124. package/dist/components/Link/Link.js.map +1 -1
  125. package/dist/components/ListItem/ListItem.d.ts +22 -21
  126. package/dist/components/ListItem/ListItem.js +19 -16
  127. package/dist/components/ListItem/ListItem.js.map +1 -1
  128. package/dist/components/Menu/Menu.d.ts +5 -9
  129. package/dist/components/Menu/Menu.js +5 -9
  130. package/dist/components/Menu/Menu.js.map +1 -1
  131. package/dist/components/Modal/Modal.d.ts +4 -4
  132. package/dist/components/Modal/Modal.js +4 -4
  133. package/dist/components/Modal/Modal.js.map +1 -1
  134. package/dist/components/Modal/modal.css +12 -1
  135. package/dist/components/Modal/modal.css.js +12 -1
  136. package/dist/components/OTPInput/OTPInput.d.ts +1 -3
  137. package/dist/components/OTPInput/OTPInput.js +1 -3
  138. package/dist/components/OTPInput/OTPInput.js.map +1 -1
  139. package/dist/components/PageControl/PageControl.d.ts +1 -3
  140. package/dist/components/PageControl/PageControl.js +1 -3
  141. package/dist/components/PageControl/PageControl.js.map +1 -1
  142. package/dist/components/Pagination/Pagination.d.ts +6 -7
  143. package/dist/components/Pagination/Pagination.js +28 -15
  144. package/dist/components/Pagination/Pagination.js.map +1 -1
  145. package/dist/components/Pagination/pagination.css +5 -14
  146. package/dist/components/Pagination/pagination.css.js +5 -14
  147. package/dist/components/Password/Password.d.ts +19 -20
  148. package/dist/components/Password/Password.js +19 -20
  149. package/dist/components/Password/Password.js.map +1 -1
  150. package/dist/components/Password/PasswordExample.d.ts +3 -0
  151. package/dist/components/Password/PasswordExample.js +6 -0
  152. package/dist/components/Password/PasswordExample.js.map +1 -0
  153. package/dist/components/Popover/Popover.d.ts +11 -20
  154. package/dist/components/Popover/Popover.js +11 -20
  155. package/dist/components/Popover/Popover.js.map +1 -1
  156. package/dist/components/Popover/PopoverExample.js +1 -1
  157. package/dist/components/Popover/PopoverExample.js.map +1 -1
  158. package/dist/components/ProgressBar/ProgressBar.d.ts +1 -3
  159. package/dist/components/ProgressBar/ProgressBar.js +1 -3
  160. package/dist/components/ProgressBar/ProgressBar.js.map +1 -1
  161. package/dist/components/ProgressCircle/ProgressCircle.d.ts +1 -3
  162. package/dist/components/ProgressCircle/ProgressCircle.js +1 -3
  163. package/dist/components/ProgressCircle/ProgressCircle.js.map +1 -1
  164. package/dist/components/ProgressionStepper/ProgressionStepper.d.ts +1 -3
  165. package/dist/components/ProgressionStepper/ProgressionStepper.js +1 -3
  166. package/dist/components/ProgressionStepper/ProgressionStepper.js.map +1 -1
  167. package/dist/components/Radio/RadioExample.js +4 -1
  168. package/dist/components/Radio/RadioExample.js.map +1 -1
  169. package/dist/components/RadioGroup/RadioGroup.d.ts +2 -2
  170. package/dist/components/RadioGroup/RadioGroup.js +2 -2
  171. package/dist/components/Rating/Rating.d.ts +2 -4
  172. package/dist/components/Rating/Rating.js +8 -6
  173. package/dist/components/Rating/Rating.js.map +1 -1
  174. package/dist/components/Rating/RatingExample.js +17 -1
  175. package/dist/components/Rating/RatingExample.js.map +1 -1
  176. package/dist/components/SearchBar/SearchBar.d.ts +2 -2
  177. package/dist/components/SearchBar/SearchBar.js +2 -2
  178. package/dist/components/SearchBar/SearchBarExample.js +3 -0
  179. package/dist/components/SearchBar/SearchBarExample.js.map +1 -1
  180. package/dist/components/SegmentedControl/SegmentedControl.d.ts +3 -3
  181. package/dist/components/SegmentedControl/SegmentedControl.js +3 -3
  182. package/dist/components/SegmentedControl/SegmentedControlExample.js +10 -12
  183. package/dist/components/SegmentedControl/SegmentedControlExample.js.map +1 -1
  184. package/dist/components/Select/Select.d.ts +24 -25
  185. package/dist/components/Select/Select.js +24 -25
  186. package/dist/components/Select/Select.js.map +1 -1
  187. package/dist/components/Select/SelectExample.js +1 -0
  188. package/dist/components/Select/SelectExample.js.map +1 -1
  189. package/dist/components/Skeleton/Skeleton.d.ts +10 -14
  190. package/dist/components/Skeleton/Skeleton.js +10 -14
  191. package/dist/components/Skeleton/Skeleton.js.map +1 -1
  192. package/dist/components/Skeleton/SkeletonExample.js +4 -3
  193. package/dist/components/Skeleton/SkeletonExample.js.map +1 -1
  194. package/dist/components/SkeletonText/SkeletonText.d.ts +5 -9
  195. package/dist/components/SkeletonText/SkeletonText.js +5 -9
  196. package/dist/components/SkeletonText/SkeletonText.js.map +1 -1
  197. package/dist/components/Slider/Slider.d.ts +2 -2
  198. package/dist/components/Slider/Slider.js +2 -2
  199. package/dist/components/Slider/SliderExample.js +40 -18
  200. package/dist/components/Slider/SliderExample.js.map +1 -1
  201. package/dist/components/Snackbar/Manager.d.ts +29 -0
  202. package/dist/components/Snackbar/Manager.js +35 -0
  203. package/dist/components/Snackbar/Manager.js.map +1 -0
  204. package/dist/components/Snackbar/Snackbar.d.ts +23 -5
  205. package/dist/components/Snackbar/Snackbar.js +23 -4
  206. package/dist/components/Snackbar/Snackbar.js.map +1 -1
  207. package/dist/components/Snackbar/SnackbarExample.js +8 -1
  208. package/dist/components/Snackbar/SnackbarExample.js.map +1 -1
  209. package/dist/components/Snackbar/index.d.ts +1 -0
  210. package/dist/components/Snackbar/index.js +1 -0
  211. package/dist/components/Snackbar/index.js.map +1 -1
  212. package/dist/components/StylesProviderDemo/StylesProviderDemo.d.ts +1 -3
  213. package/dist/components/StylesProviderDemo/StylesProviderDemo.js +1 -3
  214. package/dist/components/StylesProviderDemo/StylesProviderDemo.js.map +1 -1
  215. package/dist/components/Switch/Switch.d.ts +2 -2
  216. package/dist/components/Switch/Switch.js +2 -2
  217. package/dist/components/Switch/SwitchExample.js +4 -1
  218. package/dist/components/Switch/SwitchExample.js.map +1 -1
  219. package/dist/components/TabGroup/TabGroup.d.ts +2 -2
  220. package/dist/components/TabGroup/TabGroup.js +2 -2
  221. package/dist/components/TabGroup/TabGroupExample.js +5 -11
  222. package/dist/components/TabGroup/TabGroupExample.js.map +1 -1
  223. package/dist/components/TabGroup/tab-group.css +1 -0
  224. package/dist/components/TabGroup/tab-group.css.js +1 -0
  225. package/dist/components/TabList/TabList.d.ts +2 -2
  226. package/dist/components/TabList/TabList.js +2 -2
  227. package/dist/components/TabList/tab-list.css +0 -1
  228. package/dist/components/TabList/tab-list.css.js +0 -1
  229. package/dist/components/Table/Table.d.ts +53 -16
  230. package/dist/components/Table/Table.js +53 -16
  231. package/dist/components/Table/Table.js.map +1 -1
  232. package/dist/components/Table/table.css +0 -1
  233. package/dist/components/Table/table.css.js +0 -1
  234. package/dist/components/Tag/Tag.d.ts +1 -3
  235. package/dist/components/Tag/Tag.js +1 -3
  236. package/dist/components/Tag/Tag.js.map +1 -1
  237. package/dist/components/Textarea/Textarea.d.ts +13 -13
  238. package/dist/components/Textarea/Textarea.js +13 -13
  239. package/dist/components/Textarea/TextareaExample.js +3 -0
  240. package/dist/components/Textarea/TextareaExample.js.map +1 -1
  241. package/dist/components/TimePicker/TimePicker.d.ts +14 -14
  242. package/dist/components/TimePicker/TimePicker.js +14 -14
  243. package/dist/components/TimePicker/TimePickerExample.js +3 -0
  244. package/dist/components/TimePicker/TimePickerExample.js.map +1 -1
  245. package/dist/components/ToggleOption/ToggleOption.js +1 -1
  246. package/dist/components/ToggleOption/ToggleOption.js.map +1 -1
  247. package/dist/components/ToggleOption/toggle-option.css +2 -49
  248. package/dist/components/ToggleOption/toggle-option.css.js +2 -49
  249. package/dist/components/Tooltip/Tooltip.d.ts +3 -7
  250. package/dist/components/Tooltip/Tooltip.js +3 -7
  251. package/dist/components/Tooltip/Tooltip.js.map +1 -1
  252. package/dist/components/Tooltip/TooltipExample.js +23 -3
  253. package/dist/components/Tooltip/TooltipExample.js.map +1 -1
  254. package/dist/components/Txt/Txt.d.ts +1 -3
  255. package/dist/components/Txt/Txt.js +1 -3
  256. package/dist/components/Txt/Txt.js.map +1 -1
  257. package/dist/components/UIProvider/AriaLiveMessageHandler.js +3 -2
  258. package/dist/components/UIProvider/AriaLiveMessageHandler.js.map +1 -1
  259. package/dist/hooks/useAddEventListener.d.ts +1 -2
  260. package/dist/hooks/useAddEventListener.js.map +1 -1
  261. package/dist/hooks/useRadioState.d.ts +1 -1
  262. package/dist/hooks/useTimeout.d.ts +1 -2
  263. package/dist/hooks/useTimeout.js +20 -4
  264. package/dist/hooks/useTimeout.js.map +1 -1
  265. package/dist/types/common.d.ts +3 -0
  266. package/dist/types/common.js.map +1 -1
  267. package/dist/types/meta.d.ts +1 -0
  268. package/dist/types/meta.js.map +1 -1
  269. package/dist/utils/createCustomEvent.d.ts +17 -0
  270. package/dist/utils/createCustomEvent.js +21 -0
  271. package/dist/utils/createCustomEvent.js.map +1 -0
  272. package/dist/utils/createExampleChildElement.js +3 -3
  273. package/dist/utils/createExampleChildElement.js.map +1 -1
  274. package/dist/utils/demo.d.ts +18 -26
  275. package/dist/utils/demo.js.map +1 -1
  276. package/meta.ts +6 -1
  277. package/package.json +1 -1
  278. package/src/components/Accordion/Accordion.tsx +20 -3
  279. package/src/components/Avatar/Avatar.tsx +13 -14
  280. package/src/components/AvatarGroup/AvatarGroup.tsx +30 -13
  281. package/src/components/Badge/Badge.tsx +1 -3
  282. package/src/components/BadgeDot/BadgeDot.tsx +6 -4
  283. package/src/components/BannerAlert/BannerAlert.tsx +11 -12
  284. package/src/components/BottomNavigation/BottomNavigation.tsx +6 -3
  285. package/src/components/BottomNavigation/BottomNavigationExample.tsx +31 -36
  286. package/src/components/BottomNavigation/bottom-navigation.scss +10 -1
  287. package/src/components/Breadcrumb/Breadcrumb.tsx +17 -18
  288. package/src/components/Button/Button.tsx +1 -11
  289. package/src/components/Button/ButtonExample.tsx +1 -2
  290. package/src/components/ButtonDock/ButtonDock.tsx +10 -14
  291. package/src/components/Card/Card.tsx +9 -11
  292. package/src/components/Carousel/Carousel.tsx +9 -13
  293. package/src/components/Carousel/CarouselExample.tsx +25 -25
  294. package/src/components/Checkbox/Checkbox.tsx +7 -4
  295. package/src/components/Checkbox/CheckboxExample.tsx +4 -3
  296. package/src/components/CheckboxGroup/CheckboxGroup.tsx +3 -3
  297. package/src/components/CheckboxOption/CheckboxOption.tsx +4 -4
  298. package/src/components/Chip/Chip.tsx +3 -7
  299. package/src/components/Chip/ChipExample.tsx +52 -3
  300. package/src/components/ChipGroup/ChipGroup.tsx +21 -10
  301. package/src/components/ChipGroup/ChipGroupExample.tsx +1 -1
  302. package/src/components/DatePicker/DatePicker.tsx +13 -12
  303. package/src/components/Dialog/Dialog.tsx +11 -6
  304. package/src/components/Divider/Divider.tsx +5 -9
  305. package/src/components/Divider/DividerExample.tsx +18 -1
  306. package/src/components/Drawer/Drawer.tsx +3 -3
  307. package/src/components/EmptyState/EmptyState.tsx +3 -7
  308. package/src/components/Fab/Fab.tsx +8 -5
  309. package/src/components/Fab/FabExample.tsx +22 -3
  310. package/src/components/Field/Field.tsx +4 -5
  311. package/src/components/FileUpload/FileUpload.tsx +3 -3
  312. package/src/components/FileUploadItem/FileUploadItem.tsx +6 -10
  313. package/src/components/FormField/FormField.tsx +5 -16
  314. package/src/components/Img/Img.tsx +1 -3
  315. package/src/components/InlineAlert/InlineAlert.tsx +1 -3
  316. package/src/components/Input/Input.tsx +13 -13
  317. package/src/components/Input/InputElement.tsx +11 -5
  318. package/src/components/Input/InputExample.tsx +1 -0
  319. package/src/components/InputNumber/InputNumber.tsx +20 -20
  320. package/src/components/InputNumber/InputNumberExample.tsx +3 -0
  321. package/src/components/InputPhone/InputPhone.tsx +21 -16
  322. package/src/components/InputPhone/InputPhoneExample.tsx +3 -0
  323. package/src/components/Layout/Layout.tsx +1 -3
  324. package/src/components/Link/Link.tsx +1 -3
  325. package/src/components/ListItem/ListItem.tsx +22 -20
  326. package/src/components/Menu/Menu.tsx +5 -9
  327. package/src/components/Modal/Modal.tsx +10 -5
  328. package/src/components/Modal/modal.scss +13 -1
  329. package/src/components/OTPInput/OTPInput.tsx +1 -3
  330. package/src/components/PageControl/PageControl.tsx +1 -3
  331. package/src/components/Pagination/Pagination.tsx +50 -24
  332. package/src/components/Pagination/pagination.scss +7 -17
  333. package/src/components/Password/Password.tsx +19 -20
  334. package/src/components/Password/PasswordExample.tsx +8 -0
  335. package/src/components/Popover/Popover.tsx +11 -20
  336. package/src/components/Popover/PopoverExample.tsx +1 -1
  337. package/src/components/ProgressBar/ProgressBar.tsx +1 -3
  338. package/src/components/ProgressCircle/ProgressCircle.tsx +1 -3
  339. package/src/components/ProgressionStepper/ProgressionStepper.tsx +1 -3
  340. package/src/components/Radio/RadioExample.tsx +4 -3
  341. package/src/components/RadioGroup/RadioGroup.tsx +2 -2
  342. package/src/components/Rating/Rating.tsx +34 -14
  343. package/src/components/Rating/RatingExample.tsx +18 -1
  344. package/src/components/SearchBar/SearchBar.tsx +2 -2
  345. package/src/components/SearchBar/SearchBarExample.tsx +3 -0
  346. package/src/components/SegmentedControl/SegmentedControl.tsx +3 -3
  347. package/src/components/SegmentedControl/SegmentedControlExample.tsx +10 -12
  348. package/src/components/Select/Select.tsx +24 -25
  349. package/src/components/Select/SelectExample.tsx +1 -0
  350. package/src/components/Skeleton/Skeleton.tsx +10 -14
  351. package/src/components/Skeleton/SkeletonExample.tsx +5 -3
  352. package/src/components/SkeletonText/SkeletonText.tsx +5 -9
  353. package/src/components/Slider/Slider.tsx +2 -2
  354. package/src/components/Slider/SliderExample.tsx +42 -17
  355. package/src/components/Snackbar/Manager.tsx +64 -0
  356. package/src/components/Snackbar/Snackbar.tsx +23 -6
  357. package/src/components/Snackbar/SnackbarExample.tsx +28 -6
  358. package/src/components/Snackbar/index.tsx +1 -0
  359. package/src/components/StylesProviderDemo/StylesProviderDemo.tsx +1 -3
  360. package/src/components/Switch/Switch.tsx +2 -2
  361. package/src/components/Switch/SwitchExample.tsx +4 -1
  362. package/src/components/TabGroup/TabGroup.tsx +2 -2
  363. package/src/components/TabGroup/TabGroupExample.tsx +5 -11
  364. package/src/components/TabGroup/tab-group.scss +1 -0
  365. package/src/components/TabList/TabList.tsx +2 -2
  366. package/src/components/TabList/tab-list.scss +0 -1
  367. package/src/components/Table/Table.tsx +53 -16
  368. package/src/components/Table/table.scss +0 -1
  369. package/src/components/Tag/Tag.tsx +1 -3
  370. package/src/components/Textarea/Textarea.tsx +13 -13
  371. package/src/components/Textarea/TextareaExample.tsx +3 -0
  372. package/src/components/TimePicker/TimePicker.tsx +14 -14
  373. package/src/components/TimePicker/TimePickerExample.tsx +3 -1
  374. package/src/components/ToggleOption/ToggleOption.tsx +1 -0
  375. package/src/components/ToggleOption/toggle-option.scss +2 -61
  376. package/src/components/Tooltip/Tooltip.tsx +3 -7
  377. package/src/components/Tooltip/TooltipExample.tsx +23 -11
  378. package/src/components/Txt/Txt.tsx +1 -3
  379. package/src/components/UIProvider/AriaLiveMessageHandler.tsx +4 -2
  380. package/src/hooks/useAddEventListener.ts +1 -3
  381. package/src/hooks/useTimeout.ts +1 -5
  382. package/src/types/common.ts +4 -0
  383. package/src/types/meta.ts +1 -0
  384. package/src/utils/createCustomEvent.ts +35 -0
  385. package/src/utils/createExampleChildElement.tsx +3 -8
  386. package/src/utils/demo.ts +24 -27
  387. package/dist/components/ListItem/ListItemButton.d.ts +0 -2
  388. package/dist/components/ListItem/ListItemButton.js +0 -7
  389. package/dist/components/ListItem/ListItemButton.js.map +0 -1
  390. package/dist/components/Pagination/PageInput.d.ts +0 -4
  391. package/dist/components/Pagination/PageInput.js +0 -36
  392. package/dist/components/Pagination/PageInput.js.map +0 -1
  393. package/dist/hooks/usePaginationState.d.ts +0 -4
  394. package/dist/hooks/usePaginationState.js +0 -22
  395. package/dist/hooks/usePaginationState.js.map +0 -1
  396. package/src/components/ListItem/ListItemButton.tsx +0 -6
  397. package/src/components/Pagination/PageInput.tsx +0 -65
  398. package/src/hooks/usePaginationState.tsx +0 -24
@@ -42,7 +42,7 @@ export type AvatarGroupProps = CommonProps<'style'> & {
42
42
  /**
43
43
  * The variant of the avatar group.
44
44
  *
45
- * @default auto
45
+ * @default stacked
46
46
  */
47
47
  variant?: 'spread' | 'stacked';
48
48
  };
@@ -53,22 +53,39 @@ export type AvatarGroupProps = CommonProps<'style'> & {
53
53
  * @example
54
54
  * import { AvatarGroup } from '@bspk/ui/AvatarGroup';
55
55
  *
56
- * function Example() {
57
- * return (
58
- * <AvatarGroup
59
- * items={[
60
- * { name: 'Andre Giant', image: '/path/to/image.jpg' },
61
- * { name: 'John Smith', initials: 'JS' },
62
- * { name: 'Princess Buttercup' },
63
- * ]}
64
- * />
65
- * );
66
- * }
56
+ * <AvatarGroup
57
+ * style={{ marginLeft: 'var(--spacing-sizing-12)' }}
58
+ * size="medium"
59
+ * max={4}
60
+ * variant="stacked"
61
+ * items={[
62
+ * {
63
+ * name: 'Alice Johnson',
64
+ * image: '/avatar-01.png',
65
+ * },
66
+ * {
67
+ * name: 'Bob Smith',
68
+ * image: '/avatar-02.png',
69
+ * },
70
+ * {
71
+ * name: 'Charlie Brown',
72
+ * image: '/avatar-03.png',
73
+ * },
74
+ * {
75
+ * name: 'Diana Prince',
76
+ * image: '/avatar-04.png',
77
+ * },
78
+ * {
79
+ * name: 'Ethan Hunt',
80
+ * image: '/avatar-05.png',
81
+ * },
82
+ * ]}
83
+ * />;
67
84
  *
68
85
  * @name AvatarGroup
69
86
  * @phase UXReview
70
87
  */
71
- export function AvatarGroup({ items, size = 'small', max: maxProp = 5, variant = 'spread', style }: AvatarGroupProps) {
88
+ export function AvatarGroup({ items, size = 'small', max: maxProp = 5, variant = 'stacked', style }: AvatarGroupProps) {
72
89
  const max = maxProp > items.length ? items.length : maxProp;
73
90
  const overflowItems = items.slice(max);
74
91
 
@@ -49,9 +49,7 @@ export type BadgeProps = {
49
49
  * @example
50
50
  * import { Badge } from '@bspk/ui/Badge';
51
51
  *
52
- * function Example() {
53
- * return <Badge count={5} size="small" color="primary" />;
54
- * }
52
+ * <Badge count={5} size="small" color="primary" surfaceBorder={true} />;
55
53
  *
56
54
  * @exampleDescription This example shows a badge with a count of 5, size small, and primary variant.
57
55
  *
@@ -44,16 +44,18 @@ export type BadgeDotProps = {
44
44
  * @example
45
45
  * import { BadgeDot } from '@bspk/ui/BadgeDot';
46
46
  *
47
- * function Example() {
48
- * return <BadgeDot color="primary" />;
49
- * }
47
+ * <BadgeDot color="secondary" size={12} outline={true}>
48
+ * <Button>Messages</Button>
49
+ * </BadgeDot>;
50
50
  *
51
51
  * @exampleDescription This example shows a badge-dot with a count of 5, size small, and primary variant.
52
52
  *
53
53
  * @name BadgeDot
54
54
  * @phase UXReview
55
55
  */
56
- export function BadgeDot({ children, color = 'primary', size = 6, outline = false }: BadgeDotProps) {
56
+ export function BadgeDot({ children, color = 'primary', size: sizeProp = 6, outline = false }: BadgeDotProps) {
57
+ const size = sizeProp in OUTLINE_WIDTHS ? sizeProp : 6;
58
+
57
59
  const badgeDot = (
58
60
  <sup
59
61
  data-attachment={!!children || undefined}
@@ -54,18 +54,17 @@ export type BannerAlertProps = {
54
54
  * @example
55
55
  * import { BannerAlert } from '@bspk/ui/BannerAlert';
56
56
  *
57
- * function Example() {
58
- * <BannerAlert
59
- * variant="error"
60
- * header="Error"
61
- * body="There was an error processing your request."
62
- * onClose={() => console.log('Alert closed')}
63
- * callToAction={{
64
- * label = 'Click me',
65
- * onClick = () => action('Call to action clicked!'),
66
- * }}
67
- * />;
68
- * }
57
+ * <BannerAlert
58
+ * elevated={true}
59
+ * variant="error"
60
+ * header="Error"
61
+ * body="There was an error processing your request."
62
+ * onClose={() => sendSnackbar('Alert closed')}
63
+ * callToAction={{
64
+ * label = 'Click me',
65
+ * onClick = () => action('Call to action clicked!'),
66
+ * }}
67
+ * />;
69
68
  *
70
69
  * @exampleDescription This example shows how to use the BannerAlert component with an error variant, a header, and a body message.
71
70
  *
@@ -23,13 +23,16 @@ export type BottomNavigationProps = Pick<TabListProps, 'label' | 'onChange' | 'o
23
23
  * import { BottomNavigation } from '@bspk/ui/BottomNavigation';
24
24
  * import { useState } from 'react';
25
25
  *
26
- * function Example() {
26
+ * () => {
27
27
  * const [value, setValue] = useState<string>('1');
28
28
  *
29
29
  * return (
30
30
  * <BottomNavigation
31
+ * variant="elevated"
32
+ * mode="inline"
33
+ * label="Bottom Navigation Example"
31
34
  * value={value}
32
- * onChange={onChange}
35
+ * onChange={(next) => setValue(next)}
33
36
  * options={[
34
37
  * {
35
38
  * value: '1',
@@ -46,7 +49,7 @@ export type BottomNavigationProps = Pick<TabListProps, 'label' | 'onChange' | 'o
46
49
  * ]}
47
50
  * />
48
51
  * );
49
- * }
52
+ * };
50
53
  *
51
54
  * @name BottomNavigation
52
55
  * @phase Dev
@@ -1,13 +1,3 @@
1
- import { SvgCloud } from '@bspk/icons/Cloud';
2
- import { SvgCloudFill } from '@bspk/icons/CloudFill';
3
- import { SvgEvent } from '@bspk/icons/Event';
4
- import { SvgEventFill } from '@bspk/icons/EventFill';
5
- import { SvgPerson } from '@bspk/icons/Person';
6
- import { SvgPersonFill } from '@bspk/icons/PersonFill';
7
- import { SvgSettings } from '@bspk/icons/Settings';
8
- import { SvgSettingsFill } from '@bspk/icons/SettingsFill';
9
- import { SvgSmartphone } from '@bspk/icons/Smartphone';
10
- import { SvgSmartphoneFill } from '@bspk/icons/SmartphoneFill';
11
1
  import { BottomNavigationProps } from '.';
12
2
  import { ComponentExample, Preset } from '-/utils/demo';
13
3
 
@@ -19,20 +9,20 @@ export const presets: Preset<BottomNavigationProps>[] = [
19
9
  {
20
10
  value: '1',
21
11
  label: 'Item 1',
22
- icon: <SvgSettings />,
23
- iconSelected: <SvgSettingsFill />,
12
+ icon: 'Settings',
13
+ iconSelected: 'SettingsFill',
24
14
  },
25
15
  {
26
16
  value: '2',
27
17
  label: 'Item 2',
28
- icon: <SvgCloud />,
29
- iconSelected: <SvgCloudFill />,
18
+ icon: 'Cloud',
19
+ iconSelected: 'CloudFill',
30
20
  },
31
21
  {
32
22
  value: '3',
33
23
  label: 'Item 3',
34
- icon: <SvgSmartphone />,
35
- iconSelected: <SvgSmartphoneFill />,
24
+ icon: 'Smartphone',
25
+ iconSelected: 'SmartphoneFill',
36
26
  },
37
27
  ],
38
28
  value: '1',
@@ -45,33 +35,33 @@ export const presets: Preset<BottomNavigationProps>[] = [
45
35
  options: [
46
36
  {
47
37
  value: '1',
48
- label: 'Item 1',
49
- icon: <SvgSettings />,
50
- iconSelected: <SvgSettingsFill />,
38
+ label: 'Item 1 With Longer Label',
39
+ icon: 'Settings',
40
+ iconSelected: 'SettingsFill',
51
41
  },
52
42
  {
53
43
  value: '2',
54
- label: 'Item 2',
55
- icon: <SvgCloud />,
56
- iconSelected: <SvgCloudFill />,
44
+ label: 'Item 2 With Longer Label',
45
+ icon: 'Cloud',
46
+ iconSelected: 'CloudFill',
57
47
  },
58
48
  {
59
49
  value: '3',
60
- label: 'Item 3',
61
- icon: <SvgSmartphone />,
62
- iconSelected: <SvgSmartphoneFill />,
50
+ label: 'Item 3 With Longer Label',
51
+ icon: 'Smartphone',
52
+ iconSelected: 'SmartphoneFill',
63
53
  },
64
54
  {
65
55
  value: '4',
66
- label: 'Item 4',
67
- icon: <SvgEvent />,
68
- iconSelected: <SvgEventFill />,
56
+ label: 'Item 4 With Longer Label',
57
+ icon: 'Event',
58
+ iconSelected: 'EventFill',
69
59
  },
70
60
  {
71
61
  value: '5',
72
- label: 'Item 5',
73
- icon: <SvgPerson />,
74
- iconSelected: <SvgPersonFill />,
62
+ label: 'Item 5 With Longer Label',
63
+ icon: 'Person',
64
+ iconSelected: 'PersonFill',
75
65
  },
76
66
  ],
77
67
  value: '1',
@@ -85,14 +75,14 @@ export const presets: Preset<BottomNavigationProps>[] = [
85
75
  {
86
76
  value: '1',
87
77
  label: 'Item 1',
88
- icon: <SvgSettings />,
89
- iconSelected: <SvgSettingsFill />,
78
+ icon: 'Settings',
79
+ iconSelected: 'SettingsFill',
90
80
  },
91
81
  {
92
82
  value: '2',
93
83
  label: 'Item 2',
94
- icon: <SvgCloud />,
95
- iconSelected: <SvgCloudFill />,
84
+ icon: 'Cloud',
85
+ iconSelected: 'CloudFill',
96
86
  disabled: true,
97
87
  },
98
88
  ],
@@ -111,7 +101,12 @@ export const BottomNavigationExample: ComponentExample<BottomNavigationProps> =
111
101
  },
112
102
  defaultState: {
113
103
  value: '1',
114
- options: presets[0].propState.options,
104
+ options: presets[0].propState.options.map((option) => ({
105
+ ...option,
106
+ icon: undefined,
107
+ iconSelected: undefined,
108
+ })),
109
+ label: 'Single Icon',
115
110
  },
116
111
  disableProps: [],
117
112
  presets,
@@ -4,6 +4,7 @@ ul[data-bspk-utility='tab-list'][data-bspk='bottom-navigation'] {
4
4
  box-sizing: border-box;
5
5
  background-color: var(--background-base);
6
6
  height: var(--spacing-sizing-13);
7
+ gap: var(--spacing-sizing-02);
7
8
 
8
9
  &[data-variant='elevated'] {
9
10
  box-shadow: var(--drop-shadow-north);
@@ -20,7 +21,7 @@ ul[data-bspk-utility='tab-list'][data-bspk='bottom-navigation'] {
20
21
  color: var(--foreground-neutral-on-surface-variant-02);
21
22
  font: var(--labels-x-small);
22
23
  flex-direction: column;
23
- gap: 0;
24
+ justify-content: center;
24
25
  overflow: hidden;
25
26
 
26
27
  &[data-pseudo='focus'] > &,
@@ -59,6 +60,14 @@ ul[data-bspk-utility='tab-list'][data-bspk='bottom-navigation'] {
59
60
  }
60
61
  }
61
62
 
63
+ li:first-child {
64
+ padding-left: var(--spacing-sizing-02);
65
+ }
66
+
67
+ li:last-child {
68
+ padding-right: var(--spacing-sizing-02);
69
+ }
70
+
62
71
  &[data-mode='fixed'] {
63
72
  position: fixed;
64
73
  bottom: 0;
@@ -41,24 +41,23 @@ export type BreadcrumbProps = CommonProps<'id'> &
41
41
  * @example
42
42
  * import { Breadcrumb } from '@bspk/ui/breadcrumb';
43
43
  *
44
- * function Example() {
45
- * return (
46
- * <Breadcrumb
47
- * items={[
48
- * { label: 'level 1', href: 'https://bspk.anywhere.re' },
49
- * { label: 'level 2', href: 'https://bspk.anywhere.re' },
50
- * { label: 'level 3', href: 'https://bspk.anywhere.re' },
51
- * { label: 'level 4', href: 'https://bspk.anywhere.re' },
52
- * { label: 'level 5', href: 'https://bspk.anywhere.re' },
53
- * { label: 'level 6', href: 'https://bspk.anywhere.re' },
54
- * { label: 'level 7', href: 'https://bspk.anywhere.re' },
55
- * { label: 'level 8', href: 'https://bspk.anywhere.re' },
56
- * { label: 'level 9', href: 'https://bspk.anywhere.re' },
57
- * { label: 'level 10', href: 'https://bspk.anywhere.re' },
58
- * ]}
59
- * />
60
- * );
61
- * }
44
+ * <Breadcrumb
45
+ * id="example-breadcrumb"
46
+ * scrollLimit={5}
47
+ * items={[
48
+ * { label: 'Brioche', href: '#brioche' },
49
+ * { label: 'Whole Wheat', href: '#whole-wheat' },
50
+ * { label: 'Sourdough', href: '#sourdough' },
51
+ * { label: 'Rye', href: '#rye' },
52
+ * { label: 'Multigrain', href: '#multigrain' },
53
+ * { label: 'Baguette', href: '#baguette' },
54
+ * { label: 'Focaccia', href: '#focaccia' },
55
+ * { label: 'Ciabatta', href: '#ciabatta' },
56
+ * { label: 'Pita', href: '#pita' },
57
+ * { label: 'Naan', href: '#naan' },
58
+ * { label: 'Flatbread', href: '#flatbread' },
59
+ * ]}
60
+ * />;
62
61
  *
63
62
  * @name Breadcrumb
64
63
  * @phase UXReview
@@ -83,17 +83,7 @@ export type ButtonProps<As extends ElementType = ElementType> = CommonProps<'dis
83
83
  * import { Button } from '@bspk/ui/Button';
84
84
  * import { SvgPerson } from '@bspk/icons/Person';
85
85
  *
86
- * function Example() {
87
- * return (
88
- * <Button
89
- * label="Click Me"
90
- * size="medium"
91
- * variant="primary"
92
- * onClick={() => console.log('Button clicked')}
93
- * icon={<SvgPerson />}
94
- * />
95
- * );
96
- * }
86
+ * <Button label="Click Me" size="medium" onClick={() => action('Button clicked')} icon={<SvgPerson />} />;
97
87
  *
98
88
  * @name Button
99
89
  * @phase UXReview
@@ -1,4 +1,3 @@
1
- import { SvgPerson } from '@bspk/icons/Person';
2
1
  import { ButtonProps } from '.';
3
2
  import { ComponentExample, Preset } from '-/utils/demo';
4
3
 
@@ -32,6 +31,6 @@ export const presets: Preset<ButtonProps>[] = [
32
31
  export const ButtonExample: ComponentExample<ButtonProps> = {
33
32
  presets,
34
33
  variants: {
35
- iconOnly: () => ({ icon: <SvgPerson />, label: 'Person' }),
34
+ iconOnly: { icon: 'Person', label: 'Person' },
36
35
  },
37
36
  };
@@ -35,20 +35,16 @@ export type ButtonDockProps = {
35
35
  * @example
36
36
  * import { ButtonDock } from '@bspk/ui/ButtonDock';
37
37
  *
38
- * function Example() {
39
- * return (
40
- * <ButtonDock
41
- * primaryButton={{
42
- * children: 'Send',
43
- * label: 'send',
44
- * }}
45
- * secondaryButton={{
46
- * children: 'Cancel',
47
- * label: 'cancel',
48
- * }}
49
- * />
50
- * );
51
- * }
38
+ * <ButtonDock
39
+ * primaryButton={{
40
+ * children: 'Send',
41
+ * label: 'send',
42
+ * }}
43
+ * secondaryButton={{
44
+ * children: 'Cancel',
45
+ * label: 'cancel',
46
+ * }}
47
+ * />;
52
48
  *
53
49
  * @name ButtonDock
54
50
  * @phase Dev
@@ -1,6 +1,6 @@
1
1
  import './card.scss';
2
2
  import { ReactNode } from 'react';
3
- import { ElementProps } from '-/types/common';
3
+ import { ElementProps, SetRef } from '-/types/common';
4
4
 
5
5
  export type CardProps = {
6
6
  /**
@@ -15,6 +15,8 @@ export type CardProps = {
15
15
  * @default elevated
16
16
  */
17
17
  variant?: 'elevated' | 'outlined';
18
+ /** A ref to the list item div element. */
19
+ innerRef?: SetRef<HTMLElement>;
18
20
  };
19
21
 
20
22
  /**
@@ -27,21 +29,17 @@ export type CardProps = {
27
29
  * @example
28
30
  * import { Card } from '@bspk/ui/card';
29
31
  *
30
- * function Example() {
31
- * return (
32
- * <Card variant="elevated" showPadding={false}>
33
- * <h3>Card Title</h3>
34
- * <p>This is some content inside the card.</p>
35
- * </Card>
36
- * );
37
- * }
32
+ * <Card variant="elevated" style={{ padding: 'var(--spacing-sizing-04)', maxWidth: '100%', width: '400px' }}>
33
+ * <h3>Card Title</h3>
34
+ * <p>This is some content inside the card.</p>
35
+ * </Card>;
38
36
  *
39
37
  * @name Card
40
38
  * @phase UXReview
41
39
  */
42
- export function Card({ children, variant = 'elevated', ...props }: ElementProps<CardProps, 'div'>) {
40
+ export function Card({ children, variant = 'elevated', innerRef, ...props }: ElementProps<CardProps, 'div'>) {
43
41
  return (
44
- <div {...props} data-bspk="card" data-variant={variant}>
42
+ <div {...props} data-bspk="card" data-variant={variant} ref={innerRef}>
45
43
  {children}
46
44
  </div>
47
45
  );
@@ -51,19 +51,15 @@ export type CarouselProps = {
51
51
  * @example
52
52
  * import { Carousel } from '@bspk/ui/Carousel';
53
53
  *
54
- * function Example() {
55
- * return (
56
- * <Carousel label="Example Carousel" width="1/2">
57
- * <div>child 1</div>
58
- * <div>child 2</div>
59
- * <div>child 3</div>
60
- * <div>child 4</div>
61
- * <div>child 5</div>
62
- * <div>child 6</div>
63
- * <div>child 7</div>
64
- * </Carousel>
65
- * );
66
- * }
54
+ * <Carousel label="Example Carousel" width="1/2">
55
+ * <div>child 1</div>
56
+ * <div>child 2</div>
57
+ * <div>child 3</div>
58
+ * <div>child 4</div>
59
+ * <div>child 5</div>
60
+ * <div>child 6</div>
61
+ * <div>child 7</div>
62
+ * </Carousel>;
67
63
  *
68
64
  * @name Carousel
69
65
  * @phase UXReview
@@ -4,37 +4,13 @@ import { Button } from '-/components/Button';
4
4
  import { COLOR_VARIANTS } from '-/utils/colorVariants';
5
5
  import { ComponentExampleFn } from '-/utils/demo';
6
6
 
7
- function ExampleSlide({ number, onClick }: { number: number; onClick?: (message: string) => void }) {
8
- return (
9
- <div
10
- data-color={COLOR_VARIANTS[(number + 3) % COLOR_VARIANTS.length]}
11
- style={{
12
- backgroundColor: 'var(--background)',
13
- color: 'var(--foreground)',
14
- borderRadius: '8px',
15
- minHeight: '180px',
16
- padding: 20,
17
- display: 'flex',
18
- flexDirection: 'column',
19
- alignItems: 'center',
20
- justifyContent: 'center',
21
- }}
22
- >
23
- Slide {number}
24
- {onClick && (
25
- <Button label="Click me" onClick={() => onClick(`Slide ${number} clicked`)} variant="tertiary" />
26
- )}
27
- </div>
28
- );
29
- }
30
-
31
7
  export const CarouselExample: ComponentExampleFn<CarouselProps & { slideCount: number }> = ({ action }) => {
32
8
  return {
33
9
  containerStyle: { width: '100%', padding: '16px', overflow: 'hidden' },
34
10
  render: ({ props, Component }) => (
35
11
  <Component {...props}>
36
12
  {Array.from({ length: props.slideCount || 7 }, (_, i) => i + 1).map((num) => (
37
- <ExampleSlide key={num} number={num} onClick={action} />
13
+ <SlidePlaceholder key={num} number={num} onClick={action} />
38
14
  ))}
39
15
  </Component>
40
16
  ),
@@ -80,3 +56,27 @@ export const CarouselExample: ComponentExampleFn<CarouselProps & { slideCount: n
80
56
  ],
81
57
  };
82
58
  };
59
+
60
+ function SlidePlaceholder({ number, onClick }: { number: number; onClick?: (message: string) => void }) {
61
+ return (
62
+ <div
63
+ data-color={COLOR_VARIANTS[(number + 3) % COLOR_VARIANTS.length]}
64
+ style={{
65
+ backgroundColor: 'var(--background)',
66
+ color: 'var(--foreground)',
67
+ borderRadius: '8px',
68
+ minHeight: '180px',
69
+ padding: 20,
70
+ display: 'flex',
71
+ flexDirection: 'column',
72
+ alignItems: 'center',
73
+ justifyContent: 'center',
74
+ }}
75
+ >
76
+ Slide {number}
77
+ {onClick && (
78
+ <Button label="Click me" onClick={() => onClick(`Slide ${number} clicked`)} variant="tertiary" />
79
+ )}
80
+ </div>
81
+ );
82
+ }
@@ -36,11 +36,14 @@ export type CheckboxProps = Omit<FieldControlProps, 'onChange' | 'readOnly' | 'v
36
36
  * @example
37
37
  * import { Checkbox } from '@bspk/ui/Checkbox';
38
38
  *
39
- * function Example() {
40
- * const [checked, setChecked] = React.useState(false);
39
+ * () => {
40
+ * const [checked, setChecked] = useState(false);
41
41
  *
42
42
  * return (
43
- * <label htmlFor="sample-checkbox">
43
+ * <label
44
+ * htmlFor="sample-checkbox"
45
+ * style={{ display: 'flex', alignItems: 'center', gap: 'var(--spacing-sizing-02)' }}
46
+ * >
44
47
  * <Checkbox
45
48
  * aria-label="Sample"
46
49
  * checked={checked}
@@ -52,7 +55,7 @@ export type CheckboxProps = Omit<FieldControlProps, 'onChange' | 'readOnly' | 'v
52
55
  * Checkbox Label
53
56
  * </label>
54
57
  * );
55
- * }
58
+ * };
56
59
  *
57
60
  * @element
58
61
  *
@@ -2,7 +2,8 @@ import { CheckboxProps } from '.';
2
2
  import { ComponentExample } from '-/utils/demo';
3
3
 
4
4
  export const CheckboxExample: ComponentExample<CheckboxProps> = {
5
- render: ({ props, Component }) => (
6
- <Component {...props} aria-label={props['aria-label'] || 'checkbox aria-label'} />
7
- ),
5
+ defaultState: {
6
+ 'aria-label': 'checkbox aria-label',
7
+ },
8
+ render: ({ props, Component }) => <Component {...props} />,
8
9
  };
@@ -42,8 +42,8 @@ export type CheckboxGroupProps = Omit<FieldControlProps<string[]>, 'readOnly'> &
42
42
  * @example
43
43
  * import { CheckboxGroup } from '@bspk/ui/CheckboxGroup';
44
44
  *
45
- * function Example() {
46
- * const [value, setValue] = React.useState<string[]>([]);
45
+ * () => {
46
+ * const [value, setValue] = useState<string[]>([]);
47
47
  *
48
48
  * return (
49
49
  * <CheckboxGroup
@@ -60,7 +60,7 @@ export type CheckboxGroupProps = Omit<FieldControlProps<string[]>, 'readOnly'> &
60
60
  * }}
61
61
  * />
62
62
  * );
63
- * }
63
+ * };
64
64
  *
65
65
  * @name CheckboxGroup
66
66
  * @phase UXReview
@@ -12,8 +12,9 @@ export type CheckboxOptionProps = CommonProps<'style'> & ToggleOptionControlProp
12
12
  * @example
13
13
  * import { CheckboxOption } from '@bspk/ui/CheckboxOption';
14
14
  *
15
- * function Example() {
16
- * const [checked, setChecked] = React.useState(false);
15
+ * () => {
16
+ * const [checked, setChecked] = useState(false);
17
+ *
17
18
  * return (
18
19
  * <CheckboxOption
19
20
  * checked={checked}
@@ -22,12 +23,11 @@ export type CheckboxOptionProps = CommonProps<'style'> & ToggleOptionControlProp
22
23
  * name="example-checkbox-name"
23
24
  * onChange={(nextChecked, event) => {
24
25
  * setChecked(nextChecked);
25
- * console.log('Checkbox changed:', nextChecked, event);
26
26
  * }}
27
27
  * value="example-checkbox-value"
28
28
  * />
29
29
  * );
30
- * }
30
+ * };
31
31
  *
32
32
  * @name CheckboxOption
33
33
  * @phase UXReview