@bspk/ui 1.3.10 → 1.3.16

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 (519) hide show
  1. package/dist/components/Accordion/Accordion.d.ts +22 -20
  2. package/dist/components/Accordion/Accordion.js +22 -20
  3. package/dist/components/Accordion/Accordion.js.map +1 -1
  4. package/dist/components/Accordion/AccordionExample.js +5 -4
  5. package/dist/components/Accordion/AccordionExample.js.map +1 -1
  6. package/dist/components/Avatar/Avatar.d.ts +1 -2
  7. package/dist/components/Avatar/Avatar.js +2 -3
  8. package/dist/components/Avatar/Avatar.js.map +1 -1
  9. package/dist/components/Avatar/avatar.css +13 -8
  10. package/dist/components/Avatar/avatar.css.js +13 -8
  11. package/dist/components/AvatarGroup/AvatarGroup.d.ts +1 -1
  12. package/dist/components/AvatarGroup/AvatarGroup.js +1 -1
  13. package/dist/components/Badge/Badge.d.ts +1 -1
  14. package/dist/components/Badge/Badge.js +1 -1
  15. package/dist/components/Badge/BadgeExample.js +0 -1
  16. package/dist/components/Badge/BadgeExample.js.map +1 -1
  17. package/dist/components/BadgeDot/BadgeDot.d.ts +1 -1
  18. package/dist/components/BadgeDot/BadgeDot.js +1 -1
  19. package/dist/components/BadgeDot/BadgeDotExample.js +0 -1
  20. package/dist/components/BadgeDot/BadgeDotExample.js.map +1 -1
  21. package/dist/components/BannerAlert/BannerAlert.d.ts +14 -12
  22. package/dist/components/BannerAlert/BannerAlert.js +14 -12
  23. package/dist/components/BannerAlert/BannerAlert.js.map +1 -1
  24. package/dist/components/BannerAlert/BannerAlertExample.js +0 -1
  25. package/dist/components/BannerAlert/BannerAlertExample.js.map +1 -1
  26. package/dist/components/Breadcrumb/Breadcrumb.d.ts +20 -18
  27. package/dist/components/Breadcrumb/Breadcrumb.js +20 -18
  28. package/dist/components/Breadcrumb/Breadcrumb.js.map +1 -1
  29. package/dist/components/Button/Button.d.ts +29 -4
  30. package/dist/components/Button/Button.js +33 -8
  31. package/dist/components/Button/Button.js.map +1 -1
  32. package/dist/components/Button/button.css +4 -3
  33. package/dist/components/Button/button.css.js +4 -3
  34. package/dist/components/Calendar/Calendar.d.ts +5 -41
  35. package/dist/components/Calendar/Calendar.js +61 -185
  36. package/dist/components/Calendar/Calendar.js.map +1 -1
  37. package/dist/components/Calendar/CalendarExample.js +0 -1
  38. package/dist/components/Calendar/CalendarExample.js.map +1 -1
  39. package/dist/components/Calendar/calendar.css +35 -28
  40. package/dist/components/Calendar/calendar.css.js +35 -28
  41. package/dist/components/Calendar/index.d.ts +1 -0
  42. package/dist/components/Calendar/index.js +1 -0
  43. package/dist/components/Calendar/index.js.map +1 -1
  44. package/dist/components/Calendar/utils.d.ts +11 -0
  45. package/dist/components/Calendar/utils.js +76 -0
  46. package/dist/components/Calendar/utils.js.map +1 -0
  47. package/dist/components/Card/Card.d.ts +1 -1
  48. package/dist/components/Card/Card.js +1 -1
  49. package/dist/components/Carousel/Carousel.d.ts +8 -8
  50. package/dist/components/Carousel/Carousel.js +8 -8
  51. package/dist/components/Carousel/carousel.css +0 -1
  52. package/dist/components/Carousel/carousel.css.js +0 -1
  53. package/dist/components/Checkbox/Checkbox.d.ts +1 -1
  54. package/dist/components/Checkbox/Checkbox.js +1 -1
  55. package/dist/components/Checkbox/checkbox.css +3 -1
  56. package/dist/components/Checkbox/checkbox.css.js +3 -1
  57. package/dist/components/CheckboxGroup/CheckboxGroup.d.ts +1 -1
  58. package/dist/components/CheckboxGroup/CheckboxGroup.js +1 -1
  59. package/dist/components/CheckboxGroup/checkbox-group.css +1 -1
  60. package/dist/components/CheckboxGroup/checkbox-group.css.js +1 -1
  61. package/dist/components/CheckboxGroupField/CheckboxGroupField.d.ts +1 -1
  62. package/dist/components/CheckboxGroupField/CheckboxGroupField.js +1 -1
  63. package/dist/components/CheckboxOption/CheckboxOption.d.ts +1 -1
  64. package/dist/components/CheckboxOption/CheckboxOption.js +1 -1
  65. package/dist/components/Chip/Chip.d.ts +1 -1
  66. package/dist/components/Chip/Chip.js +1 -1
  67. package/dist/components/ChipGroup/ChipGroup.d.ts +16 -29
  68. package/dist/components/ChipGroup/ChipGroup.js +13 -23
  69. package/dist/components/ChipGroup/ChipGroup.js.map +1 -1
  70. package/dist/components/ChipGroup/ChipGroupExample.js +61 -6
  71. package/dist/components/ChipGroup/ChipGroupExample.js.map +1 -1
  72. package/dist/components/ChipGroup/chip-group.css +5 -3
  73. package/dist/components/ChipGroup/chip-group.css.js +5 -3
  74. package/dist/components/DatePicker/DatePicker.d.ts +23 -11
  75. package/dist/components/DatePicker/DatePicker.js +20 -83
  76. package/dist/components/DatePicker/DatePicker.js.map +1 -1
  77. package/dist/components/DatePicker/DatePickerExample.d.ts +1 -0
  78. package/dist/components/DatePicker/DatePickerExample.js +10 -2
  79. package/dist/components/DatePicker/DatePickerExample.js.map +1 -1
  80. package/dist/components/DatePicker/date-picker.css +9 -0
  81. package/dist/components/DatePicker/date-picker.css.js +9 -0
  82. package/dist/components/DatePickerField/DatePickerField.d.ts +1 -1
  83. package/dist/components/DatePickerField/DatePickerField.js +1 -1
  84. package/dist/components/Divider/Divider.d.ts +4 -4
  85. package/dist/components/Divider/Divider.js +4 -4
  86. package/dist/components/Divider/DividerExample.js +17 -20
  87. package/dist/components/Divider/DividerExample.js.map +1 -1
  88. package/dist/components/Drawer/Drawer.d.ts +8 -10
  89. package/dist/components/Drawer/Drawer.js +9 -12
  90. package/dist/components/Drawer/Drawer.js.map +1 -1
  91. package/dist/components/Drawer/DrawerExample.d.ts +1 -0
  92. package/dist/components/Drawer/DrawerExample.js +10 -4
  93. package/dist/components/Drawer/DrawerExample.js.map +1 -1
  94. package/dist/components/Drawer/drawer.css +6 -0
  95. package/dist/components/Drawer/drawer.css.js +6 -0
  96. package/dist/components/EmptyState/EmptyState.d.ts +2 -2
  97. package/dist/components/EmptyState/EmptyState.js +4 -7
  98. package/dist/components/EmptyState/EmptyState.js.map +1 -1
  99. package/dist/components/EmptyState/EmptyStateExample.js +5 -6
  100. package/dist/components/EmptyState/EmptyStateExample.js.map +1 -1
  101. package/dist/components/ExamplePlaceholder/ExamplePlaceholder.d.ts +6 -13
  102. package/dist/components/ExamplePlaceholder/ExamplePlaceholder.js +12 -7
  103. package/dist/components/ExamplePlaceholder/ExamplePlaceholder.js.map +1 -1
  104. package/dist/components/Fab/Fab.d.ts +5 -3
  105. package/dist/components/Fab/Fab.js +8 -6
  106. package/dist/components/Fab/Fab.js.map +1 -1
  107. package/dist/components/Fab/FabExample.d.ts +1 -0
  108. package/dist/components/Fab/FabExample.js +6 -0
  109. package/dist/components/Fab/FabExample.js.map +1 -1
  110. package/dist/components/Fab/fab.css +5 -3
  111. package/dist/components/Fab/fab.css.js +5 -3
  112. package/dist/components/FileUpload/FileUpload.d.ts +1 -1
  113. package/dist/components/FileUpload/FileUpload.js +1 -1
  114. package/dist/components/FileUploadItem/FileUploadItem.d.ts +1 -1
  115. package/dist/components/FileUploadItem/FileUploadItem.js +1 -1
  116. package/dist/components/Flex/Flex.d.ts +55 -0
  117. package/dist/components/Flex/Flex.js +38 -0
  118. package/dist/components/Flex/Flex.js.map +1 -0
  119. package/dist/components/Flex/FlexExample.d.ts +5 -0
  120. package/dist/components/Flex/FlexExample.js +13 -0
  121. package/dist/components/Flex/FlexExample.js.map +1 -0
  122. package/dist/components/Flex/index.d.ts +1 -0
  123. package/dist/components/Flex/index.js +2 -0
  124. package/dist/components/Flex/index.js.map +1 -0
  125. package/dist/components/FormField/FormFieldExample.js +0 -1
  126. package/dist/components/FormField/FormFieldExample.js.map +1 -1
  127. package/dist/components/Grid/Grid.d.ts +48 -0
  128. package/dist/components/Grid/Grid.js +36 -0
  129. package/dist/components/Grid/Grid.js.map +1 -0
  130. package/dist/components/Grid/GridExample.d.ts +3 -0
  131. package/dist/components/Grid/GridExample.js +28 -0
  132. package/dist/components/Grid/GridExample.js.map +1 -0
  133. package/dist/components/Grid/index.d.ts +1 -0
  134. package/dist/components/Grid/index.js +2 -0
  135. package/dist/components/Grid/index.js.map +1 -0
  136. package/dist/components/InlineAlert/InlineAlert.d.ts +1 -1
  137. package/dist/components/InlineAlert/InlineAlert.js +1 -1
  138. package/dist/components/Input/Input.d.ts +5 -9
  139. package/dist/components/Input/Input.js +5 -9
  140. package/dist/components/Input/Input.js.map +1 -1
  141. package/dist/components/Input/InputElement.js +3 -6
  142. package/dist/components/Input/InputElement.js.map +1 -1
  143. package/dist/components/Input/InputExample.d.ts +1 -0
  144. package/dist/components/Input/InputExample.js +10 -1
  145. package/dist/components/Input/InputExample.js.map +1 -1
  146. package/dist/components/Input/input.css +6 -1
  147. package/dist/components/Input/input.css.js +6 -1
  148. package/dist/components/InputField/InputField.d.ts +1 -1
  149. package/dist/components/InputField/InputField.js +1 -1
  150. package/dist/components/InputNumber/InputNumber.d.ts +6 -15
  151. package/dist/components/InputNumber/InputNumber.js +6 -15
  152. package/dist/components/InputNumber/InputNumber.js.map +1 -1
  153. package/dist/components/InputNumber/InputNumberExample.d.ts +1 -0
  154. package/dist/components/InputNumber/InputNumberExample.js +10 -1
  155. package/dist/components/InputNumber/InputNumberExample.js.map +1 -1
  156. package/dist/components/InputNumber/input-number.css +6 -4
  157. package/dist/components/InputNumber/input-number.css.js +6 -4
  158. package/dist/components/InputNumberField/InputNumberField.d.ts +1 -1
  159. package/dist/components/InputNumberField/InputNumberField.js +1 -1
  160. package/dist/components/InputPhone/InputPhone.d.ts +7 -9
  161. package/dist/components/InputPhone/InputPhone.js +19 -19
  162. package/dist/components/InputPhone/InputPhone.js.map +1 -1
  163. package/dist/components/InputPhone/InputPhoneExample.d.ts +2 -1
  164. package/dist/components/InputPhone/InputPhoneExample.js +9 -1
  165. package/dist/components/InputPhone/InputPhoneExample.js.map +1 -1
  166. package/dist/components/InputPhoneField/InputPhoneField.d.ts +1 -1
  167. package/dist/components/InputPhoneField/InputPhoneField.js +1 -1
  168. package/dist/components/Link/Link.d.ts +1 -1
  169. package/dist/components/Link/Link.js +1 -1
  170. package/dist/components/ListItem/ListItem.d.ts +1 -1
  171. package/dist/components/ListItem/ListItem.js +1 -1
  172. package/dist/components/Menu/Menu.d.ts +1 -3
  173. package/dist/components/Menu/Menu.js +1 -3
  174. package/dist/components/Menu/Menu.js.map +1 -1
  175. package/dist/components/Modal/Modal.d.ts +1 -3
  176. package/dist/components/Modal/Modal.js +2 -4
  177. package/dist/components/Modal/Modal.js.map +1 -1
  178. package/dist/components/OTPInput/OTPInput.d.ts +10 -4
  179. package/dist/components/OTPInput/OTPInput.js +8 -40
  180. package/dist/components/OTPInput/OTPInput.js.map +1 -1
  181. package/dist/components/OTPInput/OTPInputExample.js +6 -2
  182. package/dist/components/OTPInput/OTPInputExample.js.map +1 -1
  183. package/dist/components/OTPInput/otp-input.css +18 -17
  184. package/dist/components/OTPInput/otp-input.css.js +18 -17
  185. package/dist/components/PageControl/PageControl.d.ts +1 -1
  186. package/dist/components/PageControl/PageControl.js +1 -1
  187. package/dist/components/PageControl/PageControlExample.js +0 -1
  188. package/dist/components/PageControl/PageControlExample.js.map +1 -1
  189. package/dist/components/PageHeader/PageHeader.d.ts +57 -0
  190. package/dist/components/PageHeader/PageHeader.js +28 -0
  191. package/dist/components/PageHeader/PageHeader.js.map +1 -0
  192. package/dist/components/PageHeader/PageHeaderExample.d.ts +4 -0
  193. package/dist/components/PageHeader/PageHeaderExample.js +56 -0
  194. package/dist/components/PageHeader/PageHeaderExample.js.map +1 -0
  195. package/dist/components/PageHeader/index.d.ts +1 -0
  196. package/dist/components/PageHeader/index.js +2 -0
  197. package/dist/components/PageHeader/index.js.map +1 -0
  198. package/dist/components/PageHeader/page-header.css +35 -0
  199. package/dist/components/PageHeader/page-header.css.js +40 -0
  200. package/dist/components/Pagination/Pagination.d.ts +2 -2
  201. package/dist/components/Pagination/Pagination.js +8 -3
  202. package/dist/components/Pagination/Pagination.js.map +1 -1
  203. package/dist/components/Pagination/pagination.css +8 -2
  204. package/dist/components/Pagination/pagination.css.js +8 -2
  205. package/dist/components/Password/Password.d.ts +11 -16
  206. package/dist/components/Password/Password.js +11 -16
  207. package/dist/components/Password/Password.js.map +1 -1
  208. package/dist/components/Password/PasswordExample.d.ts +1 -0
  209. package/dist/components/Password/PasswordExample.js +9 -0
  210. package/dist/components/Password/PasswordExample.js.map +1 -1
  211. package/dist/components/PasswordField/PasswordField.d.ts +1 -1
  212. package/dist/components/PasswordField/PasswordField.js +1 -1
  213. package/dist/components/Popover/Popover.d.ts +1 -1
  214. package/dist/components/Popover/Popover.js +1 -1
  215. package/dist/components/Popover/PopoverExample.js +0 -1
  216. package/dist/components/Popover/PopoverExample.js.map +1 -1
  217. package/dist/components/Popover/popover.css +7 -5
  218. package/dist/components/Popover/popover.css.js +7 -5
  219. package/dist/components/ProgressBar/ProgressBar.d.ts +1 -1
  220. package/dist/components/ProgressBar/ProgressBar.js +1 -1
  221. package/dist/components/ProgressCircle/ProgressCircle.d.ts +1 -1
  222. package/dist/components/ProgressCircle/ProgressCircle.js +1 -1
  223. package/dist/components/ProgressionStepper/ProgressionStepper.d.ts +1 -1
  224. package/dist/components/ProgressionStepper/ProgressionStepper.js +1 -1
  225. package/dist/components/ProgressionStepper/ProgressionStepperExample.js +0 -1
  226. package/dist/components/ProgressionStepper/ProgressionStepperExample.js.map +1 -1
  227. package/dist/components/ProgressionStepper/progression-stepper.css +5 -3
  228. package/dist/components/ProgressionStepper/progression-stepper.css.js +5 -3
  229. package/dist/components/ProgressionStepperBar/ProgressionStepperBar.d.ts +1 -1
  230. package/dist/components/ProgressionStepperBar/ProgressionStepperBar.js +1 -1
  231. package/dist/components/ProgressionStepperBar/progression-stepper-bar.css +6 -6
  232. package/dist/components/ProgressionStepperBar/progression-stepper-bar.css.js +7 -7
  233. package/dist/components/RadioGroup/RadioGroup.d.ts +1 -1
  234. package/dist/components/RadioGroup/RadioGroup.js +1 -1
  235. package/dist/components/RadioGroup/radio-group.css +1 -1
  236. package/dist/components/RadioGroup/radio-group.css.js +1 -1
  237. package/dist/components/RadioGroupField/RadioGroupField.d.ts +1 -1
  238. package/dist/components/RadioGroupField/RadioGroupField.js +1 -1
  239. package/dist/components/Rating/Rating.d.ts +3 -2
  240. package/dist/components/Rating/Rating.js +5 -3
  241. package/dist/components/Rating/Rating.js.map +1 -1
  242. package/dist/components/SearchBar/SearchBar.d.ts +1 -1
  243. package/dist/components/SearchBar/SearchBar.js +3 -4
  244. package/dist/components/SearchBar/SearchBar.js.map +1 -1
  245. package/dist/components/SegmentedControl/SegmentedControl.d.ts +1 -1
  246. package/dist/components/SegmentedControl/SegmentedControl.js +1 -1
  247. package/dist/components/SegmentedControl/segmented-control.css +3 -1
  248. package/dist/components/SegmentedControl/segmented-control.css.js +3 -1
  249. package/dist/components/Select/Select.d.ts +11 -24
  250. package/dist/components/Select/Select.js +11 -24
  251. package/dist/components/Select/Select.js.map +1 -1
  252. package/dist/components/Select/SelectExample.d.ts +1 -0
  253. package/dist/components/Select/SelectExample.js +18 -1
  254. package/dist/components/Select/SelectExample.js.map +1 -1
  255. package/dist/components/SelectField/SelectField.d.ts +1 -1
  256. package/dist/components/SelectField/SelectField.js +1 -1
  257. package/dist/components/Skeleton/Skeleton.d.ts +1 -1
  258. package/dist/components/Skeleton/Skeleton.js +1 -1
  259. package/dist/components/SkeletonText/SkeletonText.d.ts +1 -1
  260. package/dist/components/SkeletonText/SkeletonText.js +1 -1
  261. package/dist/components/Slider/Slider.d.ts +18 -3
  262. package/dist/components/Slider/Slider.js +20 -4
  263. package/dist/components/Slider/Slider.js.map +1 -1
  264. package/dist/components/Slider/SliderExample.d.ts +1 -0
  265. package/dist/components/Slider/SliderExample.js +7 -2
  266. package/dist/components/Slider/SliderExample.js.map +1 -1
  267. package/dist/components/Snackbar/Manager.d.ts +1 -1
  268. package/dist/components/Snackbar/Manager.js +1 -1
  269. package/dist/components/Snackbar/Snackbar.d.ts +1 -1
  270. package/dist/components/Snackbar/Snackbar.js +1 -1
  271. package/dist/components/Snackbar/SnackbarExample.js +0 -1
  272. package/dist/components/Snackbar/SnackbarExample.js.map +1 -1
  273. package/dist/components/Switch/Switch.d.ts +1 -1
  274. package/dist/components/Switch/Switch.js +1 -1
  275. package/dist/components/Switch/switch.css +11 -9
  276. package/dist/components/Switch/switch.css.js +11 -9
  277. package/dist/components/SwitchOption/SwitchOption.d.ts +1 -1
  278. package/dist/components/SwitchOption/SwitchOption.js +1 -1
  279. package/dist/components/TabGroup/TabGroup.d.ts +1 -1
  280. package/dist/components/TabGroup/TabGroup.js +1 -1
  281. package/dist/components/TabGroup/TabGroupExample.js +0 -1
  282. package/dist/components/TabGroup/TabGroupExample.js.map +1 -1
  283. package/dist/components/TabList/TabListExample.js +0 -1
  284. package/dist/components/TabList/TabListExample.js.map +1 -1
  285. package/dist/components/TabList/tab-list.css +5 -3
  286. package/dist/components/TabList/tab-list.css.js +5 -3
  287. package/dist/components/Table/Table.d.ts +2 -2
  288. package/dist/components/Table/Table.js +8 -8
  289. package/dist/components/Table/Table.js.map +1 -1
  290. package/dist/components/Table/TableExample.js +56 -54
  291. package/dist/components/Table/TableExample.js.map +1 -1
  292. package/dist/components/Table/utils.d.ts +2 -2
  293. package/dist/components/Table/utils.js +27 -22
  294. package/dist/components/Table/utils.js.map +1 -1
  295. package/dist/components/Tag/Tag.d.ts +1 -1
  296. package/dist/components/Tag/Tag.js +1 -1
  297. package/dist/components/Textarea/Textarea.d.ts +5 -8
  298. package/dist/components/Textarea/Textarea.js +5 -8
  299. package/dist/components/Textarea/Textarea.js.map +1 -1
  300. package/dist/components/Textarea/TextareaExample.d.ts +1 -0
  301. package/dist/components/Textarea/TextareaExample.js +12 -1
  302. package/dist/components/Textarea/TextareaExample.js.map +1 -1
  303. package/dist/components/Textarea/textarea.css +5 -3
  304. package/dist/components/Textarea/textarea.css.js +5 -3
  305. package/dist/components/TextareaField/TextareaField.d.ts +1 -1
  306. package/dist/components/TextareaField/TextareaField.js +1 -1
  307. package/dist/components/TimePicker/TimePicker.d.ts +5 -9
  308. package/dist/components/TimePicker/TimePicker.js +5 -9
  309. package/dist/components/TimePicker/TimePicker.js.map +1 -1
  310. package/dist/components/TimePicker/TimePickerExample.d.ts +1 -0
  311. package/dist/components/TimePicker/TimePickerExample.js +9 -1
  312. package/dist/components/TimePicker/TimePickerExample.js.map +1 -1
  313. package/dist/components/TimePickerField/TimePickerField.d.ts +1 -1
  314. package/dist/components/TimePickerField/TimePickerField.js +1 -1
  315. package/dist/components/Tooltip/Tooltip.d.ts +1 -1
  316. package/dist/components/Tooltip/Tooltip.js +2 -2
  317. package/dist/components/Tooltip/Tooltip.js.map +1 -1
  318. package/dist/components/Tooltip/tooltip.css +7 -3
  319. package/dist/components/Tooltip/tooltip.css.js +7 -3
  320. package/dist/components/Txt/Txt.d.ts +1 -1
  321. package/dist/components/Txt/Txt.js +1 -1
  322. package/dist/components/UIProvider/UIProvider.js +4 -6
  323. package/dist/components/UIProvider/UIProvider.js.map +1 -1
  324. package/dist/components/UIProvider/UIProviderExample.d.ts +0 -1
  325. package/dist/components/UIProvider/UIProviderExample.js +1 -46
  326. package/dist/components/UIProvider/UIProviderExample.js.map +1 -1
  327. package/dist/hooks/useControlledState.d.ts +7 -0
  328. package/dist/hooks/useControlledState.js +21 -0
  329. package/dist/hooks/useControlledState.js.map +1 -0
  330. package/dist/hooks/{useAddEventListener.js → useEventListener.js} +1 -1
  331. package/dist/hooks/useEventListener.js.map +1 -0
  332. package/dist/types/meta.d.ts +0 -1
  333. package/dist/types/meta.js +0 -7
  334. package/dist/types/meta.js.map +1 -1
  335. package/dist/utils/createCustomEvent.js +1 -1
  336. package/dist/utils/createCustomEvent.js.map +1 -1
  337. package/dist/utils/demo.d.ts +19 -2
  338. package/dist/utils/demo.js.map +1 -1
  339. package/dist/utils/dom.d.ts +1 -0
  340. package/dist/utils/dom.js +5 -0
  341. package/dist/utils/dom.js.map +1 -1
  342. package/dist/utils/handleKeyDown.d.ts +1 -0
  343. package/dist/utils/handleKeyDown.js +9 -3
  344. package/dist/utils/handleKeyDown.js.map +1 -1
  345. package/dist/utils/keyboard.d.ts +3 -1
  346. package/dist/utils/keyboard.js.map +1 -1
  347. package/dist/utils/sendAriaLiveMessage.d.ts +8 -0
  348. package/dist/utils/sendAriaLiveMessage.js +14 -0
  349. package/dist/utils/sendAriaLiveMessage.js.map +1 -0
  350. package/dist/utils/sizing.d.ts +3 -0
  351. package/dist/utils/sizing.js +28 -0
  352. package/dist/utils/sizing.js.map +1 -0
  353. package/dist/utils/uiContext.d.ts +0 -1
  354. package/dist/utils/uiContext.js.map +1 -1
  355. package/meta.ts +9 -8
  356. package/package.json +28 -22
  357. package/src/components/Accordion/Accordion.tsx +22 -20
  358. package/src/components/Accordion/AccordionExample.tsx +5 -4
  359. package/src/components/Avatar/Avatar.tsx +2 -3
  360. package/src/components/Avatar/avatar.scss +9 -6
  361. package/src/components/AvatarGroup/AvatarGroup.tsx +1 -1
  362. package/src/components/Badge/Badge.tsx +1 -1
  363. package/src/components/Badge/BadgeExample.tsx +0 -1
  364. package/src/components/BadgeDot/BadgeDot.tsx +1 -1
  365. package/src/components/BadgeDot/BadgeDotExample.tsx +0 -1
  366. package/src/components/BannerAlert/BannerAlert.tsx +14 -12
  367. package/src/components/BannerAlert/BannerAlertExample.tsx +0 -1
  368. package/src/components/Breadcrumb/Breadcrumb.tsx +20 -18
  369. package/src/components/Button/Button.tsx +36 -10
  370. package/src/components/Button/button.scss +13 -6
  371. package/src/components/Calendar/Calendar.rtl.test.tsx +1 -1
  372. package/src/components/Calendar/Calendar.tsx +156 -371
  373. package/src/components/Calendar/CalendarExample.tsx +0 -1
  374. package/src/components/Calendar/calendar.scss +46 -40
  375. package/src/components/Calendar/index.tsx +1 -0
  376. package/src/components/Calendar/utils.tsx +98 -0
  377. package/src/components/Card/Card.tsx +1 -1
  378. package/src/components/Carousel/Carousel.tsx +8 -8
  379. package/src/components/Carousel/carousel.scss +0 -1
  380. package/src/components/Checkbox/Checkbox.tsx +1 -1
  381. package/src/components/CheckboxGroup/CheckboxGroup.tsx +1 -1
  382. package/src/components/CheckboxGroupField/CheckboxGroupField.tsx +1 -1
  383. package/src/components/CheckboxOption/CheckboxOption.tsx +1 -1
  384. package/src/components/Chip/Chip.tsx +1 -1
  385. package/src/components/ChipGroup/ChipGroup.rtl.test.tsx +16 -11
  386. package/src/components/ChipGroup/ChipGroup.tsx +19 -37
  387. package/src/components/ChipGroup/ChipGroupExample.tsx +64 -36
  388. package/src/components/ChipGroup/chip-group.scss +5 -3
  389. package/src/components/DatePicker/DatePicker.rtl.test.tsx +1 -1
  390. package/src/components/DatePicker/DatePicker.tsx +51 -106
  391. package/src/components/DatePicker/DatePickerExample.tsx +20 -3
  392. package/src/components/DatePicker/date-picker.scss +11 -0
  393. package/src/components/DatePickerField/DatePickerField.tsx +1 -1
  394. package/src/components/Divider/Divider.tsx +4 -4
  395. package/src/components/Divider/DividerExample.tsx +22 -23
  396. package/src/components/Drawer/Drawer.tsx +9 -16
  397. package/src/components/Drawer/DrawerExample.tsx +28 -4
  398. package/src/components/Drawer/drawer.scss +7 -0
  399. package/src/components/EmptyState/EmptyState.rtl.test.tsx +1 -1
  400. package/src/components/EmptyState/EmptyState.tsx +14 -21
  401. package/src/components/EmptyState/EmptyStateExample.tsx +5 -5
  402. package/src/components/ExamplePlaceholder/ExamplePlaceholder.tsx +17 -22
  403. package/src/components/Fab/Fab.tsx +10 -7
  404. package/src/components/Fab/FabExample.tsx +10 -1
  405. package/src/components/FileUpload/FileUpload.tsx +1 -1
  406. package/src/components/FileUploadItem/FileUploadItem.tsx +1 -1
  407. package/src/components/{Layout/Layout.rtl.test.tsx → Flex/Flex.rtl.test.tsx} +3 -3
  408. package/src/components/Flex/Flex.tsx +100 -0
  409. package/src/components/Flex/FlexExample.tsx +27 -0
  410. package/src/components/Flex/index.tsx +1 -0
  411. package/src/components/FormField/FormFieldExample.tsx +1 -2
  412. package/src/components/Grid/Grid.rtl.test.tsx +19 -0
  413. package/src/components/Grid/Grid.tsx +75 -0
  414. package/src/components/Grid/GridExample.tsx +42 -0
  415. package/src/components/Grid/index.tsx +1 -0
  416. package/src/components/InlineAlert/InlineAlert.tsx +1 -1
  417. package/src/components/Input/Input.tsx +5 -9
  418. package/src/components/Input/InputElement.tsx +4 -7
  419. package/src/components/Input/InputExample.tsx +19 -1
  420. package/src/components/Input/input.scss +9 -1
  421. package/src/components/InputField/InputField.tsx +1 -1
  422. package/src/components/InputNumber/InputNumber.tsx +6 -15
  423. package/src/components/InputNumber/InputNumberExample.tsx +24 -1
  424. package/src/components/InputNumberField/InputNumberField.tsx +1 -1
  425. package/src/components/InputPhone/InputPhone.tsx +18 -17
  426. package/src/components/InputPhone/InputPhoneExample.tsx +27 -2
  427. package/src/components/InputPhoneField/InputPhoneField.tsx +1 -1
  428. package/src/components/Link/Link.tsx +1 -1
  429. package/src/components/ListItem/ListItem.tsx +1 -1
  430. package/src/components/Menu/Menu.tsx +1 -3
  431. package/src/components/Modal/Modal.tsx +2 -4
  432. package/src/components/OTPInput/OTPInput.rtl.test.tsx +4 -2
  433. package/src/components/OTPInput/OTPInput.tsx +31 -64
  434. package/src/components/OTPInput/OTPInputExample.tsx +6 -2
  435. package/src/components/OTPInput/otp-input.scss +50 -45
  436. package/src/components/PageControl/PageControl.tsx +1 -1
  437. package/src/components/PageControl/PageControlExample.tsx +0 -1
  438. package/src/components/PageHeader/PageHeader.rtl.test.tsx +18 -0
  439. package/src/components/PageHeader/PageHeader.tsx +78 -0
  440. package/src/components/PageHeader/PageHeaderExample.tsx +58 -0
  441. package/src/components/PageHeader/index.tsx +1 -0
  442. package/src/components/PageHeader/page-header.scss +41 -0
  443. package/src/components/Pagination/Pagination.tsx +14 -3
  444. package/src/components/Pagination/pagination.scss +12 -5
  445. package/src/components/Password/Password.tsx +11 -16
  446. package/src/components/Password/PasswordExample.tsx +18 -1
  447. package/src/components/PasswordField/PasswordField.tsx +1 -1
  448. package/src/components/Popover/Popover.tsx +1 -1
  449. package/src/components/Popover/PopoverExample.tsx +0 -1
  450. package/src/components/ProgressBar/ProgressBar.tsx +1 -1
  451. package/src/components/ProgressCircle/ProgressCircle.tsx +1 -1
  452. package/src/components/ProgressionStepper/ProgressionStepper.tsx +1 -1
  453. package/src/components/ProgressionStepper/ProgressionStepperExample.tsx +0 -1
  454. package/src/components/ProgressionStepperBar/ProgressionStepperBar.tsx +1 -1
  455. package/src/components/RadioGroup/RadioGroup.tsx +1 -1
  456. package/src/components/RadioGroupField/RadioGroupField.tsx +1 -1
  457. package/src/components/Rating/Rating.tsx +7 -3
  458. package/src/components/SearchBar/SearchBar.tsx +3 -5
  459. package/src/components/SegmentedControl/SegmentedControl.tsx +1 -1
  460. package/src/components/Select/Select.tsx +11 -24
  461. package/src/components/Select/SelectExample.tsx +36 -1
  462. package/src/components/SelectField/SelectField.tsx +1 -1
  463. package/src/components/Skeleton/Skeleton.tsx +1 -1
  464. package/src/components/SkeletonText/SkeletonText.tsx +1 -1
  465. package/src/components/Slider/Slider.tsx +21 -4
  466. package/src/components/Slider/SliderExample.tsx +16 -2
  467. package/src/components/Snackbar/Manager.tsx +1 -1
  468. package/src/components/Snackbar/Snackbar.tsx +1 -1
  469. package/src/components/Snackbar/SnackbarExample.tsx +0 -1
  470. package/src/components/Switch/Switch.tsx +1 -1
  471. package/src/components/SwitchOption/SwitchOption.tsx +1 -1
  472. package/src/components/TabGroup/TabGroup.tsx +1 -1
  473. package/src/components/TabGroup/TabGroupExample.tsx +0 -1
  474. package/src/components/TabList/TabListExample.tsx +0 -1
  475. package/src/components/Table/Table.tsx +11 -16
  476. package/src/components/Table/TableExample.tsx +56 -54
  477. package/src/components/Table/utils.ts +31 -20
  478. package/src/components/Tag/Tag.tsx +1 -1
  479. package/src/components/Textarea/Textarea.tsx +5 -8
  480. package/src/components/Textarea/TextareaExample.tsx +21 -1
  481. package/src/components/TextareaField/TextareaField.tsx +1 -1
  482. package/src/components/TimePicker/TimePicker.tsx +5 -9
  483. package/src/components/TimePicker/TimePickerExample.tsx +18 -1
  484. package/src/components/TimePickerField/TimePickerField.tsx +1 -1
  485. package/src/components/Tooltip/Tooltip.tsx +2 -2
  486. package/src/components/Tooltip/tooltip.scss +2 -0
  487. package/src/components/Txt/Txt.tsx +1 -1
  488. package/src/components/UIProvider/UIProvider.tsx +1 -4
  489. package/src/components/UIProvider/UIProviderExample.tsx +0 -83
  490. package/src/hooks/useControlledState.ts +31 -0
  491. package/src/types/meta.ts +0 -8
  492. package/src/utils/createCustomEvent.ts +1 -1
  493. package/src/utils/demo.ts +19 -2
  494. package/src/utils/dom.ts +8 -0
  495. package/src/utils/handleKeyDown.ts +9 -3
  496. package/src/utils/keyboard.ts +5 -2
  497. package/src/utils/sendAriaLiveMessage.ts +17 -0
  498. package/src/utils/sizing.ts +30 -0
  499. package/src/utils/uiContext.ts +0 -1
  500. package/.scripts/index.ts +0 -110
  501. package/dist/components/Layout/Layout.d.ts +0 -50
  502. package/dist/components/Layout/Layout.js +0 -28
  503. package/dist/components/Layout/Layout.js.map +0 -1
  504. package/dist/components/Layout/LayoutExample.d.ts +0 -4
  505. package/dist/components/Layout/LayoutExample.js +0 -9
  506. package/dist/components/Layout/LayoutExample.js.map +0 -1
  507. package/dist/components/Layout/index.d.ts +0 -1
  508. package/dist/components/Layout/index.js +0 -2
  509. package/dist/components/Layout/index.js.map +0 -1
  510. package/dist/components/UIProvider/AriaLiveMessageHandler.d.ts +0 -13
  511. package/dist/components/UIProvider/AriaLiveMessageHandler.js +0 -31
  512. package/dist/components/UIProvider/AriaLiveMessageHandler.js.map +0 -1
  513. package/dist/hooks/useAddEventListener.js.map +0 -1
  514. package/src/components/Layout/Layout.tsx +0 -85
  515. package/src/components/Layout/LayoutExample.tsx +0 -17
  516. package/src/components/Layout/index.tsx +0 -1
  517. package/src/components/UIProvider/AriaLiveMessageHandler.tsx +0 -46
  518. /package/dist/hooks/{useAddEventListener.d.ts → useEventListener.d.ts} +0 -0
  519. /package/src/hooks/{useAddEventListener.ts → useEventListener.ts} +0 -0
