@pega/cosmos-react-core 5.0.0-dev.5.0 → 5.0.0-dev.6.1

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 (739) hide show
  1. package/lib/components/AIButton/AIButton.d.ts.map +1 -1
  2. package/lib/components/AIButton/AIButton.js.map +1 -1
  3. package/lib/components/Actions/Actions.d.ts +5 -2
  4. package/lib/components/Actions/Actions.d.ts.map +1 -1
  5. package/lib/components/Actions/Actions.js +3 -3
  6. package/lib/components/Actions/Actions.js.map +1 -1
  7. package/lib/components/AdditionalInfo/AdditionalInfo.d.ts +3 -3
  8. package/lib/components/AdditionalInfo/AdditionalInfo.d.ts.map +1 -1
  9. package/lib/components/AdditionalInfo/AdditionalInfo.js.map +1 -1
  10. package/lib/components/AppShell/AppHeader.d.ts +3 -3
  11. package/lib/components/AppShell/AppHeader.d.ts.map +1 -1
  12. package/lib/components/AppShell/AppHeader.js.map +1 -1
  13. package/lib/components/AppShell/AppHeader.styles.d.ts +1 -1
  14. package/lib/components/AppShell/AppHeader.styles.d.ts.map +1 -1
  15. package/lib/components/AppShell/AppHeader.styles.js.map +1 -1
  16. package/lib/components/AppShell/AppShell.d.ts +2 -2
  17. package/lib/components/AppShell/AppShell.d.ts.map +1 -1
  18. package/lib/components/AppShell/AppShell.js.map +1 -1
  19. package/lib/components/AppShell/AppShellContext.d.ts +3 -3
  20. package/lib/components/AppShell/AppShellContext.d.ts.map +1 -1
  21. package/lib/components/AppShell/AppShellContext.js.map +1 -1
  22. package/lib/components/AppShell/AppShellList.d.ts +2 -2
  23. package/lib/components/AppShell/AppShellList.d.ts.map +1 -1
  24. package/lib/components/AppShell/AppShellList.js.map +1 -1
  25. package/lib/components/AppShell/AppShellSearch.d.ts +2 -2
  26. package/lib/components/AppShell/AppShellSearch.d.ts.map +1 -1
  27. package/lib/components/AppShell/AppShellSearch.js.map +1 -1
  28. package/lib/components/AppShell/ContextSwitcher.d.ts +3 -3
  29. package/lib/components/AppShell/ContextSwitcher.d.ts.map +1 -1
  30. package/lib/components/AppShell/ContextSwitcher.js.map +1 -1
  31. package/lib/components/AppShell/Drawer.d.ts +1 -1
  32. package/lib/components/AppShell/Drawer.d.ts.map +1 -1
  33. package/lib/components/AppShell/Drawer.js.map +1 -1
  34. package/lib/components/AppShell/Drawer.styles.d.ts +1 -1
  35. package/lib/components/AppShell/Drawer.styles.d.ts.map +1 -1
  36. package/lib/components/AppShell/Drawer.styles.js.map +1 -1
  37. package/lib/components/AppShell/NavigationList.d.ts +2 -2
  38. package/lib/components/AppShell/NavigationList.d.ts.map +1 -1
  39. package/lib/components/AppShell/NavigationList.js.map +1 -1
  40. package/lib/components/AppShell/NavigationListItemWrapper.d.ts +2 -2
  41. package/lib/components/AppShell/NavigationListItemWrapper.d.ts.map +1 -1
  42. package/lib/components/AppShell/NavigationListItemWrapper.js.map +1 -1
  43. package/lib/components/AppShell/Operator.d.ts +1 -1
  44. package/lib/components/AppShell/Operator.d.ts.map +1 -1
  45. package/lib/components/AppShell/Operator.js.map +1 -1
  46. package/lib/components/AppShell/style-utils.d.ts +1 -1
  47. package/lib/components/AppShell/style-utils.d.ts.map +1 -1
  48. package/lib/components/AppShell/style-utils.js.map +1 -1
  49. package/lib/components/Avatar/Avatar.d.ts +2 -2
  50. package/lib/components/Avatar/Avatar.d.ts.map +1 -1
  51. package/lib/components/Avatar/Avatar.js.map +1 -1
  52. package/lib/components/Backdrop/Backdrop.d.ts +2 -2
  53. package/lib/components/Backdrop/Backdrop.d.ts.map +1 -1
  54. package/lib/components/Backdrop/Backdrop.js.map +1 -1
  55. package/lib/components/Badges/Alert.d.ts +1 -1
  56. package/lib/components/Badges/Alert.d.ts.map +1 -1
  57. package/lib/components/Badges/Alert.js.map +1 -1
  58. package/lib/components/Badges/Count.d.ts +1 -1
  59. package/lib/components/Badges/Count.d.ts.map +1 -1
  60. package/lib/components/Badges/Count.js.map +1 -1
  61. package/lib/components/Badges/Keyboard.d.ts +1 -1
  62. package/lib/components/Badges/Keyboard.d.ts.map +1 -1
  63. package/lib/components/Badges/Keyboard.js.map +1 -1
  64. package/lib/components/Badges/Selection.d.ts +2 -2
  65. package/lib/components/Badges/Selection.d.ts.map +1 -1
  66. package/lib/components/Badges/Selection.js.map +1 -1
  67. package/lib/components/Badges/Status.d.ts +2 -2
  68. package/lib/components/Badges/Status.d.ts.map +1 -1
  69. package/lib/components/Badges/Status.js.map +1 -1
  70. package/lib/components/Badges/Tag.d.ts +2 -2
  71. package/lib/components/Badges/Tag.d.ts.map +1 -1
  72. package/lib/components/Badges/Tag.js.map +1 -1
  73. package/lib/components/Banner/Banner.d.ts +2 -2
  74. package/lib/components/Banner/Banner.d.ts.map +1 -1
  75. package/lib/components/Banner/Banner.js.map +1 -1
  76. package/lib/components/Boolean/BooleanDisplay.d.ts +1 -1
  77. package/lib/components/Boolean/BooleanDisplay.d.ts.map +1 -1
  78. package/lib/components/Boolean/BooleanDisplay.js.map +1 -1
  79. package/lib/components/Breadcrumbs/Breadcrumbs.d.ts +4 -4
  80. package/lib/components/Breadcrumbs/Breadcrumbs.d.ts.map +1 -1
  81. package/lib/components/Breadcrumbs/Breadcrumbs.js.map +1 -1
  82. package/lib/components/Button/BareButton.d.ts +3 -3
  83. package/lib/components/Button/BareButton.d.ts.map +1 -1
  84. package/lib/components/Button/BareButton.js.map +1 -1
  85. package/lib/components/Button/BareRoleButton.d.ts +2 -2
  86. package/lib/components/Button/BareRoleButton.d.ts.map +1 -1
  87. package/lib/components/Button/BareRoleButton.js.map +1 -1
  88. package/lib/components/Button/Button.d.ts +3 -3
  89. package/lib/components/Button/Button.d.ts.map +1 -1
  90. package/lib/components/Button/Button.js.map +1 -1
  91. package/lib/components/Card/Card.d.ts +2 -2
  92. package/lib/components/Card/Card.d.ts.map +1 -1
  93. package/lib/components/Card/Card.js.map +1 -1
  94. package/lib/components/Card/CardContent.d.ts +3 -3
  95. package/lib/components/Card/CardContent.d.ts.map +1 -1
  96. package/lib/components/Card/CardContent.js.map +1 -1
  97. package/lib/components/Card/CardFooter.d.ts +3 -3
  98. package/lib/components/Card/CardFooter.d.ts.map +1 -1
  99. package/lib/components/Card/CardFooter.js.map +1 -1
  100. package/lib/components/Card/CardHeader.d.ts +2 -2
  101. package/lib/components/Card/CardHeader.d.ts.map +1 -1
  102. package/lib/components/Card/CardHeader.js.map +1 -1
  103. package/lib/components/Card/CardMedia.d.ts +2 -2
  104. package/lib/components/Card/CardMedia.d.ts.map +1 -1
  105. package/lib/components/Card/CardMedia.js.map +1 -1
  106. package/lib/components/Card/CollapsibleCard.d.ts +2 -2
  107. package/lib/components/Card/CollapsibleCard.d.ts.map +1 -1
  108. package/lib/components/Card/CollapsibleCard.js.map +1 -1
  109. package/lib/components/Checkbox/Checkbox.d.ts +4 -4
  110. package/lib/components/Checkbox/Checkbox.d.ts.map +1 -1
  111. package/lib/components/Checkbox/Checkbox.js.map +1 -1
  112. package/lib/components/ColorPicker/ColorPicker.d.ts +4 -4
  113. package/lib/components/ColorPicker/ColorPicker.d.ts.map +1 -1
  114. package/lib/components/ColorPicker/ColorPicker.js.map +1 -1
  115. package/lib/components/ComboBox/ComboBox.d.ts +1 -1
  116. package/lib/components/ComboBox/ComboBox.d.ts.map +1 -1
  117. package/lib/components/ComboBox/ComboBox.js.map +1 -1
  118. package/lib/components/ComboBox/ComboBox.types.d.ts +3 -3
  119. package/lib/components/ComboBox/ComboBox.types.d.ts.map +1 -1
  120. package/lib/components/ComboBox/ComboBox.types.js.map +1 -1
  121. package/lib/components/ComboBox/ComboBoxInput.d.ts +5 -4
  122. package/lib/components/ComboBox/ComboBoxInput.d.ts.map +1 -1
  123. package/lib/components/ComboBox/ComboBoxInput.js.map +1 -1
  124. package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.d.ts +3 -3
  125. package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.d.ts.map +1 -1
  126. package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.js +1 -0
  127. package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.js.map +1 -1
  128. package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.types.d.ts +4 -4
  129. package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.types.d.ts.map +1 -1
  130. package/lib/components/ComboBox/MultiSelectInput/MultiSelectInput.types.js.map +1 -1
  131. package/lib/components/ComboBox/SingleSelectInput/SingleSelectInput.d.ts +3 -3
  132. package/lib/components/ComboBox/SingleSelectInput/SingleSelectInput.d.ts.map +1 -1
  133. package/lib/components/ComboBox/SingleSelectInput/SingleSelectInput.js.map +1 -1
  134. package/lib/components/ComboBox/SingleSelectInput/SingleSelectInput.types.d.ts +4 -3
  135. package/lib/components/ComboBox/SingleSelectInput/SingleSelectInput.types.d.ts.map +1 -1
  136. package/lib/components/ComboBox/SingleSelectInput/SingleSelectInput.types.js.map +1 -1
  137. package/lib/components/CompositeInput/CompositeInput.d.ts +2 -2
  138. package/lib/components/CompositeInput/CompositeInput.d.ts.map +1 -1
  139. package/lib/components/CompositeInput/CompositeInput.js.map +1 -1
  140. package/lib/components/CompositeInput/CompositeInput.types.d.ts +3 -3
  141. package/lib/components/CompositeInput/CompositeInput.types.d.ts.map +1 -1
  142. package/lib/components/CompositeInput/CompositeInput.types.js.map +1 -1
  143. package/lib/components/Configuration/Configuration.d.ts +3 -3
  144. package/lib/components/Configuration/Configuration.d.ts.map +1 -1
  145. package/lib/components/Configuration/Configuration.js.map +1 -1
  146. package/lib/components/CreditCard/CreditCard.types.d.ts +3 -3
  147. package/lib/components/CreditCard/CreditCard.types.d.ts.map +1 -1
  148. package/lib/components/CreditCard/CreditCard.types.js.map +1 -1
  149. package/lib/components/CreditCard/CreditCardDisplay.d.ts +3 -3
  150. package/lib/components/CreditCard/CreditCardDisplay.d.ts.map +1 -1
  151. package/lib/components/CreditCard/CreditCardDisplay.js.map +1 -1
  152. package/lib/components/CreditCard/CreditCardInput.d.ts +3 -3
  153. package/lib/components/CreditCard/CreditCardInput.d.ts.map +1 -1
  154. package/lib/components/CreditCard/CreditCardInput.js.map +1 -1
  155. package/lib/components/Currency/CurrencyDisplay.d.ts +2 -2
  156. package/lib/components/Currency/CurrencyDisplay.d.ts.map +1 -1
  157. package/lib/components/Currency/CurrencyDisplay.js.map +1 -1
  158. package/lib/components/Currency/CurrencyInput.d.ts +3 -3
  159. package/lib/components/Currency/CurrencyInput.d.ts.map +1 -1
  160. package/lib/components/Currency/CurrencyInput.js.map +1 -1
  161. package/lib/components/Currency/CurrencyInput.types.d.ts +1 -1
  162. package/lib/components/Currency/CurrencyInput.types.d.ts.map +1 -1
  163. package/lib/components/Currency/CurrencyInput.types.js.map +1 -1
  164. package/lib/components/DangerButton/DangerButton.d.ts.map +1 -1
  165. package/lib/components/DangerButton/DangerButton.js.map +1 -1
  166. package/lib/components/DateTime/DateTime.types.d.ts +3 -3
  167. package/lib/components/DateTime/DateTime.types.d.ts.map +1 -1
  168. package/lib/components/DateTime/DateTime.types.js.map +1 -1
  169. package/lib/components/DateTime/DateTimeDisplay.d.ts +4 -4
  170. package/lib/components/DateTime/DateTimeDisplay.d.ts.map +1 -1
  171. package/lib/components/DateTime/DateTimeDisplay.js.map +1 -1
  172. package/lib/components/DateTime/DurationDisplay.d.ts +2 -2
  173. package/lib/components/DateTime/DurationDisplay.d.ts.map +1 -1
  174. package/lib/components/DateTime/DurationDisplay.js.map +1 -1
  175. package/lib/components/DateTime/Input/DateInput.d.ts +4 -4
  176. package/lib/components/DateTime/Input/DateInput.d.ts.map +1 -1
  177. package/lib/components/DateTime/Input/DateInput.js.map +1 -1
  178. package/lib/components/DateTime/Input/DateRangeInput.d.ts +4 -4
  179. package/lib/components/DateTime/Input/DateRangeInput.d.ts.map +1 -1
  180. package/lib/components/DateTime/Input/DateRangeInput.js.map +1 -1
  181. package/lib/components/DateTime/Input/DateTimeInput.d.ts +6 -6
  182. package/lib/components/DateTime/Input/DateTimeInput.d.ts.map +1 -1
  183. package/lib/components/DateTime/Input/DateTimeInput.js +1 -0
  184. package/lib/components/DateTime/Input/DateTimeInput.js.map +1 -1
  185. package/lib/components/DateTime/Input/DayOfWeekInput.d.ts +3 -3
  186. package/lib/components/DateTime/Input/DayOfWeekInput.d.ts.map +1 -1
  187. package/lib/components/DateTime/Input/DayOfWeekInput.js.map +1 -1
  188. package/lib/components/DateTime/Input/Duration/DurationInput.d.ts +3 -3
  189. package/lib/components/DateTime/Input/Duration/DurationInput.d.ts.map +1 -1
  190. package/lib/components/DateTime/Input/Duration/DurationInput.js.map +1 -1
  191. package/lib/components/DateTime/Input/Duration/DurationInput.types.d.ts +2 -2
  192. package/lib/components/DateTime/Input/Duration/DurationInput.types.d.ts.map +1 -1
  193. package/lib/components/DateTime/Input/Duration/DurationInput.types.js.map +1 -1
  194. package/lib/components/DateTime/Input/Duration/NumberUnit.d.ts +3 -3
  195. package/lib/components/DateTime/Input/Duration/NumberUnit.d.ts.map +1 -1
  196. package/lib/components/DateTime/Input/Duration/NumberUnit.js.map +1 -1
  197. package/lib/components/DateTime/Input/Duration/Time.d.ts +3 -3
  198. package/lib/components/DateTime/Input/Duration/Time.d.ts.map +1 -1
  199. package/lib/components/DateTime/Input/Duration/Time.js.map +1 -1
  200. package/lib/components/DateTime/Input/MonthInput.d.ts +4 -4
  201. package/lib/components/DateTime/Input/MonthInput.d.ts.map +1 -1
  202. package/lib/components/DateTime/Input/MonthInput.js.map +1 -1
  203. package/lib/components/DateTime/Input/PartInput.d.ts +3 -3
  204. package/lib/components/DateTime/Input/PartInput.d.ts.map +1 -1
  205. package/lib/components/DateTime/Input/PartInput.js.map +1 -1
  206. package/lib/components/DateTime/Input/QuarterInput.d.ts +4 -4
  207. package/lib/components/DateTime/Input/QuarterInput.d.ts.map +1 -1
  208. package/lib/components/DateTime/Input/QuarterInput.js.map +1 -1
  209. package/lib/components/DateTime/Input/TimeInput.d.ts +5 -5
  210. package/lib/components/DateTime/Input/TimeInput.d.ts.map +1 -1
  211. package/lib/components/DateTime/Input/TimeInput.js.map +1 -1
  212. package/lib/components/DateTime/Input/TimeRangeInput.d.ts +7 -6
  213. package/lib/components/DateTime/Input/TimeRangeInput.d.ts.map +1 -1
  214. package/lib/components/DateTime/Input/TimeRangeInput.js.map +1 -1
  215. package/lib/components/DateTime/Input/WeekInput.d.ts +4 -4
  216. package/lib/components/DateTime/Input/WeekInput.d.ts.map +1 -1
  217. package/lib/components/DateTime/Input/WeekInput.js.map +1 -1
  218. package/lib/components/DateTime/Input/useAutoFocusNextInput.d.ts +1 -1
  219. package/lib/components/DateTime/Input/useAutoFocusNextInput.d.ts.map +1 -1
  220. package/lib/components/DateTime/Input/useAutoFocusNextInput.js.map +1 -1
  221. package/lib/components/DateTime/Input/usePickerButton.d.ts +1 -1
  222. package/lib/components/DateTime/Input/usePickerButton.d.ts.map +1 -1
  223. package/lib/components/DateTime/Input/usePickerButton.js.map +1 -1
  224. package/lib/components/DateTime/Input/utils.d.ts +1 -1
  225. package/lib/components/DateTime/Input/utils.d.ts.map +1 -1
  226. package/lib/components/DateTime/Input/utils.js.map +1 -1
  227. package/lib/components/DateTime/Picker/Calendar.d.ts +3 -3
  228. package/lib/components/DateTime/Picker/Calendar.d.ts.map +1 -1
  229. package/lib/components/DateTime/Picker/Calendar.js.map +1 -1
  230. package/lib/components/DateTime/Picker/DatePicker.d.ts +2 -2
  231. package/lib/components/DateTime/Picker/DatePicker.d.ts.map +1 -1
  232. package/lib/components/DateTime/Picker/DatePicker.js.map +1 -1
  233. package/lib/components/DateTime/Picker/DatePicker.types.d.ts +2 -2
  234. package/lib/components/DateTime/Picker/DatePicker.types.d.ts.map +1 -1
  235. package/lib/components/DateTime/Picker/DatePicker.types.js.map +1 -1
  236. package/lib/components/DateTime/Picker/DateRangePicker.d.ts +2 -2
  237. package/lib/components/DateTime/Picker/DateRangePicker.d.ts.map +1 -1
  238. package/lib/components/DateTime/Picker/DateRangePicker.js.map +1 -1
  239. package/lib/components/DateTime/Picker/TimePicker.d.ts +3 -3
  240. package/lib/components/DateTime/Picker/TimePicker.d.ts.map +1 -1
  241. package/lib/components/DateTime/Picker/TimePicker.js.map +1 -1
  242. package/lib/components/DateTime/Picker/Weeks.d.ts +3 -3
  243. package/lib/components/DateTime/Picker/Weeks.d.ts.map +1 -1
  244. package/lib/components/DateTime/Picker/Weeks.js.map +1 -1
  245. package/lib/components/DateTime/utils.d.ts +4 -4
  246. package/lib/components/DateTime/utils.d.ts.map +1 -1
  247. package/lib/components/DateTime/utils.js.map +1 -1
  248. package/lib/components/Dialog/Dialog.d.ts +2 -2
  249. package/lib/components/Dialog/Dialog.d.ts.map +1 -1
  250. package/lib/components/Dialog/Dialog.js.map +1 -1
  251. package/lib/components/Dialog/Dialog.types.d.ts +4 -4
  252. package/lib/components/Dialog/Dialog.types.d.ts.map +1 -1
  253. package/lib/components/Dialog/Dialog.types.js.map +1 -1
  254. package/lib/components/Dialog/FormDialog.d.ts +3 -3
  255. package/lib/components/Dialog/FormDialog.d.ts.map +1 -1
  256. package/lib/components/Dialog/FormDialog.js.map +1 -1
  257. package/lib/components/Dialog/InfoDialog.d.ts +2 -2
  258. package/lib/components/Dialog/InfoDialog.d.ts.map +1 -1
  259. package/lib/components/Dialog/InfoDialog.js.map +1 -1
  260. package/lib/components/Drawer/Drawer.d.ts +2 -2
  261. package/lib/components/Drawer/Drawer.d.ts.map +1 -1
  262. package/lib/components/Drawer/Drawer.js.map +1 -1
  263. package/lib/components/Email/EmailDisplay.d.ts +2 -2
  264. package/lib/components/Email/EmailDisplay.d.ts.map +1 -1
  265. package/lib/components/Email/EmailDisplay.js.map +1 -1
  266. package/lib/components/EmojiPicker/EmojiDisplay.d.ts +2 -2
  267. package/lib/components/EmojiPicker/EmojiDisplay.d.ts.map +1 -1
  268. package/lib/components/EmojiPicker/EmojiDisplay.js.map +1 -1
  269. package/lib/components/EmojiPicker/EmojiPicker.d.ts +4 -4
  270. package/lib/components/EmojiPicker/EmojiPicker.d.ts.map +1 -1
  271. package/lib/components/EmojiPicker/EmojiPicker.js +28 -21
  272. package/lib/components/EmojiPicker/EmojiPicker.js.map +1 -1
  273. package/lib/components/EmptyState/EmptyState.d.ts +2 -2
  274. package/lib/components/EmptyState/EmptyState.d.ts.map +1 -1
  275. package/lib/components/EmptyState/EmptyState.js.map +1 -1
  276. package/lib/components/ErrorState/ErrorState.d.ts +2 -2
  277. package/lib/components/ErrorState/ErrorState.d.ts.map +1 -1
  278. package/lib/components/ErrorState/ErrorState.js.map +1 -1
  279. package/lib/components/ExpandCollapse/ExpandCollapse.d.ts +2 -2
  280. package/lib/components/ExpandCollapse/ExpandCollapse.d.ts.map +1 -1
  281. package/lib/components/ExpandCollapse/ExpandCollapse.js.map +1 -1
  282. package/lib/components/FieldGroup/FieldGroup.d.ts +4 -4
  283. package/lib/components/FieldGroup/FieldGroup.d.ts.map +1 -1
  284. package/lib/components/FieldGroup/FieldGroup.js.map +1 -1
  285. package/lib/components/FieldGroup/FieldGroupList.d.ts +3 -3
  286. package/lib/components/FieldGroup/FieldGroupList.d.ts.map +1 -1
  287. package/lib/components/FieldGroup/FieldGroupList.js.map +1 -1
  288. package/lib/components/FieldValueList/FieldValueList.d.ts +2 -2
  289. package/lib/components/FieldValueList/FieldValueList.d.ts.map +1 -1
  290. package/lib/components/FieldValueList/FieldValueList.js.map +1 -1
  291. package/lib/components/File/FileDisplay.d.ts +3 -3
  292. package/lib/components/File/FileDisplay.d.ts.map +1 -1
  293. package/lib/components/File/FileDisplay.js.map +1 -1
  294. package/lib/components/File/FileInput.d.ts +4 -4
  295. package/lib/components/File/FileInput.d.ts.map +1 -1
  296. package/lib/components/File/FileInput.js +1 -1
  297. package/lib/components/File/FileInput.js.map +1 -1
  298. package/lib/components/File/FileItem.d.ts +3 -3
  299. package/lib/components/File/FileItem.d.ts.map +1 -1
  300. package/lib/components/File/FileItem.js +3 -2
  301. package/lib/components/File/FileItem.js.map +1 -1
  302. package/lib/components/File/FileUploadItem.d.ts +4 -2
  303. package/lib/components/File/FileUploadItem.d.ts.map +1 -1
  304. package/lib/components/File/FileUploadItem.js +15 -6
  305. package/lib/components/File/FileUploadItem.js.map +1 -1
  306. package/lib/components/File/FileVisual.d.ts +4 -4
  307. package/lib/components/File/FileVisual.d.ts.map +1 -1
  308. package/lib/components/File/FileVisual.js.map +1 -1
  309. package/lib/components/Flex/Flex.d.ts +2 -2
  310. package/lib/components/Flex/Flex.d.ts.map +1 -1
  311. package/lib/components/Flex/Flex.js.map +1 -1
  312. package/lib/components/Form/Form.d.ts +3 -3
  313. package/lib/components/Form/Form.d.ts.map +1 -1
  314. package/lib/components/Form/Form.js.map +1 -1
  315. package/lib/components/FormControl/FormControl.d.ts +3 -3
  316. package/lib/components/FormControl/FormControl.d.ts.map +1 -1
  317. package/lib/components/FormControl/FormControl.js.map +1 -1
  318. package/lib/components/FormField/FormField.d.ts +6 -6
  319. package/lib/components/FormField/FormField.d.ts.map +1 -1
  320. package/lib/components/FormField/FormField.js.map +1 -1
  321. package/lib/components/Grid/Grid.d.ts +3 -3
  322. package/lib/components/Grid/Grid.d.ts.map +1 -1
  323. package/lib/components/Grid/Grid.js.map +1 -1
  324. package/lib/components/Grid/Grid.types.d.ts +3 -3
  325. package/lib/components/Grid/Grid.types.d.ts.map +1 -1
  326. package/lib/components/Grid/Grid.types.js.map +1 -1
  327. package/lib/components/HTML/HTML.d.ts +3 -3
  328. package/lib/components/HTML/HTML.d.ts.map +1 -1
  329. package/lib/components/HTML/HTML.js.map +1 -1
  330. package/lib/components/Icon/Icon.d.ts +2 -2
  331. package/lib/components/Icon/Icon.d.ts.map +1 -1
  332. package/lib/components/Icon/Icon.js +10 -2
  333. package/lib/components/Icon/Icon.js.map +1 -1
  334. package/lib/components/IconPicker/IconPicker.d.ts +4 -4
  335. package/lib/components/IconPicker/IconPicker.d.ts.map +1 -1
  336. package/lib/components/IconPicker/IconPicker.js.map +1 -1
  337. package/lib/components/Image/Image.d.ts +2 -2
  338. package/lib/components/Image/Image.d.ts.map +1 -1
  339. package/lib/components/Image/Image.js.map +1 -1
  340. package/lib/components/Input/Input.d.ts +3 -3
  341. package/lib/components/Input/Input.d.ts.map +1 -1
  342. package/lib/components/Input/Input.js.map +1 -1
  343. package/lib/components/Label/Label.d.ts +2 -2
  344. package/lib/components/Label/Label.d.ts.map +1 -1
  345. package/lib/components/Label/Label.js.map +1 -1
  346. package/lib/components/Lightbox/Lightbox.d.ts +3 -3
  347. package/lib/components/Lightbox/Lightbox.d.ts.map +1 -1
  348. package/lib/components/Lightbox/Lightbox.js.map +1 -1
  349. package/lib/components/Lightbox/Lightbox.types.d.ts +4 -4
  350. package/lib/components/Lightbox/Lightbox.types.d.ts.map +1 -1
  351. package/lib/components/Lightbox/Lightbox.types.js.map +1 -1
  352. package/lib/components/Link/Link.d.ts +3 -3
  353. package/lib/components/Link/Link.d.ts.map +1 -1
  354. package/lib/components/Link/Link.js.map +1 -1
  355. package/lib/components/List/CommaSeparatedList.d.ts +2 -2
  356. package/lib/components/List/CommaSeparatedList.d.ts.map +1 -1
  357. package/lib/components/List/CommaSeparatedList.js.map +1 -1
  358. package/lib/components/List/List.d.ts +2 -2
  359. package/lib/components/List/List.d.ts.map +1 -1
  360. package/lib/components/List/List.js.map +1 -1
  361. package/lib/components/List/OrderedList.d.ts +3 -3
  362. package/lib/components/List/OrderedList.d.ts.map +1 -1
  363. package/lib/components/List/OrderedList.js.map +1 -1
  364. package/lib/components/List/UnorderedList.d.ts +3 -3
  365. package/lib/components/List/UnorderedList.d.ts.map +1 -1
  366. package/lib/components/List/UnorderedList.js.map +1 -1
  367. package/lib/components/ListToolbar/ListToolbar.d.ts +1 -1
  368. package/lib/components/ListToolbar/ListToolbar.d.ts.map +1 -1
  369. package/lib/components/ListToolbar/ListToolbar.js.map +1 -1
  370. package/lib/components/ListToolbar/ListToolbar.styles.d.ts.map +1 -1
  371. package/lib/components/ListToolbar/ListToolbar.styles.js.map +1 -1
  372. package/lib/components/ListToolbar/ListToolbar.types.d.ts +6 -6
  373. package/lib/components/ListToolbar/ListToolbar.types.d.ts.map +1 -1
  374. package/lib/components/ListToolbar/ListToolbar.types.js.map +1 -1
  375. package/lib/components/ListToolbar/PresetMenuPopover.d.ts +1 -1
  376. package/lib/components/ListToolbar/PresetMenuPopover.d.ts.map +1 -1
  377. package/lib/components/ListToolbar/PresetMenuPopover.js.map +1 -1
  378. package/lib/components/ListToolbar/helpers.d.ts +1 -1
  379. package/lib/components/ListToolbar/helpers.d.ts.map +1 -1
  380. package/lib/components/ListToolbar/helpers.js.map +1 -1
  381. package/lib/components/LiveLog/LiveLog.d.ts +1 -1
  382. package/lib/components/LiveLog/LiveLog.d.ts.map +1 -1
  383. package/lib/components/LiveLog/LiveLog.js.map +1 -1
  384. package/lib/components/LiveLog/LiveLog.types.d.ts +1 -1
  385. package/lib/components/LiveLog/LiveLog.types.d.ts.map +1 -1
  386. package/lib/components/LiveLog/LiveLog.types.js.map +1 -1
  387. package/lib/components/Location/CurrentLocationButton.d.ts +1 -1
  388. package/lib/components/Location/CurrentLocationButton.d.ts.map +1 -1
  389. package/lib/components/Location/CurrentLocationButton.js.map +1 -1
  390. package/lib/components/Location/Location.types.d.ts +2 -2
  391. package/lib/components/Location/Location.types.d.ts.map +1 -1
  392. package/lib/components/Location/Location.types.js.map +1 -1
  393. package/lib/components/Location/LocationDisplay.d.ts +3 -3
  394. package/lib/components/Location/LocationDisplay.d.ts.map +1 -1
  395. package/lib/components/Location/LocationDisplay.js.map +1 -1
  396. package/lib/components/Location/LocationInput.d.ts +6 -6
  397. package/lib/components/Location/LocationInput.d.ts.map +1 -1
  398. package/lib/components/Location/LocationInput.js.map +1 -1
  399. package/lib/components/Location/LocationView.d.ts +4 -4
  400. package/lib/components/Location/LocationView.d.ts.map +1 -1
  401. package/lib/components/Location/LocationView.js.map +1 -1
  402. package/lib/components/Location/utils.d.ts +1 -1
  403. package/lib/components/Location/utils.d.ts.map +1 -1
  404. package/lib/components/Location/utils.js.map +1 -1
  405. package/lib/components/Mark/Mark.d.ts +2 -2
  406. package/lib/components/Mark/Mark.d.ts.map +1 -1
  407. package/lib/components/Mark/Mark.js.map +1 -1
  408. package/lib/components/Menu/FlyoutMenuList.d.ts +3 -3
  409. package/lib/components/Menu/FlyoutMenuList.d.ts.map +1 -1
  410. package/lib/components/Menu/FlyoutMenuList.js.map +1 -1
  411. package/lib/components/Menu/Menu.context.d.ts +1 -1
  412. package/lib/components/Menu/Menu.context.d.ts.map +1 -1
  413. package/lib/components/Menu/Menu.context.js.map +1 -1
  414. package/lib/components/Menu/Menu.d.ts +3 -3
  415. package/lib/components/Menu/Menu.d.ts.map +1 -1
  416. package/lib/components/Menu/Menu.js.map +1 -1
  417. package/lib/components/Menu/Menu.styles.d.ts +1 -1
  418. package/lib/components/Menu/Menu.styles.d.ts.map +1 -1
  419. package/lib/components/Menu/Menu.styles.js.map +1 -1
  420. package/lib/components/Menu/Menu.types.d.ts +3 -3
  421. package/lib/components/Menu/Menu.types.d.ts.map +1 -1
  422. package/lib/components/Menu/Menu.types.js.map +1 -1
  423. package/lib/components/Menu/MenuGroup.d.ts +1 -1
  424. package/lib/components/Menu/MenuGroup.d.ts.map +1 -1
  425. package/lib/components/Menu/MenuGroup.js.map +1 -1
  426. package/lib/components/Menu/MenuItem.d.ts +3 -3
  427. package/lib/components/Menu/MenuItem.d.ts.map +1 -1
  428. package/lib/components/Menu/MenuItem.js.map +1 -1
  429. package/lib/components/Menu/MenuList.d.ts +2 -2
  430. package/lib/components/Menu/MenuList.d.ts.map +1 -1
  431. package/lib/components/Menu/MenuList.js.map +1 -1
  432. package/lib/components/Menu/MenuListHeader.d.ts +3 -3
  433. package/lib/components/Menu/MenuListHeader.d.ts.map +1 -1
  434. package/lib/components/Menu/MenuListHeader.js.map +1 -1
  435. package/lib/components/Menu/helpers.d.ts +1 -1
  436. package/lib/components/Menu/helpers.d.ts.map +1 -1
  437. package/lib/components/Menu/helpers.js.map +1 -1
  438. package/lib/components/MenuButton/MenuButton.d.ts +3 -3
  439. package/lib/components/MenuButton/MenuButton.d.ts.map +1 -1
  440. package/lib/components/MenuButton/MenuButton.js.map +1 -1
  441. package/lib/components/MetaList/MetaList.d.ts +2 -2
  442. package/lib/components/MetaList/MetaList.d.ts.map +1 -1
  443. package/lib/components/MetaList/MetaList.js.map +1 -1
  444. package/lib/components/Modal/Contexts.d.ts +1 -1
  445. package/lib/components/Modal/Contexts.d.ts.map +1 -1
  446. package/lib/components/Modal/Contexts.js.map +1 -1
  447. package/lib/components/Modal/DockedModals.d.ts +2 -2
  448. package/lib/components/Modal/DockedModals.d.ts.map +1 -1
  449. package/lib/components/Modal/DockedModals.js.map +1 -1
  450. package/lib/components/Modal/MinimizedModal.d.ts +3 -3
  451. package/lib/components/Modal/MinimizedModal.d.ts.map +1 -1
  452. package/lib/components/Modal/MinimizedModal.js.map +1 -1
  453. package/lib/components/Modal/Modal.d.ts +2 -2
  454. package/lib/components/Modal/Modal.d.ts.map +1 -1
  455. package/lib/components/Modal/Modal.js.map +1 -1
  456. package/lib/components/Modal/Modal.styles.d.ts +1 -1
  457. package/lib/components/Modal/Modal.styles.d.ts.map +1 -1
  458. package/lib/components/Modal/Modal.styles.js.map +1 -1
  459. package/lib/components/Modal/ModalManager.d.ts +2 -2
  460. package/lib/components/Modal/ModalManager.d.ts.map +1 -1
  461. package/lib/components/Modal/ModalManager.js.map +1 -1
  462. package/lib/components/MultiStepForm/FormProgress.styles.d.ts +1 -1
  463. package/lib/components/MultiStepForm/FormProgress.styles.d.ts.map +1 -1
  464. package/lib/components/MultiStepForm/FormProgress.styles.js.map +1 -1
  465. package/lib/components/MultiStepForm/HorizontalFormProgress.d.ts +2 -2
  466. package/lib/components/MultiStepForm/HorizontalFormProgress.d.ts.map +1 -1
  467. package/lib/components/MultiStepForm/HorizontalFormProgress.js.map +1 -1
  468. package/lib/components/MultiStepForm/MultiStepForm.d.ts +3 -3
  469. package/lib/components/MultiStepForm/MultiStepForm.d.ts.map +1 -1
  470. package/lib/components/MultiStepForm/MultiStepForm.js.map +1 -1
  471. package/lib/components/MultiStepForm/MultiStepForm.types.d.ts +3 -3
  472. package/lib/components/MultiStepForm/MultiStepForm.types.d.ts.map +1 -1
  473. package/lib/components/MultiStepForm/MultiStepForm.types.js.map +1 -1
  474. package/lib/components/MultiStepForm/VerticalFormProgress.d.ts +2 -2
  475. package/lib/components/MultiStepForm/VerticalFormProgress.d.ts.map +1 -1
  476. package/lib/components/MultiStepForm/VerticalFormProgress.js.map +1 -1
  477. package/lib/components/Number/NumberDisplay.d.ts +1 -1
  478. package/lib/components/Number/NumberDisplay.d.ts.map +1 -1
  479. package/lib/components/Number/NumberDisplay.js.map +1 -1
  480. package/lib/components/Number/NumberInput.d.ts +3 -3
  481. package/lib/components/Number/NumberInput.d.ts.map +1 -1
  482. package/lib/components/Number/NumberInput.js.map +1 -1
  483. package/lib/components/Number/NumberInput.types.d.ts +3 -3
  484. package/lib/components/Number/NumberInput.types.d.ts.map +1 -1
  485. package/lib/components/Number/NumberInput.types.js.map +1 -1
  486. package/lib/components/Number/NumberRangeInput.d.ts +1 -1
  487. package/lib/components/Number/NumberRangeInput.d.ts.map +1 -1
  488. package/lib/components/Number/NumberRangeInput.js.map +1 -1
  489. package/lib/components/PageTemplates/CategorySubPage.d.ts +3 -3
  490. package/lib/components/PageTemplates/CategorySubPage.d.ts.map +1 -1
  491. package/lib/components/PageTemplates/CategorySubPage.js.map +1 -1
  492. package/lib/components/PageTemplates/CategorySubPage.styles.d.ts.map +1 -1
  493. package/lib/components/PageTemplates/CategorySubPage.styles.js.map +1 -1
  494. package/lib/components/PageTemplates/DashboardPage.d.ts +3 -3
  495. package/lib/components/PageTemplates/DashboardPage.d.ts.map +1 -1
  496. package/lib/components/PageTemplates/DashboardPage.js.map +1 -1
  497. package/lib/components/PageTemplates/PageTemplates.d.ts +5 -4
  498. package/lib/components/PageTemplates/PageTemplates.d.ts.map +1 -1
  499. package/lib/components/PageTemplates/PageTemplates.js.map +1 -1
  500. package/lib/components/Pagination/Pagination.d.ts +1 -1
  501. package/lib/components/Pagination/Pagination.d.ts.map +1 -1
  502. package/lib/components/Pagination/Pagination.js.map +1 -1
  503. package/lib/components/Paragraph/ParagraphDisplay.d.ts +2 -2
  504. package/lib/components/Paragraph/ParagraphDisplay.d.ts.map +1 -1
  505. package/lib/components/Paragraph/ParagraphDisplay.js.map +1 -1
  506. package/lib/components/Phone/PhoneDisplay.d.ts +1 -1
  507. package/lib/components/Phone/PhoneDisplay.d.ts.map +1 -1
  508. package/lib/components/Phone/PhoneDisplay.js.map +1 -1
  509. package/lib/components/Phone/PhoneInput.d.ts +3 -3
  510. package/lib/components/Phone/PhoneInput.d.ts.map +1 -1
  511. package/lib/components/Phone/PhoneInput.js.map +1 -1
  512. package/lib/components/Popover/Popover.d.ts +5 -5
  513. package/lib/components/Popover/Popover.d.ts.map +1 -1
  514. package/lib/components/Popover/Popover.js.map +1 -1
  515. package/lib/components/Popover/PopoverManager.d.ts +1 -1
  516. package/lib/components/Popover/PopoverManager.d.ts.map +1 -1
  517. package/lib/components/Popover/PopoverManager.js.map +1 -1
  518. package/lib/components/Popover/modifiers.d.ts +1 -1
  519. package/lib/components/Popover/modifiers.d.ts.map +1 -1
  520. package/lib/components/Popover/modifiers.js.map +1 -1
  521. package/lib/components/Progress/Bar.d.ts +3 -3
  522. package/lib/components/Progress/Bar.d.ts.map +1 -1
  523. package/lib/components/Progress/Bar.js.map +1 -1
  524. package/lib/components/Progress/Ellipsis.d.ts +3 -3
  525. package/lib/components/Progress/Ellipsis.d.ts.map +1 -1
  526. package/lib/components/Progress/Ellipsis.js.map +1 -1
  527. package/lib/components/Progress/Progress.d.ts +3 -3
  528. package/lib/components/Progress/Progress.d.ts.map +1 -1
  529. package/lib/components/Progress/Progress.js.map +1 -1
  530. package/lib/components/Progress/Progress.styles.d.ts +1 -1
  531. package/lib/components/Progress/Progress.styles.d.ts.map +1 -1
  532. package/lib/components/Progress/Progress.styles.js.map +1 -1
  533. package/lib/components/Progress/Progress.types.d.ts +3 -3
  534. package/lib/components/Progress/Progress.types.d.ts.map +1 -1
  535. package/lib/components/Progress/Progress.types.js.map +1 -1
  536. package/lib/components/Progress/Ring.d.ts +3 -3
  537. package/lib/components/Progress/Ring.d.ts.map +1 -1
  538. package/lib/components/Progress/Ring.js.map +1 -1
  539. package/lib/components/QRCode/QRCode.d.ts +2 -2
  540. package/lib/components/QRCode/QRCode.d.ts.map +1 -1
  541. package/lib/components/QRCode/QRCode.js.map +1 -1
  542. package/lib/components/RadioButton/RadioButton.d.ts +3 -3
  543. package/lib/components/RadioButton/RadioButton.d.ts.map +1 -1
  544. package/lib/components/RadioButton/RadioButton.js.map +1 -1
  545. package/lib/components/RadioCheck/RadioCheck.d.ts +3 -3
  546. package/lib/components/RadioCheck/RadioCheck.d.ts.map +1 -1
  547. package/lib/components/RadioCheck/RadioCheck.js.map +1 -1
  548. package/lib/components/RadioCheckGroup/RadioCheckGroup.d.ts +5 -5
  549. package/lib/components/RadioCheckGroup/RadioCheckGroup.d.ts.map +1 -1
  550. package/lib/components/RadioCheckGroup/RadioCheckGroup.js.map +1 -1
  551. package/lib/components/Rating/Rating.d.ts +1 -1
  552. package/lib/components/Rating/Rating.d.ts.map +1 -1
  553. package/lib/components/Rating/Rating.js.map +1 -1
  554. package/lib/components/SearchInput/SearchInput.d.ts +3 -3
  555. package/lib/components/SearchInput/SearchInput.d.ts.map +1 -1
  556. package/lib/components/SearchInput/SearchInput.js.map +1 -1
  557. package/lib/components/Select/Option.d.ts +2 -2
  558. package/lib/components/Select/Option.d.ts.map +1 -1
  559. package/lib/components/Select/Option.js.map +1 -1
  560. package/lib/components/Select/Select.d.ts +3 -3
  561. package/lib/components/Select/Select.d.ts.map +1 -1
  562. package/lib/components/Select/Select.js.map +1 -1
  563. package/lib/components/Sentiment/Sentiment.d.ts +2 -2
  564. package/lib/components/Sentiment/Sentiment.d.ts.map +1 -1
  565. package/lib/components/Sentiment/Sentiment.js.map +1 -1
  566. package/lib/components/ShortcutManager/ShortcutManager.d.ts +1 -1
  567. package/lib/components/ShortcutManager/ShortcutManager.d.ts.map +1 -1
  568. package/lib/components/ShortcutManager/ShortcutManager.js.map +1 -1
  569. package/lib/components/ShortcutManager/ShortcutManager.types.d.ts +1 -1
  570. package/lib/components/ShortcutManager/ShortcutManager.types.d.ts.map +1 -1
  571. package/lib/components/ShortcutManager/ShortcutManager.types.js.map +1 -1
  572. package/lib/components/ShowMoreLess/ShowMoreLess.d.ts +1 -1
  573. package/lib/components/ShowMoreLess/ShowMoreLess.d.ts.map +1 -1
  574. package/lib/components/ShowMoreLess/ShowMoreLess.js.map +1 -1
  575. package/lib/components/Skeleton/LineSkeleton.d.ts +2 -2
  576. package/lib/components/Skeleton/LineSkeleton.d.ts.map +1 -1
  577. package/lib/components/Skeleton/LineSkeleton.js.map +1 -1
  578. package/lib/components/Skeleton/ParagraphSkeleton.d.ts +2 -2
  579. package/lib/components/Skeleton/ParagraphSkeleton.d.ts.map +1 -1
  580. package/lib/components/Skeleton/ParagraphSkeleton.js.map +1 -1
  581. package/lib/components/Skeleton/RectangleSkeleton.d.ts +2 -2
  582. package/lib/components/Skeleton/RectangleSkeleton.d.ts.map +1 -1
  583. package/lib/components/Skeleton/RectangleSkeleton.js.map +1 -1
  584. package/lib/components/SkipLinks/SkipLinks.d.ts +1 -1
  585. package/lib/components/SkipLinks/SkipLinks.d.ts.map +1 -1
  586. package/lib/components/SkipLinks/SkipLinks.js.map +1 -1
  587. package/lib/components/Slider/Slider.d.ts +3 -3
  588. package/lib/components/Slider/Slider.d.ts.map +1 -1
  589. package/lib/components/Slider/Slider.js.map +1 -1
  590. package/lib/components/Slider/Slider.styles.d.ts +3 -3
  591. package/lib/components/Slider/Slider.styles.d.ts.map +1 -1
  592. package/lib/components/Slider/Slider.styles.js.map +1 -1
  593. package/lib/components/Slider/Slider.types.d.ts +2 -2
  594. package/lib/components/Slider/Slider.types.d.ts.map +1 -1
  595. package/lib/components/Slider/Slider.types.js.map +1 -1
  596. package/lib/components/Slider/SliderTicks.d.ts +2 -2
  597. package/lib/components/Slider/SliderTicks.d.ts.map +1 -1
  598. package/lib/components/Slider/SliderTicks.js.map +1 -1
  599. package/lib/components/Slider/utils.d.ts +2 -1
  600. package/lib/components/Slider/utils.d.ts.map +1 -1
  601. package/lib/components/Slider/utils.js.map +1 -1
  602. package/lib/components/SummaryItem/SummaryItem.d.ts +3 -3
  603. package/lib/components/SummaryItem/SummaryItem.d.ts.map +1 -1
  604. package/lib/components/SummaryItem/SummaryItem.js.map +1 -1
  605. package/lib/components/SummaryList/SummaryList.d.ts +6 -5
  606. package/lib/components/SummaryList/SummaryList.d.ts.map +1 -1
  607. package/lib/components/SummaryList/SummaryList.js.map +1 -1
  608. package/lib/components/SummaryList/ViewAll.d.ts +3 -3
  609. package/lib/components/SummaryList/ViewAll.d.ts.map +1 -1
  610. package/lib/components/SummaryList/ViewAll.js.map +1 -1
  611. package/lib/components/Switch/Switch.d.ts +2 -2
  612. package/lib/components/Switch/Switch.d.ts.map +1 -1
  613. package/lib/components/Switch/Switch.js.map +1 -1
  614. package/lib/components/Table/Table.d.ts +1 -1
  615. package/lib/components/Table/Table.d.ts.map +1 -1
  616. package/lib/components/Table/Table.js.map +1 -1
  617. package/lib/components/Tabs/Tab.d.ts +3 -3
  618. package/lib/components/Tabs/Tab.d.ts.map +1 -1
  619. package/lib/components/Tabs/Tab.js.map +1 -1
  620. package/lib/components/Tabs/TabPanel.d.ts +2 -2
  621. package/lib/components/Tabs/TabPanel.d.ts.map +1 -1
  622. package/lib/components/Tabs/TabPanel.js.map +1 -1
  623. package/lib/components/Tabs/Tabs.d.ts +3 -3
  624. package/lib/components/Tabs/Tabs.d.ts.map +1 -1
  625. package/lib/components/Tabs/Tabs.js.map +1 -1
  626. package/lib/components/Tabs/Tabs.types.d.ts +1 -1
  627. package/lib/components/Tabs/Tabs.types.d.ts.map +1 -1
  628. package/lib/components/Tabs/Tabs.types.js.map +1 -1
  629. package/lib/components/Text/Text.d.ts +2 -2
  630. package/lib/components/Text/Text.d.ts.map +1 -1
  631. package/lib/components/Text/Text.js.map +1 -1
  632. package/lib/components/TextArea/TextArea.d.ts +3 -3
  633. package/lib/components/TextArea/TextArea.d.ts.map +1 -1
  634. package/lib/components/TextArea/TextArea.js.map +1 -1
  635. package/lib/components/Toaster/Context.d.ts +1 -1
  636. package/lib/components/Toaster/Context.d.ts.map +1 -1
  637. package/lib/components/Toaster/Context.js.map +1 -1
  638. package/lib/components/Toaster/Toaster.d.ts +3 -3
  639. package/lib/components/Toaster/Toaster.d.ts.map +1 -1
  640. package/lib/components/Toaster/Toaster.js.map +1 -1
  641. package/lib/components/Toaster/Toaster.types.d.ts +2 -2
  642. package/lib/components/Toaster/Toaster.types.d.ts.map +1 -1
  643. package/lib/components/Toaster/Toaster.types.js.map +1 -1
  644. package/lib/components/Tooltip/Tooltip.d.ts +3 -3
  645. package/lib/components/Tooltip/Tooltip.d.ts.map +1 -1
  646. package/lib/components/Tooltip/Tooltip.js.map +1 -1
  647. package/lib/components/Tree/StandardTree.d.ts.map +1 -1
  648. package/lib/components/Tree/StandardTree.js.map +1 -1
  649. package/lib/components/Tree/StandardTree.styles.d.ts +1 -1
  650. package/lib/components/Tree/StandardTree.styles.d.ts.map +1 -1
  651. package/lib/components/Tree/StandardTree.styles.js.map +1 -1
  652. package/lib/components/Tree/Tree.d.ts +2 -2
  653. package/lib/components/Tree/Tree.d.ts.map +1 -1
  654. package/lib/components/Tree/Tree.js.map +1 -1
  655. package/lib/components/URL/URLDisplay.d.ts +2 -2
  656. package/lib/components/URL/URLDisplay.d.ts.map +1 -1
  657. package/lib/components/URL/URLDisplay.js.map +1 -1
  658. package/lib/components/VisuallyHiddenText/VisuallyHiddenText.d.ts +2 -2
  659. package/lib/components/VisuallyHiddenText/VisuallyHiddenText.d.ts.map +1 -1
  660. package/lib/components/VisuallyHiddenText/VisuallyHiddenText.js.map +1 -1
  661. package/lib/hooks/index.d.ts +2 -1
  662. package/lib/hooks/index.d.ts.map +1 -1
  663. package/lib/hooks/index.js.map +1 -1
  664. package/lib/hooks/useActiveDescendant.d.ts +2 -2
  665. package/lib/hooks/useActiveDescendant.d.ts.map +1 -1
  666. package/lib/hooks/useActiveDescendant.js.map +1 -1
  667. package/lib/hooks/useAfterInitialEffect.d.ts +1 -1
  668. package/lib/hooks/useAfterInitialEffect.d.ts.map +1 -1
  669. package/lib/hooks/useAfterInitialEffect.js.map +1 -1
  670. package/lib/hooks/useArrows.d.ts +1 -1
  671. package/lib/hooks/useArrows.d.ts.map +1 -1
  672. package/lib/hooks/useArrows.js.map +1 -1
  673. package/lib/hooks/useAutoResize.d.ts +1 -1
  674. package/lib/hooks/useAutoResize.d.ts.map +1 -1
  675. package/lib/hooks/useAutoResize.js.map +1 -1
  676. package/lib/hooks/useBreakpoint.d.ts +1 -1
  677. package/lib/hooks/useBreakpoint.d.ts.map +1 -1
  678. package/lib/hooks/useBreakpoint.js.map +1 -1
  679. package/lib/hooks/useConsolidatedRef.d.ts +1 -1
  680. package/lib/hooks/useConsolidatedRef.d.ts.map +1 -1
  681. package/lib/hooks/useConsolidatedRef.js.map +1 -1
  682. package/lib/hooks/useDraggable.d.ts +1 -1
  683. package/lib/hooks/useDraggable.d.ts.map +1 -1
  684. package/lib/hooks/useDraggable.js.map +1 -1
  685. package/lib/hooks/useElement.d.ts +1 -1
  686. package/lib/hooks/useElement.d.ts.map +1 -1
  687. package/lib/hooks/useElement.js.map +1 -1
  688. package/lib/hooks/useEscape.d.ts +1 -1
  689. package/lib/hooks/useEscape.d.ts.map +1 -1
  690. package/lib/hooks/useEscape.js.map +1 -1
  691. package/lib/hooks/useEvent.d.ts +1 -1
  692. package/lib/hooks/useEvent.d.ts.map +1 -1
  693. package/lib/hooks/useEvent.js.map +1 -1
  694. package/lib/hooks/useFocusTrap.d.ts +1 -1
  695. package/lib/hooks/useFocusTrap.d.ts.map +1 -1
  696. package/lib/hooks/useFocusTrap.js.map +1 -1
  697. package/lib/hooks/useFocusWithin.d.ts +1 -1
  698. package/lib/hooks/useFocusWithin.d.ts.map +1 -1
  699. package/lib/hooks/useFocusWithin.js.map +1 -1
  700. package/lib/hooks/useI18n.d.ts +4 -0
  701. package/lib/hooks/useI18n.d.ts.map +1 -1
  702. package/lib/hooks/useInputFormatter.d.ts +1 -1
  703. package/lib/hooks/useInputFormatter.d.ts.map +1 -1
  704. package/lib/hooks/useInputFormatter.js.map +1 -1
  705. package/lib/hooks/useItemIntersection.d.ts +1 -1
  706. package/lib/hooks/useItemIntersection.d.ts.map +1 -1
  707. package/lib/hooks/useItemIntersection.js.map +1 -1
  708. package/lib/hooks/useOuterEvent.d.ts +1 -1
  709. package/lib/hooks/useOuterEvent.d.ts.map +1 -1
  710. package/lib/hooks/useOuterEvent.js.map +1 -1
  711. package/lib/hooks/useTestIds.d.ts +1 -1
  712. package/lib/hooks/useTestIds.d.ts.map +1 -1
  713. package/lib/hooks/useTestIds.js.map +1 -1
  714. package/lib/hooks/useTheme.d.ts +1 -1
  715. package/lib/hooks/useTheme.d.ts.map +1 -1
  716. package/lib/hooks/useTheme.js.map +1 -1
  717. package/lib/hooks/useTransitionState.d.ts +1 -1
  718. package/lib/hooks/useTransitionState.d.ts.map +1 -1
  719. package/lib/hooks/useTransitionState.js.map +1 -1
  720. package/lib/i18n/default.d.ts +4 -0
  721. package/lib/i18n/default.d.ts.map +1 -1
  722. package/lib/i18n/default.js +4 -0
  723. package/lib/i18n/default.js.map +1 -1
  724. package/lib/i18n/i18n.d.ts +4 -0
  725. package/lib/i18n/i18n.d.ts.map +1 -1
  726. package/lib/i18n/translate.js.map +1 -1
  727. package/lib/styles/GlobalStyle.d.ts +1 -1
  728. package/lib/styles/GlobalStyle.d.ts.map +1 -1
  729. package/lib/styles/GlobalStyle.js.map +1 -1
  730. package/lib/styles/utils.d.ts +2 -2
  731. package/lib/styles/utils.d.ts.map +1 -1
  732. package/lib/styles/utils.js.map +1 -1
  733. package/lib/theme/ThemeMachine.d.ts +1 -1
  734. package/lib/theme/ThemeMachine.d.ts.map +1 -1
  735. package/lib/theme/ThemeMachine.js.map +1 -1
  736. package/lib/theme/theme.d.ts +2 -1
  737. package/lib/theme/theme.d.ts.map +1 -1
  738. package/lib/theme/theme.js.map +1 -1
  739. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"Sentiment.js","sourceRoot":"","sources":["../../../src/components/Sentiment/Sentiment.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAA2C,MAAM,OAAO,CAAC;AAC5E,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C,OAAO,IAAI,EAAE,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAuB3C,MAAM,YAAY,GAA4B;IAC5C,QAAQ,EAAE,UAAU;IACpB,QAAQ,EAAE,YAAY;IACtB,OAAO,EAAE,YAAY;CACtB,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAG,MAAM,CAAC,GAAG,CAAiB,KAAK,CAAC,EAAE;IAChE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;IACjC,OAAO,GAAG,CAAA;QACJ,UAAU;eACH,KAAK,CAAC,UAAU,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,KAAK;;GAErD,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAEhD,MAAM,SAAS,GAAqD,UAAU,CAAC,SAAS,SAAS,CAC/F,KAAsC,EACtC,GAA0B;IAE1B,MAAM,CAAC,GAAG,OAAO,EAAE,CAAC;IAEpB,MAAM,aAAa,GAA6B;QAC9C,QAAQ,EAAE,CAAC,CAAC,oBAAoB,CAAC;QACjC,QAAQ,EAAE,CAAC,CAAC,oBAAoB,CAAC;QACjC,OAAO,EAAE,CAAC,CAAC,mBAAmB,CAAC;KAChC,CAAC;IAEF,MAAM,EACJ,YAAY,EAAE,SAAS,EACvB,OAAO,EACP,WAAW,GAAG,KAAK,EACnB,MAAM,GAAG,EAAE,EACX,KAAK,GAAG,EAAE,EACV,GAAG,SAAS,EACb,GAAG,KAAK,CAAC;IAEV,OAAO,CACL,MAAC,IAAI,kBACS,SAAS,EACrB,GAAG,EAAE,GAAG,EACR,OAAO,EAAE,OAAO,EAChB,IAAI,EAAC,KAAK,KACN,SAAS,EACb,EAAE,EAAE,eAAe,EACnB,SAAS,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,aAErB,KAAC,IAAI,mBAAa,MAAM,EAAC,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI,YAAY,CAAC,OAAO,CAAE,GAAI,EAC1E,CAAC,WAAW,IAAI,yBAAO,MAAM,CAAC,OAAO,CAAC,IAAI,aAAa,CAAC,OAAO,CAAC,GAAQ,IACpE,CACR,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,SAAS,CAAC","sourcesContent":["import { forwardRef, FunctionComponent, PropsWithoutRef, Ref } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport Flex from '../Flex';\nimport { useI18n } from '../../hooks';\nimport { defaultThemeProp } from '../../theme';\nimport { BaseProps, ForwardProps, NoChildrenProp } from '../../types';\nimport Icon, { StyledIcon } from '../Icon';\n\nexport interface SentimentProps extends BaseProps, NoChildrenProp {\n /** Ref to the element */\n ref?: Ref<HTMLDivElement>;\n /** Variant of the sentiment */\n variant: 'positive' | 'neutral' | 'negative';\n /** Flag that indicates if label needs to be hidden\n * @default false\n */\n labelHidden?: boolean;\n /** Labels for different sentiment variants. If not supplied default labels will be shown */\n labels?: {\n [variant in SentimentProps['variant']]?: string;\n };\n /** Icons for different sentiment variants. If not supplied default icons will be shown */\n icons?: {\n [variant in SentimentProps['variant']]?: string;\n };\n /** Aria label for screen readers. */\n 'aria-label'?: string;\n}\n\nconst defaultIcons: SentimentProps['icons'] = {\n negative: 'face-sad',\n positive: 'face-happy',\n neutral: 'face-blank'\n};\n\nexport const StyledSentiment = styled.div<SentimentProps>(props => {\n const { theme, variant } = props;\n return css`\n > ${StyledIcon} {\n color: ${theme.components.sentiment[variant].color};\n }\n `;\n});\n\nStyledSentiment.defaultProps = defaultThemeProp;\n\nconst Sentiment: FunctionComponent<SentimentProps & ForwardProps> = forwardRef(function Sentiment(\n props: PropsWithoutRef<SentimentProps>,\n ref: SentimentProps['ref']\n) {\n const t = useI18n();\n\n const defaultLabels: SentimentProps['labels'] = {\n negative: t('sentiment_negative'),\n positive: t('sentiment_positive'),\n neutral: t('sentiment_neutral')\n };\n\n const {\n 'aria-label': ariaLabel,\n variant,\n labelHidden = false,\n labels = {},\n icons = {},\n ...restProps\n } = props;\n\n return (\n <Flex\n aria-label={ariaLabel}\n ref={ref}\n variant={variant}\n role='img'\n {...restProps}\n as={StyledSentiment}\n container={{ gap: 1 }}\n >\n <Icon aria-hidden='true' name={icons[variant] || defaultIcons[variant]!} />\n {!labelHidden && <span>{labels[variant] || defaultLabels[variant]}</span>}\n </Flex>\n );\n});\n\nexport default Sentiment;\n"]}
