@televet/kibble-ui 1.20.3 → 1.20.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/{alert.component-27a1f5d4.js → alert.component-3b59341a.js} +2 -2
- package/build/{alert.component-27a1f5d4.js.map → alert.component-3b59341a.js.map} +1 -1
- package/build/alert.types-4daf4eee.js.map +1 -1
- package/build/avatar.component-5d66139f.js +2 -0
- package/build/{avatar.component-15867f35.js.map → avatar.component-5d66139f.js.map} +1 -1
- package/build/{avatar.config-f2ca8baa.js → avatar.config-90fae63d.js} +2 -2
- package/build/{avatar.config-f2ca8baa.js.map → avatar.config-90fae63d.js.map} +1 -1
- package/build/avatarGroup.component-b7003171.js +2 -0
- package/build/{avatarGroup.component-ab7b40b1.js.map → avatarGroup.component-b7003171.js.map} +1 -1
- package/build/button.component-c0f12ef5.js +2 -0
- package/build/{button.component-7994e6aa.js.map → button.component-c0f12ef5.js.map} +1 -1
- package/build/chakra/index.js +1 -1
- package/build/{chakra-ui-alert.esm-0751f858.js → chakra-ui-alert.esm-9bb76feb.js} +2 -2
- package/build/{chakra-ui-alert.esm-0751f858.js.map → chakra-ui-alert.esm-9bb76feb.js.map} +1 -1
- package/build/{chakra-ui-avatar.esm-59c90a73.js → chakra-ui-avatar.esm-dcac0160.js} +2 -2
- package/build/{chakra-ui-avatar.esm-59c90a73.js.map → chakra-ui-avatar.esm-dcac0160.js.map} +1 -1
- package/build/{chakra-ui-button.esm-35454bb1.js → chakra-ui-button.esm-29841617.js} +2 -2
- package/build/{chakra-ui-button.esm-35454bb1.js.map → chakra-ui-button.esm-29841617.js.map} +1 -1
- package/build/{chakra-ui-checkbox.esm-cdd9b730.js → chakra-ui-checkbox.esm-551d7ed3.js} +2 -2
- package/build/{chakra-ui-checkbox.esm-cdd9b730.js.map → chakra-ui-checkbox.esm-551d7ed3.js.map} +1 -1
- package/build/chakra-ui-clickable.esm-22135054.js +2 -0
- package/build/{chakra-ui-clickable.esm-b1a74f32.js.map → chakra-ui-clickable.esm-22135054.js.map} +1 -1
- package/build/{chakra-ui-form-control.esm-0cef8b57.js → chakra-ui-form-control.esm-e9095eac.js} +2 -2
- package/build/{chakra-ui-form-control.esm-0cef8b57.js.map → chakra-ui-form-control.esm-e9095eac.js.map} +1 -1
- package/build/chakra-ui-hooks.esm-c49383b7.js +2 -0
- package/build/{chakra-ui-hooks.esm-567ac2a0.js.map → chakra-ui-hooks.esm-c49383b7.js.map} +1 -1
- package/build/{chakra-ui-icon.esm-ce4e59f0.js → chakra-ui-icon.esm-30b0b8a9.js} +2 -2
- package/build/{chakra-ui-icon.esm-ce4e59f0.js.map → chakra-ui-icon.esm-30b0b8a9.js.map} +1 -1
- package/build/{chakra-ui-input.esm-ed97ec15.js → chakra-ui-input.esm-40a574c3.js} +2 -2
- package/build/{chakra-ui-input.esm-ed97ec15.js.map → chakra-ui-input.esm-40a574c3.js.map} +1 -1
- package/build/{chakra-ui-layout.esm-339b049e.js → chakra-ui-layout.esm-493ee04b.js} +2 -2
- package/build/{chakra-ui-layout.esm-339b049e.js.map → chakra-ui-layout.esm-493ee04b.js.map} +1 -1
- package/build/{chakra-ui-media-query.esm-d61e2d30.js → chakra-ui-media-query.esm-a34e627c.js} +2 -2
- package/build/{chakra-ui-media-query.esm-d61e2d30.js.map → chakra-ui-media-query.esm-a34e627c.js.map} +1 -1
- package/build/{chakra-ui-menu.esm-e0987e59.js → chakra-ui-menu.esm-75503743.js} +2 -2
- package/build/{chakra-ui-menu.esm-e0987e59.js.map → chakra-ui-menu.esm-75503743.js.map} +1 -1
- package/build/chakra-ui-modal.esm-f93732cd.js +16 -0
- package/build/chakra-ui-modal.esm-f93732cd.js.map +1 -0
- package/build/{chakra-ui-popover.esm-7715e41a.js → chakra-ui-popover.esm-8a057795.js} +2 -2
- package/build/{chakra-ui-popover.esm-7715e41a.js.map → chakra-ui-popover.esm-8a057795.js.map} +1 -1
- package/build/chakra-ui-popper.esm-78790840.js +2 -0
- package/build/chakra-ui-popper.esm-78790840.js.map +1 -0
- package/build/chakra-ui-portal.esm-e1dcde00.js +2 -0
- package/build/{chakra-ui-portal.esm-1b79ea40.js.map → chakra-ui-portal.esm-e1dcde00.js.map} +1 -1
- package/build/{chakra-ui-radio.esm-0b46b96d.js → chakra-ui-radio.esm-ef11b348.js} +2 -2
- package/build/{chakra-ui-radio.esm-0b46b96d.js.map → chakra-ui-radio.esm-ef11b348.js.map} +1 -1
- package/build/{chakra-ui-react.esm-9b647528.js → chakra-ui-react.esm-e146fda7.js} +2 -2
- package/build/{chakra-ui-react.esm-9b647528.js.map → chakra-ui-react.esm-e146fda7.js.map} +1 -1
- package/build/{chakra-ui-select.esm-25158f05.js → chakra-ui-select.esm-c4102293.js} +2 -2
- package/build/{chakra-ui-select.esm-25158f05.js.map → chakra-ui-select.esm-c4102293.js.map} +1 -1
- package/build/chakra-ui-skeleton.esm-3c25e0bd.js +2 -0
- package/build/{chakra-ui-skeleton.esm-93e51908.js.map → chakra-ui-skeleton.esm-3c25e0bd.js.map} +1 -1
- package/build/chakra-ui-system.esm-b563b97d.js +10 -0
- package/build/chakra-ui-system.esm-b563b97d.js.map +1 -0
- package/build/{chakra-ui-tabs.esm-ef9caadc.js → chakra-ui-tabs.esm-45ecf74e.js} +2 -2
- package/build/{chakra-ui-tabs.esm-ef9caadc.js.map → chakra-ui-tabs.esm-45ecf74e.js.map} +1 -1
- package/build/{chakra-ui-textarea.esm-be1a9598.js → chakra-ui-textarea.esm-965918fa.js} +2 -2
- package/build/{chakra-ui-textarea.esm-be1a9598.js.map → chakra-ui-textarea.esm-965918fa.js.map} +1 -1
- package/build/chakra-ui-theme.esm-cc694e08.js +2 -0
- package/build/chakra-ui-theme.esm-cc694e08.js.map +1 -0
- package/build/{chakra-ui-visually-hidden.esm-127ebfba.js → chakra-ui-visually-hidden.esm-3406a7fd.js} +2 -2
- package/build/{chakra-ui-visually-hidden.esm-127ebfba.js.map → chakra-ui-visually-hidden.esm-3406a7fd.js.map} +1 -1
- package/build/{checkbox.component-13b96bed.js → checkbox.component-a5e17522.js} +2 -2
- package/build/{checkbox.component-13b96bed.js.map → checkbox.component-a5e17522.js.map} +1 -1
- package/build/checkboxGroup.component-dc143ba5.js +2 -0
- package/build/{checkboxGroup.component-d786905a.js.map → checkboxGroup.component-dc143ba5.js.map} +1 -1
- package/build/{color.record-43268868.js → color.record-8ec2eb8a.js} +2 -2
- package/build/{color.record-43268868.js.map → color.record-8ec2eb8a.js.map} +1 -1
- package/build/components/Alert/alert.types.d.ts +2 -2
- package/build/components/Alert/index.js +1 -1
- package/build/components/Avatar/avatar.types.d.ts +1 -1
- package/build/components/Avatar/index.js +1 -1
- package/build/components/AvatarGroup/index.js +1 -1
- package/build/components/Button/button.types.d.ts +5 -5
- package/build/components/Button/index.js +1 -1
- package/build/components/Checkbox/checkbox.types.d.ts +2 -2
- package/build/components/Checkbox/index.js +1 -1
- package/build/components/CheckboxGroup/index.js +1 -1
- package/build/components/DatePicker/index.js +1 -1
- package/build/components/FormControl/formControl.types.d.ts +2 -2
- package/build/components/Heading/heading.types.d.ts +3 -3
- package/build/components/Heading/index.js +1 -1
- package/build/components/Icon/icon.types.d.ts +4 -4
- package/build/components/Icon/index.js +1 -1
- package/build/components/Link/index.js +1 -1
- package/build/components/Link/link.config.d.ts +2 -2
- package/build/components/Logo/index.js +1 -1
- package/build/components/Logo/logo.types.d.ts +2 -2
- package/build/components/Menu/components/MenuButton/index.js +1 -1
- package/build/components/Menu/components/MenuContainer/index.js +1 -1
- package/build/components/Menu/components/MenuItem/index.js +1 -1
- package/build/components/Menu/components/MenuList/index.js +1 -1
- package/build/components/Menu/components/MenuOptionGroup/index.js +1 -1
- package/build/components/Menu/index.js +1 -1
- package/build/components/Modal/components/ModalBody/index.js +1 -1
- package/build/components/Modal/components/ModalCloseButton/index.js +1 -1
- package/build/components/Modal/components/ModalFooter/index.js +1 -1
- package/build/components/Modal/components/ModalFooterButtons/index.js +1 -1
- package/build/components/Modal/components/ModalHeader/index.js +1 -1
- package/build/components/Modal/index.js +1 -1
- package/build/components/Modal/modal.component.d.ts +1 -1
- package/build/components/Modal/modal.types.d.ts +1 -1
- package/build/components/NotificationCounter/index.js +1 -1
- package/build/components/NotificationCounter/notificationCounter.types.d.ts +1 -1
- package/build/components/Popover/components/PopoverBody/index.js +1 -1
- package/build/components/Popover/components/PopoverCloseButton/index.js +1 -1
- package/build/components/Popover/components/PopoverFooter/index.js +1 -1
- package/build/components/Popover/components/PopoverFooterButtons/index.js +1 -1
- package/build/components/Popover/components/PopoverHeader/index.js +1 -1
- package/build/components/Popover/index.js +1 -1
- package/build/components/Popover/popover.types.d.ts +2 -2
- package/build/components/Radio/index.js +1 -1
- package/build/components/Radio/radio.types.d.ts +1 -1
- package/build/components/RadioGroup/index.js +1 -1
- package/build/components/RatingDots/components/RatingDot/index.js +1 -1
- package/build/components/RatingDots/index.js +1 -1
- package/build/components/Select/index.js +1 -1
- package/build/components/Select/select.component.d.ts +1 -1
- package/build/components/SortableList/components/DragHandle/index.js +1 -1
- package/build/components/SortableList/components/SortableItem/index.js +1 -1
- package/build/components/SortableList/index.js +1 -1
- package/build/components/SortableList/utilities/index.js +1 -1
- package/build/components/SortableList/utilities/index.js.map +1 -1
- package/build/components/Spinner/index.js +1 -1
- package/build/components/Spinner/spinner.types.d.ts +1 -1
- package/build/components/Switch/index.js +1 -1
- package/build/components/Tabs/components/Tab/index.js +1 -1
- package/build/components/Tabs/components/Tab/tab.types.d.ts +1 -1
- package/build/components/Tabs/index.js +1 -1
- package/build/components/TabsLayout/index.js +1 -1
- package/build/components/Tag/index.js +1 -1
- package/build/components/Tag/tag.types.d.ts +1 -1
- package/build/components/Text/index.js +1 -1
- package/build/components/Text/text.types.d.ts +3 -3
- package/build/components/TextInput/index.js +1 -1
- package/build/components/TextInput/textInput.component.d.ts +2 -2
- package/build/components/Textarea/index.js +1 -1
- package/build/components/Textarea/textarea.types.d.ts +2 -2
- package/build/components/TimePicker/index.js +1 -1
- package/build/components/TimeRange/index.js +1 -1
- package/build/components/Toast/index.js +1 -1
- package/build/components/Toast/toast.types.d.ts +5 -5
- package/build/components/Toast/useToast.d.ts +1 -1
- package/build/components/Tooltip/index.js +1 -1
- package/build/components/TruncatedText/index.js +1 -1
- package/build/components/index.js +1 -1
- package/build/core.esm-3a85aed4.js +1 -1
- package/build/core.esm-3a85aed4.js.map +1 -1
- package/build/datepicker.types-4447ea43.js +16 -0
- package/build/{datepicker.types-91c238b7.js.map → datepicker.types-4447ea43.js.map} +1 -1
- package/build/dragHandle.component-a0ed1bf0.js +2 -0
- package/build/{dragHandle.component-3d2042c6.js.map → dragHandle.component-a0ed1bf0.js.map} +1 -1
- package/build/{formControl.component-13591c3d.js → formControl.component-6ce1e8a6.js} +2 -2
- package/build/{formControl.component-13591c3d.js.map → formControl.component-6ce1e8a6.js.map} +1 -1
- package/build/heading.component-46024b9d.js +2 -0
- package/build/{heading.component-7d595aec.js.map → heading.component-46024b9d.js.map} +1 -1
- package/build/hocs/index.js +1 -1
- package/build/hooks/index.js +1 -1
- package/build/hooks/useAdaptiveColorMap.d.ts +1 -1
- package/build/{icon.component-e549a530.js → icon.component-3b012e4e.js} +2 -2
- package/build/{icon.component-e549a530.js.map → icon.component-3b012e4e.js.map} +1 -1
- package/build/{index-bef968d3.js → index-5c563615.js} +2 -2
- package/build/{index-bef968d3.js.map → index-5c563615.js.map} +1 -1
- package/build/index-8fecff45.js +3 -3
- package/build/index-8fecff45.js.map +1 -1
- package/build/index-fee8538e.js +2 -0
- package/build/index-fee8538e.js.map +1 -0
- package/build/index.js +1 -1
- package/build/inheritsLoose-490721fe.js.map +1 -1
- package/build/link.component-c861b93f.js +2 -0
- package/build/{link.component-aa529030.js.map → link.component-c861b93f.js.map} +1 -1
- package/build/logo.component-3fbae314.js +2 -0
- package/build/{logo.component-f41ae943.js.map → logo.component-3fbae314.js.map} +1 -1
- package/build/{menu.component-de420007.js → menu.component-261b3e9e.js} +2 -2
- package/build/{menu.component-de420007.js.map → menu.component-261b3e9e.js.map} +1 -1
- package/build/{menu.config-b32ff2af.js → menu.config-83ef52b8.js} +2 -2
- package/build/{menu.config-b32ff2af.js.map → menu.config-83ef52b8.js.map} +1 -1
- package/build/{menu.context-19ac1c6e.js → menu.context-6276be4d.js} +2 -2
- package/build/{menu.context-19ac1c6e.js.map → menu.context-6276be4d.js.map} +1 -1
- package/build/{menuButton.component-ec18bac5.js → menuButton.component-dc103ade.js} +2 -2
- package/build/{menuButton.component-ec18bac5.js.map → menuButton.component-dc103ade.js.map} +1 -1
- package/build/{menuContainer.component-7f1da5e6.js → menuContainer.component-3126d468.js} +2 -2
- package/build/{menuContainer.component-7f1da5e6.js.map → menuContainer.component-3126d468.js.map} +1 -1
- package/build/{menuItem.component-759ca712.js → menuItem.component-de6a71ca.js} +2 -2
- package/build/{menuItem.component-759ca712.js.map → menuItem.component-de6a71ca.js.map} +1 -1
- package/build/menuList.component-ca4f3e6b.js +2 -0
- package/build/{menuList.component-d5d731bb.js.map → menuList.component-ca4f3e6b.js.map} +1 -1
- package/build/{menuOptionGroup.component-da4bd451.js → menuOptionGroup.component-c8ea0aff.js} +2 -2
- package/build/{menuOptionGroup.component-da4bd451.js.map → menuOptionGroup.component-c8ea0aff.js.map} +1 -1
- package/build/modal.component-9493250d.js +2 -0
- package/build/{modal.component-48f03ed3.js.map → modal.component-9493250d.js.map} +1 -1
- package/build/{modalBody.component-8a3dd614.js → modalBody.component-1926b6d1.js} +2 -2
- package/build/{modalBody.component-8a3dd614.js.map → modalBody.component-1926b6d1.js.map} +1 -1
- package/build/modalCloseButton.component-9fd3b3dd.js +2 -0
- package/build/{modalCloseButton.component-8e2170fd.js.map → modalCloseButton.component-9fd3b3dd.js.map} +1 -1
- package/build/{modalFooter.component-fc1ac7e1.js → modalFooter.component-e957013f.js} +2 -2
- package/build/{modalFooter.component-fc1ac7e1.js.map → modalFooter.component-e957013f.js.map} +1 -1
- package/build/{modalFooterButtons.component-225729fc.js → modalFooterButtons.component-1ee933ec.js} +2 -2
- package/build/{modalFooterButtons.component-225729fc.js.map → modalFooterButtons.component-1ee933ec.js.map} +1 -1
- package/build/modalHeader.component-4a44b8ac.js +2 -0
- package/build/{modalHeader.component-16afb5d0.js.map → modalHeader.component-4a44b8ac.js.map} +1 -1
- package/build/motion-1db106fa.js +2 -0
- package/build/{motion-93f46f1f.js.map → motion-1db106fa.js.map} +1 -1
- package/build/notificationCounter.component-27fafaa0.js +2 -0
- package/build/{notificationCounter.component-d4d35697.js.map → notificationCounter.component-27fafaa0.js.map} +1 -1
- package/build/popover.component-929ab810.js +2 -0
- package/build/{popover.component-a37d20d9.js.map → popover.component-929ab810.js.map} +1 -1
- package/build/popoverBody.component-53e64298.js +2 -0
- package/build/{popoverBody.component-69ec2050.js.map → popoverBody.component-53e64298.js.map} +1 -1
- package/build/popoverCloseButton.component-89388be1.js +2 -0
- package/build/{popoverCloseButton.component-6a6e6909.js.map → popoverCloseButton.component-89388be1.js.map} +1 -1
- package/build/{popoverFooter.component-7eb4ed58.js → popoverFooter.component-242363f4.js} +2 -2
- package/build/{popoverFooter.component-7eb4ed58.js.map → popoverFooter.component-242363f4.js.map} +1 -1
- package/build/popoverFooterButtons.component-53b338db.js +2 -0
- package/build/{popoverFooterButtons.component-8c24a6c6.js.map → popoverFooterButtons.component-53b338db.js.map} +1 -1
- package/build/{popoverHeader.component-ef933e40.js → popoverHeader.component-34eb1b82.js} +2 -2
- package/build/{popoverHeader.component-ef933e40.js.map → popoverHeader.component-34eb1b82.js.map} +1 -1
- package/build/radio.component-b6d50e84.js +2 -0
- package/build/{radio.component-8821f41e.js.map → radio.component-b6d50e84.js.map} +1 -1
- package/build/{radioGroup.component-b5c612d5.js → radioGroup.component-4082cbef.js} +2 -2
- package/build/{radioGroup.component-b5c612d5.js.map → radioGroup.component-4082cbef.js.map} +1 -1
- package/build/ratingDot.component-776080cf.js +2 -0
- package/build/{ratingDot.component-1cbe2bf0.js.map → ratingDot.component-776080cf.js.map} +1 -1
- package/build/ratingDots.component-1944ab02.js +2 -0
- package/build/{ratingDots.component-df4cab11.js.map → ratingDots.component-1944ab02.js.map} +1 -1
- package/build/select.component-e07985b0.js +2 -0
- package/build/{select.component-97f13ab3.js.map → select.component-e07985b0.js.map} +1 -1
- package/build/shared/argTypes/color.argTypes.d.ts +1 -1
- package/build/shared/types.d.ts +7 -7
- package/build/sortableItem.component-9aab4eb2.js +2 -0
- package/build/{sortableItem.component-d163a5ea.js.map → sortableItem.component-9aab4eb2.js.map} +1 -1
- package/build/sortableItem.context-f7dd54a1.js.map +1 -1
- package/build/{sortableList.component-bd1a6934.js → sortableList.component-8df7a374.js} +2 -2
- package/build/{sortableList.component-bd1a6934.js.map → sortableList.component-8df7a374.js.map} +1 -1
- package/build/sortableOverlay.component-7ecbda06.js.map +1 -1
- package/build/spinner.component-f49dcd1b.js +2 -0
- package/build/{spinner.component-bdb34a41.js.map → spinner.component-f49dcd1b.js.map} +1 -1
- package/build/strings-03c30366.js.map +1 -1
- package/build/{switch.component-f710b6f4.js → switch.component-14aff933.js} +2 -2
- package/build/{switch.component-f710b6f4.js.map → switch.component-14aff933.js.map} +1 -1
- package/build/tab.component-5c72533e.js +2 -0
- package/build/{tab.component-55fe94e4.js.map → tab.component-5c72533e.js.map} +1 -1
- package/build/tabs.component-9dde0129.js +2 -0
- package/build/{tabs.component-d6e227c6.js.map → tabs.component-9dde0129.js.map} +1 -1
- package/build/tabsLayout.component-67d031de.js +2 -0
- package/build/{tabsLayout.component-1fcaeacd.js.map → tabsLayout.component-67d031de.js.map} +1 -1
- package/build/{tag.component-2aeabf52.js → tag.component-c909f1bf.js} +2 -2
- package/build/{tag.component-2aeabf52.js.map → tag.component-c909f1bf.js.map} +1 -1
- package/build/text.component-74ae29fd.js +2 -0
- package/build/{text.component-aeaf39d8.js.map → text.component-74ae29fd.js.map} +1 -1
- package/build/textInput.component-51fc76e2.js +2 -0
- package/build/{textInput.component-5181d09d.js.map → textInput.component-51fc76e2.js.map} +1 -1
- package/build/textarea.component-dd1bfd72.js +2 -0
- package/build/{textarea.component-d2c46d6e.js.map → textarea.component-dd1bfd72.js.map} +1 -1
- package/build/theme/index.js +1 -1
- package/build/theme/tokens/blur.d.ts +2 -2
- package/build/theme/tokens/borders.d.ts +1 -1
- package/build/theme/tokens/colors/color.types.d.ts +6 -6
- package/build/theme/tokens/colors/index.js +1 -1
- package/build/theme/tokens/fontSizes.d.ts +1 -1
- package/build/theme/tokens/fontWeights.d.ts +2 -2
- package/build/theme/tokens/fonts.d.ts +1 -1
- package/build/theme/tokens/index.js +1 -1
- package/build/theme/tokens/letterSpacings.d.ts +1 -1
- package/build/theme/tokens/lineHeights.d.ts +1 -1
- package/build/theme/tokens/radii.d.ts +1 -1
- package/build/theme/tokens/shadows/shadows.types.d.ts +1 -1
- package/build/theme/tokens/sizes.d.ts +1 -1
- package/build/theme/tokens/space.d.ts +1 -1
- package/build/theme/tokens/transition.d.ts +1 -1
- package/build/theme/tokens/zIndeces.d.ts +1 -1
- package/build/theme.provider-f951a0ae.js +2 -0
- package/build/theme.provider-f951a0ae.js.map +1 -0
- package/build/timePicker.component-7f472e6c.js +2 -0
- package/build/{timePicker.component-cc76ba22.js.map → timePicker.component-7f472e6c.js.map} +1 -1
- package/build/{timeRange.component-3295f4bf.js → timeRange.component-24ea59a0.js} +2 -2
- package/build/{timeRange.component-3295f4bf.js.map → timeRange.component-24ea59a0.js.map} +1 -1
- package/build/{tooltip.component-4891e19b.js → tooltip.component-fb511c83.js} +2 -2
- package/build/{tooltip.component-4891e19b.js.map → tooltip.component-fb511c83.js.map} +1 -1
- package/build/{truncatedText.component-568f013e.js → truncatedText.component-d242bfa7.js} +2 -2
- package/build/{truncatedText.component-568f013e.js.map → truncatedText.component-d242bfa7.js.map} +1 -1
- package/build/tslib.es6-f01c41a6.js +16 -0
- package/build/tslib.es6-f01c41a6.js.map +1 -0
- package/build/useAdaptiveColor-bd61f863.js +2 -0
- package/build/{useAdaptiveColor-74f29681.js.map → useAdaptiveColor-bd61f863.js.map} +1 -1
- package/build/useAdaptiveColorMap-0a74494f.js +2 -0
- package/build/{useAdaptiveColorMap-83c28e16.js.map → useAdaptiveColorMap-0a74494f.js.map} +1 -1
- package/build/useIconTextSizeMap-b81a72a5.js.map +1 -1
- package/build/useTheme-d7d8c3f5.js +2 -0
- package/build/{useTheme-3dbb48a4.js.map → useTheme-d7d8c3f5.js.map} +1 -1
- package/build/useToast-2c6cbde0.js +2 -0
- package/build/{useToast-4932aa7c.js.map → useToast-2c6cbde0.js.map} +1 -1
- package/build/{withDarkMode-2a00cc1f.js → withDarkMode-3fdb3990.js} +2 -2
- package/build/{withDarkMode-2a00cc1f.js.map → withDarkMode-3fdb3990.js.map} +1 -1
- package/build/{withTheme-acb0ea42.js → withTheme-3ac839a3.js} +2 -2
- package/build/{withTheme-acb0ea42.js.map → withTheme-3ac839a3.js.map} +1 -1
- package/package.json +7 -7
- package/build/avatar.component-15867f35.js +0 -2
- package/build/avatarGroup.component-ab7b40b1.js +0 -2
- package/build/button.component-7994e6aa.js +0 -2
- package/build/chakra-ui-clickable.esm-b1a74f32.js +0 -2
- package/build/chakra-ui-hooks.esm-567ac2a0.js +0 -2
- package/build/chakra-ui-modal.esm-7aa63ee6.js +0 -16
- package/build/chakra-ui-modal.esm-7aa63ee6.js.map +0 -1
- package/build/chakra-ui-popper.esm-0f108f82.js +0 -2
- package/build/chakra-ui-popper.esm-0f108f82.js.map +0 -1
- package/build/chakra-ui-portal.esm-1b79ea40.js +0 -2
- package/build/chakra-ui-skeleton.esm-93e51908.js +0 -2
- package/build/chakra-ui-system.esm-1d513b8a.js +0 -10
- package/build/chakra-ui-system.esm-1d513b8a.js.map +0 -1
- package/build/chakra-ui-theme.esm-6392a200.js +0 -2
- package/build/chakra-ui-theme.esm-6392a200.js.map +0 -1
- package/build/checkboxGroup.component-d786905a.js +0 -2
- package/build/datepicker.types-91c238b7.js +0 -16
- package/build/dragHandle.component-3d2042c6.js +0 -2
- package/build/heading.component-7d595aec.js +0 -2
- package/build/index-27317c8c.js +0 -2
- package/build/index-27317c8c.js.map +0 -1
- package/build/link.component-aa529030.js +0 -2
- package/build/logo.component-f41ae943.js +0 -2
- package/build/menuList.component-d5d731bb.js +0 -2
- package/build/modal.component-48f03ed3.js +0 -2
- package/build/modalCloseButton.component-8e2170fd.js +0 -2
- package/build/modalHeader.component-16afb5d0.js +0 -2
- package/build/motion-93f46f1f.js +0 -2
- package/build/notificationCounter.component-d4d35697.js +0 -2
- package/build/popover.component-a37d20d9.js +0 -2
- package/build/popoverBody.component-69ec2050.js +0 -2
- package/build/popoverCloseButton.component-6a6e6909.js +0 -2
- package/build/popoverFooterButtons.component-8c24a6c6.js +0 -2
- package/build/radio.component-8821f41e.js +0 -2
- package/build/ratingDot.component-1cbe2bf0.js +0 -2
- package/build/ratingDots.component-df4cab11.js +0 -2
- package/build/select.component-97f13ab3.js +0 -2
- package/build/sortableItem.component-d163a5ea.js +0 -2
- package/build/spinner.component-bdb34a41.js +0 -2
- package/build/tab.component-55fe94e4.js +0 -2
- package/build/tabs.component-d6e227c6.js +0 -2
- package/build/tabsLayout.component-1fcaeacd.js +0 -2
- package/build/text.component-aeaf39d8.js +0 -2
- package/build/textInput.component-5181d09d.js +0 -2
- package/build/textarea.component-d2c46d6e.js +0 -2
- package/build/theme.provider-aa0c8955.js +0 -2
- package/build/theme.provider-aa0c8955.js.map +0 -1
- package/build/timePicker.component-cc76ba22.js +0 -2
- package/build/tslib.es6-8e19e91f.js +0 -2
- package/build/tslib.es6-8e19e91f.js.map +0 -1
- package/build/typeof-a861d137.js +0 -2
- package/build/typeof-a861d137.js.map +0 -1
- package/build/useAdaptiveColor-74f29681.js +0 -2
- package/build/useAdaptiveColorMap-83c28e16.js +0 -2
- package/build/useTheme-3dbb48a4.js +0 -2
- package/build/useToast-4932aa7c.js +0 -2
package/build/{sortableItem.component-d163a5ea.js.map → sortableItem.component-9aab4eb2.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sortableItem.component-d163a5ea.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":"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,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+GGC,EAAY,WACZC,EAAuBC,EAAK,QAACC,cAAc,CAC/ChB,aAAc,EACdiB,YAAaJ,EACbK,mBAAmB,EACnB9B,MAAO,GACPa,WAAY,EACZkB,gBAAgB,EAChBC,YAAa,GACbC,SAAUvB,EACVwB,SAAU,CACRC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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,IACNK,MAAMR,EAAMF,SAGjB,SAASW,EAAaJ,GACpB,OAAiB,OAAVA,GAAkBA,GAAS,EA4GpC,MAAMK,EAAsBC,IAC1B,IAAIV,MACFA,EAAKW,YACLA,EAAWC,UACXA,EAASR,MACTA,GACEM,EACJ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components/SortableList/components/SortableItem/sortableItem.context.ts"],"sourcesContent":["import { DraggableSyntheticListeners } from '@dnd-kit/core';\nimport { createContext } from 'react';\n\ninterface Context {\n attributes: Record<string, any>;\n listeners: DraggableSyntheticListeners;\n ref(node: HTMLElement | null): void;\n}\n\nexport const SortableItemContext = createContext<Context>({\n attributes: {},\n listeners: undefined,\n ref() {},\n});\n"],"names":["SortableItemContext","createContext","attributes","listeners","undefined","ref"],"mappings":"iBASaA,mBAAsBC,cAAuB,CACxDC,WAAY,
|
|
1
|
+
{"version":3,"file":"sortableItem.context-f7dd54a1.js","sources":["../src/components/SortableList/components/SortableItem/sortableItem.context.ts"],"sourcesContent":["import { DraggableSyntheticListeners } from '@dnd-kit/core';\nimport { createContext } from 'react';\n\ninterface Context {\n attributes: Record<string, any>;\n listeners: DraggableSyntheticListeners;\n ref(node: HTMLElement | null): void;\n}\n\nexport const SortableItemContext = createContext<Context>({\n attributes: {},\n listeners: undefined,\n ref() {},\n});\n"],"names":["SortableItemContext","createContext","attributes","listeners","undefined","ref"],"mappings":"iBASaA,mBAAsBC,cAAuB,CACxDC,WAAY,GACZC,eAAWC,EACXC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var e=require("./tslib.es6-
|
|
2
|
-
//# sourceMappingURL=sortableList.component-
|
|
1
|
+
"use strict";var e=require("./tslib.es6-f01c41a6.js"),n=require("react"),t=require("./core.esm-3a85aed4.js"),r=require("./sortableItem.component-9aab4eb2.js"),a=require("./sortableOverlay.component-7ecbda06.js");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=o(n);exports.SortableList=function(o){var l=o.items,u=o.onChange,d=o.renderItem,s=o.style,c=e.__read(n.useState(null),2),f=c[0],m=c[1],v=n.useMemo((function(){return l.find((function(e){return e.id===(null==f?void 0:f.id)}))}),[f,l]),b=t.useSensors(t.useSensor(t.PointerSensor),t.useSensor(t.KeyboardSensor,{coordinateGetter:r.sortableKeyboardCoordinates})),y=e.__assign({display:"flex",flexDirection:"column",padding:0,listStyle:"none"},s);return i.default.createElement(t.DndContext,{sensors:b,onDragStart:function(e){var n=e.active;m(n)},onDragEnd:function(e){var n=e.active,t=e.over;if(t&&n.id!==(null==t?void 0:t.id)){var a=l.findIndex((function(e){return e.id===n.id})),o=l.findIndex((function(e){return e.id===t.id}));u(r.arrayMove(l,a,o))}m(null)},onDragCancel:function(){return m(null)}},i.default.createElement(r.SortableContext,{items:l},i.default.createElement("ul",{style:y},l.map((function(e,n){return i.default.createElement(i.default.Fragment,{key:e.id},d(e,n))})))),i.default.createElement(a.SortableOverlay,null,v?d(v):null))};
|
|
2
|
+
//# sourceMappingURL=sortableList.component-8df7a374.js.map
|
package/build/{sortableList.component-bd1a6934.js.map → sortableList.component-8df7a374.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sortableList.component-
|
|
1
|
+
{"version":3,"file":"sortableList.component-8df7a374.js","sources":["../src/components/SortableList/sortableList.component.tsx"],"sourcesContent":["import React, { CSSProperties, useMemo, useState } from 'react';\nimport type { ReactNode } from 'react';\nimport { DndContext, KeyboardSensor, PointerSensor, useSensor, useSensors } from '@dnd-kit/core';\nimport type { Active, UniqueIdentifier } from '@dnd-kit/core';\nimport { SortableContext, arrayMove, sortableKeyboardCoordinates } from '@dnd-kit/sortable';\nimport { SortableOverlay } from './components/SortableOverlay';\n\ninterface SortableItemProps {\n id: UniqueIdentifier;\n}\n\nexport interface SortableListProps<T extends SortableItemProps> {\n items: T[];\n onChange(items: T[]): void;\n renderItem(item: T, index?: number): ReactNode;\n style?: CSSProperties;\n}\n\nexport const SortableList = <T extends SortableItemProps>({\n items,\n onChange,\n renderItem,\n style: userStyle,\n}: SortableListProps<T>): JSX.Element => {\n const [active, setActive] = useState<Active | null>(null);\n const activeItem = useMemo(() => items.find((item) => item.id === active?.id), [active, items]);\n const sensors = useSensors(\n useSensor(PointerSensor),\n useSensor(KeyboardSensor, {\n coordinateGetter: sortableKeyboardCoordinates,\n }),\n );\n\n const style: CSSProperties = {\n display: 'flex',\n flexDirection: 'column',\n padding: 0,\n listStyle: 'none',\n ...userStyle,\n };\n\n return (\n <DndContext\n sensors={sensors}\n onDragStart={({ active }): void => {\n setActive(active);\n }}\n onDragEnd={({ active, over }): void => {\n if (over && active.id !== over?.id) {\n const activeIndex = items.findIndex(({ id }) => id === active.id);\n const overIndex = items.findIndex(({ id }) => id === over.id);\n\n onChange(arrayMove(items, activeIndex, overIndex));\n }\n setActive(null);\n }}\n onDragCancel={(): void => setActive(null)}\n >\n <SortableContext items={items}>\n <ul style={style}>\n {items.map((item, index) => (\n <React.Fragment key={item.id}>{renderItem(item, index)}</React.Fragment>\n ))}\n </ul>\n </SortableContext>\n <SortableOverlay>{activeItem ? renderItem(activeItem) : null}</SortableOverlay>\n </DndContext>\n );\n};\n"],"names":["_a","items","onChange","renderItem","userStyle","style","_b","__read","useState","active","setActive","activeItem","useMemo","find","item","id","sensors","useSensors","useSensor","PointerSensor","KeyboardSensor","coordinateGetter","sortableKeyboardCoordinates","display","flexDirection","padding","listStyle","React","createElement","DndContext","onDragStart","onDragEnd","over","activeIndex","findIndex","overIndex","arrayMove","onDragCancel","SortableContext","map","index","Fragment","key","SortableOverlay"],"mappings":"4TAkB4B,SAA8BA,OACxDC,EAAKD,EAAAC,MACLC,EAAQF,EAAAE,SACRC,EAAUH,EAAAG,WACHC,EAASJ,EAAAK,MAEVC,EAAAC,EAAAA,OAAsBC,EAAQA,SAAgB,MAAK,GAAlDC,EAAMH,EAAA,GAAEI,OACTC,EAAaC,EAAAA,SAAQ,WAAM,OAAAX,EAAMY,MAAK,SAACC,GAAS,OAAAA,EAAKC,MAAON,MAAAA,SAAAA,EAAQM,SAAK,CAACN,EAAQR,IAClFe,EAAUC,EAAAA,WACdC,EAAAA,UAAUC,EAAAA,eACVD,EAASA,UAACE,iBAAgB,CACxBC,iBAAkBC,EAA2BA,+BAI3CjB,cACJkB,QAAS,OACTC,cAAe,SACfC,QAAS,EACTC,UAAW,QACRtB,GAGL,OACEuB,EAAC,QAAAC,cAAAC,aACC,CAAAb,QAASA,EACTc,YAAa,SAAC9B,GAAE,IAAAS,EAAMT,EAAAS,OACpBC,EAAUD,IAEZsB,UAAW,SAAC/B,OAAES,EAAMT,EAAAS,OAAEuB,EAAIhC,EAAAgC,KACxB,GAAIA,GAAQvB,EAAOM,MAAOiB,MAAAA,OAAA,EAAAA,EAAMjB,IAAI,CAClC,IAAMkB,EAAchC,EAAMiC,WAAU,SAAClC,GAAW,OAAPA,EAAAe,KAAcN,EAAOM,MACxDoB,EAAYlC,EAAMiC,WAAU,SAAClC,GAAW,OAAPA,EAAAe,KAAciB,EAAKjB,MAE1Db,EAASkC,EAAAA,UAAUnC,EAAOgC,EAAaE,IAEzCzB,EAAU,OAEZ2B,aAAc,WAAY,OAAA3B,EAAU,QAEpCiB,EAAAA,QAAAC,cAACU,EAAAA,gBAAe,CAACrC,MAAOA,GACtB0B,EAAAA,QAAAC,cAAA,KAAA,CAAIvB,MAAOA,GACRJ,EAAMsC,KAAI,SAACzB,EAAM0B,GAAU,OAC1Bb,EAAA,QAAAC,cAACD,EAAAA,QAAMc,SAAS,CAAAC,IAAK5B,EAAKC,IAAKZ,EAAWW,EAAM0B,SAItDb,UAAAC,cAACe,EAAeA,gBAAE,KAAAhC,EAAaR,EAAWQ,GAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sortableOverlay.component-7ecbda06.js","sources":["../src/components/SortableList/components/SortableOverlay/sortableOverlay.component.tsx"],"sourcesContent":["import React from 'react';\nimport type { PropsWithChildren } from 'react';\nimport { DragOverlay, defaultDropAnimationSideEffects } from '@dnd-kit/core';\nimport type { DropAnimation } from '@dnd-kit/core';\n\nconst dropAnimationConfig: DropAnimation = {\n sideEffects: defaultDropAnimationSideEffects({\n styles: {\n active: {\n opacity: '0.4',\n },\n },\n }),\n};\n\ninterface Props {}\n\nexport const SortableOverlay = ({ children }: PropsWithChildren<Props>): JSX.Element => (\n <DragOverlay dropAnimation={dropAnimationConfig}>{children}</DragOverlay>\n);\n"],"names":["dropAnimationConfig","sideEffects","defaultDropAnimationSideEffects","styles","active","opacity","_a","children","React","createElement","DragOverlay","dropAnimation"],"mappings":"2JAKMA,EAAqC,CACzCC,YAAaC,EAAAA,gCAAgC,CAC3CC,OAAQ,CACNC,OAAQ,CACNC,QAAS,mCAQc,SAACC,GAAE,IAAAC,EAAQD,EAAAC,SAA8C,OACtFC,EAAAA,QAACC,cAAAC,EAAWA,YAAC,CAAAC,cAAeX,GAAsBO
|
|
1
|
+
{"version":3,"file":"sortableOverlay.component-7ecbda06.js","sources":["../src/components/SortableList/components/SortableOverlay/sortableOverlay.component.tsx"],"sourcesContent":["import React from 'react';\nimport type { PropsWithChildren } from 'react';\nimport { DragOverlay, defaultDropAnimationSideEffects } from '@dnd-kit/core';\nimport type { DropAnimation } from '@dnd-kit/core';\n\nconst dropAnimationConfig: DropAnimation = {\n sideEffects: defaultDropAnimationSideEffects({\n styles: {\n active: {\n opacity: '0.4',\n },\n },\n }),\n};\n\ninterface Props {}\n\nexport const SortableOverlay = ({ children }: PropsWithChildren<Props>): JSX.Element => (\n <DragOverlay dropAnimation={dropAnimationConfig}>{children}</DragOverlay>\n);\n"],"names":["dropAnimationConfig","sideEffects","defaultDropAnimationSideEffects","styles","active","opacity","_a","children","React","createElement","DragOverlay","dropAnimation"],"mappings":"2JAKMA,EAAqC,CACzCC,YAAaC,EAAAA,gCAAgC,CAC3CC,OAAQ,CACNC,OAAQ,CACNC,QAAS,mCAQc,SAACC,GAAE,IAAAC,EAAQD,EAAAC,SAA8C,OACtFC,EAAAA,QAACC,cAAAC,EAAWA,YAAC,CAAAC,cAAeX,GAAsBO"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var e=require("./tslib.es6-f01c41a6.js"),r=require("react"),o=require("./useTheme-d7d8c3f5.js"),t=require("./useAdaptiveColorMap-0a74494f.js"),a=require("./chakra-ui-system.esm-b563b97d.js"),n=require("./chakra-ui-layout.esm-493ee04b.js");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s,d=i(r),l={xs:12,sm:16,md:24,lg:32,xl:48},u=a.keyframes(s||(s=e.__makeTemplateObject(["\n from {transform: rotate(0deg);}\n to {transform: rotate(360deg)}\n "],["\n from {transform: rotate(0deg);}\n to {transform: rotate(360deg)}\n "])));exports.Spinner=function(e){var r=e.size,a=void 0===r?"md":r,i=e.darkMode,s=o.useTheme(),c=s.colors,m=s.borders,p=t.useAdaptiveColorMap(c.icon,"active",i),f=l[a],b="0.45s linear 0s infinite normal none running ".concat(u);return d.default.createElement(n.Box,{as:"div",display:"inline-block",animation:b,border:m["2px"],borderTopColor:p,borderRightColor:p,borderLeftColor:c.transparent,borderBottomColor:c.transparent,height:"".concat(f,"px"),width:"".concat(f,"px"),borderRadius:"".concat(f,"px")},d.default.createElement(n.Box,{as:"span",border:0,w:"1px",h:"1px",m:"-1px",p:0,overflow:"hidden",position:"absolute"},"Loading..."))};
|
|
2
|
+
//# sourceMappingURL=spinner.component-f49dcd1b.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spinner.component-
|
|
1
|
+
{"version":3,"file":"spinner.component-f49dcd1b.js","sources":["../src/components/Spinner/spinner.records.ts","../src/components/Spinner/spinner.component.tsx"],"sourcesContent":["import { SpinnerSize } from './spinner.types';\n\nexport const SpinnerSizeMap: Record<SpinnerSize, number> = {\n xs: 12,\n sm: 16,\n md: 24,\n lg: 32,\n xl: 48,\n};\n","import React from 'react';\nimport { Box, keyframes } from '@chakra-ui/react';\nimport { useTheme } from 'hooks/useTheme';\nimport { useAdaptiveColorMap } from 'hooks/useAdaptiveColorMap';\nimport { SpinnerSize } from './spinner.types';\nimport { SpinnerSizeMap } from './spinner.records';\n\nconst spin = keyframes`\n from {transform: rotate(0deg);}\n to {transform: rotate(360deg)}\n `;\n\nexport interface SpinnerProps {\n size?: SpinnerSize;\n darkMode?: boolean;\n}\n\nexport const Spinner = ({ size = 'md', darkMode }: SpinnerProps): JSX.Element => {\n const { colors, borders } = useTheme();\n const spinnerColor = useAdaptiveColorMap(colors.icon, 'active', darkMode);\n const spinnerSize = SpinnerSizeMap[size];\n const animation = `0.45s linear 0s infinite normal none running ${spin}`;\n\n return (\n <Box\n as=\"div\"\n display=\"inline-block\"\n animation={animation}\n border={borders['2px']}\n borderTopColor={spinnerColor}\n borderRightColor={spinnerColor}\n borderLeftColor={colors.transparent}\n borderBottomColor={colors.transparent}\n height={`${spinnerSize}px`}\n width={`${spinnerSize}px`}\n borderRadius={`${spinnerSize}px`}\n >\n <Box as=\"span\" border={0} w=\"1px\" h=\"1px\" m=\"-1px\" p={0} overflow=\"hidden\" position=\"absolute\">\n Loading...\n </Box>\n </Box>\n );\n};\n"],"names":["SpinnerSizeMap","xs","sm","md","lg","xl","spin","keyframes","templateObject_1","__makeTemplateObject","_a","_b","size","darkMode","_c","useTheme","colors","borders","spinnerColor","useAdaptiveColorMap","icon","spinnerSize","animation","concat","React","createElement","Box","as","display","border","borderTopColor","borderRightColor","borderLeftColor","transparent","borderBottomColor","height","width","borderRadius","w","h","m","p","overflow","position"],"mappings":"iVAEaA,EAA8C,CACzDC,GAAI,GACJC,GAAI,GACJC,GAAI,GACJC,GAAI,GACJC,GAAI,ICAAC,EAAOC,EAASA,UAAAC,IAAAA,EAAAC,EAAAA,qBAAA,CAAA,iFAAA,CAAA,oGAUC,SAACC,GAAE,IAAAC,EAAAD,EAAAE,KAAAA,OAAI,IAAAD,EAAG,KAAIA,EAAEE,EAAQH,EAAAG,SACvCC,EAAsBC,EAAQA,WAA5BC,EAAMF,EAAAE,OAAEC,EAAOH,EAAAG,QACjBC,EAAeC,EAAAA,oBAAoBH,EAAOI,KAAM,SAAUP,GAC1DQ,EAAcrB,EAAeY,GAC7BU,EAAY,gDAAgDC,OAAAjB,GAElE,OACEkB,EAAC,QAAAC,cAAAC,MACC,CAAAC,GAAG,MACHC,QAAQ,eACRN,UAAWA,EACXO,OAAQZ,EAAQ,OAChBa,eAAgBZ,EAChBa,iBAAkBb,EAClBc,gBAAiBhB,EAAOiB,YACxBC,kBAAmBlB,EAAOiB,YAC1BE,OAAQ,GAAGZ,OAAAF,EAAe,MAC1Be,MAAO,GAAGb,OAAAF,EAAe,MACzBgB,aAAc,GAAGd,OAAAF,EAAe,OAEhCG,UAAAC,cAACC,EAAGA,IAAC,CAAAC,GAAG,OAAOE,OAAQ,EAAGS,EAAE,MAAMC,EAAE,MAAMC,EAAE,OAAOC,EAAG,EAAGC,SAAS,SAASC,SAAS,YAE9E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"strings-03c30366.js","sources":["../src/utils/strings.ts"],"sourcesContent":["export const camelCaseToLabel = (s: string): string =>\n s.replace(/([A-Z])/g, ' $1').replace(/^\\w/, (c) => c.toUpperCase());\n\nexport const toTitleCase = (s: string): string => {\n const smallWords = /^(a|an|and|as|at|but|by|en|for|if|in|nor|of|on|or|per|the|to|v.?|vs.?|via)$/i;\n const alphanumericPattern = /([A-Za-z0-9\\u00C0-\\u00FF])/;\n const wordSeparators = /([ :–—-])/;\n\n return s\n .split(wordSeparators)\n .map(function (current, index, array) {\n if (\n /* Check for small words */\n current.search(smallWords) > -1 &&\n /* Skip first and last word */\n index !== 0 &&\n index !== array.length - 1 &&\n /* Ignore title end and subtitle start */\n array[index - 3] !== ':' &&\n array[index + 1] !== ':' &&\n /* Ignore small words that start a hyphenated phrase */\n (array[index + 1] !== '-' || (array[index - 1] === '-' && array[index + 1] === '-'))\n ) {\n return current.toLowerCase();\n }\n\n /* Ignore intentional capitalization */\n if (current.substring(1).search(/[A-Z]|\\../) > -1) {\n return current;\n }\n\n /* Ignore URLs */\n if (array[index + 1] === ':' && array[index + 2] !== '') {\n return current;\n }\n\n /* Capitalize the first letter */\n return current.replace(alphanumericPattern, (match) => match.toUpperCase());\n })\n .join('');\n};\n"],"names":["s","replace","c","toUpperCase","smallWords","alphanumericPattern","split","map","current","index","array","search","length","toLowerCase","substring","match","join"],"mappings":"sCAAgC,SAACA,GAC/B,OAAAA,EAAEC,QAAQ,WAAY,OAAOA,QAAQ,OAAO,SAACC,GAAM,OAAAA,EAAEC,
|
|
1
|
+
{"version":3,"file":"strings-03c30366.js","sources":["../src/utils/strings.ts"],"sourcesContent":["export const camelCaseToLabel = (s: string): string =>\n s.replace(/([A-Z])/g, ' $1').replace(/^\\w/, (c) => c.toUpperCase());\n\nexport const toTitleCase = (s: string): string => {\n const smallWords = /^(a|an|and|as|at|but|by|en|for|if|in|nor|of|on|or|per|the|to|v.?|vs.?|via)$/i;\n const alphanumericPattern = /([A-Za-z0-9\\u00C0-\\u00FF])/;\n const wordSeparators = /([ :–—-])/;\n\n return s\n .split(wordSeparators)\n .map(function (current, index, array) {\n if (\n /* Check for small words */\n current.search(smallWords) > -1 &&\n /* Skip first and last word */\n index !== 0 &&\n index !== array.length - 1 &&\n /* Ignore title end and subtitle start */\n array[index - 3] !== ':' &&\n array[index + 1] !== ':' &&\n /* Ignore small words that start a hyphenated phrase */\n (array[index + 1] !== '-' || (array[index - 1] === '-' && array[index + 1] === '-'))\n ) {\n return current.toLowerCase();\n }\n\n /* Ignore intentional capitalization */\n if (current.substring(1).search(/[A-Z]|\\../) > -1) {\n return current;\n }\n\n /* Ignore URLs */\n if (array[index + 1] === ':' && array[index + 2] !== '') {\n return current;\n }\n\n /* Capitalize the first letter */\n return current.replace(alphanumericPattern, (match) => match.toUpperCase());\n })\n .join('');\n};\n"],"names":["s","replace","c","toUpperCase","smallWords","alphanumericPattern","split","map","current","index","array","search","length","toLowerCase","substring","match","join"],"mappings":"sCAAgC,SAACA,GAC/B,OAAAA,EAAEC,QAAQ,WAAY,OAAOA,QAAQ,OAAO,SAACC,GAAM,OAAAA,EAAEC,sCAE5B,SAACH,GAC1B,IAAMI,EAAa,+EACbC,EAAsB,6BAG5B,OAAOL,EACJM,MAHoB,aAIpBC,KAAI,SAAUC,EAASC,EAAOC,GAC7B,OAEEF,EAAQG,OAAOP,IAAe,GAEpB,IAAVK,GACAA,IAAUC,EAAME,OAAS,GAEJ,MAArBF,EAAMD,EAAQ,IACO,MAArBC,EAAMD,EAAQ,KAEQ,MAArBC,EAAMD,EAAQ,IAAoC,MAArBC,EAAMD,EAAQ,IAAmC,MAArBC,EAAMD,EAAQ,IAEjED,EAAQK,cAIbL,EAAQM,UAAU,GAAGH,OAAO,cAAgB,GAKvB,MAArBD,EAAMD,EAAQ,IAAmC,KAArBC,EAAMD,EAAQ,GAJrCD,EASFA,EAAQP,QAAQI,GAAqB,SAACU,GAAU,OAAAA,EAAMZ,oBAE9Da,KAAK"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var e=require("./tslib.es6-
|
|
2
|
-
//# sourceMappingURL=switch.component-
|
|
1
|
+
"use strict";var e=require("./tslib.es6-f01c41a6.js"),t=require("react"),r=require("./formControl.component-6ce1e8a6.js"),a=require("./chakra-ui-checkbox.esm-551d7ed3.js"),n=require("./chakra-ui-system.esm-b563b97d.js");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function c(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var a=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,a.get?a:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var s=c(t),l=i(t);function o(){return o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},o.apply(this,arguments)}var u=["spacing","children"],h=n.forwardRef((function(e,t){var r=n.useMultiStyleConfig("Switch",e),i=n.omitThemingProps(e),c=i.spacing,l=void 0===c?"0.5rem":c,h=i.children,d=function(e,t){if(null==e)return{};var r,a,n={},i=Object.keys(e);for(a=0;a<i.length;a++)r=i[a],t.indexOf(r)>=0||(n[r]=e[r]);return n}(i,u),f=a.useCheckbox(d),m=f.state,p=f.getInputProps,b=f.getCheckboxProps,k=f.getRootProps,_=f.getLabelProps,g=s.useMemo((function(){return o({display:"inline-block",position:"relative",verticalAlign:"middle",lineHeight:0},r.container)}),[r.container]),v=s.useMemo((function(){return o({display:"inline-flex",flexShrink:0,justifyContent:"flex-start",boxSizing:"content-box",cursor:"pointer"},r.track)}),[r.track]),y=s.useMemo((function(){return o({userSelect:"none",marginStart:l},r.label)}),[l,r.label]);return s.createElement(n.chakra.label,o({},k(),{className:n.cx("chakra-switch",e.className),__css:g}),s.createElement("input",o({className:"chakra-switch__input"},p({},t))),s.createElement(n.chakra.span,o({},b(),{className:"chakra-switch__track",__css:v}),s.createElement(n.chakra.span,{__css:r.thumb,className:"chakra-switch__thumb","data-checked":n.dataAttr(m.isChecked),"data-hover":n.dataAttr(m.isHovered)})),h&&s.createElement(n.chakra.span,o({className:"chakra-switch__label"},_(),{__css:y}),h))}));n.__DEV__&&(h.displayName="Switch");var d=function(t){var r=t.isChecked,a=t.isIndeterminate,n=t.isFieldInline,i=e.__rest(t,["isChecked","isIndeterminate","isFieldInline"]);return l.default.createElement(h,e.__assign({colorScheme:"teal",isChecked:r,display:n?"inline-block":"block"},a&&{variant:"indeterminate"},i))};d.displayName="Switch";var f=r.withFormControl(d);exports.WrappedSwitch=f;
|
|
2
|
+
//# sourceMappingURL=switch.component-14aff933.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"switch.component-
|
|
1
|
+
{"version":3,"file":"switch.component-14aff933.js","sources":["../node_modules/@chakra-ui/switch/dist/chakra-ui-switch.esm.js","../src/components/Switch/switch.component.tsx"],"sourcesContent":["import { useCheckbox } from '@chakra-ui/checkbox';\nimport { forwardRef, useMultiStyleConfig, omitThemingProps, chakra } from '@chakra-ui/system';\nimport { cx, dataAttr, __DEV__ } from '@chakra-ui/utils';\nimport * as React from 'react';\n\nfunction _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nvar _excluded = [\"spacing\", \"children\"];\nvar Switch = /*#__PURE__*/forwardRef(function (props, ref) {\n var styles = useMultiStyleConfig(\"Switch\", props);\n\n var _omitThemingProps = omitThemingProps(props),\n _omitThemingProps$spa = _omitThemingProps.spacing,\n spacing = _omitThemingProps$spa === void 0 ? \"0.5rem\" : _omitThemingProps$spa,\n children = _omitThemingProps.children,\n ownProps = _objectWithoutPropertiesLoose(_omitThemingProps, _excluded);\n\n var _useCheckbox = useCheckbox(ownProps),\n state = _useCheckbox.state,\n getInputProps = _useCheckbox.getInputProps,\n getCheckboxProps = _useCheckbox.getCheckboxProps,\n getRootProps = _useCheckbox.getRootProps,\n getLabelProps = _useCheckbox.getLabelProps;\n\n var containerStyles = React.useMemo(function () {\n return _extends({\n display: \"inline-block\",\n position: \"relative\",\n verticalAlign: \"middle\",\n lineHeight: 0\n }, styles.container);\n }, [styles.container]);\n var trackStyles = React.useMemo(function () {\n return _extends({\n display: \"inline-flex\",\n flexShrink: 0,\n justifyContent: \"flex-start\",\n boxSizing: \"content-box\",\n cursor: \"pointer\"\n }, styles.track);\n }, [styles.track]);\n var labelStyles = React.useMemo(function () {\n return _extends({\n userSelect: \"none\",\n marginStart: spacing\n }, styles.label);\n }, [spacing, styles.label]);\n return /*#__PURE__*/React.createElement(chakra.label, _extends({}, getRootProps(), {\n className: cx(\"chakra-switch\", props.className),\n __css: containerStyles\n }), /*#__PURE__*/React.createElement(\"input\", _extends({\n className: \"chakra-switch__input\"\n }, getInputProps({}, ref))), /*#__PURE__*/React.createElement(chakra.span, _extends({}, getCheckboxProps(), {\n className: \"chakra-switch__track\",\n __css: trackStyles\n }), /*#__PURE__*/React.createElement(chakra.span, {\n __css: styles.thumb,\n className: \"chakra-switch__thumb\",\n \"data-checked\": dataAttr(state.isChecked),\n \"data-hover\": dataAttr(state.isHovered)\n })), children && /*#__PURE__*/React.createElement(chakra.span, _extends({\n className: \"chakra-switch__label\"\n }, getLabelProps(), {\n __css: labelStyles\n }), children));\n});\n\nif (__DEV__) {\n Switch.displayName = \"Switch\";\n}\n\nexport { Switch };\n","import React from 'react';\nimport { Switch as CSwitch, SwitchProps as CSwitchProps } from '@chakra-ui/react';\nimport { WithFormControlProps, withFormControl } from '../FormControl/formControl.component';\nimport { FormControlSize } from '../FormControl/formControl.types';\n\nexport interface SwitchProps extends WithFormControlProps, CSwitchProps {\n isFieldInline?: boolean;\n isIndeterminate?: boolean;\n size?: FormControlSize;\n}\n\nconst Switch = (props: SwitchProps): JSX.Element => {\n const { isChecked, isIndeterminate, isFieldInline, ...domProps } = props;\n\n return (\n <CSwitch\n colorScheme=\"teal\"\n isChecked={isChecked}\n display={isFieldInline ? 'inline-block' : 'block'}\n {...(isIndeterminate && { variant: 'indeterminate' })}\n {...domProps}\n />\n );\n};\n\nSwitch.displayName = 'Switch';\n\nconst WrappedSwitch = withFormControl(Switch);\n\nexport { WrappedSwitch as Switch };\n"],"names":["_extends","Object","assign","target","i","arguments","length","source","key","prototype","hasOwnProperty","call","apply","this","_excluded","Switch","forwardRef","props","ref","styles","useMultiStyleConfig","_omitThemingProps","omitThemingProps","_omitThemingProps$spa","spacing","children","ownProps","excluded","sourceKeys","keys","indexOf","_objectWithoutPropertiesLoose","_useCheckbox","useCheckbox","state","getInputProps","getCheckboxProps","getRootProps","getLabelProps","containerStyles","React","useMemo","display","position","verticalAlign","lineHeight","container","trackStyles","flexShrink","justifyContent","boxSizing","cursor","track","labelStyles","userSelect","marginStart","label","createElement","chakra","className","cx","__css","span","thumb","dataAttr","isChecked","isHovered","__DEV__","displayName","isIndeterminate","isFieldInline","domProps","CSwitch","__assign","colorScheme","variant","WrappedSwitch","withFormControl"],"mappings":"qlBAKA,SAASA,IAeP,OAdAA,EAAWC,OAAOC,QAAU,SAAUC,GACpC,IAAK,IAAIC,EAAI,EAAGA,EAAIC,UAAUC,OAAQF,IAAK,CACzC,IAAIG,EAASF,UAAUD,GAEvB,IAAK,IAAII,KAAOD,EACVN,OAAOQ,UAAUC,eAAeC,KAAKJ,EAAQC,KAC/CL,EAAOK,GAAOD,EAAOC,IAK3B,OAAOL,GAGFH,EAASY,MAAMC,KAAMR,WAkB9B,IAAIS,EAAY,CAAC,UAAW,YACxBC,EAAsBC,EAAUA,YAAC,SAAUC,EAAOC,GACpD,IAAIC,EAASC,EAAAA,oBAAoB,SAAUH,GAEvCI,EAAoBC,EAAgBA,iBAACL,GACrCM,EAAwBF,EAAkBG,QAC1CA,OAAoC,IAA1BD,EAAmC,SAAWA,EACxDE,EAAWJ,EAAkBI,SAC7BC,EAvBN,SAAuCnB,EAAQoB,GAC7C,GAAc,MAAVpB,EAAgB,MAAO,GAC3B,IAEIC,EAAKJ,EAFLD,EAAS,GACTyB,EAAa3B,OAAO4B,KAAKtB,GAG7B,IAAKH,EAAI,EAAGA,EAAIwB,EAAWtB,OAAQF,IACjCI,EAAMoB,EAAWxB,GACbuB,EAASG,QAAQtB,IAAQ,IAC7BL,EAAOK,GAAOD,EAAOC,IAGvB,OAAOL,EAWQ4B,CAA8BV,EAAmBP,GAE5DkB,EAAeC,EAAWA,YAACP,GAC3BQ,EAAQF,EAAaE,MACrBC,EAAgBH,EAAaG,cAC7BC,EAAmBJ,EAAaI,iBAChCC,EAAeL,EAAaK,aAC5BC,EAAgBN,EAAaM,cAE7BC,EAAkBC,EAAMC,SAAQ,WAClC,OAAOzC,EAAS,CACd0C,QAAS,eACTC,SAAU,WACVC,cAAe,SACfC,WAAY,GACX1B,EAAO2B,aACT,CAAC3B,EAAO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eA,gBAAC9D"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var e=require("./tslib.es6-f01c41a6.js"),t=require("./notificationCounter.component-27fafaa0.js"),i=require("./icon.component-3b012e4e.js"),a=require("react"),n=require("./chakra-ui-tabs.esm-45ecf74e.js"),o=require("./chakra-ui-layout.esm-493ee04b.js");function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=r(a),c={xs:"sm",sm:"md",md:"md",lg:"lg"};exports.Tab=function(a){var r=a.iconName,s=a.label,f=a.showNotificationCounter,l=void 0!==f&&f,m=a.notificationCount,d=void 0===m?0:m,b=a.notificationCounterVariant,C=void 0===b?t.NotificationCounterVariant.Red:b,v=a.size,j=void 0===v?"md":v,q=e.__rest(a,["iconName","label","showNotificationCounter","notificationCount","notificationCounterVariant","size"]);return u.default.createElement(n.Tab,e.__assign({},q),!!r&&u.default.createElement(o.Box,{pr:2},u.default.createElement(i.Icon,{name:r,size:j})),s,l&&u.default.createElement(t.NotificationCounter,{count:d,variant:C,size:c[j],ml:2}))};
|
|
2
|
+
//# sourceMappingURL=tab.component-5c72533e.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tab.component-
|
|
1
|
+
{"version":3,"file":"tab.component-5c72533e.js","sources":["../src/components/Tabs/components/Tab/tab.records.ts","../src/components/Tabs/components/Tab/tab.component.tsx"],"sourcesContent":["import { NotificationCounterSize } from '../../../NotificationCounter/notificationCounter.types';\nimport { TabSize } from './tab.types';\n\nexport const notificationCounterSize: Record<TabSize, NotificationCounterSize> = {\n xs: 'sm',\n sm: 'md',\n md: 'md',\n lg: 'lg',\n};\n","import { Tab as CTab, TabProps as CTabProps, Box } from '@chakra-ui/react';\nimport { NotificationCounter } from '../../../NotificationCounter/notificationCounter.component';\nimport { Icon } from '../../../Icon/icon.component';\nimport React from 'react';\nimport { NotificationCounterVariant } from '../../../NotificationCounter/notificationCounter.types';\nimport { TabSize } from './tab.types';\nimport { notificationCounterSize } from './tab.records';\nimport { IconName } from '../../../Icon/icon.types';\n\nexport interface TabProps extends CTabProps {\n iconName?: IconName;\n label: string;\n showNotificationCounter?: boolean;\n notificationCount?: number;\n notificationCounterVariant?: NotificationCounterVariant;\n size?: TabSize;\n}\n\nexport const Tab = ({\n iconName,\n label,\n showNotificationCounter = false,\n notificationCount = 0,\n notificationCounterVariant = NotificationCounterVariant.Red,\n size = 'md',\n ...rest\n}: TabProps): JSX.Element => {\n return (\n <CTab {...rest}>\n {!!iconName && (\n <Box pr={2}>\n <Icon name={iconName} size={size} />\n </Box>\n )}\n {label}\n {showNotificationCounter && (\n <NotificationCounter\n count={notificationCount}\n variant={notificationCounterVariant}\n size={notificationCounterSize[size]}\n ml={2}\n />\n )}\n </CTab>\n );\n};\n"],"names":["notificationCounterSize","xs","sm","md","lg","_a","iconName","label","_b","showNotificationCounter","_c","notificationCount","_d","notificationCounterVariant","NotificationCounterVariant","Red","_e","size","rest","__rest","React","createElement","CTab","__assign","Box","pr","Icon","name","NotificationCounter","count","variant","ml"],"mappings":"6VAGaA,EAAoE,CAC/EC,GAAI,KACJC,GAAI,KACJC,GAAI,KACJC,GAAI,kBCWa,SAACC,GAClB,IAAAC,EAAQD,EAAAC,SACRC,EAAKF,EAAAE,MACLC,EAA+BH,EAAAI,wBAA/BA,OAAuB,IAAAD,GAAQA,EAC/BE,sBAAAC,aAAoB,EAACD,EACrBE,EAAAP,EAAAQ,2BAAAA,OAA0B,IAAAD,EAAGE,EAA0BA,2BAACC,MACxDC,EAAAX,EAAAY,KAAAA,aAAO,KAAID,EACRE,EAAIC,EAAAA,OAAAd,EAPW,wGASlB,OACEe,EAAAA,QAAAC,cAACC,EAAAA,IAAIC,EAAAA,SAAA,GAAKL,KACLZ,GACDc,wBAACI,EAAAA,IAAG,CAACC,GAAI,GACPL,UAACC,cAAAK,EAAAA,KAAK,CAAAC,KAAMrB,EAAUW,KAAMA,KAG/BV,EACAE,GACCW,EAAA,QAAAC,cAACO,EAAmBA,oBAAA,CAClBC,MAAOlB,EACPmB,QAASjB,EACTI,KAAMjB,EAAwBiB,GAC9Bc,GAAI"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var e=require("./tslib.es6-f01c41a6.js"),t=require("react"),a=require("./tab.component-5c72533e.js"),s=require("./chakra-ui-tabs.esm-45ecf74e.js");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=n(t);exports.Tabs=function(t){var n=t.size,i=void 0===n?"md":n,u=t.tabList,l=t.tabPanels,c=t.tabPanelsStyle,b=e.__rest(t,["size","tabList","tabPanels","tabPanelsStyle"]);return r.default.createElement(s.Tabs,e.__assign({},b,{size:i}),r.default.createElement(s.TabList,null,u.map((function(t,s){return r.default.createElement(a.Tab,e.__assign({key:s,size:i},t))}))),!!l&&r.default.createElement(s.TabPanels,e.__assign({},c),l.map((function(e){return e}))))};
|
|
2
|
+
//# sourceMappingURL=tabs.component-9dde0129.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tabs.component-
|
|
1
|
+
{"version":3,"file":"tabs.component-9dde0129.js","sources":["../src/components/Tabs/tabs.component.tsx"],"sourcesContent":["import { TabList, TabPanels, Tabs as CTabs, StyleProps } from '@chakra-ui/react';\nimport React from 'react';\nimport { Alignment, Dict } from 'shared/types';\nimport { Tab, TabProps } from './components/Tab/tab.component';\nimport { TabSize } from './components/Tab/tab.types';\n\nexport interface TabsProps extends StyleProps {\n size?: TabSize;\n tabList: TabProps[];\n tabPanels?: JSX.Element[];\n tabPanelsStyle?: Dict;\n isFitted?: boolean;\n align?: Alignment;\n defaultIndex?: number;\n isLazy?: boolean;\n isManual?: boolean;\n index?: number;\n onChange?: (index: number) => void;\n}\n\nexport const Tabs = ({ size = 'md', tabList, tabPanels, tabPanelsStyle, ...rest }: TabsProps): JSX.Element => {\n return (\n <CTabs {...rest} size={size}>\n <TabList>\n {tabList.map((tab, index) => (\n <Tab key={index} size={size} {...tab} />\n ))}\n </TabList>\n {!!tabPanels && <TabPanels {...tabPanelsStyle}>{tabPanels.map((panel) => panel)}</TabPanels>}\n </CTabs>\n );\n};\n"],"names":["_a","_b","size","tabList","tabPanels","tabPanelsStyle","rest","__rest","React","CTabs","__assign","createElement","TabList","map","tab","index","Tab","key","TabPanels","panel"],"mappings":"gQAoBoB,SAACA,GAAE,IAAAC,SAAAC,aAAO,KAAID,EAAEE,EAAOH,EAAAG,QAAEC,EAASJ,EAAAI,UAAEC,EAAcL,EAAAK,eAAKC,EAAIC,EAAAA,OAAAP,EAA1D,iDACnB,OACEQ,wBAACC,EAAAA,KAAKC,EAAAA,SAAA,GAAKJ,EAAM,CAAAJ,KAAMA,IACrBM,UAAAG,cAACC,EAAOA,QAAA,KACLT,EAAQU,KAAI,SAACC,EAAKC,GAAU,OAC3BP,EAAC,QAAAG,cAAAK,EAAAA,IAAIN,EAAAA,SAAA,CAAAO,IAAKF,EAAOb,KAAMA,GAAUY,UAGlCV,GAAaI,UAAAG,cAACO,EAAAA,UAAcR,EAAAA,SAAA,GAAAL,GAAiBD,EAAUS,KAAI,SAACM,GAAU,OAAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var e=require("./tslib.es6-f01c41a6.js"),t=require("react"),r=require("./tabs.component-9dde0129.js");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=a(t);exports.TabsLayout=function(t){return s.default.createElement(r.Tabs,e.__assign({},t))};
|
|
2
|
+
//# sourceMappingURL=tabsLayout.component-67d031de.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tabsLayout.component-
|
|
1
|
+
{"version":3,"file":"tabsLayout.component-67d031de.js","sources":["../src/components/TabsLayout/tabsLayout.component.tsx"],"sourcesContent":["import React from 'react';\nimport { Tabs, TabsProps } from '../Tabs/tabs.component';\n\nexport interface TabsLayoutProps extends TabsProps {\n tabPanels: JSX.Element[];\n}\n\nexport const TabsLayout = (props: TabsLayoutProps): JSX.Element => {\n return <Tabs {...props} />;\n};\n"],"names":["props","React","createElement","Tabs","__assign"],"mappings":"yNAO0B,SAACA,GACzB,OAAOC,EAAAA,QAACC,cAAAC,EAAIA,KAAKC,EAAAA,SAAA,GAAAJ"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var e=require("./tslib.es6-
|
|
2
|
-
//# sourceMappingURL=tag.component-
|
|
1
|
+
"use strict";var e=require("./tslib.es6-f01c41a6.js"),t=require("react"),r=require("./chakra-ui-icon.esm-30b0b8a9.js"),n=require("./chakra-ui-system.esm-b563b97d.js");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function l(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var i=l(t),o=a(t);function s(){return s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},s.apply(this,arguments)}var c=["isDisabled","children"],u=n.forwardRef((function(e,t){var r=n.useMultiStyleConfig("Tag",e),a=n.omitThemingProps(e),l=s({display:"inline-flex",verticalAlign:"top",alignItems:"center",maxWidth:"100%"},r.container);return i.createElement(n.StylesProvider,{value:r},i.createElement(n.chakra.span,s({ref:t},a,{__css:l})))}));n.__DEV__&&(u.displayName="Tag");var f=n.forwardRef((function(e,t){var r=n.useStyles();return i.createElement(n.chakra.span,s({ref:t,isTruncated:!0},e,{__css:r.label}))}));n.__DEV__&&(f.displayName="TagLabel");var _=n.forwardRef((function(e,t){return i.createElement(r.Icon,s({ref:t,verticalAlign:"top",marginEnd:"0.5rem"},e))}));n.__DEV__&&(_.displayName="TagLeftIcon");var m=n.forwardRef((function(e,t){return i.createElement(r.Icon,s({ref:t,verticalAlign:"top",marginStart:"0.5rem"},e))}));n.__DEV__&&(m.displayName="TagRightIcon");var d=function(e){return i.createElement(r.Icon,s({verticalAlign:"inherit",viewBox:"0 0 512 512"},e),i.createElement("path",{fill:"currentColor",d:"M289.94 256l95-95A24 24 0 00351 127l-95 95-95-95a24 24 0 00-34 34l95 95-95 95a24 24 0 1034 34l95-95 95 95a24 24 0 0034-34z"}))};n.__DEV__&&(d.displayName="TagCloseIcon");var g=function(e){var t=e.isDisabled,r=e.children,a=function(e,t){if(null==e)return{};var r,n,a={},l=Object.keys(e);for(n=0;n<l.length;n++)r=l[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,c),l=s({display:"flex",alignItems:"center",justifyContent:"center",outline:"0"},n.useStyles().closeButton);return i.createElement(n.chakra.button,s({"aria-label":"close"},a,{type:"button",disabled:t,__css:l}),r||i.createElement(d,null))};n.__DEV__&&(g.displayName="TagCloseButton");var v={sm:0,md:.5,lg:1};exports.Tag=function(t){var r=t.leftElement,n=t.rightElement,a=t.label,l=t.showCloseButton,i=void 0!==l&&l,s=t.onClose,c=t.fontWeight,_=void 0===c?"semibold":c,m=t.size,d=void 0===m?"md":m,p=e.__rest(t,["leftElement","rightElement","label","showCloseButton","onClose","fontWeight","size"]),b=e.__assign(e.__assign({},!!r&&{ml:1}),!!n&&{mr:1});return o.default.createElement(u,e.__assign({},p,{size:d},i&&{pr:v[d]}),r,o.default.createElement(f,e.__assign({},b,{fontWeight:_}),a),n,i&&!!s&&o.default.createElement(g,{onClick:s}))};
|
|
2
|
+
//# sourceMappingURL=tag.component-c909f1bf.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tag.component-
|
|
1
|
+
{"version":3,"file":"tag.component-c909f1bf.js","sources":["../node_modules/@chakra-ui/tag/dist/chakra-ui-tag.esm.js","../src/components/Tag/tag.records.ts","../src/components/Tag/tag.component.tsx"],"sourcesContent":["import { Icon } from '@chakra-ui/icon';\nimport { forwardRef, useMultiStyleConfig, omitThemingProps, StylesProvider, chakra, useStyles } from '@chakra-ui/system';\nimport { __DEV__ } from '@chakra-ui/utils';\nimport * as React from 'react';\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nfunction _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nvar _excluded = [\"isDisabled\", \"children\"];\n\n/**\n * The tag component is used to label or categorize UI elements.\n * To style the tag globally, change the styles in `theme.components.Tag`\n * @see Docs https://chakra-ui.com/tag\n */\nvar Tag = /*#__PURE__*/forwardRef(function (props, ref) {\n var styles = useMultiStyleConfig(\"Tag\", props);\n var ownProps = omitThemingProps(props);\n\n var containerStyles = _extends({\n display: \"inline-flex\",\n verticalAlign: \"top\",\n alignItems: \"center\",\n maxWidth: \"100%\"\n }, styles.container);\n\n return /*#__PURE__*/React.createElement(StylesProvider, {\n value: styles\n }, /*#__PURE__*/React.createElement(chakra.span, _extends({\n ref: ref\n }, ownProps, {\n __css: containerStyles\n })));\n});\n\nif (__DEV__) {\n Tag.displayName = \"Tag\";\n}\n\nvar TagLabel = /*#__PURE__*/forwardRef(function (props, ref) {\n var styles = useStyles();\n return /*#__PURE__*/React.createElement(chakra.span, _extends({\n ref: ref,\n isTruncated: true\n }, props, {\n __css: styles.label\n }));\n});\n\nif (__DEV__) {\n TagLabel.displayName = \"TagLabel\";\n}\n\nvar TagLeftIcon = /*#__PURE__*/forwardRef(function (props, ref) {\n return /*#__PURE__*/React.createElement(Icon, _extends({\n ref: ref,\n verticalAlign: \"top\",\n marginEnd: \"0.5rem\"\n }, props));\n});\n\nif (__DEV__) {\n TagLeftIcon.displayName = \"TagLeftIcon\";\n}\n\nvar TagRightIcon = /*#__PURE__*/forwardRef(function (props, ref) {\n return /*#__PURE__*/React.createElement(Icon, _extends({\n ref: ref,\n verticalAlign: \"top\",\n marginStart: \"0.5rem\"\n }, props));\n});\n\nif (__DEV__) {\n TagRightIcon.displayName = \"TagRightIcon\";\n}\n\nvar TagCloseIcon = function TagCloseIcon(props) {\n return /*#__PURE__*/React.createElement(Icon, _extends({\n verticalAlign: \"inherit\",\n viewBox: \"0 0 512 512\"\n }, props), /*#__PURE__*/React.createElement(\"path\", {\n fill: \"currentColor\",\n d: \"M289.94 256l95-95A24 24 0 00351 127l-95 95-95-95a24 24 0 00-34 34l95 95-95 95a24 24 0 1034 34l95-95 95 95a24 24 0 0034-34z\"\n }));\n};\n\nif (__DEV__) {\n TagCloseIcon.displayName = \"TagCloseIcon\";\n}\n\n/**\n * TagCloseButton is used to close \"remove\" the tag\n * @see Docs https://chakra-ui.com/tag\n */\nvar TagCloseButton = function TagCloseButton(props) {\n var isDisabled = props.isDisabled,\n children = props.children,\n rest = _objectWithoutPropertiesLoose(props, _excluded);\n\n var styles = useStyles();\n\n var btnStyles = _extends({\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n outline: \"0\"\n }, styles.closeButton);\n\n return /*#__PURE__*/React.createElement(chakra.button, _extends({\n \"aria-label\": \"close\"\n }, rest, {\n type: \"button\",\n disabled: isDisabled,\n __css: btnStyles\n }), children || /*#__PURE__*/React.createElement(TagCloseIcon, null));\n};\n\nif (__DEV__) {\n TagCloseButton.displayName = \"TagCloseButton\";\n}\n\nexport { Tag, TagCloseButton, TagLabel, TagLeftIcon, TagRightIcon };\n","import { TagSize } from './tag.types';\n\nexport const paddingRightBySize: Record<TagSize, number> = {\n sm: 0,\n md: 0.5,\n lg: 1,\n};\n","import React from 'react';\nimport { Tag as CTag, TagProps as CTagProps, TagCloseButton, TagLabel } from '@chakra-ui/react';\nimport { TagSize } from './tag.types';\nimport { paddingRightBySize } from './tag.records';\n\nexport interface TagProps extends CTagProps {\n leftElement?: JSX.Element;\n rightElement?: JSX.Element;\n label: string;\n showCloseButton?: boolean;\n size?: TagSize;\n onClose?: React.MouseEventHandler<HTMLButtonElement>;\n fontWeight?: 'regular' | 'semibold';\n}\n\nexport const Tag = ({\n leftElement,\n rightElement,\n label,\n showCloseButton = false,\n onClose,\n fontWeight = 'semibold',\n size = 'md',\n ...rest\n}: TagProps): JSX.Element => {\n const labelStyle = {\n ...(!!leftElement && { ml: 1 }),\n ...(!!rightElement && { mr: 1 }),\n };\n\n return (\n <CTag {...rest} size={size} {...(showCloseButton && { pr: paddingRightBySize[size] })}>\n {leftElement}\n <TagLabel {...labelStyle} fontWeight={fontWeight}>\n {label}\n </TagLabel>\n {rightElement}\n {showCloseButton && !!onClose && <TagCloseButton onClick={onClose} />}\n </CTag>\n );\n};\n"],"names":["_extends","Object","assign","target","i","arguments","length","source","key","prototype","hasOwnProperty","call","apply","this","_excluded","Tag","forwardRef","props","ref","styles","useMultiStyleConfig","ownProps","omitThemingProps","containerStyles","display","verticalAlign","alignItems","maxWidth","container","React","createElement","StylesProvider","value","chakra","span","__css","__DEV__","displayName","TagLabel","useStyles","isTruncated","label","TagLeftIcon","Icon","marginEnd","TagRightIcon","marginStart","TagCloseIcon","viewBox","fill","d","TagCloseButton","isDisabled","children","rest","excluded","sourceKeys","keys","indexOf","_objectWithoutPropertiesLoose","btnStyles","justifyContent","outline","closeButton","button","type","disabled","paddingRightBySize","sm","md","lg","_a","leftElement","rightElement","_b","showCloseButton","onClose","_c","fontWeight","_d","size","__rest","labelStyle","__assign","ml","mr","CTag","pr","onClick"],"mappings":"giBAoBA,SAASA,IAeP,OAdAA,EAAWC,OAAOC,QAAU,SAAUC,GACpC,IAAK,IAAIC,EAAI,EAAGA,EAAIC,UAAUC,OAAQF,IAAK,CACzC,IAAIG,EAASF,UAAUD,GAEvB,IAAK,IAAII,KAAOD,EACVN,OAAOQ,UAAUC,eAAeC,KAAKJ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0B,KAAMA,GAAWL,GAAmB,CAAEY,GAAIpB,EAAmBa,KAC1ER,EACD3C,EAAAA,QAACC,cAAAQ,gBAAa4C,EAAU,CAAEJ,WAAYA,IACnCrC,GAEFgC,EACAE,KAAqBC,GAAW/C,UAACC,cAAAqB,EAAe,CAAAqC,QAASZ"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var e=require("./tslib.es6-f01c41a6.js"),r=require("react"),t=require("./useTheme-d7d8c3f5.js"),a=require("./useAdaptiveColorMap-0a74494f.js"),o=require("./truncatedText.component-d242bfa7.js"),i=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);exports.Text=function(r){var n=r.children,u=r.variant,c=void 0===u?"regular":u,d=r.as,l=void 0===d?"span":d,f=r.color,v=r.colorToken,p=void 0===v?"default":v,_=r.darkMode,T=void 0!==_&&_,g=r.truncate,j=r.truncateProps,m=r.size,q=r.fontSize,x=e.__rest(r,["children","variant","as","color","colorToken","darkMode","truncate","truncateProps","size","fontSize"]),z=t.useTheme().colors,h=a.useAdaptiveColorMap(z.text,p,T),k={size:m,fontSize:q,variant:c,color:f||h},b=e.__assign(e.__assign({},j),k);return g?s.default.createElement(o.TruncatedText,e.__assign({},b),null==n?void 0:n.toString()):s.default.createElement(i.Text,e.__assign({as:l},k,x),n)};
|
|
2
|
+
//# sourceMappingURL=text.component-74ae29fd.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text.component-
|
|
1
|
+
{"version":3,"file":"text.component-74ae29fd.js","sources":["../src/components/Text/text.component.tsx"],"sourcesContent":["import React, { ReactNode } from 'react';\nimport { Text as CText, TextProps as CTextProps } from '@chakra-ui/react';\nimport { HTMLTagName, TextVariant } from './text.types';\nimport { useTheme } from 'hooks/useTheme';\nimport { useAdaptiveColorMap } from 'hooks/useAdaptiveColorMap';\nimport { TextColor } from 'shared/types';\nimport { TruncatedText, TruncatedTextProps } from '../TruncatedText/truncatedText.component';\n\nexport interface TextProps extends CTextProps {\n children: ReactNode;\n as?: HTMLTagName;\n variant?: TextVariant;\n colorToken?: TextColor;\n darkMode?: boolean;\n truncate?: boolean;\n truncateProps?: TruncatedTextProps;\n}\n\nexport const Text = ({\n children,\n variant = 'regular',\n as = 'span',\n color,\n colorToken = 'default',\n darkMode = false,\n truncate,\n truncateProps,\n size,\n fontSize,\n ...rest\n}: TextProps): JSX.Element => {\n const { colors } = useTheme();\n const adaptiveColor = useAdaptiveColorMap<TextColor>(colors.text, colorToken, darkMode);\n\n const textProps: TruncatedTextProps = {\n size,\n fontSize,\n variant,\n color: color || adaptiveColor,\n };\n\n const truncatedTextProps: TruncatedTextProps = { ...truncateProps, ...textProps };\n\n return truncate ? (\n <TruncatedText {...truncatedTextProps}>{children?.toString()}</TruncatedText>\n ) : (\n <CText as={as} {...textProps} {...rest}>\n {children}\n </CText>\n );\n};\n"],"names":["_a","children","_b","variant","_c","as","color","_d","colorToken","_e","darkMode","truncate","truncateProps","size","fontSize","rest","__rest","colors","useTheme","adaptiveColor","useAdaptiveColorMap","text","textProps","truncatedTextProps","__assign","React","TruncatedText","toString","createElement","CText"],"mappings":"+VAkBoB,SAACA,GACnB,IAAAC,aACAC,EAAAF,EAAAG,QAAAA,OAAO,IAAAD,EAAG,UAASA,EACnBE,EAAAJ,EAAAK,GAAAA,OAAE,IAAAD,EAAG,OAAMA,EACXE,EAAKN,EAAAM,MACLC,EAAsBP,EAAAQ,WAAtBA,OAAU,IAAAD,EAAG,UAASA,EACtBE,aAAAC,cAAgBD,EAChBE,EAAQX,EAAAW,SACRC,EAAaZ,EAAAY,cACbC,EAAIb,EAAAa,KACJC,aACGC,EAXgBC,EAAAA,OAAAhB,EAAA,CAAA,WAAA,UAAA,KAAA,QAAA,aAAA,WAAA,WAAA,gBAAA,OAAA,aAaXiB,EAAWC,oBACbC,EAAgBC,EAAAA,oBAA+BH,EAAOI,KAAMb,EAAYE,GAExEY,EAAgC,CACpCT,KAAIA,EACJC,SAAQA,EACRX,QAAOA,EACPG,MAAOA,GAASa,GAGZI,EAA8CC,EAAAA,SAAAA,EAAAA,SAAA,GAAAZ,GAAkBU,GAEtE,OAAOX,EACLc,wBAACC,EAAaA,cAAAF,EAAAA,SAAA,GAAKD,GAAqBtB,MAAAA,SAAAA,EAAU0B,YAElDF,EAAAA,QAACG,cAAAC,EAAAA,iBAAMxB,GAAIA,GAAQiB,EAAeP,GAC/Bd"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var e=require("./tslib.es6-f01c41a6.js"),t=require("react"),n=require("./formControl.component-6ce1e8a6.js"),r=require("./icon.component-3b012e4e.js"),l=require("./useTheme-d7d8c3f5.js"),a=require("./chakra-ui-button.esm-29841617.js"),i=require("./chakra-ui-input.esm-40a574c3.js");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=u(t),s={xs:5,sm:5,md:5,lg:6},c=function(e){var t=e.handleClear,n=e.size,i=void 0===n?"md":n,u=l.useTheme().colors;return o.default.createElement(a.Button,{color:u.icon.light.default,display:"inline-flex",minW:"auto",w:s[i],h:s[i],variant:"unstyled",opacity:.5,_hover:{opacity:.8},_active:{opacity:1},mr:"sm"===i?3:4,onClick:t},o.default.createElement(r.Icon,{name:"close",colorToken:"currentColor",size:"lg"===i?"sm":"xs"}))},m=n.withFormControl((function(t){var n=t.isClearable,r=void 0!==n&&n,l=t.size,a=void 0===l?"md":l,u=e.__rest(t,["isClearable","size"]),s=u.leftElement,m=u.inputRef;u.isFieldInline;var d=u.onClear,f=u.value,p=e.__rest(u,["leftElement","inputRef","isFieldInline","onClear","value"]),h=u.rightElement;return r&&f&&(h=o.default.createElement(c,{size:a,handleClear:function(){d&&d(f||"")}})),o.default.createElement(i.InputGroup,null,s?o.default.createElement(i.InputLeftElement,{children:s,h:"100%"}):null,o.default.createElement(i.Input,e.__assign({},p,{ref:m,size:a,value:f})),h?o.default.createElement(i.InputRightElement,{children:h,h:"100%"}):null)})),d=t.forwardRef((function(t,n){return o.default.createElement(m,e.__assign({inputRef:n},t))}));d.displayName="TextInput",exports.WrappedTextInput=d;
|
|
2
|
+
//# sourceMappingURL=textInput.component-51fc76e2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"textInput.component-
|
|
1
|
+
{"version":3,"file":"textInput.component-51fc76e2.js","sources":["../src/components/TextInput/components/ClearButton/clearButton.records.ts","../src/components/TextInput/components/ClearButton/clearButton.component.tsx","../src/components/TextInput/textInput.component.tsx"],"sourcesContent":["import { FormControlSize } from '../../../FormControl/formControl.types';\n\nexport const closeButtonSize: Record<FormControlSize, number> = {\n xs: 5,\n sm: 5,\n md: 5,\n lg: 6,\n};\n","import React from 'react';\nimport { Button } from '@chakra-ui/react';\nimport { Icon } from '../../../Icon/icon.component';\nimport { useTheme } from 'hooks/useTheme';\nimport { FormControlSize } from '../../../FormControl/formControl.types';\nimport { closeButtonSize } from './clearButton.records';\n\nexport interface ClearButtonProps {\n handleClear?: () => void;\n size?: FormControlSize;\n}\n\nexport const ClearButton = ({ handleClear, size = 'md' }: ClearButtonProps): JSX.Element => {\n const { colors } = useTheme();\n\n return (\n <Button\n color={colors.icon.light.default}\n display=\"inline-flex\"\n minW=\"auto\"\n w={closeButtonSize[size]}\n h={closeButtonSize[size]}\n variant=\"unstyled\"\n opacity={0.5}\n _hover={{ opacity: 0.8 }}\n _active={{ opacity: 1 }}\n mr={size === 'sm' ? 3 : 4}\n onClick={handleClear}\n >\n <Icon name=\"close\" colorToken=\"currentColor\" size={size === 'lg' ? 'sm' : 'xs'} />\n </Button>\n );\n};\n","import React, { forwardRef, ForwardedRef, ReactElement } from 'react';\nimport {\n Input as CInput,\n InputProps as CInputProps,\n InputGroup,\n InputLeftElement,\n InputRightElement,\n} from '@chakra-ui/react';\nimport { withFormControl, WithFormControlProps } from '../FormControl/formControl.component';\nimport { FormControlSize } from '../FormControl/formControl.types';\nimport { ClearButton } from './components/ClearButton/clearButton.component';\n\nexport interface TextInputBaseProps extends WithFormControlProps, CInputProps {\n leftElement?: ReactElement;\n rightElement?: ReactElement;\n inputRef?: ForwardedRef<HTMLInputElement>;\n size?: FormControlSize;\n}\n\nexport interface DefaultTextInputProps extends TextInputBaseProps {\n isClearable?: never;\n onClear?: never;\n}\n\nexport interface ClearableTextInputProps extends TextInputBaseProps {\n isClearable: boolean;\n onClear: (val: string | number | readonly string[]) => void;\n}\n\nexport type TextInputProps = DefaultTextInputProps | ClearableTextInputProps;\n\nconst TextInput = withFormControl(({ isClearable = false, size = 'md', ...props }: TextInputProps): JSX.Element => {\n const { leftElement, inputRef, isFieldInline, onClear, value, ...domProps } = props;\n let { rightElement } = props;\n\n const handleClear = (): void => {\n if (onClear) {\n onClear(value || '');\n }\n };\n\n if (isClearable && !!value) {\n rightElement = <ClearButton size={size} handleClear={handleClear} />;\n }\n\n return (\n <InputGroup>\n {leftElement ? <InputLeftElement children={leftElement} h=\"100%\" /> : null}\n <CInput {...domProps} ref={inputRef} size={size} value={value} />\n {rightElement ? <InputRightElement children={rightElement} h=\"100%\" /> : null}\n </InputGroup>\n );\n});\n\nconst WrappedTextInput = forwardRef((props: TextInputProps, ref: ForwardedRef<HTMLInputElement>) => (\n <TextInput inputRef={ref} {...props} />\n));\n\nWrappedTextInput.displayName = 'TextInput';\n\nexport { WrappedTextInput as TextInput };\n"],"names":["closeButtonSize","xs","sm","md","lg","ClearButton","_a","handleClear","_b","size","colors","useTheme","React","createElement","Button","color","icon","light","default","display","minW","w","h","variant","opacity","_hover","_active","mr","onClick","Icon","name","colorToken","TextInput","withFormControl","isClearable","_c","props","__rest","leftElement","inputRef","isFieldInline","onClear","value","domProps","rightElement","InputGroup","InputLeftElement","children","CInput","__assign","ref","InputRightElement","WrappedTextInput","forwardRef","displayName"],"mappings":"0XAEaA,EAAmD,CAC9DC,GAAI,EACJC,GAAI,EACJC,GAAI,EACJC,GAAI,GCMOC,EAAc,SAACC,GAAE,IAAAC,gBAAaC,EAAAF,EA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E8B,EAAmBC,EAAUA,YAAC,SAACjB,EAAuBc,GAAwC,OAClGtC,EAAAA,QAAAC,cAACmB,EAAUiB,EAAAA,SAAA,CAAAV,SAAUW,GAASd,OAGhCgB,EAAiBE,YAAc"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var e=require("./tslib.es6-f01c41a6.js"),r=require("react"),t=require("./formControl.component-6ce1e8a6.js"),a=require("./chakra-ui-textarea.esm-965918fa.js");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=n(r),f=t.withFormControl((function(r){r.isFieldInline;var t=r.textareaRef,n=e.__rest(r,["isFieldInline","textareaRef"]);return i.default.createElement(a.Textarea,e.__assign({},n,{ref:t}))})),s=r.forwardRef((function(r,t){return i.default.createElement(f,e.__assign({textareaRef:t},r))}));s.displayName="Textarea",exports.WrappedTextArea=s;
|
|
2
|
+
//# sourceMappingURL=textarea.component-dd1bfd72.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"textarea.component-
|
|
1
|
+
{"version":3,"file":"textarea.component-dd1bfd72.js","sources":["../src/components/Textarea/textarea.component.tsx"],"sourcesContent":["import React, { ForwardedRef, forwardRef } from 'react';\nimport { Textarea as CTextarea, TextareaProps as CTextareaProps } from '@chakra-ui/react';\nimport { withFormControl, WithFormControlProps } from '../FormControl/formControl.component';\nimport { FormControlSize } from '../FormControl/formControl.types';\n\nexport interface TextareaProps extends WithFormControlProps, CTextareaProps {\n textareaRef?: ForwardedRef<HTMLTextAreaElement>;\n size?: FormControlSize;\n}\n\nconst Textarea = withFormControl((props: TextareaProps): JSX.Element => {\n const { isFieldInline, textareaRef, ...domProps } = props;\n\n return <CTextarea {...domProps} ref={textareaRef} />;\n});\n\nconst WrappedTextArea = forwardRef((props: TextareaProps, ref: ForwardedRef<HTMLTextAreaElement>) => (\n <Textarea textareaRef={ref} {...props} />\n));\n\nWrappedTextArea.displayName = 'Textarea';\n\nexport { WrappedTextArea as Textarea };\n"],"names":["Textarea","withFormControl","props","isFieldInline","textareaRef","domProps","__rest","React","createElement","CTextarea","__assign","ref","WrappedTextArea","forwardRef","displayName"],"mappings":"+PAUMA,EAAWC,EAAAA,iBAAgB,SAACC,GACoBA,EAA/BC,kBAAEC,EAA6BF,EAAlBE,YAAKC,EAAaC,EAAAA,OAAAJ,EAA9C,CAAA,gBAAA,gBAEN,OAAOK,UAAAC,cAACC,EAAST,SAAKU,WAAA,GAAAL,GAAUM,IAAKP,QAGjCQ,EAAkBC,EAAUA,YAAC,SAACX,EAAsBS,GAA2C,OACnGJ,EAAAA,QAAAC,cAACR,EAASU,EAAAA,SAAA,CAAAN,YAAaO,GAAST,OAGlCU,EAAgBE,YAAc"}
|
package/build/theme/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../theme.provider-
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../theme.provider-f951a0ae.js");require("../tslib.es6-f01c41a6.js"),require("react"),require("../chakra-ui-react.esm-e146fda7.js"),require("../chakra-ui-system.esm-b563b97d.js"),require("../chakra-ui-portal.esm-e1dcde00.js"),require("../chakra-ui-hooks.esm-c49383b7.js"),require("react-dom"),require("../chakra-ui-theme.esm-cc694e08.js"),require("styled-components"),require("../zIndeces-4f459ad7.js"),require("../color.record-8ec2eb8a.js"),require("../fontSizes-6309063a.js"),require("../shadows.config-fd05bf52.js"),require("../avatar.config-90fae63d.js"),require("../menu.config-83ef52b8.js"),require("../inheritsLoose-490721fe.js"),exports.KibbleThemeProvider=e.KibbleThemeProvider,exports.theme=e.theme;
|
|
2
2
|
//# sourceMappingURL=index.js.map
|