@televet/kibble-ui 2.0.0-beta.8678phbtk.2 → 2.0.0

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 (418) hide show
  1. package/README.md +1 -1
  2. package/build/alert.component-6775820d.js +2 -0
  3. package/build/alert.component-6775820d.js.map +1 -0
  4. package/build/{alert.config-61314153.js → alert.config-23cd80bc.js} +2 -2
  5. package/build/{alert.config-61314153.js.map → alert.config-23cd80bc.js.map} +1 -1
  6. package/build/alert.types-858cdf65.js +2 -0
  7. package/build/alert.types-858cdf65.js.map +1 -0
  8. package/build/avatar.component-5de24937.js +2 -0
  9. package/build/{avatar.component-73a17380.js.map → avatar.component-5de24937.js.map} +1 -1
  10. package/build/{avatar.config-ef265947.js → avatar.config-3134aaf8.js} +2 -2
  11. package/build/{avatar.config-ef265947.js.map → avatar.config-3134aaf8.js.map} +1 -1
  12. package/build/avatarBadge.component-12b8c7c2.js +2 -0
  13. package/build/{avatarBadge.component-af09e1b9.js.map → avatarBadge.component-12b8c7c2.js.map} +1 -1
  14. package/build/avatarGroup.component-2a36a4a8.js +2 -0
  15. package/build/{avatarGroup.component-cc62fd0c.js.map → avatarGroup.component-2a36a4a8.js.map} +1 -1
  16. package/build/button.component-73d5a120.js +2 -0
  17. package/build/button.component-73d5a120.js.map +1 -0
  18. package/build/card.component-fc60f023.js +2 -0
  19. package/build/{card.component-fd2b0128.js.map → card.component-fc60f023.js.map} +1 -1
  20. package/build/chakra/index.d.ts +2 -2
  21. package/build/chakra/index.js +1 -1
  22. package/build/chakra-ui-alert.esm-9bb76feb.js +2 -0
  23. package/build/chakra-ui-alert.esm-9bb76feb.js.map +1 -0
  24. package/build/chakra-ui-avatar.esm-d7e98d56.js +2 -0
  25. package/build/chakra-ui-avatar.esm-d7e98d56.js.map +1 -0
  26. package/build/chakra-ui-button.esm-32e420eb.js +2 -0
  27. package/build/chakra-ui-button.esm-32e420eb.js.map +1 -0
  28. package/build/chakra-ui-checkbox.esm-6a6974f2.js +2 -0
  29. package/build/chakra-ui-checkbox.esm-6a6974f2.js.map +1 -0
  30. package/build/chakra-ui-clickable.esm-22135054.js +2 -0
  31. package/build/chakra-ui-clickable.esm-22135054.js.map +1 -0
  32. package/build/chakra-ui-form-control.esm-8240cc1c.js +2 -0
  33. package/build/chakra-ui-form-control.esm-8240cc1c.js.map +1 -0
  34. package/build/chakra-ui-hooks.esm-c8f7aa0e.js +2 -0
  35. package/build/chakra-ui-hooks.esm-c8f7aa0e.js.map +1 -0
  36. package/build/chakra-ui-icon.esm-30b0b8a9.js +2 -0
  37. package/build/chakra-ui-icon.esm-30b0b8a9.js.map +1 -0
  38. package/build/chakra-ui-image.esm-acdc667a.js +2 -0
  39. package/build/chakra-ui-image.esm-acdc667a.js.map +1 -0
  40. package/build/chakra-ui-input.esm-5e794564.js +2 -0
  41. package/build/chakra-ui-input.esm-5e794564.js.map +1 -0
  42. package/build/chakra-ui-layout.esm-493ee04b.js +2 -0
  43. package/build/chakra-ui-layout.esm-493ee04b.js.map +1 -0
  44. package/build/chakra-ui-media-query.esm-a34e627c.js +2 -0
  45. package/build/chakra-ui-media-query.esm-a34e627c.js.map +1 -0
  46. package/build/chakra-ui-menu.esm-22115f36.js +2 -0
  47. package/build/chakra-ui-menu.esm-22115f36.js.map +1 -0
  48. package/build/chakra-ui-modal.esm-cf414b2f.js +16 -0
  49. package/build/chakra-ui-modal.esm-cf414b2f.js.map +1 -0
  50. package/build/chakra-ui-popover.esm-af9721a4.js +2 -0
  51. package/build/chakra-ui-popover.esm-af9721a4.js.map +1 -0
  52. package/build/chakra-ui-popper.esm-78790840.js +2 -0
  53. package/build/chakra-ui-popper.esm-78790840.js.map +1 -0
  54. package/build/chakra-ui-portal.esm-72927bd9.js +2 -0
  55. package/build/chakra-ui-portal.esm-72927bd9.js.map +1 -0
  56. package/build/chakra-ui-radio.esm-ee587db1.js +2 -0
  57. package/build/chakra-ui-radio.esm-ee587db1.js.map +1 -0
  58. package/build/chakra-ui-react.esm-54b6d554.js +2 -0
  59. package/build/chakra-ui-react.esm-54b6d554.js.map +1 -0
  60. package/build/chakra-ui-select.esm-85c971dc.js +2 -0
  61. package/build/chakra-ui-select.esm-85c971dc.js.map +1 -0
  62. package/build/chakra-ui-skeleton.esm-91e7ead1.js +2 -0
  63. package/build/chakra-ui-skeleton.esm-91e7ead1.js.map +1 -0
  64. package/build/chakra-ui-system.esm-b563b97d.js +10 -0
  65. package/build/chakra-ui-system.esm-b563b97d.js.map +1 -0
  66. package/build/chakra-ui-tabs.esm-dc1c4ea8.js +2 -0
  67. package/build/chakra-ui-tabs.esm-dc1c4ea8.js.map +1 -0
  68. package/build/chakra-ui-textarea.esm-cfbdac00.js +2 -0
  69. package/build/chakra-ui-textarea.esm-cfbdac00.js.map +1 -0
  70. package/build/chakra-ui-theme.esm-cc694e08.js +2 -0
  71. package/build/chakra-ui-theme.esm-cc694e08.js.map +1 -0
  72. package/build/chakra-ui-visually-hidden.esm-3406a7fd.js +2 -0
  73. package/build/chakra-ui-visually-hidden.esm-3406a7fd.js.map +1 -0
  74. package/build/checkbox.component-60982355.js +2 -0
  75. package/build/{checkbox.component-41ff7829.js.map → checkbox.component-60982355.js.map} +1 -1
  76. package/build/checkboxGroup.component-2b744fe0.js +2 -0
  77. package/build/{checkboxGroup.component-029b73fe.js.map → checkboxGroup.component-2b744fe0.js.map} +1 -1
  78. package/build/color.record-8ec2eb8a.js +2 -0
  79. package/build/{color.record-2816a958.js.map → color.record-8ec2eb8a.js.map} +1 -1
  80. package/build/components/Alert/components/alertButton.component.d.ts +0 -1
  81. package/build/components/Alert/components/alertIcon.component.d.ts +0 -1
  82. package/build/components/Alert/index.js +1 -1
  83. package/build/components/Avatar/components/AvatarBadge/avatarBadge.component.d.ts +0 -1
  84. package/build/components/Avatar/components/AvatarBadge/index.js +1 -1
  85. package/build/components/Avatar/index.js +1 -1
  86. package/build/components/AvatarGroup/avatarGroup.component.d.ts +0 -1
  87. package/build/components/AvatarGroup/index.js +1 -1
  88. package/build/components/Button/button.component.d.ts +0 -1
  89. package/build/components/Button/index.js +1 -1
  90. package/build/components/Card/index.js +1 -1
  91. package/build/components/Checkbox/checkbox.component.d.ts +0 -1
  92. package/build/components/Checkbox/index.js +1 -1
  93. package/build/components/CheckboxGroup/index.js +1 -1
  94. package/build/components/DatePicker/components/Day/day.component.d.ts +0 -1
  95. package/build/components/DatePicker/components/Month/month.component.d.ts +0 -1
  96. package/build/components/DatePicker/datepicker.argTypes.d.ts +1 -1
  97. package/build/components/DatePicker/datepicker.component.d.ts +0 -1
  98. package/build/components/DatePicker/index.js +1 -1
  99. package/build/components/Heading/index.js +1 -1
  100. package/build/components/Icon/index.js +1 -1
  101. package/build/components/Link/components/linkIcon.component.d.ts +0 -1
  102. package/build/components/Link/index.js +1 -1
  103. package/build/components/Link/link.config.d.ts +11 -11
  104. package/build/components/Logo/index.d.ts +2 -0
  105. package/build/components/Logo/index.js +2 -0
  106. package/build/components/Logo/index.js.map +1 -0
  107. package/build/components/Logo/logo.argTypes.d.ts +45 -0
  108. package/build/components/Logo/logo.component.d.ts +11 -0
  109. package/build/components/Logo/logo.config.d.ts +5 -0
  110. package/build/components/Logo/logo.types.d.ts +2 -0
  111. package/build/components/Logo/logos.d.ts +17 -0
  112. package/build/components/Menu/components/MenuButton/index.js +1 -1
  113. package/build/components/Menu/components/MenuContainer/index.js +1 -1
  114. package/build/components/Menu/components/MenuItem/index.js +1 -1
  115. package/build/components/Menu/components/MenuList/index.js +1 -1
  116. package/build/components/Menu/components/MenuList/menuList.component.d.ts +1 -4
  117. package/build/components/Menu/components/MenuOptionGroup/index.js +1 -1
  118. package/build/components/Menu/components/MenuOptionGroup/menuOptionGroup.component.d.ts +0 -1
  119. package/build/components/Menu/components/MenuSearchBar/menuSearchBar.component.d.ts +2 -2
  120. package/build/components/Menu/components/MenuSelectAllButtons/menuSelectAllButtons.component.d.ts +0 -1
  121. package/build/components/Menu/index.js +1 -1
  122. package/build/components/Modal/components/ModalBody/index.js +1 -1
  123. package/build/components/Modal/components/ModalBody/modalBody.component.d.ts +0 -1
  124. package/build/components/Modal/components/ModalCloseButton/index.js +1 -1
  125. package/build/components/Modal/components/ModalCloseButton/modalCloseButton.component.d.ts +0 -1
  126. package/build/components/Modal/components/ModalFooter/index.js +1 -1
  127. package/build/components/Modal/components/ModalFooter/modalFooter.component.d.ts +0 -1
  128. package/build/components/Modal/components/ModalFooterButtons/index.js +1 -1
  129. package/build/components/Modal/components/ModalFooterButtons/modalFooterButtons.component.d.ts +0 -1
  130. package/build/components/Modal/components/ModalHeader/index.js +1 -1
  131. package/build/components/Modal/components/ModalHeader/modalHeader.component.d.ts +0 -1
  132. package/build/components/Modal/index.js +1 -1
  133. package/build/components/NotificationCounter/index.js +1 -1
  134. package/build/components/NotificationCounter/notificationCounter.component.d.ts +0 -1
  135. package/build/components/Picture/index.js +1 -1
  136. package/build/components/Picture/picture.component.d.ts +0 -1
  137. package/build/components/Popover/components/PopoverBody/index.js +1 -1
  138. package/build/components/Popover/components/PopoverBody/popoverBody.component.d.ts +0 -1
  139. package/build/components/Popover/components/PopoverCloseButton/index.js +1 -1
  140. package/build/components/Popover/components/PopoverCloseButton/popoverCloseButton.component.d.ts +0 -1
  141. package/build/components/Popover/components/PopoverFooter/index.js +1 -1
  142. package/build/components/Popover/components/PopoverFooter/popoverFooter.component.d.ts +0 -1
  143. package/build/components/Popover/components/PopoverFooterButtons/index.js +1 -1
  144. package/build/components/Popover/components/PopoverFooterButtons/popoverFooterButtons.component.d.ts +0 -1
  145. package/build/components/Popover/components/PopoverHeader/index.js +1 -1
  146. package/build/components/Popover/components/PopoverHeader/popoverHeader.component.d.ts +0 -1
  147. package/build/components/Popover/index.js +1 -1
  148. package/build/components/Popover/popover.component.d.ts +4 -1
  149. package/build/components/Radio/index.js +1 -1
  150. package/build/components/Radio/radio.component.d.ts +0 -1
  151. package/build/components/RadioGroup/index.js +1 -1
  152. package/build/components/RatingDots/components/RatingDot/index.js +1 -1
  153. package/build/components/RatingDots/components/RatingDot/ratingDot.component.d.ts +0 -1
  154. package/build/components/RatingDots/index.js +1 -1
  155. package/build/components/RatingDots/ratingDots.component.d.ts +0 -1
  156. package/build/components/Select/components/SelectBrowserDefault/selectBrowserDefault.component.d.ts +0 -1
  157. package/build/components/Select/components/SelectList/selectList.component.d.ts +0 -1
  158. package/build/components/Select/index.js +1 -1
  159. package/build/components/SortableList/components/DragHandle/dragHandle.component.d.ts +0 -1
  160. package/build/components/SortableList/components/DragHandle/index.js +1 -1
  161. package/build/components/SortableList/components/SortableItem/index.js +1 -1
  162. package/build/components/SortableList/index.js +1 -1
  163. package/build/components/SortableList/utilities/index.js +1 -1
  164. package/build/components/SortableList/utilities/index.js.map +1 -1
  165. package/build/components/Spinner/index.js +1 -1
  166. package/build/components/Spinner/spinner.component.d.ts +0 -1
  167. package/build/components/Switch/index.js +1 -1
  168. package/build/components/Tabs/components/Tab/index.js +1 -1
  169. package/build/components/Tabs/components/Tab/tab.component.d.ts +0 -1
  170. package/build/components/Tabs/index.js +1 -1
  171. package/build/components/TabsLayout/index.js +1 -1
  172. package/build/components/Tag/index.js +1 -1
  173. package/build/components/Tag/tag.argTypes.d.ts +4 -12
  174. package/build/components/Text/index.js +1 -1
  175. package/build/components/TextInput/components/ClearButton/clearButton.component.d.ts +0 -1
  176. package/build/components/TextInput/index.js +1 -1
  177. package/build/components/Textarea/index.js +1 -1
  178. package/build/components/TimePicker/components/scrollContainer.component.d.ts +0 -1
  179. package/build/components/TimePicker/index.js +1 -1
  180. package/build/components/TimePicker/timePicker.argTypes.d.ts +1 -1
  181. package/build/components/TimePicker/timePicker.component.d.ts +0 -1
  182. package/build/components/TimeRange/index.js +1 -1
  183. package/build/components/TimeRange/timeRange.component.d.ts +0 -1
  184. package/build/components/Toast/index.d.ts +2 -0
  185. package/build/components/Toast/index.js +2 -0
  186. package/build/components/Toast/index.js.map +1 -0
  187. package/build/components/Toast/toast.types.d.ts +10 -0
  188. package/build/components/Toast/toast.utils.d.ts +2 -0
  189. package/build/components/Toast/useToast.d.ts +47 -0
  190. package/build/components/Tooltip/index.js +1 -1
  191. package/build/components/Tooltip/tooltip.component.d.ts +0 -1
  192. package/build/components/TruncatedText/index.js +1 -1
  193. package/build/components/TruncatedText/truncatedText.component.d.ts +0 -1
  194. package/build/components/index.d.ts +2 -0
  195. package/build/components/index.js +1 -1
  196. package/build/core.esm-3a85aed4.js +1 -1
  197. package/build/core.esm-3a85aed4.js.map +1 -1
  198. package/build/datepicker.types-30e62009.js +16 -0
  199. package/build/{datepicker.types-ff1b8dbc.js.map → datepicker.types-30e62009.js.map} +1 -1
  200. package/build/dragHandle.component-0d292ae8.js +2 -0
  201. package/build/{dragHandle.component-909abd36.js.map → dragHandle.component-0d292ae8.js.map} +1 -1
  202. package/build/formControl.component-fdf34a8f.js +2 -0
  203. package/build/{formControl.component-6ae91414.js.map → formControl.component-fdf34a8f.js.map} +1 -1
  204. package/build/heading.component-46024b9d.js +2 -0
  205. package/build/{heading.component-c8c6cb4e.js.map → heading.component-46024b9d.js.map} +1 -1
  206. package/build/hocs/index.js +1 -1
  207. package/build/hooks/index.js +1 -1
  208. package/build/{icon.component-5c3ee81d.js → icon.component-bf95e351.js} +2 -2
  209. package/build/{icon.component-5c3ee81d.js.map → icon.component-bf95e351.js.map} +1 -1
  210. package/build/icons/index.d.ts +1 -1
  211. package/build/icons/index.js +1 -1
  212. package/build/icons/index.js.map +1 -1
  213. package/build/index-5c563615.js +2 -0
  214. package/build/index-5c563615.js.map +1 -0
  215. package/build/index-c60b408f.js +15 -0
  216. package/build/index-c60b408f.js.map +1 -0
  217. package/build/index-fee8538e.js +2 -0
  218. package/build/index-fee8538e.js.map +1 -0
  219. package/build/index.js +1 -1
  220. package/build/inheritsLoose-490721fe.js +2 -0
  221. package/build/inheritsLoose-490721fe.js.map +1 -0
  222. package/build/link.component-78fe76a9.js +2 -0
  223. package/build/{link.component-41d1f167.js.map → link.component-78fe76a9.js.map} +1 -1
  224. package/build/logo.component-2ace6f1f.js +2 -0
  225. package/build/logo.component-2ace6f1f.js.map +1 -0
  226. package/build/menu.component-83327bda.js +2 -0
  227. package/build/{menu.component-24e2b4dd.js.map → menu.component-83327bda.js.map} +1 -1
  228. package/build/{menu.config-e2405b16.js → menu.config-83ef52b8.js} +2 -2
  229. package/build/{menu.config-e2405b16.js.map → menu.config-83ef52b8.js.map} +1 -1
  230. package/build/menu.context-6276be4d.js +2 -0
  231. package/build/{menu.context-458e8152.js.map → menu.context-6276be4d.js.map} +1 -1
  232. package/build/menuButton.component-20d455cb.js +2 -0
  233. package/build/{menuButton.component-19f48d3e.js.map → menuButton.component-20d455cb.js.map} +1 -1
  234. package/build/menuContainer.component-b44ee33f.js +2 -0
  235. package/build/{menuContainer.component-4ea789c7.js.map → menuContainer.component-b44ee33f.js.map} +1 -1
  236. package/build/menuItem.component-f66e36a2.js +2 -0
  237. package/build/{menuItem.component-4b029132.js.map → menuItem.component-f66e36a2.js.map} +1 -1
  238. package/build/menuList.component-7f5f813f.js +2 -0
  239. package/build/menuList.component-7f5f813f.js.map +1 -0
  240. package/build/menuOptionGroup.component-c684dd20.js +2 -0
  241. package/build/{menuOptionGroup.component-d23adf36.js.map → menuOptionGroup.component-c684dd20.js.map} +1 -1
  242. package/build/modal.component-f1f7c5ff.js +2 -0
  243. package/build/{modal.component-e7b9dd3c.js.map → modal.component-f1f7c5ff.js.map} +1 -1
  244. package/build/modalBody.component-d09b5512.js +2 -0
  245. package/build/{modalBody.component-fa160042.js.map → modalBody.component-d09b5512.js.map} +1 -1
  246. package/build/modalCloseButton.component-867d3f29.js +2 -0
  247. package/build/{modalCloseButton.component-762da35a.js.map → modalCloseButton.component-867d3f29.js.map} +1 -1
  248. package/build/modalFooter.component-487913ba.js +2 -0
  249. package/build/{modalFooter.component-3ebc6de1.js.map → modalFooter.component-487913ba.js.map} +1 -1
  250. package/build/modalFooterButtons.component-ca16c190.js +2 -0
  251. package/build/{modalFooterButtons.component-5b764358.js.map → modalFooterButtons.component-ca16c190.js.map} +1 -1
  252. package/build/modalHeader.component-3cd09ba2.js +2 -0
  253. package/build/{modalHeader.component-2e6d90f2.js.map → modalHeader.component-3cd09ba2.js.map} +1 -1
  254. package/build/motion-1db106fa.js +2 -0
  255. package/build/motion-1db106fa.js.map +1 -0
  256. package/build/notificationCounter.component-27fafaa0.js +2 -0
  257. package/build/{notificationCounter.component-92840bbe.js.map → notificationCounter.component-27fafaa0.js.map} +1 -1
  258. package/build/picture.component-c9ffd27e.js +2 -0
  259. package/build/{picture.component-43508cec.js.map → picture.component-c9ffd27e.js.map} +1 -1
  260. package/build/popover.component-35b520f6.js +2 -0
  261. package/build/popover.component-35b520f6.js.map +1 -0
  262. package/build/popoverBody.component-ae4cc471.js +2 -0
  263. package/build/{popoverBody.component-6d4c1892.js.map → popoverBody.component-ae4cc471.js.map} +1 -1
  264. package/build/popoverCloseButton.component-f4857a02.js +2 -0
  265. package/build/{popoverCloseButton.component-9077af2c.js.map → popoverCloseButton.component-f4857a02.js.map} +1 -1
  266. package/build/popoverFooter.component-b39d12d1.js +2 -0
  267. package/build/{popoverFooter.component-04436218.js.map → popoverFooter.component-b39d12d1.js.map} +1 -1
  268. package/build/popoverFooterButtons.component-df7f48a5.js +2 -0
  269. package/build/{popoverFooterButtons.component-b8492486.js.map → popoverFooterButtons.component-df7f48a5.js.map} +1 -1
  270. package/build/popoverHeader.component-0ee69cde.js +2 -0
  271. package/build/{popoverHeader.component-5acdf2b2.js.map → popoverHeader.component-0ee69cde.js.map} +1 -1
  272. package/build/radio.component-77c1b19b.js +2 -0
  273. package/build/{radio.component-c2ed8d10.js.map → radio.component-77c1b19b.js.map} +1 -1
  274. package/build/radioGroup.component-4de2c34a.js +2 -0
  275. package/build/{radioGroup.component-ba9f1040.js.map → radioGroup.component-4de2c34a.js.map} +1 -1
  276. package/build/ratingDot.component-776080cf.js +2 -0
  277. package/build/{ratingDot.component-07c22024.js.map → ratingDot.component-776080cf.js.map} +1 -1
  278. package/build/ratingDots.component-9d3ff8ae.js +2 -0
  279. package/build/{ratingDots.component-f33860ac.js.map → ratingDots.component-9d3ff8ae.js.map} +1 -1
  280. package/build/select.component-e6ee82db.js +2 -0
  281. package/build/{select.component-86768d50.js.map → select.component-e6ee82db.js.map} +1 -1
  282. package/build/shared/argTypes/color.argTypes.d.ts +2 -14
  283. package/build/sortableItem.component-9aab4eb2.js +2 -0
  284. package/build/{sortableItem.component-f3efb731.js.map → sortableItem.component-9aab4eb2.js.map} +1 -1
  285. package/build/sortableItem.context-f7dd54a1.js.map +1 -1
  286. package/build/sortableList.component-8df7a374.js +2 -0
  287. package/build/{sortableList.component-57afe8d0.js.map → sortableList.component-8df7a374.js.map} +1 -1
  288. package/build/sortableOverlay.component-7ecbda06.js.map +1 -1
  289. package/build/spinner.component-f49dcd1b.js +2 -0
  290. package/build/{spinner.component-9799cae4.js.map → spinner.component-f49dcd1b.js.map} +1 -1
  291. package/build/strings-03c30366.js.map +1 -1
  292. package/build/switch.component-9484e902.js +2 -0
  293. package/build/switch.component-9484e902.js.map +1 -0
  294. package/build/tab.component-c67defd1.js +2 -0
  295. package/build/{tab.component-254eefff.js.map → tab.component-c67defd1.js.map} +1 -1
  296. package/build/tabs.component-f2e9b842.js +2 -0
  297. package/build/{tabs.component-0598f01b.js.map → tabs.component-f2e9b842.js.map} +1 -1
  298. package/build/tabsLayout.component-1498781a.js +2 -0
  299. package/build/{tabsLayout.component-47350377.js.map → tabsLayout.component-1498781a.js.map} +1 -1
  300. package/build/tag.component-31c40c4c.js +2 -0
  301. package/build/tag.component-31c40c4c.js.map +1 -0
  302. package/build/text.component-dabbab97.js +2 -0
  303. package/build/{text.component-59069e5f.js.map → text.component-dabbab97.js.map} +1 -1
  304. package/build/textInput.component-f3b72ddc.js +2 -0
  305. package/build/{textInput.component-12cf3d26.js.map → textInput.component-f3b72ddc.js.map} +1 -1
  306. package/build/textarea.component-3e5ce5a3.js +2 -0
  307. package/build/{textarea.component-9f685b2e.js.map → textarea.component-3e5ce5a3.js.map} +1 -1
  308. package/build/theme/index.js +1 -1
  309. package/build/theme/tokens/colors/colors.d.ts +0 -1
  310. package/build/theme/tokens/colors/index.js +1 -1
  311. package/build/theme/tokens/index.js +1 -1
  312. package/build/theme/tokens/index.js.map +1 -1
  313. package/build/theme/tokens/shadows/shadows.d.ts +0 -1
  314. package/build/theme.provider-e8fb98dd.js +2 -0
  315. package/build/theme.provider-e8fb98dd.js.map +1 -0
  316. package/build/timePicker.component-a7817379.js +2 -0
  317. package/build/{timePicker.component-3c5413f2.js.map → timePicker.component-a7817379.js.map} +1 -1
  318. package/build/timeRange.component-85585cde.js +2 -0
  319. package/build/{timeRange.component-6cc86187.js.map → timeRange.component-85585cde.js.map} +1 -1
  320. package/build/tooltip.component-25303330.js +2 -0
  321. package/build/tooltip.component-25303330.js.map +1 -0
  322. package/build/truncatedText.component-02797815.js +2 -0
  323. package/build/truncatedText.component-02797815.js.map +1 -0
  324. package/build/tslib.es6-f01c41a6.js +16 -0
  325. package/build/tslib.es6-f01c41a6.js.map +1 -0
  326. package/build/use-animation-state-5054a9f7.esm-ad9a45c2.js +2 -0
  327. package/build/use-animation-state-5054a9f7.esm-ad9a45c2.js.map +1 -0
  328. package/build/useAdaptiveColor-bd61f863.js +2 -0
  329. package/build/{useAdaptiveColor-65c8eb03.js.map → useAdaptiveColor-bd61f863.js.map} +1 -1
  330. package/build/useAdaptiveColorMap-0a74494f.js +2 -0
  331. package/build/{useAdaptiveColorMap-1feb6ba4.js.map → useAdaptiveColorMap-0a74494f.js.map} +1 -1
  332. package/build/useIconTextSizeMap-b81a72a5.js.map +1 -1
  333. package/build/useTheme-d7d8c3f5.js +2 -0
  334. package/build/{useTheme-48040f6c.js.map → useTheme-d7d8c3f5.js.map} +1 -1
  335. package/build/useToast-6c0cf0cb.js +2 -0
  336. package/build/useToast-6c0cf0cb.js.map +1 -0
  337. package/build/withDarkMode-3fdb3990.js +2 -0
  338. package/build/{withDarkMode-7c6cf1af.js.map → withDarkMode-3fdb3990.js.map} +1 -1
  339. package/build/withTheme-bac0a8eb.js +2 -0
  340. package/build/{withTheme-d639f809.js.map → withTheme-bac0a8eb.js.map} +1 -1
  341. package/package.json +86 -56
  342. package/build/_commonjsHelpers-68cdf74f.js +0 -2
  343. package/build/_commonjsHelpers-68cdf74f.js.map +0 -1
  344. package/build/_tslib-0d5bfb36.js +0 -2
  345. package/build/_tslib-0d5bfb36.js.map +0 -1
  346. package/build/alert.types-4bfe9b13.js +0 -2
  347. package/build/alert.types-4bfe9b13.js.map +0 -1
  348. package/build/avatar.component-73a17380.js +0 -2
  349. package/build/avatarBadge.component-af09e1b9.js +0 -2
  350. package/build/avatarGroup.component-cc62fd0c.js +0 -2
  351. package/build/button.component-c2d44866.js +0 -2
  352. package/build/button.component-c2d44866.js.map +0 -1
  353. package/build/card.component-fd2b0128.js +0 -2
  354. package/build/checkbox.component-41ff7829.js +0 -2
  355. package/build/checkboxGroup.component-029b73fe.js +0 -2
  356. package/build/color.record-2816a958.js +0 -2
  357. package/build/datepicker.types-ff1b8dbc.js +0 -16
  358. package/build/dragHandle.component-909abd36.js +0 -2
  359. package/build/formControl.component-6ae91414.js +0 -2
  360. package/build/heading.component-c8c6cb4e.js +0 -2
  361. package/build/index-ba9f08f2.js +0 -2
  362. package/build/index-ba9f08f2.js.map +0 -1
  363. package/build/link.component-41d1f167.js +0 -2
  364. package/build/menu.component-24e2b4dd.js +0 -2
  365. package/build/menu.context-458e8152.js +0 -2
  366. package/build/menuButton.component-19f48d3e.js +0 -2
  367. package/build/menuContainer.component-4ea789c7.js +0 -2
  368. package/build/menuItem.component-4b029132.js +0 -2
  369. package/build/menuList.component-8b429a33.js +0 -2
  370. package/build/menuList.component-8b429a33.js.map +0 -1
  371. package/build/menuOptionGroup.component-d23adf36.js +0 -2
  372. package/build/modal.component-e7b9dd3c.js +0 -2
  373. package/build/modalBody.component-fa160042.js +0 -2
  374. package/build/modalCloseButton.component-762da35a.js +0 -2
  375. package/build/modalFooter.component-3ebc6de1.js +0 -2
  376. package/build/modalFooterButtons.component-5b764358.js +0 -2
  377. package/build/modalHeader.component-2e6d90f2.js +0 -2
  378. package/build/notificationCounter.component-92840bbe.js +0 -2
  379. package/build/picture.component-43508cec.js +0 -2
  380. package/build/popover.component-2e8dfe27.js +0 -2
  381. package/build/popover.component-2e8dfe27.js.map +0 -1
  382. package/build/popoverBody.component-6d4c1892.js +0 -2
  383. package/build/popoverCloseButton.component-9077af2c.js +0 -2
  384. package/build/popoverFooter.component-04436218.js +0 -2
  385. package/build/popoverFooterButtons.component-b8492486.js +0 -2
  386. package/build/popoverHeader.component-5acdf2b2.js +0 -2
  387. package/build/radio.component-c2ed8d10.js +0 -2
  388. package/build/radioGroup.component-ba9f1040.js +0 -2
  389. package/build/ratingDot.component-07c22024.js +0 -2
  390. package/build/ratingDots.component-f33860ac.js +0 -2
  391. package/build/select.component-86768d50.js +0 -2
  392. package/build/sortableItem.component-f3efb731.js +0 -2
  393. package/build/sortableList.component-57afe8d0.js +0 -2
  394. package/build/spinner.component-9799cae4.js +0 -2
  395. package/build/switch.component-8d28669e.js +0 -2
  396. package/build/switch.component-8d28669e.js.map +0 -1
  397. package/build/tab.component-254eefff.js +0 -2
  398. package/build/tabs.component-0598f01b.js +0 -2
  399. package/build/tabsLayout.component-47350377.js +0 -2
  400. package/build/tag.component-949be715.js +0 -2
  401. package/build/tag.component-949be715.js.map +0 -1
  402. package/build/text.component-59069e5f.js +0 -2
  403. package/build/textInput.component-12cf3d26.js +0 -2
  404. package/build/textarea.component-9f685b2e.js +0 -2
  405. package/build/theme.provider-81dc43bd.js +0 -2
  406. package/build/theme.provider-81dc43bd.js.map +0 -1
  407. package/build/timePicker.component-3c5413f2.js +0 -2
  408. package/build/timeRange.component-6cc86187.js +0 -2
  409. package/build/tooltip.component-0e9a4da1.js +0 -2
  410. package/build/tooltip.component-0e9a4da1.js.map +0 -1
  411. package/build/truncatedText.component-09f32a86.js +0 -2
  412. package/build/truncatedText.component-09f32a86.js.map +0 -1
  413. package/build/useAdaptiveColor-65c8eb03.js +0 -2
  414. package/build/useAdaptiveColorMap-1feb6ba4.js +0 -2
  415. package/build/useTheme-48040f6c.js +0 -2
  416. package/build/withDarkMode-7c6cf1af.js +0 -2
  417. package/build/withTheme-d639f809.js +0 -2
  418. /package/build/icons/{TelevetV.d.ts → Logo.d.ts} +0 -0