1
+ {"version":3,"file":"Sentiment.js","sourceRoot":"","sources":["../../../src/components/Sentiment/Sentiment.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEnC,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C,OAAO,IAAI,EAAE,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAuB3C,MAAM,YAAY,GAA4B;IAC5C,QAAQ,EAAE,UAAU;IACpB,QAAQ,EAAE,YAAY;IACtB,OAAO,EAAE,YAAY;CACtB,CAAC;AAEF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C","sourcesContent":["import { forwardRef } from 'react';\nimport type { FunctionComponent, PropsWithoutRef, Ref } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport Flex from '../Flex';\nimport { useI18n } from '../../hooks';\nimport { defaultThemeProp } from '../../theme';\nimport type { BaseProps, ForwardProps, NoChildrenProp } from '../../types';\nimport Icon, { StyledIcon } from '../Icon';\n\nexport interface SentimentProps extends BaseProps, NoChildrenProp {\n /** Ref to the element */\n ref?: Ref<HTMLDivElement>;\n /** Variant of the sentiment */\n variant: 'positive' | 'neutral' | 'negative';\n /** Flag that indicates if label needs to be hidden\n * @default false\n */\n labelHidden?: boolean;\n /** Labels for different sentiment variants. If not supplied default labels will be shown */\n labels?: {\n [variant in SentimentProps['variant']]?: string;\n };\n /** Icons for different sentiment variants. If not supplied default icons will be shown */\n icons?: {\n [variant in SentimentProps['variant']]?: string;\n };\n /** Aria label for screen readers. */\n 'aria-label'?: string;\n}\n\nconst defaultIcons: SentimentProps['icons'] = {\n negative: 'face-sad',\n positive: 'face-happy',\n neutral: 'face-blank'\n};\n\nexport const StyledSentiment = styled.div<SentimentProps>(props => {\n const { theme, variant } = props;\n return css`\n > ${StyledIcon} {\n color: ${theme.components.sentiment[variant].color};\n }\n `;\n});\n\nStyledSentiment.defaultProps = defaultThemeProp;\n\nconst Sentiment: FunctionComponent<SentimentProps & ForwardProps> = forwardRef(function Sentiment(\n props: PropsWithoutRef<SentimentProps>,\n ref: SentimentProps['ref']\n) {\n const t = useI18n();\n\n const defaultLabels: SentimentProps['labels'] = {\n negative: t('sentiment_negative'),\n positive: t('sentiment_positive'),\n neutral: t('sentiment_neutral')\n };\n\n const {\n 'aria-label': ariaLabel,\n variant,\n labelHidden = false,\n labels = {},\n icons = {},\n ...restProps\n } = props;\n\n return (\n <Flex\n aria-label={ariaLabel}\n ref={ref}\n variant={variant}\n role='img'\n {...restProps}\n as={StyledSentiment}\n container={{ gap: 1 }}\n >\n <Icon aria-hidden='true' name={icons[variant] || defaultIcons[variant]!} />\n {!labelHidden && <span>{labels[variant] || defaultLabels[variant]}</span>}\n </Flex>\n );\n});\n\nexport default Sentiment;\n"]}
@@ -1,4 +1,4 @@
1
- import { FunctionComponent } from 'react';
1
+ import type { FunctionComponent } from 'react';
2
2
  import type { ShortcutAction, ShortcutManagerProps } from './ShortcutManager.types';
3
3
  /**
4
4
  * Function to register an action triggerable using a shortcut. All actions must be registered before
@@ -1 +1 @@
1
- {"version":3,"file":"ShortcutManager.d.ts","sourceRoot":"","sources":["../../../src/components/ShortcutManager/ShortcutManager.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAqB,MAAM,OAAO,CAAC;AAM7D,OAAO,KAAK,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAGpF;;;;GAIG;AACH,eAAO,MAAM,cAAc,eAAgB,cAAc,EAAE,KAAG,IAY7D,CAAC;AAUF,QAAA,MAAM,eAAe,EAAE,iBAAiB,CAAC,oBAAoB,CAsE5D,CAAC;AAEF,eAAe,eAAe,CAAC"}
1
+ {"version":3,"file":"ShortcutManager.d.ts","sourceRoot":"","sources":["../../../src/components/ShortcutManager/ShortcutManager.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAM/C,OAAO,KAAK,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAIpF;;;;GAIG;AACH,eAAO,MAAM,cAAc,eAAgB,cAAc,EAAE,KAAG,IAY7D,CAAC;AAUF,QAAA,MAAM,eAAe,EAAE,iBAAiB,CAAC,oBAAoB,CAsE5D,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ShortcutManager.js","sourceRoot":"","sources":["../../../src/components/ShortcutManager/ShortcutManager.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAqB,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC7D,OAAO,EAAE,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cuts } from 'shortcuts';\n\nimport { useAfterInitialEffect, useSimpleStore } from '../../hooks';\nimport { hasProp } from '../../utils';\n\nimport type { ShortcutAction, ShortcutManagerProps } from './ShortcutManager.types';\nimport { type ActionDefinitions, actionStore } from './Store';\n\n/**\n * Function to register an action triggerable using a shortcut. All actions must be registered before\n * binding a callback.\n * @param actions actions with definitions to be registered.\n */\nexport const registerAction = (...actions: ShortcutAction[]): void => {\n actionStore.setStore(store => {\n let newStore = store;\n actions.forEach(({ id, defaultKeyBinding: defaultShortcut }) => {\n if (!hasProp(store, id))\n newStore = {\n ...(newStore as ActionDefinitions),\n [id]: { defaultKeyBinding: defaultShortcut, keyBinding: defaultShortcut }\n };\n });\n return newStore;\n });\n};\n\nconst dispatchShortcutEvent = (actionId: ShortcutAction['id'], e: KeyboardEvent) => {\n const shortcutEvent = new CustomEvent('shortcut', {\n bubbles: true,\n detail: { actionId }\n });\n e.target?.dispatchEvent(shortcutEvent);\n};\n\nconst ShortcutManager: FunctionComponent<ShortcutManagerProps> = ({\n children,\n target,\n bindings: customBindings = {}\n}) => {\n const shortcutsRef = useRef<Shortcuts>();\n\n const [bindings, setBindings] = useSimpleStore(actionStore, store =>\n Object.entries(store).map(([actionId, actionDefinition]) => ({\n action: actionId,\n shortcut: actionDefinition.keyBinding\n }))\n );\n\n useEffect(() => {\n setBindings(store => {\n let newStore = store;\n Object.entries(customBindings).forEach(([actionId, keyBinding]) => {\n newStore = { ...newStore, [actionId]: { ...newStore[actionId], keyBinding } };\n });\n return newStore;\n });\n }, [JSON.stringify(customBindings)]);\n\n useEffect(() => {\n shortcutsRef.current = new Shortcuts({\n target,\n shouldHandleEvent: e =>\n // both 'keydown' and 'keypress' events are handled by default ('shortcuts' bug?)\n e.type === 'keydown' &&\n !e.defaultPrevented &&\n // don't process event during typing letters/digits into inputs without modifier keys\n !(\n e.target instanceof HTMLElement &&\n ['input', 'textarea'].includes(e.target.nodeName.toLowerCase()) &&\n e.key.match(/a-zA-Z0-9/) &&\n !['Control', 'Meta'].some(modifier => e.getModifierState(modifier))\n ),\n shortcuts: bindings.map(({ action, shortcut }) => ({\n shortcut,\n handler: e => {\n e.preventDefault();\n dispatchShortcutEvent(action, e);\n }\n }))\n });\n\n return () => {\n shortcutsRef.current?.reset();\n shortcutsRef.current = undefined;\n };\n }, [target]);\n\n useAfterInitialEffect(() => {\n const shortcutInstance = shortcutsRef.current;\n if (shortcutInstance) {\n shortcutInstance.reset();\n shortcutInstance.add(\n bindings.map(({ action, shortcut }) => ({\n shortcut,\n handler: e => {\n e.preventDefault();\n dispatchShortcutEvent(action, e);\n }\n }))\n );\n }\n }, [JSON.stringify(bindings)]);\n\n return <>{children}</>;\n};\n\nexport default ShortcutManager;\n"]}
1
+ {"version":3,"file":"ShortcutManager.js","sourceRoot":"","sources":["../../../src/components/ShortcutManager/ShortcutManager.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAE1C,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC,OAAO,EAAE,qBAAqB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AACpE,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAGtC,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAGtC;;;;GAIG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,GAAG,OAAyB,EAAQ,EAAE;IACnE,WAAW,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE;QAC3B,IAAI,QAAQ,GAAG,KAAK,CAAC;QACrB,OAAO,CAAC,OAAO,CAAC,CAAC,EAAE,EAAE,EAAE,iBAAiB,EAAE,eAAe,EAAE,EAAE,EAAE;YAC7D,IAAI,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC;gBACrB,QAAQ,GAAG;oBACT,GAAI,QAA8B;oBAClC,CAAC,EAAE,CAAC,EAAE,EAAE,iBAAiB,EAAE,eAAe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MAAM,gBAAgB,GAAG,YAAY,CAAC,OAAO,CAAC;QAC9C,IAAI,gBAAgB,EAAE;YACpB,gBAAgB,CAAC,KAAK,EAAE,CAAC;YACzB,gBAAgB,CAAC,GAAG,CAClB,QAAQ,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,CAAC;gBACtC,QAAQ;gBACR,OAAO,EAAE,CAAC,CAAC,EAAE;oBACX,CAAC,CAAC,cAAc,EAAE,CAAC;oBACnB,qBAAqB,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;gBACnC,CAAC;aACF,CAAC,CAAC,CACJ,CAAC;SACH;IACH,CAAC,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;IAE/B,OAAO,4BAAG,QAAQ,GAAI,CAAC;AACzB,CAAC,CAAC;AAEF,eAAe,eAAe,CAAC","sourcesContent":["import { useEffect, useRef } from 'react';\nimport type { FunctionComponent } from 'react';\nimport { Shortcuts } from 'shortcuts';\n\nimport { useAfterInitialEffect, useSimpleStore } from '../../hooks';\nimport { hasProp } from '../../utils';\n\nimport type { ShortcutAction, ShortcutManagerProps } from './ShortcutManager.types';\nimport { actionStore } from './Store';\nimport type { ActionDefinitions } from './Store';\n\n/**\n * Function to register an action triggerable using a shortcut. All actions must be registered before\n * binding a callback.\n * @param actions actions with definitions to be registered.\n */\nexport const registerAction = (...actions: ShortcutAction[]): void => {\n actionStore.setStore(store => {\n let newStore = store;\n actions.forEach(({ id, defaultKeyBinding: defaultShortcut }) => {\n if (!hasProp(store, id))\n newStore = {\n ...(newStore as ActionDefinitions),\n [id]: { defaultKeyBinding: defaultShortcut, keyBinding: defaultShortcut }\n };\n });\n return newStore;\n });\n};\n\nconst dispatchShortcutEvent = (actionId: ShortcutAction['id'], e: KeyboardEvent) => {\n const shortcutEvent = new CustomEvent('shortcut', {\n bubbles: true,\n detail: { actionId }\n });\n e.target?.dispatchEvent(shortcutEvent);\n};\n\nconst ShortcutManager: FunctionComponent<ShortcutManagerProps> = ({\n children,\n target,\n bindings: customBindings = {}\n}) => {\n const shortcutsRef = useRef<Shortcuts>();\n\n const [bindings, setBindings] = useSimpleStore(actionStore, store =>\n Object.entries(store).map(([actionId, actionDefinition]) => ({\n action: actionId,\n shortcut: actionDefinition.keyBinding\n }))\n );\n\n useEffect(() => {\n setBindings(store => {\n let newStore = store;\n Object.entries(customBindings).forEach(([actionId, keyBinding]) => {\n newStore = { ...newStore, [actionId]: { ...newStore[actionId], keyBinding } };\n });\n return newStore;\n });\n }, [JSON.stringify(customBindings)]);\n\n useEffect(() => {\n shortcutsRef.current = new Shortcuts({\n target,\n shouldHandleEvent: e =>\n // both 'keydown' and 'keypress' events are handled by default ('shortcuts' bug?)\n e.type === 'keydown' &&\n !e.defaultPrevented &&\n // don't process event during typing letters/digits into inputs without modifier keys\n !(\n e.target instanceof HTMLElement &&\n ['input', 'textarea'].includes(e.target.nodeName.toLowerCase()) &&\n e.key.match(/a-zA-Z0-9/) &&\n !['Control', 'Meta'].some(modifier => e.getModifierState(modifier))\n ),\n shortcuts: bindings.map(({ action, shortcut }) => ({\n shortcut,\n handler: e => {\n e.preventDefault();\n dispatchShortcutEvent(action, e);\n }\n }))\n });\n\n return () => {\n shortcutsRef.current?.reset();\n shortcutsRef.current = undefined;\n };\n }, [target]);\n\n useAfterInitialEffect(() => {\n const shortcutInstance = shortcutsRef.current;\n if (shortcutInstance) {\n shortcutInstance.reset();\n shortcutInstance.add(\n bindings.map(({ action, shortcut }) => ({\n shortcut,\n handler: e => {\n e.preventDefault();\n dispatchShortcutEvent(action, e);\n }\n }))\n );\n }\n }, [JSON.stringify(bindings)]);\n\n return <>{children}</>;\n};\n\nexport default ShortcutManager;\n"]}
@@ -1,4 +1,4 @@
1
- import { ReactNode } from 'react';
1
+ import type { ReactNode } from 'react';
2
2
  interface ShortcutEventDetails {
3
3
  actionId: string;
4
4
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ShortcutManager.types.d.ts","sourceRoot":"","sources":["../../../src/components/ShortcutManager/ShortcutManager.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,UAAU,oBAAoB;IAC5B,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,KAAK,aAAa,GAAG,WAAW,CAAC,oBAAoB,CAAC,CAAC;IAEvD,UAAU,2BAA2B;QACnC,QAAQ,EAAE,aAAa,CAAC;KACzB;CACF;AAED,MAAM,WAAW,oBAAoB;IACnC,iBAAiB,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,cAAe,SAAQ,oBAAoB;IAC1D,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,EAAE,aAAa,KAAK,IAAI,CAAC;AAEhE,MAAM,WAAW,WAAW;IAC1B,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,oBAAoB;IACnC,yDAAyD;IACzD,QAAQ,EAAE,SAAS,CAAC;IACpB,8CAA8C;IAC9C,QAAQ,CAAC,EAAE,WAAW,CAAC;IACvB,uGAAuG;IACvG,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB"}
1
+ {"version":3,"file":"ShortcutManager.types.d.ts","sourceRoot":"","sources":["../../../src/components/ShortcutManager/ShortcutManager.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,UAAU,oBAAoB;IAC5B,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,KAAK,aAAa,GAAG,WAAW,CAAC,oBAAoB,CAAC,CAAC;IAEvD,UAAU,2BAA2B;QACnC,QAAQ,EAAE,aAAa,CAAC;KACzB;CACF;AAED,MAAM,WAAW,oBAAoB;IACnC,iBAAiB,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,cAAe,SAAQ,oBAAoB;IAC1D,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,EAAE,aAAa,KAAK,IAAI,CAAC;AAEhE,MAAM,WAAW,WAAW;IAC1B,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,oBAAoB;IACnC,yDAAyD;IACzD,QAAQ,EAAE,SAAS,CAAC;IACpB,8CAA8C;IAC9C,QAAQ,CAAC,EAAE,WAAW,CAAC;IACvB,uGAAuG;IACvG,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB"}
@@ -1 +1 @@
1
- {"version":3,"file":"ShortcutManager.types.js","sourceRoot":"","sources":["../../../src/components/ShortcutManager/ShortcutManager.types.ts"],"names":[],"mappings":"","sourcesContent":["import { ReactNode } from 'react';\n\ninterface ShortcutEventDetails {\n actionId: string;\n}\n\ndeclare global {\n type ShortcutEvent = CustomEvent<ShortcutEventDetails>;\n\n interface GlobalEventHandlersEventMap {\n shortcut: ShortcutEvent;\n }\n}\n\nexport interface ShortcutActionConfig {\n defaultKeyBinding: string;\n}\n\nexport interface ShortcutAction extends ShortcutActionConfig {\n id: string;\n}\n\nexport type ShortcutActionCallback = (e: ShortcutEvent) => void;\n\nexport interface KeyBindings {\n [key: string]: string;\n}\n\nexport interface ShortcutManagerProps {\n /** The element(s) that may bind callbacks to actions. */\n children: ReactNode;\n /** Pre-populated key bindings for actions. */\n bindings?: KeyBindings;\n /** HTML element that global event handler will be attached to. Document will be used if not passed. */\n target?: HTMLElement;\n}\n"]}
1
+ {"version":3,"file":"ShortcutManager.types.js","sourceRoot":"","sources":["../../../src/components/ShortcutManager/ShortcutManager.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ReactNode } from 'react';\n\ninterface ShortcutEventDetails {\n actionId: string;\n}\n\ndeclare global {\n type ShortcutEvent = CustomEvent<ShortcutEventDetails>;\n\n interface GlobalEventHandlersEventMap {\n shortcut: ShortcutEvent;\n }\n}\n\nexport interface ShortcutActionConfig {\n defaultKeyBinding: string;\n}\n\nexport interface ShortcutAction extends ShortcutActionConfig {\n id: string;\n}\n\nexport type ShortcutActionCallback = (e: ShortcutEvent) => void;\n\nexport interface KeyBindings {\n [key: string]: string;\n}\n\nexport interface ShortcutManagerProps {\n /** The element(s) that may bind callbacks to actions. */\n children: ReactNode;\n /** Pre-populated key bindings for actions. */\n bindings?: KeyBindings;\n /** HTML element that global event handler will be attached to. Document will be used if not passed. */\n target?: HTMLElement;\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { FunctionComponent, ReactNode } from 'react';
1
+ import type { FunctionComponent, ReactNode } from 'react';
2
2
  export interface ShowMoreLessProps {
3
3
  children: ReactNode;
4
4
  lines: number;
@@ -1 +1 @@
1
- {"version":3,"file":"ShowMoreLess.d.ts","sourceRoot":"","sources":["../../../src/components/ShowMoreLess/ShowMoreLess.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAA8C,MAAM,OAAO,CAAC;AAQjG,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,SAAS,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,wBAAwB,qLAAmB,CAAC;AAEzD,QAAA,MAAM,YAAY,EAAE,iBAAiB,CAAC,iBAAiB,CAoDtD,CAAC;AAEF,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"ShowMoreLess.d.ts","sourceRoot":"","sources":["../../../src/components/ShowMoreLess/ShowMoreLess.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAQ1D,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,SAAS,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,wBAAwB,qLAAmB,CAAC;AAEzD,QAAA,MAA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, useLayoutEffect } from 'react';\nimport styled from 'styled-components';\n\nimport { useI18n } from '../../hooks';\nimport { windowIsAvailable } from '../../utils';\nimport Button from '../Button';\nimport ExpandCollapse from '../ExpandCollapse';\n\nexport interface ShowMoreLessProps {\n children: ReactNode;\n lines: number;\n}\n\nexport const StyledShowMoreLessButton = styled(Button)``;\n\nconst ShowMoreLess: FunctionComponent<ShowMoreLessProps> = ({ children, lines }) => {\n const [collapsed, setCollapsed] = useState(true);\n const [exceedsMaxHeight, setExceedsMaxHeight] = useState(false);\n const contentRef = useRef<HTMLDivElement>(null);\n const t = useI18n();\n\n const maxTextHeight = useMemo(() => {\n if (!windowIsAvailable) return Infinity;\n\n const computedLineHeight =\n Number.parseInt(\n window.getComputedStyle(document.documentElement).getPropertyValue('font-size'),\n 10\n ) * 1.25;\n return lines * computedLineHeight;\n }, []);\n\n useLayoutEffect(() => {\n if (!contentRef.current) return;\n\n const observer = new ResizeObserver(entries => {\n const exceedsHeight = entries.some(({ target, contentRect }) => {\n if (target !== contentRef.current) return;\n\n return contentRect.height > maxTextHeight;\n });\n\n setExceedsMaxHeight(exceedsHeight);\n });\n\n observer.observe(contentRef.current);\n\n return () => {\n observer.disconnect();\n };\n }, [contentRef.current, maxTextHeight]);\n\n return (\n <>\n <ExpandCollapse\n collapsed={collapsed}\n min={exceedsMaxHeight ? `${maxTextHeight}px` : 'max-content'}\n >\n <div ref={contentRef}>{children}</div>\n </ExpandCollapse>\n {exceedsMaxHeight && (\n <StyledShowMoreLessButton variant='link' onClick={() => setCollapsed(current => !current)}>\n {collapsed ? t('show_more') : t('show_less')}\n </StyledShowMoreLessButton>\n )}\n </>\n );\n};\n\nexport default ShowMoreLess;\n"]}
1
+ {"version":3,"file":"ShowMoreLess.js","sourceRoot":"","sources":["../../../src/components/ShowMoreLess/ShowMoreLess.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,OAAO,CAAC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,MAAM,KAAK,UAAU,CAAC,OAAO;oBAAE,OAAO;gBAE1C,OAAO,WAAW,CAAC,MAAM,GAAG,aAAa,CAAC;YAC5C,CAAC,CAAC,CAAC;YAEH,mBAAmB,CAAC,aAAa,CAAC,CAAC;QACrC,CAAC,CAAC,CAAC;QAEH,QAAQ,CAAC,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;QAErC,OAAO,GAAG,EAAE;YACV,QAAQ,CAAC,UAAU,EAAE,CAAC;QACxB,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC,CAAC;IAExC,OAAO,CACL,8BACE,KAAC,cAAc,IACb,SAAS,EAAE,SAAS,EACpB,GAAG,EAAE,gBAAgB,CAAC,CAAC,CAAC,GAAG,aAAa,IAAI,CAAC,CAAC,CAAC,aAAa,YAE5D,cAAK,GAAG,EAAE,UAAU,YAAG,QAAQ,GAAO,GACvB,EAChB,gBAAgB,IAAI,CACnB,KAAC,wBAAwB,IAAC,OAAO,EAAC,MAAM,EAAC,OAAO,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,YACtF,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,GACnB,CAC5B,IACA,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,YAAY,CAAC","sourcesContent":["import { useState, useRef, useMemo, useLayoutEffect } from 'react';\nimport type { FunctionComponent, ReactNode } from 'react';\nimport styled from 'styled-components';\n\nimport { useI18n } from '../../hooks';\nimport { windowIsAvailable } from '../../utils';\nimport Button from '../Button';\nimport ExpandCollapse from '../ExpandCollapse';\n\nexport interface ShowMoreLessProps {\n children: ReactNode;\n lines: number;\n}\n\nexport const StyledShowMoreLessButton = styled(Button)``;\n\nconst ShowMoreLess: FunctionComponent<ShowMoreLessProps> = ({ children, lines }) => {\n const [collapsed, setCollapsed] = useState(true);\n const [exceedsMaxHeight, setExceedsMaxHeight] = useState(false);\n const contentRef = useRef<HTMLDivElement>(null);\n const t = useI18n();\n\n const maxTextHeight = useMemo(() => {\n if (!windowIsAvailable) return Infinity;\n\n const computedLineHeight =\n Number.parseInt(\n window.getComputedStyle(document.documentElement).getPropertyValue('font-size'),\n 10\n ) * 1.25;\n return lines * computedLineHeight;\n }, []);\n\n useLayoutEffect(() => {\n if (!contentRef.current) return;\n\n const observer = new ResizeObserver(entries => {\n const exceedsHeight = entries.some(({ target, contentRect }) => {\n if (target !== contentRef.current) return;\n\n return contentRect.height > maxTextHeight;\n });\n\n setExceedsMaxHeight(exceedsHeight);\n });\n\n observer.observe(contentRef.current);\n\n return () => {\n observer.disconnect();\n };\n }, [contentRef.current, maxTextHeight]);\n\n return (\n <>\n <ExpandCollapse\n collapsed={collapsed}\n min={exceedsMaxHeight ? `${maxTextHeight}px` : 'max-content'}\n >\n <div ref={contentRef}>{children}</div>\n </ExpandCollapse>\n {exceedsMaxHeight && (\n <StyledShowMoreLessButton variant='link' onClick={() => setCollapsed(current => !current)}>\n {collapsed ? t('show_more') : t('show_less')}\n </StyledShowMoreLessButton>\n )}\n </>\n );\n};\n\nexport default ShowMoreLess;\n"]}
@@ -1,5 +1,5 @@
1
- import { FunctionComponent } from 'react';
2
- import { BaseProps, ForwardProps } from '../../types';
1
+ import type { FunctionComponent } from 'react';
2
+ import type { BaseProps, ForwardProps } from '../../types';
3
3
  export interface LineSkeletonProps extends BaseProps {
4
4
  /**
5
5
  * Width of the skeleton.
@@ -1 +1 @@
1
- {"version":3,"file":"LineSkeleton.d.ts","sourceRoot":"","sources":["../../../src/components/Skeleton/LineSkeleton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAG1C,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAGtD,MAAM,WAAW,iBAAkB,SAAQ,SAAS;IAClD;;;OAGG;IACH,KAAK,CAAC,EAAE,SAAS,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;IACpC;;;OAGG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC;CAC9B;AAcD,eAAO,MAAM,kBAAkB,iIAc7B,CAAC;AAIH,QAAA,MAAM,YAAY,EAAE,iBAAiB,CAAC,iBAAiB,GAAG,YAAY,CAIrE,CAAC;AAIF,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"LineSkeleton.d.ts","sourceRoot":"","sources":["../../../src/components/Skeleton/LineSkeleton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAG/C,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAG3D,MAAM,WAAW,iBAAkB,SAAQ,SAAS;IAClD;;;OAGG;IACH,KAAK,CAAC,EAAE,SAAS,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;IACpC;;;OAGG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC;CAC9B;AAcD,eAAO,MAAM,kBAAkB,iIAc7B,CAAC;AAIH,QAAA,MAAM,YAAY,EAAE,iBAAiB,CAAC,iBAAiB,GAAG,YAAY,CAIrE,CAAC;AAIF,eAAe,YAAY,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"LineSkeleton.js","sourceRoot":"","sources":["../../../src/components/Skeleton/LineSkeleton.tsx"],"names":[],"mappings":";AACA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAGhD,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAe/C,MAAM,YAAY,GAA+B;IAC/C,KAAK,EAAE,SAAS;IAChB,OAAO,EAAE,SAAS;CACnB,CAAC;AAEF,MAAM,eAAe,GAAG;IACtB,OAAO,EAAE,MAAM;IACf,CAAC,EAAE,KAAK;IACR,CAAC,EAAE,KAAK;IACR,CAAC,EAAE,KAAK;CACT,CAAC;AAEF,MAAM,CAAC,MAAM,kBAAkB,GAAG,MAAM,CAAC,GAAG,CAA6B,KAAK,CAAC,EAAE;IAC/E,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;IACjC,MAAM,EAAE,QAAQ,EAAE,kBAAkB,EAAE,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC;IAClE,MAAM,aAAa,GAAG,eAAe,CAAC,KAAK,IAAI,SAAS,CAAC,CAAC;IAC1D,MAAM,eAAe,GAAG,sBAAsB,CAAC;IAC/C,OAAO,GAAG,CAAA;;;;aAIC,aAAa;MACpB,OAAO,KAAK,SAAS;QACrB,CAAC,CAAC,qBAAqB,kBAAkB,EAAE;QAC3C,CAAC,CAAC,qBAAqB,eAAe,EAAE;GAC3C,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,kBAAkB,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAEnD,MAAM,YAAY,GAAwD,CACxE,KAAwB,EACxB,EAAE;IACF,OAAO,KAAC,kBAAkB,OAAK,KAAK,mBAAgB,MAAM,GAAG,CAAC;AAChE,CAAC,CAAC;AAEF,YAAY,CAAC,YAAY,GAAG,YAAY,CAAC;AAEzC,eAAe,YAAY,CAAC","sourcesContent":["import { FunctionComponent } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport { BaseProps, ForwardProps } from '../../types';\nimport { defaultThemeProp } from '../../theme';\n\nexport interface LineSkeletonProps extends BaseProps {\n /**\n * Width of the skeleton.\n * @default 'default'\n */\n width?: 'default' | 'l' | 'm' | 's';\n /**\n * Variant of the skeleton.\n * @default 'default'\n */\n variant?: 'default' | 'link';\n}\n\nconst defaultProps: Partial<LineSkeletonProps> = {\n width: 'default',\n variant: 'default'\n};\n\nconst lengthToPercent = {\n default: 'auto',\n l: '80%',\n m: '50%',\n s: '30%'\n};\n\nexport const StyledLineSkeleton = styled.div<Partial<LineSkeletonProps>>(props => {\n const { width, variant } = props;\n const { skeleton: skeletonBackground } = props.theme.base.palette;\n const lengthPercent = lengthToPercent[width || 'default'];\n const LinkHeaderColor = 'rgb(135,206,235,0.5)';\n return css`\n flex-grow: 1;\n margin: 0.25rem;\n height: 0.875rem;\n width: ${lengthPercent};\n ${variant === 'default'\n ? `background-color: ${skeletonBackground}`\n : `background-color: ${LinkHeaderColor}`}\n `;\n});\n\nStyledLineSkeleton.defaultProps = defaultThemeProp;\n\nconst LineSkeleton: FunctionComponent<LineSkeletonProps & ForwardProps> = (\n props: LineSkeletonProps\n) => {\n return <StyledLineSkeleton {...props} aria-disabled='true' />;\n};\n\nLineSkeleton.defaultProps = defaultProps;\n\nexport default LineSkeleton;\n"]}
1
+ {"version":3,"file":"LineSkeleton.js","sourceRoot":"","sources":["../../../src/components/Skeleton/LineSkeleton.tsx"],"names":[],"mappings":";AACA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAGhD,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAe/C,MAAM,YAAY,GAA+B;IAC/C,KAAK,EAAE,SAAS;IAChB,OAAO,EAAE,SAAS;CACnB,CAAC;AAEF,MAAM,eAAe,GAAG;IACtB,OAAO,EAAE,MAAM;IACf,CAAC,EAAE,KAAK;IACR,CAAC,EAAE,KAAK;IACR,CAAC,EAAE,KAAK;CACT,CAAC;AAEF,MAAM,CAAC,MAAM,kBAAkB,GAAG,MAAM,CAAC,GAAG,CAA6B,KAAK,CAAC,EAAE;IAC/E,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;IACjC,MAAM,EAAE,QAAQ,EAAE,kBAAkB,EAAE,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC;IAClE,MAAM,aAAa,GAAG,eAAe,CAAC,KAAK,IAAI,SAAS,CAAC,CAAC;IAC1D,MAAM,eAAe,GAAG,sBAAsB,CAAC;IAC/C,OAAO,GAAG,CAAA;;;;aAIC,aAAa;MACpB,OAAO,KAAK,SAAS;QACrB,CAAC,CAAC,qBAAqB,kBAAkB,EAAE;QAC3C,CAAC,CAAC,qBAAqB,eAAe,EAAE;GAC3C,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,kBAAkB,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAEnD,MAAM,YAAY,GAAwD,CACxE,KAAwB,EACxB,EAAE;IACF,OAAO,KAAC,kBAAkB,OAAK,KAAK,mBAAgB,MAAM,GAAG,CAAC;AAChE,CAAC,CAAC;AAEF,YAAY,CAAC,YAAY,GAAG,YAAY,CAAC;AAEzC,eAAe,YAAY,CAAC","sourcesContent":["import type { FunctionComponent } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport type { BaseProps, ForwardProps } from '../../types';\nimport { defaultThemeProp } from '../../theme';\n\nexport interface LineSkeletonProps extends BaseProps {\n /**\n * Width of the skeleton.\n * @default 'default'\n */\n width?: 'default' | 'l' | 'm' | 's';\n /**\n * Variant of the skeleton.\n * @default 'default'\n */\n variant?: 'default' | 'link';\n}\n\nconst defaultProps: Partial<LineSkeletonProps> = {\n width: 'default',\n variant: 'default'\n};\n\nconst lengthToPercent = {\n default: 'auto',\n l: '80%',\n m: '50%',\n s: '30%'\n};\n\nexport const StyledLineSkeleton = styled.div<Partial<LineSkeletonProps>>(props => {\n const { width, variant } = props;\n const { skeleton: skeletonBackground } = props.theme.base.palette;\n const lengthPercent = lengthToPercent[width || 'default'];\n const LinkHeaderColor = 'rgb(135,206,235,0.5)';\n return css`\n flex-grow: 1;\n margin: 0.25rem;\n height: 0.875rem;\n width: ${lengthPercent};\n ${variant === 'default'\n ? `background-color: ${skeletonBackground}`\n : `background-color: ${LinkHeaderColor}`}\n `;\n});\n\nStyledLineSkeleton.defaultProps = defaultThemeProp;\n\nconst LineSkeleton: FunctionComponent<LineSkeletonProps & ForwardProps> = (\n props: LineSkeletonProps\n) => {\n return <StyledLineSkeleton {...props} aria-disabled='true' />;\n};\n\nLineSkeleton.defaultProps = defaultProps;\n\nexport default LineSkeleton;\n"]}
@@ -1,5 +1,5 @@
1
- import { FunctionComponent, ReactNode } from 'react';
2
- import { BaseProps, ForwardProps } from '../../types';
1
+ import type { FunctionComponent, ReactNode } from 'react';
2
+ import type { BaseProps, ForwardProps } from '../../types';
3
3
  export interface ParagraphSkeletonProps extends BaseProps {
4
4
  /** Children for the skeleton. These should be Line and Rectangle Skeletons. */
5
5
  children: ReactNode;
@@ -1 +1 @@
1
- {"version":3,"file":"ParagraphSkeleton.d.ts","sourceRoot":"","sources":["../../../src/components/Skeleton/ParagraphSkeleton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGrD,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAGtD,MAAM,WAAW,sBAAuB,SAAQ,SAAS;IACvD,+EAA+E;IAC/E,QAAQ,EAAE,SAAS,CAAC;CACrB;AAUD,QAAA,MAAM,iBAAiB,EAAE,iBAAiB,CAAC,sBAAsB,GAAG,YAAY,CAS/E,CAAC;AAIF,eAAe,iBAAiB,CAAC"}
1
+ {"version":3,"file":"ParagraphSkeleton.d.ts","sourceRoot":"","sources":["../../../src/components/Skeleton/ParagraphSkeleton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAG1D,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAG3D,MAAM,WAAW,sBAAuB,SAAQ,SAAS;IACvD,+EAA+E;IAC/E,QAAQ,EAAE,SAAS,CAAC;CACrB;AAUD,QAAA,MAAM,iBAAiB,EAAE,iBAAiB,CAAC,sBAAsB,GAAG,YAAY,CAS/E,CAAC;AAIF,eAAe,iBAAiB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ParagraphSkeleton.js","sourceRoot":"","sources":["../../../src/components/Skeleton/ParagraphSkeleton.tsx"],"names":[],"mappings":";AACA,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAGvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAO/C,MAAM,YAAY,GAAoC,EAAE,CAAC;AAEzD,MAAM,uBAAuB,GAAG,MAAM,CAAC,GAAG,CAAwB;;CAEjE,CAAC;AAEF,uBAAuB,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAExD,MAAM,iBAAiB,GAA6D,CAAC,EACnF,QAAQ,EACR,GAAG,SAAS,EACW,EAAE,EAAE;IAC3B,OAAO,CACL,KAAC,uBAAuB,OAAK,SAAS,mBAAgB,MAAM,YACzD,QAAQ,GACe,CAC3B,CAAC;AACJ,CAAC,CAAC;AAEF,iBAAiB,CAAC,YAAY,GAAG,YAAY,CAAC;AAE9C,eAAe,iBAAiB,CAAC","sourcesContent":["import { FunctionComponent, ReactNode } from 'react';\nimport styled from 'styled-components';\n\nimport { BaseProps, ForwardProps } from '../../types';\nimport { defaultThemeProp } from '../../theme';\n\nexport interface ParagraphSkeletonProps extends BaseProps {\n /** Children for the skeleton. These should be Line and Rectangle Skeletons. */\n children: ReactNode;\n}\n\nconst defaultProps: Partial<ParagraphSkeletonProps> = {};\n\nconst StyledParagraphSkeleton = styled.div<ParagraphSkeletonProps>`\n margin: 0.25rem 0;\n`;\n\nStyledParagraphSkeleton.defaultProps = defaultThemeProp;\n\nconst ParagraphSkeleton: FunctionComponent<ParagraphSkeletonProps & ForwardProps> = ({\n children,\n ...restProps\n}: ParagraphSkeletonProps) => {\n return (\n <StyledParagraphSkeleton {...restProps} aria-disabled='true'>\n {children}\n </StyledParagraphSkeleton>\n );\n};\n\nParagraphSkeleton.defaultProps = defaultProps;\n\nexport default ParagraphSkeleton;\n"]}
1
+ {"version":3,"file":"ParagraphSkeleton.js","sourceRoot":"","sources":["../../../src/components/Skeleton/ParagraphSkeleton.tsx"],"names":[],"mappings":";AACA,OAAO,MAAM,MAAM,mBAAmB,CAAC;AAGvC,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAO/C,MAAM,YAAY,GAAoC,EAAE,CAAC;AAEzD,MAAM,uBAAuB,GAAG,MAAM,CAAC,GAAG,CAAwB;;CAEjE,CAAC;AAEF,uBAAuB,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAExD,MAAM,iBAAiB,GAA6D,CAAC,EACnF,QAAQ,EACR,GAAG,SAAS,EACW,EAAE,EAAE;IAC3B,OAAO,CACL,KAAC,uBAAuB,OAAK,SAAS,mBAAgB,MAAM,YACzD,QAAQ,GACe,CAC3B,CAAC;AACJ,CAAC,CAAC;AAEF,iBAAiB,CAAC,YAAY,GAAG,YAAY,CAAC;AAE9C,eAAe,iBAAiB,CAAC","sourcesContent":["import type { FunctionComponent, ReactNode } from 'react';\nimport styled from 'styled-components';\n\nimport type { BaseProps, ForwardProps } from '../../types';\nimport { defaultThemeProp } from '../../theme';\n\nexport interface ParagraphSkeletonProps extends BaseProps {\n /** Children for the skeleton. These should be Line and Rectangle Skeletons. */\n children: ReactNode;\n}\n\nconst defaultProps: Partial<ParagraphSkeletonProps> = {};\n\nconst StyledParagraphSkeleton = styled.div<ParagraphSkeletonProps>`\n margin: 0.25rem 0;\n`;\n\nStyledParagraphSkeleton.defaultProps = defaultThemeProp;\n\nconst ParagraphSkeleton: FunctionComponent<ParagraphSkeletonProps & ForwardProps> = ({\n children,\n ...restProps\n}: ParagraphSkeletonProps) => {\n return (\n <StyledParagraphSkeleton {...restProps} aria-disabled='true'>\n {children}\n </StyledParagraphSkeleton>\n );\n};\n\nParagraphSkeleton.defaultProps = defaultProps;\n\nexport default ParagraphSkeleton;\n"]}
@@ -1,5 +1,5 @@
1
- import { FunctionComponent } from 'react';
2
- import { BaseProps, ForwardProps } from '../../types';
1
+ import type { FunctionComponent } from 'react';
2
+ import type { BaseProps, ForwardProps } from '../../types';
3
3
  export interface RectangleSkeletonProps extends BaseProps {
4
4
  /**
5
5
  * Width of the skeleton.
@@ -1 +1 @@
1
- {"version":3,"file":"RectangleSkeleton.d.ts","sourceRoot":"","sources":["../../../src/components/Skeleton/RectangleSkeleton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAG1C,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAGtD,MAAM,WAAW,sBAAuB,SAAQ,SAAS;IACvD;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB;;;OAGG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC;CAChC;AAQD,eAAO,MAAM,uBAAuB,sIAclC,CAAC;AAIH,QAAA,MAAM,iBAAiB,EAAE,iBAAiB,CAAC,sBAAsB,GAAG,YAAY,CAI/E,CAAC;AAIF,eAAe,iBAAiB,CAAC"}
1
+ {"version":3,"file":"RectangleSkeleton.d.ts","sourceRoot":"","sources":["../../../src/components/Skeleton/RectangleSkeleton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAG/C,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAG3D,MAAM,WAAW,sBAAuB,SAAQ,SAAS;IACvD;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB;;;OAGG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,QAAQ,CAAC;CAChC;AAQD,eAAO,MAAM,uBAAuB,sIAclC,CAAC;AAIH,QAAA,MAAM,iBAAiB,EAAE,iBAAiB,CAAC,sBAAsB,GAAG,YAAY,CAI/E,CAAC;AAIF,eAAe,iBAAiB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"RectangleSkeleton.js","sourceRoot":"","sources":["../../../src/components/Skeleton/RectangleSkeleton.tsx"],"names":[],"mappings":";AACA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAGhD,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAoB/C,MAAM,YAAY,GAAoC;IACpD,KAAK,EAAE,MAAM;IACb,MAAM,EAAE,MAAM;IACd,OAAO,EAAE,SAAS;CACnB,CAAC;AAEF,MAAM,CAAC,MAAM,uBAAuB,GAAG,MAAM,CAAC,GAAG,CAAkC,KAAK,CAAC,EAAE;IACzF,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;IACzC,MAAM,EAAE,QAAQ,EAAE,kBAAkB,EAAE,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC;IAClE,MAAM,EAAE,eAAe,EAAE,YAAY,EAAE,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC;IAC3D,OAAO,GAAG,CAAA;;wBAEY,kBAAkB;MACpC,OAAO,KAAK,QAAQ;QACpB,CAAC,CAAC,2BAA2B,YAAY;;mBAE5B;QACb,CAAC,CAAC,UAAU,KAAK;gBACP,MAAM,EAAE;GACrB,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,uBAAuB,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAExD,MAAM,iBAAiB,GAA6D,CAClF,KAA6B,EAC7B,EAAE;IACF,OAAO,KAAC,uBAAuB,OAAK,KAAK,mBAAgB,MAAM,GAAG,CAAC;AACrE,CAAC,CAAC;AAEF,iBAAiB,CAAC,YAAY,GAAG,YAAY,CAAC;AAE9C,eAAe,iBAAiB,CAAC","sourcesContent":["import { FunctionComponent } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport { BaseProps, ForwardProps } from '../../types';\nimport { defaultThemeProp } from '../../theme';\n\nexport interface RectangleSkeletonProps extends BaseProps {\n /**\n * Width of the skeleton.\n * @default 'auto'\n */\n width?: string | number;\n /**\n * Height of the skeleton.\n * @default 'auto'\n */\n height?: string | number;\n /**\n * Variant of the skeleton.\n * @default 'default'\n */\n variant?: 'default' | 'button';\n}\n\nconst defaultProps: Partial<RectangleSkeletonProps> = {\n width: 'auto',\n height: 'auto',\n variant: 'default'\n};\n\nexport const StyledRectangleSkeleton = styled.div<Partial<RectangleSkeletonProps>>(props => {\n const { width, height, variant } = props;\n const { skeleton: skeletonBackground } = props.theme.base.palette;\n const { 'border-radius': borderRadius } = props.theme.base;\n return css`\n margin: 0.25rem;\n background-color: ${skeletonBackground};\n ${variant === 'button'\n ? `border-radius: calc(2 * ${borderRadius});\n width: 6.875rem;\n height: 2rem`\n : `width: ${width};\n height: ${height}`}\n `;\n});\n\nStyledRectangleSkeleton.defaultProps = defaultThemeProp;\n\nconst RectangleSkeleton: FunctionComponent<RectangleSkeletonProps & ForwardProps> = (\n props: RectangleSkeletonProps\n) => {\n return <StyledRectangleSkeleton {...props} aria-disabled='true' />;\n};\n\nRectangleSkeleton.defaultProps = defaultProps;\n\nexport default RectangleSkeleton;\n"]}
1
+ {"version":3,"file":"RectangleSkeleton.js","sourceRoot":"","sources":["../../../src/components/Skeleton/RectangleSkeleton.tsx"],"names":[],"mappings":";AACA,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAGhD,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAoB/C,MAAM,YAAY,GAAoC;IACpD,KAAK,EAAE,MAAM;IACb,MAAM,EAAE,MAAM;IACd,OAAO,EAAE,SAAS;CACnB,CAAC;AAEF,MAAM,CAAC,MAAM,uBAAuB,GAAG,MAAM,CAAC,GAAG,CAAkC,KAAK,CAAC,EAAE;IACzF,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;IACzC,MAAM,EAAE,QAAQ,EAAE,kBAAkB,EAAE,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC;IAClE,MAAM,EAAE,eAAe,EAAE,YAAY,EAAE,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC;IAC3D,OAAO,GAAG,CAAA;;wBAEY,kBAAkB;MACpC,OAAO,KAAK,QAAQ;QACpB,CAAC,CAAC,2BAA2B,YAAY;;mBAE5B;QACb,CAAC,CAAC,UAAU,KAAK;gBACP,MAAM,EAAE;GACrB,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,uBAAuB,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAExD,MAAM,iBAAiB,GAA6D,CAClF,KAA6B,EAC7B,EAAE;IACF,OAAO,KAAC,uBAAuB,OAAK,KAAK,mBAAgB,MAAM,GAAG,CAAC;AACrE,CAAC,CAAC;AAEF,iBAAiB,CAAC,YAAY,GAAG,YAAY,CAAC;AAE9C,eAAe,iBAAiB,CAAC","sourcesContent":["import type { FunctionComponent } from 'react';\nimport styled, { css } from 'styled-components';\n\nimport type { BaseProps, ForwardProps } from '../../types';\nimport { defaultThemeProp } from '../../theme';\n\nexport interface RectangleSkeletonProps extends BaseProps {\n /**\n * Width of the skeleton.\n * @default 'auto'\n */\n width?: string | number;\n /**\n * Height of the skeleton.\n * @default 'auto'\n */\n height?: string | number;\n /**\n * Variant of the skeleton.\n * @default 'default'\n */\n variant?: 'default' | 'button';\n}\n\nconst defaultProps: Partial<RectangleSkeletonProps> = {\n width: 'auto',\n height: 'auto',\n variant: 'default'\n};\n\nexport const StyledRectangleSkeleton = styled.div<Partial<RectangleSkeletonProps>>(props => {\n const { width, height, variant } = props;\n const { skeleton: skeletonBackground } = props.theme.base.palette;\n const { 'border-radius': borderRadius } = props.theme.base;\n return css`\n margin: 0.25rem;\n background-color: ${skeletonBackground};\n ${variant === 'button'\n ? `border-radius: calc(2 * ${borderRadius});\n width: 6.875rem;\n height: 2rem`\n : `width: ${width};\n height: ${height}`}\n `;\n});\n\nStyledRectangleSkeleton.defaultProps = defaultThemeProp;\n\nconst RectangleSkeleton: FunctionComponent<RectangleSkeletonProps & ForwardProps> = (\n props: RectangleSkeletonProps\n) => {\n return <StyledRectangleSkeleton {...props} aria-disabled='true' />;\n};\n\nRectangleSkeleton.defaultProps = defaultProps;\n\nexport default RectangleSkeleton;\n"]}
@@ -1,4 +1,4 @@
1
- import { FC } from 'react';
1
+ import type { FC } from 'react';
2
2
  interface SkipLink {
3
3
  label: string;
4
4
  target: {
@@ -1 +1 @@
1
- {"version":3,"file":"SkipLinks.d.ts","sourceRoot":"","sources":["../../../src/components/SkipLinks/SkipLinks.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAQ,MAAM,OAAO,CAAC;AAgBjC,UAAU,QAAQ;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC;CACjD;AAED,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,QAAQ,EAAE,CAAC;CACnB;AASD,eAAO,MAAM,eAAe,8TAkB1B,CAAC;AAgBH,QAAA,MAAM,SAAS,EAAE,EAAE,CAAC,cAAc,CAkFhC,CAAC;AAEH,eAAe,SAAS,CAAC"}
1
+ {"version":3,"file":"SkipLinks.d.ts","sourceRoot":"","sources":["../../../src/components/SkipLinks/SkipLinks.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAgBhC,UAAU,QAAQ;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC;CACjD;AAED,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,QAAQ,EAAE,CAAC;CACnB;AASD,eAAO,MAAM,eAAe,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AU,CAAC;6CACvC,KAAK,CAAC,GAAG,CAAC;6CACV,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,CACV,KAAC,QAAQ,IAAC,OAAO,EAAE,GAAG,IAAO,GAAG,CAAI,CACrC,CAAC,GACC,KARiB,QAAQ,CAS5B,CACP,CAAC;wBACJ,CAAC,CAAC,GACG,IACF,CACR,IACI,CACR,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,SAAS,CAAC","sourcesContent":["import { FC, memo } from 'react';\nimport styled, { css } from 'styled-components';\nimport { hideVisually } from 'polished';\nimport { Shortcut } from 'shortcuts';\n\nimport { defaultThemeProp } from '../../theme';\nimport { focusHeadingOrContainer } from '../../utils';\nimport Button, { StyledButtonLink } from '../Button';\nimport Popover from '../Popover';\nimport Flex from '../Flex';\nimport { Keyboard } from '../Badges';\nimport Text from '../Text';\nimport Grid from '../Grid';\nimport { useI18n, useShortcutManager, useUID } from '../../hooks';\nimport { Translation } from '../../i18n';\n\ninterface SkipLink {\n label: string;\n target: { ariaLabel: string; selector: string };\n}\n\nexport interface SkipLinksProps {\n items: SkipLink[];\n}\n\nconst StyledSkipLinksItems = styled.div`\n & > ${StyledButtonLink} {\n display: block;\n margin-inline-start: 0;\n }\n`;\n\nexport const StyledSkipLinks = styled(Popover)(props => {\n const {\n theme: {\n base: { 'z-index': zIndices }\n }\n } = props;\n\n const z = Math.max(...Object.values(zIndices)) + 1;\n\n return css`\n position: fixed;\n z-index: ${z};\n\n &:not(:focus-within) {\n z-index: -1;\n ${hideVisually}\n }\n `;\n});\n\nStyledSkipLinks.defaultProps = defaultThemeProp;\n\nconst StyledShortcuts = styled.div(({ theme }) => {\n return css`\n border-block-start: 0.0625rem solid ${theme.base.palette['border-line']};\n\n [role='listitem'] {\n display: contents;\n }\n `;\n});\n\nStyledShortcuts.defaultProps = defaultThemeProp;\n\nconst SkipLinks: FC<SkipLinksProps> = memo(({ items }: SkipLinksProps) => {\n const bindings = useShortcutManager();\n const t = useI18n();\n const shortcutHeadingId = useUID();\n\n return (\n <Flex\n as={StyledSkipLinks}\n portal={false}\n container={{ direction: 'column' }}\n placement='bottom-end'\n target={{\n getBoundingClientRect: () => ({\n height: 0,\n width: 0,\n x: 24,\n y: 24,\n top: 24,\n bottom: 24,\n left: 24,\n right: 24\n })\n }}\n modifiers={[\n {\n name: 'placeAndContain',\n enabled: false\n }\n ]}\n data-app-region\n aria-label={t('skip_navigation_menu_label')}\n >\n <Flex container={{ direction: 'column', gap: 0.5, pad: 1 }} as={StyledSkipLinksItems}>\n {items.map(item => (\n <Button\n variant='link'\n key={item.label}\n onClick={() =>\n focusHeadingOrContainer(\n document.querySelector(item.target.selector) ?? document,\n item.target.ariaLabel\n )\n }\n >\n {item.label}\n </Button>\n ))}\n </Flex>\n\n {Object.entries(bindings).length > 0 && (\n <Flex container={{ direction: 'column', gap: 1, pad: 1 }} as={StyledShortcuts}>\n <Text variant='h2' as='span' id={shortcutHeadingId}>\n {t('shortcuts')}\n </Text>\n <Grid\n container={{\n cols: 'auto minmax(0, 1fr)',\n gap: 1,\n alignItems: 'center'\n }}\n role='list'\n aria-labelledby={shortcutHeadingId}\n >\n {Object.entries(bindings).map(([actionId, { keyBinding }]) => {\n return (\n <div role='listitem' key={actionId}>\n <Text>{t(`shortcut_${actionId}` as keyof Translation)}</Text>\n <Flex container={{ gap: 0.5 }}>\n {Shortcut.shortcut2accelerator(keyBinding)\n .split('+')\n .map(key => (\n <Keyboard keyName={key} key={key} />\n ))}\n </Flex>\n </div>\n );\n })}\n </Grid>\n </Flex>\n )}\n </Flex>\n );\n});\n\nexport default SkipLinks;\n"]}
1
+ {"version":3,"file":"SkipLinks.js","sourceRoot":"","sources":["../../../src/components/SkipLinks/SkipLinks.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAE7B,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,YAAY,EA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led-components';\nimport { hideVisually } from 'polished';\nimport { Shortcut } from 'shortcuts';\n\nimport { defaultThemeProp } from '../../theme';\nimport { focusHeadingOrContainer } from '../../utils';\nimport Button, { StyledButtonLink } from '../Button';\nimport Popover from '../Popover';\nimport Flex from '../Flex';\nimport { Keyboard } from '../Badges';\nimport Text from '../Text';\nimport Grid from '../Grid';\nimport { useI18n, useShortcutManager, useUID } from '../../hooks';\nimport type { Translation } from '../../i18n';\n\ninterface SkipLink {\n label: string;\n target: { ariaLabel: string; selector: string };\n}\n\nexport interface SkipLinksProps {\n items: SkipLink[];\n}\n\nconst StyledSkipLinksItems = styled.div`\n & > ${StyledButtonLink} {\n display: block;\n margin-inline-start: 0;\n }\n`;\n\nexport const StyledSkipLinks = styled(Popover)(props => {\n const {\n theme: {\n base: { 'z-index': zIndices }\n }\n } = props;\n\n const z = Math.max(...Object.values(zIndices)) + 1;\n\n return css`\n position: fixed;\n z-index: ${z};\n\n &:not(:focus-within) {\n z-index: -1;\n ${hideVisually}\n }\n `;\n});\n\nStyledSkipLinks.defaultProps = defaultThemeProp;\n\nconst StyledShortcuts = styled.div(({ theme }) => {\n return css`\n border-block-start: 0.0625rem solid ${theme.base.palette['border-line']};\n\n [role='listitem'] {\n display: contents;\n }\n `;\n});\n\nStyledShortcuts.defaultProps = defaultThemeProp;\n\nconst SkipLinks: FC<SkipLinksProps> = memo(({ items }: SkipLinksProps) => {\n const bindings = useShortcutManager();\n const t = useI18n();\n const shortcutHeadingId = useUID();\n\n return (\n <Flex\n as={StyledSkipLinks}\n portal={false}\n container={{ direction: 'column' }}\n placement='bottom-end'\n target={{\n getBoundingClientRect: () => ({\n height: 0,\n width: 0,\n x: 24,\n y: 24,\n top: 24,\n bottom: 24,\n left: 24,\n right: 24\n })\n }}\n modifiers={[\n {\n name: 'placeAndContain',\n enabled: false\n }\n ]}\n data-app-region\n aria-label={t('skip_navigation_menu_label')}\n >\n <Flex container={{ direction: 'column', gap: 0.5, pad: 1 }} as={StyledSkipLinksItems}>\n {items.map(item => (\n <Button\n variant='link'\n key={item.label}\n onClick={() =>\n focusHeadingOrContainer(\n document.querySelector(item.target.selector) ?? document,\n item.target.ariaLabel\n )\n }\n >\n {item.label}\n </Button>\n ))}\n </Flex>\n\n {Object.entries(bindings).length > 0 && (\n <Flex container={{ direction: 'column', gap: 1, pad: 1 }} as={StyledShortcuts}>\n <Text variant='h2' as='span' id={shortcutHeadingId}>\n {t('shortcuts')}\n </Text>\n <Grid\n container={{\n cols: 'auto minmax(0, 1fr)',\n gap: 1,\n alignItems: 'center'\n }}\n role='list'\n aria-labelledby={shortcutHeadingId}\n >\n {Object.entries(bindings).map(([actionId, { keyBinding }]) => {\n return (\n <div role='listitem' key={actionId}>\n <Text>{t(`shortcut_${actionId}` as keyof Translation)}</Text>\n <Flex container={{ gap: 0.5 }}>\n {Shortcut.shortcut2accelerator(keyBinding)\n .split('+')\n .map(key => (\n <Keyboard keyName={key} key={key} />\n ))}\n </Flex>\n </div>\n );\n })}\n </Grid>\n </Flex>\n )}\n </Flex>\n );\n});\n\nexport default SkipLinks;\n"]}
@@ -1,6 +1,6 @@
1
- import { FunctionComponent } from 'react';
2
- import { ForwardProps } from '../../types';
3
- import SliderProps from './Slider.types';
1
+ import type { FunctionComponent } from 'react';
2
+ import type { ForwardProps } from '../../types';
3
+ import type SliderProps from './Slider.types';
4
4
  declare const _default: FunctionComponent<SliderProps & ForwardProps> & {
5
5
  getTestIds: (testIdProp?: string | undefined) => import("../../types").TestIdsRecord<readonly ["control", "label", "info", "additional-info", "suggestion-accept", "suggestion-reject"]>;
6
6
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Slider.d.ts","sourceRoot":"","sources":["../../../src/components/Slider/Slider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,iBAAiB,EAUlB,MAAM,OAAO,CAAC;AAOf,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAG3C,OAAO,WAAW,MAAM,gBAAgB,CAAC;;;;AAwQzC,wBAAqD"}
1
+ {"version":3,"file":"Slider.d.ts","sourceRoot":"","sources":["../../../src/components/Slider/Slider.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAEV,iBAAiB,EAKlB,MAAM,OAAO,CAAC;AAOf,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAGhD,OAAO,KAAK,WAAW,MAAM,gBAAgB,CAAC;;;;AAwQ9C,wBAAqD"}
@@ -1 +1 @@
1
- {"version":3,"file":"Slider.js","sourceRoot":"","sources":["../../../src/components/Slider/Slider.tsx"],"names":[],"mappings":";AAAA,OAAO,EAIL,WAAW,EACX,SAAS,EACT,MAAM,EACN,QAAQ,EAER,UAAU,EAGX,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACnF,OAAO,SAAS,MAAM,cAAc,CAAC;AACrC,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,IAAI,MAAM,SAAS,CAAC;AAE3B,OAAO,EAAE,GAAG,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAG/C,OAAO,EACL,YAAY,EACZ,WAAW,EACX,WAAW,EACX,wBAAwB,EACxB,SAAS,EACT,aAAa,EACd,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAChE,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAErD,MAAM,MAAM,GAAkD,UAAU,CAAC,SAAS,MAAM,CACtF,KAAmC,EACnC,GAAwB;IAExB,MAAM,GAAG,GAAG,MAAM,EAAE,CAAC;IACrB,MAAM,EACJ,MAAM,EACN,EAAE,GAAG,GAAG,EACR,QAAQ,EACR,MAAM,EACN,IAAI,EACJ,KAAK,E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PropsWithoutRef,\n useCallback,\n useEffect,\n useRef,\n useState,\n CSSProperties,\n forwardRef,\n Ref,\n TouchEvent as ReactTouchEvent\n} from 'react';\n\nimport { NumberInput } from '../Number';\nimport { useConsolidatedRef, useDirection, useTestIds, useUID } from '../../hooks';\nimport FormField from '../FormField';\nimport Flex from '../Flex';\nimport Grid from '../Grid';\nimport { ForwardProps } from '../../types';\nimport { cap, withTestIds } from '../../utils';\n\nimport SliderProps from './Slider.types';\nimport {\n StyledSlider,\n StyledTrack,\n StyledThumb,\n StyledSliderTrackWrapper,\n StyledBar,\n StyledPreview\n} from './Slider.styles';\nimport { calculateValueLength, getNearestValue } from './utils';\nimport SliderTicks from './SliderTicks';\nimport { getSliderTestIds } from './Slider.test-ids';\n\nconst Slider: FunctionComponent<SliderProps & ForwardProps> = forwardRef(function Slider(\n props: PropsWithoutRef<SliderProps>,\n ref: Ref<HTMLDivElement>\n) {\n const uid = useUID();\n const {\n testId,\n id = uid,\n required,\n status,\n info,\n label,\n labelHidden,\n min = 0,\n max = 100,\n step = 1,\n value = min,\n orientation = 'horizontal',\n preview,\n disabled = false,\n readOnly = false,\n showInput = true,\n showProgress,\n ticks = {},\n additionalInfo,\n onChange,\n autoFocus,\n onDragStart,\n onDragEnd: onDragEndProp,\n ...restProps\n } = props;\n\n const testIds = useTestIds(testId, getSliderTestIds);\n\n const thumbRef = useConsolidatedRef<HTMLDivElement>(ref);\n const trackRef = useRef<HTMLDivElement>(null);\n const [inDrag, setInDrag] = useState(false);\n const [inputValue, setInputValue] = useState(value.toString());\n\n const setValue = useCallback(\n (newValue: number) => {\n if (disabled || readOnly) return;\n const normalizedValue = Math.min(Math.max(newValue, min), max);\n\n setInputValue(normalizedValue.toString());\n onChange(normalizedValue);\n },\n [disabled, readOnly, onChange]\n );\n\n const { start, end } = useDirection();\n\n const moveThumb = useCallback(\n (e: MouseEvent | TouchEvent) => {\n if (disabled || readOnly) return;\n if (trackRef.current) {\n const track = trackRef.current.getBoundingClientRect();\n const { clientX, clientY } = 'touches' in e ? e.touches[0] : e;\n const newPosition =\n orientation === 'horizontal'\n ? (clientX - track[start]) / (track[end] - track[start])\n : (clientY - track.bottom) / (track.top - track.bottom);\n\n const normalizedValue = Math.min(Math.max(min + (max - min) * newPosition, min), max);\n setValue(getNearestValue(normalizedValue, min, max, step));\n }\n thumbRef.current?.focus();\n },\n [disabled, readOnly, step, min, max, setValue, start, end]\n );\n\n const onThumbKeyDown = useCallback(\n (e: KeyboardEvent<HTMLDivElement>) => {\n if (\n [\n 'ArrowDown',\n 'ArrowUp',\n 'ArrowLeft',\n 'ArrowRight',\n 'PageUp',\n 'PageDown',\n 'Home',\n 'End'\n ].includes(e.key)\n )\n e.preventDefault();\n\n switch (e.key) {\n case 'ArrowDown':\n case `Arrow${cap(start)}`:\n setValue(value - step);\n break;\n case 'ArrowUp':\n case `Arrow${cap(end)}`:\n setValue(value + step);\n break;\n case 'PageUp':\n setValue(value + 10 * step);\n break;\n case 'PageDown':\n setValue(value - 10 * step);\n break;\n case 'Home':\n setValue(min);\n break;\n case 'End':\n setValue(max);\n break;\n default:\n }\n },\n [setValue, value, step, start, end]\n );\n\n useEffect(() => {\n const onDragEnd = () => {\n setInDrag(false);\n if (inDrag) onDragEndProp?.();\n };\n\n document.addEventListener('mouseup', onDragEnd);\n document.addEventListener('touchend', onDragEnd);\n document.addEventListener('touchcancel', onDragEnd);\n if (inDrag) {\n document.addEventListener('mousemove', moveThumb);\n document.addEventListener('touchmove', moveThumb);\n }\n\n return () => {\n document.removeEventListener('mouseup', onDragEnd);\n document.removeEventListener('touchend', onDragEnd);\n document.removeEventListener('touchcancel', onDragEnd);\n document.removeEventListener('mousemove', moveThumb);\n document.removeEventListener('touchmove', moveThumb);\n };\n }, [inDrag, moveThumb, onDragEndProp]);\n\n useEffect(() => {\n if (autoFocus) thumbRef.current?.focus();\n }, [autoFocus]);\n\n const percentage = ((Number(value) - min) / (max - min)) * 100;\n const size = calculateValueLength(min, max, step);\n\n const Comp = (\n <Flex\n data-testid={testIds.root}\n {...restProps}\n as={StyledSlider}\n container={{\n alignItems: 'start',\n direction: orientation === 'horizontal' ? 'row' : 'column'\n }}\n orientation={orientation}\n status={status}\n disabled={disabled}\n readOnly={readOnly}\n size={size}\n style={\n {\n '--slider-value': `${percentage}%`,\n userSelect: inDrag ? 'none' : 'auto'\n } as CSSProperties\n }\n >\n <Grid as={StyledSliderTrackWrapper} container>\n <Flex\n as={StyledTrack}\n ref={trackRef}\n onMouseDown={moveThumb}\n container={{ alignItems: 'center', justify: 'center' }}\n >\n <StyledBar showProgress={showProgress} />\n <StyledThumb\n ref={thumbRef}\n role='slider'\n tabIndex={0}\n onKeyDown={onThumbKeyDown}\n onMouseDown={() => {\n setInDrag(true);\n onDragStart?.();\n }}\n onTouchStart={(e: ReactTouchEvent<HTMLDivElement>) => {\n setInDrag(true);\n e.preventDefault(); // Prevent dispatching mouse events as some browser may do that\n onDragStart?.();\n }}\n aria-valuemin={min}\n aria-valuemax={max}\n aria-valuenow={value}\n aria-orientation={orientation}\n aria-readonly={readOnly || undefined}\n aria-disabled={disabled || undefined}\n id={id}\n aria-label={label?.toString()}\n aria-describedby={`${id}-info`}\n aria-controls={`${id}-value`}\n />\n </Flex>\n {Object.keys(ticks).length > 0 && (\n <SliderTicks\n ticks={ticks}\n min={min}\n max={max}\n step={step}\n orientation={orientation}\n onClick={setValue}\n />\n )}\n </Grid>\n {showInput && !preview && (\n <NumberInput\n data-testid={testIds.control}\n id={`${id}-value`}\n status={status}\n min={min}\n max={max}\n step={step}\n value={inputValue}\n showGroupSeparators={false}\n onChange={setInputValue}\n onBlur={v => setValue(getNearestValue(Number(v), min, max, step))}\n size={size}\n readOnly={readOnly}\n disabled={disabled}\n aria-label={label?.toString()}\n />\n )}\n {preview && <StyledPreview id={`${id}-value`} value={value.toString()} size={size} />}\n </Flex>\n );\n\n return label ? (\n <FormField\n testId={testIds}\n label={label}\n labelHidden={labelHidden}\n id={id}\n info={info}\n status={status}\n required={required}\n disabled={disabled}\n additionalInfo={additionalInfo}\n >\n {Comp}\n </FormField>\n ) : (\n Comp\n );\n});\n\nexport default withTestIds(Slider, getSliderTestIds);\n"]}
1
+ {"version":3,"file":"Slider.js","sourceRoot":"","sources":["../../../src/components/Slider/Slider.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAU7E,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACnF,OAAO,SAAS,MAAM,cAAc,CAAC;AACrC,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,IAAI,MAAM,SAAS,CAAC;AAE3B,OAAO,EAAE,GAAG,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAG/C,OAAO,EACL,YAAY,EACZ,WAAW,EACX,WAAW,EACX,wBAAwB,EACxB,SAAS,EACT,aAAa,EACd,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAChE,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAErD,MAAM,MAAM,GAAkD,UAAU,CAAC,SAAS,MAAM,CACtF,KAAmC,EACnC,GAAwB;IAExB,MAAM,GAAG,GAAG,MAAM,EAAE,CAAC;IACrB,MAAM,EACJ,MAAM,EACN,EAAE,GAAG,GAAG,EACR,QAAQ,EACR,MAAM,EACN,IAAI,EACJ,KAAK,EACL,WAAW,EACX,GAAG,GAAG,CAAC,EACP,GAAG,GAAG,GAAG,EACT,IAAI,GAAG,CAAC,EACR,KAAK,GAAG,GAAG,EACX,WAAW,GAAG,YAAY,EAC1B,OAAO,EACP,QAAQ,GAAG,KAAK,EAChB,Q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AE,EAAE,GAAG,EAAE,QAAQ,EACjB,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,GAAG,EACR,GAAG,EAAE,GAAG,EACR,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,UAAU,EACjB,mBAAmB,EAAE,KAAK,EAC1B,QAAQ,EAAE,aAAa,EACvB,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,QAAQ,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC,EACjE,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,gBACN,KAAK,EAAE,QAAQ,EAAE,GAC7B,CACH,EACA,OAAO,IAAI,KAAC,aAAa,IAAC,EAAE,EAAE,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,CAAC,QAAQ,EAAE,EAAE,IAAI,EAAE,IAAI,GAAI,IAChF,CACR,CAAC;IAEF,OAAO,KAAK,CAAC,CAAC,CAAC,CACb,KAAC,SAAS,IACR,MAAM,EAAE,OAAO,EACf,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,WAAW,EACxB,EAAE,EAAE,EAAE,EACN,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,cAAc,EAAE,cAAc,YAE7B,IAAI,GACK,CACb,CAAC,CAAC,CAAC,CACF,IAAI,CACL,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,eAAe,WAAW,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC","sourcesContent":["import { useCallback, useEffect, useRef, useState, forwardRef } from 'react';\nimport type {\n KeyboardEvent,\n FunctionComponent,\n PropsWithoutRef,\n CSSProperties,\n Ref,\n TouchEvent as ReactTouchEvent\n} from 'react';\n\nimport { NumberInput } from '../Number';\nimport { useConsolidatedRef, useDirection, useTestIds, useUID } from '../../hooks';\nimport FormField from '../FormField';\nimport Flex from '../Flex';\nimport Grid from '../Grid';\nimport type { ForwardProps } from '../../types';\nimport { cap, withTestIds } from '../../utils';\n\nimport type SliderProps from './Slider.types';\nimport {\n StyledSlider,\n StyledTrack,\n StyledThumb,\n StyledSliderTrackWrapper,\n StyledBar,\n StyledPreview\n} from './Slider.styles';\nimport { calculateValueLength, getNearestValue } from './utils';\nimport SliderTicks from './SliderTicks';\nimport { getSliderTestIds } from './Slider.test-ids';\n\nconst Slider: FunctionComponent<SliderProps & ForwardProps> = forwardRef(function Slider(\n props: PropsWithoutRef<SliderProps>,\n ref: Ref<HTMLDivElement>\n) {\n const uid = useUID();\n const {\n testId,\n id = uid,\n required,\n status,\n info,\n label,\n labelHidden,\n min = 0,\n max = 100,\n step = 1,\n value = min,\n orientation = 'horizontal',\n preview,\n disabled = false,\n readOnly = false,\n showInput = true,\n showProgress,\n ticks = {},\n additionalInfo,\n onChange,\n autoFocus,\n onDragStart,\n onDragEnd: onDragEndProp,\n ...restProps\n } = props;\n\n const testIds = useTestIds(testId, getSliderTestIds);\n\n const thumbRef = useConsolidatedRef<HTMLDivElement>(ref);\n const trackRef = useRef<HTMLDivElement>(null);\n const [inDrag, setInDrag] = useState(false);\n const [inputValue, setInputValue] = useState(value.toString());\n\n const setValue = useCallback(\n (newValue: number) => {\n if (disabled || readOnly) return;\n const normalizedValue = Math.min(Math.max(newValue, min), max);\n\n setInputValue(normalizedValue.toString());\n onChange(normalizedValue);\n },\n [disabled, readOnly, onChange]\n );\n\n const { start, end } = useDirection();\n\n const moveThumb = useCallback(\n (e: MouseEvent | TouchEvent) => {\n if (disabled || readOnly) return;\n if (trackRef.current) {\n const track = trackRef.current.getBoundingClientRect();\n const { clientX, clientY } = 'touches' in e ? e.touches[0] : e;\n const newPosition =\n orientation === 'horizontal'\n ? (clientX - track[start]) / (track[end] - track[start])\n : (clientY - track.bottom) / (track.top - track.bottom);\n\n const normalizedValue = Math.min(Math.max(min + (max - min) * newPosition, min), max);\n setValue(getNearestValue(normalizedValue, min, max, step));\n }\n thumbRef.current?.focus();\n },\n [disabled, readOnly, step, min, max, setValue, start, end]\n );\n\n const onThumbKeyDown = useCallback(\n (e: KeyboardEvent<HTMLDivElement>) => {\n if (\n [\n 'ArrowDown',\n 'ArrowUp',\n 'ArrowLeft',\n 'ArrowRight',\n 'PageUp',\n 'PageDown',\n 'Home',\n 'End'\n ].includes(e.key)\n )\n e.preventDefault();\n\n switch (e.key) {\n case 'ArrowDown':\n case `Arrow${cap(start)}`:\n setValue(value - step);\n break;\n case 'ArrowUp':\n case `Arrow${cap(end)}`:\n setValue(value + step);\n break;\n case 'PageUp':\n setValue(value + 10 * step);\n break;\n case 'PageDown':\n setValue(value - 10 * step);\n break;\n case 'Home':\n setValue(min);\n break;\n case 'End':\n setValue(max);\n break;\n default:\n }\n },\n [setValue, value, step, start, end]\n );\n\n useEffect(() => {\n const onDragEnd = () => {\n setInDrag(false);\n if (inDrag) onDragEndProp?.();\n };\n\n document.addEventListener('mouseup', onDragEnd);\n document.addEventListener('touchend', onDragEnd);\n document.addEventListener('touchcancel', onDragEnd);\n if (inDrag) {\n document.addEventListener('mousemove', moveThumb);\n document.addEventListener('touchmove', moveThumb);\n }\n\n return () => {\n document.removeEventListener('mouseup', onDragEnd);\n document.removeEventListener('touchend', onDragEnd);\n document.removeEventListener('touchcancel', onDragEnd);\n document.removeEventListener('mousemove', moveThumb);\n document.removeEventListener('touchmove', moveThumb);\n };\n }, [inDrag, moveThumb, onDragEndProp]);\n\n useEffect(() => {\n if (autoFocus) thumbRef.current?.focus();\n }, [autoFocus]);\n\n const percentage = ((Number(value) - min) / (max - min)) * 100;\n const size = calculateValueLength(min, max, step);\n\n const Comp = (\n <Flex\n data-testid={testIds.root}\n {...restProps}\n as={StyledSlider}\n container={{\n alignItems: 'start',\n direction: orientation === 'horizontal' ? 'row' : 'column'\n }}\n orientation={orientation}\n status={status}\n disabled={disabled}\n readOnly={readOnly}\n size={size}\n style={\n {\n '--slider-value': `${percentage}%`,\n userSelect: inDrag ? 'none' : 'auto'\n } as CSSProperties\n }\n >\n <Grid as={StyledSliderTrackWrapper} container>\n <Flex\n as={StyledTrack}\n ref={trackRef}\n onMouseDown={moveThumb}\n container={{ alignItems: 'center', justify: 'center' }}\n >\n <StyledBar showProgress={showProgress} />\n <StyledThumb\n ref={thumbRef}\n role='slider'\n tabIndex={0}\n onKeyDown={onThumbKeyDown}\n onMouseDown={() => {\n setInDrag(true);\n onDragStart?.();\n }}\n onTouchStart={(e: ReactTouchEvent<HTMLDivElement>) => {\n setInDrag(true);\n e.preventDefault(); // Prevent dispatching mouse events as some browser may do that\n onDragStart?.();\n }}\n aria-valuemin={min}\n aria-valuemax={max}\n aria-valuenow={value}\n aria-orientation={orientation}\n aria-readonly={readOnly || undefined}\n aria-disabled={disabled || undefined}\n id={id}\n aria-label={label?.toString()}\n aria-describedby={`${id}-info`}\n aria-controls={`${id}-value`}\n />\n </Flex>\n {Object.keys(ticks).length > 0 && (\n <SliderTicks\n ticks={ticks}\n min={min}\n max={max}\n step={step}\n orientation={orientation}\n onClick={setValue}\n />\n )}\n </Grid>\n {showInput && !preview && (\n <NumberInput\n data-testid={testIds.control}\n id={`${id}-value`}\n status={status}\n min={min}\n max={max}\n step={step}\n value={inputValue}\n showGroupSeparators={false}\n onChange={setInputValue}\n onBlur={v => setValue(getNearestValue(Number(v), min, max, step))}\n size={size}\n readOnly={readOnly}\n disabled={disabled}\n aria-label={label?.toString()}\n />\n )}\n {preview && <StyledPreview id={`${id}-value`} value={value.toString()} size={size} />}\n </Flex>\n );\n\n return label ? (\n <FormField\n testId={testIds}\n label={label}\n labelHidden={labelHidden}\n id={id}\n info={info}\n status={status}\n required={required}\n disabled={disabled}\n additionalInfo={additionalInfo}\n >\n {Comp}\n </FormField>\n ) : (\n Comp\n );\n});\n\nexport default withTestIds(Slider, getSliderTestIds);\n"]}
@@ -1,6 +1,6 @@
1
- import { PropsWithDefaults } from '../../types';
2
- import { FormControlProps } from '../FormControl';
3
- import SliderProps from './Slider.types';
1
+ import type { PropsWithDefaults } from '../../types';
2
+ import type { FormControlProps } from '../FormControl';
3
+ import type SliderProps from './Slider.types';
4
4
  export type SliderPropsWithDefaults = PropsWithDefaults<SliderProps>;
5
5
  export declare const StyledThumb: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
6
6
  export declare const StyledBar: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
@@ -1 +1 @@
1
- {"version":3,"file":"Slider.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Slider/Slider.styles.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEhD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAMlD,OAAO,WAAW,MAAM,gBAAgB,CAAC;AAEzC,MAAM,MAAM,uBAAuB,GAAG,iBAAiB,CAAC,WAAW,CAAC,CAAC;AAErE,eAAO,MAAM,WAAW,yGAqCvB,CAAC;AAIF,eAAO,MAAM,SAAS;;SAyCpB,CAAC;AAIH,eAAO,MAAM,WAAW,yGA6BvB,CAAC;AAIF,eAAO,MAAM,oBAAoB,yGAUhC,CAAC;AAIF,eAAO,MAAM,wBAAwB,yGAEpC,CAAC;AAIF,eAAO,MAAM,aAAa;UAAiC,MAAM;SAGhE,CAAC;AAIF,eAAO,MAAM,YAAY;iBACV,UAAU,GAAG,YAAY;YAC9B,gBAAgB,CAAC,QAAQ,CAAC;UAC5B,MAAM;SAkIZ,CAAC;AAIH,eAAO,MAAM,cAAc;;;iBAGZ,YAAY,GAAG,UAAU;SAwDtC,CAAC;AAIH,eAAO,MAAM,gBAAgB,0GAO5B,CAAC"}
1
+ {"version":3,"file":"Slider.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Slider/Slider.styles.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAErD,OAAO,KAA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;;KAGrC;GACF,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,YAAY,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAE7C,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAC,UAAU,CAAC,CAI7C,CAAC,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,WAAW,EAAE,KAAK,EAAE,EAAE,EAAE;IAClE,MAAM,OAAO,GAAG,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC;IAEnC,MAAM,EAAE,GAAG,EAAE,GAAG,YAAY,EAAE,CAAC;IAE/B,OAAO,GAAG,CAAA;;;MAGN,WAAW,KAAK,YAAY;QAC5B,CAAC,CAAC,GAAG,CAAA;;;;;;sBAMW,OAAO;;;;;YAKjB,iBAAiB;YACnB,GAAG,CAAA;;;;;;WAMF;;YAEC,iBAAiB;YACnB,GAAG,CAAA;;;;;;WAMF;SACF;QACH,CAAC,CAAC,GAAG,CAAA;;;;;qBAKU,OAAO;2BACD,OAAO;cACpB,GAAG;YACH,CAAC,CAAC,GAAG,CAAA;;iBAEF;YACH,CAAC,CAAC,GAAG,CAAA;;iBAEF;;SAER;GACN,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,cAAc,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAE/C,MAAM,CAAC,MAAM,gBAAgB,GAAG,MAAM,CAAC,IAAI,CAAA;;;;;;;CAO1C,CAAC;AAEF,gBAAgB,CAAC,YAAY,GAAG,gBAAgB,CAAC","sourcesContent":["import { mix } from 'polished';\nimport styled, { css } from 'styled-components';\n\nimport { useDirection } from '../../hooks';\nimport { defaultThemeProp } from '../../theme';\nimport { PropsWithDefaults } from '../../types';\nimport { tryCatch } from '../../utils';\nimport { FormControlProps } from '../FormControl';\nimport { StyledGrid } from '../Grid';\nimport { NumberDisplay } from '../Number';\nimport StyledNumberInput from '../Number/NumberInput.styles';\nimport StyledInput from '../Input/Input.styles';\n\nimport SliderProps from './Slider.types';\n\nexport type SliderPropsWithDefaults = PropsWithDefaults<SliderProps>;\n\nexport const StyledThumb = styled.div(\n ({\n theme: {\n base: {\n palette: {\n 'primary-background': bgColor,\n 'border-line': borderColor,\n interactive: fgColor\n },\n spacing,\n 'border-radius': borderRadius\n },\n components: { button }\n }\n }) => {\n const hoverBgColor = tryCatch(() => mix(0.2, fgColor, bgColor));\n\n return css`\n border: ${button['border-width']} solid ${borderColor};\n border-radius: calc(${borderRadius} * 3);\n outline: none;\n background-color: ${bgColor};\n width: calc(${spacing} * 3);\n height: calc(${spacing} * 3);\n cursor: pointer;\n\n &:focus {\n box-shadow: ${button['focus-shadow']};\n }\n\n &:hover,\n &:active {\n background-color: ${hoverBgColor};\n border-color: ${fgColor};\n }\n `;\n }\n);\n\nStyledThumb.defaultProps = defaultThemeProp;\n\nexport const StyledBar = styled.div<{ showProgress?: boolean }>(({ theme, showProgress }) => {\n const {\n base: {\n spacing,\n colors,\n 'border-radius': borderRadius,\n palette: { interactive: interactiveColor }\n }\n } = theme;\n\n const { ltr } = useDirection();\n\n return css`\n border-radius: ${borderRadius};\n height: ${spacing};\n width: 100%;\n overflow: hidden;\n position: relative;\n background-color: ${colors.gray.light};\n\n ${showProgress &&\n css`\n ::before {\n position: absolute;\n left: 0;\n top: 0;\n content: '';\n display: block;\n width: 100%;\n height: 100%;\n background-color: ${interactiveColor};\n ${ltr\n ? css`\n transform: translateX(calc(-100% + var(--slider-value, 0)));\n `\n : css`\n transform: translateX(calc(100% - var(--slider-value, 0)));\n `}\n }\n `}\n `;\n});\n\nStyledBar.defaultProps = defaultThemeProp;\n\nexport const StyledTrack = styled.div(\n ({\n theme: {\n base: { spacing }\n }\n }) => {\n const { ltr } = useDirection();\n return css`\n height: calc(${spacing} * 4);\n width: 100%;\n cursor: pointer;\n position: relative;\n\n > ${StyledThumb} {\n z-index: 1;\n position: absolute;\n top: calc(${spacing} / 2);\n left: var(--slider-value);\n right: var(--slider-value);\n ${ltr\n ? css`\n transform: translate(-50%, 0);\n `\n : css`\n transform: translate(50%, 0);\n `}\n }\n `;\n }\n);\n\nStyledTrack.defaultProps = defaultThemeProp;\n\nexport const StyledTicksContainer = styled.div`\n width: 100%;\n\n div {\n &::before {\n content: '';\n display: table;\n background: ${p => p.theme.base.palette['foreground-color']};\n }\n }\n`;\n\nStyledTicksContainer.defaultProps = defaultThemeProp;\n\nexport const StyledSliderTrackWrapper = styled.div`\n width: 100%;\n`;\n\nStyledSliderTrackWrapper.defaultProps = defaultThemeProp;\n\nexport const StyledPreview = styled(NumberDisplay)<{ size: number }>`\n width: ${props => props.size}ch;\n flex-shrink: 0;\n`;\n\nStyledPreview.defaultProps = defaultThemeProp;\n\nexport const StyledSlider = styled.div<{\n orientation: 'vertical' | 'horizontal';\n status: FormControlProps['status'];\n size: number;\n}>(props => {\n const {\n theme: {\n base: { spacing, palette },\n components: { 'form-field': formField }\n },\n status,\n orientation,\n size\n } = props;\n\n const statusColor =\n status && formField[status] ? formField[status]['status-color'] : 'transparent';\n const thumbBgColor = tryCatch(() => mix(0.2, statusColor, palette['primary-background']));\n\n const borderColor =\n status && formField[status] ? formField[status]['status-color'] : palette['border-line'];\n\n return css`\n > span {\n line-height: calc(${spacing} * 4);\n }\n\n ${StyledInput} {\n width: calc(${size}ch + ${spacing});\n }\n\n ${orientation === 'horizontal'\n ? css`\n ${StyledSliderTrackWrapper} {\n margin-inline: calc(1.5 * ${spacing});\n\n ${StyledTrack},\n ${StyledThumb} {\n grid-row: 1;\n }\n\n ${StyledBar} {\n /* extend by thumb width */\n min-width: calc(100% + ${spacing} * 3);\n }\n\n ${StyledTicksContainer} {\n grid-row: 2;\n }\n\n & + ${StyledNumberInput}, & + ${StyledPreview} {\n margin-inline-start: calc(2 * ${spacing});\n text-align: center;\n }\n }\n `\n : css`\n ${StyledSliderTrackWrapper} {\n grid-template-columns: calc(${spacing} * 4) minmax(0, 1fr);\n grid-template-rows: 0.5em [track-start] minmax(calc(${spacing} * 20), max-content) [track-end] 0.5em;\n margin-top: ${spacing};\n\n ${StyledTrack} {\n grid-row: track-start / track-end;\n height: 100%;\n transform: scale(-1);\n\n ${StyledBar} {\n height: 100%;\n width: ${spacing};\n\n ::before {\n transform: translateY(calc(-100% + var(--slider-value, 0)));\n }\n }\n }\n\n ${StyledThumb} {\n grid-row: track-start / track-end;\n top: auto;\n bottom: calc(100% - var(--slider-value));\n left: calc(${spacing} / 2);\n right: calc(${spacing} / 2);\n transform: translate(0, 50%);\n }\n\n ${StyledTicksContainer} {\n grid-row: 1 / -1;\n height: 100%;\n }\n\n & + ${StyledNumberInput}, & + ${StyledPreview} {\n margin-top: calc(2 * ${spacing});\n text-align: center;\n\n input {\n border-radius: inherit;\n }\n }\n }\n `}\n\n &[disabled],\n &[readonly] {\n ${StyledTrack} {\n cursor: default;\n }\n\n ${StyledThumb} {\n cursor: default;\n border-color: ${palette['border-line']};\n :hover,\n :active {\n background-color: ${palette['background-color']};\n }\n }\n }\n\n ${status &&\n css`\n ${StyledBar}::before {\n background-color: ${statusColor};\n }\n\n ${StyledThumb} {\n border-color: ${borderColor};\n :hover,\n :active {\n background-color: ${thumbBgColor};\n }\n }\n `}\n `;\n});\n\nStyledSlider.defaultProps = defaultThemeProp;\n\nexport const StyledTickItem = styled(StyledGrid)<{\n lowerBoundaryItem?: boolean;\n upperBoundaryItem?: boolean;\n orientation: 'horizontal' | 'vertical';\n}>(({ lowerBoundaryItem, upperBoundaryItem, orientation, theme }) => {\n const spacing = theme.base.spacing;\n\n const { ltr } = useDirection();\n\n return css`\n overflow: hidden;\n\n ${orientation === 'horizontal'\n ? css`\n text-align: center;\n text-overflow: ellipsis;\n white-space: nowrap;\n &::before {\n width: 0.0625rem;\n height: ${spacing};\n transform: translateY(-50%);\n margin: 0 auto;\n }\n\n ${lowerBoundaryItem &&\n css`\n text-align: start;\n transform: translate(-0.5ch, 0);\n &::before {\n margin-inline-start: 0.5ch;\n }\n `}\n\n ${upperBoundaryItem &&\n css`\n text-align: end;\n transform: translate(0.5ch, 0);\n &::before {\n margin-inline-end: 0.5ch;\n }\n `}\n `\n : css`\n display: flex;\n align-items: center;\n\n &::before {\n width: ${spacing};\n height: calc(${spacing} / 8);\n ${ltr\n ? css`\n transform: translateX(-50%);\n `\n : css`\n transform: translateX(50%);\n `}\n }\n `}\n `;\n});\n\nStyledTickItem.defaultProps = defaultThemeProp;\n\nexport const StyledTickButton = styled.span`\n cursor: pointer;\n line-height: 1em;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n outline: 0;\n`;\n\nStyledTickButton.defaultProps = defaultThemeProp;\n"]}
1
+ {"version":3,"file":"Slider.styles.js","sourceRoot":"","sources":["../../../src/components/Slider/Slider.styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAC/B,OAAO,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,iBAAiB,MAAM,8BAA8B,CAAC;AAC7D,OAAO,WAAW,MAAM,uBAAuB,CAAC;AAMhD,MAAM,CAAC,MAAM,WAAW,GAAG,MAAM,CAAC,GAAG,CACnC,CAAC,EACC,KAAK,EAAE,EACL,IAAI,EAAE,EACJ,OAAO,EAAE,EACP,oBAAoB,EAAE,OAAO,EAC7B,aAAa,EAAE,WAAW,EAC1B,WAAW,EAAE,OAAO,EACrB,EACD,OAAO,EACP,eAAe,EAAE,YAAY,EAC9B,EACD,UAAU,EAAE,EAAE,MAAM,EAAE,EACvB,EACF,EAAE,EAAE;IACH,MAAM,YAAY,GAAG,QAAQ,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,GA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AAM,EAAE,GAAG,EAAE,GAAG,YAAY,EAAE,CAAC;IAE/B,OAAO,GAAG,CAAA;;;MAGN,WAAW,KAAK,YAAY;QAC5B,CAAC,CAAC,GAAG,CAAA;;;;;;sBAMW,OAAO;;;;;YAKjB,iBAAiB;YACnB,GAAG,CAAA;;;;;;WAMF;;YAEC,iBAAiB;YACnB,GAAG,CAAA;;;;;;WAMF;SACF;QACH,CAAC,CAAC,GAAG,CAAA;;;;;qBAKU,OAAO;2BACD,OAAO;cACpB,GAAG;YACH,CAAC,CAAC,GAAG,CAAA;;iBAEF;YACH,CAAC,CAAC,GAAG,CAAA;;iBAEF;;SAER;GACN,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,cAAc,CAAC,YAAY,GAAG,gBAAgB,CAAC;AAE/C,MAAM,CAAC,MAAM,gBAAgB,GAAG,MAAM,CAAC,IAAI,CAAA;;;;;;;CAO1C,CAAC;AAEF,gBAAgB,CAAC,YAAY,GAAG,gBAAgB,CAAC","sourcesContent":["import { mix } from 'polished';\nimport styled, { css } from 'styled-components';\n\nimport { useDirection } from '../../hooks';\nimport { defaultThemeProp } from '../../theme';\nimport type { PropsWithDefaults } from '../../types';\nimport { tryCatch } from '../../utils';\nimport type { FormControlProps } from '../FormControl';\nimport { StyledGrid } from '../Grid';\nimport { NumberDisplay } from '../Number';\nimport StyledNumberInput from '../Number/NumberInput.styles';\nimport StyledInput from '../Input/Input.styles';\n\nimport type SliderProps from './Slider.types';\n\nexport type SliderPropsWithDefaults = PropsWithDefaults<SliderProps>;\n\nexport const StyledThumb = styled.div(\n ({\n theme: {\n base: {\n palette: {\n 'primary-background': bgColor,\n 'border-line': borderColor,\n interactive: fgColor\n },\n spacing,\n 'border-radius': borderRadius\n },\n components: { button }\n }\n }) => {\n const hoverBgColor = tryCatch(() => mix(0.2, fgColor, bgColor));\n\n return css`\n border: ${button['border-width']} solid ${borderColor};\n border-radius: calc(${borderRadius} * 3);\n outline: none;\n background-color: ${bgColor};\n width: calc(${spacing} * 3);\n height: calc(${spacing} * 3);\n cursor: pointer;\n\n &:focus {\n box-shadow: ${button['focus-shadow']};\n }\n\n &:hover,\n &:active {\n background-color: ${hoverBgColor};\n border-color: ${fgColor};\n }\n `;\n }\n);\n\nStyledThumb.defaultProps = defaultThemeProp;\n\nexport const StyledBar = styled.div<{ showProgress?: boolean }>(({ theme, showProgress }) => {\n const {\n base: {\n spacing,\n colors,\n 'border-radius': borderRadius,\n palette: { interactive: interactiveColor }\n }\n } = theme;\n\n const { ltr } = useDirection();\n\n return css`\n border-radius: ${borderRadius};\n height: ${spacing};\n width: 100%;\n overflow: hidden;\n position: relative;\n background-color: ${colors.gray.light};\n\n ${showProgress &&\n css`\n ::before {\n position: absolute;\n left: 0;\n top: 0;\n content: '';\n display: block;\n width: 100%;\n height: 100%;\n background-color: ${interactiveColor};\n ${ltr\n ? css`\n transform: translateX(calc(-100% + var(--slider-value, 0)));\n `\n : css`\n transform: translateX(calc(100% - var(--slider-value, 0)));\n `}\n }\n `}\n `;\n});\n\nStyledBar.defaultProps = defaultThemeProp;\n\nexport const StyledTrack = styled.div(\n ({\n theme: {\n base: { spacing }\n }\n }) => {\n const { ltr } = useDirection();\n return css`\n height: calc(${spacing} * 4);\n width: 100%;\n cursor: pointer;\n position: relative;\n\n > ${StyledThumb} {\n z-index: 1;\n position: absolute;\n top: calc(${spacing} / 2);\n left: var(--slider-value);\n right: var(--slider-value);\n ${ltr\n ? css`\n transform: translate(-50%, 0);\n `\n : css`\n transform: translate(50%, 0);\n `}\n }\n `;\n }\n);\n\nStyledTrack.defaultProps = defaultThemeProp;\n\nexport const StyledTicksContainer = styled.div`\n width: 100%;\n\n div {\n &::before {\n content: '';\n display: table;\n background: ${p => p.theme.base.palette['foreground-color']};\n }\n }\n`;\n\nStyledTicksContainer.defaultProps = defaultThemeProp;\n\nexport const StyledSliderTrackWrapper = styled.div`\n width: 100%;\n`;\n\nStyledSliderTrackWrapper.defaultProps = defaultThemeProp;\n\nexport const StyledPreview = styled(NumberDisplay)<{ size: number }>`\n width: ${props => props.size}ch;\n flex-shrink: 0;\n`;\n\nStyledPreview.defaultProps = defaultThemeProp;\n\nexport const StyledSlider = styled.div<{\n orientation: 'vertical' | 'horizontal';\n status: FormControlProps['status'];\n size: number;\n}>(props => {\n const {\n theme: {\n base: { spacing, palette },\n components: { 'form-field': formField }\n },\n status,\n orientation,\n size\n } = props;\n\n const statusColor =\n status && formField[status] ? formField[status]['status-color'] : 'transparent';\n const thumbBgColor = tryCatch(() => mix(0.2, statusColor, palette['primary-background']));\n\n const borderColor =\n status && formField[status] ? formField[status]['status-color'] : palette['border-line'];\n\n return css`\n > span {\n line-height: calc(${spacing} * 4);\n }\n\n ${StyledInput} {\n width: calc(${size}ch + ${spacing});\n }\n\n ${orientation === 'horizontal'\n ? css`\n ${StyledSliderTrackWrapper} {\n margin-inline: calc(1.5 * ${spacing});\n\n ${StyledTrack},\n ${StyledThumb} {\n grid-row: 1;\n }\n\n ${StyledBar} {\n /* extend by thumb width */\n min-width: calc(100% + ${spacing} * 3);\n }\n\n ${StyledTicksContainer} {\n grid-row: 2;\n }\n\n & + ${StyledNumberInput}, & + ${StyledPreview} {\n margin-inline-start: calc(2 * ${spacing});\n text-align: center;\n }\n }\n `\n : css`\n ${StyledSliderTrackWrapper} {\n grid-template-columns: calc(${spacing} * 4) minmax(0, 1fr);\n grid-template-rows: 0.5em [track-start] minmax(calc(${spacing} * 20), max-content) [track-end] 0.5em;\n margin-top: ${spacing};\n\n ${StyledTrack} {\n grid-row: track-start / track-end;\n height: 100%;\n transform: scale(-1);\n\n ${StyledBar} {\n height: 100%;\n width: ${spacing};\n\n ::before {\n transform: translateY(calc(-100% + var(--slider-value, 0)));\n }\n }\n }\n\n ${StyledThumb} {\n grid-row: track-start / track-end;\n top: auto;\n bottom: calc(100% - var(--slider-value));\n left: calc(${spacing} / 2);\n right: calc(${spacing} / 2);\n transform: translate(0, 50%);\n }\n\n ${StyledTicksContainer} {\n grid-row: 1 / -1;\n height: 100%;\n }\n\n & + ${StyledNumberInput}, & + ${StyledPreview} {\n margin-top: calc(2 * ${spacing});\n text-align: center;\n\n input {\n border-radius: inherit;\n }\n }\n }\n `}\n\n &[disabled],\n &[readonly] {\n ${StyledTrack} {\n cursor: default;\n }\n\n ${StyledThumb} {\n cursor: default;\n border-color: ${palette['border-line']};\n :hover,\n :active {\n background-color: ${palette['background-color']};\n }\n }\n }\n\n ${status &&\n css`\n ${StyledBar}::before {\n background-color: ${statusColor};\n }\n\n ${StyledThumb} {\n border-color: ${borderColor};\n :hover,\n :active {\n background-color: ${thumbBgColor};\n }\n }\n `}\n `;\n});\n\nStyledSlider.defaultProps = defaultThemeProp;\n\nexport const StyledTickItem = styled(StyledGrid)<{\n lowerBoundaryItem?: boolean;\n upperBoundaryItem?: boolean;\n orientation: 'horizontal' | 'vertical';\n}>(({ lowerBoundaryItem, upperBoundaryItem, orientation, theme }) => {\n const spacing = theme.base.spacing;\n\n const { ltr } = useDirection();\n\n return css`\n overflow: hidden;\n\n ${orientation === 'horizontal'\n ? css`\n text-align: center;\n text-overflow: ellipsis;\n white-space: nowrap;\n &::before {\n width: 0.0625rem;\n height: ${spacing};\n transform: translateY(-50%);\n margin: 0 auto;\n }\n\n ${lowerBoundaryItem &&\n css`\n text-align: start;\n transform: translate(-0.5ch, 0);\n &::before {\n margin-inline-start: 0.5ch;\n }\n `}\n\n ${upperBoundaryItem &&\n css`\n text-align: end;\n transform: translate(0.5ch, 0);\n &::before {\n margin-inline-end: 0.5ch;\n }\n `}\n `\n : css`\n display: flex;\n align-items: center;\n\n &::before {\n width: ${spacing};\n height: calc(${spacing} / 8);\n ${ltr\n ? css`\n transform: translateX(-50%);\n `\n : css`\n transform: translateX(50%);\n `}\n }\n `}\n `;\n});\n\nStyledTickItem.defaultProps = defaultThemeProp;\n\nexport const StyledTickButton = styled.span`\n cursor: pointer;\n line-height: 1em;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n outline: 0;\n`;\n\nStyledTickButton.defaultProps = defaultThemeProp;\n"]}
@@ -1,5 +1,5 @@
1
- import { BaseProps, NoChildrenProp, TestIdProp } from '../../types';
2
- import { FormControlProps } from '../FormControl';
1
+ import type { BaseProps, NoChildrenProp, TestIdProp } from '../../types';
2
+ import type { FormControlProps } from '../FormControl';
3
3
  export default interface SliderProps extends BaseProps, NoChildrenProp, TestIdProp {
4
4
  /**
5
5
  * Sets DOM id for the control and associates label element via 'for' attribute.
@@ -1 +1 @@
1
- {"version":3,"file":"Slider.types.d.ts","sourceRoot":"","sources":["../../../src/components/Slider/Slider.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAElD,MAAM,CAAC,OAAO,WAAW,WAAY,SAAQ,SAAS,EAAE,cAAc,EAAE,UAAU;IAChF;;;OAGG;IACH,EAAE,CAAC,EAAE,gBAAgB,CAAC,IAAI,CAAC,CAAC;IAC5B,oDAAoD;IACpD,MAAM,CAAC,EAAE,gBAAgB,CAAC,QAAQ,CAAC,CAAC;IACpC,2DAA2D;IAC3D,KAAK,CAAC,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAC;IAClC,uCAAuC;IACvC,WAAW,CAAC,EAAE,gBAAgB,CAAC,aAAa,CAAC,CAAC;IAC9C,6GAA6G;IAC7G,IAAI,CAAC,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAC;IAChC,wEAAwE;IACxE,QAAQ,CAAC,EAAE,gBAAgB,CAAC,UAAU,CAAC,CAAC;IACxC;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IACd,0DAA0D;IAC1D,QAAQ,CAAC,EAAE,gBAAgB,CAAC,UAAU,CAAC,CAAC;IACxC,qFAAqF;IACrF,QAAQ,CAAC,EAAE,gBAAgB,CAAC,UAAU,CAAC,CAAC;IACxC,+FAA+F;IAC/F,IAAI,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AClC,8EAA8E;IAC9E,cAAc,CAAC,EAAE,gBAAgB,CAAC,gBAAgB,CAAC,CAAC;IACpD;;;OAGG;IACH,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,6DAA6D;IAC7D,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,4DAA4D;IAC5D,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;CACxB;AAED,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf"}
@@ -1 +1 @@
1
- {"version":3,"file":"Slider.types.js","sourceRoot":"","sources":["../../../src/components/Slider/Slider.types.ts"],"names":[],"mappings":"","sourcesContent":["import { BaseProps, NoChildrenProp, TestIdProp } from '../../types';\nimport { FormControlProps } from '../FormControl';\n\nexport default interface SliderProps extends BaseProps, NoChildrenProp, TestIdProp {\n /**\n * Sets DOM id for the control and associates label element via 'for' attribute.\n * If an id is not pass, a random id will be generated for any render.\n */\n id?: FormControlProps['id'];\n /** Set visual state based on a validation state. */\n status?: FormControlProps['status'];\n /** Pass a string or a fragment with an Icon and string. */\n label?: FormControlProps['label'];\n /** Visually hides the label region. */\n labelHidden?: FormControlProps['labelHidden'];\n /** It is recommended to pass a simple string to offer guidance. Text will be styled based on status prop. */\n info?: FormControlProps['info'];\n /** Indicate if the field is required. The browser defaults to false. */\n required?: FormControlProps['required'];\n /**\n * Creates a controlled input and sets the value. Requires an onChange handler to update value.\n * value + onChange is the recommended method per React team.\n */\n value: number;\n /** Disable the control. The browser defaults to false. */\n disabled?: FormControlProps['disabled'];\n /** Makes the input non editable and non clickable. The browser defaults to false. */\n readOnly?: FormControlProps['readOnly'];\n /** Sets html name attribute for the underlying control. Useful for mapping to a data field. */\n name?: FormControlProps['name'];\n /** Will automatically focus the thumb on render if true */\n autoFocus?: boolean;\n /**\n * Minimum value.\n * @default 0\n */\n min?: number;\n /**\n * Maximum value.\n * @default 100\n */\n max?: number;\n /**\n * Step value.\n * @default 1\n */\n step?: number;\n /**\n * Slider orientation.\n * @default 'horizontal'\n */\n orientation?: 'vertical' | 'horizontal';\n /**\n * Show slider color progress bar.\n * @default false\n */\n showProgress?: boolean;\n /**\n * Show current value.\n * @default false\n */\n preview?: boolean;\n /**\n * Display input to provide value.\n * @default true\n */\n showInput?: boolean;\n /** Display defined ticks. */\n ticks?: { [key: number]: string };\n /** Pass a heading and content to show additional information on the field. */\n additionalInfo?: FormControlProps['additionalInfo'];\n /**\n * On change callback.\n * @param value new input value\n */\n onChange: (value: number) => void;\n /** Called when the user starts dragging the slider thumb. */\n onDragStart?: () => void;\n /** Called when the user stops dragging the slider thumb. */\n onDragEnd?: () => void;\n}\n\nexport interface TickDefinition {\n start: number;\n end: number;\n value: number;\n label: string;\n}\n"]}
1
+ {"version":3,"file":"Slider.types.js","sourceRoot":"","sources":["../../../src/components/Slider/Slider.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { BaseProps, NoChildrenProp, TestIdProp } from '../../types';\nimport type { FormControlProps } from '../FormControl';\n\nexport default interface SliderProps extends BaseProps, NoChildrenProp, TestIdProp {\n /**\n * Sets DOM id for the control and associates label element via 'for' attribute.\n * If an id is not pass, a random id will be generated for any render.\n */\n id?: FormControlProps['id'];\n /** Set visual state based on a validation state. */\n status?: FormControlProps['status'];\n /** Pass a string or a fragment with an Icon and string. */\n label?: FormControlProps['label'];\n /** Visually hides the label region. */\n labelHidden?: FormControlProps['labelHidden'];\n /** It is recommended to pass a simple string to offer guidance. Text will be styled based on status prop. */\n info?: FormControlProps['info'];\n /** Indicate if the field is required. The browser defaults to false. */\n required?: FormControlProps['required'];\n /**\n * Creates a controlled input and sets the value. Requires an onChange handler to update value.\n * value + onChange is the recommended method per React team.\n */\n value: number;\n /** Disable the control. The browser defaults to false. */\n disabled?: FormControlProps['disabled'];\n /** Makes the input non editable and non clickable. The browser defaults to false. */\n readOnly?: FormControlProps['readOnly'];\n /** Sets html name attribute for the underlying control. Useful for mapping to a data field. */\n name?: FormControlProps['name'];\n /** Will automatically focus the thumb on render if true */\n autoFocus?: boolean;\n /**\n * Minimum value.\n * @default 0\n */\n min?: number;\n /**\n * Maximum value.\n * @default 100\n */\n max?: number;\n /**\n * Step value.\n * @default 1\n */\n step?: number;\n /**\n * Slider orientation.\n * @default 'horizontal'\n */\n orientation?: 'vertical' | 'horizontal';\n /**\n * Show slider color progress bar.\n * @default false\n */\n showProgress?: boolean;\n /**\n * Show current value.\n * @default false\n */\n preview?: boolean;\n /**\n * Display input to provide value.\n * @default true\n */\n showInput?: boolean;\n /** Display defined ticks. */\n ticks?: { [key: number]: string };\n /** Pass a heading and content to show additional information on the field. */\n additionalInfo?: FormControlProps['additionalInfo'];\n /**\n * On change callback.\n * @param value new input value\n */\n onChange: (value: number) => void;\n /** Called when the user starts dragging the slider thumb. */\n onDragStart?: () => void;\n /** Called when the user stops dragging the slider thumb. */\n onDragEnd?: () => void;\n}\n\nexport interface TickDefinition {\n start: number;\n end: number;\n value: number;\n label: string;\n}\n"]}
@@ -1,5 +1,5 @@
1
- import { FC } from 'react';
2
- import SliderProps from './Slider.types';
1
+ import type { FC } from 'react';
2
+ import type SliderProps from './Slider.types';
3
3
  interface SliderTicksProps {
4
4
  ticks: NonNullable<SliderProps['ticks']>;
5
5
  min: number;
@@ -1 +1 @@
1
- {"version":3,"file":"SliderTicks.d.ts","sourceRoot":"","sources":["../../../src/components/Slider/SliderTicks.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAW,MAAM,OAAO,CAAC;AAKpC,OAAO,WAAW,MAAM,gBAAgB,CAAC;AAGzC,UAAU,gBAAgB;IACxB,KAAK,EAAE,WAAW,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC;IACzC,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,WAAW,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC,CAAC;IACrD,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CAClC;AAED,QAAA,MAAM,WAAW,EAAE,EAAE,CAAC,gBAAgB,CA2DrC,CAAC;AAEF,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"SliderTicks.d.ts","sourceRoot":"","sources":["../../../src/components/Slider/SliderTicks.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAMhC,OAAO,KAAK,WAAW,MAAM,gBAAgB,CAAC;AAG9C,UAAU,gBAAgB;IACxB,KAAK,EAAE,WAAW,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC;IACzC,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,WAAW,CAAC,WAAW,CAAC,aAAa,CAAC,CAAC,CAAC;IACrD,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CAClC;AAED,QAAA,MAAM,WAAW,EAAE,EAAE,CAAC,gBAAgB,CA2DrC,CAAC;AAEF,eAAe,WAAW,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"SliderTicks.js","sourceRoot":"","sources":["../../../src/components/Slider/SliderTicks.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAM,OAAO,EAAE,MAAM,OAAO,CAAC;AAEpC,OAAO,IAA4B,MAAM,SAAS,CAAC;AAEnD,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAEzF,OAAO,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAWhD,MAAM,WAAW,GAAyB,CAAC,EACzC,KAAK,EACL,GAAG,EACH,GAAG,EACH,IAAI,EACJ,WAAW,EACX,O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,iBAAiB,EAAE,IAAI,CAAC,KAAK,KAAK,GAAG,YAErC,KAAC,gBAAgB,IACf,QAAQ,EAAE,CAAC,CAAC,EACZ,IAAI,EAAC,QAAQ,uBAEb,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,YAEjC,IAAI,CAAC,KAAK,GACM,IAZd,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,CAad,CAClB,CAAC;QACJ,CAAC,CAAC,GACG,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,WAAW,CAAC","sourcesContent":["import { FC, useMemo } from 'react';\n\nimport Grid, { GridContainerProps } from '../Grid';\n\nimport { StyledTickButton, StyledTickItem, StyledTicksContainer } from './Slider.styles';\nimport SliderProps from './Slider.types';\nimport { calculateTicksRegions } from './utils';\n\ninterface SliderTicksProps {\n ticks: NonNullable<SliderProps['ticks']>;\n min: number;\n max: number;\n step: number;\n orientation: NonNullable<SliderProps['orientation']>;\n onClick: (value: number) => void;\n}\n\nconst SliderTicks: FC<SliderTicksProps> = ({\n ticks,\n min,\n max,\n step,\n orientation,\n onClick\n}: SliderTicksProps) => {\n const cellsCount = (max - min) / step + 1;\n\n const ticksDefinitions = useMemo(\n () => calculateTicksRegions(ticks, min, max, step, orientation === 'horizontal'),\n [ticks, min, max, orientation]\n );\n\n let repeatCells: string;\n let gridContainerConfig: GridContainerProps;\n if (orientation === 'horizontal') {\n repeatCells = cellsCount > 2 ? `repeat(${cellsCount - 2}, minmax(0, 1fr))` : '';\n gridContainerConfig = {\n cols: `minmax(0, 0.5fr) ${repeatCells} minmax(0, 0.5fr)`\n };\n } else {\n repeatCells = `repeat(${cellsCount}, 1em)`;\n gridContainerConfig = { rows: repeatCells, alignContent: 'between' };\n }\n\n return (\n <Grid container={gridContainerConfig} as={StyledTicksContainer}>\n {ticksDefinitions.map(tick => {\n return (\n <StyledTickItem\n item={\n orientation === 'horizontal'\n ? {\n colStartEnd: `${tick.start} / ${tick.end}`\n }\n : {\n rowStartEnd: `${-tick.start} / ${-tick.end}`\n }\n }\n key={tick.label ?? tick.value}\n orientation={orientation}\n lowerBoundaryItem={tick.value === min}\n upperBoundaryItem={tick.value === max}\n >\n <StyledTickButton\n tabIndex={-1}\n role='button'\n aria-hidden\n onClick={() => onClick(tick.value)}\n >\n {tick.label}\n </StyledTickButton>\n </StyledTickItem>\n );\n })}\n </Grid>\n );\n};\n\nexport default SliderTicks;\n"]}
1
+ {"version":3,"file":"SliderTicks.js","sourceRoot":"","sources":["../../../src/components/Slider/SliderTicks.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAGhC,OAAO,IAAI,MAAM,SAAS,CAAC;AAG3B,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAEzF,OAAO,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAWhD,MAAM,WAAW,GAAyB,CAAC,EACzC,KAAK,EACL,GAAG,EACH,GAAG,EACH,IAAI,EACJ,WAAW,EACX,OAAO,EACU,EAAE,EAAE;IACrB,MAAM,UAAU,GAAG,CAAC,GAAG,GAAG,GAAG,CAAC,GAAG,IAAI,GAAG,CAAC,CAAC;IAE1C,MAAM,gBAAgB,GAAG,OAAO,CAC9B,GAAG,EAAE,CAAC,qBAAqB,CAAC,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,WAAW,KAAK,YAAY,CAAC,EAChF,CAAC,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,WAAW,CAAC,CAC/B,CAAC;IAEF,IAAI,WAAmB,CAAC;IACxB,IAAI,mBAAuC,CAAC;IAC5C,IAAI,WAAW,KAAK,YAAY,EAAE;QAChC,WAAW,GAAG,UAAU,GAAG,CAAC,CAAC,CAAC,CAAC,UAAU,UAAU,GAAG,CAAC,mBAAmB,CAAC,CAAC,CAAC,EAAE,CAAC;QAChF,mBAAmB,GAAG;YACpB,IAAI,EAAE,oBAAoB,WAAW,mBAAmB;SACzD,CAAC;KACH;SAAM;QACL,WAAW,GAAG,UAAU,UAAU,QAAQ,CAAC;QAC3C,mBAAmB,GAAG,EAAE,IAAI,EAAE,WAAW,EAAE,YAAY,EAAE,SAAS,EAAE,CAAC;KACtE;IAED,OAAO,CACL,KAAC,IAAI,IAAC,SAAS,EAAE,mBAAmB,EAAE,EAAE,EAAE,oBAAoB,YAC3D,gBAAgB,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;YAC3B,OAAO,CACL,KAAC,cAAc,IACb,IAAI,EACF,WAAW,KAAK,YAAY;oBAC1B,CAAC,CAAC;wBACE,WAAW,EAAE,GAAG,IAAI,CAAC,KAAK,MAAM,IAAI,CAAC,GAAG,EAAE;qBAC3C;oBACH,CAAC,CAAC;wBACE,WAAW,EAAE,GAAG,CAAC,IAAI,CAAC,KAAK,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE;qBAC7C,EAGP,WAAW,EAAE,WAAW,EACxB,iBAAiB,EAAE,IAAI,CAAC,KAAK,KAAK,GAAG,EACrC,iBAAiB,EAAE,IAAI,CAAC,KAAK,KAAK,GAAG,YAErC,KAAC,gBAAgB,IACf,QAAQ,EAAE,CAAC,CAAC,EACZ,IAAI,EAAC,QAAQ,uBAEb,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,YAEjC,IAAI,CAAC,KAAK,GACM,IAZd,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,CAad,CAClB,CAAC;QACJ,CAAC,CAAC,GACG,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,WAAW,CAAC","sourcesContent":["import { useMemo } from 'react';\nimport type { FC } from 'react';\n\nimport Grid from '../Grid';\nimport type { GridContainerProps } from '../Grid';\n\nimport { StyledTickButton, StyledTickItem, StyledTicksContainer } from './Slider.styles';\nimport type SliderProps from './Slider.types';\nimport { calculateTicksRegions } from './utils';\n\ninterface SliderTicksProps {\n ticks: NonNullable<SliderProps['ticks']>;\n min: number;\n max: number;\n step: number;\n orientation: NonNullable<SliderProps['orientation']>;\n onClick: (value: number) => void;\n}\n\nconst SliderTicks: FC<SliderTicksProps> = ({\n ticks,\n min,\n max,\n step,\n orientation,\n onClick\n}: SliderTicksProps) => {\n const cellsCount = (max - min) / step + 1;\n\n const ticksDefinitions = useMemo(\n () => calculateTicksRegions(ticks, min, max, step, orientation === 'horizontal'),\n [ticks, min, max, orientation]\n );\n\n let repeatCells: string;\n let gridContainerConfig: GridContainerProps;\n if (orientation === 'horizontal') {\n repeatCells = cellsCount > 2 ? `repeat(${cellsCount - 2}, minmax(0, 1fr))` : '';\n gridContainerConfig = {\n cols: `minmax(0, 0.5fr) ${repeatCells} minmax(0, 0.5fr)`\n };\n } else {\n repeatCells = `repeat(${cellsCount}, 1em)`;\n gridContainerConfig = { rows: repeatCells, alignContent: 'between' };\n }\n\n return (\n <Grid container={gridContainerConfig} as={StyledTicksContainer}>\n {ticksDefinitions.map(tick => {\n return (\n <StyledTickItem\n item={\n orientation === 'horizontal'\n ? {\n colStartEnd: `${tick.start} / ${tick.end}`\n }\n : {\n rowStartEnd: `${-tick.start} / ${-tick.end}`\n }\n }\n key={tick.label ?? tick.value}\n orientation={orientation}\n lowerBoundaryItem={tick.value === min}\n upperBoundaryItem={tick.value === max}\n >\n <StyledTickButton\n tabIndex={-1}\n role='button'\n aria-hidden\n onClick={() => onClick(tick.value)}\n >\n {tick.label}\n </StyledTickButton>\n </StyledTickItem>\n );\n })}\n </Grid>\n );\n};\n\nexport default SliderTicks;\n"]}
@@ -1,4 +1,5 @@
1
- import SliderProps, { TickDefinition } from './Slider.types';
1
+ import type SliderProps from './Slider.types';
2
+ import type { TickDefinition } from './Slider.types';
2
3
  /**
3
4
  * The function accepts ticks map and produces an array of tick definitions. The definition
4
5
  * consist of tick value, its label and starting and ending index.
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/components/Slider/utils.ts"],"names":[],"mappings":"AAEA,OAAO,WAAW,EAAE,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAE7D;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,qBAAqB,aACtB,YAAY,WAAW,CAAC,OAAO,CAAC,CAAC,OACtC,MAAM,OACN,MAAM,QACL,MAAM,WACH,OAAO,KACf,cAAc,EAiDhB,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,UAAW,MAAM,OAAO,MAAM,OAAO,MAAM,QAAQ,MAAM,KAAG,MAKvF,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,QAAS,MAAM,OAAO,MAAM,QAAQ,MAAM,KAAG,MAO7E,CAAC"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/components/Slider/utils.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,WAAW,MAAM,gBAAgB,CAAC;AAC9C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAErD;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,qBAAqB,aACtB,YAAY,WAAW,CAAC,OAAO,CAAC,CAAC,OACtC,MAAM,OACN,MAAM,QACL,MAAM,WACH,OAAO,KACf,cAAc,EAiDhB,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,eAAe,UAAW,MAAM,OAAO,MAAM,OAAO,MAAM,QAAQ,MAAM,KAAG,MAKvF,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,QAAS,MAAM,OAAO,MAAM,QAAQ,MAAM,KAAG,MAO7E,CAAC"}