@televet/kibble-ui 2.1.42 → 2.1.44-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (172) hide show
  1. package/build/_baseGetTag-fd05839f.js +16 -0
  2. package/build/_baseGetTag-fd05839f.js.map +1 -0
  3. package/build/chakra/index.js +1 -1
  4. package/build/{chakra-ui-modal.esm-2fd23822.js → chakra-ui-modal.esm-78e65380.js} +2 -2
  5. package/build/{chakra-ui-modal.esm-2fd23822.js.map → chakra-ui-modal.esm-78e65380.js.map} +1 -1
  6. package/build/{chakra-ui-skeleton.esm-064cd561.js → chakra-ui-skeleton.esm-3b12a526.js} +2 -2
  7. package/build/{chakra-ui-skeleton.esm-064cd561.js.map → chakra-ui-skeleton.esm-3b12a526.js.map} +1 -1
  8. package/build/components/DatePicker/index.js +1 -1
  9. package/build/components/Menu/components/MenuContainer/index.js +1 -1
  10. package/build/components/Menu/components/MenuList/index.js +1 -1
  11. package/build/components/Menu/components/MenuList/menuList.argTypes.d.ts +1 -1
  12. package/build/components/Menu/components/MenuList/menuList.stories.d.ts +1 -1
  13. package/build/components/Menu/context/menu.context.d.ts +3 -1
  14. package/build/components/Menu/examples/withAvatars.stories.d.ts +1 -1
  15. package/build/components/Menu/examples/withCustomChildren.stories.d.ts +1 -1
  16. package/build/components/Menu/examples/withCustomLabel.stories.d.ts +1 -1
  17. package/build/components/Menu/examples/withGroups.stories.d.ts +1 -1
  18. package/build/components/Menu/examples/withIconButton.stories.d.ts +1 -1
  19. package/build/components/Menu/examples/withIcons.stories.d.ts +1 -1
  20. package/build/components/Menu/examples/withManyMenuItems.stories.d.ts +1 -1
  21. package/build/components/Menu/examples/withMultiSelect.stories.d.ts +1 -1
  22. package/build/components/Menu/examples/withPortal.stories.d.ts +1 -1
  23. package/build/components/Menu/examples/withScroll.stories.d.ts +1 -1
  24. package/build/components/Menu/examples/withSearch.stories.d.ts +1 -1
  25. package/build/components/Menu/examples/withSearchAndMultiSelect.stories.d.ts +1 -1
  26. package/build/components/Menu/examples/withSwatch.stories.d.ts +1 -1
  27. package/build/components/Menu/index.js +1 -1
  28. package/build/components/Menu/menu.component.d.ts +2 -1
  29. package/build/components/Menu/menu.stories.d.ts +1 -1
  30. package/build/components/Modal/components/ModalBody/index.js +1 -1
  31. package/build/components/Modal/components/ModalCloseButton/index.js +1 -1
  32. package/build/components/Modal/components/ModalExpandButton/index.js +1 -1
  33. package/build/components/Modal/components/ModalFooter/index.js +1 -1
  34. package/build/components/Modal/components/ModalFooterButtons/index.js +1 -1
  35. package/build/components/Modal/components/ModalHeader/index.js +1 -1
  36. package/build/components/Modal/index.js +1 -1
  37. package/build/components/Modal/modal.argTypes.d.ts +5 -0
  38. package/build/components/Modal/modal.component.d.ts +6 -9
  39. package/build/components/Modal/modal.stories.d.ts +2 -69
  40. package/build/components/NotificationCounter/index.js +1 -1
  41. package/build/components/Select/components/SelectList/selectList.argTypes.d.ts +1 -1
  42. package/build/components/Select/components/SelectList/selectList.stories.d.ts +1 -1
  43. package/build/components/Select/index.js +1 -1
  44. package/build/components/Select/select.component.d.ts +2 -0
  45. package/build/components/SortableList/components/SortableItem/index.js +1 -1
  46. package/build/components/SortableList/index.js +1 -1
  47. package/build/components/Spinner/index.js +1 -1
  48. package/build/components/Tabs/components/Tab/index.js +1 -1
  49. package/build/components/Tabs/index.js +1 -1
  50. package/build/components/TabsLayout/index.js +1 -1
  51. package/build/components/TimePicker/examples/withCustomPickerPlacement.stories.d.ts +2 -83
  52. package/build/components/TimePicker/examples/withFormControls.stories.d.ts +2 -83
  53. package/build/components/TimePicker/examples/withMidnightUTCInitialTime.stories.d.ts +2 -83
  54. package/build/components/TimePicker/examples/withScrollableParentContainer.stories.d.ts +2 -83
  55. package/build/components/TimePicker/examples/withTenMinuteInterval.stories.d.ts +2 -83
  56. package/build/components/TimePicker/examples/withoutInputIcon.stories.d.ts +2 -83
  57. package/build/components/TimePicker/index.js +1 -1
  58. package/build/components/TimePicker/timePicker.argTypes.d.ts +3 -82
  59. package/build/components/TimePicker/timePicker.component.d.ts +2 -1
  60. package/build/components/TimePicker/timePicker.stories.d.ts +2 -83
  61. package/build/components/TimeRange/index.js +1 -1
  62. package/build/components/Toast/index.js +1 -1
  63. package/build/components/index.js +1 -1
  64. package/build/conversationCard.component-2598f51b.js +2 -0
  65. package/build/conversationCard.component-2598f51b.js.map +1 -0
  66. package/build/datepicker.component-db41944b.js +2 -0
  67. package/build/datepicker.component-db41944b.js.map +1 -0
  68. package/build/{index-8fecff45.js → index-5fadfa34.js} +1 -1
  69. package/build/{index-8fecff45.js.map → index-5fadfa34.js.map} +1 -1
  70. package/build/index.js +1 -1
  71. package/build/menu.component-1c7b7922.js +2 -0
  72. package/build/menu.component-1c7b7922.js.map +1 -0
  73. package/build/menu.context-66211f5a.js +2 -0
  74. package/build/menu.context-66211f5a.js.map +1 -0
  75. package/build/{menuContainer.component-e3bfd942.js → menuContainer.component-17d9413b.js} +2 -2
  76. package/build/{menuContainer.component-e3bfd942.js.map → menuContainer.component-17d9413b.js.map} +1 -1
  77. package/build/menuList.component-6726d116.js +2 -0
  78. package/build/menuList.component-6726d116.js.map +1 -0
  79. package/build/modalBody.component-32bfa24d.js +2 -0
  80. package/build/modalBody.component-32bfa24d.js.map +1 -0
  81. package/build/{modalCloseButton.component-1b2408fc.js → modalCloseButton.component-718538ae.js} +2 -2
  82. package/build/modalCloseButton.component-718538ae.js.map +1 -0
  83. package/build/modalExpandButton.component-c87de258.js +2 -0
  84. package/build/{modalExpandButton.component-31be810d.js.map → modalExpandButton.component-c87de258.js.map} +1 -1
  85. package/build/modalFooter.component-682dcdcf.js +2 -0
  86. package/build/modalFooter.component-682dcdcf.js.map +1 -0
  87. package/build/{modalFooterButtons.component-41107377.js → modalFooterButtons.component-1f62ec67.js} +2 -2
  88. package/build/modalFooterButtons.component-1f62ec67.js.map +1 -0
  89. package/build/modalHeader.component-a604a2a9.js +2 -0
  90. package/build/modalHeader.component-a604a2a9.js.map +1 -0
  91. package/build/notificationCounter.component-663ff0e5.js +2 -0
  92. package/build/notificationCounter.component-663ff0e5.js.map +1 -0
  93. package/build/notificationCounter.types-799d7b6c.js +2 -0
  94. package/build/notificationCounter.types-799d7b6c.js.map +1 -0
  95. package/build/patterns/ConversationCard/components/conversationCardHeader.component.d.ts +1 -1
  96. package/build/patterns/ConversationCard/index.js +1 -1
  97. package/build/patterns/TagBlock/examples/withDelete.stories.d.ts +16 -0
  98. package/build/patterns/TagBlock/examples/withErrorState.stories.d.ts +16 -0
  99. package/build/patterns/TagBlock/index.d.ts +1 -0
  100. package/build/patterns/TagBlock/index.js +2 -0
  101. package/build/patterns/TagBlock/index.js.map +1 -0
  102. package/build/patterns/TagBlock/tagBlock.argTypes.d.ts +3 -0
  103. package/build/patterns/TagBlock/tagBlock.component.d.ts +25 -0
  104. package/build/patterns/TagBlock/tagBlock.stories.d.ts +13 -0
  105. package/build/patterns/TagBlock/tagBlock.storiesData.d.ts +4 -0
  106. package/build/patterns/index.d.ts +1 -0
  107. package/build/patterns/index.js +1 -1
  108. package/build/select.component-bc77ddb8.js +2 -0
  109. package/build/select.component-bc77ddb8.js.map +1 -0
  110. package/build/shared/argTypes/dataTestId.argTypes.d.ts +9 -0
  111. package/build/sortable.esm-53c38ebd.js +2 -0
  112. package/build/sortable.esm-53c38ebd.js.map +1 -0
  113. package/build/sortableItem.component-ce1a7136.js +2 -0
  114. package/build/sortableItem.component-ce1a7136.js.map +1 -0
  115. package/build/sortableList.component-84706639.js +2 -0
  116. package/build/{sortableList.component-19cfab79.js.map → sortableList.component-84706639.js.map} +1 -1
  117. package/build/spinner.component-cc68be51.js +5 -0
  118. package/build/spinner.component-cc68be51.js.map +1 -0
  119. package/build/tab.component-4bc42ecf.js +2 -0
  120. package/build/{tab.component-bec1f23b.js.map → tab.component-4bc42ecf.js.map} +1 -1
  121. package/build/{tabs.component-4ebd608e.js → tabs.component-cf2fbb08.js} +2 -2
  122. package/build/{tabs.component-4ebd608e.js.map → tabs.component-cf2fbb08.js.map} +1 -1
  123. package/build/{tabsLayout.component-29538cfd.js → tabsLayout.component-5bf54ef2.js} +2 -2
  124. package/build/{tabsLayout.component-29538cfd.js.map → tabsLayout.component-5bf54ef2.js.map} +1 -1
  125. package/build/tagBlock.component-c7948fcc.js +2 -0
  126. package/build/tagBlock.component-c7948fcc.js.map +1 -0
  127. package/build/theme/theme.provider.d.ts +1 -1
  128. package/build/theme.provider-c90458aa.js.map +1 -1
  129. package/build/timePicker.component-0ec971ce.js +2 -0
  130. package/build/timePicker.component-0ec971ce.js.map +1 -0
  131. package/build/timePicker.types-eedca939.js +2 -0
  132. package/build/timePicker.types-eedca939.js.map +1 -0
  133. package/build/{timeRange.component-2f4d987d.js → timeRange.component-ae9766c0.js} +2 -2
  134. package/build/{timeRange.component-2f4d987d.js.map → timeRange.component-ae9766c0.js.map} +1 -1
  135. package/build/useExpandButton-cbdd16ef.js +2 -0
  136. package/build/useExpandButton-cbdd16ef.js.map +1 -0
  137. package/build/{useToast-e936bea0.js → useToast-bd77944c.js} +2 -2
  138. package/build/{useToast-e936bea0.js.map → useToast-bd77944c.js.map} +1 -1
  139. package/package.json +1 -1
  140. package/build/conversationCard.component-b4610335.js +0 -2
  141. package/build/conversationCard.component-b4610335.js.map +0 -1
  142. package/build/datepicker.component-ad5aca47.js +0 -16
  143. package/build/datepicker.component-ad5aca47.js.map +0 -1
  144. package/build/menu.component-194d1bc0.js +0 -2
  145. package/build/menu.component-194d1bc0.js.map +0 -1
  146. package/build/menu.context-cb4a0b0d.js +0 -2
  147. package/build/menu.context-cb4a0b0d.js.map +0 -1
  148. package/build/menuList.component-adc27103.js +0 -2
  149. package/build/menuList.component-adc27103.js.map +0 -1
  150. package/build/modalBody.component-db8de2f3.js +0 -2
  151. package/build/modalBody.component-db8de2f3.js.map +0 -1
  152. package/build/modalCloseButton.component-1b2408fc.js.map +0 -1
  153. package/build/modalExpandButton.component-31be810d.js +0 -2
  154. package/build/modalFooter.component-ccce9ce5.js +0 -2
  155. package/build/modalFooter.component-ccce9ce5.js.map +0 -1
  156. package/build/modalFooterButtons.component-41107377.js.map +0 -1
  157. package/build/modalHeader.component-c7a12376.js +0 -2
  158. package/build/modalHeader.component-c7a12376.js.map +0 -1
  159. package/build/notificationCounter.component-24f3f4ab.js +0 -2
  160. package/build/notificationCounter.component-24f3f4ab.js.map +0 -1
  161. package/build/select.component-56904ffe.js +0 -2
  162. package/build/select.component-56904ffe.js.map +0 -1
  163. package/build/sortableItem.component-3bdead95.js +0 -2
  164. package/build/sortableItem.component-3bdead95.js.map +0 -1
  165. package/build/sortableList.component-19cfab79.js +0 -2
  166. package/build/spinner.component-13277479.js +0 -5
  167. package/build/spinner.component-13277479.js.map +0 -1
  168. package/build/tab.component-bec1f23b.js +0 -2
  169. package/build/timePicker.component-8b9103d5.js +0 -2
  170. package/build/timePicker.component-8b9103d5.js.map +0 -1
  171. package/build/useExpandButton-62442c9f.js +0 -2
  172. package/build/useExpandButton-62442c9f.js.map +0 -1
