@bspk/ui 1.3.3 → 1.3.4

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 (737) hide show
  1. package/build.ts +41 -10
  2. package/dist/components/AvatarGroup/AvatarGroup.d.ts +1 -1
  3. package/dist/components/AvatarGroup/AvatarGroup.js +1 -1
  4. package/dist/components/Breadcrumb/Breadcrumb.d.ts +4 -23
  5. package/dist/components/Breadcrumb/Breadcrumb.js +3 -7
  6. package/dist/components/Breadcrumb/Breadcrumb.js.map +1 -1
  7. package/dist/components/Breadcrumb/BreadcumbDropdown.d.ts +27 -0
  8. package/dist/components/Breadcrumb/BreadcumbDropdown.js +68 -0
  9. package/dist/components/Breadcrumb/BreadcumbDropdown.js.map +1 -0
  10. package/dist/components/Button/Button.d.ts +5 -1
  11. package/dist/components/Button/Button.js +2 -2
  12. package/dist/components/Button/Button.js.map +1 -1
  13. package/dist/components/Button/button.css +5 -5
  14. package/dist/components/Button/button.css.js +5 -5
  15. package/dist/components/Calendar/Calendar.d.ts +33 -0
  16. package/dist/components/{CalendarPicker/CalendarPicker.js → Calendar/Calendar.js} +30 -34
  17. package/dist/components/Calendar/Calendar.js.map +1 -0
  18. package/dist/components/Calendar/CalendarExample.d.ts +4 -0
  19. package/dist/components/Calendar/CalendarExample.js +29 -0
  20. package/dist/components/Calendar/CalendarExample.js.map +1 -0
  21. package/dist/components/{CalendarPicker/calendar-picker.css → Calendar/calendar.css} +16 -16
  22. package/dist/components/{CalendarPicker/calendar-picker.css.js → Calendar/calendar.css.js} +16 -16
  23. package/dist/components/Calendar/index.d.ts +1 -0
  24. package/dist/components/Calendar/index.js +2 -0
  25. package/dist/components/Calendar/index.js.map +1 -0
  26. package/dist/components/Checkbox/Checkbox.d.ts +5 -3
  27. package/dist/components/Checkbox/Checkbox.js +2 -2
  28. package/dist/components/Checkbox/Checkbox.js.map +1 -1
  29. package/dist/components/CheckboxGroup/CheckboxGroup.d.ts +6 -25
  30. package/dist/components/CheckboxGroup/CheckboxGroup.js +15 -5
  31. package/dist/components/CheckboxGroup/CheckboxGroup.js.map +1 -1
  32. package/dist/components/CheckboxGroup/CheckboxGroupExample.js +3 -0
  33. package/dist/components/CheckboxGroup/CheckboxGroupExample.js.map +1 -1
  34. package/dist/components/CheckboxGroup/checkbox-group.css +7 -0
  35. package/dist/components/{DateField/date-field.css.js → CheckboxGroup/checkbox-group.css.js} +4 -5
  36. package/dist/components/CheckboxGroupField/CheckboxGroupField.d.ts +15 -0
  37. package/dist/components/CheckboxGroupField/CheckboxGroupField.js +17 -0
  38. package/dist/components/CheckboxGroupField/CheckboxGroupField.js.map +1 -0
  39. package/dist/components/CheckboxGroupField/index.d.ts +1 -0
  40. package/dist/components/CheckboxGroupField/index.js +2 -0
  41. package/dist/components/CheckboxGroupField/index.js.map +1 -0
  42. package/dist/components/{ChipUtility/ChipUtility.d.ts → Chip/Chip.d.ts} +6 -6
  43. package/dist/components/Chip/Chip.js +25 -0
  44. package/dist/components/Chip/Chip.js.map +1 -0
  45. package/dist/components/Chip/ChipExample.d.ts +4 -0
  46. package/dist/components/{ChipUtility/ChipUtilityExample.js → Chip/ChipExample.js} +2 -2
  47. package/dist/components/Chip/ChipExample.js.map +1 -0
  48. package/dist/components/{ChipUtility/chip-utility.css → Chip/chip.css} +10 -10
  49. package/dist/components/{ChipUtility/chip-utility.css.js → Chip/chip.css.js} +10 -10
  50. package/dist/components/Chip/index.d.ts +1 -0
  51. package/dist/components/Chip/index.js +2 -0
  52. package/dist/components/Chip/index.js.map +1 -0
  53. package/dist/components/ChipGroup/ChipGroup.d.ts +8 -7
  54. package/dist/components/ChipGroup/ChipGroup.js +5 -4
  55. package/dist/components/ChipGroup/ChipGroup.js.map +1 -1
  56. package/dist/components/ChipGroup/ChipGroupExample.js +4 -31
  57. package/dist/components/ChipGroup/ChipGroupExample.js.map +1 -1
  58. package/dist/components/DatePicker/DatePicker.d.ts +50 -0
  59. package/dist/components/DatePicker/DatePicker.js +133 -0
  60. package/dist/components/DatePicker/DatePicker.js.map +1 -0
  61. package/dist/components/DatePicker/DatePickerExample.d.ts +3 -0
  62. package/dist/components/DatePicker/DatePickerExample.js +10 -0
  63. package/dist/components/DatePicker/DatePickerExample.js.map +1 -0
  64. package/dist/components/{DateInput/date-input.css → DatePicker/date-picker.css} +2 -3
  65. package/dist/components/{DateInput/date-input.css.js → DatePicker/date-picker.css.js} +2 -3
  66. package/dist/components/DatePicker/index.d.ts +1 -0
  67. package/dist/components/DatePicker/index.js +2 -0
  68. package/dist/components/DatePicker/index.js.map +1 -0
  69. package/dist/components/DatePickerField/DatePickerField.d.ts +15 -0
  70. package/dist/components/DatePickerField/DatePickerField.js +17 -0
  71. package/dist/components/DatePickerField/DatePickerField.js.map +1 -0
  72. package/dist/components/DatePickerField/index.d.ts +1 -0
  73. package/dist/components/DatePickerField/index.js +2 -0
  74. package/dist/components/DatePickerField/index.js.map +1 -0
  75. package/dist/components/Drawer/Drawer.d.ts +1 -1
  76. package/dist/components/Drawer/Drawer.js +1 -1
  77. package/dist/components/Drawer/DrawerExample.js +3 -3
  78. package/dist/components/Drawer/DrawerExample.js.map +1 -1
  79. package/dist/components/EmptyState/EmptyState.d.ts +1 -1
  80. package/dist/components/EmptyState/EmptyState.js +1 -1
  81. package/dist/components/Fab/Fab.d.ts +1 -1
  82. package/dist/components/Fab/Fab.js +1 -1
  83. package/dist/components/Field/Field.d.ts +58 -0
  84. package/dist/components/Field/Field.js +70 -0
  85. package/dist/components/Field/Field.js.map +1 -0
  86. package/dist/components/Field/FieldDescription.d.ts +7 -0
  87. package/dist/components/Field/FieldDescription.js +9 -0
  88. package/dist/components/Field/FieldDescription.js.map +1 -0
  89. package/dist/components/Field/FieldError.d.ts +5 -0
  90. package/dist/components/Field/FieldError.js +8 -0
  91. package/dist/components/Field/FieldError.js.map +1 -0
  92. package/dist/components/Field/FieldExample.d.ts +5 -0
  93. package/dist/components/Field/FieldExample.js +10 -0
  94. package/dist/components/Field/FieldExample.js.map +1 -0
  95. package/dist/components/Field/FieldLabel.d.ts +15 -0
  96. package/dist/components/Field/FieldLabel.js +8 -0
  97. package/dist/components/Field/FieldLabel.js.map +1 -0
  98. package/dist/components/Field/field.css +36 -0
  99. package/dist/components/Field/field.css.js +41 -0
  100. package/dist/components/Field/index.d.ts +5 -0
  101. package/dist/components/Field/index.js +6 -0
  102. package/dist/components/Field/index.js.map +1 -0
  103. package/dist/components/Field/utils.d.ts +39 -0
  104. package/dist/components/Field/utils.js +35 -0
  105. package/dist/components/Field/utils.js.map +1 -0
  106. package/dist/components/FormField/FormField.d.ts +32 -17
  107. package/dist/components/FormField/FormField.js +10 -18
  108. package/dist/components/FormField/FormField.js.map +1 -1
  109. package/dist/components/FormField/FormFieldExample.d.ts +10 -4
  110. package/dist/components/FormField/FormFieldExample.js +97 -9
  111. package/dist/components/FormField/FormFieldExample.js.map +1 -1
  112. package/dist/components/Img/Img.d.ts +1 -1
  113. package/dist/components/Img/Img.js +1 -1
  114. package/dist/components/InlineAlert/InlineAlert.d.ts +4 -4
  115. package/dist/components/InlineAlert/InlineAlert.js +3 -3
  116. package/dist/components/InlineAlert/InlineAlert.js.map +1 -1
  117. package/dist/components/Input/Input.d.ts +37 -0
  118. package/dist/components/Input/Input.js +48 -0
  119. package/dist/components/Input/Input.js.map +1 -0
  120. package/dist/components/Input/InputElement.d.ts +77 -0
  121. package/dist/components/{TextInput/TextInput.js → Input/InputElement.js} +17 -16
  122. package/dist/components/Input/InputElement.js.map +1 -0
  123. package/dist/components/Input/InputExample.d.ts +8 -0
  124. package/dist/components/{TextInput/TextInputExample.js → Input/InputExample.js} +20 -9
  125. package/dist/components/Input/InputExample.js.map +1 -0
  126. package/dist/components/Input/index.d.ts +2 -0
  127. package/dist/components/Input/index.js +3 -0
  128. package/dist/components/Input/index.js.map +1 -0
  129. package/dist/components/{TextInput/text-input.css → Input/input.css} +23 -23
  130. package/dist/components/{TextInput/text-input.css.js → Input/input.css.js} +23 -23
  131. package/dist/components/InputField/InputField.d.ts +15 -0
  132. package/dist/components/InputField/InputField.js +17 -0
  133. package/dist/components/InputField/InputField.js.map +1 -0
  134. package/dist/components/InputField/index.d.ts +1 -0
  135. package/dist/components/InputField/index.js +2 -0
  136. package/dist/components/InputField/index.js.map +1 -0
  137. package/dist/components/{NumberInput → InputNumber}/IncrementButton.js.map +1 -1
  138. package/dist/components/InputNumber/InputNumber.d.ts +74 -0
  139. package/dist/components/{NumberInput/NumberInput.js → InputNumber/InputNumber.js} +40 -13
  140. package/dist/components/InputNumber/InputNumber.js.map +1 -0
  141. package/dist/components/InputNumber/InputNumberExample.d.ts +3 -0
  142. package/dist/components/{NumberInput/NumberInputExample.js → InputNumber/InputNumberExample.js} +2 -2
  143. package/dist/components/InputNumber/InputNumberExample.js.map +1 -0
  144. package/dist/components/InputNumber/index.d.ts +1 -0
  145. package/dist/components/InputNumber/index.js +2 -0
  146. package/dist/components/InputNumber/index.js.map +1 -0
  147. package/dist/components/{NumberInput/number-input.css → InputNumber/input-number.css} +21 -21
  148. package/dist/components/{NumberInput/number-input.css.js → InputNumber/input-number.css.js} +21 -21
  149. package/dist/components/InputNumberField/InputNumberField.d.ts +15 -0
  150. package/dist/components/InputNumberField/InputNumberField.js +17 -0
  151. package/dist/components/InputNumberField/InputNumberField.js.map +1 -0
  152. package/dist/components/InputNumberField/index.d.ts +1 -0
  153. package/dist/components/InputNumberField/index.js +2 -0
  154. package/dist/components/InputNumberField/index.js.map +1 -0
  155. package/dist/components/InputPhone/InputPhone.d.ts +57 -0
  156. package/dist/components/InputPhone/InputPhone.js +161 -0
  157. package/dist/components/InputPhone/InputPhone.js.map +1 -0
  158. package/dist/components/InputPhone/InputPhoneExample.d.ts +4 -0
  159. package/dist/components/InputPhone/InputPhoneExample.js +7 -0
  160. package/dist/components/InputPhone/InputPhoneExample.js.map +1 -0
  161. package/dist/components/InputPhone/index.d.ts +1 -0
  162. package/dist/components/InputPhone/index.js +2 -0
  163. package/dist/components/InputPhone/index.js.map +1 -0
  164. package/dist/components/InputPhone/input-phone.css +42 -0
  165. package/dist/components/InputPhone/input-phone.css.js +47 -0
  166. package/dist/components/InputPhoneField/InputPhoneField.d.ts +15 -0
  167. package/dist/components/InputPhoneField/InputPhoneField.js +17 -0
  168. package/dist/components/InputPhoneField/InputPhoneField.js.map +1 -0
  169. package/dist/components/InputPhoneField/index.d.ts +1 -0
  170. package/dist/components/InputPhoneField/index.js +2 -0
  171. package/dist/components/InputPhoneField/index.js.map +1 -0
  172. package/dist/components/Layout/Layout.d.ts +1 -1
  173. package/dist/components/Layout/Layout.js +1 -1
  174. package/dist/components/Link/Link.d.ts +1 -1
  175. package/dist/components/Link/Link.js +1 -1
  176. package/dist/components/ListItem/ListItem.d.ts +19 -10
  177. package/dist/components/ListItem/ListItem.js +3 -3
  178. package/dist/components/ListItem/ListItem.js.map +1 -1
  179. package/dist/components/ListItem/ListItemExample.js +3 -3
  180. package/dist/components/ListItem/ListItemExample.js.map +1 -1
  181. package/dist/components/ListItem/list-item.css +5 -1
  182. package/dist/components/ListItem/list-item.css.js +5 -1
  183. package/dist/components/Menu/Menu.d.ts +1 -1
  184. package/dist/components/Menu/Menu.js +1 -1
  185. package/dist/components/Menu/MenuExample.js +1 -1
  186. package/dist/components/Menu/MenuExample.js.map +1 -1
  187. package/dist/components/MenuButton/MenuButton.d.ts +1 -1
  188. package/dist/components/MenuButton/MenuButton.js +1 -1
  189. package/dist/components/Modal/Modal.d.ts +1 -1
  190. package/dist/components/Modal/Modal.js +1 -1
  191. package/dist/components/Modal/ModalExample.js +1 -1
  192. package/dist/components/Modal/ModalExample.js.map +1 -1
  193. package/dist/components/Pagination/PageInput.js +2 -2
  194. package/dist/components/Pagination/PageInput.js.map +1 -1
  195. package/dist/components/Password/Password.d.ts +43 -0
  196. package/dist/components/Password/Password.js +63 -0
  197. package/dist/components/Password/Password.js.map +1 -0
  198. package/dist/components/Password/index.d.ts +1 -0
  199. package/dist/components/Password/index.js +2 -0
  200. package/dist/components/Password/index.js.map +1 -0
  201. package/dist/components/Password/password.css +21 -0
  202. package/dist/components/Password/password.css.js +26 -0
  203. package/dist/components/PasswordField/PasswordField.d.ts +8 -24
  204. package/dist/components/PasswordField/PasswordField.js +7 -23
  205. package/dist/components/PasswordField/PasswordField.js.map +1 -1
  206. package/dist/components/Popover/Popover.d.ts +3 -3
  207. package/dist/components/Popover/Popover.js +1 -1
  208. package/dist/components/Popover/PopoverExample.js +2 -2
  209. package/dist/components/Popover/PopoverExample.js.map +1 -1
  210. package/dist/components/ProgressBar/ProgressBar.d.ts +1 -1
  211. package/dist/components/ProgressBar/ProgressBar.js +1 -1
  212. package/dist/components/ProgressCircle/ProgressCircle.d.ts +1 -1
  213. package/dist/components/ProgressCircle/ProgressCircle.js +1 -1
  214. package/dist/components/ProgressionStepper/ProgressionStepper.d.ts +1 -1
  215. package/dist/components/ProgressionStepper/ProgressionStepper.js +3 -2
  216. package/dist/components/ProgressionStepper/ProgressionStepper.js.map +1 -1
  217. package/dist/components/ProgressionStepper/ProgressionStepperExample.js +2 -2
  218. package/dist/components/ProgressionStepper/ProgressionStepperExample.js.map +1 -1
  219. package/dist/components/Radio/Radio.d.ts +2 -2
  220. package/dist/components/Radio/Radio.js.map +1 -1
  221. package/dist/components/RadioGroup/RadioGroup.d.ts +7 -36
  222. package/dist/components/RadioGroup/RadioGroup.js +15 -9
  223. package/dist/components/RadioGroup/RadioGroup.js.map +1 -1
  224. package/dist/components/RadioGroup/radio-group.css +2 -1
  225. package/dist/components/RadioGroup/radio-group.css.js +2 -1
  226. package/dist/components/RadioGroupField/RadioGroupField.d.ts +15 -0
  227. package/dist/components/RadioGroupField/RadioGroupField.js +17 -0
  228. package/dist/components/RadioGroupField/RadioGroupField.js.map +1 -0
  229. package/dist/components/RadioGroupField/index.d.ts +1 -0
  230. package/dist/components/RadioGroupField/index.js +2 -0
  231. package/dist/components/RadioGroupField/index.js.map +1 -0
  232. package/dist/components/SearchBar/SearchBar.d.ts +7 -16
  233. package/dist/components/SearchBar/SearchBar.js +6 -6
  234. package/dist/components/SearchBar/SearchBar.js.map +1 -1
  235. package/dist/components/SegmentedControl/SegmentedControl.d.ts +1 -1
  236. package/dist/components/SegmentedControl/SegmentedControl.js +1 -1
  237. package/dist/components/Select/Select.d.ts +39 -34
  238. package/dist/components/Select/Select.js +49 -21
  239. package/dist/components/Select/Select.js.map +1 -1
  240. package/dist/components/Select/SelectExample.js +1 -9
  241. package/dist/components/Select/SelectExample.js.map +1 -1
  242. package/dist/components/SelectField/SelectField.d.ts +6 -26
  243. package/dist/components/SelectField/SelectField.js +5 -27
  244. package/dist/components/SelectField/SelectField.js.map +1 -1
  245. package/dist/components/Skeleton/SkeletonExample.js +2 -2
  246. package/dist/components/Skeleton/SkeletonExample.js.map +1 -1
  247. package/dist/components/Snackbar/Snackbar.d.ts +72 -14
  248. package/dist/components/Snackbar/Snackbar.js +38 -9
  249. package/dist/components/Snackbar/Snackbar.js.map +1 -1
  250. package/dist/components/Snackbar/SnackbarExample.d.ts +1 -1
  251. package/dist/components/Snackbar/SnackbarExample.js +5 -3
  252. package/dist/components/Snackbar/SnackbarExample.js.map +1 -1
  253. package/dist/components/Snackbar/snackbar.css +31 -2
  254. package/dist/components/Snackbar/snackbar.css.js +31 -2
  255. package/dist/components/StylesProviderDemo/StylesProviderDemo.d.ts +1 -1
  256. package/dist/components/StylesProviderDemo/StylesProviderDemo.js +3 -1
  257. package/dist/components/StylesProviderDemo/StylesProviderDemo.js.map +1 -1
  258. package/dist/components/StylesProviderDemo/exampleCss.d.ts +1 -0
  259. package/dist/components/StylesProviderDemo/exampleCss.js +1900 -0
  260. package/dist/components/StylesProviderDemo/exampleCss.js.map +1 -0
  261. package/dist/components/Switch/Switch.d.ts +5 -3
  262. package/dist/components/Switch/Switch.js +2 -2
  263. package/dist/components/Switch/Switch.js.map +1 -1
  264. package/dist/components/SwitchOption/SwitchOption.js +1 -1
  265. package/dist/components/SwitchOption/SwitchOption.js.map +1 -1
  266. package/dist/components/TabGroup/TabGroup.d.ts +2 -2
  267. package/dist/components/TabGroup/TabGroup.js +3 -3
  268. package/dist/components/TabGroup/TabGroup.js.map +1 -1
  269. package/dist/components/TabList/TabList.d.ts +6 -3
  270. package/dist/components/TabList/TabList.js +6 -4
  271. package/dist/components/TabList/TabList.js.map +1 -1
  272. package/dist/components/Tag/Tag.d.ts +1 -1
  273. package/dist/components/Tag/Tag.js +1 -1
  274. package/dist/components/Textarea/Textarea.d.ts +20 -26
  275. package/dist/components/Textarea/Textarea.js +29 -11
  276. package/dist/components/Textarea/Textarea.js.map +1 -1
  277. package/dist/components/Textarea/textarea.css +24 -10
  278. package/dist/components/Textarea/textarea.css.js +24 -10
  279. package/dist/components/TextareaField/TextareaField.d.ts +6 -30
  280. package/dist/components/TextareaField/TextareaField.js +5 -31
  281. package/dist/components/TextareaField/TextareaField.js.map +1 -1
  282. package/dist/components/TimePicker/Listbox.d.ts +15 -0
  283. package/dist/components/{TimeInput → TimePicker}/Listbox.js +2 -2
  284. package/dist/components/TimePicker/Listbox.js.map +1 -0
  285. package/dist/components/TimePicker/Segment.d.ts +21 -0
  286. package/dist/components/{TimeInput → TimePicker}/Segment.js +2 -1
  287. package/dist/components/TimePicker/Segment.js.map +1 -0
  288. package/dist/components/TimePicker/TimePicker.d.ts +36 -0
  289. package/dist/components/TimePicker/TimePicker.js +133 -0
  290. package/dist/components/TimePicker/TimePicker.js.map +1 -0
  291. package/dist/components/TimePicker/TimePickerExample.d.ts +3 -0
  292. package/dist/components/TimePicker/TimePickerExample.js +6 -0
  293. package/dist/components/TimePicker/TimePickerExample.js.map +1 -0
  294. package/dist/components/TimePicker/index.d.ts +1 -0
  295. package/dist/components/TimePicker/index.js +2 -0
  296. package/dist/components/TimePicker/index.js.map +1 -0
  297. package/dist/components/{TimeInput/time-input.css → TimePicker/time-picker.css} +28 -26
  298. package/dist/components/{TimeInput/time-input.css.js → TimePicker/time-picker.css.js} +28 -26
  299. package/dist/components/TimePicker/utils.d.ts +11 -0
  300. package/dist/components/TimePicker/utils.js +35 -0
  301. package/dist/components/TimePicker/utils.js.map +1 -0
  302. package/dist/components/TimePickerField/TimePickerField.d.ts +15 -0
  303. package/dist/components/TimePickerField/TimePickerField.js +17 -0
  304. package/dist/components/TimePickerField/TimePickerField.js.map +1 -0
  305. package/dist/components/TimePickerField/index.d.ts +1 -0
  306. package/dist/components/TimePickerField/index.js +2 -0
  307. package/dist/components/TimePickerField/index.js.map +1 -0
  308. package/dist/components/ToggleOption/ToggleOption.js +3 -2
  309. package/dist/components/ToggleOption/ToggleOption.js.map +1 -1
  310. package/dist/components/Tooltip/Tooltip.d.ts +1 -1
  311. package/dist/components/Tooltip/Tooltip.js +1 -1
  312. package/dist/components/Tooltip/TooltipExample.js +2 -2
  313. package/dist/components/Tooltip/TooltipExample.js.map +1 -1
  314. package/dist/components/Txt/Txt.d.ts +1 -1
  315. package/dist/components/Txt/Txt.js +1 -1
  316. package/dist/constants/brands.d.ts +1 -1
  317. package/dist/constants/brands.js +4 -0
  318. package/dist/constants/brands.js.map +1 -1
  319. package/dist/hooks/useCheckboxGroupState.d.ts +1 -1
  320. package/dist/hooks/useCheckboxGroupState.js +1 -1
  321. package/dist/hooks/useCheckboxState.d.ts +1 -1
  322. package/dist/hooks/useCheckboxState.js +1 -1
  323. package/dist/hooks/useContainerWidth.d.ts +1 -1
  324. package/dist/hooks/useContainerWidth.js +1 -1
  325. package/dist/hooks/useModalState.d.ts +1 -1
  326. package/dist/hooks/useModalState.js +1 -1
  327. package/dist/hooks/useOutsideClick.d.ts +1 -1
  328. package/dist/hooks/useOutsideClick.js +1 -1
  329. package/dist/hooks/useRadioState.d.ts +2 -2
  330. package/dist/hooks/useRadioState.js +1 -1
  331. package/dist/hooks/useTimeout.d.ts +1 -1
  332. package/dist/styles/base.css +3 -0
  333. package/dist/styles/base.css.js +3 -0
  334. package/dist/types/common.d.ts +18 -10
  335. package/dist/types/common.js.map +1 -1
  336. package/dist/types/meta.d.ts +1 -0
  337. package/dist/types/meta.js.map +1 -1
  338. package/dist/utils/demo.d.ts +1 -0
  339. package/dist/utils/demo.js.map +1 -1
  340. package/meta.ts +1 -0
  341. package/package.json +37 -37
  342. package/src/components/AvatarGroup/AvatarGroup.tsx +1 -1
  343. package/src/components/Breadcrumb/Breadcrumb.tsx +5 -56
  344. package/src/components/Breadcrumb/BreadcumbDropdown.tsx +135 -0
  345. package/src/components/Button/Button.tsx +7 -1
  346. package/src/components/Button/button.scss +5 -5
  347. package/src/components/Calendar/Calendar.rtl.test.tsx +22 -0
  348. package/src/components/{CalendarPicker/CalendarPicker.tsx → Calendar/Calendar.tsx} +86 -87
  349. package/src/components/Calendar/CalendarExample.tsx +31 -0
  350. package/src/components/{CalendarPicker/calendar-picker.scss → Calendar/calendar.scss} +1 -1
  351. package/src/components/Calendar/index.tsx +1 -0
  352. package/src/components/Checkbox/Checkbox.tsx +28 -26
  353. package/src/components/CheckboxGroup/CheckboxGroup.tsx +73 -77
  354. package/src/components/CheckboxGroup/CheckboxGroupExample.tsx +3 -0
  355. package/src/components/CheckboxGroup/checkbox-group.scss +8 -0
  356. package/src/components/CheckboxGroupField/CheckboxGroupField.rtl.test.tsx +27 -0
  357. package/src/components/CheckboxGroupField/CheckboxGroupField.tsx +36 -0
  358. package/src/components/CheckboxGroupField/index.tsx +1 -0
  359. package/src/components/{ChipUtility/ChipUtility.rtl.test.tsx → Chip/Chip.rtl.test.tsx} +5 -5
  360. package/src/components/{ChipUtility/ChipUtility.tsx → Chip/Chip.tsx} +26 -28
  361. package/src/components/{ChipUtility/ChipUtilityExample.tsx → Chip/ChipExample.tsx} +3 -3
  362. package/src/components/{ChipUtility/chip-utility.scss → Chip/chip.scss} +1 -1
  363. package/src/components/Chip/index.tsx +1 -0
  364. package/src/components/ChipGroup/ChipGroup.rtl.test.tsx +7 -7
  365. package/src/components/ChipGroup/ChipGroup.tsx +8 -7
  366. package/src/components/ChipGroup/ChipGroupExample.tsx +38 -138
  367. package/src/components/DatePicker/DatePicker.rtl.test.tsx +17 -0
  368. package/src/components/DatePicker/DatePicker.tsx +227 -0
  369. package/src/components/DatePicker/DatePickerExample.tsx +12 -0
  370. package/src/components/{DateInput/date-input.scss → DatePicker/date-picker.scss} +2 -3
  371. package/src/components/DatePicker/index.tsx +1 -0
  372. package/src/components/DatePickerField/DatePickerField.rtl.test.tsx +17 -0
  373. package/src/components/DatePickerField/DatePickerField.tsx +30 -0
  374. package/src/components/DatePickerField/index.tsx +1 -0
  375. package/src/components/Drawer/Drawer.tsx +1 -1
  376. package/src/components/Drawer/DrawerExample.tsx +2 -2
  377. package/src/components/EmptyState/EmptyState.tsx +1 -1
  378. package/src/components/Fab/Fab.tsx +1 -1
  379. package/src/components/Field/Field.rtl.test.tsx +23 -0
  380. package/src/components/Field/Field.tsx +110 -0
  381. package/src/components/Field/FieldDescription.tsx +15 -0
  382. package/src/components/Field/FieldError.tsx +19 -0
  383. package/src/components/Field/FieldExample.tsx +21 -0
  384. package/src/components/Field/FieldLabel.tsx +38 -0
  385. package/src/components/Field/field.scss +43 -0
  386. package/src/components/Field/index.tsx +5 -0
  387. package/src/components/Field/utils.ts +79 -0
  388. package/src/components/FormField/FormField.rtl.test.tsx +11 -21
  389. package/src/components/FormField/FormField.tsx +44 -66
  390. package/src/components/FormField/FormFieldExample.tsx +275 -38
  391. package/src/components/Img/Img.tsx +1 -1
  392. package/src/components/InlineAlert/InlineAlert.tsx +5 -5
  393. package/src/components/{NumberInput/NumberInput.rtl.test.tsx → Input/Input.rtl.test.tsx} +3 -3
  394. package/src/components/Input/Input.tsx +99 -0
  395. package/src/components/{TextInput/TextInput.tsx → Input/InputElement.tsx} +69 -77
  396. package/src/components/Input/InputExample.tsx +57 -0
  397. package/src/components/Input/index.tsx +2 -0
  398. package/src/components/{TextInput/text-input.scss → Input/input.scss} +7 -7
  399. package/src/components/InputField/InputField.rtl.test.tsx +15 -0
  400. package/src/components/InputField/InputField.tsx +24 -0
  401. package/src/components/InputField/index.tsx +1 -0
  402. package/src/components/{TextField/TextField.rtl.test.tsx → InputNumber/InputNumber.rtl.test.tsx} +3 -12
  403. package/src/components/{NumberInput/NumberInput.tsx → InputNumber/InputNumber.tsx} +48 -30
  404. package/src/components/{NumberInput/NumberInputExample.tsx → InputNumber/InputNumberExample.tsx} +2 -2
  405. package/src/components/InputNumber/index.tsx +1 -0
  406. package/src/components/{NumberInput/number-input.scss → InputNumber/input-number.scss} +1 -1
  407. package/src/components/InputNumberField/InputNumberField.rtl.test.tsx +17 -0
  408. package/src/components/InputNumberField/InputNumberField.tsx +30 -0
  409. package/src/components/InputNumberField/index.tsx +1 -0
  410. package/src/components/InputPhone/InputPhone.rtl.test.tsx +17 -0
  411. package/src/components/InputPhone/InputPhone.tsx +290 -0
  412. package/src/components/InputPhone/InputPhoneExample.tsx +9 -0
  413. package/src/components/InputPhone/index.tsx +1 -0
  414. package/src/components/{PhoneNumberInput/phone-number-input.scss → InputPhone/input-phone.scss} +13 -18
  415. package/src/components/InputPhoneField/InputPhoneField.rtl.test.tsx +17 -0
  416. package/src/components/InputPhoneField/InputPhoneField.tsx +30 -0
  417. package/src/components/InputPhoneField/index.tsx +1 -0
  418. package/src/components/Layout/Layout.tsx +1 -1
  419. package/src/components/Link/Link.tsx +1 -1
  420. package/src/components/ListItem/ListItem.tsx +31 -13
  421. package/src/components/ListItem/ListItemExample.tsx +3 -3
  422. package/src/components/ListItem/list-item.scss +6 -1
  423. package/src/components/Menu/Menu.tsx +1 -1
  424. package/src/components/Menu/MenuExample.tsx +1 -0
  425. package/src/components/MenuButton/MenuButton.tsx +1 -1
  426. package/src/components/Modal/Modal.tsx +1 -1
  427. package/src/components/Modal/ModalExample.tsx +4 -6
  428. package/src/components/Pagination/PageInput.tsx +2 -2
  429. package/src/components/{CalendarPicker/CalendarPicker.rtl.test.tsx → Password/Password.rtl.test.tsx} +4 -4
  430. package/src/components/Password/Password.tsx +113 -0
  431. package/src/components/Password/index.tsx +1 -0
  432. package/src/components/Password/password.scss +31 -0
  433. package/src/components/PasswordField/PasswordField.rtl.test.tsx +4 -11
  434. package/src/components/PasswordField/PasswordField.tsx +10 -53
  435. package/src/components/Popover/Popover.tsx +2 -2
  436. package/src/components/Popover/PopoverExample.tsx +2 -2
  437. package/src/components/ProgressBar/ProgressBar.tsx +1 -1
  438. package/src/components/ProgressCircle/ProgressCircle.tsx +1 -1
  439. package/src/components/ProgressionStepper/ProgressionStepper.tsx +9 -14
  440. package/src/components/ProgressionStepper/ProgressionStepperExample.tsx +2 -2
  441. package/src/components/Radio/Radio.tsx +15 -16
  442. package/src/components/RadioGroup/RadioGroup.rtl.test.tsx +4 -5
  443. package/src/components/RadioGroup/RadioGroup.tsx +51 -71
  444. package/src/components/RadioGroup/radio-group.scss +3 -1
  445. package/src/components/RadioGroupField/RadioGroupField.rtl.test.tsx +27 -0
  446. package/src/components/RadioGroupField/RadioGroupField.tsx +36 -0
  447. package/src/components/RadioGroupField/index.tsx +1 -0
  448. package/src/components/SearchBar/SearchBar.rtl.test.tsx +3 -3
  449. package/src/components/SearchBar/SearchBar.tsx +8 -21
  450. package/src/components/SegmentedControl/SegmentedControl.tsx +1 -1
  451. package/src/components/Select/Select.rtl.test.tsx +6 -5
  452. package/src/components/Select/Select.tsx +56 -54
  453. package/src/components/Select/SelectExample.tsx +1 -14
  454. package/src/components/SelectField/SelectField.rtl.test.tsx +9 -6
  455. package/src/components/SelectField/SelectField.tsx +9 -56
  456. package/src/components/Skeleton/SkeletonExample.tsx +1 -3
  457. package/src/components/Snackbar/Snackbar.tsx +124 -28
  458. package/src/components/Snackbar/SnackbarExample.tsx +9 -3
  459. package/src/components/Snackbar/snackbar.scss +48 -16
  460. package/src/components/StylesProviderDemo/StylesProviderDemo.tsx +5 -2
  461. package/src/components/StylesProviderDemo/exampleCss.ts +1899 -0
  462. package/src/components/Switch/Switch.rtl.test.tsx +3 -1
  463. package/src/components/Switch/Switch.tsx +5 -3
  464. package/src/components/SwitchOption/SwitchOption.rtl.test.tsx +3 -1
  465. package/src/components/SwitchOption/SwitchOption.tsx +1 -1
  466. package/src/components/TabGroup/TabGroup.tsx +2 -2
  467. package/src/components/TabList/TabList.tsx +16 -6
  468. package/src/components/Tag/Tag.tsx +1 -1
  469. package/src/components/Textarea/Textarea.rtl.test.tsx +1 -1
  470. package/src/components/Textarea/Textarea.tsx +72 -68
  471. package/src/components/Textarea/textarea.scss +41 -19
  472. package/src/components/TextareaField/TextareaField.rtl.test.tsx +4 -11
  473. package/src/components/TextareaField/TextareaField.tsx +9 -74
  474. package/src/components/{TimeInput → TimePicker}/Listbox.tsx +5 -5
  475. package/src/components/{TimeInput → TimePicker}/Segment.tsx +8 -5
  476. package/src/components/{TextInput/TextInput.rtl.test.tsx → TimePicker/TimePicker.rtl.test.tsx} +3 -3
  477. package/src/components/{TimeInput/TimeInput.tsx → TimePicker/TimePicker.tsx} +104 -67
  478. package/src/components/TimePicker/TimePickerExample.tsx +8 -0
  479. package/src/components/TimePicker/index.tsx +1 -0
  480. package/src/components/{TimeInput/time-input.scss → TimePicker/time-picker.scss} +7 -5
  481. package/src/components/TimePicker/utils.test.tsx +26 -0
  482. package/src/components/TimePicker/utils.ts +44 -0
  483. package/src/components/TimePickerField/TimePickerField.rtl.test.tsx +17 -0
  484. package/src/components/TimePickerField/TimePickerField.tsx +30 -0
  485. package/src/components/TimePickerField/index.tsx +1 -0
  486. package/src/components/ToggleOption/ToggleOption.tsx +10 -5
  487. package/src/components/Tooltip/Tooltip.tsx +1 -1
  488. package/src/components/Tooltip/TooltipExample.tsx +7 -9
  489. package/src/components/Txt/Txt.tsx +1 -1
  490. package/src/constants/brands.ts +5 -1
  491. package/src/hooks/useCheckboxGroupState.ts +1 -1
  492. package/src/hooks/useCheckboxState.ts +1 -1
  493. package/src/hooks/useContainerWidth.tsx +1 -1
  494. package/src/hooks/useModalState.ts +1 -1
  495. package/src/hooks/useOutsideClick.ts +1 -1
  496. package/src/hooks/useRadioState.ts +1 -1
  497. package/src/hooks/useTimeout.ts +1 -1
  498. package/src/styles/base.scss +3 -0
  499. package/src/types/common.ts +28 -10
  500. package/src/types/meta.ts +1 -0
  501. package/src/utils/demo.ts +1 -0
  502. package/dist/components/CalendarPicker/CalendarPicker.d.ts +0 -32
  503. package/dist/components/CalendarPicker/CalendarPicker.js.map +0 -1
  504. package/dist/components/CalendarPicker/CalendarPickerExample.d.ts +0 -3
  505. package/dist/components/CalendarPicker/CalendarPickerExample.js +0 -17
  506. package/dist/components/CalendarPicker/CalendarPickerExample.js.map +0 -1
  507. package/dist/components/CalendarPicker/index.d.ts +0 -1
  508. package/dist/components/CalendarPicker/index.js +0 -2
  509. package/dist/components/CalendarPicker/index.js.map +0 -1
  510. package/dist/components/ChipAssist/ChipAssist.d.ts +0 -24
  511. package/dist/components/ChipAssist/ChipAssist.js +0 -26
  512. package/dist/components/ChipAssist/ChipAssist.js.map +0 -1
  513. package/dist/components/ChipAssist/ChipAssistExample.d.ts +0 -4
  514. package/dist/components/ChipAssist/ChipAssistExample.js +0 -32
  515. package/dist/components/ChipAssist/ChipAssistExample.js.map +0 -1
  516. package/dist/components/ChipAssist/index.d.ts +0 -1
  517. package/dist/components/ChipAssist/index.js +0 -2
  518. package/dist/components/ChipAssist/index.js.map +0 -1
  519. package/dist/components/ChipFilter/ChipFilter.d.ts +0 -40
  520. package/dist/components/ChipFilter/ChipFilter.js +0 -31
  521. package/dist/components/ChipFilter/ChipFilter.js.map +0 -1
  522. package/dist/components/ChipFilter/ChipFilterExample.d.ts +0 -3
  523. package/dist/components/ChipFilter/ChipFilterExample.js +0 -62
  524. package/dist/components/ChipFilter/ChipFilterExample.js.map +0 -1
  525. package/dist/components/ChipFilter/index.d.ts +0 -1
  526. package/dist/components/ChipFilter/index.js +0 -2
  527. package/dist/components/ChipFilter/index.js.map +0 -1
  528. package/dist/components/ChipInput/ChipInput.d.ts +0 -31
  529. package/dist/components/ChipInput/ChipInput.js +0 -27
  530. package/dist/components/ChipInput/ChipInput.js.map +0 -1
  531. package/dist/components/ChipInput/ChipInputExample.d.ts +0 -4
  532. package/dist/components/ChipInput/ChipInputExample.js +0 -47
  533. package/dist/components/ChipInput/ChipInputExample.js.map +0 -1
  534. package/dist/components/ChipInput/index.d.ts +0 -1
  535. package/dist/components/ChipInput/index.js +0 -2
  536. package/dist/components/ChipInput/index.js.map +0 -1
  537. package/dist/components/ChipSuggestion/ChipSuggestion.d.ts +0 -17
  538. package/dist/components/ChipSuggestion/ChipSuggestion.js +0 -19
  539. package/dist/components/ChipSuggestion/ChipSuggestion.js.map +0 -1
  540. package/dist/components/ChipSuggestion/ChipSuggestionExample.d.ts +0 -4
  541. package/dist/components/ChipSuggestion/ChipSuggestionExample.js +0 -24
  542. package/dist/components/ChipSuggestion/ChipSuggestionExample.js.map +0 -1
  543. package/dist/components/ChipSuggestion/index.d.ts +0 -1
  544. package/dist/components/ChipSuggestion/index.js +0 -2
  545. package/dist/components/ChipSuggestion/index.js.map +0 -1
  546. package/dist/components/ChipUtility/ChipUtility.js +0 -25
  547. package/dist/components/ChipUtility/ChipUtility.js.map +0 -1
  548. package/dist/components/ChipUtility/ChipUtilityExample.d.ts +0 -4
  549. package/dist/components/ChipUtility/ChipUtilityExample.js.map +0 -1
  550. package/dist/components/ChipUtility/index.d.ts +0 -1
  551. package/dist/components/ChipUtility/index.js +0 -2
  552. package/dist/components/ChipUtility/index.js.map +0 -1
  553. package/dist/components/DateField/DateField.d.ts +0 -32
  554. package/dist/components/DateField/DateField.js +0 -34
  555. package/dist/components/DateField/DateField.js.map +0 -1
  556. package/dist/components/DateField/DateFieldExample.d.ts +0 -4
  557. package/dist/components/DateField/DateFieldExample.js +0 -11
  558. package/dist/components/DateField/DateFieldExample.js.map +0 -1
  559. package/dist/components/DateField/date-field.css +0 -8
  560. package/dist/components/DateField/index.d.ts +0 -1
  561. package/dist/components/DateField/index.js +0 -2
  562. package/dist/components/DateField/index.js.map +0 -1
  563. package/dist/components/DateInput/DateInput.d.ts +0 -39
  564. package/dist/components/DateInput/DateInput.js +0 -103
  565. package/dist/components/DateInput/DateInput.js.map +0 -1
  566. package/dist/components/DateInput/DateInputExample.d.ts +0 -4
  567. package/dist/components/DateInput/DateInputExample.js +0 -14
  568. package/dist/components/DateInput/DateInputExample.js.map +0 -1
  569. package/dist/components/DateInput/index.d.ts +0 -1
  570. package/dist/components/DateInput/index.js +0 -2
  571. package/dist/components/DateInput/index.js.map +0 -1
  572. package/dist/components/FormField/form-field.css +0 -17
  573. package/dist/components/FormField/form-field.css.js +0 -22
  574. package/dist/components/ListItemMenu/ListItemMenu.d.ts +0 -146
  575. package/dist/components/ListItemMenu/ListItemMenu.js +0 -159
  576. package/dist/components/ListItemMenu/ListItemMenu.js.map +0 -1
  577. package/dist/components/ListItemMenu/index.d.ts +0 -1
  578. package/dist/components/ListItemMenu/index.js +0 -2
  579. package/dist/components/ListItemMenu/index.js.map +0 -1
  580. package/dist/components/NumberField/NumberField.d.ts +0 -33
  581. package/dist/components/NumberField/NumberField.js +0 -35
  582. package/dist/components/NumberField/NumberField.js.map +0 -1
  583. package/dist/components/NumberField/index.d.ts +0 -1
  584. package/dist/components/NumberField/index.js +0 -2
  585. package/dist/components/NumberField/index.js.map +0 -1
  586. package/dist/components/NumberInput/NumberInput.d.ts +0 -63
  587. package/dist/components/NumberInput/NumberInput.js.map +0 -1
  588. package/dist/components/NumberInput/NumberInputExample.d.ts +0 -3
  589. package/dist/components/NumberInput/NumberInputExample.js.map +0 -1
  590. package/dist/components/NumberInput/index.d.ts +0 -1
  591. package/dist/components/NumberInput/index.js +0 -2
  592. package/dist/components/NumberInput/index.js.map +0 -1
  593. package/dist/components/PasswordInput/PasswordInput.d.ts +0 -21
  594. package/dist/components/PasswordInput/PasswordInput.js +0 -34
  595. package/dist/components/PasswordInput/PasswordInput.js.map +0 -1
  596. package/dist/components/PasswordInput/index.d.ts +0 -1
  597. package/dist/components/PasswordInput/index.js +0 -2
  598. package/dist/components/PasswordInput/index.js.map +0 -1
  599. package/dist/components/PasswordInput/password-input.css +0 -28
  600. package/dist/components/PasswordInput/password-input.css.js +0 -33
  601. package/dist/components/PhoneNumberField/PhoneNumberField.d.ts +0 -14
  602. package/dist/components/PhoneNumberField/PhoneNumberField.js +0 -16
  603. package/dist/components/PhoneNumberField/PhoneNumberField.js.map +0 -1
  604. package/dist/components/PhoneNumberField/index.d.ts +0 -1
  605. package/dist/components/PhoneNumberField/index.js +0 -2
  606. package/dist/components/PhoneNumberField/index.js.map +0 -1
  607. package/dist/components/PhoneNumberInput/PhoneNumberInput.d.ts +0 -37
  608. package/dist/components/PhoneNumberInput/PhoneNumberInput.js +0 -83
  609. package/dist/components/PhoneNumberInput/PhoneNumberInput.js.map +0 -1
  610. package/dist/components/PhoneNumberInput/PhoneNumberInputExample.d.ts +0 -4
  611. package/dist/components/PhoneNumberInput/PhoneNumberInputExample.js +0 -5
  612. package/dist/components/PhoneNumberInput/PhoneNumberInputExample.js.map +0 -1
  613. package/dist/components/PhoneNumberInput/index.d.ts +0 -1
  614. package/dist/components/PhoneNumberInput/index.js +0 -2
  615. package/dist/components/PhoneNumberInput/index.js.map +0 -1
  616. package/dist/components/PhoneNumberInput/phone-number-input.css +0 -46
  617. package/dist/components/PhoneNumberInput/phone-number-input.css.js +0 -51
  618. package/dist/components/SelectField/SelectFieldExample.d.ts +0 -23
  619. package/dist/components/SelectField/SelectFieldExample.js +0 -13
  620. package/dist/components/SelectField/SelectFieldExample.js.map +0 -1
  621. package/dist/components/SnackbarProvider/SnackbarProvider.d.ts +0 -90
  622. package/dist/components/SnackbarProvider/SnackbarProvider.js +0 -115
  623. package/dist/components/SnackbarProvider/SnackbarProvider.js.map +0 -1
  624. package/dist/components/SnackbarProvider/SnackbarProviderExample.d.ts +0 -4
  625. package/dist/components/SnackbarProvider/SnackbarProviderExample.js +0 -59
  626. package/dist/components/SnackbarProvider/SnackbarProviderExample.js.map +0 -1
  627. package/dist/components/SnackbarProvider/index.d.ts +0 -1
  628. package/dist/components/SnackbarProvider/index.js +0 -2
  629. package/dist/components/SnackbarProvider/index.js.map +0 -1
  630. package/dist/components/SnackbarProvider/snackbar-provider-example.css +0 -15
  631. package/dist/components/SnackbarProvider/snackbar-provider-example.css.js +0 -20
  632. package/dist/components/SnackbarProvider/snackbar-provider.css +0 -15
  633. package/dist/components/SnackbarProvider/snackbar-provider.css.js +0 -20
  634. package/dist/components/TextField/TextField.d.ts +0 -31
  635. package/dist/components/TextField/TextField.js +0 -33
  636. package/dist/components/TextField/TextField.js.map +0 -1
  637. package/dist/components/TextField/TextFieldExample.d.ts +0 -3
  638. package/dist/components/TextField/TextFieldExample.js +0 -6
  639. package/dist/components/TextField/TextFieldExample.js.map +0 -1
  640. package/dist/components/TextField/index.d.ts +0 -1
  641. package/dist/components/TextField/index.js +0 -2
  642. package/dist/components/TextField/index.js.map +0 -1
  643. package/dist/components/TextInput/TextInput.d.ts +0 -78
  644. package/dist/components/TextInput/TextInput.js.map +0 -1
  645. package/dist/components/TextInput/TextInputExample.d.ts +0 -3
  646. package/dist/components/TextInput/TextInputExample.js.map +0 -1
  647. package/dist/components/TextInput/index.d.ts +0 -1
  648. package/dist/components/TextInput/index.js +0 -2
  649. package/dist/components/TextInput/index.js.map +0 -1
  650. package/dist/components/TextareaField/TextareaFieldExample.d.ts +0 -3
  651. package/dist/components/TextareaField/TextareaFieldExample.js +0 -10
  652. package/dist/components/TextareaField/TextareaFieldExample.js.map +0 -1
  653. package/dist/components/TimeInput/Listbox.d.ts +0 -15
  654. package/dist/components/TimeInput/Listbox.js.map +0 -1
  655. package/dist/components/TimeInput/Segment.d.ts +0 -20
  656. package/dist/components/TimeInput/Segment.js.map +0 -1
  657. package/dist/components/TimeInput/TimeInput.d.ts +0 -24
  658. package/dist/components/TimeInput/TimeInput.js +0 -115
  659. package/dist/components/TimeInput/TimeInput.js.map +0 -1
  660. package/dist/components/TimeInput/TimeInputExample.d.ts +0 -3
  661. package/dist/components/TimeInput/TimeInputExample.js +0 -4
  662. package/dist/components/TimeInput/TimeInputExample.js.map +0 -1
  663. package/dist/components/TimeInput/index.d.ts +0 -1
  664. package/dist/components/TimeInput/index.js +0 -2
  665. package/dist/components/TimeInput/index.js.map +0 -1
  666. package/dist/hooks/useSnackbarContext.d.ts +0 -1
  667. package/dist/hooks/useSnackbarContext.js +0 -16
  668. package/dist/hooks/useSnackbarContext.js.map +0 -1
  669. package/dist/utils/snackbarContext.d.ts +0 -38
  670. package/dist/utils/snackbarContext.js +0 -3
  671. package/dist/utils/snackbarContext.js.map +0 -1
  672. package/src/components/CalendarPicker/CalendarPickerExample.tsx +0 -24
  673. package/src/components/CalendarPicker/index.tsx +0 -1
  674. package/src/components/ChipAssist/ChipAssist.rtl.test.tsx +0 -16
  675. package/src/components/ChipAssist/ChipAssist.tsx +0 -37
  676. package/src/components/ChipAssist/ChipAssistExample.tsx +0 -34
  677. package/src/components/ChipAssist/index.tsx +0 -1
  678. package/src/components/ChipFilter/ChipFilter.rtl.test.tsx +0 -15
  679. package/src/components/ChipFilter/ChipFilter.tsx +0 -75
  680. package/src/components/ChipFilter/ChipFilterExample.tsx +0 -63
  681. package/src/components/ChipFilter/index.tsx +0 -1
  682. package/src/components/ChipInput/ChipInput.rtl.test.tsx +0 -16
  683. package/src/components/ChipInput/ChipInput.tsx +0 -47
  684. package/src/components/ChipInput/ChipInputExample.tsx +0 -49
  685. package/src/components/ChipInput/index.tsx +0 -1
  686. package/src/components/ChipSuggestion/ChipSuggestion.rtl.test.tsx +0 -19
  687. package/src/components/ChipSuggestion/ChipSuggestion.tsx +0 -22
  688. package/src/components/ChipSuggestion/ChipSuggestionExample.tsx +0 -26
  689. package/src/components/ChipSuggestion/index.tsx +0 -1
  690. package/src/components/ChipUtility/index.tsx +0 -1
  691. package/src/components/DateField/DateField.rtl.test.tsx +0 -24
  692. package/src/components/DateField/DateField.tsx +0 -58
  693. package/src/components/DateField/DateFieldExample.tsx +0 -13
  694. package/src/components/DateField/date-field.scss +0 -8
  695. package/src/components/DateField/index.tsx +0 -1
  696. package/src/components/DateInput/DateInput.rtl.test.tsx +0 -17
  697. package/src/components/DateInput/DateInput.tsx +0 -198
  698. package/src/components/DateInput/DateInputExample.tsx +0 -17
  699. package/src/components/DateInput/index.tsx +0 -1
  700. package/src/components/FormField/form-field.scss +0 -19
  701. package/src/components/ListItemMenu/ListItemMenu.tsx +0 -359
  702. package/src/components/ListItemMenu/index.tsx +0 -1
  703. package/src/components/NumberField/NumberField.rtl.test.tsx +0 -24
  704. package/src/components/NumberField/NumberField.tsx +0 -70
  705. package/src/components/NumberField/index.tsx +0 -1
  706. package/src/components/NumberInput/index.tsx +0 -1
  707. package/src/components/PasswordInput/PasswordInput.rtl.test.tsx +0 -15
  708. package/src/components/PasswordInput/PasswordInput.tsx +0 -115
  709. package/src/components/PasswordInput/index.tsx +0 -1
  710. package/src/components/PasswordInput/password-input.scss +0 -36
  711. package/src/components/PhoneNumberField/PhoneNumberField.rtl.test.tsx +0 -24
  712. package/src/components/PhoneNumberField/PhoneNumberField.tsx +0 -41
  713. package/src/components/PhoneNumberField/index.tsx +0 -1
  714. package/src/components/PhoneNumberInput/PhoneNumberInput.rtl.test.tsx +0 -17
  715. package/src/components/PhoneNumberInput/PhoneNumberInput.tsx +0 -186
  716. package/src/components/PhoneNumberInput/PhoneNumberInputExample.tsx +0 -8
  717. package/src/components/PhoneNumberInput/index.tsx +0 -1
  718. package/src/components/SelectField/SelectFieldExample.tsx +0 -16
  719. package/src/components/SnackbarProvider/SnackbarProvider.tsx +0 -160
  720. package/src/components/SnackbarProvider/SnackbarProviderExample.tsx +0 -127
  721. package/src/components/SnackbarProvider/index.tsx +0 -1
  722. package/src/components/SnackbarProvider/snackbar-provider-example.scss +0 -17
  723. package/src/components/SnackbarProvider/snackbar-provider.scss +0 -15
  724. package/src/components/TextField/TextField.tsx +0 -67
  725. package/src/components/TextField/TextFieldExample.tsx +0 -8
  726. package/src/components/TextField/index.tsx +0 -1
  727. package/src/components/TextInput/TextInputExample.tsx +0 -44
  728. package/src/components/TextInput/index.tsx +0 -1
  729. package/src/components/TextareaField/TextareaFieldExample.tsx +0 -13
  730. package/src/components/TimeInput/TimeInput.rtl.test.tsx +0 -15
  731. package/src/components/TimeInput/TimeInputExample.tsx +0 -6
  732. package/src/components/TimeInput/index.tsx +0 -1
  733. package/src/hooks/useSnackbarContext.ts +0 -18
  734. package/src/utils/snackbarContext.tsx +0 -43
  735. /package/dist/components/{NumberInput → InputNumber}/IncrementButton.d.ts +0 -0
  736. /package/dist/components/{NumberInput → InputNumber}/IncrementButton.js +0 -0
  737. /package/src/components/{NumberInput → InputNumber}/IncrementButton.tsx +0 -0