@@ -0,0 +1,78 @@
1
+ import { Avatar, AvatarProps } from '-/components/Avatar';
2
+ import { Breadcrumb, BreadcrumbProps } from '-/components/Breadcrumb';
3
+ import './page-header.scss';
4
+
5
+ export type PageHeaderProps = {
6
+ /**
7
+ * The actions slot content.
8
+ *
9
+ * Appears in the top right of the header next to the title.
10
+ */
11
+ actions?: React.ReactNode;
12
+ /**
13
+ * Breadcrumb properties.
14
+ *
15
+ * If provided, a breadcrumb will be rendered above the title.
16
+ */
17
+ breadcrumb?: BreadcrumbProps;
18
+ /**
19
+ * The avatar slot content.
20
+ *
21
+ * Appears to the left of the title.
22
+ */
23
+ avatar?: AvatarProps;
24
+ /**
25
+ * The subheader slot content.
26
+ *
27
+ * Appears below the header.
28
+ */
29
+ subHeader?: React.ReactNode;
30
+ /**
31
+ * The page title content.
32
+ *
33
+ * Appears as the main title of the page.
34
+ */
35
+ title: string;
36
+ };
37
+
38
+ /**
39
+ * A standard page header component.
40
+ *
41
+ * @example
42
+ * import { PageHeader } from '@bspk/ui/PageHeader';
43
+ *
44
+ * <PageHeader
45
+ * actions={<Slot height={32} label="Page actions slot" width={372} />}
46
+ * subHeader={
47
+ * <>
48
+ * <Slot height="var(--spacing-sizing-06)" label="Slot component" width={200} />
49
+ * <Slot height="var(--spacing-sizing-06)" label="Slot component 2" width={200} />
50
+ * </>
51
+ * }
52
+ * title="Page Title"
53
+ * />;
54
+ *
55
+ * @name PageHeader
56
+ * @phase Dev
57
+ */
58
+ export function PageHeader({ actions, breadcrumb, avatar, subHeader, title }: PageHeaderProps) {
59
+ return (
60
+ <span data-bspk="page-header">
61
+ {breadcrumb && (
62
+ <div data-breadcrumb>
63
+ <Breadcrumb {...breadcrumb} />
64
+ </div>
65
+ )}
66
+ <div data-has-avatar={!!avatar} data-header>
67
+ <div data-title>
68
+ {avatar && <Avatar {...avatar} size="xx-large" />}
69
+ <h1>{title}</h1>
70
+ </div>
71
+ {actions && <div data-page-actions>{actions}</div>}
72
+ </div>
73
+ {subHeader && <div data-subheader>{subHeader}</div>}
74
+ </span>
75
+ );
76
+ }
77
+
78
+ /** Copyright 2025 Anywhere Real Estate - CC BY 4.0 */
@@ -0,0 +1,58 @@
1
+ import { PageHeaderProps } from '.';
2
+ import { ExamplePlaceholder } from '-/components/ExamplePlaceholder';
3
+ import { ComponentExample, Preset } from '-/utils/demo';
4
+
5
+ export const presets: Preset<PageHeaderProps>[] = [
6
+ {
7
+ label: 'Title Only',
8
+ propState: {
9
+ title: 'Page Title',
10
+ },
11
+ designPattern: true,
12
+ },
13
+ {
14
+ label: 'With Actions',
15
+ propState: {
16
+ title: 'Page Title',
17
+ actions: <ExamplePlaceholder height={32} label="Page actions slot" width={372} />,
18
+ },
19
+ designPattern: true,
20
+ },
21
+ {
22
+ label: 'With Breadcrumb',
23
+ propState: {
24
+ title: 'Page Title',
25
+ breadcrumb: {
26
+ items: [
27
+ { label: 'Home', href: '#/home' },
28
+ { label: 'Section', href: '#/section' },
29
+ { label: 'Page Title', href: '#/page' },
30
+ ],
31
+ },
32
+ actions: <ExamplePlaceholder height={32} label="Page actions slot" width={372} />,
33
+ },
34
+ designPattern: true,
35
+ },
36
+ {
37
+ label: 'Profile',
38
+ propState: {
39
+ title: 'Charlie Brown',
40
+ avatar: { image: '/avatar-01.png', name: 'CB' },
41
+ actions: <ExamplePlaceholder height={32} label="Page actions slot" width={372} />,
42
+ },
43
+ designPattern: true,
44
+ },
45
+ ];
46
+
47
+ export const PageHeaderExample: ComponentExample<PageHeaderProps> = {
48
+ defaultState: {
49
+ title: 'Page Title',
50
+ actions: <ExamplePlaceholder height={32} label="Page actions slot" width={372} />,
51
+ },
52
+ disableProps: [],
53
+ presets,
54
+ render: ({ props, Component }) => <Component {...props} />,
55
+ variants: false,
56
+ fullPage: true,
57
+ hideDemo: true,
58
+ };
@@ -0,0 +1 @@
1
+ export * from './PageHeader';
@@ -0,0 +1,41 @@
1
+ [data-bspk='page-header'] {
2
+ display: flex;
3
+ flex-direction: column;
4
+ width: 100%;
5
+ background-color: var(--background-base);
6
+
7
+ [data-breadcrumb] {
8
+ padding: var(--spacing-sizing-05) var(--spacing-sizing-05) 0;
9
+ }
10
+
11
+ [data-header] {
12
+ padding: var(--spacing-sizing-05);
13
+ display: flex;
14
+ justify-content: space-between;
15
+ align-items: end;
16
+
17
+ [data-title] {
18
+ display: flex;
19
+ align-items: center;
20
+ gap: var(--spacing-sizing-03);
21
+
22
+ h1 {
23
+ margin: 0;
24
+ font: var(--heading-h3);
25
+ }
26
+ }
27
+
28
+ &[data-has-avatar] {
29
+ align-items: center;
30
+ }
31
+ }
32
+
33
+ [data-subheader] {
34
+ padding: 0 var(--spacing-sizing-05);
35
+ display: flex;
36
+ align-items: end;
37
+ justify-content: space-between;
38
+ }
39
+ }
40
+
41
+ /** Copyright 2025 Anywhere Real Estate - CC BY 4.0 */
@@ -4,6 +4,7 @@ import { AriaAttributes, useEffect, useState } from 'react';
4
4
  import { PageList } from './PageList';