@@ -0,0 +1,2 @@
1
+ "use strict";var e=require("./tslib.es6-d6f17add.js"),r=require("react"),t=require("./chakra-ui-modal.esm-78e65380.js");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=a(r);exports.ModalFooter=r=>{var{children:a}=r,s=e.__rest(r,["children"]);return o.default.createElement(t.ModalFooter,Object.assign({pb:6,className:"Modal__Footer"},s),a)};
2
+ //# sourceMappingURL=modalFooter.component-682dcdcf.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"modalFooter.component-682dcdcf.js","sources":["../src/components/Modal/components/ModalFooter/modalFooter.component.tsx"],"sourcesContent":["import React from 'react';\nimport { ModalFooter as CModalFooter, ModalFooterProps as CModalFooterProps } from '@chakra-ui/react';\n\nexport interface ModalFooterProps extends CModalFooterProps {}\n\nexport const ModalFooter = ({ children, ...rest }: ModalFooterProps): JSX.Element => {\n return (\n <CModalFooter pb={6} className=\"Modal__Footer\" {...rest}>\n {children}\n </CModalFooter>\n );\n};\n"],"names":["_a","children","rest","__rest","React","createElement","CModalFooter","ModalFooter","Object","assign","pb","className"],"mappings":"+NAK4BA,IAAA,IAAAC,SAAEA,GAAqCD,EAAxBE,EAAIC,EAAAA,OAAAH,EAAnB,cAC1B,OACEI,EAAC,QAAAC,cAAAC,EAAYC,YAACC,OAAAC,OAAA,CAAAC,GAAI,EAAGC,UAAU,iBAAoBT,GAChDD"}
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("./tslib.es6-d6f17add.js"),t=require("react"),a=require("./button.component-a1a58584.js"),i=require("./chakra-ui-modal.esm-2fd23822.js"),n=require("./chakra-ui-layout.esm-6ee578f7.js");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=l(t);exports.ModalFooterButtons=t=>{var{submitText:l="Submit",isLoading:o,loadingText:s,isDisabled:u,isDestructive:c,mixpanelName:d,children:m,onSubmit:b,allowCancel:f=!0,onCancel:x}=t,p=e.__rest(t,["submitText","isLoading","loadingText","isDisabled","isDestructive","mixpanelName","children","onSubmit","allowCancel","onCancel"]);const{onClose:C}=i.useModalContext();return r.default.createElement(i.ModalFooter,Object.assign({},p,{pb:6}),r.default.createElement(n.Flex,{w:"100%"},f&&r.default.createElement(a.Button,{variant:"tertiary",onClick:()=>{x&&x(),C()}},"Cancel"),r.default.createElement(n.Spacer,null),r.default.createElement(a.Button,{"data-mixpanel-name":d,onClick:b,isLoading:o,loadingText:s,isDisabled:u,variant:c?"primaryDestructive":"primary"},l)))};
2
- //# sourceMappingURL=modalFooterButtons.component-41107377.js.map
1
+ "use strict";var e=require("./tslib.es6-d6f17add.js"),t=require("react"),a=require("./button.component-a1a58584.js"),i=require("./chakra-ui-modal.esm-78e65380.js"),n=require("./chakra-ui-layout.esm-6ee578f7.js");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=l(t);exports.ModalFooterButtons=t=>{var{submitText:l="Submit",isLoading:o,loadingText:s,isDisabled:u,isDestructive:c,mixpanelName:d,children:m,onSubmit:b,allowCancel:f=!0,onCancel:x}=t,p=e.__rest(t,["submitText","isLoading","loadingText","isDisabled","isDestructive","mixpanelName","children","onSubmit","allowCancel","onCancel"]);const{onClose:C}=i.useModalContext();return r.default.createElement(i.ModalFooter,Object.assign({className:"Modal__FooterButtons"},p,{pb:6}),r.default.createElement(n.Flex,{w:"100%"},f&&r.default.createElement(a.Button,{variant:"tertiary",onClick:()=>{x&&x(),C()}},"Cancel"),r.default.createElement(n.Spacer,null),r.default.createElement(a.Button,{"data-mixpanel-name":d,onClick:b,isLoading:o,loadingText:s,isDisabled:u,variant:c?"primaryDestructive":"primary"},l)))};
2
+ //# sourceMappingURL=modalFooterButtons.component-1f62ec67.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"modalFooterButtons.component-1f62ec67.js","sources":["../src/components/Modal/components/ModalFooterButtons/modalFooterButtons.component.tsx"],"sourcesContent":["import React from 'react';\nimport {\n ModalFooter as CModalFooter,\n ModalFooterProps as CModalFooterProps,\n useModalContext,\n Flex,\n Spacer,\n} from '@chakra-ui/react';\nimport { Button } from '../../../Button/button.component';\n\nexport interface ModalFooterButtonProps extends CModalFooterProps {\n mixpanelName?: string;\n submitText?: string;\n isLoading?: boolean;\n loadingText?: string;\n isDisabled?: boolean;\n isDestructive?: boolean;\n onSubmit?: () => void | Promise<void>;\n allowCancel?: boolean;\n onCancel?: () => void;\n}\n\nexport const ModalFooterButtons = ({\n submitText = 'Submit',\n isLoading,\n loadingText,\n isDisabled,\n isDestructive,\n mixpanelName,\n children,\n onSubmit,\n allowCancel = true,\n onCancel,\n ...rest\n}: ModalFooterButtonProps): JSX.Element => {\n const { onClose } = useModalContext();\n\n const handleCancel = (): void => {\n if (onCancel) {\n onCancel();\n }\n onClose();\n };\n\n return (\n <CModalFooter className=\"Modal__FooterButtons\" {...rest} pb={6}>\n <Flex w=\"100%\">\n {allowCancel && (\n <Button variant=\"tertiary\" onClick={handleCancel}>\n Cancel\n </Button>\n )}\n <Spacer />\n <Button\n data-mixpanel-name={mixpanelName}\n onClick={onSubmit}\n isLoading={isLoading}\n loadingText={loadingText}\n isDisabled={isDisabled}\n variant={isDestructive ? 'primaryDestructive' : 'primary'}\n >\n {submitText}\n </Button>\n </Flex>\n </CModalFooter>\n );\n};\n"],"names":["_a","submitText","isLoading","loadingText","isDisabled","isDestructive","mixpanelName","children","onSubmit","allowCancel","onCancel","rest","__rest","onClose","useModalContext","React","createElement","CModalFooter","Object","assign","className","pb","Flex","w","Button","variant","onClick","Spacer"],"mappings":"kUAsBmCA,IAAA,IAAAC,WACjCA,EAAa,SAAQC,UACrBA,EAASC,YACTA,EAAWC,WACXA,EAAUC,cACVA,EAAaC,aACbA,EAAYC,SACZA,EAAQC,SACRA,EAAQC,YACRA,GAAc,EAAIC,SAClBA,GAAQV,EACLW,EAX8BC,EAAAA,OAAAZ,EAAA,CAAA,aAAA,YAAA,cAAA,aAAA,gBAAA,eAAA,WAAA,WAAA,cAAA,aAajC,MAAMa,QAAEA,GAAYC,EAAAA,kBASpB,OACEC,EAAA,QAAAC,cAACC,cAAYC,OAAAC,OAAA,CAACC,UAAU,wBAA2BT,EAAI,CAAEU,GAAI,IAC3DN,EAAAA,QAAAC,cAACM,EAAAA,KAAI,CAACC,EAAE,QACLd,GACCM,EAAC,QAAAC,cAAAQ,EAAAA,OAAO,CAAAC,QAAQ,WAAWC,QAXd,KACfhB,GACFA,IAEFG,gBAWIE,UAAAC,cAACW,EAAMA,OAAG,MACVZ,UAAAC,cAACQ,EAAMA,OACe,CAAA,qBAAAlB,EACpBoB,QAASlB,EACTN,UAAWA,EACXC,YAAaA,EACbC,WAAYA,EACZqB,QAASpB,EAAgB,qBAAuB,WAE/CJ"}
@@ -0,0 +1,2 @@
1
+ "use strict";var e=require("./tslib.es6-d6f17add.js"),r=require("react"),a=require("./heading.component-95e89325.js"),t=require("./chakra-ui-modal.esm-78e65380.js");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=d(r);exports.ModalHeader=r=>{var{size:d="md",children:s}=r,l=e.__rest(r,["size","children"]);return i.default.createElement(t.ModalHeader,Object.assign({className:"Modal__Header",px:6,pt:6,pb:2},l),i.default.createElement(a.WrappedHeading,{size:d},s))};
2
+ //# sourceMappingURL=modalHeader.component-a604a2a9.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"modalHeader.component-a604a2a9.js","sources":["../src/components/Modal/components/ModalHeader/modalHeader.component.tsx"],"sourcesContent":["import React from 'react';\nimport { ModalHeader as CModalHeader, ModalHeaderProps as CModalHeaderProps } from '@chakra-ui/react';\nimport { HeadingSize } from '../../../Heading/heading.types';\nimport { Heading } from '../../../Heading/heading.component';\n\nexport interface ModalHeaderProps extends CModalHeaderProps {\n size?: HeadingSize;\n}\n\nexport const ModalHeader = ({ size = 'md', children, ...rest }: ModalHeaderProps): JSX.Element => {\n return (\n <CModalHeader className=\"Modal__Header\" px={6} pt={6} pb={2} {...rest}>\n <Heading size={size}>{children}</Heading>\n </CModalHeader>\n );\n};\n"],"names":["_a","size","children","rest","__rest","React","CModalHeader","Object","assign","className","px","pt","pb","createElement","Heading"],"mappings":"4QAS4BA,QAAAC,KAAEA,EAAO,KAAIC,SAAEA,KAAaC,EAA5BC,EAAAA,OAAAJ,EAAA,CAAA,OAAA,aAC1B,OACEK,EAAAA,sBAACC,EAAAA,YAAYC,OAAAC,OAAA,CAACC,UAAU,gBAAgBC,GAAI,EAAGC,GAAI,EAAGC,GAAI,GAAOT,GAC/DE,EAAC,QAAAQ,cAAAC,iBAAQ,CAAAb,KAAMA,GAAOC"}
@@ -0,0 +1,2 @@
1
+ "use strict";var t=require("./tslib.es6-d6f17add.js"),e=require("react"),o=require("./notificationCounter.types-799d7b6c.js"),r=require("./chakra-ui-layout.esm-6ee578f7.js");function n(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var a=n(e);const i={xs:3,sm:4,md:5,lg:6},u={xs:"8px",sm:"10px",md:"12px",lg:"14px"},s={xs:"1px",sm:"2px",md:"3px",lg:"4px"};exports.NotificationCounter=e=>{var{count:n=0,size:d="md",showCount:c=!0,variant:l=o.NotificationCounterVariant.Red}=e,f=t.__rest(e,["count","size","showCount","variant"]);const x="xs"!==d&&c,b={[o.NotificationCounterVariant.Red]:{backgroundColor:"background.danger",color:"text.onContrast"},[o.NotificationCounterVariant.Neutral]:{backgroundColor:"background.lessSubtle",color:"text.default"}},g=n>99?a.default.createElement(r.Box,{backgroundColor:b[l].color,borderRadius:"full",height:s[d],width:s[d]}):n>0&&n;return a.default.createElement(r.Flex,Object.assign({},f,{className:"NotifcationCounter",alignItems:"center",border:"1px",borderColor:"background.default",borderRadius:"full",fontSize:u[d],fontWeight:"bold",height:i[d],justifyContent:"center",width:i[d]},b[l]),x&&g)};
2
+ //# sourceMappingURL=notificationCounter.component-663ff0e5.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notificationCounter.component-663ff0e5.js","sources":["../src/components/NotificationCounter/notificationCounter.records.ts","../src/components/NotificationCounter/notificationCounter.component.tsx"],"sourcesContent":["import { NotificationCounterSize } from './notificationCounter.types';\n\nexport const MAX_COUNT = 99;\n\nexport const notificationCounterSizes: Record<NotificationCounterSize, number> = {\n xs: 3,\n sm: 4,\n md: 5,\n lg: 6,\n};\n\nexport const notificationCounterFontSizes: Record<NotificationCounterSize, string> = {\n xs: '8px', // Not used since the xs size doesn't show a label\n sm: '10px',\n md: '12px',\n lg: '14px',\n};\n\nexport const maxNotificationCounterSizes: Record<NotificationCounterSize, string> = {\n xs: '1px', // Not used since the xs size doesn't show a label\n sm: '2px',\n md: '3px',\n lg: '4px',\n};\n","import React from 'react';\nimport { NotificationCounterSize, NotificationCounterVariant } from './notificationCounter.types';\nimport { Box, Flex, FlexProps } from '@chakra-ui/react';\nimport {\n MAX_COUNT,\n maxNotificationCounterSizes,\n notificationCounterFontSizes,\n notificationCounterSizes,\n} from './notificationCounter.records';\n\nexport interface NotificationCounterProps extends FlexProps {\n count?: number;\n size?: NotificationCounterSize;\n showCount?: boolean;\n variant?: NotificationCounterVariant;\n}\n\nexport const NotificationCounter = ({\n count = 0,\n size = 'md',\n showCount = true,\n variant = NotificationCounterVariant.Red,\n ...rest\n}: NotificationCounterProps): JSX.Element => {\n const _showCount = size === 'xs' ? false : showCount; // By default the xs size doesn't show a label\n\n const notificationVariantStyles = {\n [NotificationCounterVariant.Red]: {\n backgroundColor: 'background.danger',\n color: 'text.onContrast',\n },\n [NotificationCounterVariant.Neutral]: {\n backgroundColor: 'background.lessSubtle',\n color: 'text.default',\n },\n };\n\n const counterContent =\n count > MAX_COUNT ? (\n <Box\n backgroundColor={notificationVariantStyles[variant].color}\n borderRadius=\"full\"\n height={maxNotificationCounterSizes[size]}\n width={maxNotificationCounterSizes[size]}\n />\n ) : (\n count > 0 && count\n );\n\n return (\n <Flex\n {...rest}\n className=\"NotifcationCounter\"\n alignItems=\"center\"\n border=\"1px\"\n borderColor=\"background.default\"\n borderRadius=\"full\"\n fontSize={notificationCounterFontSizes[size]}\n fontWeight=\"bold\"\n height={notificationCounterSizes[size]}\n justifyContent=\"center\"\n width={notificationCounterSizes[size]}\n {...notificationVariantStyles[variant]}\n >\n {_showCount && counterContent}\n </Flex>\n );\n};\n"],"names":["notificationCounterSizes","xs","sm","md","lg","notificationCounterFontSizes","maxNotificationCounterSizes","_a","count","size","showCount","variant","NotificationCounterVariant","Red","rest","__rest","_showCount","notificationVariantStyles","backgroundColor","color","Neutral","counterContent","React","createElement","Box","borderRadius","height","width","Flex","Object","assign","className","alignItems","border","borderColor","fontSize","fontWeight","justifyContent"],"mappings":"iQAEO,MAEMA,EAAoE,CAC/EC,GAAI,EACJC,GAAI,EACJC,GAAI,EACJC,GAAI,GAGOC,EAAwE,CACnFJ,GAAI,MACJC,GAAI,OACJC,GAAI,OACJC,GAAI,QAGOE,EAAuE,CAClFL,GAAI,MACJC,GAAI,MACJC,GAAI,MACJC,GAAI,mCCL8BG,QAAAC,MAClCA,EAAQ,EAACC,KACTA,EAAO,KAAIC,UACXA,GAAY,EAAIC,QAChBA,EAAUC,6BAA2BC,OAClCC,EAL+BC,EAAAA,OAAAR,EAAA,CAAA,QAAA,OAAA,YAAA,YAOlC,MAAMS,EAAsB,OAATP,GAAwBC,EAErCO,EAA4B,CAChC,CAACL,EAAAA,2BAA2BC,KAAM,CAChCK,gBAAiB,oBACjBC,MAAO,mBAET,CAACP,EAAAA,2BAA2BQ,SAAU,CACpCF,gBAAiB,wBACjBC,MAAO,iBAILE,EACJb,EDpCqB,GCqCnBc,EAAC,QAAAC,cAAAC,OACCN,gBAAiBD,EAA0BN,GAASQ,MACpDM,aAAa,OACbC,OAAQpB,EAA4BG,GACpCkB,MAAOrB,EAA4BG,KAGrCD,EAAQ,GAAKA,EAGjB,OACEc,EAAA,QAAAC,cAACK,OAAIC,OAAAC,OAAA,GACChB,EAAI,CACRiB,UAAU,qBACVC,WAAW,SACXC,OAAO,MACPC,YAAY,qBACZT,aAAa,OACbU,SAAU9B,EAA6BI,GACvC2B,WAAW,OACXV,OAAQ1B,EAAyBS,GACjC4B,eAAe,SACfV,MAAO3B,EAAyBS,IAC5BQ,EAA0BN,IAE7BK,GAAcK"}
@@ -0,0 +1,2 @@
1
+ "use strict";var t;exports.NotificationCounterVariant=void 0,(t=exports.NotificationCounterVariant||(exports.NotificationCounterVariant={})).Red="red",t.Neutral="neutral";
2
+ //# sourceMappingURL=notificationCounter.types-799d7b6c.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notificationCounter.types-799d7b6c.js","sources":["../src/components/NotificationCounter/notificationCounter.types.ts"],"sourcesContent":["export type NotificationCounterSize = 'lg' | 'md' | 'sm' | 'xs';\n\nexport enum NotificationCounterVariant {\n Red = 'red',\n Neutral = 'neutral',\n}\n"],"names":["NotificationCounterVariant"],"mappings":"aAEA,IAAYA,EAAAA,QAGXA,gCAAA,GAHWA,EAAAA,QAA0BA,6BAA1BA,mCAGX,KAFC,IAAA,MACAA,EAAA,QAAA"}
@@ -1,4 +1,4 @@
1
- import { TimestampProps } from 'patterns/Timestamp';
1
+ import { TimestampProps } from '../../Timestamp';
2
2
  import { ConversationCardAvatarGroupProps } from './conversationCardAvatarGroup.component';
3
3
  export interface ConversationCardHeaderProps {
4
4
  avatarGroupProps?: ConversationCardAvatarGroupProps;
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../conversationCard.component-b4610335.js");require("react"),require("../../card.component-de5d4b2a.js"),require("../../tslib.es6-d6f17add.js"),require("../../chakra-ui-layout.esm-6ee578f7.js"),require("../../chakra-ui-system.esm-c70df670.js"),require("../../chakra-ui-icon.esm-9c49b31b.js"),require("../../timestamp.component-c0c80c32.js"),require("../../text.component-906b3f66.js"),require("../../withTruncation-a62a9e5f.js"),require("../../tooltip.component-197bff7c.js"),require("../../chakra-ui-popper.esm-c15ff4a5.js"),require("../../chakra-ui-portal.esm-bbcb5d1d.js"),require("../../chakra-ui-hooks.esm-21b313f3.js"),require("../../use-animation-state-5054a9f7.esm-c89cafc4.js"),require("react-dom"),require("../../chakra-ui-visually-hidden.esm-b758df74.js"),require("../../motion-7de675ca.js"),require("../../index-5a9be08d.js"),require("../../index-7708e04e.js"),require("../../index-ebcb699d.js"),require("../../notificationCounter.component-24f3f4ab.js"),require("../../icon.component-7fa85e78.js"),require("../../icons/index.js"),require("../../heading.component-95e89325.js"),require("../../avatar.component-aa7483a7.js"),require("../../chakra-ui-avatar.esm-eee70d3a.js"),require("../../chakra-ui-image.esm-66324087.js"),require("../../picture.component-19489bee.js"),require("../../button.component-a1a58584.js"),require("../../chakra-ui-button.esm-bd065780.js"),require("../../menu.context-cb4a0b0d.js"),require("../../checkbox.component-853ac7ff.js"),require("../../withFormControl-fdc277d3.js"),require("../../useTheme-8873c39f.js"),require("../../chakra-ui-form-control.esm-6d25b1a4.js"),require("../../chakra-ui-checkbox.esm-4cded6a7.js"),require("../../textInput.component-9c91685f.js"),require("../../chakra-ui-input.esm-5fd07056.js"),require("../../spinner.component-13277479.js"),require("../../menu.component-194d1bc0.js"),require("../../menuContainer.component-e3bfd942.js"),require("../../chakra-ui-menu.esm-1ed98193.js"),require("../../chakra-ui-clickable.esm-4394877f.js"),require("../../menuButton.component-4cb1b211.js"),require("../../menuList.component-adc27103.js"),require("../../menuItem.component-36706258.js"),require("../../menu.config-14739188.js"),require("../../tag.component-75215361.js"),exports.ConversationCard=e.ConversationCard;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../conversationCard.component-2598f51b.js");require("react"),require("../../card.component-de5d4b2a.js"),require("../../tslib.es6-d6f17add.js"),require("../../chakra-ui-layout.esm-6ee578f7.js"),require("../../chakra-ui-system.esm-c70df670.js"),require("../../chakra-ui-icon.esm-9c49b31b.js"),require("../../timestamp.component-c0c80c32.js"),require("../../text.component-906b3f66.js"),require("../../withTruncation-a62a9e5f.js"),require("../../tooltip.component-197bff7c.js"),require("../../chakra-ui-popper.esm-c15ff4a5.js"),require("../../chakra-ui-portal.esm-bbcb5d1d.js"),require("../../chakra-ui-hooks.esm-21b313f3.js"),require("../../use-animation-state-5054a9f7.esm-c89cafc4.js"),require("react-dom"),require("../../chakra-ui-visually-hidden.esm-b758df74.js"),require("../../motion-7de675ca.js"),require("../../index-5a9be08d.js"),require("../../index-7708e04e.js"),require("../../index-ebcb699d.js"),require("../../notificationCounter.component-663ff0e5.js"),require("../../notificationCounter.types-799d7b6c.js"),require("../../icon.component-7fa85e78.js"),require("../../icons/index.js"),require("../../heading.component-95e89325.js"),require("../../avatar.component-aa7483a7.js"),require("../../chakra-ui-avatar.esm-eee70d3a.js"),require("../../chakra-ui-image.esm-66324087.js"),require("../../picture.component-19489bee.js"),require("../../button.component-a1a58584.js"),require("../../chakra-ui-button.esm-bd065780.js"),require("../../menu.context-66211f5a.js"),require("../../checkbox.component-853ac7ff.js"),require("../../withFormControl-fdc277d3.js"),require("../../useTheme-8873c39f.js"),require("../../chakra-ui-form-control.esm-6d25b1a4.js"),require("../../chakra-ui-checkbox.esm-4cded6a7.js"),require("../../textInput.component-9c91685f.js"),require("../../chakra-ui-input.esm-5fd07056.js"),require("../../spinner.component-cc68be51.js"),require("../../menu.component-1c7b7922.js"),require("../../menuContainer.component-17d9413b.js"),require("../../chakra-ui-menu.esm-1ed98193.js"),require("../../chakra-ui-clickable.esm-4394877f.js"),require("../../menuButton.component-4cb1b211.js"),require("../../menuList.component-6726d116.js"),require("../../menuItem.component-36706258.js"),require("../../menu.config-14739188.js"),require("../../tag.component-75215361.js"),exports.ConversationCard=e.ConversationCard;
2
2
  //# sourceMappingURL=index.js.map
@@ -0,0 +1,16 @@
1
+ /// <reference types="react" />
2
+ import { TagBlockProps } from '../tagBlock.component';
3
+ declare const _default: {
4
+ title: string;
5
+ id: string;
6
+ component: ({ title, menuButtonProps, menuListProps, menuContainerProps, tags, canBeDeleted, onClearAll, onRemoveTag, handleDelete, hasError, errorText, isLoading, dataTestId, }: TagBlockProps) => JSX.Element;
7
+ argTypes: {
8
+ handleDelete: import("@storybook/addons").ArgType<unknown>;
9
+ canBeDeleted: import("@storybook/addons").ArgType<unknown>;
10
+ };
11
+ };
12
+ export default _default;
13
+ export declare const WithDelete: {
14
+ (args: TagBlockProps): JSX.Element;
15
+ args: Partial<TagBlockProps>;
16
+ };
@@ -0,0 +1,16 @@
1
+ /// <reference types="react" />
2
+ import { TagBlockProps } from '../tagBlock.component';
3
+ declare const _default: {
4
+ title: string;
5
+ id: string;
6
+ component: ({ title, menuButtonProps, menuListProps, menuContainerProps, tags, canBeDeleted, onClearAll, onRemoveTag, handleDelete, hasError, errorText, isLoading, dataTestId, }: TagBlockProps) => JSX.Element;
7
+ argTypes: {
8
+ hasError: import("@storybook/addons").ArgType<unknown>;
9
+ errorText: import("@storybook/addons").ArgType<unknown>;
10
+ };
11
+ };
12
+ export default _default;
13
+ export declare const WithErrorState: {
14
+ (args: TagBlockProps): JSX.Element;
15
+ args: Partial<TagBlockProps>;
16
+ };
@@ -0,0 +1 @@
1
+ export * from './tagBlock.component';
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../tagBlock.component-c7948fcc.js");require("react"),require("../../button.component-a1a58584.js"),require("../../tslib.es6-d6f17add.js"),require("../../icon.component-7fa85e78.js"),require("../../icons/index.js"),require("../../chakra-ui-layout.esm-6ee578f7.js"),require("../../chakra-ui-system.esm-c70df670.js"),require("../../chakra-ui-icon.esm-9c49b31b.js"),require("../../chakra-ui-button.esm-bd065780.js"),require("../../chakra-ui-hooks.esm-21b313f3.js"),require("../../use-animation-state-5054a9f7.esm-c89cafc4.js"),require("../../chakra-ui-visually-hidden.esm-b758df74.js"),require("../../heading.component-95e89325.js"),require("../../withTruncation-a62a9e5f.js"),require("../../tooltip.component-197bff7c.js"),require("../../chakra-ui-popper.esm-c15ff4a5.js"),require("../../chakra-ui-portal.esm-bbcb5d1d.js"),require("react-dom"),require("../../motion-7de675ca.js"),require("../../index-5a9be08d.js"),require("../../text.component-906b3f66.js"),require("../../checkbox.component-853ac7ff.js"),require("../../withFormControl-fdc277d3.js"),require("../../useTheme-8873c39f.js"),require("../../chakra-ui-form-control.esm-6d25b1a4.js"),require("../../chakra-ui-checkbox.esm-4cded6a7.js"),require("../../checkboxGroup.component-b47b67da.js"),require("../../_baseGetTag-fd05839f.js"),require("../../menu.component-1c7b7922.js"),require("../../menuContainer.component-17d9413b.js"),require("../../menu.context-66211f5a.js"),require("../../chakra-ui-menu.esm-1ed98193.js"),require("../../chakra-ui-clickable.esm-4394877f.js"),require("../../menuButton.component-4cb1b211.js"),require("../../menuList.component-6726d116.js"),require("../../menuItem.component-36706258.js"),require("../../menu.config-14739188.js"),require("../../textInput.component-9c91685f.js"),require("../../chakra-ui-input.esm-5fd07056.js"),require("../../spinner.component-cc68be51.js"),require("../../link.component-1f789e32.js"),require("../../useIconTextSizeMap-301c4f35.js"),require("../../logo.component-cea68030.js"),require("../../notificationCounter.types-799d7b6c.js"),require("../../radioGroup.component-c5647766.js"),require("../../radio.component-2502a55b.js"),require("../../chakra-ui-radio.esm-f310d451.js"),require("../../select.component-bc77ddb8.js"),require("../../chakra-ui-select.esm-793cf4de.js"),require("../../sortableItem.context-5bba7c97.js"),require("../../core.esm-3a85aed4.js"),require("../../sortable.esm-53c38ebd.js"),require("../../switch.component-5b7de8ce.js"),require("../../tag.component-75215361.js"),require("../../textarea.component-9f0c4b1b.js"),require("../../chakra-ui-textarea.esm-23fad4cd.js"),require("../../timePicker.types-eedca939.js"),exports.TagBlock=e.TagBlock,Object.defineProperty(exports,"TagDisabledState",{enumerable:!0,get:function(){return e.TagDisabledState}});
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ import { KibbleArgTypes } from '../../shared/types/storybook';
2
+ import { TagBlockProps } from './tagBlock.component';
3
+ export declare const tagBlockArgTypes: KibbleArgTypes<TagBlockProps>;
@@ -0,0 +1,25 @@
1
+ import { MenuButtonProps, MenuListProps, MenuContainerProps } from '../../components';
2
+ export declare enum TagDisabledState {
3
+ Inactive = "Inactive",
4
+ Deleted = "Deleted"
5
+ }
6
+ export interface TagBlockTag {
7
+ label: string;
8
+ value: string;
9
+ }
10
+ export interface TagBlockProps {
11
+ title?: string;
12
+ menuButtonProps?: MenuButtonProps;
13
+ menuListProps?: MenuListProps;
14
+ menuContainerProps?: MenuContainerProps;
15
+ tags: TagBlockTag[];
16
+ canBeDeleted?: boolean;
17
+ onClearAll?: () => void;
18
+ onRemoveTag?: (tag: string, selectedTags: TagBlockTag[]) => void;
19
+ handleDelete?: () => void;
20
+ hasError?: boolean;
21
+ errorText?: string;
22
+ isLoading?: boolean;
23
+ dataTestId?: string;
24
+ }
25
+ export declare const TagBlock: ({ title, menuButtonProps, menuListProps, menuContainerProps, tags, canBeDeleted, onClearAll, onRemoveTag, handleDelete, hasError, errorText, isLoading, dataTestId, }: TagBlockProps) => JSX.Element;
@@ -0,0 +1,13 @@
1
+ /// <reference types="react" />
2
+ import { TagBlockProps } from './tagBlock.component';
3
+ declare const _default: {
4
+ title: string;
5
+ id: string;
6
+ component: ({ title, menuButtonProps, menuListProps, menuContainerProps, tags, canBeDeleted, onClearAll, onRemoveTag, handleDelete, hasError, errorText, isLoading, dataTestId, }: TagBlockProps) => JSX.Element;
7
+ argTypes: import("../../shared/types/storybook").KibbleArgTypes<TagBlockProps>;
8
+ };
9
+ export default _default;
10
+ export declare const TagBlockPlayground: {
11
+ (args: TagBlockProps): JSX.Element;
12
+ args: TagBlockProps;
13
+ };
@@ -0,0 +1,4 @@
1
+ import { MenuListProps } from '../../components/Menu';
2
+ import { TagBlockTag } from './tagBlock.component';
3
+ export declare const tags: TagBlockTag[];
4
+ export declare const menuListProps: MenuListProps;
@@ -1,3 +1,4 @@
1
1
  export * from './StyledAvatar';
2
2
  export * from './ConversationCard';
3
3
  export * from './Timestamp';
4
+ export * from './TagBlock';
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../styledAvatar.types-c7230054.js"),r=require("../conversationCard.component-b4610335.js"),i=require("../timestamp.component-c0c80c32.js");require("../tslib.es6-d6f17add.js"),require("../avatar.component-aa7483a7.js"),require("react"),require("../icon.component-7fa85e78.js"),require("../icons/index.js"),require("../chakra-ui-layout.esm-6ee578f7.js"),require("../chakra-ui-system.esm-c70df670.js"),require("../chakra-ui-icon.esm-9c49b31b.js"),require("../tooltip.component-197bff7c.js"),require("../chakra-ui-popper.esm-c15ff4a5.js"),require("../chakra-ui-portal.esm-bbcb5d1d.js"),require("../chakra-ui-hooks.esm-21b313f3.js"),require("../use-animation-state-5054a9f7.esm-c89cafc4.js"),require("react-dom"),require("../chakra-ui-visually-hidden.esm-b758df74.js"),require("../motion-7de675ca.js"),require("../index-5a9be08d.js"),require("../chakra-ui-avatar.esm-eee70d3a.js"),require("../chakra-ui-image.esm-66324087.js"),require("../picture.component-19489bee.js"),require("../card.component-de5d4b2a.js"),require("../notificationCounter.component-24f3f4ab.js"),require("../heading.component-95e89325.js"),require("../withTruncation-a62a9e5f.js"),require("../text.component-906b3f66.js"),require("../button.component-a1a58584.js"),require("../chakra-ui-button.esm-bd065780.js"),require("../menu.context-cb4a0b0d.js"),require("../checkbox.component-853ac7ff.js"),require("../withFormControl-fdc277d3.js"),require("../useTheme-8873c39f.js"),require("../chakra-ui-form-control.esm-6d25b1a4.js"),require("../chakra-ui-checkbox.esm-4cded6a7.js"),require("../textInput.component-9c91685f.js"),require("../chakra-ui-input.esm-5fd07056.js"),require("../spinner.component-13277479.js"),require("../menu.component-194d1bc0.js"),require("../menuContainer.component-e3bfd942.js"),require("../chakra-ui-menu.esm-1ed98193.js"),require("../chakra-ui-clickable.esm-4394877f.js"),require("../menuButton.component-4cb1b211.js"),require("../menuList.component-adc27103.js"),require("../menuItem.component-36706258.js"),require("../menu.config-14739188.js"),require("../tag.component-75215361.js"),require("../index-7708e04e.js"),require("../index-ebcb699d.js"),exports.StyledAvatar=e.StyledAvatar,exports.styledAvatarTypes=e.styledAvatarTypes,exports.ConversationCard=r.ConversationCard,exports.Timestamp=i.Timestamp;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../styledAvatar.types-c7230054.js"),r=require("../conversationCard.component-2598f51b.js"),i=require("../timestamp.component-c0c80c32.js"),s=require("../tagBlock.component-c7948fcc.js");require("../tslib.es6-d6f17add.js"),require("../avatar.component-aa7483a7.js"),require("react"),require("../icon.component-7fa85e78.js"),require("../icons/index.js"),require("../chakra-ui-layout.esm-6ee578f7.js"),require("../chakra-ui-system.esm-c70df670.js"),require("../chakra-ui-icon.esm-9c49b31b.js"),require("../tooltip.component-197bff7c.js"),require("../chakra-ui-popper.esm-c15ff4a5.js"),require("../chakra-ui-portal.esm-bbcb5d1d.js"),require("../chakra-ui-hooks.esm-21b313f3.js"),require("../use-animation-state-5054a9f7.esm-c89cafc4.js"),require("react-dom"),require("../chakra-ui-visually-hidden.esm-b758df74.js"),require("../motion-7de675ca.js"),require("../index-5a9be08d.js"),require("../chakra-ui-avatar.esm-eee70d3a.js"),require("../chakra-ui-image.esm-66324087.js"),require("../picture.component-19489bee.js"),require("../card.component-de5d4b2a.js"),require("../notificationCounter.component-663ff0e5.js"),require("../notificationCounter.types-799d7b6c.js"),require("../heading.component-95e89325.js"),require("../withTruncation-a62a9e5f.js"),require("../text.component-906b3f66.js"),require("../button.component-a1a58584.js"),require("../chakra-ui-button.esm-bd065780.js"),require("../menu.context-66211f5a.js"),require("../checkbox.component-853ac7ff.js"),require("../withFormControl-fdc277d3.js"),require("../useTheme-8873c39f.js"),require("../chakra-ui-form-control.esm-6d25b1a4.js"),require("../chakra-ui-checkbox.esm-4cded6a7.js"),require("../textInput.component-9c91685f.js"),require("../chakra-ui-input.esm-5fd07056.js"),require("../spinner.component-cc68be51.js"),require("../menu.component-1c7b7922.js"),require("../menuContainer.component-17d9413b.js"),require("../chakra-ui-menu.esm-1ed98193.js"),require("../chakra-ui-clickable.esm-4394877f.js"),require("../menuButton.component-4cb1b211.js"),require("../menuList.component-6726d116.js"),require("../menuItem.component-36706258.js"),require("../menu.config-14739188.js"),require("../tag.component-75215361.js"),require("../index-7708e04e.js"),require("../index-ebcb699d.js"),require("../checkboxGroup.component-b47b67da.js"),require("../_baseGetTag-fd05839f.js"),require("../link.component-1f789e32.js"),require("../useIconTextSizeMap-301c4f35.js"),require("../logo.component-cea68030.js"),require("../radioGroup.component-c5647766.js"),require("../radio.component-2502a55b.js"),require("../chakra-ui-radio.esm-f310d451.js"),require("../select.component-bc77ddb8.js"),require("../chakra-ui-select.esm-793cf4de.js"),require("../sortableItem.context-5bba7c97.js"),require("../core.esm-3a85aed4.js"),require("../sortable.esm-53c38ebd.js"),require("../switch.component-5b7de8ce.js"),require("../textarea.component-9f0c4b1b.js"),require("../chakra-ui-textarea.esm-23fad4cd.js"),require("../timePicker.types-eedca939.js"),exports.StyledAvatar=e.StyledAvatar,exports.styledAvatarTypes=e.styledAvatarTypes,exports.ConversationCard=r.ConversationCard,exports.Timestamp=i.Timestamp,exports.TagBlock=s.TagBlock,Object.defineProperty(exports,"TagDisabledState",{enumerable:!0,get:function(){return s.TagDisabledState}});
2
2
  //# sourceMappingURL=index.js.map