@@ -1,12 +1,100 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { FormField } from './FormField';
3
- import { TextInput } from '../TextInput';
4
- export const FormFieldExample = {
5
- render: ({ props, setState }) => {
6
- const { invalid, errorMessage, label, controlId = 'example-control-id', helperText, labelTrailing, ...inputProps } = props;
7
- return (_jsx(FormField, { controlId: controlId, errorMessage: errorMessage, helperText: helperText, invalid: invalid, label: label, labelTrailing: labelTrailing, children: (fieldProps) => {
8
- return (_jsx(TextInput, { ...inputProps, ...fieldProps, "aria-label": label, invalid: invalid, onChange: (next) => setState({ value: next }), value: props.value }));
9
- } }));
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { useState } from 'react';
3
+ import { FormField } from '.';
4
+ import { Button } from '../Button';
5
+ import { CheckboxGroup } from '../CheckboxGroup';
6
+ import { DatePicker } from '../DatePicker';
7
+ import { Input } from '../Input';
8
+ import { InputNumber } from '../InputNumber';
9
+ import { InputPhone } from '../InputPhone';
10
+ import { Password } from '../Password';
11
+ import { RadioGroup } from '../RadioGroup';
12
+ import { Select } from '../Select';
13
+ import { SwitchOption } from '../SwitchOption';
14
+ import { Textarea } from '../Textarea';
15
+ import { TimePicker } from '../TimePicker';
16
+ export const presets = [
17
+ {
18
+ label: 'Control Disabled',
19
+ propState: { disabled: true },
10
20
  },
21
+ ];
22
+ export const FormFieldExample = {
23
+ containerStyle: { width: '100%' },
24
+ defaultState: {},
25
+ disableProps: [],
26
+ presets: presets,
27
+ render: ({ props, Component }) => (_jsx(Component, { ...props, children: _jsx(Input, { name: "input", onChange: () => { }, placeholder: "Example input", value: "" }) })),
28
+ sections: [
29
+ {
30
+ title: 'Form Field Example',
31
+ content: ({ Syntax: syntax, props }) => (_jsxs(_Fragment, { children: [_jsx("p", { children: "This example demonstrates the FormField component wrapping various form controls including CheckboxGroup, RadioGroup, DatePicker, Input, InputNumber, InputPhone, Password, Select, Textarea, and TimePicker. It showcases how to manage state and handle form submissions." }), _jsxs("p", { children: ["All the controls have a HTML input element inside of them so they will work with form submissions natively. You can see the raw submitted", ' ', _jsx("a", { href: "https://developer.mozilla.org/en-US/docs/Web/API/FormData", children: "FormData" }), " at the bottom after clicking the Submit button."] }), _jsx(FormFieldExampleRender, { ...props, syntax: syntax })] })),
32
+ location: 'afterDemo',
33
+ },
34
+ ],
35
+ variants: false,
11
36
  };
37
+ export function FormFieldExampleRender({ ...props }) {
38
+ const [value, setValueState] = useState({});
39
+ const setValue = (next) => {
40
+ setValueState((prev) => ({ ...prev, ...next }));
41
+ };
42
+ const [formValues, setFormValues] = useState({});
43
+ const [disabled, setDisabled] = useState(!!props.disabled);
44
+ const [required, setRequired] = useState(!!props.required);
45
+ const [fieldProps, setFieldProps] = useState({
46
+ errorMessage: false,
47
+ description: false,
48
+ });
49
+ const internalProps = (label) => {
50
+ return {
51
+ errorMessage: fieldProps.errorMessage ? `This is an error message for the ${label}.` : undefined,
52
+ helperText: fieldProps.description ? `This is a description for the ${label}.` : undefined,
53
+ label,
54
+ };
55
+ };
56
+ return (_jsxs(_Fragment, { children: [_jsxs("div", { style: {
57
+ display: 'flex',
58
+ flexDirection: 'row',
59
+ }, children: [_jsx(SwitchOption, { checked: fieldProps.errorMessage, label: "Has Error", name: "hasError", onChange: (checked) => setFieldProps((prev) => ({ ...prev, errorMessage: checked })), value: "hasError" }), _jsx(SwitchOption, { checked: disabled, label: "Disabled", name: "disabled", onChange: setDisabled, value: "disabled" }), _jsx(SwitchOption, { checked: required, label: "Required", name: "required", onChange: setRequired, value: "required" }), _jsx(SwitchOption, { checked: !!fieldProps.description, label: "With Description", name: "description", onChange: (checked) => setFieldProps((prev) => ({ ...prev, description: checked })), value: "description" })] }), _jsxs("form", { onReset: () => {
60
+ setValueState({});
61
+ setFormValues({});
62
+ }, onSubmit: (e) => {
63
+ e.preventDefault();
64
+ const formData = new FormData(e.currentTarget);
65
+ const next = {};
66
+ // handle multiple form entries with the same name
67
+ formData.forEach((fieldValue, key) => {
68
+ if (next[key]) {
69
+ if (Array.isArray(next[key])) {
70
+ next[key].push(fieldValue);
71
+ }
72
+ else {
73
+ next[key] = [next[key], fieldValue];
74
+ }
75
+ }
76
+ else {
77
+ next[key] = fieldValue;
78
+ }
79
+ });
80
+ setFormValues(next);
81
+ }, style: { display: 'flex', flexDirection: 'column', gap: 'var(--spacing-sizing-04)', width: '400px' }, children: [_jsx(FormField, { ...props, as: "fieldset", ...internalProps('CheckboxGroup'), children: _jsx(CheckboxGroup, { disabled: disabled, name: "checkbox-group", onChange: (next) => setValue({ 'checkbox-group': next }), options: [
82
+ { label: 'Option 1', value: 'option1' },
83
+ { label: 'Option 2', value: 'option2' },
84
+ { label: 'Option 3', value: 'option3' },
85
+ ], required: required, value: value['checkbox-group'] }) }), _jsx(FormField, { ...props, as: "fieldset", ...internalProps('RadioGroup'), children: _jsx(RadioGroup, { disabled: disabled, name: "radio-group", onChange: (next) => setValue({ 'radio-group': next }), options: [
86
+ { label: 'Option 1', value: 'option1' },
87
+ { label: 'Option 2', value: 'option2' },
88
+ { label: 'Option 3', value: 'option3' },
89
+ ], required: required, value: value['radio-group'] }) }), _jsx(FormField, { ...props, ...internalProps('DatePicker'), children: _jsx(DatePicker, { disabled: disabled, name: "date-picker", onChange: (next) => setValue({ 'date-picker': next }), placeholder: "Example input", required: required, value: value['date-picker'] }) }), _jsx(FormField, { ...props, ...internalProps('Input'), children: _jsx(Input, { disabled: disabled, name: "input", onChange: (next) => setValue({ input: next }), placeholder: "Example input", required: required, value: value['input'] }) }), _jsx(FormField, { ...props, ...internalProps('InputNumber'), children: _jsx(InputNumber, { disabled: disabled, name: "input-number", onChange: (next) => setValue({ 'input-number': next }), required: required, value: value['input-number'] }) }), _jsx(FormField, { ...props, ...internalProps('InputPhone'), children: _jsx(InputPhone, { disabled: disabled, name: "input-phone", onChange: (next) => setValue({ 'input-phone': next }), required: required, value: value['input-phone'] }) }), _jsx(FormField, { ...props, ...internalProps('Password'), children: _jsx(Password, { disabled: disabled, name: "password", onChange: (next) => setValue({ password: next }), required: required, value: value['password'] }) }), _jsx(FormField, { ...props, ...internalProps('Select'), children: _jsx(Select, { disabled: disabled, name: "select", onChange: (next) => setValue({ select: next }), options: [
90
+ { label: 'Option 1', value: 'option1' },
91
+ { label: 'Option 2', value: 'option2' },
92
+ { label: 'Option 3', value: 'option3' },
93
+ ], placeholder: "Example input", required: required, value: value['select'] }) }), _jsx(FormField, { ...props, ...internalProps('Textarea'), children: _jsx(Textarea, { disabled: disabled, name: "textarea", onChange: (next) => setValue({ textarea: next }), placeholder: "Example input", required: required, value: value['textarea'] }) }), _jsx(FormField, { ...props, ...internalProps('TimePicker'), children: _jsx(TimePicker, { disabled: disabled, name: "time-picker", onChange: (next) => setValue({ 'time-picker': next }), required: required, value: value['time-picker'] }) }), _jsxs("div", { style: { display: 'flex', flexDirection: 'row', gap: 'var(--spacing-sizing-02)' }, children: [_jsx(Button, { label: "Reset", type: "reset", variant: "secondary" }), _jsx(Button, { label: "Submit", type: "submit", variant: "primary" })] }), _jsx("code", { style: {
94
+ background: 'var(--surface-neutral-t3-low)',
95
+ // fontWeight: 'bold',
96
+ padding: 'var(--spacing-sizing-02)',
97
+ borderRadius: 'var(--radius-sm)',
98
+ }, children: _jsx("pre", { children: `// Raw FormData\n\n${JSON.stringify(formValues, null, 2)}` }) })] })] }));
99
+ }
12
100
  //# sourceMappingURL=FormFieldExample.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FormFieldExample.js","sourceRoot":"","sources":["../../../src/components/FormField/FormFieldExample.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAsB,SAAS,EAAE,MAAM,aAAa,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAkB,MAAM,wBAAwB,CAAC;AAGnE,MAAM,CAAC,MAAM,gBAAgB,GAAyD;IAClF,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,EAAE;QAC5B,MAAM,EACF,OAAO,EACP,YAAY,EACZ,KAAK,EACL,SAAS,GAAG,oBAAoB,EAChC,UAAU,EACV,aAAa,EACb,GAAG,UAAU,EAChB,GAAG,KAAK,CAAC;QAEV,OAAO,CACH,KAAC,SAAS,IACN,SAAS,EAAE,SAAS,EACpB,YAAY,EAAE,YAAY,EAC1B,UAAU,EAAE,UAAU,EACtB,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,KAAK,EACZ,aAAa,EAAE,aAAa,YAE3B,CAAC,UAAU,EAAE,EAAE;gBACZ,OAAO,CACH,KAAC,SAAS,OACF,UAAU,KACV,UAAU,gBACF,KAAK,EACjB,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,QAAQ,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,EACrD,KAAK,EAAE,KAAK,CAAC,KAAK,GACpB,CACL,CAAC;YACN,CAAC,GACO,CACf,CAAC;IACN,CAAC;CACJ,CAAC"}
1
+ {"version":3,"file":"FormFieldExample.js","sourceRoot":"","sources":["../../../src/components/FormField/FormFieldExample.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,SAAS,EAAkB,MAAM,GAAG,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC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ACN,eACI,KAAK,EAAE;4BACH,UAAU,EAAE,+BAA+B;4BAC3C,sBAAsB;4BACtB,OAAO,EAAE,0BAA0B;4BACnC,YAAY,EAAE,kBAAkB;yBACnC,YAED,wBAAM,sBAAsB,IAAI,CAAC,SAAS,CAAC,UAAU,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,GAAO,GACrE,IACJ,IACR,CACN,CAAC;AACN,CAAC"}
@@ -19,7 +19,7 @@ export type ImgProps = {
19
19
  * @example
20
20
  * import { Img } from '@bspk/ui/Img';
21
21
  *
22
- * export function Example() {
22
+ * function Example() {
23
23
  * return <Img alt="Example alt" src="Example src" />;
24
24
  * }
25
25
  *
@@ -5,7 +5,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
5
5
  * @example
6
6
  * import { Img } from '@bspk/ui/Img';
7
7
  *
8
- * export function Example() {
8
+ * function Example() {
9
9
  * return <Img alt="Example alt" src="Example src" />;
10
10
  * }
11
11
  *
@@ -1,6 +1,6 @@
1
1
  import './inline-alert.scss';
2
- import { AlertVariant } from '-/types/common';
3
- export type InlineAlertProps = {
2
+ import { AlertVariant, CommonProps } from '-/types/common';
3
+ export type InlineAlertProps = CommonProps<'owner'> & {
4
4
  /**
5
5
  * The content of the inline alert.
6
6
  *
@@ -24,12 +24,12 @@ export type InlineAlertProps = {
24
24
  * @example
25
25
  * import { InlineAlert } from '@bspk/ui/InlineAlert';
26
26
  *
27
- * export function Example() {
27
+ * function Example() {
28
28
  * return <InlineAlert variant="informational">Example informational inline alert</InlineAlert>;
29
29
  * }
30
30
  *
31
31
  * @name InlineAlert
32
32
  * @phase UXReview
33
33
  */
34
- export declare function InlineAlert({ children, variant, id }: InlineAlertProps): import("react/jsx-runtime").JSX.Element;
34
+ export declare function InlineAlert({ children, variant, id, owner }: InlineAlertProps): import("react/jsx-runtime").JSX.Element;
35
35
  /** Copyright 2025 Anywhere Real Estate - CC BY 4.0 */
@@ -12,15 +12,15 @@ import { Txt } from '../Txt';
12
12
  * @example
13
13
  * import { InlineAlert } from '@bspk/ui/InlineAlert';
14
14
  *
15
- * export function Example() {
15
+ * function Example() {
16
16
  * return <InlineAlert variant="informational">Example informational inline alert</InlineAlert>;
17
17
  * }
18
18
  *
19
19
  * @name InlineAlert
20
20
  * @phase UXReview
21
21
  */
22
- export function InlineAlert({ children, variant = 'informational', id }) {
23
- return (_jsxs("div", { "data-bspk": "inline-alert", "data-variant": variant, id: id, role: "alert", children: [VARIANT_ICON[variant], _jsx(Txt, { variant: "body-small", children: children })] }));
22
+ export function InlineAlert({ children, variant = 'informational', id, owner }) {
23
+ return (_jsxs("div", { "data-bspk": "inline-alert", "data-bspk-owner": owner || undefined, "data-variant": variant, id: id, role: "alert", children: [VARIANT_ICON[variant], _jsx(Txt, { variant: "body-small", children: children })] }));
24
24
  }
25
25
  const VARIANT_ICON = {
26
26
  error: _jsx(SvgErrorFill, {}),
@@ -1 +1 @@
1
- {"version":3,"file":"InlineAlert.js","sourceRoot":"","sources":["../../../src/components/InlineAlert/InlineAlert.tsx"],"names":[],"mappings":";AAAA,OAAO,qBAAqB,CAAC;AAC7B,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAEnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAqBvC;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,WAAW,CAAC,EAAE,QAAQ,EAAE,OAAO,GAAG,eAAe,EAAE,EAAE,EAAoB;IACrF,OAAO,CACH,4BAAe,cAAc,kBAAe,OAAO,EAAE,EAAE,EAAE,EAAE,EAAE,IAAI,EAAC,OAAO,aACpE,YAAY,CAAC,OAAO,CAAC,EACtB,KAAC,GAAG,IAAC,OAAO,EAAC,YAAY,YAAE,QAAQ,GAAO,IACxC,CACT,CAAC;AACN,CAAC;AAED,MAAM,YAAY,GAAoC;IAClD,KAAK,EAAE,KAAC,YAAY,KAAG;IACvB,aAAa,EAAE,KAAC,WAAW,KAAG;IAC9B,OAAO,EAAE,KAAC,kBAAkB,KAAG;IAC/B,OAAO,EAAE,KAAC,iBAAiB,KAAG;CACjC,CAAC"}
1
+ {"version":3,"file":"InlineAlert.js","sourceRoot":"","sources":["../../../src/components/InlineAlert/InlineAlert.tsx"],"names":[],"mappings":";AAAA,OAAO,qBAAqB,CAAC;AAC7B,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAEnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAqBvC;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,WAAW,CAAC,EAAE,QAAQ,EAAE,OAAO,GAAG,eAAe,EAAE,EAAE,EAAE,KAAK,EAAoB;IAC5F,OAAO,CACH,4BAAe,cAAc,qBAAkB,KAAK,IAAI,SAAS,kBAAgB,OAAO,EAAE,EAAE,EAAE,EAAE,EAAE,IAAI,EAAC,OAAO,aACzG,YAAY,CAAC,OAAO,CAAC,EACtB,KAAC,GAAG,IAAC,OAAO,EAAC,YAAY,YAAE,QAAQ,GAAO,IACxC,CACT,CAAC;AACN,CAAC;AAED,MAAM,YAAY,GAAoC;IAClD,KAAK,EAAE,KAAC,YAAY,KAAG;IACvB,aAAa,EAAE,KAAC,WAAW,KAAG;IAC9B,OAAO,EAAE,KAAC,kBAAkB,KAAG;IAC/B,OAAO,EAAE,KAAC,iBAAiB,KAAG;CACjC,CAAC"}
@@ -0,0 +1,37 @@
1
+ import './input.scss';
2
+ import { InputElementProps } from './InputElement';
3
+ import { ElementProps } from '-/types/common';
4
+ export type InputProps = Omit<InputElementProps, 'ariaDescribedBy' | 'ariaErrorMessage'>;
5
+ /**
6
+ * An input that allows users to enter text, numbers or symbols in a singular line.
7
+ *
8
+ * For a more complete example with field usage, see the InputField component.
9
+ *
10
+ * @example
11
+ * import { useState } from 'react';
12
+ * import { Input } from '@bspk/ui/Input';
13
+ * import { Field, FieldLabel } from '@bspk/ui/Field';
14
+ *
15
+ * function Example() {
16
+ * const [value, setValue] = useState('');
17
+ *
18
+ * return (
19
+ * <Field>
20
+ * <FieldLabel>Example Label</FieldLabel>
21
+ * <Input name="example-name" onChange={setValue} value={value} />
22
+ * <FieldDescription>This is an example input field.</FieldDescription>
23
+ * </Field>
24
+ * );
25
+ * }
26
+ *
27
+ * function ExampleWithAriaLabel() {
28
+ * const [value, setValue] = useState('');
29
+ *
30
+ * return <Input aria-label="Example Input" name="example-name" onChange={setValue} value={value} />;
31
+ * }
32
+ *
33
+ * @name Input
34
+ * @phase UXReview
35
+ */
36
+ export declare function Input({ invalid: invalidProp, onChange, size, value, name, 'aria-label': ariaLabel, inputRef, required, placeholder, id: idProp, leading, trailing, type, readOnly, disabled, autoComplete, containerRef, showClearButton: showClearButtonProp, owner, inputProps, ...props }: ElementProps<InputProps, 'div'>): import("react/jsx-runtime").JSX.Element;
37
+ /** Copyright 2025 Anywhere Real Estate - CC BY 4.0 */
@@ -0,0 +1,48 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import './input.css.js';
3
+ import { DEFAULT, InputElement } from './InputElement';
4
+ import { useFieldInit } from '../Field';
5
+ /**
6
+ * An input that allows users to enter text, numbers or symbols in a singular line.
7
+ *
8
+ * For a more complete example with field usage, see the InputField component.
9
+ *
10
+ * @example
11
+ * import { useState } from 'react';
12
+ * import { Input } from '@bspk/ui/Input';
13
+ * import { Field, FieldLabel } from '@bspk/ui/Field';
14
+ *
15
+ * function Example() {
16
+ * const [value, setValue] = useState('');
17
+ *
18
+ * return (
19
+ * <Field>
20
+ * <FieldLabel>Example Label</FieldLabel>
21
+ * <Input name="example-name" onChange={setValue} value={value} />
22
+ * <FieldDescription>This is an example input field.</FieldDescription>
23
+ * </Field>
24
+ * );
25
+ * }
26
+ *
27
+ * function ExampleWithAriaLabel() {
28
+ * const [value, setValue] = useState('');
29
+ *
30
+ * return <Input aria-label="Example Input" name="example-name" onChange={setValue} value={value} />;
31
+ * }
32
+ *
33
+ * @name Input
34
+ * @phase UXReview
35
+ */
36
+ export function Input({ invalid: invalidProp, onChange, size = DEFAULT.size, value = DEFAULT.value, name, 'aria-label': ariaLabel = 'Input', inputRef, required = false, placeholder, id: idProp, leading, trailing, type = DEFAULT.type, readOnly, disabled, autoComplete = DEFAULT.autoComplete, containerRef, showClearButton: showClearButtonProp = true, owner, inputProps, ...props }) {
37
+ const { id, ariaDescribedBy, ariaErrorMessage, invalid } = useFieldInit({
38
+ idProp,
39
+ required,
40
+ disabled,
41
+ readOnly,
42
+ invalidProp,
43
+ });
44
+ return (
45
+ // data-bspk="input" -- because InputElement already has it :)
46
+ _jsx(InputElement, { ...props, "aria-label": ariaLabel, ariaDescribedBy: ariaDescribedBy, ariaErrorMessage: ariaErrorMessage, autoComplete: autoComplete, containerRef: containerRef, disabled: disabled, id: id, inputProps: inputProps, inputRef: inputRef, invalid: invalid, leading: leading, name: name, onChange: onChange, owner: owner, placeholder: placeholder, readOnly: readOnly, showClearButton: showClearButtonProp, size: size, trailing: trailing, type: type, value: value }));
47
+ }
48
+ //# sourceMappingURL=Input.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Input.js","sourceRoot":"","sources":["../../../src/components/Input/Input.tsx"],"names":[],"mappings":";AAAA,OAAO,cAAc,CAAC;AACtB,OAAO,EAAE,OAAO,EAAE,YAAY,EAAqB,MAAM,gBAAgB,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAKlD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,MAAM,UAAU,KAAK,CAAC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scss';
2
+ import { HTMLInputTypeAttribute, ReactNode } from 'react';
3
+ import { FieldContextProps } from '-/components/Field';
4
+ import { CommonProps, ElementProps, SetRef, FieldControlProps } from '-/types/common';
5
+ export declare const DEFAULT: {
6
+ readonly size: "medium";
7
+ readonly value: "";
8
+ readonly type: Extract<HTMLInputTypeAttribute, "number" | "text">;
9
+ readonly autoComplete: "off";
10
+ };
11
+ type InputElementBaseProps = CommonProps<'owner' | 'size'> & FieldControlProps & Pick<FieldContextProps, 'ariaDescribedBy' | 'ariaErrorMessage'> & {
12
+ /** The ref of the container. */
13
+ containerRef?: SetRef<HTMLDivElement>;
14
+ /** The ref of the input. */
15
+ inputRef?: SetRef<HTMLInputElement>;
16
+ /**
17
+ * The trailing element to display in the field.
18
+ *
19
+ * @exampleType string
20
+ */
21
+ trailing?: ReactNode;
22
+ /**
23
+ * The leading element to display in the field.
24
+ *
25
+ * @exampleType string
26
+ */
27
+ leading?: ReactNode;
28
+ /** The placeholder of the field. */
29
+ placeholder?: string;
30
+ /**
31
+ * The type of the input.
32
+ *
33
+ * @default text
34
+ */
35
+ type?: Extract<HTMLInputTypeAttribute, 'number' | 'password' | 'text'>;
36
+ /**
37
+ * Specifies if user agent has any permission to provide automated assistance in filling out form field values
38
+ *
39
+ * @default off
40
+ */
41
+ autoComplete?: 'off' | 'on';
42
+ /**
43
+ * Specifies if the clear button should be shown. This should almost always be true, but can be set to false.
44
+ *
45
+ * @default true
46
+ */
47
+ showClearButton?: boolean;
48
+ };
49
+ export type InputElementProps = InputElementBaseProps & {
50
+ inputProps?: Omit<React.InputHTMLAttributes<HTMLInputElement>, keyof InputElementBaseProps>;
51
+ };
52
+ /**
53
+ * An input that allows users to enter text, numbers or symbols in a singular line. This is a utility element and is not
54
+ * intended to be used directly but rather through the Input, and other components.
55
+ *
56
+ * @example
57
+ * import { useState } from 'react';
58
+ * import { InputElement } from '@bspk/ui/InputElement';
59
+ * import { Field, FieldLabel } from '@bspk/ui/Field';
60
+ *
61
+ * function Example() {
62
+ * const [value, setValue] = useState('');
63
+ *
64
+ * return (
65
+ * <Field>
66
+ * <FieldLabel>Example Label</FieldLabel>
67
+ * <InputElement name="example-name" onChange={setValue} value={value} />
68
+ * </Field>
69
+ * );
70
+ * }
71
+ *
72
+ * @name InputElement
73
+ * @phase Utility
74
+ */
75
+ export declare function InputElement({ invalid, onChange, size, value, name, 'aria-label': ariaLabel, inputRef, required, placeholder, id, leading, trailing, type, readOnly, disabled, autoComplete, containerRef, showClearButton: showClearButtonProp, owner, inputProps, ariaDescribedBy, ariaErrorMessage, ...props }: ElementProps<InputElementProps, 'div'>): import("react/jsx-runtime").JSX.Element;
76
+ export {};
77
+ /** Copyright 2025 Anywhere Real Estate - CC BY 4.0 */
@@ -1,9 +1,8 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import './text-input.css.js';
2
+ import './input.css.js';
3
3
  import { SvgCancel } from '@bspk/icons/Cancel';
4
4
  import { useMemo, useRef, useState } from 'react';
5
5
  import { Button } from '../Button';
6
- import { useId } from '../../hooks/useId';
7
6
  import { useTimeout } from '../../hooks/useTimeout';
8
7
  export const DEFAULT = {
9
8
  size: 'medium',
@@ -12,32 +11,34 @@ export const DEFAULT = {
12
11
  autoComplete: 'off',
13
12
  };
14
13
  /**
15
- * A text input that allows users to enter text, numbers or symbols in a singular line. This is the base element and is
16
- * not intended to be used directly. Use the TextField component.
14
+ * An input that allows users to enter text, numbers or symbols in a singular line. This is a utility element and is not
15
+ * intended to be used directly but rather through the Input, and other components.
17
16
  *
18
17
  * @example
19
18
  * import { useState } from 'react';
20
- * import { TextInput } from '@bspk/ui/TextInput';
19
+ * import { InputElement } from '@bspk/ui/InputElement';
20
+ * import { Field, FieldLabel } from '@bspk/ui/Field';
21
21
  *
22
- * export function Example() {
23
- * const [value, setValue] = useState<string>('');
22
+ * function Example() {
23
+ * const [value, setValue] = useState('');
24
24
  *
25
- * return <TextInput aria-label="Example aria-label" name="Example name" onChange={setValue} value={value} />;
25
+ * return (
26
+ * <Field>
27
+ * <FieldLabel>Example Label</FieldLabel>
28
+ * <InputElement name="example-name" onChange={setValue} value={value} />
29
+ * </Field>
30
+ * );
26
31
  * }
27
32
  *
28
- * @element
29
- *
30
- * @name TextInput
33
+ * @name InputElement
31
34
  * @phase Utility
32
35
  */
33
- export function TextInput({ invalid: invalidProp, onChange, size = DEFAULT.size, value = DEFAULT.value, name, 'aria-label': ariaLabel, inputRef, required, placeholder, id: idProp, leading, trailing, type = DEFAULT.type, readOnly, disabled, autoComplete = DEFAULT.autoComplete, containerRef, showClearButton: showClearButtonProp = true, owner, 'aria-describedby': ariaDescribedBy, 'aria-errormessage': ariaErrorMessage, inputProps, ...props }) {
34
- const id = useId(idProp);
35
- const invalid = !readOnly && !disabled && invalidProp;
36
+ export function InputElement({ invalid, onChange, size = DEFAULT.size, value = DEFAULT.value, name, 'aria-label': ariaLabel = 'Input', inputRef, required = false, placeholder, id, leading, trailing, type = DEFAULT.type, readOnly, disabled, autoComplete = DEFAULT.autoComplete, containerRef, showClearButton: showClearButtonProp = true, owner, inputProps, ariaDescribedBy, ariaErrorMessage, ...props }) {
36
37
  const [focused, setFocused] = useState(false);
37
38
  const showClearButton = useMemo(() => !!(showClearButtonProp !== false && !readOnly && !disabled && value?.toString().length && focused), [showClearButtonProp, readOnly, disabled, value, focused]);
38
39
  const inputRefInternal = useRef(null);
39
40
  const focusTimeout = useTimeout();
40
- return (_jsxs("div", { ...props, "data-bspk": "text-input", "data-bspk-owner": owner || undefined, "data-disabled": disabled || undefined, "data-empty": !value.toString().length || undefined, "data-invalid": invalid || undefined, "data-readonly": readOnly || undefined, "data-show-clear-button": showClearButton || undefined, "data-size": size, ref: containerRef, children: [leading && _jsx("span", { "data-leading": true, children: leading }), _jsx("input", { ...inputProps, "aria-describedby": ariaDescribedBy || undefined, "aria-errormessage": ariaErrorMessage || undefined, "aria-invalid": invalid || undefined, "aria-label": ariaLabel, autoComplete: autoComplete, "data-main-input": true, disabled: disabled || undefined, id: id, name: name, onBlur: (event) => {
41
+ return (_jsxs("div", { ...props, "data-bspk": "input", "data-bspk-owner": owner || undefined, "data-disabled": disabled || undefined, "data-empty": !value.toString().length || undefined, "data-invalid": invalid || undefined, "data-readonly": readOnly || undefined, "data-show-clear-button": showClearButton || undefined, "data-size": size, ref: containerRef, children: [leading && _jsx("span", { "data-leading": true, children: leading }), _jsx("input", { ...inputProps, "aria-describedby": ariaDescribedBy || undefined, "aria-errormessage": ariaErrorMessage || undefined, "aria-invalid": invalid || undefined, "aria-label": ariaLabel, autoComplete: autoComplete, "data-main-input": true, disabled: disabled || undefined, id: id, name: name, onBlur: (event) => {
41
42
  focusTimeout.set(() => setFocused(false), 750);
42
43
  inputProps?.onBlur?.(event);
43
44
  }, onChange: (event) => {
@@ -57,4 +58,4 @@ export function TextInput({ invalid: invalidProp, onChange, size = DEFAULT.size,
57
58
  focusTimeout.clear();
58
59
  }, size: size, variant: "tertiary" }))] }));
59
60
  }
60
- //# sourceMappingURL=TextInput.js.map
61
+ //# sourceMappingURL=InputElement.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InputElement.js","sourceRoot":"","sources":["../../../src/components/Input/InputElement.tsx"],"names":[],"mappings":";AAAA,OAAO,cAAc,CAAC;AACtB,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAqC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACrF,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAE7C,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAGhD,MAAM,CAAC,MAAM,OAAO,GAAG;IACnB,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,EAAE;IACT,IAAI,EAAE,MAA4D;IAClE,YAAY,EAAE,KAAK;CACb,CAAC;AA+CX;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,UAAU,YAAY,CAAC,EACz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AAQ,QACR,KAAK,EAAC,OAAO,EACb,OAAO,EAAE,GAAG,EAAE;oBACV,QAAQ,CAAC,EAAE,CAAC,CAAC;oBACb,gBAAgB,CAAC,OAAO,EAAE,KAAK,EAAE,CAAC;gBACtC,CAAC,EACD,OAAO,EAAE,GAAG,EAAE;oBACV,YAAY,CAAC,KAAK,EAAE,CAAC;gBACzB,CAAC,EACD,IAAI,EAAE,IAAI,EACV,OAAO,EAAC,UAAU,GACpB,CACL,IACC,CACT,CAAC;AACN,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { InputProps } from '.';
2
+ import { ComponentExample } from '-/utils/demo';
3
+ type InputExampleProps = InputProps & {
4
+ label: string;
5
+ description?: string;
6
+ };
7
+ export declare const InputExample: ComponentExample<InputExampleProps>;
8
+ export {};
@@ -1,38 +1,49 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- export const TextInputExample = {
2
+ export const InputExample = {
3
+ defaultState: {
4
+ label: 'Property Description',
5
+ description: 'This is a description of the property.',
6
+ placeholder: 'Waterfront condo with great views',
7
+ },
3
8
  render: ({ props, Component }) => _jsx(Component, { ...props }),
4
9
  presets: [
5
10
  {
6
11
  label: 'Currency',
7
12
  propState: {
13
+ value: '',
8
14
  type: 'number',
9
15
  leading: '$',
10
16
  trailing: undefined,
11
- placeholder: 'currency',
17
+ placeholder: '0.00',
12
18
  name: 'currency',
13
- 'aria-label': 'Currency input',
19
+ label: 'Balance',
20
+ description: 'Enter the current balance',
14
21
  },
15
22
  },
16
23
  {
17
24
  label: 'Percent',
18
25
  propState: {
26
+ value: '',
19
27
  type: 'number',
20
28
  leading: undefined,
21
29
  trailing: '%',
22
- placeholder: 'percent',
30
+ placeholder: '0',
23
31
  name: 'percent',
24
- 'aria-label': 'Percent input',
32
+ label: 'Growth Rate',
33
+ description: 'Enter the expected growth rate',
25
34
  },
26
35
  },
27
36
  {
28
37
  label: 'Dimension',
29
38
  propState: {
39
+ value: '',
30
40
  type: 'number',
31
41
  leading: undefined,
32
- placeholder: 'dimensions',
33
- trailing: 'ft',
42
+ placeholder: '0',
43
+ trailing: 'Acre(s)',
34
44
  name: 'dimension',
35
- 'aria-label': 'Dimension input',
45
+ label: 'Land Size',
46
+ description: 'Enter the size of the land',
36
47
  },
37
48
  },
38
49
  ],
@@ -40,4 +51,4 @@ export const TextInputExample = {
40
51
  type: false,
41
52
  },
42
53
  };
43
- //# sourceMappingURL=TextInputExample.js.map
54
+ //# sourceMappingURL=InputExample.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InputExample.js","sourceRoot":"","sources":["../../../src/components/Input/InputExample.tsx"],"names":[],"mappings":";AAKA,MAAM,CAAC,MAAM,YAAY,GAAwC;IAC7D,YAAY,EAAE;QACV,KAAK,EAAE,sBAAsB;QAC7B,WAAW,EAAE,wCAAwC;QACrD,WAAW,EAAE,mCAAmC;KACnD;IACD,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC,KAAC,SAAS,OAAK,KAAK,GAAI;IAC1D,OAAO,EAAE;QACL;YACI,KAAK,EAAE,UAAU;YACjB,SAAS,EAAE;gBACP,KAAK,EAAE,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,GAAG;gBACZ,QAAQ,EAAE,SAAS;gBACnB,WAAW,EAAE,MAAM;gBACnB,IAAI,EAAE,UAAU;gBAChB,KAAK,EAAE,SAAS;gBAChB,WAAW,EAAE,2BAA2B;aAC3C;SACJ;QACD;YACI,KAAK,EAAE,SAAS;YAChB,SAAS,EAAE;gBACP,KAAK,EAAE,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,SAAS;gBAClB,QAAQ,EAAE,GAAG;gBACb,WAAW,EAAE,GAAG;gBAChB,IAAI,EAAE,SAAS;gBACf,KAAK,EAAE,aAAa;gBACpB,WAAW,EAAE,gCAAgC;aAChD;SACJ;QACD;YACI,KAAK,EAAE,WAAW;YAClB,SAAS,EAAE;gBACP,KAAK,EAAE,EAAE;gBACT,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,SAAS;gBAClB,WAAW,EAAE,GAAG;gBAChB,QAAQ,EAAE,SAAS;gBACnB,IAAI,EAAE,WAAW;gBACjB,KAAK,EAAE,WAAW;gBAClB,WAAW,EAAE,4BAA4B;aAC5C;SACJ;KACJ;IACD,QAAQ,EAAE;QACN,IAAI,EAAE,KAAK;KACd;CACJ,CAAC"}
@@ -0,0 +1,2 @@
1
+ export * from './Input';
2
+ export * from './InputElement';
@@ -0,0 +1,3 @@
1
+ export * from './Input';
2
+ export * from './InputElement';
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Input/index.tsx"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC"}