5
5
  import { Button } from '-/components/Button';
6
6
  import { InputElement } from '-/components/Input';
7
+ import { sendAriaLiveMessage } from '-/utils/sendAriaLiveMessage';
7
8
 
8
9
  // After this point the manual input renders. With equal or fewer pages the individual page buttons render instead.
9
10
  const INPUT_TYPE_THRESHOLD = 7;
@@ -42,9 +43,19 @@ export type PaginationProps = {
42
43
  * }
43
44
  *
44
45
  * @name Pagination
45
- * @phase UXReview
46
+ * @phase Stable
46
47
  */
47
- export function Pagination({ numPages, value, onChange, ...ariaProps }: AriaAttributes & PaginationProps) {
48
+ export function Pagination({
49
+ numPages,
50
+ value,
51
+ onChange: onChangeProp,
52
+ ...ariaProps
53
+ }: AriaAttributes & PaginationProps) {
54
+ const onChange = (newPage: number) => {
55
+ onChangeProp(newPage);
56
+ sendAriaLiveMessage(`Page ${newPage} of ${numPages}`);
57
+ };
58
+
48
59
  const nextPage = () => {
49
60
  if (value < numPages) onChange(value + 1);
50
61
  };
@@ -102,7 +113,7 @@ export function Pagination({ numPages, value, onChange, ...ariaProps }: AriaAttr
102
113
  type="number"
103
114
  value={inputValue}
104
115
  />
105
- of {numPages}
116
+ <span>of {numPages}</span>
106
117
  </form>
107
118
  ) : (
108
119
  <PageList numPages={numPages} onChange={onChange} value={value} />
@@ -8,13 +8,20 @@
8
8
 
9
9
  [data-input-form] {
10
10
  display: contents;
11
- }
12
11
 
13
- [data-bspk='input'] {
14
- max-width: var(--spacing-sizing-12);
12
+ [data-bspk='input'] {
13
+ max-width: var(--spacing-sizing-12);
14
+ margin-right: var(--spacing-sizing-01);
15
+
16
+ input {
17
+ text-align: center;
18
+ }
19
+ }
15
20
 
16
- input {
17
- text-align: center;
21
+ span {
22
+ display: block;
23
+ white-space: nowrap;
24
+ font: var(--body-small);
18
25
  }
19
26
  }
20
27
 
@@ -14,34 +14,29 @@ export type PasswordProps = FieldControlProps & Pick<InputProps, 'containerRef'
14
14
  *
15
15
  * @example
16
16
  * import { Password } from '@bspk/ui/Password';
17
- * import { useState } from 'react';
17
+ * import { Field, FieldLabel, FieldDescription } from '-/components/Field';
18
18
  *
19
19
  * () => {
20
- * const [value, setValue] = useState('');
20
+ * const [value, setValue] = useState<string | undefined>('');
21
21
  *
22
22
  * return (
23
- * <>
24
- * // standalone password example
25
- * <Password
26
- * aria-label="Enter password"
27
- * value={value}
28
- * onChange={setValue}
29
- * aria-label="password"
30
- * name="password"
31
- * />
32
- * <br />
33
- * // password used within a field
23
+ * <div style={{ width: 320 }}>
34
24
  * <Field>
35
25
  * <FieldLabel>Password</FieldLabel>
36
- * <Password value={value} onChange={setValue} aria-label="password" name="password" />
26
+ * <Password
27
+ * aria-label="password"
28
+ * name="password"
29
+ * onChange={(next) => setValue(next)}
30
+ * value={value}
31
+ * />
37
32
  * <FieldDescription>The password field allows you to enter a secure password.</FieldDescription>
38
33
  * </Field>
39
- * </>
34
+ * </div>
40
35
  * );
41
36
  * };
42
37
  *
43
38
  * @name Password
44
- * @phase UXReview
39
+ * @phase Stable
45
40
  */
46
41
  export function Password({
47
42
  inputProps,
@@ -1,8 +1,25 @@
1
- import { PasswordProps } from '.';
1
+ import { useState } from 'react';
2
+ import { Password, PasswordProps } from '.';
3
+ import { Field, FieldLabel, FieldDescription } from '-/components/Field';
2
4
  import { ComponentExample } from '-/utils/demo';
3
5
 
4
6
  export const PasswordExample: ComponentExample<PasswordProps> = {
5
7
  defaultState: {
6
8
  'aria-label': 'password aria-label',
7
9
  },
10
+ containerStyle: { width: 320, padding: 0 },
11
+ };
12
+
13
+ export const Usage = () => {
14
+ const [value, setValue] = useState<string | undefined>('');
15
+
16
+ return (
17
+ <div>
18
+ <Field>
19
+ <FieldLabel>Password</FieldLabel>
20
+ <Password aria-label="password" name="password" onChange={(next) => setValue(next)} value={value} />
21
+ <FieldDescription>The password field allows you to enter a secure password.</FieldDescription>
22
+ </Field>
23
+ </div>
24
+ );
8
25
  };
@@ -9,7 +9,7 @@ export type PasswordFieldProps = FormFieldControlProps<PasswordProps>;
9
9
  * This component takes properties from the FormField and Password components.
10
10
  *
11
11
  * @name PasswordField
12
- * @phase UXReview
12
+ * @phase Stable
13
13
  *
14
14
  * @generated
15
15
  */
@@ -73,7 +73,7 @@ export type PopoverProps = CommonProps<'disabled'> &
73
73
  * </Popover>;
74
74
  *
75
75
  * @name Popover
76
- * @phase UXReview
76
+ * @phase Stable
77
77
  */
78
78
  export function Popover({
79
79
  placement = 'top',
@@ -4,7 +4,6 @@ import { Txt } from '-/components/Txt';
4
4
  import { ComponentExampleFn } from '-/utils/demo';
5
5
 
6
6
  export const PopoverExample: ComponentExampleFn<PopoverProps> = ({ action }) => ({
7
- containerStyle: { width: '100%' },
8
7
  render: ({ props, Component }) => {
9
8
  return (
10
9
  <>
@@ -56,7 +56,7 @@ export type ProgressBarProps = {
56
56
  * <ProgressBar label="Example label" completion={50} />;
57
57
  *
58
58
  * @name ProgressBar
59
- * @phase UXReview
59
+ * @phase Stable
60
60
  */
61
61
  export function ProgressBar({
62
62
  size = 'large',
@@ -30,7 +30,7 @@ export type ProgressCircleProps = {
30
30
  * <ProgressCircle label="Example label" />;
31
31
  *
32
32
  * @name ProgressCircle
33
- * @phase UXReview
33
+ * @phase Stable
34
34
  */
35
35
  function ProgressCircle({ label, labelPosition, size = 'medium' }: ProgressCircleProps) {
36
36
  let variant: TxtVariant = 'labels-base';
@@ -62,7 +62,7 @@ export type ProgressionStepperProps = {
62
62
  * <ProgressionStepper steps={[{ name: 'Step 1' }, { name: 'Step 2' }, { name: 'Step 3' }]} />;
63
63
  *
64
64
  * @name ProgressionStepper
65
- * @phase UXReview
65
+ * @phase Stable
66
66
  */
67
67
  export function ProgressionStepper({
68
68
  steps = [],
@@ -66,6 +66,5 @@ export const presets: Preset<ProgressionStepperProps>[] = [
66
66
  ];
67
67
 
68
68
  export const ProgressionStepperExample: ComponentExample<ProgressionStepperProps> = {
69
- containerStyle: { width: '100%' },
70
69
  presets,
71
70
  };
@@ -35,7 +35,7 @@ export type ProgressionStepperBarProps = {
35
35
  * Component description coming soon.
36
36
  *
37
37
  * @name ProgressionStepperBar
38
- * @phase UXReview
38
+ * @phase Stable
39
39
  */
40
40
  export function ProgressionStepperBar({
41
41
  stepCount,
@@ -62,7 +62,7 @@ export type RadioGroupProps = Omit<FieldControlProps, 'readOnly'> & {
62
62
  * };
63
63
  *
64
64
  * @name RadioGroup
65
- * @phase UXReview
65
+ * @phase Stable
66
66
  */
67
67
  export function RadioGroup({
68
68
  onChange,
@@ -10,7 +10,7 @@ export type RadioGroupFieldProps = FormFieldControlProps<RadioGroupProps>;
10
10
  * This component takes properties from the FormField and RadioGroup components.
11
11
  *
12
12
  * @name RadioGroupField
13
- * @phase UXReview
13
+ * @phase Stable
14
14
  *
15
15
  * @generated
16
16
  */
@@ -1,11 +1,13 @@
1
1
  import './rating.scss';
2
2
  import { SvgStarFill } from '@bspk/icons/StarFill';
3
+ import { useControlledState } from '-/hooks/useControlledState';
3
4
 
4
5
  export type RatingSize = 'large' | 'medium' | 'small';
5
6
  export type RatingProps = {
6
7
  /**
7
8
  * The value of the rating between 0 and 5.
8
9
  *
10
+ * @default 0
9
11
  * @minimum 0
10
12
  * @maximum 5
11
13
  */
@@ -41,10 +43,12 @@ const iconWidths: Record<RatingSize, number> = {
41
43
  * <Rating value={4.5} size="large" />;
42
44
  *
43
45
  * @name Rating
44
- * @phase UXReview
46
+ * @phase Stable
45
47
  */
46
- export function Rating({ size = 'medium', value, onChange }: RatingProps) {
47
- if (!onChange)
48
+ export function Rating({ size = 'medium', value: valueProp, onChange: onChangeProp }: RatingProps) {
49
+ const [value, onChange] = useControlledState(valueProp, onChangeProp);
50
+
51
+ if (!onChangeProp)
48
52
  return (
49
53
  <div
50
54
  aria-label={value ? `${value} out of ${MAX_STARS} stars` : 'Rating'}
@@ -9,11 +9,11 @@ import { useArrowNavigation } from '-/hooks/useArrowNavigation';
9
9
  import { useFloating } from '-/hooks/useFloating';
10
10
  import { useId } from '-/hooks/useId';
11
11
  import { useOutsideClick } from '-/hooks/useOutsideClick';
12
- import { useUIContext } from '-/hooks/useUIContext';
13
12
  import { FieldControlProps } from '-/types/common';
14
13
  import { getElementById } from '-/utils/dom';
15
14
  import { handleKeyDown } from '-/utils/handleKeyDown';
16
15
  import { scrollListItemsStyle, ScrollListItemsStyleProps } from '-/utils/scrollListItemsStyle';
16
+ import { sendAriaLiveMessage } from '-/utils/sendAriaLiveMessage';
17
17
  import { useIds } from '-/utils/useIds';
18
18
 
19
19
  /**
@@ -99,7 +99,7 @@ export type SearchBarProps<O extends SearchBarOption = SearchBarOption> = Omit<
99
99
  * };
100
100
  *
101
101
  * @name SearchBar
102
- * @phase UXReview
102
+ * @phase Stable
103
103
  */
104
104
  export function SearchBar<O extends SearchBarOption>({
105
105
  items: itemsProp,
@@ -129,11 +129,9 @@ export function SearchBar<O extends SearchBarOption>({
129
129
  return items.filter((item) => !valueStr || item.label.toLowerCase().includes(valueStr));
130
130
  }, [items, value]);
131
131
 
132
- const { sendAriaLiveMessage } = useUIContext();
133
-
134
132
  useEffect(() => {
135
133
  if (!items.length) sendAriaLiveMessage('No results found', 'assertive');
136
- }, [items.length, sendAriaLiveMessage, value]);
134
+ }, [items.length, value]);
137
135
 
138
136
  const { activeElementId, setActiveElementId, arrowKeyCallbacks } = useArrowNavigation({
139
137
  ids: filteredItems.map((i) => i.id),
@@ -29,7 +29,7 @@ export type SegmentedControlProps = TabListProps<SegmentedControlOption>;
29
29
  * };
30
30
  *
31
31
  * @name SegmentedControl
32
- * @phase UXReview
32
+ * @phase Stable
33
33
  */
34
34
  export function SegmentedControl({
35
35
  onChange,
@@ -70,39 +70,26 @@ export type SelectProps = CommonProps<'size'> &
70
70
  *
71
71
  * () => {
72
72
  * const OPTIONS = [
73
- * { id: '1', label: 'Option 1' },
74
- * { id: '2', label: 'Option 2' },
75
- * { id: '3', label: 'Option 3' },
76
- * { id: '4', label: 'Option 4' },
77
- * { id: '5', label: 'Option 5' },
78
- * { id: '6', label: 'Option 6' },
73
+ * { id: '1', label: 'Option 1', value: '1' },
74
+ * { id: '2', label: 'Option 2', value: '2' },
75
+ * { id: '3', label: 'Option 3', value: '3' },
76
+ * { id: '4', label: 'Option 4', value: '4' },
77
+ * { id: '5', label: 'Option 5', value: '5' },
78
+ * { id: '6', label: 'Option 6', value: '6' },
79
79
  * ];
80
80
  *
81
- * const [selected, setSelected] = useState<string[]>([]);
81
+ * const [selected, setSelected] = useState<string | undefined>(undefined);
82
82
  *
83
83
  * return (
84
- * <>
85
- * // standalone select example
86
- * <Select
87
- * aria-label="Select an option"
88
- * scrollLimit={5}
89
- * name="example-select"
90
- * onChange={setSelected}
91
- * options={OPTIONS}
92
- * placeholder="Select an option"
93
- * size="medium"
94
- * value={selected}
95
- * />
96
- * <br />
97
- * // select used within a field
84
+ * <div style={{ width: 320 }}>
98
85
  * <Field>
99
86
  * <FieldLabel>Select an option</FieldLabel>
100
87
  * <Select
101
- * scrollLimit={5}
102
88
  * name="example-select"
103
89
  * onChange={setSelected}
104
90
  * options={OPTIONS}
105
91
  * placeholder="Select an option"
92
+ * scrollLimit={5}
106
93
  * size="medium"
107
94
  * value={selected}
108
95
  * />
@@ -110,12 +97,12 @@ export type SelectProps = CommonProps<'size'> &
110
97
  * The select allows you to choose one option from a list of options.
111
98
  * </FieldDescription>
112
99
  * </Field>
113
- * </>
100
+ * </div>
114
101
  * );
115
102
  * };
116
103
  *
117
104
  * @name Select
118
- * @phase UXReview
105
+ * @phase Stable
119
106
  */
120
107
  export function Select({
121
108
  options: optionsProp = [],
@@ -1,5 +1,8 @@
1
- import { SelectProps } from '.';
1
+ /* eslint-disable react/no-multi-comp */
2
+ import { useState } from 'react';
3
+ import { Select, SelectProps } from '.';
2
4
  import { Avatar } from '-/components/Avatar';
5
+ import { Field, FieldDescription, FieldLabel } from '-/components/Field';
3
6
  import { Tag } from '-/components/Tag';
4
7
  import { Txt } from '-/components/Txt';
5
8
  import { ComponentExample, Preset } from '-/utils/demo';
@@ -160,4 +163,36 @@ export const SelectExample: ComponentExample<SelectProps> = {
160
163
  },
161
164
  render: ({ props, Component, preset }) => <Component key={preset?.label} {...props} />,
162
165
  presets,
166
+ containerStyle: { width: 320, padding: 0 },
167
+ };
168
+
169
+ export const Usage = () => {
170
+ const OPTIONS = [
171
+ { id: '1', label: 'Option 1', value: '1' },
172
+ { id: '2', label: 'Option 2', value: '2' },
173
+ { id: '3', label: 'Option 3', value: '3' },
174
+ { id: '4', label: 'Option 4', value: '4' },
175
+ { id: '5', label: 'Option 5', value: '5' },
176
+ { id: '6', label: 'Option 6', value: '6' },
177
+ ];
178
+
179
+ const [selected, setSelected] = useState<string | undefined>(undefined);
180
+
181
+ return (
182
+ <div style={{ width: 320 }}>
183
+ <Field>
184
+ <FieldLabel>Select an option</FieldLabel>
185
+ <Select
186
+ name="example-select"
187
+ onChange={setSelected}
188
+ options={OPTIONS}
189
+ placeholder="Select an option"
190
+ scrollLimit={5}
191
+ size="medium"
192
+ value={selected}
193
+ />
194
+ <FieldDescription>The select allows you to choose one option from a list of options.</FieldDescription>
195
+ </Field>
196
+ </div>
197
+ );
163
198
  };
@@ -9,7 +9,7 @@ export type SelectFieldProps = FormFieldControlProps<SelectProps>;
9
9
  * This component takes properties from the FormField and Select components.
10
10
  *
11
11
  * @name SelectField
12
- * @phase UXReview
12
+ * @phase Stable
13
13
  *
14
14
  * @generated
15
15
  */
@@ -63,7 +63,7 @@ export type SkeletonProps = {
63
63
  * @exampleDescription This example shows a skeleton loading state for an image but can be used for any element.
64
64
  *
65
65
  * @name Skeleton
66
- * @phase UXReview
66
+ * @phase Stable
67
67
  */
68
68
  export function Skeleton({ width = 100, height = 100, variant = 'rectangular', children = null }: SkeletonProps) {
69
69
  return children !== null && children !== undefined && children !== false ? (
@@ -42,7 +42,7 @@ export type SkeletonTextProps = {
42
42
  * @exampleDescription This example shows a skeleton loading state for some text but can be used for any element.
43
43
  *
44
44
  * @name SkeletonText
45
- * @phase UXReview
45
+ * @phase Stable
46
46
  */
47
47
  export function SkeletonText({ lines = 3, variant = 'body-base', children = null }: SkeletonTextProps) {
48
48
  return children !== null && children !== undefined && children !== false ? (