@@ -0,0 +1,2 @@
1
+ "use strict";var t=require("./tslib.es6-f01c41a6.js"),e=require("react"),o=require("./useTheme-d7d8c3f5.js"),r=require("./chakra-ui-layout.esm-493ee04b.js");function i(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var a,n=i(e);exports.NotificationCounterVariant=void 0,(a=exports.NotificationCounterVariant||(exports.NotificationCounterVariant={})).Red="red",a.Neutral="neutral";var s={xs:2,sm:4,md:5,lg:6},u={xs:"8px",sm:"10px",md:"12px",lg:"14px"},d={xs:"1px",sm:"2px",md:"3px",lg:"4px"};exports.NotificationCounter=function(e){var i,a=e.count,l=void 0===a?0:a,c=e.size,f=void 0===c?"md":c,x=e.showCount,p=void 0===x||x,h=e.variant,b=void 0===h?exports.NotificationCounterVariant.Red:h,g=t.__rest(e,["count","size","showCount","variant"]),m=o.useTheme(),C="xs"!==f&&p,v=((i={})[exports.NotificationCounterVariant.Red]={backgroundColor:m.colors.red[500],color:m.colors.white},i[exports.NotificationCounterVariant.Neutral]={backgroundColor:m.colors.background.table,color:m.colors.text.light.default},i),N=l>99?n.default.createElement(r.Box,{backgroundColor:v[b].color,borderRadius:m.radii.full,height:d[f],width:d[f]}):l>0&&l;return n.default.createElement(r.Flex,t.__assign({},g,{alignItems:"center",border:m.borders["1px"],borderColor:m.colors.white,borderRadius:m.radii.full,fontSize:u[f],fontWeight:m.fontWeights.semibold,height:s[f],justifyContent:"center",width:s[f]},v[b]),C&&N)};
2
+ //# sourceMappingURL=notificationCounter.component-27fafaa0.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"notificationCounter.component-92840bbe.js","sources":["../src/components/NotificationCounter/notificationCounter.types.ts","../src/components/NotificationCounter/notificationCounter.records.ts","../src/components/NotificationCounter/notificationCounter.component.tsx"],"sourcesContent":["export type NotificationCounterSize = 'lg' | 'md' | 'sm' | 'xs';\n\nexport enum NotificationCounterVariant {\n Red = 'red',\n Neutral = 'neutral',\n}\n","import { NotificationCounterSize } from './notificationCounter.types';\n\nexport const MAX_COUNT = 99;\n\nexport const notificationCounterSizes: Record<NotificationCounterSize, number> = {\n xs: 2,\n sm: 4,\n md: 5,\n lg: 6,\n};\n\nexport const notificationCounterFontSizes: Record<NotificationCounterSize, string> = {\n xs: '8px', // Not used since the xs size doesn't show a label\n sm: '10px',\n md: '12px',\n lg: '14px',\n};\n\nexport const maxNotificationCounterSizes: Record<NotificationCounterSize, string> = {\n xs: '1px', // Not used since the xs size doesn't show a label\n sm: '2px',\n md: '3px',\n lg: '4px',\n};\n","import React from 'react';\nimport { useTheme } from 'hooks/useTheme';\nimport { NotificationCounterSize, NotificationCounterVariant } from './notificationCounter.types';\nimport { Box, Flex, FlexProps } from '@chakra-ui/react';\nimport {\n MAX_COUNT,\n maxNotificationCounterSizes,\n notificationCounterFontSizes,\n notificationCounterSizes,\n} from './notificationCounter.records';\n\nexport interface NotificationCounterProps extends FlexProps {\n count?: number;\n size?: NotificationCounterSize;\n showCount?: boolean;\n variant?: NotificationCounterVariant;\n}\n\nexport const NotificationCounter = ({\n count = 0,\n size = 'md',\n showCount = true,\n variant = NotificationCounterVariant.Red,\n ...rest\n}: NotificationCounterProps): JSX.Element => {\n const theme = useTheme();\n const _showCount = size === 'xs' ? false : showCount; // By default the xs size doesn't show a label\n\n const notificationVariantStyles = {\n [NotificationCounterVariant.Red]: {\n backgroundColor: theme.colors.red[500],\n color: theme.colors.white,\n },\n [NotificationCounterVariant.Neutral]: {\n backgroundColor: theme.colors.background.table,\n color: theme.colors.text.light.default,\n },\n };\n\n const counterContent =\n count > MAX_COUNT ? (\n <Box\n backgroundColor={notificationVariantStyles[variant].color}\n borderRadius={theme.radii.full}\n height={maxNotificationCounterSizes[size]}\n width={maxNotificationCounterSizes[size]}\n />\n ) : (\n count > 0 && count\n );\n\n return (\n <Flex\n {...rest}\n alignItems=\"center\"\n border={theme.borders['1px']}\n borderColor={theme.colors.white}\n borderRadius={theme.radii.full}\n fontSize={notificationCounterFontSizes[size]}\n fontWeight={theme.fontWeights.semibold}\n height={notificationCounterSizes[size]}\n justifyContent=\"center\"\n width={notificationCounterSizes[size]}\n {...notificationVariantStyles[variant]}\n >\n {_showCount && counterContent}\n </Flex>\n );\n};\n"],"names":["NotificationCounterVariant","notificationCounterSizes","xs","sm","md","lg","notificationCounterFontSizes","maxNotificationCounterSizes","_a","_c","count","_d","size","_e","showCount","_f","variant","Red","rest","__rest","theme","useTheme","_showCount","notificationVariantStyles","_b","backgroundColor","colors","red","color","white","Neutral","background","table","text","light","default","counterContent","React","createElement","Box","borderRadius","radii","full","height","width","Flex","__assign","alignItems","border","borders","borderColor","fontSize","fontWeight","fontWeights","semibold","justifyContent"],"mappings":"oNAEYA,SAAAA,QAGXA,gCAAA,GAHWA,EAAAA,QAA0BA,6BAA1BA,mCAGX,CAAA,IAFC,IAAA,MACAA,EAAA,QAAA,UCFK,IAEMC,EAAoE,CAC/EC,GAAI,EACJC,GAAI,EACJC,GAAI,EACJC,GAAI,GAGOC,EAAwE,CACnFJ,GAAI,MACJC,GAAI,OACJC,GAAI,OACJC,GAAI,QAGOE,EAAuE,CAClFL,GAAI,MACJC,GAAI,MACJC,GAAI,MACJC,GAAI,mCCJ6B,SAACG,SAClCC,EAASD,EAAAE,MAATA,OAAK,IAAAD,EAAG,EAACA,EACTE,EAAWH,EAAAI,KAAXA,OAAI,IAAAD,EAAG,KAAIA,EACXE,EAAgBL,EAAAM,UAAhBA,OAAS,IAAAD,GAAOA,EAChBE,EAAAP,EAAAQ,QAAAA,OAAO,IAAAD,EAAGf,QAAAA,2BAA2BiB,IAAGF,EACrCG,EAAIC,EAAAA,OAAAX,EAL2B,wCAO5BY,EAAQC,EAAAA,WACRC,EAAsB,OAATV,GAAwBE,EAErCS,IAAyBC,EAAA,CAAA,GAC5BxB,QAAAA,2BAA2BiB,KAAM,CAChCQ,gBAAiBL,EAAMM,OAAOC,IAAI,KAClCC,MAAOR,EAAMM,OAAOG,OAEtBL,EAACxB,QAAAA,2BAA2B8B,SAAU,CACpCL,gBAAiBL,EAAMM,OAAOK,WAAWC,MACzCJ,MAAOR,EAAMM,OAAOO,KAAKC,MAAMC,YAI7BC,EACJ1B,EDtCqB,GCuCnB2B,EAAAA,QAAAC,cAACC,EAAAA,IAAG,CACFd,gBAAiBF,EAA0BP,GAASY,MACpDY,aAAcpB,EAAMqB,MAAMC,KAC1BC,OAAQpC,EAA4BK,GACpCgC,MAAOrC,EAA4BK,KAGrCF,EAAQ,GAAKA,EAGjB,OACE2B,EAAC,QAAAC,cAAAO,EAAAA,KACKC,EAAAA,SAAA,CAAA,EAAA5B,GACJ6B,WAAW,SACXC,OAAQ5B,EAAM6B,QAAQ,OACtBC,YAAa9B,EAAMM,OAAOG,MAC1BW,aAAcpB,EAAMqB,MAAMC,KAC1BS,SAAU7C,EAA6BM,GACvCwC,WAAYhC,EAAMiC,YAAYC,SAC9BX,OAAQ1C,EAAyBW,GACjC2C,eAAe,SACfX,MAAO3C,EAAyBW,IAC5BW,EAA0BP,IAE7BM,GAAcc,EAGrB"}
1
+ {"version":3,"file":"notificationCounter.component-27fafaa0.js","sources":["../src/components/NotificationCounter/notificationCounter.types.ts","../src/components/NotificationCounter/notificationCounter.records.ts","../src/components/NotificationCounter/notificationCounter.component.tsx"],"sourcesContent":["export type NotificationCounterSize = 'lg' | 'md' | 'sm' | 'xs';\n\nexport enum NotificationCounterVariant {\n Red = 'red',\n Neutral = 'neutral',\n}\n","import { NotificationCounterSize } from './notificationCounter.types';\n\nexport const MAX_COUNT = 99;\n\nexport const notificationCounterSizes: Record<NotificationCounterSize, number> = {\n xs: 2,\n sm: 4,\n md: 5,\n lg: 6,\n};\n\nexport const notificationCounterFontSizes: Record<NotificationCounterSize, string> = {\n xs: '8px', // Not used since the xs size doesn't show a label\n sm: '10px',\n md: '12px',\n lg: '14px',\n};\n\nexport const maxNotificationCounterSizes: Record<NotificationCounterSize, string> = {\n xs: '1px', // Not used since the xs size doesn't show a label\n sm: '2px',\n md: '3px',\n lg: '4px',\n};\n","import React from 'react';\nimport { useTheme } from 'hooks/useTheme';\nimport { NotificationCounterSize, NotificationCounterVariant } from './notificationCounter.types';\nimport { Box, Flex, FlexProps } from '@chakra-ui/react';\nimport {\n MAX_COUNT,\n maxNotificationCounterSizes,\n notificationCounterFontSizes,\n notificationCounterSizes,\n} from './notificationCounter.records';\n\nexport interface NotificationCounterProps extends FlexProps {\n count?: number;\n size?: NotificationCounterSize;\n showCount?: boolean;\n variant?: NotificationCounterVariant;\n}\n\nexport const NotificationCounter = ({\n count = 0,\n size = 'md',\n showCount = true,\n variant = NotificationCounterVariant.Red,\n ...rest\n}: NotificationCounterProps): JSX.Element => {\n const theme = useTheme();\n const _showCount = size === 'xs' ? false : showCount; // By default the xs size doesn't show a label\n\n const notificationVariantStyles = {\n [NotificationCounterVariant.Red]: {\n backgroundColor: theme.colors.red[500],\n color: theme.colors.white,\n },\n [NotificationCounterVariant.Neutral]: {\n backgroundColor: theme.colors.background.table,\n color: theme.colors.text.light.default,\n },\n };\n\n const counterContent =\n count > MAX_COUNT ? (\n <Box\n backgroundColor={notificationVariantStyles[variant].color}\n borderRadius={theme.radii.full}\n height={maxNotificationCounterSizes[size]}\n width={maxNotificationCounterSizes[size]}\n />\n ) : (\n count > 0 && count\n );\n\n return (\n <Flex\n {...rest}\n alignItems=\"center\"\n border={theme.borders['1px']}\n borderColor={theme.colors.white}\n borderRadius={theme.radii.full}\n fontSize={notificationCounterFontSizes[size]}\n fontWeight={theme.fontWeights.semibold}\n height={notificationCounterSizes[size]}\n justifyContent=\"center\"\n width={notificationCounterSizes[size]}\n {...notificationVariantStyles[variant]}\n >\n {_showCount && counterContent}\n </Flex>\n );\n};\n"],"names":["NotificationCounterVariant","notificationCounterSizes","xs","sm","md","lg","notificationCounterFontSizes","maxNotificationCounterSizes","_a","_c","count","_d","size","_e","showCount","_f","variant","Red","rest","__rest","theme","useTheme","_showCount","notificationVariantStyles","_b","backgroundColor","colors","red","color","white","Neutral","background","table","text","light","default","counterContent","React","createElement","Box","borderRadius","radii","full","height","width","Flex","__assign","alignItems","border","borders","borderColor","fontSize","fontWeight","fontWeights","semibold","justifyContent"],"mappings":"yOAEYA,SAAAA,QAGXA,gCAAA,GAHWA,EAAAA,QAA0BA,6BAA1BA,mCAGX,KAFC,IAAA,MACAA,EAAA,QAAA,UCFK,IAEMC,EAAoE,CAC/EC,GAAI,EACJC,GAAI,EACJC,GAAI,EACJC,GAAI,GAGOC,EAAwE,CACnFJ,GAAI,MACJC,GAAI,OACJC,GAAI,OACJC,GAAI,QAGOE,EAAuE,CAClFL,GAAI,MACJC,GAAI,MACJC,GAAI,MACJC,GAAI,mCCJ6B,SAACG,SAClCC,EAASD,EAAAE,MAATA,OAAK,IAAAD,EAAG,EAACA,EACTE,EAAWH,EAAAI,KAAXA,OAAI,IAAAD,EAAG,KAAIA,EACXE,EAAgBL,EAAAM,UAAhBA,OAAS,IAAAD,GAAOA,EAChBE,EAAAP,EAAAQ,QAAAA,OAAO,IAAAD,EAAGf,QAAAA,2BAA2BiB,IAAGF,EACrCG,EAAIC,EAAAA,OAAAX,EAL2B,wCAO5BY,EAAQC,EAAAA,WACRC,EAAsB,OAATV,GAAwBE,EAErCS,IAAyBC,EAAA,IAC5BxB,QAAAA,2BAA2BiB,KAAM,CAChCQ,gBAAiBL,EAAMM,OAAOC,IAAI,KAClCC,MAAOR,EAAMM,OAAOG,OAEtBL,EAACxB,QAAAA,2BAA2B8B,SAAU,CACpCL,gBAAiBL,EAAMM,OAAOK,WAAWC,MACzCJ,MAAOR,EAAMM,OAAOO,KAAKC,MAAMC,YAI7BC,EACJ1B,EDtCqB,GCuCnB2B,EAAAA,QAAAC,cAACC,EAAAA,IAAG,CACFd,gBAAiBF,EAA0BP,GAASY,MACpDY,aAAcpB,EAAMqB,MAAMC,KAC1BC,OAAQpC,EAA4BK,GACpCgC,MAAOrC,EAA4BK,KAGrCF,EAAQ,GAAKA,EAGjB,OACE2B,EAAC,QAAAC,cAAAO,EAAAA,KACKC,EAAAA,SAAA,GAAA5B,GACJ6B,WAAW,SACXC,OAAQ5B,EAAM6B,QAAQ,OACtBC,YAAa9B,EAAMM,OAAOG,MAC1BW,aAAcpB,EAAMqB,MAAMC,KAC1BS,SAAU7C,EAA6BM,GACvCwC,WAAYhC,EAAMiC,YAAYC,SAC9BX,OAAQ1C,EAAyBW,GACjC2C,eAAe,SACfX,MAAO3C,EAAyBW,IAC5BW,EAA0BP,IAE7BM,GAAcc"}
@@ -0,0 +1,2 @@
1
+ "use strict";var e=require("./tslib.es6-f01c41a6.js"),r=require("react"),t=require("./chakra-ui-image.esm-acdc667a.js"),a=require("./chakra-ui-layout.esm-493ee04b.js");function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=s(r);exports.Picture=function(r){var s=r.src,u=r.webpSrc,i=r.imgProps,n=e.__rest(r,["src","webpSrc","imgProps"]);return c.default.createElement(a.Box,e.__assign({as:"picture"},n),c.default.createElement(a.Box,{as:"source",srcSet:u,type:"image/webp"}),c.default.createElement(t.Image$1,e.__assign({src:s},i)))};
2
+ //# sourceMappingURL=picture.component-c9ffd27e.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"picture.component-43508cec.js","sources":["../src/components/Picture/picture.component.tsx"],"sourcesContent":["import { Box, BoxProps, Image, ImageProps } from '@chakra-ui/react';\nimport React from 'react';\n\nexport interface PictureProps extends BoxProps {\n webpSrc: string;\n src: string;\n imgProps?: ImageProps;\n}\n\nexport const Picture = ({ src, webpSrc, imgProps, ...rest }: PictureProps): JSX.Element => {\n return (\n <Box as=\"picture\" {...rest}>\n <Box as=\"source\" srcSet={webpSrc} type=\"image/webp\" />\n <Image src={src} {...imgProps} />\n </Box>\n );\n};\n"],"names":["_a","src","webpSrc","imgProps","rest","__rest","React","Box","__assign","as","createElement","srcSet","type","Image"],"mappings":"mMASuB,SAACA,GAAE,IAAAC,EAAGD,EAAAC,IAAEC,EAAOF,EAAAE,QAAEC,EAAQH,EAAAG,SAAKC,EAA7BC,EAAAA,OAAAL,EAAA,CAAA,MAAA,UAAA,aACtB,OACEM,wBAACC,MAAGC,EAAAA,SAAA,CAACC,GAAG,WAAcL,GACpBE,UAAAI,cAACH,EAAGA,IAAA,CAACE,GAAG,SAASE,OAAQT,EAASU,KAAK,eACvCN,UAACI,cAAAG,EAAKA,MAACL,WAAA,CAAAP,IAAKA,GAASE,IAG3B"}
1
+ {"version":3,"file":"picture.component-c9ffd27e.js","sources":["../src/components/Picture/picture.component.tsx"],"sourcesContent":["import { Box, BoxProps, Image, ImageProps } from '@chakra-ui/react';\nimport React from 'react';\n\nexport interface PictureProps extends BoxProps {\n webpSrc: string;\n src: string;\n imgProps?: ImageProps;\n}\n\nexport const Picture = ({ src, webpSrc, imgProps, ...rest }: PictureProps): JSX.Element => {\n return (\n <Box as=\"picture\" {...rest}>\n <Box as=\"source\" srcSet={webpSrc} type=\"image/webp\" />\n <Image src={src} {...imgProps} />\n </Box>\n );\n};\n"],"names":["_a","src","webpSrc","imgProps","rest","__rest","React","Box","__assign","as","createElement","srcSet","type","Image","Image$1"],"mappings":"2QASuB,SAACA,GAAE,IAAAC,EAAGD,EAAAC,IAAEC,EAAOF,EAAAE,QAAEC,EAAQH,EAAAG,SAAKC,EAA7BC,EAAAA,OAAAL,EAAA,CAAA,MAAA,UAAA,aACtB,OACEM,wBAACC,MAAGC,EAAAA,SAAA,CAACC,GAAG,WAAcL,GACpBE,UAAAI,cAACH,EAAGA,IAAA,CAACE,GAAG,SAASE,OAAQT,EAASU,KAAK,eACvCN,UAACI,cAAAG,EAAKC,QAACN,WAAA,CAAAP,IAAKA,GAASE"}
@@ -0,0 +1,2 @@
1
+ "use strict";var e=require("./tslib.es6-f01c41a6.js"),r=require("react"),o=require("./withDarkMode-3fdb3990.js"),t=require("./useTheme-d7d8c3f5.js"),a=require("./useAdaptiveColor-bd61f863.js"),d=require("./text.component-dabbab97.js"),s=require("./chakra-ui-popover.esm-af9721a4.js");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=i(r);exports.Popover=function(r){var i=r.children,l=r.popoverTrigger,u=r.darkMode,c=r.allowEscape,p=void 0===c||c,v=r.size,f=void 0===v?"sm":v,b=r.shadow,g=void 0===b?"md":b,h=r.contentProps,m=e.__rest(r,["children","popoverTrigger","darkMode","allowEscape","size","shadow","contentProps"]),k=t.useTheme(),w=k.colors,E=k.components.Popover[f].width,P=a.useAdaptiveColor(w.background),j=u?w.background.dark:P,q=u?w.background.dark:w.border.light.default;return n.default.createElement(s.Popover,e.__assign({},m,{closeOnBlur:p,closeOnEsc:p}),n.default.createElement(s.PopoverTrigger,null,l),o.withDarkMode(n.default.createElement(s.PopoverContent,e.__assign({width:E,bg:j,borderColor:q,shadow:g},h),n.default.createElement(s.PopoverArrow,{bg:j}),n.default.createElement(d.Text,{size:"sm"},i)),!!u))};
2
+ //# sourceMappingURL=popover.component-35b520f6.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"popover.component-35b520f6.js","sources":["../src/components/Popover/popover.component.tsx"],"sourcesContent":["import React, { ReactNode } from 'react';\nimport {\n Popover as CPopover,\n PopoverProps as CPopoverProps,\n PopoverTrigger,\n PopoverContent as CPopoverContent,\n PopoverArrow,\n PopoverContentProps,\n} from '@chakra-ui/react';\nimport { Token } from '@chakra-ui/styled-system/dist/declarations/src/utils';\nimport { withDarkMode } from 'hocs/withDarkMode';\nimport { useTheme } from 'hooks/useTheme';\nimport { PopoverSize } from './popover.types';\nimport { useAdaptiveColor } from 'hooks/useAdaptiveColor';\nimport { Text } from '../Text/text.component';\nimport * as CSS from 'csstype';\n\nexport interface PopoverProps extends CPopoverProps {\n children: ReactNode;\n popoverTrigger: ReactNode;\n darkMode?: boolean;\n allowEscape?: boolean;\n size?: PopoverSize;\n shadow?: Token<CSS.Property.BoxShadow | number, 'shadows'>;\n contentProps?: PopoverContentProps;\n}\n\nexport const Popover = ({\n children,\n popoverTrigger,\n darkMode,\n allowEscape = true,\n size = 'sm',\n shadow = 'md',\n contentProps,\n ...rest\n}: PopoverProps): JSX.Element => {\n const { colors, components } = useTheme();\n const { width } = components.Popover[size];\n\n const adaptiveBackground = useAdaptiveColor(colors.background);\n\n const bg = !darkMode ? adaptiveBackground : colors.background.dark;\n\n const borderColor = !darkMode ? colors.border.light.default : colors.background.dark;\n\n return (\n <CPopover {...rest} closeOnBlur={allowEscape} closeOnEsc={allowEscape}>\n <PopoverTrigger>{popoverTrigger}</PopoverTrigger>\n {withDarkMode(\n <CPopoverContent width={width} bg={bg} borderColor={borderColor} shadow={shadow} {...contentProps}>\n <PopoverArrow bg={bg} />\n <Text size=\"sm\">{children}</Text>\n </CPopoverContent>,\n !!darkMode,\n )}\n </CPopover>\n );\n};\n"],"names":["_a","children","popoverTrigger","darkMode","_b","allowEscape","_c","size","_d","shadow","contentProps","rest","__rest","_e","useTheme","colors","width","components","Popover","adaptiveBackground","useAdaptiveColor","background","bg","dark","borderColor","border","light","default","React","createElement","CPopover","__assign","closeOnBlur","closeOnEsc","PopoverTrigger","withDarkMode","CPopoverContent","PopoverContent","PopoverArrow","Text"],"mappings":"+XA2BuB,SAACA,GACtB,IAAAC,EAAQD,EAAAC,SACRC,EAAcF,EAAAE,eACdC,EAAQH,EAAAG,SACRC,EAAAJ,EAAAK,YAAAA,OAAW,IAAAD,GAAOA,EAClBE,EAAWN,EAAAO,KAAXA,OAAI,IAAAD,EAAG,KAAIA,EACXE,EAAaR,EAAAS,OAAbA,OAAS,IAAAD,EAAA,KAAIA,EACbE,EAAYV,EAAAU,aACTC,EAAIC,EAAAA,OAAAZ,EARe,uFAUhBa,EAAyBC,EAAQA,WAA/BC,EAAMF,EAAAE,OACNC,EADkBH,EAAAI,WACGC,QAAQX,GAAKS,MAEpCG,EAAqBC,EAAAA,iBAAiBL,EAAOM,YAE7CC,EAAMnB,EAAgCY,EAAOM,WAAWE,KAAvCJ,EAEjBK,EAAerB,EAAyCY,EAAOM,WAAWE,KAAhDR,EAAOU,OAAOC,MAAMC,QAEpD,OACEC,UAAAC,cAACC,EAAQZ,QAAAa,EAAAA,SAAA,GAAKpB,EAAI,CAAEqB,YAAa3B,EAAa4B,WAAY5B,IACxDuB,EAAAA,QAACC,cAAAK,iBAAgB,KAAAhC,GAChBiC,EAAYA,aACXP,wBAACQ,EAAeC,eAAAN,EAAAA,SAAA,CAACf,MAAOA,EAAOM,GAAIA,EAAIE,YAAaA,EAAaf,OAAQA,GAAYC,GACnFkB,EAAAA,QAAAC,cAACS,EAAAA,aAAY,CAAChB,GAAIA,IAClBM,EAAAA,QAAAC,cAACU,OAAK,CAAAhC,KAAK,MAAMN,MAEjBE"}
@@ -0,0 +1,2 @@
1
+ "use strict";var e=require("./tslib.es6-f01c41a6.js"),r=require("react"),t=require("./chakra-ui-popover.esm-af9721a4.js");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=a(r);exports.PopoverBody=function(r){var a=r.children,i=e.__rest(r,["children"]);return o.default.createElement(t.PopoverBody,e.__assign({pb:3,pt:0},i),a)};
2
+ //# sourceMappingURL=popoverBody.component-ae4cc471.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"popoverBody.component-6d4c1892.js","sources":["../src/components/Popover/components/PopoverBody/popoverBody.component.tsx"],"sourcesContent":["import React from 'react';\nimport { PopoverBody as CPopoverBody, PopoverBodyProps as CPopoverBodyProps } from '@chakra-ui/react';\n\nexport interface PopoverBodyProps extends CPopoverBodyProps {}\n\nexport const PopoverBody = ({ children, ...rest }: PopoverBodyProps): JSX.Element => {\n return (\n <CPopoverBody pb={3} pt={0} {...rest}>\n {children}\n </CPopoverBody>\n );\n};\n"],"names":["_a","children","rest","__rest","React","createElement","CPopoverBody","__assign","pb","pt"],"mappings":"2MAK2B,SAACA,GAAE,IAAAC,EAAQD,EAAAC,SAAKC,EAAIC,EAAAA,OAAAH,EAAnB,cAC1B,OACEI,EAAC,QAAAC,cAAAC,cAAaC,EAAAA,SAAA,CAAAC,GAAI,EAAGC,GAAI,GAAOP,GAC7BD,EAGP"}
1
+ {"version":3,"file":"popoverBody.component-ae4cc471.js","sources":["../src/components/Popover/components/PopoverBody/popoverBody.component.tsx"],"sourcesContent":["import React from 'react';\nimport { PopoverBody as CPopoverBody, PopoverBodyProps as CPopoverBodyProps } from '@chakra-ui/react';\n\nexport interface PopoverBodyProps extends CPopoverBodyProps {}\n\nexport const PopoverBody = ({ children, ...rest }: PopoverBodyProps): JSX.Element => {\n return (\n <CPopoverBody pb={3} pt={0} {...rest}>\n {children}\n </CPopoverBody>\n );\n};\n"],"names":["_a","children","rest","__rest","React","createElement","CPopoverBody","__assign","pb","pt"],"mappings":"iOAK2B,SAACA,GAAE,IAAAC,EAAQD,EAAAC,SAAKC,EAAIC,EAAAA,OAAAH,EAAnB,cAC1B,OACEI,EAAC,QAAAC,cAAAC,cAAaC,EAAAA,SAAA,CAAAC,GAAI,EAAGC,GAAI,GAAOP,GAC7BD"}
@@ -0,0 +1,2 @@
1
+ "use strict";var e=require("./tslib.es6-f01c41a6.js"),t=require("react"),o=require("./button.component-73d5a120.js"),r=require("./chakra-ui-popover.esm-af9721a4.js");function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=s(t);exports.PopoverCloseButton=function(t){var s=t.size,a=void 0===s?"xs":s,n=e.__rest(t,["size"]),u=r.usePopoverContext().onClose;return i.default.createElement(o.Button,e.__assign({variant:"ghostNeutral",onClick:u,iconName:"close",position:"absolute",right:1,top:1,size:a},n))};
2
+ //# sourceMappingURL=popoverCloseButton.component-f4857a02.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"popoverCloseButton.component-9077af2c.js","sources":["../src/components/Popover/components/PopoverCloseButton/popoverCloseButton.component.tsx"],"sourcesContent":["import React from 'react';\nimport { usePopoverContext } from '@chakra-ui/react';\nimport { Button, ButtonProps } from '../../../Button/button.component';\n\nexport interface PopoverCloseButtonProps extends ButtonProps {}\n\nexport const PopoverCloseButton = ({ size = 'xs', ...rest }: PopoverCloseButtonProps): JSX.Element => {\n const { onClose } = usePopoverContext();\n return (\n <Button\n variant=\"ghostNeutral\"\n onClick={onClose}\n iconName=\"close\"\n position=\"absolute\"\n right={1}\n top={1}\n size={size}\n {...rest}\n />\n );\n};\n"],"names":["_a","_b","size","rest","__rest","onClose","usePopoverContext","React","createElement","Button","__assign","variant","onClick","iconName","position","right","top"],"mappings":"8PAMkC,SAACA,GAAE,IAAAC,EAAAD,EAAAE,KAAAA,OAAO,IAAAD,EAAA,OAASE,EAAlBC,EAAAA,OAAAJ,EAAA,CAAA,SACzBK,EAAYC,8BACpB,OACEC,EAAA,QAAAC,cAACC,EAAAA,OAAMC,EAAAA,SAAA,CACLC,QAAQ,eACRC,QAASP,EACTQ,SAAS,QACTC,SAAS,WACTC,MAAO,EACPC,IAAK,EACLd,KAAMA,GACFC,GAGV"}
1
+ {"version":3,"file":"popoverCloseButton.component-f4857a02.js","sources":["../src/components/Popover/components/PopoverCloseButton/popoverCloseButton.component.tsx"],"sourcesContent":["import React from 'react';\nimport { usePopoverContext } from '@chakra-ui/react';\nimport { Button, ButtonProps } from '../../../Button/button.component';\n\nexport interface PopoverCloseButtonProps extends ButtonProps {}\n\nexport const PopoverCloseButton = ({ size = 'xs', ...rest }: PopoverCloseButtonProps): JSX.Element => {\n const { onClose } = usePopoverContext();\n return (\n <Button\n variant=\"ghostNeutral\"\n onClick={onClose}\n iconName=\"close\"\n position=\"absolute\"\n right={1}\n top={1}\n size={size}\n {...rest}\n />\n );\n};\n"],"names":["_a","_b","size","rest","__rest","onClose","usePopoverContext","React","createElement","Button","__assign","variant","onClick","iconName","position","right","top"],"mappings":"oRAMkC,SAACA,GAAE,IAAAC,EAAAD,EAAAE,KAAAA,OAAO,IAAAD,EAAA,OAASE,EAAlBC,EAAAA,OAAAJ,EAAA,CAAA,SACzBK,EAAYC,8BACpB,OACEC,EAAA,QAAAC,cAACC,EAAAA,OAAMC,EAAAA,SAAA,CACLC,QAAQ,eACRC,QAASP,EACTQ,SAAS,QACTC,SAAS,WACTC,MAAO,EACPC,IAAK,EACLd,KAAMA,GACFC"}
@@ -0,0 +1,2 @@
1
+ "use strict";var e=require("./tslib.es6-f01c41a6.js"),r=require("react"),t=require("./chakra-ui-popover.esm-af9721a4.js");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=o(r);exports.PopoverFooter=function(r){var o=r.children,i=e.__rest(r,["children"]);return a.default.createElement(t.PopoverFooter,e.__assign({},i,{pb:3,pt:0,borderTop:0}),o)};
2
+ //# sourceMappingURL=popoverFooter.component-b39d12d1.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"popoverFooter.component-04436218.js","sources":["../src/components/Popover/components/PopoverFooter/popoverFooter.component.tsx"],"sourcesContent":["import React from 'react';\nimport { PopoverFooter as CPopoverFooter, PopoverFooterProps as CPopoverFooterProps } from '@chakra-ui/react';\n\nexport interface PopoverFooterProps extends CPopoverFooterProps {}\n\nexport const PopoverFooter = ({ children, ...rest }: PopoverFooterProps): JSX.Element => {\n return (\n <CPopoverFooter {...rest} pb={3} pt={0} borderTop={0}>\n {children}\n </CPopoverFooter>\n );\n};\n"],"names":["_a","children","rest","__rest","React","CPopoverFooter","__assign","pb","pt","borderTop"],"mappings":"6MAK6B,SAACA,GAAE,IAAAC,EAAQD,EAAAC,SAAKC,EAAIC,EAAAA,OAAAH,EAAnB,cAC5B,OACEI,EAAAA,sBAACC,EAAAA,cAAcC,EAAAA,SAAA,CAAA,EAAKJ,EAAM,CAAAK,GAAI,EAAGC,GAAI,EAAGC,UAAW,IAChDR,EAGP"}
1
+ {"version":3,"file":"popoverFooter.component-b39d12d1.js","sources":["../src/components/Popover/components/PopoverFooter/popoverFooter.component.tsx"],"sourcesContent":["import React from 'react';\nimport { PopoverFooter as CPopoverFooter, PopoverFooterProps as CPopoverFooterProps } from '@chakra-ui/react';\n\nexport interface PopoverFooterProps extends CPopoverFooterProps {}\n\nexport const PopoverFooter = ({ children, ...rest }: PopoverFooterProps): JSX.Element => {\n return (\n <CPopoverFooter {...rest} pb={3} pt={0} borderTop={0}>\n {children}\n </CPopoverFooter>\n );\n};\n"],"names":["_a","children","rest","__rest","React","CPopoverFooter","__assign","pb","pt","borderTop"],"mappings":"mOAK6B,SAACA,GAAE,IAAAC,EAAQD,EAAAC,SAAKC,EAAIC,EAAAA,OAAAH,EAAnB,cAC5B,OACEI,EAAAA,sBAACC,EAAAA,cAAcC,EAAAA,SAAA,GAAKJ,EAAM,CAAAK,GAAI,EAAGC,GAAI,EAAGC,UAAW,IAChDR"}
@@ -0,0 +1,2 @@
1
+ "use strict";var e=require("./tslib.es6-f01c41a6.js"),t=require("react"),r=require("./popoverFooter.component-b39d12d1.js"),i=require("./button.component-73d5a120.js"),a=require("./chakra-ui-popover.esm-af9721a4.js"),o=require("./chakra-ui-layout.esm-493ee04b.js");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=n(t);exports.PopoverFooterButtons=function(t){var n=t.submitText,u=void 0===n?"Submit":n,l=t.isLoading,c=t.isDisabled,d=t.isDestructive;t.children;var m=t.onSubmit,v=t.allowCancel,p=void 0===v||v,b=t.onCancel,f=e.__rest(t,["submitText","isLoading","isDisabled","isDestructive","children","onSubmit","allowCancel","onCancel"]),C=a.usePopoverContext().onClose;return s.default.createElement(r.PopoverFooter,e.__assign({},f),s.default.createElement(o.Flex,{w:"100%"},p&&s.default.createElement(i.Button,{variant:"tertiary",size:"sm",onClick:function(){b&&b(),C()}},"Cancel"),s.default.createElement(o.Spacer,null),s.default.createElement(i.Button,{onClick:m,isLoading:l,isDisabled:c,size:"sm",variant:d?"primaryDestructive":"primary"},u)))};
2
+ //# sourceMappingURL=popoverFooterButtons.component-df7f48a5.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"popoverFooterButtons.component-b8492486.js","sources":["../src/components/Popover/components/PopoverFooterButtons/popoverFooterButtons.component.tsx"],"sourcesContent":["import React from 'react';\nimport { PopoverFooterProps as CPopoverFooterProps, usePopoverContext, Flex, Spacer } from '@chakra-ui/react';\nimport { PopoverFooter } from '../PopoverFooter/popoverFooter.component';\nimport { Button } from '../../../Button/button.component';\n\nexport interface PopoverFooterButtonProps extends CPopoverFooterProps {\n submitText?: string;\n isLoading?: boolean;\n isDisabled?: boolean;\n isDestructive?: boolean;\n onSubmit?: () => void;\n allowCancel?: boolean;\n onCancel?: () => void;\n}\n\nexport const PopoverFooterButtons = ({\n submitText = 'Submit',\n isLoading,\n isDisabled,\n isDestructive,\n children,\n onSubmit,\n allowCancel = true,\n onCancel,\n ...rest\n}: PopoverFooterButtonProps): JSX.Element => {\n const { onClose } = usePopoverContext();\n\n const handleCancel = (): void => {\n if (onCancel) {\n onCancel();\n }\n onClose();\n };\n\n return (\n <PopoverFooter {...rest}>\n <Flex w=\"100%\">\n {allowCancel && (\n <Button variant=\"tertiary\" size=\"sm\" onClick={handleCancel}>\n Cancel\n </Button>\n )}\n <Spacer />\n <Button\n onClick={onSubmit}\n isLoading={isLoading}\n isDisabled={isDisabled}\n size=\"sm\"\n variant={isDestructive ? 'primaryDestructive' : 'primary'}\n >\n {submitText}\n </Button>\n </Flex>\n </PopoverFooter>\n );\n};\n"],"names":["_a","_b","submitText","isLoading","isDisabled","isDestructive","children","onSubmit","_c","allowCancel","onCancel","rest","__rest","onClose","usePopoverContext","React","createElement","PopoverFooter","__assign","Flex","w","Button","variant","size","onClick","Spacer"],"mappings":"mTAeoC,SAACA,GACnC,IAAAC,EAAqBD,EAAAE,WAArBA,OAAU,IAAAD,EAAG,SAAQA,EACrBE,EAASH,EAAAG,UACTC,EAAUJ,EAAAI,WACVC,kBACQL,EAAAM,SACR,IAAAC,EAAQP,EAAAO,SACRC,EAAkBR,EAAAS,YAAlBA,OAAc,IAAAD,GAAIA,EAClBE,EAAQV,EAAAU,SACLC,EAAIC,EAAAA,OAAAZ,EAT4B,wGAW3Ba,EAAYC,8BASpB,OACEC,EAAAA,QAAAC,cAACC,EAAAA,cAAaC,EAAAA,SAAA,CAAA,EAAKP,GACjBI,EAAAA,QAAAC,cAACG,EAAAA,KAAI,CAACC,EAAE,QACLX,GACCM,EAAAA,QAAAC,cAACK,EAAMA,OAAA,CAACC,QAAQ,WAAWC,KAAK,KAAKC,QAXxB,WACfd,GACFA,IAEFG,GACF,aAUME,UAAAC,cAACS,EAAMA,OAAG,MACVV,UAAAC,cAACK,EAAAA,OAAM,CACLG,QAASjB,EACTJ,UAAWA,EACXC,WAAYA,EACZmB,KAAK,KACLD,QAASjB,EAAgB,qBAAuB,WAE/CH,IAKX"}
1
+ {"version":3,"file":"popoverFooterButtons.component-df7f48a5.js","sources":["../src/components/Popover/components/PopoverFooterButtons/popoverFooterButtons.component.tsx"],"sourcesContent":["import React from 'react';\nimport { PopoverFooterProps as CPopoverFooterProps, usePopoverContext, Flex, Spacer } from '@chakra-ui/react';\nimport { PopoverFooter } from '../PopoverFooter/popoverFooter.component';\nimport { Button } from '../../../Button/button.component';\n\nexport interface PopoverFooterButtonProps extends CPopoverFooterProps {\n submitText?: string;\n isLoading?: boolean;\n isDisabled?: boolean;\n isDestructive?: boolean;\n onSubmit?: () => void;\n allowCancel?: boolean;\n onCancel?: () => void;\n}\n\nexport const PopoverFooterButtons = ({\n submitText = 'Submit',\n isLoading,\n isDisabled,\n isDestructive,\n children,\n onSubmit,\n allowCancel = true,\n onCancel,\n ...rest\n}: PopoverFooterButtonProps): JSX.Element => {\n const { onClose } = usePopoverContext();\n\n const handleCancel = (): void => {\n if (onCancel) {\n onCancel();\n }\n onClose();\n };\n\n return (\n <PopoverFooter {...rest}>\n <Flex w=\"100%\">\n {allowCancel && (\n <Button variant=\"tertiary\" size=\"sm\" onClick={handleCancel}>\n Cancel\n </Button>\n )}\n <Spacer />\n <Button\n onClick={onSubmit}\n isLoading={isLoading}\n isDisabled={isDisabled}\n size=\"sm\"\n variant={isDestructive ? 'primaryDestructive' : 'primary'}\n >\n {submitText}\n </Button>\n </Flex>\n </PopoverFooter>\n );\n};\n"],"names":["_a","_b","submitText","isLoading","isDisabled","isDestructive","children","onSubmit","_c","allowCancel","onCancel","rest","__rest","onClose","usePopoverContext","React","createElement","PopoverFooter","__assign","Flex","w","Button","variant","size","onClick","Spacer"],"mappings":"yXAeoC,SAACA,GACnC,IAAAC,EAAqBD,EAAAE,WAArBA,OAAU,IAAAD,EAAG,SAAQA,EACrBE,EAASH,EAAAG,UACTC,EAAUJ,EAAAI,WACVC,kBACQL,EAAAM,SACR,IAAAC,EAAQP,EAAAO,SACRC,EAAkBR,EAAAS,YAAlBA,OAAc,IAAAD,GAAIA,EAClBE,EAAQV,EAAAU,SACLC,EAAIC,EAAAA,OAAAZ,EAT4B,wGAW3Ba,EAAYC,8BASpB,OACEC,EAAAA,QAAAC,cAACC,EAAAA,cAAaC,EAAAA,SAAA,GAAKP,GACjBI,EAAAA,QAAAC,cAACG,EAAAA,KAAI,CAACC,EAAE,QACLX,GACCM,EAAAA,QAAAC,cAACK,EAAMA,OAAA,CAACC,QAAQ,WAAWC,KAAK,KAAKC,QAXxB,WACfd,GACFA,IAEFG,gBAWIE,UAAAC,cAACS,EAAMA,OAAG,MACVV,UAAAC,cAACK,EAAAA,OAAM,CACLG,QAASjB,EACTJ,UAAWA,EACXC,WAAYA,EACZmB,KAAK,KACLD,QAASjB,EAAgB,qBAAuB,WAE/CH"}
@@ -0,0 +1,2 @@
1
+ "use strict";var e=require("./tslib.es6-f01c41a6.js"),r=require("react"),o=require("./heading.component-46024b9d.js"),t=require("./chakra-ui-popover.esm-af9721a4.js");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=a(r);exports.PopoverHeader=function(r){var a=r.size,n=void 0===a?"sm":a,c=r.color,s=r.colorToken,l=r.children,u=e.__rest(r,["size","color","colorToken","children"]);return i.default.createElement(t.PopoverHeader,e.__assign({px:3,pt:3,pb:1,borderBottom:0},u),i.default.createElement(o.Heading,{size:n,colorToken:s,color:c},l))};
2
+ //# sourceMappingURL=popoverHeader.component-0ee69cde.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"popoverHeader.component-5acdf2b2.js","sources":["../src/components/Popover/components/PopoverHeader/popoverHeader.component.tsx"],"sourcesContent":["import React from 'react';\nimport { PopoverHeader as CPopoverHeader, PopoverHeaderProps as CPopoverHeaderProps } from '@chakra-ui/react';\nimport { Heading } from '../../../Heading/heading.component';\nimport { HeadingSize } from '../../../Heading/heading.types';\nimport { TextColor } from 'shared/types';\n\nexport interface PopoverHeaderProps extends CPopoverHeaderProps {\n size?: HeadingSize;\n colorToken?: TextColor;\n}\n\nexport const PopoverHeader = ({\n size = 'sm',\n color,\n colorToken,\n children,\n ...rest\n}: PopoverHeaderProps): JSX.Element => {\n return (\n <CPopoverHeader px={3} pt={3} pb={1} borderBottom={0} {...rest}>\n <Heading size={size} colorToken={colorToken} color={color}>\n {children}\n </Heading>\n </CPopoverHeader>\n );\n};\n"],"names":["_a","_b","size","color","colorToken","children","rest","__rest","React","CPopoverHeader","__assign","px","pt","pb","borderBottom","createElement","Heading"],"mappings":"0PAW6B,SAACA,GAC5B,IAAAC,SAAAC,aAAO,KAAID,EACXE,EAAKH,EAAAG,MACLC,EAAUJ,EAAAI,WACVC,EAAQL,EAAAK,SACLC,EAAIC,EAAAA,OAAAP,EALqB,0CAO5B,OACEQ,EAAAA,sBAACC,EAAAA,cAAcC,EAAAA,SAAA,CAACC,GAAI,EAAGC,GAAI,EAAGC,GAAI,EAAGC,aAAc,GAAOR,GACxDE,EAAAA,QAAAO,cAACC,UAAQ,CAAAd,KAAMA,EAAME,WAAYA,EAAYD,MAAOA,GACjDE,GAIT"}
1
+ {"version":3,"file":"popoverHeader.component-0ee69cde.js","sources":["../src/components/Popover/components/PopoverHeader/popoverHeader.component.tsx"],"sourcesContent":["import React from 'react';\nimport { PopoverHeader as CPopoverHeader, PopoverHeaderProps as CPopoverHeaderProps } from '@chakra-ui/react';\nimport { Heading } from '../../../Heading/heading.component';\nimport { HeadingSize } from '../../../Heading/heading.types';\nimport { TextColor } from 'shared/types';\n\nexport interface PopoverHeaderProps extends CPopoverHeaderProps {\n size?: HeadingSize;\n colorToken?: TextColor;\n}\n\nexport const PopoverHeader = ({\n size = 'sm',\n color,\n colorToken,\n children,\n ...rest\n}: PopoverHeaderProps): JSX.Element => {\n return (\n <CPopoverHeader px={3} pt={3} pb={1} borderBottom={0} {...rest}>\n <Heading size={size} colorToken={colorToken} color={color}>\n {children}\n </Heading>\n </CPopoverHeader>\n );\n};\n"],"names":["_a","_b","size","color","colorToken","children","rest","__rest","React","CPopoverHeader","__assign","px","pt","pb","borderBottom","createElement","Heading"],"mappings":"gRAW6B,SAACA,GAC5B,IAAAC,SAAAC,aAAO,KAAID,EACXE,EAAKH,EAAAG,MACLC,EAAUJ,EAAAI,WACVC,EAAQL,EAAAK,SACLC,EAAIC,EAAAA,OAAAP,EALqB,0CAO5B,OACEQ,EAAAA,sBAACC,EAAAA,cAAcC,EAAAA,SAAA,CAACC,GAAI,EAAGC,GAAI,EAAGC,GAAI,EAAGC,aAAc,GAAOR,GACxDE,EAAAA,QAAAO,cAACC,UAAQ,CAAAd,KAAMA,EAAME,WAAYA,EAAYD,MAAOA,GACjDE"}
@@ -0,0 +1,2 @@
1
+ "use strict";var e=require("./tslib.es6-f01c41a6.js"),i=require("react"),r=require("./chakra-ui-radio.esm-ee587db1.js");function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=t(i);exports.Radio=function(i){var t=i.children,s=i.size,n=void 0===s?"md":s;i.isFieldInline;var d=e.__rest(i,["children","size","isFieldInline"]);return a.default.createElement(r.Radio,e.__assign({},d,{size:n,alignItems:"flex-start"}),t)};
2
+ //# sourceMappingURL=radio.component-77c1b19b.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"radio.component-c2ed8d10.js","sources":["../src/components/Radio/radio.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Radio as CRadio, RadioProps as CRadioProps } from '@chakra-ui/react';\nimport { RadioSize } from './radio.types';\n\nexport interface RadioProps extends CRadioProps {\n size?: RadioSize;\n isFieldInline?: boolean;\n}\n\nexport const Radio = ({ children, size = 'md', isFieldInline, ...rest }: RadioProps): JSX.Element => {\n return (\n <CRadio {...rest} size={size} alignItems=\"flex-start\">\n {children}\n </CRadio>\n );\n};\n"],"names":["_a","children","_b","size","isFieldInline","rest","__rest","React","createElement","CRadio","Radio","__assign","alignItems"],"mappings":"qMASqB,SAACA,GAAE,IAAAC,EAAQD,EAAAC,SAAEC,EAAWF,EAAAG,KAAXA,OAAO,IAAAD,EAAA,KAAIA,EAAeF,EAAAI,kBAAKC,EAAIC,SAAAN,EAA/C,qCACpB,OACEO,EAAC,QAAAC,cAAAC,EAAMC,MAAKC,EAAAA,SAAA,CAAA,EAAAN,GAAMF,KAAMA,EAAMS,WAAW,eACtCX,EAGP"}
1
+ {"version":3,"file":"radio.component-77c1b19b.js","sources":["../src/components/Radio/radio.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Radio as CRadio, RadioProps as CRadioProps } from '@chakra-ui/react';\nimport { RadioSize } from './radio.types';\n\nexport interface RadioProps extends CRadioProps {\n size?: RadioSize;\n isFieldInline?: boolean;\n}\n\nexport const Radio = ({ children, size = 'md', isFieldInline, ...rest }: RadioProps): JSX.Element => {\n return (\n <CRadio {...rest} size={size} alignItems=\"flex-start\">\n {children}\n </CRadio>\n );\n};\n"],"names":["_a","children","_b","size","isFieldInline","rest","__rest","React","createElement","CRadio","Radio","__assign","alignItems"],"mappings":"yNASqB,SAACA,GAAE,IAAAC,EAAQD,EAAAC,SAAEC,EAAWF,EAAAG,KAAXA,OAAO,IAAAD,EAAA,KAAIA,EAAeF,EAAAI,kBAAKC,EAAIC,SAAAN,EAA/C,qCACpB,OACEO,EAAC,QAAAC,cAAAC,EAAMC,MAAKC,EAAAA,SAAA,GAAAN,GAAMF,KAAMA,EAAMS,WAAW,eACtCX"}
@@ -0,0 +1,2 @@
1
+ "use strict";var e=require("./tslib.es6-f01c41a6.js"),r=require("react"),i=require("./formControl.component-fdf34a8f.js"),a=require("./radio.component-77c1b19b.js"),t=require("./chakra-ui-radio.esm-ee587db1.js"),o=require("./chakra-ui-layout.esm-493ee04b.js");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=n(r),d=function(r){var i=r.radios,n=r.size,d=void 0===n?"md":n,u=r.direction,c=void 0===u?"row":u,l=r.spacing,m=e.__rest(r,["radios","size","direction","spacing"]);m.isFieldInline;var f=e.__rest(m,["isFieldInline"]);return s.default.createElement(t.RadioGroup,e.__assign({},f),s.default.createElement(o.Stack,{direction:c,spacing:l,maxW:m.maxW||"max-content"},i.map((function(r,i){return s.default.createElement(a.Radio,e.__assign({key:i},r,{size:d}))}))))};d.displayName="RadioGroup";var u=i.withFormControl(d);exports.WrappedRadioGroup=u;
2
+ //# sourceMappingURL=radioGroup.component-4de2c34a.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"radioGroup.component-ba9f1040.js","sources":["../src/components/RadioGroup/radioGroup.component.tsx"],"sourcesContent":["import React from 'react';\nimport { RadioGroup as CRadioGroup, RadioGroupProps as CRadioGroupProps, Stack, SystemProps } from '@chakra-ui/react';\nimport { withFormControl, WithFormControlProps } from '../FormControl/formControl.component';\nimport { FlexDirection } from 'shared/types';\nimport { Radio, RadioProps } from '../Radio/radio.component';\nimport { RadioSize } from '../Radio/radio.types';\n\nexport interface RadioGroupProps extends WithFormControlProps, Omit<CRadioGroupProps, 'children'> {\n size?: RadioSize;\n radios: RadioProps[];\n direction?: FlexDirection;\n spacing?: SystemProps['margin'];\n isFieldInline?: boolean;\n}\n\nconst RadioGroup = ({ radios, size = 'md', direction = 'row', spacing, ...rest }: RadioGroupProps): JSX.Element => {\n const { isFieldInline, ...domProps } = rest;\n return (\n <CRadioGroup {...domProps}>\n <Stack direction={direction} spacing={spacing} maxW={rest.maxW || 'max-content'}>\n {radios.map((radio, index) => (\n <Radio key={index} {...radio} size={size} />\n ))}\n </Stack>\n </CRadioGroup>\n );\n};\n\nRadioGroup.displayName = 'RadioGroup';\n\nconst WrappedRadioGroup = withFormControl(RadioGroup);\n\nexport { WrappedRadioGroup as RadioGroup };\n"],"names":["RadioGroup","_a","radios","_b","size","_c","direction","spacing","rest","__rest","isFieldInline","domProps","React","createElement","CRadioGroup","__assign","Stack","maxW","map","radio","index","Radio","key","displayName","WrappedRadioGroup","withFormControl"],"mappings":"mRAeMA,EAAa,SAACC,GAAE,IAAAC,WAAQC,EAAAF,EAAAG,KAAAA,OAAI,IAAAD,EAAG,KAAIA,EAAEE,EAAAJ,EAAAK,UAAAA,OAAS,IAAAD,EAAG,MAAKA,EAAEE,YAAYC,EAAtDC,EAAAA,OAAAR,EAAA,CAAA,SAAA,OAAA,YAAA,YACqBO,EAAlBE,kBAAKC,EAAQF,EAAAA,OAAKD,EAAjC,CAA8B,kBACpC,OACEI,EAAAA,QAAAC,cAACC,EAAAA,WAAWC,EAAAA,SAAA,CAAA,EAAKJ,GACfC,EAAC,QAAAC,cAAAG,EAAKA,OAACV,UAAWA,EAAWC,QAASA,EAASU,KAAMT,EAAKS,MAAQ,eAC/Df,EAAOgB,KAAI,SAACC,EAAOC,GAAU,OAC5BR,EAAA,QAAAC,cAACQ,EAAKA,MAACN,EAAAA,SAAA,CAAAO,IAAKF,GAAWD,GAAOf,KAAMA,IACrC,KAIT,EAEAJ,EAAWuB,YAAc,aAEzB,IAAMC,EAAoBC,EAAeA,gBAACzB"}
1
+ {"version":3,"file":"radioGroup.component-4de2c34a.js","sources":["../src/components/RadioGroup/radioGroup.component.tsx"],"sourcesContent":["import React from 'react';\nimport { RadioGroup as CRadioGroup, RadioGroupProps as CRadioGroupProps, Stack, SystemProps } from '@chakra-ui/react';\nimport { withFormControl, WithFormControlProps } from '../FormControl/formControl.component';\nimport { FlexDirection } from 'shared/types';\nimport { Radio, RadioProps } from '../Radio/radio.component';\nimport { RadioSize } from '../Radio/radio.types';\n\nexport interface RadioGroupProps extends WithFormControlProps, Omit<CRadioGroupProps, 'children'> {\n size?: RadioSize;\n radios: RadioProps[];\n direction?: FlexDirection;\n spacing?: SystemProps['margin'];\n isFieldInline?: boolean;\n}\n\nconst RadioGroup = ({ radios, size = 'md', direction = 'row', spacing, ...rest }: RadioGroupProps): JSX.Element => {\n const { isFieldInline, ...domProps } = rest;\n return (\n <CRadioGroup {...domProps}>\n <Stack direction={direction} spacing={spacing} maxW={rest.maxW || 'max-content'}>\n {radios.map((radio, index) => (\n <Radio key={index} {...radio} size={size} />\n ))}\n </Stack>\n </CRadioGroup>\n );\n};\n\nRadioGroup.displayName = 'RadioGroup';\n\nconst WrappedRadioGroup = withFormControl(RadioGroup);\n\nexport { WrappedRadioGroup as RadioGroup };\n"],"names":["RadioGroup","_a","radios","_b","size","_c","direction","spacing","rest","__rest","isFieldInline","domProps","React","createElement","CRadioGroup","__assign","Stack","maxW","map","radio","index","Radio","key","displayName","WrappedRadioGroup","withFormControl"],"mappings":"uVAeMA,EAAa,SAACC,GAAE,IAAAC,WAAQC,EAAAF,EAAAG,KAAAA,OAAI,IAAAD,EAAG,KAAIA,EAAEE,EAAAJ,EAAAK,UAAAA,OAAS,IAAAD,EAAG,MAAKA,EAAEE,YAAYC,EAAtDC,EAAAA,OAAAR,EAAA,CAAA,SAAA,OAAA,YAAA,YACqBO,EAAlBE,kBAAKC,EAAQF,EAAAA,OAAKD,EAAjC,CAA8B,kBACpC,OACEI,EAAAA,QAAAC,cAACC,EAAAA,WAAWC,EAAAA,SAAA,GAAKJ,GACfC,EAAC,QAAAC,cAAAG,EAAKA,OAACV,UAAWA,EAAWC,QAASA,EAASU,KAAMT,EAAKS,MAAQ,eAC/Df,EAAOgB,KAAI,SAACC,EAAOC,GAAU,OAC5BR,EAAA,QAAAC,cAACQ,EAAKA,MAACN,EAAAA,SAAA,CAAAO,IAAKF,GAAWD,GAAOf,KAAMA,WAO9CJ,EAAWuB,YAAc,aAEzB,IAAMC,EAAoBC,EAAeA,gBAACzB"}
@@ -0,0 +1,2 @@
1
+ "use strict";var e=require("react"),r=require("./useTheme-d7d8c3f5.js"),t=require("./chakra-ui-layout.esm-493ee04b.js");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=n(e);exports.RatingDot=function(n){var o=n.number,c=n.isInteractive,d=n.isDisabled,l=n.onClick,u=n.selected,b=r.useTheme().colors,i=e.useCallback((function(){l&&l(o)}),[o,l]);return a.default.createElement(a.default.Fragment,null,c?d?a.default.createElement(t.Flex,{as:"button",bgColor:u?"".concat(b.background.brand,"80"):"transparent",h:"60px",w:"60px",borderRadius:"30px",border:"2px solid ".concat(u?"transparent":b.background.brand,"50"),color:u?"white":"".concat(b.background.brand,"50"),mr:1,mb:1,justifyContent:"center",alignItems:"center",fontSize:"lg",cursor:"not-allowed"},o):a.default.createElement(t.Flex,{as:"button",onClick:i,bgColor:u?b.background.brand:"transparent",h:"60px",w:"60px",borderRadius:"30px",border:"2px solid ".concat(b.background.brand),color:u?b.text.dark.default:b.text.light.link,mr:1,mb:1,justifyContent:"center",alignItems:"center",fontSize:"lg",cursor:"pointer",_hover:{bg:u?b.background.brand:b.background.tealLight}},o):a.default.createElement(t.Flex,{as:"div",bgColor:b.background.brand,h:"40px",w:"40px",borderRadius:"20px",border:"2px solid ".concat(b.background.brand),color:b.text.dark.default,mr:1,mb:1,justifyContent:"center",alignItems:"center",fontSize:"lg",cursor:"default"},o))};
2
+ //# sourceMappingURL=ratingDot.component-776080cf.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ratingDot.component-07c22024.js","sources":["../src/components/RatingDots/components/RatingDot/ratingDot.component.tsx"],"sourcesContent":["import React, { useCallback } from 'react';\nimport { useTheme } from 'hooks/useTheme';\nimport { Flex } from '@chakra-ui/react';\n\nexport interface IRatingDotProps {\n number: number;\n isInteractive?: boolean;\n isDisabled?: boolean;\n onClick?: (value: number) => void;\n selected: boolean;\n}\n\nexport const RatingDot = ({ number, isInteractive, isDisabled, onClick, selected }: IRatingDotProps): JSX.Element => {\n const { colors } = useTheme();\n\n const handleClick = useCallback((): void => {\n if (onClick) onClick(number);\n }, [number, onClick]);\n\n return (\n <>\n {isInteractive ? (\n isDisabled ? (\n <Flex\n as=\"button\"\n bgColor={selected ? `${colors.background.brand}80` : 'transparent'}\n h=\"60px\"\n w=\"60px\"\n borderRadius=\"30px\"\n border={`2px solid ${selected ? 'transparent' : colors.background.brand}50`}\n color={selected ? 'white' : `${colors.background.brand}50`}\n mr={1}\n mb={1}\n justifyContent=\"center\"\n alignItems=\"center\"\n fontSize=\"lg\"\n cursor=\"not-allowed\"\n >\n {number}\n </Flex>\n ) : (\n <Flex\n as=\"button\"\n onClick={handleClick}\n bgColor={selected ? colors.background.brand : 'transparent'}\n h=\"60px\"\n w=\"60px\"\n borderRadius=\"30px\"\n border={`2px solid ${colors.background.brand}`}\n color={selected ? colors.text.dark.default : colors.text.light.link}\n mr={1}\n mb={1}\n justifyContent=\"center\"\n alignItems=\"center\"\n fontSize=\"lg\"\n cursor=\"pointer\"\n _hover={{\n bg: selected ? colors.background.brand : colors.background.tealLight,\n }}\n >\n {number}\n </Flex>\n )\n ) : (\n <Flex\n as=\"div\"\n bgColor={colors.background.brand}\n h=\"40px\"\n w=\"40px\"\n borderRadius=\"20px\"\n border={`2px solid ${colors.background.brand}`}\n color={colors.text.dark.default}\n mr={1}\n mb={1}\n justifyContent=\"center\"\n alignItems=\"center\"\n fontSize=\"lg\"\n cursor=\"default\"\n >\n {number}\n </Flex>\n )}\n </>\n );\n};\n"],"names":["_a","number","isInteractive","isDisabled","onClick","selected","colors","useTheme","handleClick","useCallback","React","createElement","Flex","as","bgColor","background","brand","h","w","borderRadius","border","concat","color","mr","mb","justifyContent","alignItems","fontSize","cursor","text","dark","default","light","link","_hover","bg","tealLight"],"mappings":"2MAYyB,SAACA,GAAE,IAAAC,EAAMD,EAAAC,OAAEC,EAAaF,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"file":"ratingDot.component-776080cf.js","sources":["../src/components/RatingDots/components/RatingDot/ratingDot.component.tsx"],"sourcesContent":["import React, { useCallback } from 'react';\nimport { useTheme } from 'hooks/useTheme';\nimport { Flex } from '@chakra-ui/react';\n\nexport interface IRatingDotProps {\n number: number;\n isInteractive?: boolean;\n isDisabled?: boolean;\n onClick?: (value: number) => void;\n selected: boolean;\n}\n\nexport const RatingDot = ({ number, isInteractive, isDisabled, onClick, selected }: IRatingDotProps): JSX.Element => {\n const { colors } = useTheme();\n\n const handleClick = useCallback((): void => {\n if (onClick) onClick(number);\n }, [number, onClick]);\n\n return (\n <>\n {isInteractive ? (\n isDisabled ? (\n <Flex\n as=\"button\"\n bgColor={selected ? `${colors.background.brand}80` : 'transparent'}\n h=\"60px\"\n w=\"60px\"\n borderRadius=\"30px\"\n border={`2px solid ${selected ? 'transparent' : colors.background.brand}50`}\n color={selected ? 'white' : `${colors.background.brand}50`}\n mr={1}\n mb={1}\n justifyContent=\"center\"\n alignItems=\"center\"\n fontSize=\"lg\"\n cursor=\"not-allowed\"\n >\n {number}\n </Flex>\n ) : (\n <Flex\n as=\"button\"\n onClick={handleClick}\n bgColor={selected ? colors.background.brand : 'transparent'}\n h=\"60px\"\n w=\"60px\"\n borderRadius=\"30px\"\n border={`2px solid ${colors.background.brand}`}\n color={selected ? colors.text.dark.default : colors.text.light.link}\n mr={1}\n mb={1}\n justifyContent=\"center\"\n alignItems=\"center\"\n fontSize=\"lg\"\n cursor=\"pointer\"\n _hover={{\n bg: selected ? colors.background.brand : colors.background.tealLight,\n }}\n >\n {number}\n </Flex>\n )\n ) : (\n <Flex\n as=\"div\"\n bgColor={colors.background.brand}\n h=\"40px\"\n w=\"40px\"\n borderRadius=\"20px\"\n border={`2px solid ${colors.background.brand}`}\n color={colors.text.dark.default}\n mr={1}\n mb={1}\n justifyContent=\"center\"\n alignItems=\"center\"\n fontSize=\"lg\"\n cursor=\"default\"\n >\n {number}\n </Flex>\n )}\n </>\n );\n};\n"],"names":["_a","number","isInteractive","isDisabled","onClick","selected","colors","useTheme","handleClick","useCallback","React","createElement","Flex","as","bgColor","background","brand","h","w","borderRadius","border","concat","color","mr","mb","justifyContent","alignItems","fontSize","cursor","text","dark","default","light","link","_hover","bg","tealLight"],"mappings":"6NAYyB,SAACA,GAAE,IAAAC,EAAMD,EAAAC,OAAEC,EAAaF,EAAAE,cAAEC,EAAUH,EAAAG,WAAEC,EAAOJ,EAAAI,QAAEC,EAAQL,EAAAK,SACtEC,EAAWC,oBAEbC,EAAcC,EAAAA,aAAY,WAC1BL,GAASA,EAAQH,KACpB,CAACA,EAAQG,IAEZ,OACEM,gDACGR,EACCC,EACEO,EAAC,QAAAC,cAAAC,OACC,CAAAC,GAAG,SACHC,QAAST,EAAW,UAAGC,EAAOS,WAAWC,YAAY,cACrDC,EAAE,OACFC,EAAE,OACFC,aAAa,OACbC,OAAQ,aAAAC,OAAahB,EAAW,cAAgBC,EAAOS,WAAWC,YAClEM,MAAOjB,EAAW,QAAU,GAAGgB,OAAAf,EAAOS,WAAWC,MAAK,MACtDO,GAAI,EACJC,GAAI,EACJC,eAAe,SACfC,WAAW,SACXC,SAAS,KACTC,OAAO,eAEN3B,GAGHS,EAAAA,QAACC,cAAAC,EAAIA,KACH,CAAAC,GAAG,SACHT,QAASI,EACTM,QAAST,EAAWC,EAAOS,WAAWC,MAAQ,cAC9CC,EAAE,OACFC,EAAE,OACFC,aAAa,OACbC,OAAQ,aAAaC,OAAAf,EAAOS,WAAWC,OACvCM,MAAOjB,EAAWC,EAAOuB,KAAKC,KAAKC,QAAUzB,EAAOuB,KAAKG,MAAMC,KAC/DV,GAAI,EACJC,GAAI,EACJC,eAAe,SACfC,WAAW,SACXC,SAAS,KACTC,OAAO,UACPM,OAAQ,CACNC,GAAI9B,EAAWC,EAAOS,WAAWC,MAAQV,EAAOS,WAAWqB,YAG5DnC,GAILS,UAAAC,cAACC,EAAIA,KAAA,CACHC,GAAG,MACHC,QAASR,EAAOS,WAAWC,MAC3BC,EAAE,OACFC,EAAE,OACFC,aAAa,OACbC,OAAQ,aAAaC,OAAAf,EAAOS,WAAWC,OACvCM,MAAOhB,EAAOuB,KAAKC,KAAKC,QACxBR,GAAI,EACJC,GAAI,EACJC,eAAe,SACfC,WAAW,SACXC,SAAS,KACTC,OAAO,WAEN3B"}
@@ -0,0 +1,2 @@
1
+ "use strict";var e=require("./tslib.es6-f01c41a6.js"),t=require("react"),n=require("./text.component-dabbab97.js"),a=require("./ratingDot.component-776080cf.js"),r=require("./chakra-ui-layout.esm-493ee04b.js");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var l=u(t);exports.RatingDots=function(u){var c=u.minValue,o=u.maxValue,s=u.minLabel,i=u.maxLabel,f=u.centeredLabel,m=u.isDisabled,d=u.isInteractive,b=u.onClick,x=u.selected,p=e.__read(t.useState(),2),E=p[0],k=p[1],T=t.useMemo((function(){return Math.round(c)}),[c]),j=t.useMemo((function(){return Math.round(o)}),[o]),v=t.useMemo((function(){for(var e=[],t=T;t<=j;t++)e.push(t);return e}),[j,T]);return t.useEffect((function(){void 0!==x&&k(x)}),[x]),l.default.createElement(l.default.Fragment,null,l.default.createElement(r.Flex,{my:4,flexWrap:"wrap",justifyContent:d?"center":"flex-start"},v.map((function(e){return l.default.createElement(a.RatingDot,{key:"composer-rating-dot-".concat(e),number:e,isInteractive:d,onClick:b,isDisabled:m,selected:E===e})}))),l.default.createElement(r.Flex,{justifyContent:d?f?"center":"space-between":"flex-start"},f?l.default.createElement(n.Text,{colorToken:"subtle",size:"sm"},f):l.default.createElement(l.default.Fragment,null,s&&l.default.createElement(n.Text,{colorToken:"subtle",size:"sm"},"".concat(T," - ").concat(s)),!d&&l.default.createElement(n.Text,{colorToken:"subtle",size:"sm",pr:1},","),i&&l.default.createElement(n.Text,{colorToken:"subtle",size:"sm"},"".concat(j," - ").concat(i)))))};
2
+ //# sourceMappingURL=ratingDots.component-9d3ff8ae.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ratingDots.component-f33860ac.js","sources":["../src/components/RatingDots/ratingDots.component.tsx"],"sourcesContent":["import React, { useEffect, useMemo, useState } from 'react';\nimport { Flex } from '@chakra-ui/react';\nimport { Text } from '../Text/text.component';\nimport { RatingDot } from './components/RatingDot/ratingDot.component';\n\nexport interface RatingDotsProps {\n minValue: number;\n maxValue: number;\n minLabel?: string;\n maxLabel?: string;\n centeredLabel?: string;\n isInteractive?: boolean;\n isDisabled?: boolean;\n onClick?: (value: number) => void;\n selected?: number;\n}\n\nexport const RatingDots = ({\n minValue,\n maxValue,\n minLabel,\n maxLabel,\n centeredLabel,\n isDisabled,\n isInteractive,\n onClick,\n selected,\n}: RatingDotsProps): JSX.Element => {\n const [selectedValue, setSelectedValue] = useState<number>();\n\n const roundedMin = useMemo(() => Math.round(minValue), [minValue]);\n const roundedMax = useMemo(() => Math.round(maxValue), [maxValue]);\n\n const values = useMemo(() => {\n const arr = [];\n for (let i = roundedMin; i <= roundedMax; i++) {\n arr.push(i);\n }\n return arr;\n }, [roundedMax, roundedMin]);\n\n useEffect(() => {\n if (selected !== undefined) setSelectedValue(selected);\n }, [selected]);\n\n return (\n <>\n <Flex my={4} flexWrap=\"wrap\" justifyContent={isInteractive ? 'center' : 'flex-start'}>\n {values.map((value) => (\n <RatingDot\n key={`composer-rating-dot-${value}`}\n number={value}\n isInteractive={isInteractive}\n onClick={onClick}\n isDisabled={isDisabled}\n selected={selectedValue === value}\n />\n ))}\n </Flex>\n <Flex justifyContent={isInteractive ? (centeredLabel ? 'center' : 'space-between') : 'flex-start'}>\n {centeredLabel ? (\n <Text colorToken=\"subtle\" size=\"sm\">\n {centeredLabel}\n </Text>\n ) : (\n <>\n {minLabel && <Text colorToken=\"subtle\" size=\"sm\">{`${roundedMin} - ${minLabel}`}</Text>}\n {!isInteractive && <Text colorToken=\"subtle\" size=\"sm\" pr={1}>{`,`}</Text>}\n {maxLabel && <Text colorToken=\"subtle\" size=\"sm\">{`${roundedMax} - ${maxLabel}`}</Text>}\n </>\n )}\n </Flex>\n </>\n );\n};\n"],"names":["_a","minValue","maxValue","minLabel","maxLabel","centeredLabel","isDisabled","isInteractive","onClick","selected","_b","__read","useState","selectedValue","setSelectedValue","roundedMin","useMemo","Math","round","roundedMax","values","arr","i","push","useEffect","undefined","React","createElement","Fragment","Flex","my","flexWrap","justifyContent","map","value","RatingDot","key","concat","number","Text","colorToken","size","pr"],"mappings":"mSAiB0B,SAACA,OACzBC,EAAQD,EAAAC,SACRC,EAAQF,EAAAE,SACRC,EAAQH,EAAAG,SACRC,EAAQJ,EAAAI,SACRC,kBACAC,EAAUN,EAAAM,WACVC,EAAaP,EAAAO,cACbC,EAAOR,EAAAQ,QACPC,EAAQT,EAAAS,SAEFC,EAAAC,EAAoCA,OAAAC,aAAkB,GAArDC,EAAaH,EAAA,GAAEI,EAAgBJ,EAAA,GAEhCK,EAAaC,EAAAA,SAAQ,WAAM,OAAAC,KAAKC,MAAMjB,KAAW,CAACA,IAClDkB,EAAaH,EAAAA,SAAQ,WAAM,OAAAC,KAAKC,MAAMhB,KAAW,CAACA,IAElDkB,EAASJ,EAAAA,SAAQ,WAErB,IADA,IAAMK,EAAM,GACHC,EAAIP,EAAYO,GAAKH,EAAYG,IACxCD,EAAIE,KAAKD,GAEX,OAAOD,CACT,GAAG,CAACF,EAAYJ,IAMhB,OAJAS,EAAAA,WAAU,gBACSC,IAAbhB,GAAwBK,EAAiBL,EAC/C,GAAG,CAACA,IAGFiB,UAAAC,cAAAD,EAAA,QAAAE,SAAA,KACEF,EAAA,QAAAC,cAACE,OAAI,CAACC,GAAI,EAAGC,SAAS,OAAOC,eAAgBzB,EAAgB,SAAW,cACrEa,EAAOa,KAAI,SAACC,GAAU,OACrBR,EAAAA,QAACC,cAAAQ,EAASA,UACR,CAAAC,IAAK,uBAAAC,OAAuBH,GAC5BI,OAAQJ,EACR3B,cAAeA,EACfC,QAASA,EACTF,WAAYA,EACZG,SAAUI,IAAkBqB,GAPT,KAWzBR,EAAAA,QAACC,cAAAE,QAAKG,eAAgBzB,EAAiBF,EAAgB,SAAW,gBAAmB,cAClFA,EACCqB,wBAACa,EAAAA,KAAI,CAACC,WAAW,SAASC,KAAK,MAC5BpC,GAGHqB,EAAAA,QAAAC,cAAAD,EAAA,QAAAE,SAAA,KACGzB,GAAYuB,EAAC,QAAAC,cAAAY,EAAIA,KAAC,CAAAC,WAAW,SAASC,KAAK,MAAM,GAAAJ,OAAGtB,EAAgB,OAAAsB,OAAAlC,KACnEI,GAAiBmB,EAAA,QAAAC,cAACY,EAAAA,KAAK,CAAAC,WAAW,SAASC,KAAK,KAAKC,GAAI,GAAI,KAC9DtC,GAAYsB,EAAAA,sBAACa,EAAIA,KAAA,CAACC,WAAW,SAASC,KAAK,MAAM,GAAGJ,OAAAlB,EAAgB,OAAAkB,OAAAjC,MAMjF"}
1
+ {"version":3,"file":"ratingDots.component-9d3ff8ae.js","sources":["../src/components/RatingDots/ratingDots.component.tsx"],"sourcesContent":["import React, { useEffect, useMemo, useState } from 'react';\nimport { Flex } from '@chakra-ui/react';\nimport { Text } from '../Text/text.component';\nimport { RatingDot } from './components/RatingDot/ratingDot.component';\n\nexport interface RatingDotsProps {\n minValue: number;\n maxValue: number;\n minLabel?: string;\n maxLabel?: string;\n centeredLabel?: string;\n isInteractive?: boolean;\n isDisabled?: boolean;\n onClick?: (value: number) => void;\n selected?: number;\n}\n\nexport const RatingDots = ({\n minValue,\n maxValue,\n minLabel,\n maxLabel,\n centeredLabel,\n isDisabled,\n isInteractive,\n onClick,\n selected,\n}: RatingDotsProps): JSX.Element => {\n const [selectedValue, setSelectedValue] = useState<number>();\n\n const roundedMin = useMemo(() => Math.round(minValue), [minValue]);\n const roundedMax = useMemo(() => Math.round(maxValue), [maxValue]);\n\n const values = useMemo(() => {\n const arr = [];\n for (let i = roundedMin; i <= roundedMax; i++) {\n arr.push(i);\n }\n return arr;\n }, [roundedMax, roundedMin]);\n\n useEffect(() => {\n if (selected !== undefined) setSelectedValue(selected);\n }, [selected]);\n\n return (\n <>\n <Flex my={4} flexWrap=\"wrap\" justifyContent={isInteractive ? 'center' : 'flex-start'}>\n {values.map((value) => (\n <RatingDot\n key={`composer-rating-dot-${value}`}\n number={value}\n isInteractive={isInteractive}\n onClick={onClick}\n isDisabled={isDisabled}\n selected={selectedValue === value}\n />\n ))}\n </Flex>\n <Flex justifyContent={isInteractive ? (centeredLabel ? 'center' : 'space-between') : 'flex-start'}>\n {centeredLabel ? (\n <Text colorToken=\"subtle\" size=\"sm\">\n {centeredLabel}\n </Text>\n ) : (\n <>\n {minLabel && <Text colorToken=\"subtle\" size=\"sm\">{`${roundedMin} - ${minLabel}`}</Text>}\n {!isInteractive && <Text colorToken=\"subtle\" size=\"sm\" pr={1}>{`,`}</Text>}\n {maxLabel && <Text colorToken=\"subtle\" size=\"sm\">{`${roundedMax} - ${maxLabel}`}</Text>}\n </>\n )}\n </Flex>\n </>\n );\n};\n"],"names":["_a","minValue","maxValue","minLabel","maxLabel","centeredLabel","isDisabled","isInteractive","onClick","selected","_b","__read","useState","selectedValue","setSelectedValue","roundedMin","useMemo","Math","round","roundedMax","values","arr","i","push","useEffect","undefined","React","createElement","Fragment","Flex","my","flexWrap","justifyContent","map","value","RatingDot","key","concat","number","Text","colorToken","size","pr"],"mappings":"wTAiB0B,SAACA,OACzBC,EAAQD,EAAAC,SACRC,EAAQF,EAAAE,SACRC,EAAQH,EAAAG,SACRC,EAAQJ,EAAAI,SACRC,kBACAC,EAAUN,EAAAM,WACVC,EAAaP,EAAAO,cACbC,EAAOR,EAAAQ,QACPC,EAAQT,EAAAS,SAEFC,EAAAC,EAAoCA,OAAAC,aAAkB,GAArDC,EAAaH,EAAA,GAAEI,EAAgBJ,EAAA,GAEhCK,EAAaC,EAAAA,SAAQ,WAAM,OAAAC,KAAKC,MAAMjB,KAAW,CAACA,IAClDkB,EAAaH,EAAAA,SAAQ,WAAM,OAAAC,KAAKC,MAAMhB,KAAW,CAACA,IAElDkB,EAASJ,EAAAA,SAAQ,WAErB,IADA,IAAMK,EAAM,GACHC,EAAIP,EAAYO,GAAKH,EAAYG,IACxCD,EAAIE,KAAKD,GAEX,OAAOD,IACN,CAACF,EAAYJ,IAMhB,OAJAS,EAAAA,WAAU,gBACSC,IAAbhB,GAAwBK,EAAiBL,KAC5C,CAACA,IAGFiB,UAAAC,cAAAD,EAAA,QAAAE,SAAA,KACEF,EAAA,QAAAC,cAACE,OAAI,CAACC,GAAI,EAAGC,SAAS,OAAOC,eAAgBzB,EAAgB,SAAW,cACrEa,EAAOa,KAAI,SAACC,GAAU,OACrBR,EAAAA,QAACC,cAAAQ,EAASA,UACR,CAAAC,IAAK,uBAAAC,OAAuBH,GAC5BI,OAAQJ,EACR3B,cAAeA,EACfC,QAASA,EACTF,WAAYA,EACZG,SAAUI,IAAkBqB,QAIlCR,EAAAA,QAACC,cAAAE,QAAKG,eAAgBzB,EAAiBF,EAAgB,SAAW,gBAAmB,cAClFA,EACCqB,wBAACa,EAAAA,KAAI,CAACC,WAAW,SAASC,KAAK,MAC5BpC,GAGHqB,EAAAA,QAAAC,cAAAD,EAAA,QAAAE,SAAA,KACGzB,GAAYuB,EAAC,QAAAC,cAAAY,EAAIA,KAAC,CAAAC,WAAW,SAASC,KAAK,MAAM,GAAAJ,OAAGtB,EAAgB,OAAAsB,OAAAlC,KACnEI,GAAiBmB,EAAA,QAAAC,cAACY,EAAAA,KAAK,CAAAC,WAAW,SAASC,KAAK,KAAKC,GAAI,GAAI,KAC9DtC,GAAYsB,EAAAA,sBAACa,EAAIA,KAAA,CAACC,WAAW,SAASC,KAAK,MAAM,GAAGJ,OAAAlB,EAAgB,OAAAkB,OAAAjC"}
@@ -0,0 +1,2 @@
1
+ "use strict";var e=require("./tslib.es6-f01c41a6.js"),t=require("react"),n=require("./menuContainer.component-b44ee33f.js"),l=require("./formControl.component-fdf34a8f.js"),a=require("./menu.context-6276be4d.js"),r=require("./useTheme-d7d8c3f5.js"),o=require("./menuList.component-7f5f813f.js"),u=require("./chakra-ui-select.esm-85c971dc.js"),s=require("./useAdaptiveColorMap-0a74494f.js"),c=require("./truncatedText.component-02797815.js"),i=require("./text.component-dabbab97.js"),d=require("./chakra-ui-layout.esm-493ee04b.js"),f=require("./icon.component-bf95e351.js"),m=require("./chakra-ui-menu.esm-22115f36.js");function p(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var _=p(t),v=function(t){var n=t.options,l=e.__rest(t,["options"]);return _.default.createElement(o.MenuList,e.__assign({shouldRetainSelection:!0,menuItems:n,isMatchWidthSet:!0},l))},h=function(t){var n=t.options;return _.default.createElement(u.Select,e.__assign({className:"Select"},t),n.map((function(e,t){return _.default.createElement("option",{key:"options-".concat(t),value:e.value},e.label)})))},x=function(e){var t=e.selectedOption,n=e.defaultLeftElement,l=e.shouldTruncateText,a=void 0===l||l,o=r.useTheme().colors,u=s.useAdaptiveColorMap(o.text,t.colorToken?t.colorToken:"default");return _.default.createElement(d.Flex,{className:"Select__Container",justify:"flex-start",align:"center",textAlign:"left",color:u},(null==t?void 0:t.leftElement)?_.default.createElement(d.Flex,{align:"center",className:"Select__LeftElement",pr:2},t.leftElement):n?_.default.createElement(d.Flex,{align:"center",className:"Select__LeftElement",pr:2},n):null,"string"==typeof t.label?a?_.default.createElement(c.TruncatedText,{color:u,className:"Select__Text",textContent:t.label||"",noOfLines:1}):_.default.createElement(i.Text,{color:u,className:"Select__Text"},t.label):t.label)},E=function(l){var o=l.defaultLeftElement;l.isFieldInline;var s=l.listProps,c=l.onChange,i=l.options,d=l.placeholder,p=l.size,E=void 0===p?"md":p,g=l.value,S=l.useBrowserDefaultMenu,T=l.maxW,b=void 0===T?"100%":T;l.colorToken;var j=e.__rest(l,["defaultLeftElement","isFieldInline","listProps","onChange","options","placeholder","size","value","useBrowserDefaultMenu","maxW","colorToken"]),q=t.useRef(null),C=r.useTheme().colors,M=t.useMemo((function(){return{label:d,value:"",colorToken:"placeholder",leftElement:null,isSelected:!1,isPlaceholder:!0}}),[d]),k=e.__read(t.useState([]),2),y=k[0],L=k[1],W=t.useMemo((function(){var e=y.find((function(e){return e.isSelected}));return e||M}),[y,M]),N=t.useCallback((function(t){if(y){var n=y.map((function(n){return e.__assign(e.__assign({},n),{isSelected:n.value===t.value})}));L(n),(null==s?void 0:s.onSelect)&&s.onSelect(t)}}),[y,s]),F=(null==s?void 0:s.shouldTruncateText)?{}:{height:"max-content",minH:10},w=t.useMemo((function(){var e;return q.current?"".concat(null===(e=null==q?void 0:q.current)||void 0===e?void 0:e.clientWidth,"px"):"320px"}),[null==q?void 0:q.current]);return t.useEffect((function(){var t=i.map((function(t){return e.__assign(e.__assign({},t),{isSelected:t.value===g})}));L(e.__spreadArray(e.__spreadArray([],e.__read(t),!1),[M],!1))}),[i,M,g]),S&&c?_.default.createElement(h,e.__assign({},j,{maxW:b,size:E,options:i,onChange:c})):_.default.createElement(a.MenuProvider,{menuItems:y},_.default.createElement(n.MenuContainer,{matchWidth:!0,isLazy:!0},_.default.createElement(u.Select,e.__assign({icon:_.default.createElement(f.Icon,{name:"chevronDown",size:E}),as:m.MenuButton,_focus:{boxShadow:"0 0 0 1px ".concat(C.border.light.focus," !important"),borderColor:C.border.light.focus},ref:q,onClick:function(e){return e.stopPropagation()},type:"button",className:"Select__MenuButton",maxW:b,style:{minHeight:{xs:24,sm:32,md:40,lg:48}[E]}},F,j),_.default.createElement(x,{selectedOption:W,defaultLeftElement:o,shouldTruncateText:null==s?void 0:s.shouldTruncateText})),_.default.createElement(v,e.__assign({},s,{onSelect:N,options:y,maxW:w||b}))))};E.displayName="Select";var g=l.withFormControl(E);exports.WrappedSelect=g;
2
+ //# sourceMappingURL=select.component-e6ee82db.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"select.component-86768d50.js","sources":["../src/components/Select/components/SelectList/selectList.component.tsx","../src/components/Select/components/SelectBrowserDefault/selectBrowserDefault.component.tsx","../src/components/Select/components/SelectContainer/selectContainer.component.tsx","../src/components/Select/select.component.tsx"],"sourcesContent":["import React from 'react';\nimport { MenuList, MenuListProps } from '../../../Menu/components/MenuList/menuList.component';\nimport { SelectOptionProps } from '../../../Select/select.types';\n\nexport interface SelectListProps\n extends Omit<MenuListProps, 'canSelectAll' | 'canSelectGroups' | 'isMultiSelect' | 'onSelectAll' | 'menuItems'> {\n options?: SelectOptionProps[];\n}\n\nexport const SelectList = (props: SelectListProps): JSX.Element => {\n const { options, ...rest } = props;\n\n return <MenuList shouldRetainSelection={true} menuItems={options} isMatchWidthSet={true} {...rest} />;\n};\n","import React from 'react';\nimport { Select as CSelect } from '@chakra-ui/react';\nimport { BrowserDefaultSelectProps } from '../../../Select/select.component';\n\nexport const SelectBrowserDefault = (props: BrowserDefaultSelectProps): JSX.Element => {\n const { options } = props;\n return (\n <CSelect className=\"Select\" {...props}>\n {options.map((option, index) => (\n <option key={`options-${index}`} value={option.value}>\n {option.label}\n </option>\n ))}\n </CSelect>\n );\n};\n","import React, { ReactNode } from 'react';\nimport { SelectOptionProps } from '../../../Select/select.types';\nimport { Flex } from '@chakra-ui/react';\nimport { useTheme } from 'hooks/useTheme';\nimport { useAdaptiveColorMap } from 'hooks/useAdaptiveColorMap';\nimport { TruncatedText } from '../../../TruncatedText/truncatedText.component';\nimport { Text } from '../../../Text/text.component';\nimport { TextColor } from 'shared/types';\n\nexport interface SelectContainerProps {\n selectedOption: SelectOptionProps;\n defaultLeftElement: ReactNode;\n shouldTruncateText?: boolean;\n}\n\nexport const SelectContainer = ({\n selectedOption,\n defaultLeftElement,\n shouldTruncateText = true,\n}: SelectContainerProps): JSX.Element => {\n const { colors } = useTheme();\n const adaptiveColor = useAdaptiveColorMap<TextColor>(\n colors.text,\n selectedOption.colorToken ? selectedOption.colorToken : 'default',\n );\n\n return (\n <Flex className=\"Select__Container\" justify=\"flex-start\" align=\"center\" textAlign=\"left\" color={adaptiveColor}>\n {selectedOption?.leftElement ? (\n <Flex align=\"center\" className=\"Select__LeftElement\" pr={2}>\n {selectedOption.leftElement}\n </Flex>\n ) : defaultLeftElement ? (\n <Flex align=\"center\" className=\"Select__LeftElement\" pr={2}>\n {defaultLeftElement}\n </Flex>\n ) : null}\n {typeof selectedOption.label === 'string' ? (\n shouldTruncateText ? (\n <TruncatedText\n color={adaptiveColor}\n className=\"Select__Text\"\n textContent={selectedOption.label || ''}\n noOfLines={1}\n />\n ) : (\n <Text color={adaptiveColor} className=\"Select__Text\">\n {selectedOption.label}\n </Text>\n )\n ) : (\n selectedOption.label\n )}\n </Flex>\n );\n};\n","import React, { useMemo, ChangeEvent, ReactNode, useRef, useState, useCallback, useEffect } from 'react';\nimport { Select as CSelect, SelectProps as CSelectProps, MenuButton } from '@chakra-ui/react';\nimport { MenuContainer } from '../Menu/components/MenuContainer/menuContainer.component';\nimport { WithFormControlProps, withFormControl } from '../FormControl/formControl.component';\nimport { MenuProvider } from '../Menu/context/menu.context';\nimport { SelectOptionProps } from '../Select/select.types';\nimport { useTheme } from 'hooks/useTheme';\nimport { SelectList, SelectListProps } from './components/SelectList/selectList.component';\nimport { SelectBrowserDefault } from './components/SelectBrowserDefault/selectBrowserDefault.component';\nimport { SelectContainer } from './components/SelectContainer/selectContainer.component';\nimport { Icon } from '../Icon/icon.component';\nimport { IconSize } from '../Icon/icon.types';\nimport { TextColor } from 'shared/types';\nimport { FormControlSize } from '../FormControl/formControl.types';\n\nexport interface SelectBaseProps extends WithFormControlProps, CSelectProps {\n options: SelectOptionProps[];\n size?: FormControlSize;\n colorToken?: TextColor;\n}\n\nexport interface BrowserDefaultSelectProps extends SelectBaseProps {\n defaultLeftElement?: never;\n listProps?: never;\n onChange: (e: ChangeEvent<HTMLSelectElement>) => void;\n useBrowserDefaultMenu?: boolean;\n}\n\nexport interface CustomSelectProps extends SelectBaseProps {\n defaultLeftElement?: ReactNode;\n listProps?: SelectListProps;\n onChange?: never;\n useBrowserDefaultMenu?: never;\n}\n\nexport type SelectProps = BrowserDefaultSelectProps | CustomSelectProps;\n\nconst Select = ({\n defaultLeftElement,\n isFieldInline,\n listProps,\n onChange,\n options,\n placeholder,\n size = 'md',\n value,\n useBrowserDefaultMenu,\n maxW = '100%',\n colorToken,\n ...domProps\n}: SelectProps): JSX.Element => {\n const selectRef = useRef<HTMLSelectElement>(null);\n const { colors } = useTheme();\n const placeholderOption: SelectOptionProps = useMemo(\n () => ({\n label: placeholder,\n value: '',\n colorToken: 'placeholder',\n leftElement: null,\n isSelected: false,\n isPlaceholder: true,\n }),\n [placeholder],\n );\n\n const [allOptions, setAllOptions] = useState<SelectOptionProps[]>([]);\n\n const selectedOption: SelectOptionProps = useMemo(() => {\n const selectedItem = allOptions.find((option) => option.isSelected);\n\n return selectedItem ? selectedItem : placeholderOption;\n }, [allOptions, placeholderOption]);\n\n const handleSelect = useCallback(\n (selectedItem: SelectOptionProps) => {\n if (!allOptions) return;\n\n const updatedOptions = allOptions.map((option) => {\n return {\n ...option,\n isSelected: option.value === selectedItem.value,\n };\n });\n setAllOptions(updatedOptions);\n\n if (listProps?.onSelect) {\n listProps.onSelect(selectedItem);\n }\n },\n [allOptions, listProps],\n );\n\n // If the text is not being truncated it should grow to fit the content\n const flexibleHeightProps = !listProps?.shouldTruncateText ? { height: 'max-content', minH: 10 } : {};\n\n const selectWidth = useMemo(() => {\n if (!selectRef.current) {\n return '320px';\n }\n\n return `${selectRef?.current?.clientWidth}px`;\n\n // Disables the warning for not including unused dependency in the hook array. This dependency is needed to rerender the menu list with the correct width\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [selectRef?.current]);\n\n // Set default selected state\n useEffect(() => {\n const mappedOptions = options.map((option) => ({\n ...option,\n isSelected: option.value === value,\n }));\n\n setAllOptions([...mappedOptions, placeholderOption]);\n }, [options, placeholderOption, value]);\n\n // Allow users to use browser default Select element instead of custom Select\n if (useBrowserDefaultMenu && onChange) {\n return <SelectBrowserDefault {...domProps} maxW={maxW} size={size} options={options} onChange={onChange} />;\n }\n\n return (\n <MenuProvider menuItems={allOptions}>\n <MenuContainer matchWidth={true} isLazy={true}>\n <CSelect\n icon={<Icon name=\"chevronDown\" size={size as IconSize} />}\n as={MenuButton}\n _focus={{\n boxShadow: `0 0 0 1px ${colors.border.light.focus} !important`,\n borderColor: colors.border.light.focus,\n }}\n ref={selectRef}\n onClick={(event: React.MouseEvent): void => event.stopPropagation()}\n type=\"button\"\n className=\"Select__MenuButton\"\n maxW={maxW}\n style={{ minHeight: { xs: 24, sm: 32, md: 40, lg: 48 }[size] }}\n {...flexibleHeightProps}\n {...domProps}\n >\n <SelectContainer\n selectedOption={selectedOption}\n defaultLeftElement={defaultLeftElement}\n shouldTruncateText={listProps?.shouldTruncateText}\n />\n </CSelect>\n <SelectList {...listProps} onSelect={handleSelect} options={allOptions} maxW={selectWidth || maxW} />\n </MenuContainer>\n </MenuProvider>\n );\n};\n\nSelect.displayName = 'Select';\n\nconst WrappedSelect = withFormControl(Select);\n\nexport { WrappedSelect as Select };\n"],"names":["SelectList","props","options","rest","__rest","React","MenuList","__assign","shouldRetainSelection","menuItems","isMatchWidthSet","SelectBrowserDefault","CSelect","className","map","option","index","createElement","key","concat","value","label","SelectContainer","_a","selectedOption","defaultLeftElement","_b","shouldTruncateText","colors","useTheme","adaptiveColor","useAdaptiveColorMap","text","colorToken","Flex","justify","align","textAlign","color","leftElement","pr","TruncatedText","textContent","noOfLines","Text","Select","listProps","onChange","placeholder","size","useBrowserDefaultMenu","_c","maxW","domProps","selectRef","useRef","placeholderOption","useMemo","isSelected","isPlaceholder","_d","__read","useState","allOptions","setAllOptions","selectedItem","find","handleSelect","useCallback","updatedOptions","onSelect","flexibleHeightProps","height","minH","selectWidth","current","clientWidth","useEffect","mappedOptions","__spreadArray","MenuProvider","MenuContainer","matchWidth","isLazy","icon","Icon","name","as","MenuButton","_focus","boxShadow","border","light","focus","borderColor","ref","onClick","event","stopPropagation","type","style","minHeight","xs","sm","md","lg","displayName","WrappedSelect","withFormControl"],"mappings":"2kBASaA,EAAa,SAACC,GACjB,IAAAC,EAAqBD,EAAdC,QAAKC,EAAIC,EAAAA,OAAKH,EAAvB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A,CAAA,EAAAQ,IACH2C,WAAY3C,EAAOK,QAAUA,GAC7B,IAEF4C,EAAkBe,EAAAA,cAAAA,gBAAA,GAAAlB,EAAAA,OAAAiB,IAAe,GAAA,CAAAtB,OAClC,GAAE,CAACtD,EAASsD,EAAmBpC,IAG5B8B,GAAyBH,EACpB1C,EAAAA,QAAAY,cAACN,EAAyBJ,EAAAA,SAAA,CAAA,EAAA8C,GAAUD,KAAMA,EAAMH,KAAMA,EAAM/C,QAASA,EAAS6C,SAAUA,KAI/F1C,EAAC,QAAAY,cAAA+D,EAAYA,aAAC,CAAAvE,UAAWsD,GACvB1D,EAAC,QAAAY,cAAAgE,iBAAcC,YAAY,EAAMC,QAAQ,GACvC9E,EAAC,QAAAY,cAAAL,qBACCwE,KAAM/E,wBAACgF,EAAAA,KAAI,CAACC,KAAK,cAAcrC,KAAMA,IACrCsC,GAAIC,EAAUA,WACdC,OAAQ,CACNC,UAAW,oBAAa9D,EAAO+D,OAAOC,MAAMC,MAAkB,eAC9DC,YAAalE,EAAO+D,OAAOC,MAAMC,OAEnCE,IAAKzC,EACL0C,QAAS,SAACC,GAAkC,OAAAA,EAAMC,iBAAiB,EACnEC,KAAK,SACLtF,UAAU,qBACVuC,KAAMA,EACNgD,MAAO,CAAEC,UAAW,CAAEC,GAAI,GAAIC,GAAI,GAAIC,GAAI,GAAIC,GAAI,IAAKxD,KACnDsB,EACAlB,GAEJhD,EAAC,QAAAY,cAAAK,GACCE,eAAgBA,EAChBC,mBAAoBA,EACpBE,mBAAoBmB,aAAS,EAATA,EAAWnB,sBAGnCtB,EAAC,QAAAY,cAAAjB,gBAAe8C,EAAS,CAAEwB,SAAUH,EAAcjE,QAAS6D,EAAYX,KAAMsB,GAAetB,MAIrG,EAEAP,EAAO6D,YAAc,SAErB,IAAMC,EAAgBC,EAAeA,gBAAC/D"}
1
+ {"version":3,"file":"select.component-e6ee82db.js","sources":["../src/components/Select/components/SelectList/selectList.component.tsx","../src/components/Select/components/SelectBrowserDefault/selectBrowserDefault.component.tsx","../src/components/Select/components/SelectContainer/selectContainer.component.tsx","../src/components/Select/select.component.tsx"],"sourcesContent":["import React from 'react';\nimport { MenuList, MenuListProps } from '../../../Menu/components/MenuList/menuList.component';\nimport { SelectOptionProps } from '../../../Select/select.types';\n\nexport interface SelectListProps\n extends Omit<MenuListProps, 'canSelectAll' | 'canSelectGroups' | 'isMultiSelect' | 'onSelectAll' | 'menuItems'> {\n options?: SelectOptionProps[];\n}\n\nexport const SelectList = (props: SelectListProps): JSX.Element => {\n const { options, ...rest } = props;\n\n return <MenuList shouldRetainSelection={true} menuItems={options} isMatchWidthSet={true} {...rest} />;\n};\n","import React from 'react';\nimport { Select as CSelect } from '@chakra-ui/react';\nimport { BrowserDefaultSelectProps } from '../../../Select/select.component';\n\nexport const SelectBrowserDefault = (props: BrowserDefaultSelectProps): JSX.Element => {\n const { options } = props;\n return (\n <CSelect className=\"Select\" {...props}>\n {options.map((option, index) => (\n <option key={`options-${index}`} value={option.value}>\n {option.label}\n </option>\n ))}\n </CSelect>\n );\n};\n","import React, { ReactNode } from 'react';\nimport { SelectOptionProps } from '../../../Select/select.types';\nimport { Flex } from '@chakra-ui/react';\nimport { useTheme } from 'hooks/useTheme';\nimport { useAdaptiveColorMap } from 'hooks/useAdaptiveColorMap';\nimport { TruncatedText } from '../../../TruncatedText/truncatedText.component';\nimport { Text } from '../../../Text/text.component';\nimport { TextColor } from 'shared/types';\n\nexport interface SelectContainerProps {\n selectedOption: SelectOptionProps;\n defaultLeftElement: ReactNode;\n shouldTruncateText?: boolean;\n}\n\nexport const SelectContainer = ({\n selectedOption,\n defaultLeftElement,\n shouldTruncateText = true,\n}: SelectContainerProps): JSX.Element => {\n const { colors } = useTheme();\n const adaptiveColor = useAdaptiveColorMap<TextColor>(\n colors.text,\n selectedOption.colorToken ? selectedOption.colorToken : 'default',\n );\n\n return (\n <Flex className=\"Select__Container\" justify=\"flex-start\" align=\"center\" textAlign=\"left\" color={adaptiveColor}>\n {selectedOption?.leftElement ? (\n <Flex align=\"center\" className=\"Select__LeftElement\" pr={2}>\n {selectedOption.leftElement}\n </Flex>\n ) : defaultLeftElement ? (\n <Flex align=\"center\" className=\"Select__LeftElement\" pr={2}>\n {defaultLeftElement}\n </Flex>\n ) : null}\n {typeof selectedOption.label === 'string' ? (\n shouldTruncateText ? (\n <TruncatedText\n color={adaptiveColor}\n className=\"Select__Text\"\n textContent={selectedOption.label || ''}\n noOfLines={1}\n />\n ) : (\n <Text color={adaptiveColor} className=\"Select__Text\">\n {selectedOption.label}\n </Text>\n )\n ) : (\n selectedOption.label\n )}\n </Flex>\n );\n};\n","import React, { useMemo, ChangeEvent, ReactNode, useRef, useState, useCallback, useEffect } from 'react';\nimport { Select as CSelect, SelectProps as CSelectProps, MenuButton } from '@chakra-ui/react';\nimport { MenuContainer } from '../Menu/components/MenuContainer/menuContainer.component';\nimport { WithFormControlProps, withFormControl } from '../FormControl/formControl.component';\nimport { MenuProvider } from '../Menu/context/menu.context';\nimport { SelectOptionProps } from '../Select/select.types';\nimport { useTheme } from 'hooks/useTheme';\nimport { SelectList, SelectListProps } from './components/SelectList/selectList.component';\nimport { SelectBrowserDefault } from './components/SelectBrowserDefault/selectBrowserDefault.component';\nimport { SelectContainer } from './components/SelectContainer/selectContainer.component';\nimport { Icon } from '../Icon/icon.component';\nimport { IconSize } from '../Icon/icon.types';\nimport { TextColor } from 'shared/types';\nimport { FormControlSize } from '../FormControl/formControl.types';\n\nexport interface SelectBaseProps extends WithFormControlProps, CSelectProps {\n options: SelectOptionProps[];\n size?: FormControlSize;\n colorToken?: TextColor;\n}\n\nexport interface BrowserDefaultSelectProps extends SelectBaseProps {\n defaultLeftElement?: never;\n listProps?: never;\n onChange: (e: ChangeEvent<HTMLSelectElement>) => void;\n useBrowserDefaultMenu?: boolean;\n}\n\nexport interface CustomSelectProps extends SelectBaseProps {\n defaultLeftElement?: ReactNode;\n listProps?: SelectListProps;\n onChange?: never;\n useBrowserDefaultMenu?: never;\n}\n\nexport type SelectProps = BrowserDefaultSelectProps | CustomSelectProps;\n\nconst Select = ({\n defaultLeftElement,\n isFieldInline,\n listProps,\n onChange,\n options,\n placeholder,\n size = 'md',\n value,\n useBrowserDefaultMenu,\n maxW = '100%',\n colorToken,\n ...domProps\n}: SelectProps): JSX.Element => {\n const selectRef = useRef<HTMLSelectElement>(null);\n const { colors } = useTheme();\n const placeholderOption: SelectOptionProps = useMemo(\n () => ({\n label: placeholder,\n value: '',\n colorToken: 'placeholder',\n leftElement: null,\n isSelected: false,\n isPlaceholder: true,\n }),\n [placeholder],\n );\n\n const [allOptions, setAllOptions] = useState<SelectOptionProps[]>([]);\n\n const selectedOption: SelectOptionProps = useMemo(() => {\n const selectedItem = allOptions.find((option) => option.isSelected);\n\n return selectedItem ? selectedItem : placeholderOption;\n }, [allOptions, placeholderOption]);\n\n const handleSelect = useCallback(\n (selectedItem: SelectOptionProps) => {\n if (!allOptions) return;\n\n const updatedOptions = allOptions.map((option) => {\n return {\n ...option,\n isSelected: option.value === selectedItem.value,\n };\n });\n setAllOptions(updatedOptions);\n\n if (listProps?.onSelect) {\n listProps.onSelect(selectedItem);\n }\n },\n [allOptions, listProps],\n );\n\n // If the text is not being truncated it should grow to fit the content\n const flexibleHeightProps = !listProps?.shouldTruncateText ? { height: 'max-content', minH: 10 } : {};\n\n const selectWidth = useMemo(() => {\n if (!selectRef.current) {\n return '320px';\n }\n\n return `${selectRef?.current?.clientWidth}px`;\n\n // Disables the warning for not including unused dependency in the hook array. This dependency is needed to rerender the menu list with the correct width\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [selectRef?.current]);\n\n // Set default selected state\n useEffect(() => {\n const mappedOptions = options.map((option) => ({\n ...option,\n isSelected: option.value === value,\n }));\n\n setAllOptions([...mappedOptions, placeholderOption]);\n }, [options, placeholderOption, value]);\n\n // Allow users to use browser default Select element instead of custom Select\n if (useBrowserDefaultMenu && onChange) {\n return <SelectBrowserDefault {...domProps} maxW={maxW} size={size} options={options} onChange={onChange} />;\n }\n\n return (\n <MenuProvider menuItems={allOptions}>\n <MenuContainer matchWidth={true} isLazy={true}>\n <CSelect\n icon={<Icon name=\"chevronDown\" size={size as IconSize} />}\n as={MenuButton}\n _focus={{\n boxShadow: `0 0 0 1px ${colors.border.light.focus} !important`,\n borderColor: colors.border.light.focus,\n }}\n ref={selectRef}\n onClick={(event: React.MouseEvent): void => event.stopPropagation()}\n type=\"button\"\n className=\"Select__MenuButton\"\n maxW={maxW}\n style={{ minHeight: { xs: 24, sm: 32, md: 40, lg: 48 }[size] }}\n {...flexibleHeightProps}\n {...domProps}\n >\n <SelectContainer\n selectedOption={selectedOption}\n defaultLeftElement={defaultLeftElement}\n shouldTruncateText={listProps?.shouldTruncateText}\n />\n </CSelect>\n <SelectList {...listProps} onSelect={handleSelect} options={allOptions} maxW={selectWidth || maxW} />\n </MenuContainer>\n </MenuProvider>\n );\n};\n\nSelect.displayName = 'Select';\n\nconst WrappedSelect = withFormControl(Select);\n\nexport { WrappedSelect as Select };\n"],"names":["SelectList","props","options","rest","__rest","React","MenuList","__assign","shouldRetainSelection","menuItems","isMatchWidthSet","SelectBrowserDefault","CSelect","className","map","option","index","createElement","key","concat","value","label","SelectContainer","_a","selectedOption","defaultLeftElement","_b","shouldTruncateText","colors","useTheme","adaptiveColor","useAdaptiveColorMap","text","colorToken","Flex","justify","align","textAlign","color","leftElement","pr","TruncatedText","textContent","noOfLines","Text","Select","listProps","onChange","placeholder","size","useBrowserDefaultMenu","_c","maxW","domProps","selectRef","useRef","placeholderOption","useMemo","isSelected","isPlaceholder","_d","__read","useState","allOptions","setAllOptions","selectedItem","find","handleSelect","useCallback","updatedOptions","onSelect","flexibleHeightProps","height","minH","selectWidth","current","clientWidth","useEffect","mappedOptions","__spreadArray","MenuProvider","MenuContainer","matchWidth","isLazy","icon","Icon","name","as","MenuButton","_focus","boxShadow","border","light","focus","borderColor","ref","onClick","event","stopPropagation","type","style","minHeight","xs","sm","md","lg","displayName","WrappedSelect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
1
2
  type ColorComponent = 'text' | 'heading' | 'tag';
2
- export declare const getColorArgTypes: (component: ColorComponent) => {
3
- color: {
4
- control: string;
5
- table: {
6
- type: {
7
- summary: string;
8
- };
9
- defaultValue: {
10
- summary: string;
11
- };
12
- };
13
- description: string;
14
- };
15
- };
3
+ export declare const getColorArgTypes: (component: ColorComponent) => ArgType;
16
4
  export {};
@@ -0,0 +1,2 @@
1
+ "use strict";var e=require("./tslib.es6-f01c41a6.js"),t=require("react"),r=require("./core.esm-3a85aed4.js"),n=require("./sortableItem.context-f7dd54a1.js");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=i(t);function a(e,t,r){const n=e.slice();return n.splice(r<0?n.length+r:r,0,n.splice(t,1)[0]),n}function s(e,t){return e.reduce(((e,r,n)=>{const i=t.get(r);return i&&(e[n]=i),e}),Array(e.length))}function d(e){return null!==e&&e>=0}const l=e=>{let{rects:t,activeIndex:r,overIndex:n,index:i}=e;const o=a(t,n,r),s=t[i],d=o[i];return d&&s?{x:d.left-s.left,y:d.top-s.top,scaleX:d.width/s.width,scaleY:d.height/s.height}:null},c=o.default.createContext({activeIndex:-1,containerId:"Sortable",disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:l,disabled:{draggable:!1,droppable:!1}});const u=e=>{let{id:t,items:r,activeIndex:n,overIndex:i}=e;return a(r,n,i).indexOf(t)},f=e=>{let{containerId:t,isSorting:r,wasDragging:n,index:i,items:o,newIndex:a,previousItems:s,previousContainerId:d,transition:l}=e;return!(!l||!n)&&((s===o||i!==a)&&(!!r||a!==i&&t===d))},b={duration:200,easing:"ease"},g=r.CSS.Transition.toString({property:"transform",duration:0,easing:"linear"}),p={roleDescription:"sortable"};function v(e){let{animateLayoutChanges:n=f,attributes:i,disabled:o,data:a,getNewIndex:s=u,id:l,strategy:v,resizeObserverConfig:x,transition:I=b}=e;const{items:m,containerId:y,activeIndex:h,disabled:C,disableTransforms:R,sortedRects:S,overIndex:w,useDragOverlay:D,strategy:E}=t.useContext(c),N=function(e,t){var r,n;if("boolean"==typeof e)return{draggable:e,droppable:!1};return{draggable:null!=(r=null==e?void 0:e.draggable)?r:t.draggable,droppable:null!=(n=null==e?void 0:e.droppable)?n:t.droppable}}(o,C),O=m.indexOf(l),K=t.useMemo((()=>({sortable:{containerId:y,index:O,items:m},...a})),[y,a,O,m]),T=t.useMemo((()=>m.slice(m.indexOf(l))),[m,l]),{rect:M,node:j,isOver:A,setNodeRef:q}=r.useDroppable({id:l,data:K,disabled:N.droppable,resizeObserverConfig:{updateMeasurementsFor:T,...x}}),{active:L,activatorEvent:k,activeNodeRect:U,attributes:z,setNodeRef:B,listeners:F,isDragging:P,over:X,setActivatorNodeRef:Y,transform:_}=r.useDraggable({id:l,data:K,attributes:{...p,...i},disabled:N.draggable}),G=r.useCombinedRefs(q,B),H=Boolean(L),J=H&&!R&&d(h)&&d(w),Q=!D&&P,V=Q&&J?_:null,W=J?null!=V?V:(null!=v?v:E)({rects:S,activeNodeRect:U,activeIndex:h,overIndex:w,index:O}):null,Z=d(h)&&d(w)?s({id:l,items:m,activeIndex:h,overIndex:w}):O,$=null==L?void 0:L.id,ee=t.useRef({activeId:$,items:m,newIndex:Z,containerId:y}),te=m!==ee.current.items,re=n({active:L,containerId:y,isDragging:P,isSorting:H,id:l,index:O,items:m,newIndex:ee.current.newIndex,previousItems:ee.current.items,previousContainerId:ee.current.containerId,transition:I,wasDragging:null!=ee.current.activeId}),ne=function(e){let{disabled:n,index:i,node:o,rect:a}=e;const[s,d]=t.useState(null),l=t.useRef(i);return r.useIsomorphicLayoutEffect((()=>{if(!n&&i!==l.current&&o.current){const e=a.current;if(e){const t=r.getClientRect(o.current,{ignoreTransform:!0}),n={x:e.left-t.left,y:e.top-t.top,scaleX:e.width/t.width,scaleY:e.height/t.height};(n.x||n.y)&&d(n)}}i!==l.current&&(l.current=i)}),[n,i,o,a]),t.useEffect((()=>{s&&d(null)}),[s]),s}({disabled:!re,index:O,node:j,rect:M});return t.useEffect((()=>{H&&ee.current.newIndex!==Z&&(ee.current.newIndex=Z),y!==ee.current.containerId&&(ee.current.containerId=y),m!==ee.current.items&&(ee.current.items=m)}),[H,Z,y,m]),t.useEffect((()=>{if($===ee.current.activeId)return;if($&&!ee.current.activeId)return void(ee.current.activeId=$);const e=setTimeout((()=>{ee.current.activeId=$}),50);return()=>clearTimeout(e)}),[$]),{active:L,activeIndex:h,attributes:z,data:K,rect:M,index:O,newIndex:Z,items:m,isOver:A,isSorting:H,isDragging:P,listeners:F,node:j,overIndex:w,over:X,setNodeRef:G,setActivatorNodeRef:Y,setDroppableNodeRef:q,setDraggableNodeRef:B,transform:null!=ne?ne:W,transition:function(){if(ne||te&&ee.current.newIndex===O)return g;if(Q&&!r.isKeyboardEvent(k)||!I)return;if(H||re)return r.CSS.Transition.toString({...I,property:"transform"});return}()}}function x(e){if(!e)return!1;const t=e.data.current;return!!(t&&"sortable"in t&&"object"==typeof t.sortable&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable)}const I=[r.KeyboardCode.Down,r.KeyboardCode.Right,r.KeyboardCode.Up,r.KeyboardCode.Left];function m(e,t){return!(!x(e)||!x(t))&&e.data.current.sortable.containerId===t.data.current.sortable.containerId}exports.SortableContext=function(e){let{children:n,id:i,items:a,strategy:d=l,disabled:u=!1}=e;const{active:f,dragOverlay:b,droppableRects:g,over:p,measureDroppableContainers:v}=r.useDndContext(),x=r.useUniqueId("Sortable",i),I=Boolean(null!==b.rect),m=t.useMemo((()=>a.map((e=>"object"==typeof e&&"id"in e?e.id:e))),[a]),y=null!=f,h=f?m.indexOf(f.id):-1,C=p?m.indexOf(p.id):-1,R=t.useRef(m),S=!function(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}(m,R.current),w=-1!==C&&-1===h||S,D=function(e){return"boolean"==typeof e?{draggable:e,droppable:e}:e}(u);r.useIsomorphicLayoutEffect((()=>{S&&y&&v(m)}),[S,m,y,v]),t.useEffect((()=>{R.current=m}),[m]);const E=t.useMemo((()=>({activeIndex:h,containerId:x,disabled:D,disableTransforms:w,items:m,overIndex:C,useDragOverlay:I,sortedRects:s(m,g),strategy:d})),[h,x,D.draggable,D.droppable,w,m,C,g,I,d]);return o.default.createElement(c.Provider,{value:E},n)},exports.SortableItem=function(i){var a=i.children,s=i.id,d=i.style;i.onRemove;var l=v({id:s}),c=l.attributes,u=l.isDragging,f=l.listeners,b=l.setNodeRef,g=l.setActivatorNodeRef,p=l.transform,x=l.transition,I=t.useMemo((function(){return{attributes:c,listeners:f,ref:g}}),[c,f,g]),m=e.__assign({opacity:u?.4:void 0,transform:r.CSS.Translate.toString(p),transition:x,listStyle:"none"},d);return o.default.createElement(n.SortableItemContext.Provider,{value:I},o.default.createElement("li",{className:"SortableItem",ref:b,style:m},a))},exports.arrayMove=a,exports.sortableKeyboardCoordinates=(e,t)=>{let{context:{active:n,collisionRect:i,droppableRects:o,droppableContainers:a,over:s,scrollableAncestors:d}}=t;if(I.includes(e.code)){if(e.preventDefault(),!n||!i)return;const t=[];a.getEnabled().forEach((n=>{if(!n||null!=n&&n.disabled)return;const a=o.get(n.id);if(a)switch(e.code){case r.KeyboardCode.Down:i.top<a.top&&t.push(n);break;case r.KeyboardCode.Up:i.top>a.top&&t.push(n);break;case r.KeyboardCode.Left:i.left>a.left&&t.push(n);break;case r.KeyboardCode.Right:i.left<a.left&&t.push(n)}}));const l=r.closestCorners({active:n,collisionRect:i,droppableRects:o,droppableContainers:t,pointerCoordinates:null});let c=r.getFirstCollision(l,"id");if(c===(null==s?void 0:s.id)&&l.length>1&&(c=l[1].id),null!=c){const e=a.get(n.id),t=a.get(c),s=t?o.get(t.id):null,l=null==t?void 0:t.node.current;if(l&&s&&e&&t){const n=r.getScrollableAncestors(l).some(((e,t)=>d[t]!==e)),o=m(e,t),a=function(e,t){if(!x(e)||!x(t))return!1;if(!m(e,t))return!1;return e.data.current.sortable.index<t.data.current.sortable.index}(e,t),c=n||!o?{x:0,y:0}:{x:a?i.width-s.width:0,y:a?i.height-s.height:0},u={x:s.left,y:s.top};return c.x&&c.y?u:r.subtract(u,c)}}}};
2
+ //# sourceMappingURL=sortableItem.component-9aab4eb2.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"sortableItem.component-f3efb731.js","sources":["../node_modules/@dnd-kit/sortable/dist/sortable.esm.js","../src/components/SortableList/components/SortableItem/sortableItem.component.tsx"],"sourcesContent":["import React, { useMemo, useRef, useEffect, useState, useContext } from 'react';\nimport { useDndContext, getClientRect, useDroppable, useDraggable, closestCorners, getFirstCollision, getScrollableAncestors, KeyboardCode } from '@dnd-kit/core';\nimport { useUniqueId, useIsomorphicLayoutEffect, CSS, useCombinedRefs, isKeyboardEvent, subtract } from '@dnd-kit/utilities';\n\n/**\r\n * Move an array item to a different position. Returns a new array with the item moved to the new position.\r\n */\nfunction arrayMove(array, from, to) {\n const newArray = array.slice();\n newArray.splice(to < 0 ? newArray.length + to : to, 0, newArray.splice(from, 1)[0]);\n return newArray;\n}\n\n/**\r\n * Swap an array item to a different position. Returns a new array with the item swapped to the new position.\r\n */\nfunction arraySwap(array, from, to) {\n const newArray = array.slice();\n newArray[from] = array[to];\n newArray[to] = array[from];\n return newArray;\n}\n\nfunction getSortedRects(items, rects) {\n return items.reduce((accumulator, id, index) => {\n const rect = rects.get(id);\n\n if (rect) {\n accumulator[index] = rect;\n }\n\n return accumulator;\n }, Array(items.length));\n}\n\nfunction isValidIndex(index) {\n return index !== null && index >= 0;\n}\n\nfunction itemsEqual(a, b) {\n if (a === b) {\n return true;\n }\n\n if (a.length !== b.length) {\n return false;\n }\n\n for (let i = 0; i < a.length; i++) {\n if (a[i] !== b[i]) {\n return false;\n }\n }\n\n return true;\n}\n\nfunction normalizeDisabled(disabled) {\n if (typeof disabled === 'boolean') {\n return {\n draggable: disabled,\n droppable: disabled\n };\n }\n\n return disabled;\n}\n\n// To-do: We should be calculating scale transformation\nconst defaultScale = {\n scaleX: 1,\n scaleY: 1\n};\nconst horizontalListSortingStrategy = _ref => {\n var _rects$activeIndex;\n\n let {\n rects,\n activeNodeRect: fallbackActiveRect,\n activeIndex,\n overIndex,\n index\n } = _ref;\n const activeNodeRect = (_rects$activeIndex = rects[activeIndex]) != null ? _rects$activeIndex : fallbackActiveRect;\n\n if (!activeNodeRect) {\n return null;\n }\n\n const itemGap = getItemGap(rects, index, activeIndex);\n\n if (index === activeIndex) {\n const newIndexRect = rects[overIndex];\n\n if (!newIndexRect) {\n return null;\n }\n\n return {\n x: activeIndex < overIndex ? newIndexRect.left + newIndexRect.width - (activeNodeRect.left + activeNodeRect.width) : newIndexRect.left - activeNodeRect.left,\n y: 0,\n ...defaultScale\n };\n }\n\n if (index > activeIndex && index <= overIndex) {\n return {\n x: -activeNodeRect.width - itemGap,\n y: 0,\n ...defaultScale\n };\n }\n\n if (index < activeIndex && index >= overIndex) {\n return {\n x: activeNodeRect.width + itemGap,\n y: 0,\n ...defaultScale\n };\n }\n\n return {\n x: 0,\n y: 0,\n ...defaultScale\n };\n};\n\nfunction getItemGap(rects, index, activeIndex) {\n const currentRect = rects[index];\n const previousRect = rects[index - 1];\n const nextRect = rects[index + 1];\n\n if (!currentRect || !previousRect && !nextRect) {\n return 0;\n }\n\n if (activeIndex < index) {\n return previousRect ? currentRect.left - (previousRect.left + previousRect.width) : nextRect.left - (currentRect.left + currentRect.width);\n }\n\n return nextRect ? nextRect.left - (currentRect.left + currentRect.width) : currentRect.left - (previousRect.left + previousRect.width);\n}\n\nconst rectSortingStrategy = _ref => {\n let {\n rects,\n activeIndex,\n overIndex,\n index\n } = _ref;\n const newRects = arrayMove(rects, overIndex, activeIndex);\n const oldRect = rects[index];\n const newRect = newRects[index];\n\n if (!newRect || !oldRect) {\n return null;\n }\n\n return {\n x: newRect.left - oldRect.left,\n y: newRect.top - oldRect.top,\n scaleX: newRect.width / oldRect.width,\n scaleY: newRect.height / oldRect.height\n };\n};\n\nconst rectSwappingStrategy = _ref => {\n let {\n activeIndex,\n index,\n rects,\n overIndex\n } = _ref;\n let oldRect;\n let newRect;\n\n if (index === activeIndex) {\n oldRect = rects[index];\n newRect = rects[overIndex];\n }\n\n if (index === overIndex) {\n oldRect = rects[index];\n newRect = rects[activeIndex];\n }\n\n if (!newRect || !oldRect) {\n return null;\n }\n\n return {\n x: newRect.left - oldRect.left,\n y: newRect.top - oldRect.top,\n scaleX: newRect.width / oldRect.width,\n scaleY: newRect.height / oldRect.height\n };\n};\n\n// To-do: We should be calculating scale transformation\nconst defaultScale$1 = {\n scaleX: 1,\n scaleY: 1\n};\nconst verticalListSortingStrategy = _ref => {\n var _rects$activeIndex;\n\n let {\n activeIndex,\n activeNodeRect: fallbackActiveRect,\n index,\n rects,\n overIndex\n } = _ref;\n const activeNodeRect = (_rects$activeIndex = rects[activeIndex]) != null ? _rects$activeIndex : fallbackActiveRect;\n\n if (!activeNodeRect) {\n return null;\n }\n\n if (index === activeIndex) {\n const overIndexRect = rects[overIndex];\n\n if (!overIndexRect) {\n return null;\n }\n\n return {\n x: 0,\n y: activeIndex < overIndex ? overIndexRect.top + overIndexRect.height - (activeNodeRect.top + activeNodeRect.height) : overIndexRect.top - activeNodeRect.top,\n ...defaultScale$1\n };\n }\n\n const itemGap = getItemGap$1(rects, index, activeIndex);\n\n if (index > activeIndex && index <= overIndex) {\n return {\n x: 0,\n y: -activeNodeRect.height - itemGap,\n ...defaultScale$1\n };\n }\n\n if (index < activeIndex && index >= overIndex) {\n return {\n x: 0,\n y: activeNodeRect.height + itemGap,\n ...defaultScale$1\n };\n }\n\n return {\n x: 0,\n y: 0,\n ...defaultScale$1\n };\n};\n\nfunction getItemGap$1(clientRects, index, activeIndex) {\n const currentRect = clientRects[index];\n const previousRect = clientRects[index - 1];\n const nextRect = clientRects[index + 1];\n\n if (!currentRect) {\n return 0;\n }\n\n if (activeIndex < index) {\n return previousRect ? currentRect.top - (previousRect.top + previousRect.height) : nextRect ? nextRect.top - (currentRect.top + currentRect.height) : 0;\n }\n\n return nextRect ? nextRect.top - (currentRect.top + currentRect.height) : previousRect ? currentRect.top - (previousRect.top + previousRect.height) : 0;\n}\n\nconst ID_PREFIX = 'Sortable';\nconst Context = /*#__PURE__*/React.createContext({\n activeIndex: -1,\n containerId: ID_PREFIX,\n disableTransforms: false,\n items: [],\n overIndex: -1,\n useDragOverlay: false,\n sortedRects: [],\n strategy: rectSortingStrategy,\n disabled: {\n draggable: false,\n droppable: false\n }\n});\nfunction SortableContext(_ref) {\n let {\n children,\n id,\n items: userDefinedItems,\n strategy = rectSortingStrategy,\n disabled: disabledProp = false\n } = _ref;\n const {\n active,\n dragOverlay,\n droppableRects,\n over,\n measureDroppableContainers\n } = useDndContext();\n const containerId = useUniqueId(ID_PREFIX, id);\n const useDragOverlay = Boolean(dragOverlay.rect !== null);\n const items = useMemo(() => userDefinedItems.map(item => typeof item === 'object' && 'id' in item ? item.id : item), [userDefinedItems]);\n const isDragging = active != null;\n const activeIndex = active ? items.indexOf(active.id) : -1;\n const overIndex = over ? items.indexOf(over.id) : -1;\n const previousItemsRef = useRef(items);\n const itemsHaveChanged = !itemsEqual(items, previousItemsRef.current);\n const disableTransforms = overIndex !== -1 && activeIndex === -1 || itemsHaveChanged;\n const disabled = normalizeDisabled(disabledProp);\n useIsomorphicLayoutEffect(() => {\n if (itemsHaveChanged && isDragging) {\n measureDroppableContainers(items);\n }\n }, [itemsHaveChanged, items, isDragging, measureDroppableContainers]);\n useEffect(() => {\n previousItemsRef.current = items;\n }, [items]);\n const contextValue = useMemo(() => ({\n activeIndex,\n containerId,\n disabled,\n disableTransforms,\n items,\n overIndex,\n useDragOverlay,\n sortedRects: getSortedRects(items, droppableRects),\n strategy\n }), // eslint-disable-next-line react-hooks/exhaustive-deps\n [activeIndex, containerId, disabled.draggable, disabled.droppable, disableTransforms, items, overIndex, droppableRects, useDragOverlay, strategy]);\n return React.createElement(Context.Provider, {\n value: contextValue\n }, children);\n}\n\nconst defaultNewIndexGetter = _ref => {\n let {\n id,\n items,\n activeIndex,\n overIndex\n } = _ref;\n return arrayMove(items, activeIndex, overIndex).indexOf(id);\n};\nconst defaultAnimateLayoutChanges = _ref2 => {\n let {\n containerId,\n isSorting,\n wasDragging,\n index,\n items,\n newIndex,\n previousItems,\n previousContainerId,\n transition\n } = _ref2;\n\n if (!transition || !wasDragging) {\n return false;\n }\n\n if (previousItems !== items && index === newIndex) {\n return false;\n }\n\n if (isSorting) {\n return true;\n }\n\n return newIndex !== index && containerId === previousContainerId;\n};\nconst defaultTransition = {\n duration: 200,\n easing: 'ease'\n};\nconst transitionProperty = 'transform';\nconst disabledTransition = /*#__PURE__*/CSS.Transition.toString({\n property: transitionProperty,\n duration: 0,\n easing: 'linear'\n});\nconst defaultAttributes = {\n roleDescription: 'sortable'\n};\n\n/*\r\n * When the index of an item changes while sorting,\r\n * we need to temporarily disable the transforms\r\n */\n\nfunction useDerivedTransform(_ref) {\n let {\n disabled,\n index,\n node,\n rect\n } = _ref;\n const [derivedTransform, setDerivedtransform] = useState(null);\n const previousIndex = useRef(index);\n useIsomorphicLayoutEffect(() => {\n if (!disabled && index !== previousIndex.current && node.current) {\n const initial = rect.current;\n\n if (initial) {\n const current = getClientRect(node.current, {\n ignoreTransform: true\n });\n const delta = {\n x: initial.left - current.left,\n y: initial.top - current.top,\n scaleX: initial.width / current.width,\n scaleY: initial.height / current.height\n };\n\n if (delta.x || delta.y) {\n setDerivedtransform(delta);\n }\n }\n }\n\n if (index !== previousIndex.current) {\n previousIndex.current = index;\n }\n }, [disabled, index, node, rect]);\n useEffect(() => {\n if (derivedTransform) {\n setDerivedtransform(null);\n }\n }, [derivedTransform]);\n return derivedTransform;\n}\n\nfunction useSortable(_ref) {\n let {\n animateLayoutChanges = defaultAnimateLayoutChanges,\n attributes: userDefinedAttributes,\n disabled: localDisabled,\n data: customData,\n getNewIndex = defaultNewIndexGetter,\n id,\n strategy: localStrategy,\n resizeObserverConfig,\n transition = defaultTransition\n } = _ref;\n const {\n items,\n containerId,\n activeIndex,\n disabled: globalDisabled,\n disableTransforms,\n sortedRects,\n overIndex,\n useDragOverlay,\n strategy: globalStrategy\n } = useContext(Context);\n const disabled = normalizeLocalDisabled(localDisabled, globalDisabled);\n const index = items.indexOf(id);\n const data = useMemo(() => ({\n sortable: {\n containerId,\n index,\n items\n },\n ...customData\n }), [containerId, customData, index, items]);\n const itemsAfterCurrentSortable = useMemo(() => items.slice(items.indexOf(id)), [items, id]);\n const {\n rect,\n node,\n isOver,\n setNodeRef: setDroppableNodeRef\n } = useDroppable({\n id,\n data,\n disabled: disabled.droppable,\n resizeObserverConfig: {\n updateMeasurementsFor: itemsAfterCurrentSortable,\n ...resizeObserverConfig\n }\n });\n const {\n active,\n activatorEvent,\n activeNodeRect,\n attributes,\n setNodeRef: setDraggableNodeRef,\n listeners,\n isDragging,\n over,\n setActivatorNodeRef,\n transform\n } = useDraggable({\n id,\n data,\n attributes: { ...defaultAttributes,\n ...userDefinedAttributes\n },\n disabled: disabled.draggable\n });\n const setNodeRef = useCombinedRefs(setDroppableNodeRef, setDraggableNodeRef);\n const isSorting = Boolean(active);\n const displaceItem = isSorting && !disableTransforms && isValidIndex(activeIndex) && isValidIndex(overIndex);\n const shouldDisplaceDragSource = !useDragOverlay && isDragging;\n const dragSourceDisplacement = shouldDisplaceDragSource && displaceItem ? transform : null;\n const strategy = localStrategy != null ? localStrategy : globalStrategy;\n const finalTransform = displaceItem ? dragSourceDisplacement != null ? dragSourceDisplacement : strategy({\n rects: sortedRects,\n activeNodeRect,\n activeIndex,\n overIndex,\n index\n }) : null;\n const newIndex = isValidIndex(activeIndex) && isValidIndex(overIndex) ? getNewIndex({\n id,\n items,\n activeIndex,\n overIndex\n }) : index;\n const activeId = active == null ? void 0 : active.id;\n const previous = useRef({\n activeId,\n items,\n newIndex,\n containerId\n });\n const itemsHaveChanged = items !== previous.current.items;\n const shouldAnimateLayoutChanges = animateLayoutChanges({\n active,\n containerId,\n isDragging,\n isSorting,\n id,\n index,\n items,\n newIndex: previous.current.newIndex,\n previousItems: previous.current.items,\n previousContainerId: previous.current.containerId,\n transition,\n wasDragging: previous.current.activeId != null\n });\n const derivedTransform = useDerivedTransform({\n disabled: !shouldAnimateLayoutChanges,\n index,\n node,\n rect\n });\n useEffect(() => {\n if (isSorting && previous.current.newIndex !== newIndex) {\n previous.current.newIndex = newIndex;\n }\n\n if (containerId !== previous.current.containerId) {\n previous.current.containerId = containerId;\n }\n\n if (items !== previous.current.items) {\n previous.current.items = items;\n }\n }, [isSorting, newIndex, containerId, items]);\n useEffect(() => {\n if (activeId === previous.current.activeId) {\n return;\n }\n\n if (activeId && !previous.current.activeId) {\n previous.current.activeId = activeId;\n return;\n }\n\n const timeoutId = setTimeout(() => {\n previous.current.activeId = activeId;\n }, 50);\n return () => clearTimeout(timeoutId);\n }, [activeId]);\n return {\n active,\n activeIndex,\n attributes,\n data,\n rect,\n index,\n newIndex,\n items,\n isOver,\n isSorting,\n isDragging,\n listeners,\n node,\n overIndex,\n over,\n setNodeRef,\n setActivatorNodeRef,\n setDroppableNodeRef,\n setDraggableNodeRef,\n transform: derivedTransform != null ? derivedTransform : finalTransform,\n transition: getTransition()\n };\n\n function getTransition() {\n if ( // Temporarily disable transitions for a single frame to set up derived transforms\n derivedTransform || // Or to prevent items jumping to back to their \"new\" position when items change\n itemsHaveChanged && previous.current.newIndex === index) {\n return disabledTransition;\n }\n\n if (shouldDisplaceDragSource && !isKeyboardEvent(activatorEvent) || !transition) {\n return undefined;\n }\n\n if (isSorting || shouldAnimateLayoutChanges) {\n return CSS.Transition.toString({ ...transition,\n property: transitionProperty\n });\n }\n\n return undefined;\n }\n}\n\nfunction normalizeLocalDisabled(localDisabled, globalDisabled) {\n var _localDisabled$dragga, _localDisabled$droppa;\n\n if (typeof localDisabled === 'boolean') {\n return {\n draggable: localDisabled,\n // Backwards compatibility\n droppable: false\n };\n }\n\n return {\n draggable: (_localDisabled$dragga = localDisabled == null ? void 0 : localDisabled.draggable) != null ? _localDisabled$dragga : globalDisabled.draggable,\n droppable: (_localDisabled$droppa = localDisabled == null ? void 0 : localDisabled.droppable) != null ? _localDisabled$droppa : globalDisabled.droppable\n };\n}\n\nfunction hasSortableData(entry) {\n if (!entry) {\n return false;\n }\n\n const data = entry.data.current;\n\n if (data && 'sortable' in data && typeof data.sortable === 'object' && 'containerId' in data.sortable && 'items' in data.sortable && 'index' in data.sortable) {\n return true;\n }\n\n return false;\n}\n\nconst directions = [KeyboardCode.Down, KeyboardCode.Right, KeyboardCode.Up, KeyboardCode.Left];\nconst sortableKeyboardCoordinates = (event, _ref) => {\n let {\n context: {\n active,\n collisionRect,\n droppableRects,\n droppableContainers,\n over,\n scrollableAncestors\n }\n } = _ref;\n\n if (directions.includes(event.code)) {\n event.preventDefault();\n\n if (!active || !collisionRect) {\n return;\n }\n\n const filteredContainers = [];\n droppableContainers.getEnabled().forEach(entry => {\n if (!entry || entry != null && entry.disabled) {\n return;\n }\n\n const rect = droppableRects.get(entry.id);\n\n if (!rect) {\n return;\n }\n\n switch (event.code) {\n case KeyboardCode.Down:\n if (collisionRect.top < rect.top) {\n filteredContainers.push(entry);\n }\n\n break;\n\n case KeyboardCode.Up:\n if (collisionRect.top > rect.top) {\n filteredContainers.push(entry);\n }\n\n break;\n\n case KeyboardCode.Left:\n if (collisionRect.left > rect.left) {\n filteredContainers.push(entry);\n }\n\n break;\n\n case KeyboardCode.Right:\n if (collisionRect.left < rect.left) {\n filteredContainers.push(entry);\n }\n\n break;\n }\n });\n const collisions = closestCorners({\n active,\n collisionRect: collisionRect,\n droppableRects,\n droppableContainers: filteredContainers,\n pointerCoordinates: null\n });\n let closestId = getFirstCollision(collisions, 'id');\n\n if (closestId === (over == null ? void 0 : over.id) && collisions.length > 1) {\n closestId = collisions[1].id;\n }\n\n if (closestId != null) {\n const activeDroppable = droppableContainers.get(active.id);\n const newDroppable = droppableContainers.get(closestId);\n const newRect = newDroppable ? droppableRects.get(newDroppable.id) : null;\n const newNode = newDroppable == null ? void 0 : newDroppable.node.current;\n\n if (newNode && newRect && activeDroppable && newDroppable) {\n const newScrollAncestors = getScrollableAncestors(newNode);\n const hasDifferentScrollAncestors = newScrollAncestors.some((element, index) => scrollableAncestors[index] !== element);\n const hasSameContainer = isSameContainer(activeDroppable, newDroppable);\n const isAfterActive = isAfter(activeDroppable, newDroppable);\n const offset = hasDifferentScrollAncestors || !hasSameContainer ? {\n x: 0,\n y: 0\n } : {\n x: isAfterActive ? collisionRect.width - newRect.width : 0,\n y: isAfterActive ? collisionRect.height - newRect.height : 0\n };\n const rectCoordinates = {\n x: newRect.left,\n y: newRect.top\n };\n const newCoordinates = offset.x && offset.y ? rectCoordinates : subtract(rectCoordinates, offset);\n return newCoordinates;\n }\n }\n }\n\n return undefined;\n};\n\nfunction isSameContainer(a, b) {\n if (!hasSortableData(a) || !hasSortableData(b)) {\n return false;\n }\n\n return a.data.current.sortable.containerId === b.data.current.sortable.containerId;\n}\n\nfunction isAfter(a, b) {\n if (!hasSortableData(a) || !hasSortableData(b)) {\n return false;\n }\n\n if (!isSameContainer(a, b)) {\n return false;\n }\n\n return a.data.current.sortable.index < b.data.current.sortable.index;\n}\n\nexport { SortableContext, arrayMove, arraySwap, defaultAnimateLayoutChanges, defaultNewIndexGetter, hasSortableData, horizontalListSortingStrategy, rectSortingStrategy, rectSwappingStrategy, sortableKeyboardCoordinates, useSortable, verticalListSortingStrategy };\n//# sourceMappingURL=sortable.esm.js.map\n","import React, { useMemo } from 'react';\nimport type { CSSProperties, PropsWithChildren } from 'react';\nimport { useSortable } from '@dnd-kit/sortable';\nimport { CSS } from '@dnd-kit/utilities';\nimport { SortableItemContext } from './sortableItem.context';\nimport { UniqueIdentifier } from '@dnd-kit/core';\n\nexport interface SortableItemProps {\n id: UniqueIdentifier;\n style?: CSSProperties;\n onRemove?(id: UniqueIdentifier): void;\n}\n\nexport const SortableItem = ({\n children,\n id,\n style: userStyle,\n onRemove,\n}: PropsWithChildren<SortableItemProps>): JSX.Element => {\n const { attributes, isDragging, listeners, setNodeRef, setActivatorNodeRef, transform, transition } = useSortable({\n id,\n });\n const context = useMemo(\n () => ({\n attributes,\n listeners,\n ref: setActivatorNodeRef,\n }),\n [attributes, listeners, setActivatorNodeRef],\n );\n const style: CSSProperties = {\n opacity: isDragging ? 0.4 : undefined,\n transform: CSS.Translate.toString(transform),\n transition,\n listStyle: 'none',\n ...userStyle,\n };\n\n return (\n <SortableItemContext.Provider value={context}>\n <li className=\"SortableItem\" ref={setNodeRef} style={style}>\n {children}\n </li>\n </SortableItemContext.Provider>\n );\n};\n"],"names":["arrayMove","array","from","to","newArray","slice","splice","length","getSortedRects","items","rects","reduce","accumulator","id","index","rect","get","Array","isValidIndex","rectSortingStrategy","_ref","activeIndex","overIndex","newRects","oldRect","newRect","x","left","y","top","scaleX","width","scaleY","height","ID_PREFIX","Context","React","createContext","containerId","disableTransforms","useDragOverlay","sortedRects","strategy","disabled","draggable","droppable","defaultNewIndexGetter","indexOf","defaultAnimateLayoutChanges","_ref2","isSorting","wasDragging","newIndex","previousItems","previousContainerId","transition","defaultTransition","duration","easing","transitionProperty","disabledTransition","CSS","Transition","toString","property","defaultAttributes","roleDescription","useSortable","animateLayoutChanges","attributes","userDefinedAttributes","localDisabled","data","customData","getNewIndex","localStrategy","resizeObserverConfig","globalDisabled","globalStrategy","useContext","_localDisabled$dragga","_localDisabled$droppa","normalizeLocalDisabled","useMemo","sortable","itemsAfterCurrentSortable","node","isOver","setNodeRef","setDroppableNodeRef","useDroppable","updateMeasurementsFor","active","activatorEvent","activeNodeRect","setDraggableNodeRef","listeners","isDragging","over","setActivatorNodeRef","transform","useDraggable","useCombinedRefs","Boolean","displaceItem","shouldDisplaceDragSource","dragSourceDisplacement","finalTransform","activeId","previous","useRef","itemsHaveChanged","current","shouldAnimateLayoutChanges","derivedTransform","setDerivedtransform","useState","previousIndex","useIsomorphicLayoutEffect","initial","getClientRect","ignoreTransform","delta","useEffect","useDerivedTransform","timeoutId","setTimeout","clearTimeout","isKeyboardEvent","getTransition","hasSortableData","entry","directions","KeyboardCode","Down","Right","Up","Left","isSameContainer","a","b","children","userDefinedItems","disabledProp","dragOverlay","droppableRects","measureDroppableContainers","useDndContext","useUniqueId","map","item","previousItemsRef","i","itemsEqual","normalizeDisabled","contextValue","createElement","Provider","value","_a","userStyle","style","onRemove","_b","context","ref","__assign","opacity","undefined","Translate","listStyle","SortableItemContext","className","event","collisionRect","droppableContainers","scrollableAncestors","includes","code","preventDefault","filteredContainers","getEnabled","forEach","push","collisions","closestCorners","pointerCoordinates","closestId","getFirstCollision","activeDroppable","newDroppable","newNode","hasDifferentScrollAncestors","getScrollableAncestors","some","element","hasSameContainer","isAfterActive","isAfter","offset","rectCoordinates","subtract"],"mappings":"6OAOA,SAASA,EAAUC,EAAOC,EAAMC,GAC9B,MAAMC,EAAWH,EAAMI,QAEvB,OADAD,EAASE,OAAOH,EAAK,EAAIC,EAASG,OAASJ,EAAKA,EAAI,EAAGC,EAASE,OAAOJ,EAAM,GAAG,IACzEE,CACT,CAYA,SAASI,EAAeC,EAAOC,GAC7B,OAAOD,EAAME,QAAO,CAACC,EAAaC,EAAIC,KACpC,MAAMC,EAAOL,EAAMM,IAAIH,GAMvB,OAJIE,IACFH,EAAYE,GAASC,GAGhBH,CAAW,GACjBK,MAAMR,EAAMF,QACjB,CAEA,SAASW,EAAaJ,GACpB,OAAiB,OAAVA,GAAkBA,GAAS,CACpC,CA2GA,MAAMK,EAAsBC,IAC1B,IAAIV,MACFA,EAAKW,YACLA,EAAWC,UACXA,EAASR,MACTA,GACEM,EACJ,MAAMG,EAAWvB,EAAUU,EAAOY,EAAWD,GACvCG,EAAUd,EAAMI,GAChBW,EAAUF,EAAST,GAEzB,OAAKW,GAAYD,EAIV,CACLE,EAAGD,EAAQE,KAAOH,EAAQG,KAC1BC,EAAGH,EAAQI,IAAML,EAAQK,IACzBC,OAAQL,EAAQM,MAAQP,EAAQO,MAChCC,OAAQP,EAAQQ,OAAST,EAAQS,QAP1B,IAQR,EA+G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C,EAASrL,IAAUkK,EAAoBlK,KAAWqL,IACzGC,EAAmB1D,EAAgBmD,EAAiBC,GACpDO,EA6Bd,SAAiB1D,EAAGC,GAClB,IAAKV,EAAgBS,KAAOT,EAAgBU,GAC1C,OAAO,EAGT,IAAKF,EAAgBC,EAAGC,GACtB,OAAO,EAGT,OAAOD,EAAEnE,KAAKwC,QAAQ5B,SAAStE,MAAQ8H,EAAEpE,KAAKwC,QAAQ5B,SAAStE,KACjE,CAvC8BwL,CAAQT,EAAiBC,GACzCS,EAASP,IAAgCI,EAAmB,CAChE1K,EAAG,EACHE,EAAG,GACD,CACFF,EAAG2K,EAAgBvB,EAAc/I,MAAQN,EAAQM,MAAQ,EACzDH,EAAGyK,EAAgBvB,EAAc7I,OAASR,EAAQQ,OAAS,GAEvDuK,EAAkB,CACtB9K,EAAGD,EAAQE,KACXC,EAAGH,EAAQI,KAGb,OADuB0K,EAAO7K,GAAK6K,EAAO3K,EAAI4K,EAAkBC,EAAQA,SAACD,EAAiBD,EAE3F,CACF,CACF,CAEe"}
1
+ {"version":3,"file":"sortableItem.component-9aab4eb2.js","sources":["../node_modules/@dnd-kit/sortable/dist/sortable.esm.js","../src/components/SortableList/components/SortableItem/sortableItem.component.tsx"],"sourcesContent":["import React, { useMemo, useRef, useEffect, useState, useContext } from 'react';\nimport { useDndContext, getClientRect, useDroppable, useDraggable, closestCorners, getFirstCollision, getScrollableAncestors, KeyboardCode } from '@dnd-kit/core';\nimport { useUniqueId, useIsomorphicLayoutEffect, CSS, useCombinedRefs, isKeyboardEvent, subtract } from '@dnd-kit/utilities';\n\n/**\r\n * Move an array item to a different position. Returns a new array with the item moved to the new position.\r\n */\nfunction arrayMove(array, from, to) {\n const newArray = array.slice();\n newArray.splice(to < 0 ? newArray.length + to : to, 0, newArray.splice(from, 1)[0]);\n return newArray;\n}\n\n/**\r\n * Swap an array item to a different position. Returns a new array with the item swapped to the new position.\r\n */\nfunction arraySwap(array, from, to) {\n const newArray = array.slice();\n newArray[from] = array[to];\n newArray[to] = array[from];\n return newArray;\n}\n\nfunction getSortedRects(items, rects) {\n return items.reduce((accumulator, id, index) => {\n const rect = rects.get(id);\n\n if (rect) {\n accumulator[index] = rect;\n }\n\n return accumulator;\n }, Array(items.length));\n}\n\nfunction isValidIndex(index) {\n return index !== null && index >= 0;\n}\n\nfunction itemsEqual(a, b) {\n if (a === b) {\n return true;\n }\n\n if (a.length !== b.length) {\n return false;\n }\n\n for (let i = 0; i < a.length; i++) {\n if (a[i] !== b[i]) {\n return false;\n }\n }\n\n return true;\n}\n\nfunction normalizeDisabled(disabled) {\n if (typeof disabled === 'boolean') {\n return {\n draggable: disabled,\n droppable: disabled\n };\n }\n\n return disabled;\n}\n\n// To-do: We should be calculating scale transformation\nconst defaultScale = {\n scaleX: 1,\n scaleY: 1\n};\nconst horizontalListSortingStrategy = _ref => {\n var _rects$activeIndex;\n\n let {\n rects,\n activeNodeRect: fallbackActiveRect,\n activeIndex,\n overIndex,\n index\n } = _ref;\n const activeNodeRect = (_rects$activeIndex = rects[activeIndex]) != null ? _rects$activeIndex : fallbackActiveRect;\n\n if (!activeNodeRect) {\n return null;\n }\n\n const itemGap = getItemGap(rects, index, activeIndex);\n\n if (index === activeIndex) {\n const newIndexRect = rects[overIndex];\n\n if (!newIndexRect) {\n return null;\n }\n\n return {\n x: activeIndex < overIndex ? newIndexRect.left + newIndexRect.width - (activeNodeRect.left + activeNodeRect.width) : newIndexRect.left - activeNodeRect.left,\n y: 0,\n ...defaultScale\n };\n }\n\n if (index > activeIndex && index <= overIndex) {\n return {\n x: -activeNodeRect.width - itemGap,\n y: 0,\n ...defaultScale\n };\n }\n\n if (index < activeIndex && index >= overIndex) {\n return {\n x: activeNodeRect.width + itemGap,\n y: 0,\n ...defaultScale\n };\n }\n\n return {\n x: 0,\n y: 0,\n ...defaultScale\n };\n};\n\nfunction getItemGap(rects, index, activeIndex) {\n const currentRect = rects[index];\n const previousRect = rects[index - 1];\n const nextRect = rects[index + 1];\n\n if (!currentRect || !previousRect && !nextRect) {\n return 0;\n }\n\n if (activeIndex < index) {\n return previousRect ? currentRect.left - (previousRect.left + previousRect.width) : nextRect.left - (currentRect.left + currentRect.width);\n }\n\n return nextRect ? nextRect.left - (currentRect.left + currentRect.width) : currentRect.left - (previousRect.left + previousRect.width);\n}\n\nconst rectSortingStrategy = _ref => {\n let {\n rects,\n activeIndex,\n overIndex,\n index\n } = _ref;\n const newRects = arrayMove(rects, overIndex, activeIndex);\n const oldRect = rects[index];\n const newRect = newRects[index];\n\n if (!newRect || !oldRect) {\n return null;\n }\n\n return {\n x: newRect.left - oldRect.left,\n y: newRect.top - oldRect.top,\n scaleX: newRect.width / oldRect.width,\n scaleY: newRect.height / oldRect.height\n };\n};\n\nconst rectSwappingStrategy = _ref => {\n let {\n activeIndex,\n index,\n rects,\n overIndex\n } = _ref;\n let oldRect;\n let newRect;\n\n if (index === activeIndex) {\n oldRect = rects[index];\n newRect = rects[overIndex];\n }\n\n if (index === overIndex) {\n oldRect = rects[index];\n newRect = rects[activeIndex];\n }\n\n if (!newRect || !oldRect) {\n return null;\n }\n\n return {\n x: newRect.left - oldRect.left,\n y: newRect.top - oldRect.top,\n scaleX: newRect.width / oldRect.width,\n scaleY: newRect.height / oldRect.height\n };\n};\n\n// To-do: We should be calculating scale transformation\nconst defaultScale$1 = {\n scaleX: 1,\n scaleY: 1\n};\nconst verticalListSortingStrategy = _ref => {\n var _rects$activeIndex;\n\n let {\n activeIndex,\n activeNodeRect: fallbackActiveRect,\n index,\n rects,\n overIndex\n } = _ref;\n const activeNodeRect = (_rects$activeIndex = rects[activeIndex]) != null ? _rects$activeIndex : fallbackActiveRect;\n\n if (!activeNodeRect) {\n return null;\n }\n\n if (index === activeIndex) {\n const overIndexRect = rects[overIndex];\n\n if (!overIndexRect) {\n return null;\n }\n\n return {\n x: 0,\n y: activeIndex < overIndex ? overIndexRect.top + overIndexRect.height - (activeNodeRect.top + activeNodeRect.height) : overIndexRect.top - activeNodeRect.top,\n ...defaultScale$1\n };\n }\n\n const itemGap = getItemGap$1(rects, index, activeIndex);\n\n if (index > activeIndex && index <= overIndex) {\n return {\n x: 0,\n y: -activeNodeRect.height - itemGap,\n ...defaultScale$1\n };\n }\n\n if (index < activeIndex && index >= overIndex) {\n return {\n x: 0,\n y: activeNodeRect.height + itemGap,\n ...defaultScale$1\n };\n }\n\n return {\n x: 0,\n y: 0,\n ...defaultScale$1\n };\n};\n\nfunction getItemGap$1(clientRects, index, activeIndex) {\n const currentRect = clientRects[index];\n const previousRect = clientRects[index - 1];\n const nextRect = clientRects[index + 1];\n\n if (!currentRect) {\n return 0;\n }\n\n if (activeIndex < index) {\n return previousRect ? currentRect.top - (previousRect.top + previousRect.height) : nextRect ? nextRect.top - (currentRect.top + currentRect.height) : 0;\n }\n\n return nextRect ? nextRect.top - (currentRect.top + currentRect.height) : previousRect ? currentRect.top - (previousRect.top + previousRect.height) : 0;\n}\n\nconst ID_PREFIX = 'Sortable';\nconst Context = /*#__PURE__*/React.createContext({\n activeIndex: -1,\n containerId: ID_PREFIX,\n disableTransforms: false,\n items: [],\n overIndex: -1,\n useDragOverlay: false,\n sortedRects: [],\n strategy: rectSortingStrategy,\n disabled: {\n draggable: false,\n droppable: false\n }\n});\nfunction SortableContext(_ref) {\n let {\n children,\n id,\n items: userDefinedItems,\n strategy = rectSortingStrategy,\n disabled: disabledProp = false\n } = _ref;\n const {\n active,\n dragOverlay,\n droppableRects,\n over,\n measureDroppableContainers\n } = useDndContext();\n const containerId = useUniqueId(ID_PREFIX, id);\n const useDragOverlay = Boolean(dragOverlay.rect !== null);\n const items = useMemo(() => userDefinedItems.map(item => typeof item === 'object' && 'id' in item ? item.id : item), [userDefinedItems]);\n const isDragging = active != null;\n const activeIndex = active ? items.indexOf(active.id) : -1;\n const overIndex = over ? items.indexOf(over.id) : -1;\n const previousItemsRef = useRef(items);\n const itemsHaveChanged = !itemsEqual(items, previousItemsRef.current);\n const disableTransforms = overIndex !== -1 && activeIndex === -1 || itemsHaveChanged;\n const disabled = normalizeDisabled(disabledProp);\n useIsomorphicLayoutEffect(() => {\n if (itemsHaveChanged && isDragging) {\n measureDroppableContainers(items);\n }\n }, [itemsHaveChanged, items, isDragging, measureDroppableContainers]);\n useEffect(() => {\n previousItemsRef.current = items;\n }, [items]);\n const contextValue = useMemo(() => ({\n activeIndex,\n containerId,\n disabled,\n disableTransforms,\n items,\n overIndex,\n useDragOverlay,\n sortedRects: getSortedRects(items, droppableRects),\n strategy\n }), // eslint-disable-next-line react-hooks/exhaustive-deps\n [activeIndex, containerId, disabled.draggable, disabled.droppable, disableTransforms, items, overIndex, droppableRects, useDragOverlay, strategy]);\n return React.createElement(Context.Provider, {\n value: contextValue\n }, children);\n}\n\nconst defaultNewIndexGetter = _ref => {\n let {\n id,\n items,\n activeIndex,\n overIndex\n } = _ref;\n return arrayMove(items, activeIndex, overIndex).indexOf(id);\n};\nconst defaultAnimateLayoutChanges = _ref2 => {\n let {\n containerId,\n isSorting,\n wasDragging,\n index,\n items,\n newIndex,\n previousItems,\n previousContainerId,\n transition\n } = _ref2;\n\n if (!transition || !wasDragging) {\n return false;\n }\n\n if (previousItems !== items && index === newIndex) {\n return false;\n }\n\n if (isSorting) {\n return true;\n }\n\n return newIndex !== index && containerId === previousContainerId;\n};\nconst defaultTransition = {\n duration: 200,\n easing: 'ease'\n};\nconst transitionProperty = 'transform';\nconst disabledTransition = /*#__PURE__*/CSS.Transition.toString({\n property: transitionProperty,\n duration: 0,\n easing: 'linear'\n});\nconst defaultAttributes = {\n roleDescription: 'sortable'\n};\n\n/*\r\n * When the index of an item changes while sorting,\r\n * we need to temporarily disable the transforms\r\n */\n\nfunction useDerivedTransform(_ref) {\n let {\n disabled,\n index,\n node,\n rect\n } = _ref;\n const [derivedTransform, setDerivedtransform] = useState(null);\n const previousIndex = useRef(index);\n useIsomorphicLayoutEffect(() => {\n if (!disabled && index !== previousIndex.current && node.current) {\n const initial = rect.current;\n\n if (initial) {\n const current = getClientRect(node.current, {\n ignoreTransform: true\n });\n const delta = {\n x: initial.left - current.left,\n y: initial.top - current.top,\n scaleX: initial.width / current.width,\n scaleY: initial.height / current.height\n };\n\n if (delta.x || delta.y) {\n setDerivedtransform(delta);\n }\n }\n }\n\n if (index !== previousIndex.current) {\n previousIndex.current = index;\n }\n }, [disabled, index, node, rect]);\n useEffect(() => {\n if (derivedTransform) {\n setDerivedtransform(null);\n }\n }, [derivedTransform]);\n return derivedTransform;\n}\n\nfunction useSortable(_ref) {\n let {\n animateLayoutChanges = defaultAnimateLayoutChanges,\n attributes: userDefinedAttributes,\n disabled: localDisabled,\n data: customData,\n getNewIndex = defaultNewIndexGetter,\n id,\n strategy: localStrategy,\n resizeObserverConfig,\n transition = defaultTransition\n } = _ref;\n const {\n items,\n containerId,\n activeIndex,\n disabled: globalDisabled,\n disableTransforms,\n sortedRects,\n overIndex,\n useDragOverlay,\n strategy: globalStrategy\n } = useContext(Context);\n const disabled = normalizeLocalDisabled(localDisabled, globalDisabled);\n const index = items.indexOf(id);\n const data = useMemo(() => ({\n sortable: {\n containerId,\n index,\n items\n },\n ...customData\n }), [containerId, customData, index, items]);\n const itemsAfterCurrentSortable = useMemo(() => items.slice(items.indexOf(id)), [items, id]);\n const {\n rect,\n node,\n isOver,\n setNodeRef: setDroppableNodeRef\n } = useDroppable({\n id,\n data,\n disabled: disabled.droppable,\n resizeObserverConfig: {\n updateMeasurementsFor: itemsAfterCurrentSortable,\n ...resizeObserverConfig\n }\n });\n const {\n active,\n activatorEvent,\n activeNodeRect,\n attributes,\n setNodeRef: setDraggableNodeRef,\n listeners,\n isDragging,\n over,\n setActivatorNodeRef,\n transform\n } = useDraggable({\n id,\n data,\n attributes: { ...defaultAttributes,\n ...userDefinedAttributes\n },\n disabled: disabled.draggable\n });\n const setNodeRef = useCombinedRefs(setDroppableNodeRef, setDraggableNodeRef);\n const isSorting = Boolean(active);\n const displaceItem = isSorting && !disableTransforms && isValidIndex(activeIndex) && isValidIndex(overIndex);\n const shouldDisplaceDragSource = !useDragOverlay && isDragging;\n const dragSourceDisplacement = shouldDisplaceDragSource && displaceItem ? transform : null;\n const strategy = localStrategy != null ? localStrategy : globalStrategy;\n const finalTransform = displaceItem ? dragSourceDisplacement != null ? dragSourceDisplacement : strategy({\n rects: sortedRects,\n activeNodeRect,\n activeIndex,\n overIndex,\n index\n }) : null;\n const newIndex = isValidIndex(activeIndex) && isValidIndex(overIndex) ? getNewIndex({\n id,\n items,\n activeIndex,\n overIndex\n }) : index;\n const activeId = active == null ? void 0 : active.id;\n const previous = useRef({\n activeId,\n items,\n newIndex,\n containerId\n });\n const itemsHaveChanged = items !== previous.current.items;\n const shouldAnimateLayoutChanges = animateLayoutChanges({\n active,\n containerId,\n isDragging,\n isSorting,\n id,\n index,\n items,\n newIndex: previous.current.newIndex,\n previousItems: previous.current.items,\n previousContainerId: previous.current.containerId,\n transition,\n wasDragging: previous.current.activeId != null\n });\n const derivedTransform = useDerivedTransform({\n disabled: !shouldAnimateLayoutChanges,\n index,\n node,\n rect\n });\n useEffect(() => {\n if (isSorting && previous.current.newIndex !== newIndex) {\n previous.current.newIndex = newIndex;\n }\n\n if (containerId !== previous.current.containerId) {\n previous.current.containerId = containerId;\n }\n\n if (items !== previous.current.items) {\n previous.current.items = items;\n }\n }, [isSorting, newIndex, containerId, items]);\n useEffect(() => {\n if (activeId === previous.current.activeId) {\n return;\n }\n\n if (activeId && !previous.current.activeId) {\n previous.current.activeId = activeId;\n return;\n }\n\n const timeoutId = setTimeout(() => {\n previous.current.activeId = activeId;\n }, 50);\n return () => clearTimeout(timeoutId);\n }, [activeId]);\n return {\n active,\n activeIndex,\n attributes,\n data,\n rect,\n index,\n newIndex,\n items,\n isOver,\n isSorting,\n isDragging,\n listeners,\n node,\n overIndex,\n over,\n setNodeRef,\n setActivatorNodeRef,\n setDroppableNodeRef,\n setDraggableNodeRef,\n transform: derivedTransform != null ? derivedTransform : finalTransform,\n transition: getTransition()\n };\n\n function getTransition() {\n if ( // Temporarily disable transitions for a single frame to set up derived transforms\n derivedTransform || // Or to prevent items jumping to back to their \"new\" position when items change\n itemsHaveChanged && previous.current.newIndex === index) {\n return disabledTransition;\n }\n\n if (shouldDisplaceDragSource && !isKeyboardEvent(activatorEvent) || !transition) {\n return undefined;\n }\n\n if (isSorting || shouldAnimateLayoutChanges) {\n return CSS.Transition.toString({ ...transition,\n property: transitionProperty\n });\n }\n\n return undefined;\n }\n}\n\nfunction normalizeLocalDisabled(localDisabled, globalDisabled) {\n var _localDisabled$dragga, _localDisabled$droppa;\n\n if (typeof localDisabled === 'boolean') {\n return {\n draggable: localDisabled,\n // Backwards compatibility\n droppable: false\n };\n }\n\n return {\n draggable: (_localDisabled$dragga = localDisabled == null ? void 0 : localDisabled.draggable) != null ? _localDisabled$dragga : globalDisabled.draggable,\n droppable: (_localDisabled$droppa = localDisabled == null ? void 0 : localDisabled.droppable) != null ? _localDisabled$droppa : globalDisabled.droppable\n };\n}\n\nfunction hasSortableData(entry) {\n if (!entry) {\n return false;\n }\n\n const data = entry.data.current;\n\n if (data && 'sortable' in data && typeof data.sortable === 'object' && 'containerId' in data.sortable && 'items' in data.sortable && 'index' in data.sortable) {\n return true;\n }\n\n return false;\n}\n\nconst directions = [KeyboardCode.Down, KeyboardCode.Right, KeyboardCode.Up, KeyboardCode.Left];\nconst sortableKeyboardCoordinates = (event, _ref) => {\n let {\n context: {\n active,\n collisionRect,\n droppableRects,\n droppableContainers,\n over,\n scrollableAncestors\n }\n } = _ref;\n\n if (directions.includes(event.code)) {\n event.preventDefault();\n\n if (!active || !collisionRect) {\n return;\n }\n\n const filteredContainers = [];\n droppableContainers.getEnabled().forEach(entry => {\n if (!entry || entry != null && entry.disabled) {\n return;\n }\n\n const rect = droppableRects.get(entry.id);\n\n if (!rect) {\n return;\n }\n\n switch (event.code) {\n case KeyboardCode.Down:\n if (collisionRect.top < rect.top) {\n filteredContainers.push(entry);\n }\n\n break;\n\n case KeyboardCode.Up:\n if (collisionRect.top > rect.top) {\n filteredContainers.push(entry);\n }\n\n break;\n\n case KeyboardCode.Left:\n if (collisionRect.left > rect.left) {\n filteredContainers.push(entry);\n }\n\n break;\n\n case KeyboardCode.Right:\n if (collisionRect.left < rect.left) {\n filteredContainers.push(entry);\n }\n\n break;\n }\n });\n const collisions = closestCorners({\n active,\n collisionRect: collisionRect,\n droppableRects,\n droppableContainers: filteredContainers,\n pointerCoordinates: null\n });\n let closestId = getFirstCollision(collisions, 'id');\n\n if (closestId === (over == null ? void 0 : over.id) && collisions.length > 1) {\n closestId = collisions[1].id;\n }\n\n if (closestId != null) {\n const activeDroppable = droppableContainers.get(active.id);\n const newDroppable = droppableContainers.get(closestId);\n const newRect = newDroppable ? droppableRects.get(newDroppable.id) : null;\n const newNode = newDroppable == null ? void 0 : newDroppable.node.current;\n\n if (newNode && newRect && activeDroppable && newDroppable) {\n const newScrollAncestors = getScrollableAncestors(newNode);\n const hasDifferentScrollAncestors = newScrollAncestors.some((element, index) => scrollableAncestors[index] !== element);\n const hasSameContainer = isSameContainer(activeDroppable, newDroppable);\n const isAfterActive = isAfter(activeDroppable, newDroppable);\n const offset = hasDifferentScrollAncestors || !hasSameContainer ? {\n x: 0,\n y: 0\n } : {\n x: isAfterActive ? collisionRect.width - newRect.width : 0,\n y: isAfterActive ? collisionRect.height - newRect.height : 0\n };\n const rectCoordinates = {\n x: newRect.left,\n y: newRect.top\n };\n const newCoordinates = offset.x && offset.y ? rectCoordinates : subtract(rectCoordinates, offset);\n return newCoordinates;\n }\n }\n }\n\n return undefined;\n};\n\nfunction isSameContainer(a, b) {\n if (!hasSortableData(a) || !hasSortableData(b)) {\n return false;\n }\n\n return a.data.current.sortable.containerId === b.data.current.sortable.containerId;\n}\n\nfunction isAfter(a, b) {\n if (!hasSortableData(a) || !hasSortableData(b)) {\n return false;\n }\n\n if (!isSameContainer(a, b)) {\n return false;\n }\n\n return a.data.current.sortable.index < b.data.current.sortable.index;\n}\n\nexport { SortableContext, arrayMove, arraySwap, defaultAnimateLayoutChanges, defaultNewIndexGetter, hasSortableData, horizontalListSortingStrategy, rectSortingStrategy, rectSwappingStrategy, sortableKeyboardCoordinates, useSortable, verticalListSortingStrategy };\n//# sourceMappingURL=sortable.esm.js.map\n","import React, { useMemo } from 'react';\nimport type { CSSProperties, PropsWithChildren } from 'react';\nimport { useSortable } from '@dnd-kit/sortable';\nimport { CSS } from '@dnd-kit/utilities';\nimport { SortableItemContext } from './sortableItem.context';\nimport { UniqueIdentifier } from '@dnd-kit/core';\n\nexport interface SortableItemProps {\n id: UniqueIdentifier;\n style?: CSSProperties;\n onRemove?(id: UniqueIdentifier): void;\n}\n\nexport const SortableItem = ({\n children,\n id,\n style: userStyle,\n onRemove,\n}: PropsWithChildren<SortableItemProps>): JSX.Element => {\n const { attributes, isDragging, listeners, setNodeRef, setActivatorNodeRef, transform, transition } = useSortable({\n id,\n });\n const context = useMemo(\n () => ({\n attributes,\n listeners,\n ref: setActivatorNodeRef,\n }),\n [attributes, listeners, setActivatorNodeRef],\n );\n const style: CSSProperties = {\n opacity: isDragging ? 0.4 : undefined,\n transform: CSS.Translate.toString(transform),\n transition,\n listStyle: 'none',\n ...userStyle,\n };\n\n return (\n <SortableItemContext.Provider value={context}>\n <li className=\"SortableItem\" ref={setNodeRef} style={style}>\n {children}\n </li>\n </SortableItemContext.Provider>\n );\n};\n"],"names":["arrayMove","array","from","to","newArray","slice","splice","length","getSortedRects","items","rects","reduce","accumulator","id","index","rect","get","Array","isValidIndex","rectSortingStrategy","_ref","activeIndex","overIndex","newRects","oldRect","newRect","x","left","y","top","scaleX","width","scaleY","height","Context","React","createContext","containerId","disableTransforms","useDragOverlay","sortedRects","strategy","disabled","draggable","droppable","defaultNewIndexGetter","indexOf","defaultAnimateLayoutChanges","_ref2","isSorting","wasDragging","newIndex","previousItems","previousContainerId","transition","defaultTransition","duration","easing","disabledTransition","CSS","Transition","toString","property","defaultAttributes","roleDescription","useSortable","animateLayoutChanges","attributes","userDefinedAttributes","localDisabled","data","customData","getNewIndex","localStrategy","resizeObserverConfig","globalDisabled","globalStrategy","useContext","_localDisabled$dragga","_localDisabled$droppa","normalizeLocalDisabled","useMemo","sortable","itemsAfterCurrentSortable","node","isOver","setNodeRef","setDroppableNodeRef","useDroppable","updateMeasurementsFor","active","activatorEvent","activeNodeRect","setDraggableNodeRef","listeners","isDragging","over","setActivatorNodeRef","transform","useDraggable","useCombinedRefs","Boolean","displaceItem","shouldDisplaceDragSource","dragSourceDisplacement","finalTransform","activeId","previous","useRef","itemsHaveChanged","current","shouldAnimateLayoutChanges","derivedTransform","setDerivedtransform","useState","previousIndex","useIsomorphicLayoutEffect","initial","getClientRect","ignoreTransform","delta","useEffect","useDerivedTransform","timeoutId","setTimeout","clearTimeout","isKeyboardEvent","getTransition","hasSortableData","entry","directions","KeyboardCode","Down","Right","Up","Left","isSameContainer","a","b","children","userDefinedItems","disabledProp","dragOverlay","droppableRects","measureDroppableContainers","useDndContext","useUniqueId","map","item","previousItemsRef","i","itemsEqual","normalizeDisabled","contextValue","createElement","Provider","value","_a","userStyle","style","onRemove","_b","context","ref","__assign","opacity","undefined","Translate","listStyle","SortableItemContext","className","event","collisionRect","droppableContainers","scrollableAncestors","includes","code","preventDefault","filteredContainers","getEnabled","forEach","push","collisions","closestCorners","pointerCoordinates","closestId","getFirstCollision","activeDroppable","newDroppable","newNode","hasDifferentScrollAncestors","getScrollableAncestors","some","element","hasSameContainer","isAfterActive","isAfter","offset","rectCoordinates","subtract"],"mappings":"gPAOA,SAASA,EAAUC,EAAOC,EAAMC,GAC9B,MAAMC,EAAWH,EAAMI,QAEvB,OADAD,EAASE,OAAOH,EAAK,EAAIC,EAASG,OAASJ,EAAKA,EAAI,EAAGC,EAASE,OAAOJ,EAAM,GAAG,IACzEE,EAaT,SAASI,EAAeC,EAAOC,GAC7B,OAAOD,EAAME,QAAO,CAACC,EAAaC,EAAIC,KACpC,MAAMC,EAAOL,EAAMM,IAAIH,GAMvB,OAJIE,IACFH,EAAYE,GAASC,GAGhBH,I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