@@ -0,0 +1,2 @@
1
+ "use strict";var e=require("./tslib.es6-d6f17add.js"),t=require("react"),n=require("./menuContainer.component-17d9413b.js"),l=require("./withFormControl-fdc277d3.js"),a=require("./menu.context-66211f5a.js"),r=require("./menuList.component-6726d116.js"),s=require("./text.component-906b3f66.js"),i=require("./chakra-ui-layout.esm-6ee578f7.js"),o=require("./icon.component-7fa85e78.js"),c=require("./chakra-ui-select.esm-793cf4de.js"),u=require("./chakra-ui-menu.esm-1ed98193.js");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var m=d(t);const f=t=>{const{options:n}=t,l=e.__rest(t,["options"]);return m.default.createElement(r.MenuList,Object.assign({shouldRetainSelection:!0,menuItems:n,isMatchWidthSet:!0},l))},p=({selectedOption:e,defaultLeftElement:t,shouldTruncateText:n=!0})=>m.default.createElement(i.Flex,{"data-testid":"dropdown-container",className:"Select__Container",justify:"flex-start",align:"center",textAlign:"left",color:e.variant?`text.${e.variant}`:"text.default"},(null==e?void 0:e.leftElement)?m.default.createElement(i.Flex,{align:"center",className:"Select__LeftElement",pr:2},e.leftElement):t?m.default.createElement(i.Flex,{align:"center",className:"Select__LeftElement",pr:2},t):null,"string"==typeof e.label?m.default.createElement(s.WrappedText,{className:"Select__Text",isTruncated:n,variant:e.variant||"default"},e.label):e.label),v=l=>{var{defaultLeftElement:r,isFieldInline:s,listProps:i,options:d,placeholder:v,size:x="md",value:h,maxW:E="100%",isOnContrast:S,emptyStateText:j,containerProps:b}=l,g=e.__rest(l,["defaultLeftElement","isFieldInline","listProps","options","placeholder","size","value","maxW","isOnContrast","emptyStateText","containerProps"]);const T=S?"onContrast":"default",_=t.useRef(null),O=t.useMemo((()=>({label:v,value:"",variant:S?"placeholderOnContrast":"placeholder",leftElement:null,isSelected:!1,isPlaceholder:!0})),[v,S]),[q,C]=t.useState([]),y=t.useMemo((()=>{const e=q.find((e=>e.isSelected));return e||O}),[q,O]),L=t.useCallback((e=>{if(!q)return;const t=q.map((t=>Object.assign(Object.assign({},t),{isSelected:t.value===e.value})));C(t),(null==i?void 0:i.onSelect)&&i.onSelect(e)}),[q,i]),M=(null==i?void 0:i.shouldTruncateText)?{}:{height:"max-content",minH:10},W=t.useMemo((()=>{var e;return _.current?`${null===(e=null==_?void 0:_.current)||void 0===e?void 0:e.clientWidth}px`:"320px"}),[null==_?void 0:_.current]);return t.useEffect((()=>{const e=d.map((e=>Object.assign(Object.assign({},e),{isSelected:e.value===h})));C([...e,O])}),[d,O,h]),m.default.createElement(a.MenuProvider,{menuItems:q},m.default.createElement(n.MenuContainer,Object.assign({matchWidth:!0,isLazy:!0},b),m.default.createElement(c.Select,Object.assign({icon:m.default.createElement(o.Icon,{name:"chevronDown",size:x}),as:u.MenuButton,ref:_,onClick:e=>e.stopPropagation(),type:"button",className:"Select__MenuButton",variant:T,maxW:E},M,g),m.default.createElement(p,{selectedOption:y,defaultLeftElement:r,shouldTruncateText:null==i?void 0:i.shouldTruncateText})),m.default.createElement(f,Object.assign({},i,{onSelect:L,options:q,maxW:W||E,emptyStateText:j}))))};v.displayName="Select";const x=l.withFormControl(v);exports.WrappedSelect=x;
2
+ //# sourceMappingURL=select.component-bc77ddb8.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"select.component-bc77ddb8.js","sources":["../src/components/Select/components/SelectList/selectList.component.tsx","../src/components/Select/components/SelectContainer/selectContainer.component.tsx","../src/components/Select/select.component.tsx"],"sourcesContent":["import React from 'react';\nimport { MenuList, KMenuListProps, MenuListProps } from '../../../Menu/components/MenuList/menuList.component';\nimport { SelectOptionProps } from '../SelectOption/selectOption.types';\n\nexport interface KSelectListProps\n extends Omit<\n KMenuListProps,\n | 'canSelectAll'\n | 'canSelectGroups'\n | 'isMultiSelect'\n | 'onSelectAll'\n | 'menuItems'\n | 'shouldRetainSelection'\n | 'isMatchWidthSet'\n | 'isLoading'\n > {\n options?: SelectOptionProps[];\n}\n\nexport type SelectListProps = KSelectListProps & MenuListProps;\n\nexport const SelectList = (props: SelectListProps): JSX.Element => {\n const { options, ...rest } = props;\n\n return <MenuList shouldRetainSelection={true} menuItems={options} isMatchWidthSet={true} {...rest} />;\n};\n","import React, { ReactNode } from 'react';\nimport { Flex } from '@chakra-ui/react';\nimport { Text } from '../../../Text/text.component';\nimport { SelectOptionProps } from '../SelectOption/selectOption.types';\n\nexport interface SelectContainerProps {\n selectedOption: SelectOptionProps;\n defaultLeftElement: ReactNode;\n shouldTruncateText?: boolean;\n}\n\nexport const SelectContainer = ({\n selectedOption,\n defaultLeftElement,\n shouldTruncateText = true,\n}: SelectContainerProps): JSX.Element => {\n return (\n <Flex\n data-testid=\"dropdown-container\"\n className=\"Select__Container\"\n justify=\"flex-start\"\n align=\"center\"\n textAlign=\"left\"\n color={selectedOption.variant ? `text.${selectedOption.variant}` : 'text.default'}\n >\n {selectedOption?.leftElement ? (\n <Flex align=\"center\" className=\"Select__LeftElement\" pr={2}>\n {selectedOption.leftElement}\n </Flex>\n ) : defaultLeftElement ? (\n <Flex align=\"center\" className=\"Select__LeftElement\" pr={2}>\n {defaultLeftElement}\n </Flex>\n ) : null}\n {typeof selectedOption.label === 'string' ? (\n <Text className=\"Select__Text\" isTruncated={shouldTruncateText} variant={selectedOption.variant || 'default'}>\n {selectedOption.label}\n </Text>\n ) : (\n selectedOption.label\n )}\n </Flex>\n );\n};\n","import React, { useMemo, ReactNode, useRef, useState, useCallback, useEffect } from 'react';\nimport { Select as CSelect, SelectProps as CSelectProps, MenuButton } from '@chakra-ui/react';\nimport { MenuContainer, MenuContainerProps } from '../Menu/components/MenuContainer/menuContainer.component';\nimport { WithFormControlProps, withFormControl } from 'shared/hocs/FormControl/withFormControl';\nimport { MenuProvider } from '../Menu/context/menu.context';\nimport { SelectList, SelectListProps } from './components/SelectList/selectList.component';\nimport { SelectContainer } from './components/SelectContainer/selectContainer.component';\nimport { Icon } from '../Icon/icon.component';\nimport { IconSize } from '../Icon/icon.types';\nimport { FormControlSize } from 'shared/types/formControl';\nimport { SelectOptionProps } from './components/SelectOption/selectOption.types';\n\nexport interface KSelectProps extends WithFormControlProps {\n defaultLeftElement?: ReactNode;\n listProps?: SelectListProps;\n containerProps?: MenuContainerProps;\n options: SelectOptionProps[];\n size?: FormControlSize;\n isOnContrast?: boolean;\n placeholder?: string;\n emptyStateText?: string;\n}\n\nexport type SelectProps = KSelectProps & Omit<CSelectProps, 'onSelect'>;\n\nconst Select = ({\n defaultLeftElement,\n isFieldInline,\n listProps,\n options,\n placeholder,\n size = 'md',\n value,\n maxW = '100%',\n isOnContrast,\n emptyStateText,\n containerProps,\n ...rest\n}: SelectProps): JSX.Element => {\n // TODO: Need to add full support for isOnContrast, currently menu list still renders white\n const _computedVariant = isOnContrast ? 'onContrast' : 'default';\n const selectRef = useRef<HTMLSelectElement>(null);\n const placeholderOption: SelectOptionProps = useMemo(\n () => ({\n label: placeholder,\n value: '',\n variant: isOnContrast ? 'placeholderOnContrast' : 'placeholder',\n leftElement: null,\n isSelected: false,\n isPlaceholder: true,\n }),\n [placeholder, isOnContrast],\n );\n\n const [allOptions, setAllOptions] = useState<SelectOptionProps[]>([]);\n\n const selectedOption: SelectOptionProps = useMemo(() => {\n const selectedItem = allOptions.find((option) => option.isSelected);\n\n return selectedItem ? selectedItem : placeholderOption;\n }, [allOptions, placeholderOption]);\n\n const handleSelect = useCallback(\n (selectedItem: SelectOptionProps) => {\n if (!allOptions) return;\n\n const updatedOptions = allOptions.map((option) => {\n return {\n ...option,\n isSelected: option.value === selectedItem.value,\n };\n });\n setAllOptions(updatedOptions);\n\n if (listProps?.onSelect) {\n listProps.onSelect(selectedItem);\n }\n },\n [allOptions, listProps],\n );\n\n // If the text is not being truncated it should grow to fit the content\n const flexibleHeightProps = !listProps?.shouldTruncateText ? { height: 'max-content', minH: 10 } : {};\n\n const selectWidth = useMemo(() => {\n if (!selectRef.current) {\n return '320px';\n }\n\n return `${selectRef?.current?.clientWidth}px`;\n\n // Disables the warning for not including unused dependency in the hook array. This dependency is needed to rerender the menu list with the correct width\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [selectRef?.current]);\n\n // Set default selected state\n useEffect(() => {\n const mappedOptions = options.map((option) => ({\n ...option,\n isSelected: option.value === value,\n }));\n\n setAllOptions([...mappedOptions, placeholderOption]);\n }, [options, placeholderOption, value]);\n\n return (\n <MenuProvider menuItems={allOptions}>\n <MenuContainer matchWidth={true} isLazy={true} {...containerProps}>\n <CSelect\n icon={<Icon name=\"chevronDown\" size={size as IconSize} />}\n as={MenuButton}\n ref={selectRef}\n onClick={(event: React.MouseEvent): void => event.stopPropagation()}\n type=\"button\"\n className=\"Select__MenuButton\"\n variant={_computedVariant}\n maxW={maxW}\n {...flexibleHeightProps}\n {...rest}\n >\n <SelectContainer\n selectedOption={selectedOption}\n defaultLeftElement={defaultLeftElement}\n shouldTruncateText={listProps?.shouldTruncateText}\n />\n </CSelect>\n <SelectList\n {...listProps}\n onSelect={handleSelect}\n options={allOptions}\n maxW={selectWidth || maxW}\n emptyStateText={emptyStateText}\n />\n </MenuContainer>\n </MenuProvider>\n );\n};\n\nSelect.displayName = 'Select';\n\nconst WrappedSelect = withFormControl(Select);\n\nexport { WrappedSelect as Select };\n"],"names":["SelectList","props","options","rest","__rest","React","MenuList","Object","assign","shouldRetainSelection","menuItems","isMatchWidthSet","SelectContainer","selectedOption","defaultLeftElement","shouldTruncateText","createElement","Flex","className","justify","align","textAlign","color","variant","leftElement","pr","label","Text","isTruncated","Select","_a","isFieldInline","listProps","placeholder","size","value","maxW","isOnContrast","emptyStateText","containerProps","_computedVariant","selectRef","useRef","placeholderOption","useMemo","isSelected","isPlaceholder","allOptions","setAllOptions","useState","selectedItem","find","option","handleSelect","useCallback","updatedOptions","map","onSelect","flexibleHeightProps","height","minH","selectWidth","current","clientWidth","useEffect","mappedOptions","MenuProvider","MenuContainer","matchWidth","isLazy","CSelect","icon","Icon","name","as","MenuButton","ref","onClick","event","stopPropagation","type","displayName","WrappedSelect","withFormControl"],"mappings":"kjBAqBO,MAAMA,EAAcC,IACzB,MAAMC,QAAEA,GAAqBD,EAATE,EAAIC,EAAAA,OAAKH,EAAvB,CAAoB,YAE1B,OAAOI,EAAAA,sBAACC,EAAAA,SAAQC,OAAAC,OAAA,CAACC,uBAAuB,EAAMC,UAAWR,EAASS,iBAAiB,GAAUR,KCblFS,EAAkB,EAC7BC,eAAAA,EACAC,mBAAAA,EACAC,mBAAAA,GAAqB,KAGnBV,UAACW,cAAAC,EAAIA,KACS,CAAA,cAAA,qBACZC,UAAU,oBACVC,QAAQ,aACRC,MAAM,SACNC,UAAU,OACVC,MAAOT,EAAeU,QAAU,QAAQV,EAAeU,UAAY,iBAElEV,MAAAA,OAAc,EAAdA,EAAgBW,aACfnB,EAAA,QAAAW,cAACC,OAAI,CAACG,MAAM,SAASF,UAAU,sBAAsBO,GAAI,GACtDZ,EAAeW,aAEhBV,EACFT,EAAA,QAAAW,cAACC,OAAI,CAACG,MAAM,SAASF,UAAU,sBAAsBO,GAAI,GACtDX,GAED,KAC6B,iBAAzBD,EAAea,MACrBrB,wBAACsB,cAAI,CAACT,UAAU,eAAeU,YAAab,EAAoBQ,QAASV,EAAeU,SAAW,WAChGV,EAAea,OAGlBb,EAAoB,OCdtBgB,EAAUC,IAAA,IAAAhB,mBACdA,EAAkBiB,cAClBA,EAAaC,UACbA,EAAS9B,QACTA,EAAO+B,YACPA,EAAWC,KACXA,EAAO,KAAIC,MACXA,EAAKC,KACLA,EAAO,OAAMC,aACbA,EAAYC,eACZA,EAAcC,eACdA,GAEYT,EADT3B,EAAIC,EAAAA,OAAA0B,EAZO,mJAed,MAAMU,EAAmBH,EAAe,aAAe,UACjDI,EAAYC,SAA0B,MACtCC,EAAuCC,EAAAA,SAC3C,KAAO,CACLlB,MAAOO,EACP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,cAAcvC,KAAMA,IACrCwC,GAAIC,EAAUA,WACdC,IAAKnC,EACLoC,QAAUC,GAAkCA,EAAMC,kBAClDC,KAAK,SACL9D,UAAU,qBACVK,QAASiB,EACTJ,KAAMA,GACFsB,EACAvD,GAEJE,EAAC,QAAAW,cAAAJ,GACCC,eAAgBA,EAChBC,mBAAoBA,EACpBC,mBAAoBiB,MAAAA,OAAS,EAATA,EAAWjB,sBAGnCV,UAACW,cAAAhB,EACKO,OAAAC,OAAA,GAAAwB,EACJ,CAAAyB,SAAUJ,EACVnD,QAAS6C,EACTX,KAAMyB,GAAezB,EACrBE,eAAgBA,QAO1BT,EAAOoD,YAAc,SAErB,MAAMC,EAAgBC,EAAeA,gBAACtD"}
@@ -0,0 +1,9 @@
1
+ import { ArgType } from '@storybook/addons';
2
+ interface dataTestIdArgTypeProps {
3
+ description?: string;
4
+ defaultValue: string;
5
+ subcomponentName?: string;
6
+ propertyName?: string;
7
+ }
8
+ export declare const getDataTestIdArgTypes: ({ description, defaultValue, subcomponentName, propertyName, }: dataTestIdArgTypeProps) => ArgType;
9
+ export {};
@@ -0,0 +1,2 @@
1
+ "use strict";var e=require("react"),t=require("./core.esm-3a85aed4.js");function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=r(e);function i(e,t,r){const n=e.slice();return n.splice(r<0?n.length+r:r,0,n.splice(t,1)[0]),n}function o(e,t){return e.reduce(((e,r,n)=>{const i=t.get(r);return i&&(e[n]=i),e}),Array(e.length))}function a(e){return null!==e&&e>=0}const s=e=>{let{rects:t,activeIndex:r,overIndex:n,index:o}=e;const a=i(t,n,r),s=t[o],d=a[o];return d&&s?{x:d.left-s.left,y:d.top-s.top,scaleX:d.width/s.width,scaleY:d.height/s.height}:null},d=n.default.createContext({activeIndex:-1,containerId:"Sortable",disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:s,disabled:{draggable:!1,droppable:!1}});const l=e=>{let{id:t,items:r,activeIndex:n,overIndex:o}=e;return i(r,n,o).indexOf(t)},c=e=>{let{containerId:t,isSorting:r,wasDragging:n,index:i,items:o,newIndex:a,previousItems:s,previousContainerId:d,transition:l}=e;return!(!l||!n)&&((s===o||i!==a)&&(!!r||a!==i&&t===d))},u={duration:200,easing:"ease"},f=t.CSS.Transition.toString({property:"transform",duration:0,easing:"linear"}),b={roleDescription:"sortable"};function g(e){if(!e)return!1;const t=e.data.current;return!!(t&&"sortable"in t&&"object"==typeof t.sortable&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable)}const p=[t.KeyboardCode.Down,t.KeyboardCode.Right,t.KeyboardCode.Up,t.KeyboardCode.Left];function v(e,t){return!(!g(e)||!g(t))&&e.data.current.sortable.containerId===t.data.current.sortable.containerId}exports.SortableContext=function(r){let{children:i,id:a,items:l,strategy:c=s,disabled:u=!1}=r;const{active:f,dragOverlay:b,droppableRects:g,over:p,measureDroppableContainers:v}=t.useDndContext(),x=t.useUniqueId("Sortable",a),I=Boolean(null!==b.rect),m=e.useMemo((()=>l.map((e=>"object"==typeof e&&"id"in e?e.id:e))),[l]),y=null!=f,h=f?m.indexOf(f.id):-1,C=p?m.indexOf(p.id):-1,R=e.useRef(m),w=!function(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}(m,R.current),D=-1!==C&&-1===h||w,S=function(e){return"boolean"==typeof e?{draggable:e,droppable:e}:e}(u);t.useIsomorphicLayoutEffect((()=>{w&&y&&v(m)}),[w,m,y,v]),e.useEffect((()=>{R.current=m}),[m]);const O=e.useMemo((()=>({activeIndex:h,containerId:x,disabled:S,disableTransforms:D,items:m,overIndex:C,useDragOverlay:I,sortedRects:o(m,g),strategy:c})),[h,x,S.draggable,S.droppable,D,m,C,g,I,c]);return n.default.createElement(d.Provider,{value:O},i)},exports.arrayMove=i,exports.sortableKeyboardCoordinates=(e,r)=>{let{context:{active:n,collisionRect:i,droppableRects:o,droppableContainers:a,over:s,scrollableAncestors:d}}=r;if(p.includes(e.code)){if(e.preventDefault(),!n||!i)return;const r=[];a.getEnabled().forEach((n=>{if(!n||null!=n&&n.disabled)return;const a=o.get(n.id);if(a)switch(e.code){case t.KeyboardCode.Down:i.top<a.top&&r.push(n);break;case t.KeyboardCode.Up:i.top>a.top&&r.push(n);break;case t.KeyboardCode.Left:i.left>a.left&&r.push(n);break;case t.KeyboardCode.Right:i.left<a.left&&r.push(n)}}));const l=t.closestCorners({active:n,collisionRect:i,droppableRects:o,droppableContainers:r,pointerCoordinates:null});let c=t.getFirstCollision(l,"id");if(c===(null==s?void 0:s.id)&&l.length>1&&(c=l[1].id),null!=c){const e=a.get(n.id),r=a.get(c),s=r?o.get(r.id):null,l=null==r?void 0:r.node.current;if(l&&s&&e&&r){const n=t.getScrollableAncestors(l).some(((e,t)=>d[t]!==e)),o=v(e,r),a=function(e,t){if(!g(e)||!g(t))return!1;if(!v(e,t))return!1;return e.data.current.sortable.index<t.data.current.sortable.index}(e,r),c=n||!o?{x:0,y:0}:{x:a?i.width-s.width:0,y:a?i.height-s.height:0},u={x:s.left,y:s.top};return c.x&&c.y?u:t.subtract(u,c)}}}},exports.useSortable=function(r){let{animateLayoutChanges:n=c,attributes:i,disabled:o,data:s,getNewIndex:g=l,id:p,strategy:v,resizeObserverConfig:x,transition:I=u}=r;const{items:m,containerId:y,activeIndex:h,disabled:C,disableTransforms:R,sortedRects:w,overIndex:D,useDragOverlay:S,strategy:O}=e.useContext(d),E=function(e,t){var r,n;if("boolean"==typeof e)return{draggable:e,droppable:!1};return{draggable:null!=(r=null==e?void 0:e.draggable)?r:t.draggable,droppable:null!=(n=null==e?void 0:e.droppable)?n:t.droppable}}(o,C),K=m.indexOf(p),N=e.useMemo((()=>({sortable:{containerId:y,index:K,items:m},...s})),[y,s,K,m]),T=e.useMemo((()=>m.slice(m.indexOf(p))),[m,p]),{rect:M,node:A,isOver:L,setNodeRef:j}=t.useDroppable({id:p,data:N,disabled:E.droppable,resizeObserverConfig:{updateMeasurementsFor:T,...x}}),{active:k,activatorEvent:q,activeNodeRect:U,attributes:z,setNodeRef:B,listeners:F,isDragging:X,over:Y,setActivatorNodeRef:P,transform:G}=t.useDraggable({id:p,data:N,attributes:{...b,...i},disabled:E.draggable}),H=t.useCombinedRefs(j,B),J=Boolean(k),Q=J&&!R&&a(h)&&a(D),V=!S&&X,W=V&&Q?G:null,Z=Q?null!=W?W:(null!=v?v:O)({rects:w,activeNodeRect:U,activeIndex:h,overIndex:D,index:K}):null,$=a(h)&&a(D)?g({id:p,items:m,activeIndex:h,overIndex:D}):K,_=null==k?void 0:k.id,ee=e.useRef({activeId:_,items:m,newIndex:$,containerId:y}),te=m!==ee.current.items,re=n({active:k,containerId:y,isDragging:X,isSorting:J,id:p,index:K,items:m,newIndex:ee.current.newIndex,previousItems:ee.current.items,previousContainerId:ee.current.containerId,transition:I,wasDragging:null!=ee.current.activeId}),ne=function(r){let{disabled:n,index:i,node:o,rect:a}=r;const[s,d]=e.useState(null),l=e.useRef(i);return t.useIsomorphicLayoutEffect((()=>{if(!n&&i!==l.current&&o.current){const e=a.current;if(e){const r=t.getClientRect(o.current,{ignoreTransform:!0}),n={x:e.left-r.left,y:e.top-r.top,scaleX:e.width/r.width,scaleY:e.height/r.height};(n.x||n.y)&&d(n)}}i!==l.current&&(l.current=i)}),[n,i,o,a]),e.useEffect((()=>{s&&d(null)}),[s]),s}({disabled:!re,index:K,node:A,rect:M});return e.useEffect((()=>{J&&ee.current.newIndex!==$&&(ee.current.newIndex=$),y!==ee.current.containerId&&(ee.current.containerId=y),m!==ee.current.items&&(ee.current.items=m)}),[J,$,y,m]),e.useEffect((()=>{if(_===ee.current.activeId)return;if(_&&!ee.current.activeId)return void(ee.current.activeId=_);const e=setTimeout((()=>{ee.current.activeId=_}),50);return()=>clearTimeout(e)}),[_]),{active:k,activeIndex:h,attributes:z,data:N,rect:M,index:K,newIndex:$,items:m,isOver:L,isSorting:J,isDragging:X,listeners:F,node:A,overIndex:D,over:Y,setNodeRef:H,setActivatorNodeRef:P,setDroppableNodeRef:j,setDraggableNodeRef:B,transform:null!=ne?ne:Z,transition:function(){if(ne||te&&ee.current.newIndex===K)return f;if(V&&!t.isKeyboardEvent(q)||!I)return;if(J||re)return t.CSS.Transition.toString({...I,property:"transform"});return}()}};
2
+ //# sourceMappingURL=sortable.esm-53c38ebd.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sortable.esm-53c38ebd.js","sources":["../node_modules/@dnd-kit/sortable/dist/sortable.esm.js"],"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"],"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","hasSortableData","entry","data","current","sortable","directions","KeyboardCode","Down","Right","Up","Left","isSameContainer","a","b","children","userDefinedItems","disabledProp","active","dragOverlay","droppableRects","over","measureDroppableContainers","useDndContext","useUniqueId","Boolean","useMemo","map","item","isDragging","previousItemsRef","useRef","itemsHaveChanged","i","itemsEqual","normalizeDisabled","useIsomorphicLayoutEffect","useEffect","contextValue","createElement","Provider","value","event","context","collisionRect","droppableContainers","scrollableAncestors","includes","code","preventDefault","filteredContainers","getEnabled","forEach","push","collisions","closestCorners","pointerCoordinates","closestId","getFirstCollision","activeDroppable","newDroppable","newNode","node","hasDifferentScrollAncestors","getScrollableAncestors","some","element","hasSameContainer","isAfterActive","isAfter","offset","rectCoordinates","subtract","animateLayoutChanges","attributes","userDefinedAttributes","localDisabled","customData","getNewIndex","localStrategy","resizeObserverConfig","globalDisabled","globalStrategy","useContext","_localDisabled$dragga","_localDisabled$droppa","normalizeLocalDisabled","itemsAfterCurrentSortable","isOver","setNodeRef","setDroppableNodeRef","useDroppable","updateMeasurementsFor","activatorEvent","activeNodeRect","setDraggableNodeRef","listeners","setActivatorNodeRef","transform","useDraggable","useCombinedRefs","displaceItem","shouldDisplaceDragSource","dragSourceDisplacement","finalTransform","activeId","previous","shouldAnimateLayoutChanges","derivedTransform","setDerivedtransform","useState","previousIndex","initial","getClientRect","ignoreTransform","delta","useDerivedTransform","timeoutId","setTimeout","clearTimeout","isKeyboardEvent","getTransition"],"mappings":"2JAOA,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,OA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AI9B,MAAMY,EAAYC,YAAW,KAC3BZ,GAAStG,QAAQqG,SAAWA,IAC3B,IACH,MAAO,IAAMc,aAAaF,KACzB,CAACZ,IACG,CACLvF,OAAAA,EACA7D,YAAAA,EACAqH,WAAAA,EACAvE,KAAAA,EACApD,KAAAA,EACAD,MAAAA,EACAqC,SAAAA,EACA1C,MAAAA,EACA+I,OAAAA,EACAvG,UAAAA,EACA4C,WAAAA,EACAmE,UAAAA,EACAlC,KAAAA,EACAxG,UAAAA,EACA+D,KAAAA,EACAoE,WAAAA,EACAQ,oBAAAA,EACAP,oBAAAA,EACAK,oBAAAA,EACAG,UAA+B,MAApBU,GAA2BA,GAAmBJ,EACzDlH,WAGF,WACE,GACAsH,IACA5E,IAAoB0E,GAAStG,QAAQjB,WAAarC,EAChD,OAAO4C,EAGT,GAAI4G,IAA6BkB,EAAAA,gBAAgB3B,KAAoBvG,EACnE,OAGF,GAAIL,GAAa0H,GACf,OAAOhH,MAAIC,WAAWC,SAAS,IAAKP,EAClCQ,SA5OmB,cAgPvB,OApBY2H"}
@@ -0,0 +1,2 @@
1
+ "use strict";var e=require("react"),t=require("./sortable.esm-53c38ebd.js"),r=require("./core.esm-3a85aed4.js"),a=require("./sortableItem.context-5bba7c97.js"),s=require("./chakra-ui-layout.esm-6ee578f7.js");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=o(e);exports.SortableItem=({children:o,id:n,style:l,onRemove:u})=>{const{attributes:c,isDragging:m,listeners:b,setNodeRef:d,setActivatorNodeRef:f,transform:S,transition:v}=t.useSortable({id:n}),y=e.useMemo((()=>({attributes:c,listeners:b,ref:f})),[c,b,f]),j={transform:r.CSS.Translate.toString(S),transition:v};return i.default.createElement(a.SortableItemContext.Provider,{value:y},i.default.createElement(s.Box,Object.assign({className:"SortableItem",ref:d,listStyleType:"none",opacity:m?.4:void 0},l,{style:j}),o))};
2
+ //# sourceMappingURL=sortableItem.component-ce1a7136.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sortableItem.component-ce1a7136.js","sources":["../src/components/SortableList/components/SortableItem/sortableItem.component.tsx"],"sourcesContent":["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';\nimport { Box, StyleProps } from '@chakra-ui/react';\n\nexport interface SortableItemProps {\n id: UniqueIdentifier;\n style?: StyleProps;\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 transform: CSS.Translate.toString(transform),\n transition,\n };\n\n return (\n <SortableItemContext.Provider value={context}>\n <Box\n className=\"SortableItem\"\n ref={setNodeRef}\n listStyleType=\"none\"\n opacity={isDragging ? 0.4 : undefined}\n {...userStyle}\n style={style}\n >\n {children}\n </Box>\n </SortableItemContext.Provider>\n );\n};\n"],"names":["children","id","style","userStyle","onRemove","attributes","isDragging","listeners","setNodeRef","setActivatorNodeRef","transform","transition","useSortable","context","useMemo","ref","CSS","Translate","toString","React","SortableItemContext","Provider","value","createElement","Box","Object","assign","className","listStyleType","opacity","undefined"],"mappings":"wTAc4B,EAC1BA,SAAAA,EACAC,GAAAA,EACAC,MAAOC,EACPC,SAAAA,MAEA,MAAMC,WAAEA,EAAUC,WAAEA,EAAUC,UAAEA,EAASC,WAAEA,EAAUC,oBAAEA,EAAmBC,UAAEA,EAASC,WAAEA,GAAeC,cAAY,CAChHX,GAAAA,IAEIY,EAAUC,EAAAA,SACd,KAAO,CACLT,WAAAA,EACAE,UAAAA,EACAQ,IAAKN,KAEP,CAACJ,EAAYE,EAAWE,IAEpBP,EAAuB,CAC3BQ,UAAWM,EAAGA,IAACC,UAAUC,SAASR,GAClCC,WAAAA,GAGF,OACEQ,EAAAA,sBAACC,EAAAA,oBAAoBC,SAAS,CAAAC,MAAOT,GACnCM,EAAAA,QAAAI,cAACC,MACCC,OAAAC,OAAA,CAAAC,UAAU,eACVZ,IAAKP,EACLoB,cAAc,OACdC,QAASvB,EAAa,QAAMwB,GACxB3B,EAAS,CACbD,MAAOA,IAENF"}
@@ -0,0 +1,2 @@
1
+ "use strict";var e=require("react"),t=require("./core.esm-3a85aed4.js"),r=require("./sortable.esm-53c38ebd.js"),n=require("./sortableOverlay.component-39d84330.js"),a=require("./chakra-ui-layout.esm-6ee578f7.js");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=l(e);exports.SortableList=({items:l,onChange:s,renderItem:i,style:d})=>{const[u,c]=e.useState(null),f=e.useMemo((()=>l.find((e=>e.id===(null==u?void 0:u.id)))),[u,l]),m=t.useSensors(t.useSensor(t.PointerSensor),t.useSensor(t.KeyboardSensor,{coordinateGetter:r.sortableKeyboardCoordinates})),b=Object.assign({display:"flex",flexDirection:"column",padding:0,listStyleType:"none",ml:0},d);return o.default.createElement(t.DndContext,{sensors:m,onDragStart:({active:e})=>{c(e)},onDragEnd:({active:e,over:t})=>{if(t&&e.id!==(null==t?void 0:t.id)){const n=l.findIndex((({id:t})=>t===e.id)),a=l.findIndex((({id:e})=>e===t.id));s(r.arrayMove(l,n,a))}c(null)},onDragCancel:()=>c(null)},o.default.createElement(r.SortableContext,{items:l},o.default.createElement(a.UnorderedList,Object.assign({},b),l.map(((e,t)=>o.default.createElement(o.default.Fragment,{key:e.id},i(e,t)))))),o.default.createElement(n.SortableOverlay,null,f?i(f):null))};
2
+ //# sourceMappingURL=sortableList.component-84706639.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"sortableList.component-19cfab79.js","sources":["../src/components/SortableList/sortableList.component.tsx"],"sourcesContent":["import React, { 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';\nimport { StyleProps, UnorderedList } from '@chakra-ui/react';\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?: StyleProps;\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: StyleProps = {\n display: 'flex',\n flexDirection: 'column',\n padding: 0,\n listStyleType: 'none',\n ml: 0,\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 <UnorderedList {...style}>\n {items.map((item, index) => (\n <React.Fragment key={item.id}>{renderItem(item, index)}</React.Fragment>\n ))}\n </UnorderedList>\n </SortableContext>\n <SortableOverlay>{activeItem ? renderItem(activeItem) : null}</SortableOverlay>\n </DndContext>\n );\n};\n"],"names":["items","onChange","renderItem","style","userStyle","active","setActive","useState","activeItem","useMemo","find","item","id","sensors","useSensors","useSensor","PointerSensor","KeyboardSensor","coordinateGetter","sortableKeyboardCoordinates","Object","assign","display","flexDirection","padding","listStyleType","ml","React","createElement","DndContext","onDragStart","onDragEnd","over","activeIndex","findIndex","overIndex","arrayMove","onDragCancel","SortableContext","UnorderedList","map","index","Fragment","key","SortableOverlay"],"mappings":"uUAmB4B,EAC1BA,MAAAA,EACAC,SAAAA,EACAC,WAAAA,EACAC,MAAOC,MAEP,MAAOC,EAAQC,GAAaC,EAAQA,SAAgB,MAC9CC,EAAaC,WAAQ,IAAMT,EAAMU,MAAMC,GAASA,EAAKC,MAAOP,MAAAA,OAAA,EAAAA,EAAQO,OAAK,CAACP,EAAQL,IAClFa,EAAUC,EAAAA,WACdC,EAAAA,UAAUC,EAAAA,eACVD,EAASA,UAACE,iBAAgB,CACxBC,iBAAkBC,EAA2BA,+BAI3ChB,EACJiB,OAAAC,OAAA,CAAAC,QAAS,OACTC,cAAe,SACfC,QAAS,EACTC,cAAe,OACfC,GAAI,GACDtB,GAGL,OACEuB,EAAA,QAAAC,cAACC,EAAAA,WAAU,CACThB,QAASA,EACTiB,YAAa,EAAGzB,OAAAA,MACdC,EAAUD,IAEZ0B,UAAW,EAAG1B,OAAAA,EAAQ2B,KAAAA,MACpB,GAAIA,GAAQ3B,EAAOO,MAAOoB,MAAAA,OAAA,EAAAA,EAAMpB,IAAI,CAClC,MAAMqB,EAAcjC,EAAMkC,WAAU,EAAGtB,GAAAA,KAASA,IAAOP,EAAOO,KACxDuB,EAAYnC,EAAMkC,WAAU,EAAGtB,GAAAA,KAASA,IAAOoB,EAAKpB,KAE1DX,EAASmC,EAAAA,UAAUpC,EAAOiC,EAAaE,IAEzC7B,EAAU,OAEZ+B,aAAc,IAAY/B,EAAU,OAEpCqB,EAAAA,QAAAC,cAACU,EAAAA,gBAAe,CAACtC,MAAOA,GACtB2B,EAAAA,QAAAC,cAACW,gBAAkBnB,OAAAC,OAAA,GAAAlB,GAChBH,EAAMwC,KAAI,CAAC7B,EAAM8B,IAChBd,EAAAA,QAACC,cAAAD,UAAMe,UAASC,IAAKhC,EAAKC,IAAKV,EAAWS,EAAM8B,QAItDd,UAAAC,cAACgB,EAAeA,gBAAE,KAAApC,EAAaN,EAAWM,GAAc"}
1
+ {"version":3,"file":"sortableList.component-84706639.js","sources":["../src/components/SortableList/sortableList.component.tsx"],"sourcesContent":["import React, { 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';\nimport { StyleProps, UnorderedList } from '@chakra-ui/react';\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?: StyleProps;\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: StyleProps = {\n display: 'flex',\n flexDirection: 'column',\n padding: 0,\n listStyleType: 'none',\n ml: 0,\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 <UnorderedList {...style}>\n {items.map((item, index) => (\n <React.Fragment key={item.id}>{renderItem(item, index)}</React.Fragment>\n ))}\n </UnorderedList>\n </SortableContext>\n <SortableOverlay>{activeItem ? renderItem(activeItem) : null}</SortableOverlay>\n </DndContext>\n );\n};\n"],"names":["items","onChange","renderItem","style","userStyle","active","setActive","useState","activeItem","useMemo","find","item","id","sensors","useSensors","useSensor","PointerSensor","KeyboardSensor","coordinateGetter","sortableKeyboardCoordinates","Object","assign","display","flexDirection","padding","listStyleType","ml","React","createElement","DndContext","onDragStart","onDragEnd","over","activeIndex","findIndex","overIndex","arrayMove","onDragCancel","SortableContext","UnorderedList","map","index","Fragment","key","SortableOverlay"],"mappings":"6TAmB4B,EAC1BA,MAAAA,EACAC,SAAAA,EACAC,WAAAA,EACAC,MAAOC,MAEP,MAAOC,EAAQC,GAAaC,EAAQA,SAAgB,MAC9CC,EAAaC,WAAQ,IAAMT,EAAMU,MAAMC,GAASA,EAAKC,MAAOP,MAAAA,OAAA,EAAAA,EAAQO,OAAK,CAACP,EAAQL,IAClFa,EAAUC,EAAAA,WACdC,EAAAA,UAAUC,EAAAA,eACVD,EAASA,UAACE,iBAAgB,CACxBC,iBAAkBC,EAA2BA,+BAI3ChB,EACJiB,OAAAC,OAAA,CAAAC,QAAS,OACTC,cAAe,SACfC,QAAS,EACTC,cAAe,OACfC,GAAI,GACDtB,GAGL,OACEuB,EAAA,QAAAC,cAACC,EAAAA,WAAU,CACThB,QAASA,EACTiB,YAAa,EAAGzB,OAAAA,MACdC,EAAUD,IAEZ0B,UAAW,EAAG1B,OAAAA,EAAQ2B,KAAAA,MACpB,GAAIA,GAAQ3B,EAAOO,MAAOoB,MAAAA,OAAA,EAAAA,EAAMpB,IAAI,CAClC,MAAMqB,EAAcjC,EAAMkC,WAAU,EAAGtB,GAAAA,KAASA,IAAOP,EAAOO,KACxDuB,EAAYnC,EAAMkC,WAAU,EAAGtB,GAAAA,KAASA,IAAOoB,EAAKpB,KAE1DX,EAASmC,EAAAA,UAAUpC,EAAOiC,EAAaE,IAEzC7B,EAAU,OAEZ+B,aAAc,IAAY/B,EAAU,OAEpCqB,EAAAA,QAAAC,cAACU,EAAAA,gBAAe,CAACtC,MAAOA,GACtB2B,EAAAA,QAAAC,cAACW,gBAAkBnB,OAAAC,OAAA,GAAAlB,GAChBH,EAAMwC,KAAI,CAAC7B,EAAM8B,IAChBd,EAAAA,QAACC,cAAAD,UAAMe,UAASC,IAAKhC,EAAKC,IAAKV,EAAWS,EAAM8B,QAItDd,UAAAC,cAACgB,EAAeA,gBAAE,KAAApC,EAAaN,EAAWM,GAAc"}
@@ -0,0 +1,5 @@
1
+ "use strict";var e=require("react"),r=require("./text.component-906b3f66.js"),t=require("./chakra-ui-system.esm-c70df670.js"),a=require("./chakra-ui-layout.esm-6ee578f7.js");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=n(e);const l={xs:12,sm:16,md:24,lg:32,xl:48},s=t.keyframes`
2
+ from {transform: rotate(0deg);}
3
+ to {transform: rotate(360deg)}
4
+ `;exports.Spinner=({size:e="md",isFullScreen:t=!1,showLabel:n=!1,label:i="Loading...",labelProps:c})=>{const u=l[e],d=`0.45s linear 0s infinite normal none running ${s}`;return o.default.createElement((({children:e})=>t?o.default.createElement(a.VStack,{h:"100%",w:"100%",pos:"absolute",top:"0",left:"0",align:"center",justify:"center",bg:"background.alpha.pressed"},e):o.default.createElement(a.VStack,{w:"max-content",h:"max-content",align:"center",justify:"center"},e)),null,o.default.createElement(a.Box,{display:"inline-block",animation:d,border:"2px",borderTopColor:"background.primary",borderRightColor:"background.primary",borderLeftColor:"transparent",borderBottomColor:"transparent",height:`${u}px`,width:`${u}px`,borderRadius:`${u}px`}),n&&o.default.createElement(r.WrappedText,Object.assign({as:"p",className:"Spinner__Label",size:e,variant:"subtle"},c),i))};
5
+ //# sourceMappingURL=spinner.component-cc68be51.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spinner.component-cc68be51.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, { ReactNode } from 'react';\nimport { Box, keyframes, VStack } from '@chakra-ui/react';\nimport { SpinnerSize } from './spinner.types';\nimport { SpinnerSizeMap } from './spinner.records';\nimport { Text, TextProps } from '../Text/text.component';\nimport { TextSize } from 'components/Text';\n\nconst spin = keyframes`\n from {transform: rotate(0deg);}\n to {transform: rotate(360deg)}\n `;\n\nexport interface SpinnerProps {\n size?: SpinnerSize;\n isFullScreen?: boolean;\n label?: string;\n showLabel?: boolean;\n labelProps?: TextProps;\n}\n\nexport const Spinner = ({\n size = 'md',\n isFullScreen = false,\n showLabel = false,\n label = 'Loading...',\n labelProps,\n}: SpinnerProps): JSX.Element => {\n const spinnerSize = SpinnerSizeMap[size];\n const animation = `0.45s linear 0s infinite normal none running ${spin}`;\n const SpinnerContainer = ({ children }: { children: ReactNode }): JSX.Element => {\n return isFullScreen ? (\n <VStack\n h=\"100%\"\n w=\"100%\"\n pos=\"absolute\"\n top=\"0\"\n left=\"0\"\n align=\"center\"\n justify=\"center\"\n bg=\"background.alpha.pressed\"\n >\n {children}\n </VStack>\n ) : (\n <VStack w=\"max-content\" h=\"max-content\" align=\"center\" justify=\"center\">\n {children}\n </VStack>\n );\n };\n\n return (\n <SpinnerContainer>\n <Box\n display=\"inline-block\"\n animation={animation}\n border=\"2px\"\n borderTopColor=\"background.primary\"\n borderRightColor=\"background.primary\"\n borderLeftColor={'transparent'}\n borderBottomColor={'transparent'}\n height={`${spinnerSize}px`}\n width={`${spinnerSize}px`}\n borderRadius={`${spinnerSize}px`}\n />\n {showLabel && (\n <Text as=\"p\" className=\"Spinner__Label\" size={size as TextSize} variant=\"subtle\" {...labelProps}>\n {label}\n </Text>\n )}\n </SpinnerContainer>\n );\n};\n"],"names":["SpinnerSizeMap","xs","sm","md","lg","xl","spin","keyframes","size","isFullScreen","showLabel","label","labelProps","spinnerSize","animation","React","children","createElement","VStack","h","w","pos","top","left","align","justify","bg","Box","display","border","borderTopColor","borderRightColor","borderLeftColor","borderBottomColor","height","width","borderRadius","Text","WrappedText","Object","assign","as","className","variant"],"mappings":"iQAEO,MAAMA,EAA8C,CACzDC,GAAI,GACJC,GAAI,GACJC,GAAI,GACJC,GAAI,GACJC,GAAI,ICAAC,EAAOC,EAASA,SAAA;;;oBAaC,EACrBC,KAAAA,EAAO,KACPC,aAAAA,GAAe,EACfC,UAAAA,GAAY,EACZC,MAAAA,EAAQ,aACRC,WAAAA,MAEA,MAAMC,EAAcb,EAAeQ,GAC7BM,EAAY,gDAAgDR,IAsBlE,OACES,yBAtBuB,EAAGC,SAAAA,KACnBP,EACLM,EAAAA,QAACE,cAAAC,EAAMA,OACL,CAAAC,EAAE,OACFC,EAAE,OACFC,IAAI,WACJC,IAAI,IACJC,KAAK,IACLC,MAAM,SACNC,QAAQ,SACRC,GAAG,4BAEFV,GAGHD,EAAAA,QAACE,cAAAC,EAAMA,QAACE,EAAE,cAAcD,EAAE,cAAcK,MAAM,SAASC,QAAQ,UAC5DT,IAMY,KACfD,EAAC,QAAAE,cAAAU,EAAGA,KACFC,QAAQ,eACRd,UAAWA,EACXe,OAAO,MACPC,eAAe,qBACfC,iBAAiB,qBACjBC,gBAAiB,cACjBC,kBAAmB,cACnBC,OAAQ,GAAGrB,MACXsB,MAAO,GAAGtB,MACVuB,aAAc,GAAGvB,QAElBH,GACCK,EAAAA,QAACE,cAAAoB,EAAIC,YAACC,OAAAC,OAAA,CAAAC,GAAG,IAAIC,UAAU,iBAAiBlC,KAAMA,EAAkBmC,QAAQ,UAAa/B,GAClFD"}
@@ -0,0 +1,2 @@
1
+ "use strict";var e=require("./tslib.es6-d6f17add.js"),t=require("./notificationCounter.component-663ff0e5.js"),i=require("./icon.component-7fa85e78.js"),n=require("react"),a=require("./notificationCounter.types-799d7b6c.js"),o=require("./heading.component-95e89325.js"),r=require("./chakra-ui-tabs.esm-e6372403.js"),s=require("./chakra-ui-layout.esm-6ee578f7.js");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=u(n);const f={xs:"sm",sm:"md",md:"md",lg:"lg"},m={xs:"xs",sm:"xs",md:"sm",lg:"md"};exports.Tab=n=>{var{iconName:u,label:l,showNotificationCounter:d=!1,notificationCount:C=0,notificationCounterVariant:b=a.NotificationCounterVariant.Red,size:j="md"}=n,p=e.__rest(n,["iconName","label","showNotificationCounter","notificationCount","notificationCounterVariant","size"]);return c.default.createElement(r.Tab,Object.assign({},p),!!u&&c.default.createElement(s.Box,{pr:2},c.default.createElement(i.Icon,{name:u,size:j})),c.default.createElement(o.WrappedHeading,{size:m[j]},l),d&&c.default.createElement(t.NotificationCounter,{count:C,variant:b,size:f[j],ml:2}))};
2
+ //# sourceMappingURL=tab.component-4bc42ecf.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"tab.component-bec1f23b.js","sources":["../src/components/Tabs/components/Tab/tab.records.ts","../src/components/Tabs/components/Tab/tab.component.tsx"],"sourcesContent":["import { HeadingSize } from 'components/Heading';\nimport { 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\nexport const tabHeadingSize: Record<TabSize, HeadingSize> = {\n xs: 'xs',\n sm: 'xs',\n md: 'sm',\n lg: 'md',\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, tabHeadingSize } from './tab.records';\nimport { IconName } from '../../../../icons';\nimport { Heading } from 'components/Heading';\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 <Heading size={tabHeadingSize[size]}>{label}</Heading>\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","tabHeadingSize","_a","iconName","label","showNotificationCounter","notificationCount","notificationCounterVariant","NotificationCounterVariant","Red","size","rest","__rest","React","createElement","CTab","Tab","Object","assign","Box","pr","Icon","name","Heading","NotificationCounter","count","variant","ml"],"mappings":"0YAIO,MAAMA,EAAoE,CAC/EC,GAAI,KACJC,GAAI,KACJC,GAAI,KACJC,GAAI,MAGOC,EAA+C,CAC1DJ,GAAI,KACJC,GAAI,KACJC,GAAI,KACJC,GAAI,kBCIcE,QAAAC,SAClBA,EAAQC,MACRA,EAAKC,wBACLA,GAA0B,EAAKC,kBAC/BA,EAAoB,EAACC,2BACrBA,EAA6BC,6BAA2BC,IAAGC,KAC3DA,EAAO,MAAIR,EACRS,EAPeC,SAAAV,EAAA,CAAA,WAAA,QAAA,0BAAA,oBAAA,6BAAA,SASlB,OACEW,EAAAA,QAAAC,cAACC,EAAIC,IAAAC,OAAAC,OAAA,GAAKP,KACLR,GACDU,wBAACM,EAAAA,IAAG,CAACC,GAAI,GACPP,UAACC,cAAAO,EAAAA,KAAK,CAAAC,KAAMnB,EAAUO,KAAMA,KAGhCG,UAACC,cAAAS,EAAAA,eAAQ,CAAAb,KAAMT,EAAeS,IAAQN,GACrCC,GACCQ,EAAA,QAAAC,cAACU,EAAmBA,oBAAA,CAClBC,MAAOnB,EACPoB,QAASnB,EACTG,KAAMd,EAAwBc,GAC9BiB,GAAI"}
1
+ {"version":3,"file":"tab.component-4bc42ecf.js","sources":["../src/components/Tabs/components/Tab/tab.records.ts","../src/components/Tabs/components/Tab/tab.component.tsx"],"sourcesContent":["import { HeadingSize } from 'components/Heading';\nimport { 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\nexport const tabHeadingSize: Record<TabSize, HeadingSize> = {\n xs: 'xs',\n sm: 'xs',\n md: 'sm',\n lg: 'md',\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, tabHeadingSize } from './tab.records';\nimport { IconName } from '../../../../icons';\nimport { Heading } from 'components/Heading';\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 <Heading size={tabHeadingSize[size]}>{label}</Heading>\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","tabHeadingSize","_a","iconName","label","showNotificationCounter","notificationCount","notificationCounterVariant","NotificationCounterVariant","Red","size","rest","__rest","React","createElement","CTab","Tab","Object","assign","Box","pr","Icon","name","Heading","NotificationCounter","count","variant","ml"],"mappings":"+bAIO,MAAMA,EAAoE,CAC/EC,GAAI,KACJC,GAAI,KACJC,GAAI,KACJC,GAAI,MAGOC,EAA+C,CAC1DJ,GAAI,KACJC,GAAI,KACJC,GAAI,KACJC,GAAI,kBCIcE,QAAAC,SAClBA,EAAQC,MACRA,EAAKC,wBACLA,GAA0B,EAAKC,kBAC/BA,EAAoB,EAACC,2BACrBA,EAA6BC,6BAA2BC,IAAGC,KAC3DA,EAAO,MAAIR,EACRS,EAPeC,SAAAV,EAAA,CAAA,WAAA,QAAA,0BAAA,oBAAA,6BAAA,SASlB,OACEW,EAAAA,QAAAC,cAACC,EAAIC,IAAAC,OAAAC,OAAA,GAAKP,KACLR,GACDU,wBAACM,EAAAA,IAAG,CAACC,GAAI,GACPP,UAACC,cAAAO,EAAAA,KAAK,CAAAC,KAAMnB,EAAUO,KAAMA,KAGhCG,UAACC,cAAAS,EAAAA,eAAQ,CAAAb,KAAMT,EAAeS,IAAQN,GACrCC,GACCQ,EAAA,QAAAC,cAACU,EAAmBA,oBAAA,CAClBC,MAAOnB,EACPoB,QAASnB,EACTG,KAAMd,EAAwBc,GAC9BiB,GAAI"}
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("./tslib.es6-d6f17add.js"),t=require("react"),a=require("./tab.component-bec1f23b.js"),s=require("./chakra-ui-tabs.esm-e6372403.js");function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var b=r(t);exports.Tabs=t=>{var{size:r="md",tabList:i,tabPanels:n,tabPanelsStyle:l,tabListProps:c}=t,u=e.__rest(t,["size","tabList","tabPanels","tabPanelsStyle","tabListProps"]);return b.default.createElement(s.Tabs,Object.assign({},u,{size:r}),b.default.createElement(s.TabList,Object.assign({},c&&c),i.map(((e,t)=>b.default.createElement(a.Tab,Object.assign({key:t,size:r},e))))),!!n&&b.default.createElement(s.TabPanels,Object.assign({},l),n.map((e=>e))))};
2
- //# sourceMappingURL=tabs.component-4ebd608e.js.map
1
+ "use strict";var e=require("./tslib.es6-d6f17add.js"),t=require("react"),a=require("./tab.component-4bc42ecf.js"),s=require("./chakra-ui-tabs.esm-e6372403.js");function r(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var b=r(t);exports.Tabs=t=>{var{size:r="md",tabList:i,tabPanels:n,tabPanelsStyle:l,tabListProps:c}=t,u=e.__rest(t,["size","tabList","tabPanels","tabPanelsStyle","tabListProps"]);return b.default.createElement(s.Tabs,Object.assign({},u,{size:r}),b.default.createElement(s.TabList,Object.assign({},c&&c),i.map(((e,t)=>b.default.createElement(a.Tab,Object.assign({key:t,size:r},e))))),!!n&&b.default.createElement(s.TabPanels,Object.assign({},l),n.map((e=>e))))};
2
+ //# sourceMappingURL=tabs.component-cf2fbb08.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"tabs.component-4ebd608e.js","sources":["../src/components/Tabs/tabs.component.tsx"],"sourcesContent":["import { TabList, TabPanels, TabPanelProps, Tabs as CTabs, StyleProps, TabListProps } from '@chakra-ui/react';\nimport React from 'react';\nimport { Alignment } from 'shared/types/alignment';\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?: TabPanelProps;\n isFitted?: boolean;\n align?: Alignment;\n defaultIndex?: number;\n isLazy?: boolean;\n isManual?: boolean;\n index?: number;\n onChange?: (index: number) => void;\n tabListProps?: TabListProps;\n}\n\nexport const Tabs = ({\n size = 'md',\n tabList,\n tabPanels,\n tabPanelsStyle,\n tabListProps,\n ...rest\n}: TabsProps): JSX.Element => {\n return (\n <CTabs {...rest} size={size}>\n <TabList {...(tabListProps && tabListProps)}>\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","size","tabList","tabPanels","tabPanelsStyle","tabListProps","rest","__rest","React","CTabs","Tabs","Object","assign","createElement","TabList","map","tab","index","Tab","key","TabPanels","panel"],"mappings":"gQAqBqBA,IAAA,IAAAC,KACnBA,EAAO,KAAIC,QACXA,EAAOC,UACPA,EAASC,eACTA,EAAcC,aACdA,GAEUL,EADPM,EAAIC,SAAAP,EANY,gEAQnB,OACEQ,wBAACC,EAAKC,KAAAC,OAAAC,OAAA,GAAKN,EAAM,CAAAL,KAAMA,IACrBO,EAAAA,QAAAK,cAACC,UAAOH,OAAAC,OAAA,GAAMP,GAAgBA,GAC3BH,EAAQa,KAAI,CAACC,EAAKC,IACjBT,EAAC,QAAAK,cAAAK,EAAGA,IAACP,OAAAC,OAAA,CAAAO,IAAKF,EAAOhB,KAAMA,GAAUe,SAGlCb,GAAaK,EAAA,QAAAK,cAACO,EAASA,UAAKT,OAAAC,OAAA,GAAAR,GAAiBD,EAAUY,KAAKM,GAAUA"}
1
+ {"version":3,"file":"tabs.component-cf2fbb08.js","sources":["../src/components/Tabs/tabs.component.tsx"],"sourcesContent":["import { TabList, TabPanels, TabPanelProps, Tabs as CTabs, StyleProps, TabListProps } from '@chakra-ui/react';\nimport React from 'react';\nimport { Alignment } from 'shared/types/alignment';\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?: TabPanelProps;\n isFitted?: boolean;\n align?: Alignment;\n defaultIndex?: number;\n isLazy?: boolean;\n isManual?: boolean;\n index?: number;\n onChange?: (index: number) => void;\n tabListProps?: TabListProps;\n}\n\nexport const Tabs = ({\n size = 'md',\n tabList,\n tabPanels,\n tabPanelsStyle,\n tabListProps,\n ...rest\n}: TabsProps): JSX.Element => {\n return (\n <CTabs {...rest} size={size}>\n <TabList {...(tabListProps && tabListProps)}>\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","size","tabList","tabPanels","tabPanelsStyle","tabListProps","rest","__rest","React","CTabs","Tabs","Object","assign","createElement","TabList","map","tab","index","Tab","key","TabPanels","panel"],"mappings":"gQAqBqBA,IAAA,IAAAC,KACnBA,EAAO,KAAIC,QACXA,EAAOC,UACPA,EAASC,eACTA,EAAcC,aACdA,GAEUL,EADPM,EAAIC,SAAAP,EANY,gEAQnB,OACEQ,wBAACC,EAAKC,KAAAC,OAAAC,OAAA,GAAKN,EAAM,CAAAL,KAAMA,IACrBO,EAAAA,QAAAK,cAACC,UAAOH,OAAAC,OAAA,GAAMP,GAAgBA,GAC3BH,EAAQa,KAAI,CAACC,EAAKC,IACjBT,EAAC,QAAAK,cAAAK,EAAGA,IAACP,OAAAC,OAAA,CAAAO,IAAKF,EAAOhB,KAAMA,GAAUe,SAGlCb,GAAaK,EAAA,QAAAK,cAACO,EAASA,UAAKT,OAAAC,OAAA,GAAAR,GAAiBD,EAAUY,KAAKM,GAAUA"}
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("react"),t=require("./tabs.component-4ebd608e.js");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=a(e);exports.TabsLayout=e=>r.default.createElement(t.Tabs,Object.assign({},e));
2
- //# sourceMappingURL=tabsLayout.component-29538cfd.js.map
1
+ "use strict";var e=require("react"),t=require("./tabs.component-cf2fbb08.js");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=a(e);exports.TabsLayout=e=>r.default.createElement(t.Tabs,Object.assign({},e));
2
+ //# sourceMappingURL=tabsLayout.component-5bf54ef2.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"tabsLayout.component-29538cfd.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","Object","assign"],"mappings":"oLAO2BA,GAClBC,EAAC,QAAAC,cAAAC,OAASC,OAAAC,OAAA,GAAAL"}
1
+ {"version":3,"file":"tabsLayout.component-5bf54ef2.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","Object","assign"],"mappings":"oLAO2BA,GAClBC,EAAC,QAAAC,cAAAC,OAASC,OAAAC,OAAA,GAAAL"}
@@ -0,0 +1,2 @@
1
+ "use strict";var e=require("react"),t=require("./button.component-a1a58584.js");require("./heading.component-95e89325.js"),require("./icon.component-7fa85e78.js");var a=require("./text.component-906b3f66.js");require("./checkbox.component-853ac7ff.js"),require("./checkboxGroup.component-b47b67da.js"),require("./_baseGetTag-fd05839f.js");var r=require("./menu.component-1c7b7922.js");require("./textInput.component-9c91685f.js"),require("./link.component-1f789e32.js"),require("./logo.component-cea68030.js"),require("./menu.context-66211f5a.js");var n=require("./spinner.component-cc68be51.js");require("./notificationCounter.types-799d7b6c.js"),require("./radioGroup.component-c5647766.js"),require("./select.component-bc77ddb8.js"),require("./sortableItem.context-5bba7c97.js"),require("./core.esm-3a85aed4.js"),require("./sortable.esm-53c38ebd.js"),require("./switch.component-5b7de8ce.js");var o=require("./tag.component-75215361.js");require("./textarea.component-9f0c4b1b.js"),require("./timePicker.types-eedca939.js");var l=require("./chakra-ui-layout.esm-6ee578f7.js");function s(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(a){if("default"!==a){var r=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,r.get?r:{enumerable:!0,get:function(){return e[a]}})}})),t.default=e,Object.freeze(t)}var c,i=s(e);exports.TagDisabledState=void 0,(c=exports.TagDisabledState||(exports.TagDisabledState={})).Inactive="Inactive",c.Deleted="Deleted";exports.TagBlock=({title:e,menuButtonProps:s={size:"sm",variant:"secondarySubtle",leftIconName:"plus",text:"Add",showRightIcon:!1},menuListProps:c={isMultiSelect:!0},menuContainerProps:u,tags:d,canBeDeleted:m=!1,onClearAll:p,onRemoveTag:b,handleDelete:g,hasError:f=!1,errorText:j="This field contains an error",isLoading:x=!1,dataTestId:T="tag-block"})=>i.createElement(l.Box,{className:"TagBlock",position:"relative",mb:3,py:2,pl:4,pr:2,bg:"background.subtle",borderRadius:"lg",boxShadow:f?"0 0 0 2px var(--chakra-colors-border-danger)":"",border:"1px",borderColor:"border.default"},i.createElement(l.Flex,{className:"TagBlock__ButtonContainer","data-testid":`${T}-container`,justifyContent:"space-between"},i.createElement(l.HStack,{spacing:1,minH:10},e&&i.createElement(a.WrappedText,{className:"TagBlock__Title",mr:2,fontWeight:"bold"},e),i.createElement(r.Menu,{buttonProps:s,listProps:c,containerProps:u,dataTestId:`${T}-menu`}),i.createElement(t.Button,{className:"TagBlock__Button--ClearAll","data-testid":`${T}-clear-all-button`,size:"sm",iconName:"arrowCircle",variant:"ghostNeutral",onClick:p,isDisabled:d.length<=0},"Clear All")),m&&i.createElement(l.Box,null,i.createElement(t.Button,{className:"TagBlock__Button--Delete","data-testid":`${T}-delete-button`,iconName:"trashcan",variant:"ghostNeutral",onClick:g,justifySelf:"flex-end"}))),Boolean(d.length)&&i.createElement(l.Flex,{className:"TagBlock__TagContainer",mt:2,pb:1,alignContent:"space-between",flexWrap:"wrap",justifyContent:"flex-start",alignItems:"flex-start"},d.map((e=>{const t=e.label.includes(exports.TagDisabledState.Inactive)||e.label.includes(exports.TagDisabledState.Deleted);return i.createElement(o.Tag,{className:"TagBlock__Tag","data-testid":`${T}-tag`,mr:1,mb:1,key:e.value,label:e.label,onClose:()=>{return t=e.value,void(b&&b(t,d));var t},closeButtonDisplay:"always",fontWeight:"normal",color:t?"text.placeholder":"text.default",size:"md"})}))),x&&i.createElement(n.Spinner,{isFullScreen:!0}),f&&i.createElement(a.WrappedText,{className:"TagBlock__Error","data-testid":`${T}-error`,mt:2,size:"xs",as:"p",variant:"danger"},j));
2
+ //# sourceMappingURL=tagBlock.component-c7948fcc.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tagBlock.component-c7948fcc.js","sources":["../src/patterns/TagBlock/tagBlock.component.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Text, Menu, Button, MenuButtonProps, MenuListProps, Tag, Spinner, MenuContainerProps } from '../../components';\nimport { Box, HStack, Flex } from 'chakra';\n\nexport enum TagDisabledState {\n Inactive = 'Inactive',\n Deleted = 'Deleted',\n}\n\nexport interface TagBlockTag {\n label: string;\n value: string;\n}\n\nexport interface TagBlockProps {\n title?: string;\n menuButtonProps?: MenuButtonProps;\n menuListProps?: MenuListProps;\n menuContainerProps?: MenuContainerProps;\n tags: TagBlockTag[];\n canBeDeleted?: boolean;\n onClearAll?: () => void;\n onRemoveTag?: (tag: string, selectedTags: TagBlockTag[]) => void;\n handleDelete?: () => void;\n hasError?: boolean;\n errorText?: string;\n isLoading?: boolean;\n dataTestId?: string;\n}\n\nexport const TagBlock = ({\n title,\n menuButtonProps = {\n size: 'sm',\n variant: 'secondarySubtle',\n leftIconName: 'plus',\n text: 'Add',\n showRightIcon: false,\n },\n menuListProps = {\n isMultiSelect: true,\n },\n menuContainerProps,\n tags,\n canBeDeleted = false,\n onClearAll,\n onRemoveTag,\n handleDelete,\n hasError = false,\n errorText = 'This field contains an error',\n isLoading = false,\n dataTestId = 'tag-block',\n}: TagBlockProps): JSX.Element => {\n const handleRemoveTag = (value: string): void => {\n if (onRemoveTag) {\n onRemoveTag(value, tags);\n }\n };\n\n return (\n <Box\n className=\"TagBlock\"\n position=\"relative\"\n mb={3}\n py={2}\n pl={4}\n pr={2}\n bg=\"background.subtle\"\n borderRadius=\"lg\"\n boxShadow={hasError ? `0 0 0 2px var(--chakra-colors-border-danger)` : ''}\n border=\"1px\"\n borderColor=\"border.default\"\n >\n <Flex\n className=\"TagBlock__ButtonContainer\"\n data-testid={`${dataTestId}-container`}\n justifyContent=\"space-between\"\n >\n <HStack spacing={1} minH={10}>\n {title && (\n <Text className=\"TagBlock__Title\" mr={2} fontWeight=\"bold\">\n {title}\n </Text>\n )}\n <Menu\n buttonProps={menuButtonProps}\n listProps={menuListProps}\n containerProps={menuContainerProps}\n dataTestId={`${dataTestId}-menu`}\n />\n <Button\n className=\"TagBlock__Button--ClearAll\"\n data-testid={`${dataTestId}-clear-all-button`}\n size=\"sm\"\n iconName=\"arrowCircle\"\n variant=\"ghostNeutral\"\n onClick={onClearAll}\n isDisabled={tags.length <= 0}\n >\n Clear All\n </Button>\n </HStack>\n {canBeDeleted && (\n <Box>\n <Button\n className=\"TagBlock__Button--Delete\"\n data-testid={`${dataTestId}-delete-button`}\n iconName=\"trashcan\"\n variant=\"ghostNeutral\"\n onClick={handleDelete}\n justifySelf=\"flex-end\"\n />\n </Box>\n )}\n </Flex>\n {Boolean(tags.length) && (\n <Flex\n className=\"TagBlock__TagContainer\"\n mt={2}\n pb={1}\n alignContent=\"space-between\"\n flexWrap=\"wrap\"\n justifyContent=\"flex-start\"\n alignItems=\"flex-start\"\n >\n {tags.map((tag) => {\n const isDisabled =\n tag.label.includes(TagDisabledState.Inactive) || tag.label.includes(TagDisabledState.Deleted);\n\n return (\n <Tag\n className=\"TagBlock__Tag\"\n data-testid={`${dataTestId}-tag`}\n mr={1}\n mb={1}\n key={tag.value}\n label={tag.label}\n onClose={(): void => handleRemoveTag(tag.value)}\n closeButtonDisplay=\"always\"\n fontWeight=\"normal\"\n color={isDisabled ? 'text.placeholder' : 'text.default'}\n size=\"md\"\n />\n );\n })}\n </Flex>\n )}\n {isLoading && <Spinner isFullScreen />}\n {hasError && (\n <Text className=\"TagBlock__Error\" data-testid={`${dataTestId}-error`} mt={2} size=\"xs\" as=\"p\" variant=\"danger\">\n {errorText}\n </Text>\n )}\n </Box>\n );\n};\n"],"names":["TagDisabledState","title","menuButtonProps","size","variant","leftIconName","text","showRightIcon","menuListProps","isMultiSelect","menuContainerProps","tags","canBeDeleted","onClearAll","onRemoveTag","handleDelete","hasError","errorText","isLoading","dataTestId","React","createElement","Box","className","position","mb","py","pl","pr","bg","borderRadius","boxShadow","border","borderColor","Flex","justifyContent","HStack","spacing","minH","Text","WrappedText","mr","fontWeight","Menu","buttonProps","listProps","containerProps","Button","iconName","onClick","isDisabled","length","justifySelf","Boolean","mt","pb","alignContent","flexWrap","alignItems","map","tag","label","includes","Inactive","Deleted","Tag","key","value","onClose","handleRemoveTag","closeButtonDisplay","color","Spinner","isFullScreen","as"],"mappings":"01CAIYA,SAAAA,QAGXA,sBAAA,GAHWA,EAAAA,2BAAAA,QAAAA,iBAGX,KAFC,SAAA,WACAA,EAAA,QAAA,2BAwBsB,EACtBC,MAAAA,EACAC,gBAAAA,EAAkB,CAChBC,KAAM,KACNC,QAAS,kBACTC,aAAc,OACdC,KAAM,MACNC,eAAe,GAEjBC,cAAAA,EAAgB,CACdC,eAAe,GAEjBC,mBAAAA,EACAC,KAAAA,EACAC,aAAAA,GAAe,EACfC,WAAAA,EACAC,YAAAA,EACAC,aAAAA,EACAC,SAAAA,GAAW,EACXC,UAAAA,EAAY,+BACZC,UAAAA,GAAY,EACZC,WAAAA,EAAa,eASXC,EAACC,cAAAC,EAAGA,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,KAAYC,OApFVF,EAoF0BP,EAAIO,WAnFjDrD,GACFA,EAAYqD,EAAOxD,IAFC,IAACwD,GAqFXG,mBAAmB,SACnB5B,WAAW,SACX6B,MAAOrB,EAAa,mBAAqB,eACzC/C,KAAK,WAMde,GAAaE,EAAAC,cAACmD,EAAOA,QAAA,CAACC,cAAe,IACrCzD,GACCI,EAACC,cAAAkB,eAAKhB,UAAU,kBAAiB,cAAc,GAAGJ,UAAoBmC,GAAI,EAAGnD,KAAK,KAAKuE,GAAG,IAAItE,QAAQ,UACnGa"}
@@ -3,5 +3,5 @@ import { Theme } from './theme.types';
3
3
  import 'focus-visible/dist/focus-visible';
4
4
  export declare const KibbleThemeProvider: ({ children, theme }: {
5
5
  children: ReactNode;
6
- theme: Theme;
6
+ theme?: Theme | undefined;
7
7
  }) => JSX.Element;