@chayns-components/core 5.0.0-beta.1003 → 5.0.0-beta.1005

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 (201) hide show
  1. package/lib/cjs/components/accordion/Accordion.js +30 -30
  2. package/lib/cjs/components/accordion/Accordion.js.map +1 -1
  3. package/lib/cjs/components/accordion/Accordion.styles.js +22 -21
  4. package/lib/cjs/components/accordion/Accordion.styles.js.map +1 -1
  5. package/lib/cjs/components/accordion/accordion-body/AccordionBody.styles.js +2 -2
  6. package/lib/cjs/components/accordion/accordion-body/AccordionBody.styles.js.map +1 -1
  7. package/lib/cjs/components/accordion/accordion-group/AccordionGroup.js +16 -16
  8. package/lib/cjs/components/accordion/accordion-group/AccordionGroup.js.map +1 -1
  9. package/lib/cjs/components/accordion/accordion-head/AccordionHead.js +26 -26
  10. package/lib/cjs/components/accordion/accordion-head/AccordionHead.js.map +1 -1
  11. package/lib/cjs/components/accordion/accordion-head/AccordionHead.styles.js +11 -11
  12. package/lib/cjs/components/accordion/accordion-head/AccordionHead.styles.js.map +1 -1
  13. package/lib/cjs/components/amount-control/AmountControl.js +31 -31
  14. package/lib/cjs/components/amount-control/AmountControl.js.map +1 -1
  15. package/lib/cjs/components/amount-control/AmountControl.styles.js +2 -2
  16. package/lib/cjs/components/amount-control/AmountControl.styles.js.map +1 -1
  17. package/lib/cjs/components/button/Button.js +12 -12
  18. package/lib/cjs/components/button/Button.js.map +1 -1
  19. package/lib/cjs/components/button/Button.styles.js +4 -4
  20. package/lib/cjs/components/button/Button.styles.js.map +1 -1
  21. package/lib/cjs/components/combobox/ComboBox.js +48 -48
  22. package/lib/cjs/components/combobox/ComboBox.js.map +1 -1
  23. package/lib/cjs/components/combobox/ComboBox.styles.js +2 -2
  24. package/lib/cjs/components/combobox/ComboBox.styles.js.map +1 -1
  25. package/lib/cjs/components/context-menu/ContextMenu.js +23 -23
  26. package/lib/cjs/components/context-menu/ContextMenu.js.map +1 -1
  27. package/lib/cjs/components/context-menu/context-menu-content/ContextMenuContent.styles.js +2 -2
  28. package/lib/cjs/components/context-menu/context-menu-content/ContextMenuContent.styles.js.map +1 -1
  29. package/lib/cjs/components/expandable-content/ExpandableContent.js +4 -4
  30. package/lib/cjs/components/expandable-content/ExpandableContent.js.map +1 -1
  31. package/lib/cjs/components/expandable-content/ExpandableContent.styles.js +2 -2
  32. package/lib/cjs/components/expandable-content/ExpandableContent.styles.js.map +1 -1
  33. package/lib/cjs/components/file-input/FileInput.js +27 -27
  34. package/lib/cjs/components/file-input/FileInput.js.map +1 -1
  35. package/lib/cjs/components/file-input/FileInput.styles.js +2 -2
  36. package/lib/cjs/components/file-input/FileInput.styles.js.map +1 -1
  37. package/lib/cjs/components/filter-buttons/filter-button/FilterButton.styles.js +2 -2
  38. package/lib/cjs/components/filter-buttons/filter-button/FilterButton.styles.js.map +1 -1
  39. package/lib/cjs/components/input/Input.styles.js +4 -4
  40. package/lib/cjs/components/input/Input.styles.js.map +1 -1
  41. package/lib/cjs/components/list/List.js +11 -11
  42. package/lib/cjs/components/list/List.js.map +1 -1
  43. package/lib/cjs/components/list/list-item/ListItem.js +17 -17
  44. package/lib/cjs/components/list/list-item/ListItem.js.map +1 -1
  45. package/lib/cjs/components/list/list-item/ListItem.styles.js +2 -2
  46. package/lib/cjs/components/list/list-item/ListItem.styles.js.map +1 -1
  47. package/lib/cjs/components/list/list-item/list-item-body/ListItemBody.styles.js +2 -2
  48. package/lib/cjs/components/list/list-item/list-item-body/ListItemBody.styles.js.map +1 -1
  49. package/lib/cjs/components/list/list-item/list-item-head/ListItemHead.styles.js +5 -5
  50. package/lib/cjs/components/list/list-item/list-item-head/ListItemHead.styles.js.map +1 -1
  51. package/lib/cjs/components/list/list-item/list-item-head/list-item-image/ListItemImage.js +8 -0
  52. package/lib/cjs/components/list/list-item/list-item-head/list-item-image/ListItemImage.js.map +1 -1
  53. package/lib/cjs/components/list/list-item/list-item-head/list-item-image/ListItemImage.styles.js +24 -1
  54. package/lib/cjs/components/list/list-item/list-item-head/list-item-image/ListItemImage.styles.js.map +1 -1
  55. package/lib/cjs/components/mention-finder/MentionFinder.js +17 -17
  56. package/lib/cjs/components/mention-finder/MentionFinder.js.map +1 -1
  57. package/lib/cjs/components/mention-finder/MentionFinder.styles.js +2 -2
  58. package/lib/cjs/components/mention-finder/MentionFinder.styles.js.map +1 -1
  59. package/lib/cjs/components/popup/Popup.js +34 -34
  60. package/lib/cjs/components/popup/Popup.js.map +1 -1
  61. package/lib/cjs/components/popup/popup-content-wrapper/PopupContentWrapper.styles.js +2 -2
  62. package/lib/cjs/components/popup/popup-content-wrapper/PopupContentWrapper.styles.js.map +1 -1
  63. package/lib/cjs/components/progress-bar/ProgressBar.styles.js +2 -2
  64. package/lib/cjs/components/progress-bar/ProgressBar.styles.js.map +1 -1
  65. package/lib/cjs/components/radio-button/RadioButton.js +17 -17
  66. package/lib/cjs/components/radio-button/RadioButton.js.map +1 -1
  67. package/lib/cjs/components/radio-button/RadioButton.styles.js +2 -2
  68. package/lib/cjs/components/radio-button/RadioButton.styles.js.map +1 -1
  69. package/lib/cjs/components/search-box/SearchBox.js +64 -64
  70. package/lib/cjs/components/search-box/SearchBox.js.map +1 -1
  71. package/lib/cjs/components/search-box/SearchBox.styles.js +2 -2
  72. package/lib/cjs/components/search-box/SearchBox.styles.js.map +1 -1
  73. package/lib/cjs/components/search-box/search-box-body/SearchBoxBody.styles.js +2 -2
  74. package/lib/cjs/components/search-box/search-box-body/SearchBoxBody.styles.js.map +1 -1
  75. package/lib/cjs/components/search-input/SearchInput.js +16 -16
  76. package/lib/cjs/components/search-input/SearchInput.js.map +1 -1
  77. package/lib/cjs/components/search-input/SearchInput.styles.js +3 -3
  78. package/lib/cjs/components/search-input/SearchInput.styles.js.map +1 -1
  79. package/lib/cjs/components/slider/Slider.styles.js +2 -2
  80. package/lib/cjs/components/slider/Slider.styles.js.map +1 -1
  81. package/lib/cjs/components/slider-button/SliderButton.js +44 -44
  82. package/lib/cjs/components/slider-button/SliderButton.js.map +1 -1
  83. package/lib/cjs/components/slider-button/SliderButton.styles.js +2 -2
  84. package/lib/cjs/components/slider-button/SliderButton.styles.js.map +1 -1
  85. package/lib/cjs/components/truncation/Truncation.styles.js +2 -2
  86. package/lib/cjs/components/truncation/Truncation.styles.js.map +1 -1
  87. package/lib/cjs/utils/sliderButton.js.map +1 -1
  88. package/lib/esm/components/accordion/Accordion.js +1 -1
  89. package/lib/esm/components/accordion/Accordion.js.map +1 -1
  90. package/lib/esm/components/accordion/Accordion.styles.js +21 -20
  91. package/lib/esm/components/accordion/Accordion.styles.js.map +1 -1
  92. package/lib/esm/components/accordion/accordion-body/AccordionBody.styles.js +1 -1
  93. package/lib/esm/components/accordion/accordion-body/AccordionBody.styles.js.map +1 -1
  94. package/lib/esm/components/accordion/accordion-group/AccordionGroup.js +1 -1
  95. package/lib/esm/components/accordion/accordion-group/AccordionGroup.js.map +1 -1
  96. package/lib/esm/components/accordion/accordion-head/AccordionHead.js +1 -1
  97. package/lib/esm/components/accordion/accordion-head/AccordionHead.js.map +1 -1
  98. package/lib/esm/components/accordion/accordion-head/AccordionHead.styles.js +1 -1
  99. package/lib/esm/components/accordion/accordion-head/AccordionHead.styles.js.map +1 -1
  100. package/lib/esm/components/amount-control/AmountControl.js +2 -2
  101. package/lib/esm/components/amount-control/AmountControl.js.map +1 -1
  102. package/lib/esm/components/amount-control/AmountControl.styles.js +1 -1
  103. package/lib/esm/components/amount-control/AmountControl.styles.js.map +1 -1
  104. package/lib/esm/components/button/Button.js +1 -1
  105. package/lib/esm/components/button/Button.js.map +1 -1
  106. package/lib/esm/components/button/Button.styles.js +1 -1
  107. package/lib/esm/components/button/Button.styles.js.map +1 -1
  108. package/lib/esm/components/combobox/ComboBox.js +1 -1
  109. package/lib/esm/components/combobox/ComboBox.js.map +1 -1
  110. package/lib/esm/components/combobox/ComboBox.styles.js +1 -1
  111. package/lib/esm/components/combobox/ComboBox.styles.js.map +1 -1
  112. package/lib/esm/components/context-menu/ContextMenu.js +1 -1
  113. package/lib/esm/components/context-menu/ContextMenu.js.map +1 -1
  114. package/lib/esm/components/context-menu/context-menu-content/ContextMenuContent.styles.js +1 -1
  115. package/lib/esm/components/context-menu/context-menu-content/ContextMenuContent.styles.js.map +1 -1
  116. package/lib/esm/components/expandable-content/ExpandableContent.js +1 -1
  117. package/lib/esm/components/expandable-content/ExpandableContent.js.map +1 -1
  118. package/lib/esm/components/expandable-content/ExpandableContent.styles.js +1 -1
  119. package/lib/esm/components/expandable-content/ExpandableContent.styles.js.map +1 -1
  120. package/lib/esm/components/file-input/FileInput.js +1 -1
  121. package/lib/esm/components/file-input/FileInput.js.map +1 -1
  122. package/lib/esm/components/file-input/FileInput.styles.js +1 -1
  123. package/lib/esm/components/file-input/FileInput.styles.js.map +1 -1
  124. package/lib/esm/components/filter-buttons/filter-button/FilterButton.styles.js +1 -1
  125. package/lib/esm/components/filter-buttons/filter-button/FilterButton.styles.js.map +1 -1
  126. package/lib/esm/components/input/Input.styles.js +1 -1
  127. package/lib/esm/components/input/Input.styles.js.map +1 -1
  128. package/lib/esm/components/list/List.js +1 -1
  129. package/lib/esm/components/list/List.js.map +1 -1
  130. package/lib/esm/components/list/list-item/ListItem.js +1 -1
  131. package/lib/esm/components/list/list-item/ListItem.js.map +1 -1
  132. package/lib/esm/components/list/list-item/ListItem.styles.js +1 -1
  133. package/lib/esm/components/list/list-item/ListItem.styles.js.map +1 -1
  134. package/lib/esm/components/list/list-item/list-item-body/ListItemBody.styles.js +1 -1
  135. package/lib/esm/components/list/list-item/list-item-body/ListItemBody.styles.js.map +1 -1
  136. package/lib/esm/components/list/list-item/list-item-head/ListItemHead.styles.js +1 -1
  137. package/lib/esm/components/list/list-item/list-item-head/ListItemHead.styles.js.map +1 -1
  138. package/lib/esm/components/list/list-item/list-item-head/list-item-image/ListItemImage.js +9 -1
  139. package/lib/esm/components/list/list-item/list-item-head/list-item-image/ListItemImage.js.map +1 -1
  140. package/lib/esm/components/list/list-item/list-item-head/list-item-image/ListItemImage.styles.js +26 -0
  141. package/lib/esm/components/list/list-item/list-item-head/list-item-image/ListItemImage.styles.js.map +1 -1
  142. package/lib/esm/components/mention-finder/MentionFinder.js +1 -1
  143. package/lib/esm/components/mention-finder/MentionFinder.js.map +1 -1
  144. package/lib/esm/components/mention-finder/MentionFinder.styles.js +1 -1
  145. package/lib/esm/components/mention-finder/MentionFinder.styles.js.map +1 -1
  146. package/lib/esm/components/popup/Popup.js +1 -1
  147. package/lib/esm/components/popup/Popup.js.map +1 -1
  148. package/lib/esm/components/popup/popup-content-wrapper/PopupContentWrapper.styles.js +1 -1
  149. package/lib/esm/components/popup/popup-content-wrapper/PopupContentWrapper.styles.js.map +1 -1
  150. package/lib/esm/components/progress-bar/ProgressBar.styles.js +1 -1
  151. package/lib/esm/components/progress-bar/ProgressBar.styles.js.map +1 -1
  152. package/lib/esm/components/radio-button/RadioButton.js +2 -2
  153. package/lib/esm/components/radio-button/RadioButton.js.map +1 -1
  154. package/lib/esm/components/radio-button/RadioButton.styles.js +1 -1
  155. package/lib/esm/components/radio-button/RadioButton.styles.js.map +1 -1
  156. package/lib/esm/components/search-box/SearchBox.js +1 -1
  157. package/lib/esm/components/search-box/SearchBox.js.map +1 -1
  158. package/lib/esm/components/search-box/SearchBox.styles.js +1 -1
  159. package/lib/esm/components/search-box/SearchBox.styles.js.map +1 -1
  160. package/lib/esm/components/search-box/search-box-body/SearchBoxBody.styles.js +1 -1
  161. package/lib/esm/components/search-box/search-box-body/SearchBoxBody.styles.js.map +1 -1
  162. package/lib/esm/components/search-input/SearchInput.js +1 -1
  163. package/lib/esm/components/search-input/SearchInput.js.map +1 -1
  164. package/lib/esm/components/search-input/SearchInput.styles.js +1 -1
  165. package/lib/esm/components/search-input/SearchInput.styles.js.map +1 -1
  166. package/lib/esm/components/slider/Slider.styles.js +1 -1
  167. package/lib/esm/components/slider/Slider.styles.js.map +1 -1
  168. package/lib/esm/components/slider-button/SliderButton.js +1 -1
  169. package/lib/esm/components/slider-button/SliderButton.js.map +1 -1
  170. package/lib/esm/components/slider-button/SliderButton.styles.js +1 -1
  171. package/lib/esm/components/slider-button/SliderButton.styles.js.map +1 -1
  172. package/lib/esm/components/truncation/Truncation.styles.js +1 -1
  173. package/lib/esm/components/truncation/Truncation.styles.js.map +1 -1
  174. package/lib/esm/utils/sliderButton.js.map +1 -1
  175. package/lib/types/components/accordion/Accordion.styles.d.ts +2 -263
  176. package/lib/types/components/accordion/accordion-body/AccordionBody.styles.d.ts +2 -263
  177. package/lib/types/components/accordion/accordion-head/AccordionHead.styles.d.ts +20 -2660
  178. package/lib/types/components/amount-control/AmountControl.styles.d.ts +2 -273
  179. package/lib/types/components/button/Button.styles.d.ts +6 -799
  180. package/lib/types/components/combobox/ComboBox.styles.d.ts +2 -263
  181. package/lib/types/components/context-menu/context-menu-content/ContextMenuContent.styles.d.ts +2 -263
  182. package/lib/types/components/expandable-content/ExpandableContent.styles.d.ts +2 -263
  183. package/lib/types/components/file-input/FileInput.styles.d.ts +2 -263
  184. package/lib/types/components/filter-buttons/filter-button/FilterButton.styles.d.ts +2 -263
  185. package/lib/types/components/input/Input.styles.d.ts +6 -791
  186. package/lib/types/components/list/list-item/ListItem.styles.d.ts +2 -263
  187. package/lib/types/components/list/list-item/list-item-body/ListItemBody.styles.d.ts +2 -263
  188. package/lib/types/components/list/list-item/list-item-head/ListItemHead.styles.d.ts +8 -1052
  189. package/lib/types/components/list/list-item/list-item-head/list-item-image/ListItemImage.styles.d.ts +5 -0
  190. package/lib/types/components/mention-finder/MentionFinder.styles.d.ts +2 -263
  191. package/lib/types/components/popup/popup-content-wrapper/PopupContentWrapper.styles.d.ts +2 -263
  192. package/lib/types/components/progress-bar/ProgressBar.styles.d.ts +2 -263
  193. package/lib/types/components/radio-button/RadioButton.styles.d.ts +3 -264
  194. package/lib/types/components/search-box/SearchBox.styles.d.ts +2 -263
  195. package/lib/types/components/search-box/search-box-body/SearchBoxBody.styles.d.ts +2 -263
  196. package/lib/types/components/search-input/SearchInput.styles.d.ts +4 -526
  197. package/lib/types/components/slider/Slider.styles.d.ts +3 -585
  198. package/lib/types/components/slider-button/SliderButton.styles.d.ts +2 -263
  199. package/lib/types/components/truncation/Truncation.styles.d.ts +2 -263
  200. package/lib/types/utils/sliderButton.d.ts +1 -1
  201. package/package.json +3 -3
@@ -1 +1 @@
1
- {"version":3,"file":"RadioButton.styles.js","names":["_framerMotion","require","_styledComponents","_interopRequireWildcard","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","StyledRadioButton","exports","styled","span","$isDisabled","$radioButtonRightElementMargin","css","StyledRadioButtonWrapper","div","StyledRadioButtonCheckBox","input","StyledRadioButtonPseudoCheckBox","theme","$isChecked","StyledRadioButtonCheckBoxMark","$isHovered","$isSelected","StyledRadioButtonLabel","p","text","StyledLabelWrapper","StyledMotionRadioButtonChildren","motion"],"sources":["../../../../src/components/radio-button/RadioButton.styles.ts"],"sourcesContent":["import { motion } from 'framer-motion';\nimport styled, { css } from 'styled-components';\nimport type { WithTheme } from '../color-scheme-provider/ColorSchemeProvider';\nimport { RadioButtonRightElementMargin } from '../../types/radioButton';\n\ntype StyledRadioButtonProps = WithTheme<{\n $isDisabled: boolean;\n $radioButtonRightElementMargin: RadioButtonRightElementMargin;\n}>;\n\nexport const StyledRadioButton = styled.span<StyledRadioButtonProps>`\n display: flex;\n flex-direction: column;\n\n position: relative;\n\n opacity: ${({ $isDisabled }: StyledRadioButtonProps) => ($isDisabled ? 0.5 : 1)};\n\n ${({ $radioButtonRightElementMargin }: StyledRadioButtonProps) => {\n switch ($radioButtonRightElementMargin) {\n case 'BOTH':\n return css`\n margin: 6px 0;\n `;\n case 'TOP':\n return css`\n margin-top: 6px;\n `;\n case 'BOTTOM':\n return css`\n margin-bottom: 6px;\n `;\n case 'NONE':\n default:\n return css`\n margin: 0;\n `;\n }\n }}\n`;\n\nexport const StyledRadioButtonWrapper = styled.div`\n display: flex;\n align-items: center;\n position: relative;\n gap: 5px;\n user-select: none;\n`;\n\ntype StyledRadioButtonCheckBoxProps = WithTheme<{ $isDisabled: boolean }>;\n\nexport const StyledRadioButtonCheckBox = styled.input<StyledRadioButtonCheckBoxProps>`\n opacity: 0;\n height: 15px;\n width: 15px;\n cursor: ${({ $isDisabled }: StyledRadioButtonCheckBoxProps) =>\n $isDisabled ? 'default !important' : 'pointer !important'};\n`;\n\ntype StyledRadioButtonPseudoCheckBoxProps = WithTheme<{\n $isChecked: boolean;\n $isDisabled: boolean;\n}>;\n\nexport const StyledRadioButtonPseudoCheckBox = styled.div<StyledRadioButtonPseudoCheckBoxProps>`\n background-color: ${({ theme, $isChecked }: StyledRadioButtonPseudoCheckBoxProps) =>\n $isChecked ? theme['secondary-408'] : theme['secondary-403']};\n opacity: 1;\n border: 1px solid\n rgba(${({ theme }: StyledRadioButtonPseudoCheckBoxProps) => theme['409-rgb']}, 0.5);\n width: 15px;\n height: 15px;\n position: absolute;\n border-radius: 100%;\n top: 50%;\n transform: translateY(-50%);\n cursor: ${({ $isDisabled }: StyledRadioButtonPseudoCheckBoxProps) =>\n $isDisabled ? 'default !important' : 'pointer !important'};\n`;\n\ntype StyledRadioButtonCheckBoxMarkProps = WithTheme<{\n $isHovered: boolean;\n $isSelected: boolean;\n $isDisabled: boolean;\n}>;\n\nexport const StyledRadioButtonCheckBoxMark = styled.span<StyledRadioButtonCheckBoxMarkProps>`\n background-color: transparent;\n position: absolute;\n top: 1px;\n left: 3.925px;\n display: inline-block;\n transform: rotate(35deg);\n height: 9px;\n width: 5px;\n border-bottom: 2px solid white;\n border-right: 2px solid white;\n border-top: transparent;\n border-left: transparent;\n z-index: 2;\n cursor: ${({ $isDisabled }: StyledRadioButtonCheckBoxMarkProps) =>\n $isDisabled ? 'default !important' : 'pointer !important'};\n\n ${({ $isHovered, $isSelected }) => {\n if ($isSelected) {\n return css`\n opacity: 1;\n `;\n }\n\n if ($isHovered) {\n return css`\n opacity: 0.5;\n `;\n }\n\n return css`\n opacity: 0;\n `;\n }}\n`;\n\ntype StyledRadioButtonLabelProps = WithTheme<{ $isDisabled: boolean }>;\n\nexport const StyledRadioButtonLabel = styled.p<StyledRadioButtonLabelProps>`\n color: ${({ theme }: StyledRadioButtonLabelProps) => theme.text};\n margin: 0;\n cursor: ${({ $isDisabled }: StyledRadioButtonLabelProps) =>\n $isDisabled ? 'default !important' : 'pointer !important'};\n`;\n\nexport const StyledLabelWrapper = styled.div`\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n gap: 12px;\n`;\n\ntype StyledMotionRadioButtonChildrenProps = WithTheme<unknown>;\n\nexport const StyledMotionRadioButtonChildren = styled(\n motion.div,\n)<StyledMotionRadioButtonChildrenProps>`\n margin-left: 18px;\n cursor: text;\n overflow: hidden;\n color: ${({ theme }: StyledMotionRadioButtonChildrenProps) => theme.text};\n`;\n"],"mappings":";;;;;;AAAA,IAAAA,aAAA,GAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAC,uBAAA,CAAAF,OAAA;AAAgD,SAAAG,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAF,wBAAAE,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAA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AAW,GAAG,oBAAoB,GAAG,oBAAoB;AACjE,CAAC;AAEM,MAAMgB,kBAAkB,GAAAnB,OAAA,CAAAmB,kBAAA,GAAGlB,yBAAM,CAACM,GAAG;AAC5C;AACA;AACA;AACA;AACA;AACA,CAAC;AAIM,MAAMa,+BAA+B,GAAApB,OAAA,CAAAoB,+BAAA,GAAG,IAAAnB,yBAAM,EACjDoB,oBAAM,CAACd,GACX,CAAuC;AACvC;AACA;AACA;AACA,aAAa,CAAC;EAAEI;AAA4C,CAAC,KAAKA,KAAK,CAACO,IAAI;AAC5E,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"RadioButton.styles.js","names":["_react","require","_styledComponents","_interopRequireWildcard","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","StyledRadioButton","exports","styled","span","$isDisabled","$radioButtonRightElementMargin","css","StyledRadioButtonWrapper","div","StyledRadioButtonCheckBox","input","StyledRadioButtonPseudoCheckBox","theme","$isChecked","StyledRadioButtonCheckBoxMark","$isHovered","$isSelected","StyledRadioButtonLabel","p","text","StyledLabelWrapper","StyledMotionRadioButtonChildren","motion"],"sources":["../../../../src/components/radio-button/RadioButton.styles.ts"],"sourcesContent":["import { motion } from 'motion/react';\nimport styled, { css } from 'styled-components';\nimport { RadioButtonRightElementMargin } from '../../types/radioButton';\nimport type { WithTheme } from '../color-scheme-provider/ColorSchemeProvider';\n\ntype StyledRadioButtonProps = WithTheme<{\n $isDisabled: boolean;\n $radioButtonRightElementMargin: RadioButtonRightElementMargin;\n}>;\n\nexport const StyledRadioButton = styled.span<StyledRadioButtonProps>`\n display: flex;\n flex-direction: column;\n\n position: relative;\n\n opacity: ${({ $isDisabled }: StyledRadioButtonProps) => ($isDisabled ? 0.5 : 1)};\n\n ${({ $radioButtonRightElementMargin }: StyledRadioButtonProps) => {\n switch ($radioButtonRightElementMargin) {\n case 'BOTH':\n return css`\n margin: 6px 0;\n `;\n case 'TOP':\n return css`\n margin-top: 6px;\n `;\n case 'BOTTOM':\n return css`\n margin-bottom: 6px;\n `;\n case 'NONE':\n default:\n return css`\n margin: 0;\n `;\n }\n }}\n`;\n\nexport const StyledRadioButtonWrapper = styled.div`\n display: flex;\n align-items: center;\n position: relative;\n gap: 5px;\n user-select: none;\n`;\n\ntype StyledRadioButtonCheckBoxProps = WithTheme<{ $isDisabled: boolean }>;\n\nexport const StyledRadioButtonCheckBox = styled.input<StyledRadioButtonCheckBoxProps>`\n opacity: 0;\n height: 15px;\n width: 15px;\n cursor: ${({ $isDisabled }: StyledRadioButtonCheckBoxProps) =>\n $isDisabled ? 'default !important' : 'pointer !important'};\n`;\n\ntype StyledRadioButtonPseudoCheckBoxProps = WithTheme<{\n $isChecked: boolean;\n $isDisabled: boolean;\n}>;\n\nexport const StyledRadioButtonPseudoCheckBox = styled.div<StyledRadioButtonPseudoCheckBoxProps>`\n background-color: ${({ theme, $isChecked }: StyledRadioButtonPseudoCheckBoxProps) =>\n $isChecked ? theme['secondary-408'] : theme['secondary-403']};\n opacity: 1;\n border: 1px solid\n rgba(${({ theme }: StyledRadioButtonPseudoCheckBoxProps) => theme['409-rgb']}, 0.5);\n width: 15px;\n height: 15px;\n position: absolute;\n border-radius: 100%;\n top: 50%;\n transform: translateY(-50%);\n cursor: ${({ $isDisabled }: StyledRadioButtonPseudoCheckBoxProps) =>\n $isDisabled ? 'default !important' : 'pointer !important'};\n`;\n\ntype StyledRadioButtonCheckBoxMarkProps = WithTheme<{\n $isHovered: boolean;\n $isSelected: boolean;\n $isDisabled: boolean;\n}>;\n\nexport const StyledRadioButtonCheckBoxMark = styled.span<StyledRadioButtonCheckBoxMarkProps>`\n background-color: transparent;\n position: absolute;\n top: 1px;\n left: 3.925px;\n display: inline-block;\n transform: rotate(35deg);\n height: 9px;\n width: 5px;\n border-bottom: 2px solid white;\n border-right: 2px solid white;\n border-top: transparent;\n border-left: transparent;\n z-index: 2;\n cursor: ${({ $isDisabled }: StyledRadioButtonCheckBoxMarkProps) =>\n $isDisabled ? 'default !important' : 'pointer !important'};\n\n ${({ $isHovered, $isSelected }) => {\n if ($isSelected) {\n return css`\n opacity: 1;\n `;\n }\n\n if ($isHovered) {\n return css`\n opacity: 0.5;\n `;\n }\n\n return css`\n opacity: 0;\n `;\n }}\n`;\n\ntype StyledRadioButtonLabelProps = WithTheme<{ $isDisabled: boolean }>;\n\nexport const StyledRadioButtonLabel = styled.p<StyledRadioButtonLabelProps>`\n color: ${({ theme }: StyledRadioButtonLabelProps) => theme.text};\n margin: 0;\n cursor: ${({ $isDisabled }: StyledRadioButtonLabelProps) =>\n $isDisabled ? 'default !important' : 'pointer !important'};\n`;\n\nexport const StyledLabelWrapper = styled.div`\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n gap: 12px;\n`;\n\ntype StyledMotionRadioButtonChildrenProps = WithTheme<unknown>;\n\nexport const StyledMotionRadioButtonChildren = styled(\n motion.div,\n)<StyledMotionRadioButtonChildrenProps>`\n margin-left: 18px;\n cursor: text;\n overflow: hidden;\n color: ${({ theme }: StyledMotionRadioButtonChildrenProps) => theme.text};\n`;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAC,uBAAA,CAAAF,OAAA;AAAgD,SAAAG,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAF,wBAAAE,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CA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AM,CAACgB,CAA8B;AAC3E,aAAa,CAAC;EAAEN;AAAmC,CAAC,KAAKA,KAAK,CAACO,IAAI;AACnE;AACA,cAAc,CAAC;EAAEf;AAAyC,CAAC,KACnDA,WAAW,GAAG,oBAAoB,GAAG,oBAAoB;AACjE,CAAC;AAEM,MAAMgB,kBAAkB,GAAAnB,OAAA,CAAAmB,kBAAA,GAAGlB,yBAAM,CAACM,GAAG;AAC5C;AACA;AACA;AACA;AACA;AACA,CAAC;AAIM,MAAMa,+BAA+B,GAAApB,OAAA,CAAAoB,+BAAA,GAAG,IAAAnB,yBAAM,EACjDoB,aAAM,CAACd,GACX,CAAuC;AACvC;AACA;AACA;AACA,aAAa,CAAC;EAAEI;AAA4C,CAAC,KAAKA,KAAK,CAACO,IAAI;AAC5E,CAAC","ignoreList":[]}
@@ -5,8 +5,8 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = void 0;
7
7
  var _chaynsApi = require("chayns-api");
8
- var _framerMotion = require("framer-motion");
9
- var _react = _interopRequireWildcard(require("react"));
8
+ var _react = require("motion/react");
9
+ var _react2 = _interopRequireWildcard(require("react"));
10
10
  var _reactDom = require("react-dom");
11
11
  var _styledComponents = require("styled-components");
12
12
  var _calculate = require("../../utils/calculate");
@@ -21,7 +21,7 @@ var _SearchBox = require("./SearchBox.styles");
21
21
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
22
22
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
23
23
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
24
- const SearchBox = /*#__PURE__*/(0, _react.forwardRef)(({
24
+ const SearchBox = /*#__PURE__*/(0, _react2.forwardRef)(({
25
25
  placeholder,
26
26
  leftIcons,
27
27
  lists,
@@ -37,45 +37,45 @@ const SearchBox = /*#__PURE__*/(0, _react.forwardRef)(({
37
37
  shouldAddInputToList = true,
38
38
  shouldShowToggleIcon = false
39
39
  }, ref) => {
40
- const [matchingListsItems, setMatchingListsItems] = (0, _react.useState)(lists);
41
- const [selectedImage, setSelectedImage] = (0, _react.useState)();
42
- const [value, setValue] = (0, _react.useState)('');
43
- const [isAnimating, setIsAnimating] = (0, _react.useState)(false);
44
- const [height, setHeight] = (0, _react.useState)(0);
45
- const [width, setWidth] = (0, _react.useState)(0);
46
- const [focusedIndex, setFocusedIndex] = (0, _react.useState)(null);
47
- const [hasMultipleGroups, setHasMultipleGroups] = (0, _react.useState)(lists.length > 1);
48
- const [filteredChildrenArray, setFilteredChildrenArray] = (0, _react.useState)();
49
- const [inputToListValue, setInputToListValue] = (0, _react.useState)('');
50
- const [groups, setGroups] = (0, _react.useState)(['all']);
51
- const [portal, setPortal] = (0, _react.useState)();
52
- const [internalCoordinates, setInternalCoordinates] = (0, _react.useState)({
40
+ const [matchingListsItems, setMatchingListsItems] = (0, _react2.useState)(lists);
41
+ const [selectedImage, setSelectedImage] = (0, _react2.useState)();
42
+ const [value, setValue] = (0, _react2.useState)('');
43
+ const [isAnimating, setIsAnimating] = (0, _react2.useState)(false);
44
+ const [height, setHeight] = (0, _react2.useState)(0);
45
+ const [width, setWidth] = (0, _react2.useState)(0);
46
+ const [focusedIndex, setFocusedIndex] = (0, _react2.useState)(null);
47
+ const [hasMultipleGroups, setHasMultipleGroups] = (0, _react2.useState)(lists.length > 1);
48
+ const [filteredChildrenArray, setFilteredChildrenArray] = (0, _react2.useState)();
49
+ const [inputToListValue, setInputToListValue] = (0, _react2.useState)('');
50
+ const [groups, setGroups] = (0, _react2.useState)(['all']);
51
+ const [portal, setPortal] = (0, _react2.useState)();
52
+ const [internalCoordinates, setInternalCoordinates] = (0, _react2.useState)({
53
53
  x: 0,
54
54
  y: 0
55
55
  });
56
- const [newContainer, setNewContainer] = (0, _react.useState)(container ?? null);
57
- const boxRef = (0, _react.useRef)(null);
58
- const contentRef = (0, _react.useRef)(null);
59
- const inputRef = (0, _react.useRef)(null);
60
- const hasFocusRef = (0, _react.useRef)(false);
61
- const isAnimatingRef = (0, _react.useRef)(false);
56
+ const [newContainer, setNewContainer] = (0, _react2.useState)(container ?? null);
57
+ const boxRef = (0, _react2.useRef)(null);
58
+ const contentRef = (0, _react2.useRef)(null);
59
+ const inputRef = (0, _react2.useRef)(null);
60
+ const hasFocusRef = (0, _react2.useRef)(false);
61
+ const isAnimatingRef = (0, _react2.useRef)(false);
62
62
  const theme = (0, _styledComponents.useTheme)();
63
63
  const {
64
64
  browser
65
65
  } = (0, _chaynsApi.getDevice)();
66
- (0, _react.useEffect)(() => {
66
+ (0, _react2.useEffect)(() => {
67
67
  if (boxRef.current && !container) {
68
68
  const el = boxRef.current;
69
69
  const element = el.closest('.dialog-inner') || el.closest('body');
70
70
  setNewContainer(element);
71
71
  }
72
72
  }, [container]);
73
- (0, _react.useEffect)(() => {
73
+ (0, _react2.useEffect)(() => {
74
74
  if (container instanceof Element) {
75
75
  setNewContainer(container);
76
76
  }
77
77
  }, [container]);
78
- (0, _react.useEffect)(() => {
78
+ (0, _react2.useEffect)(() => {
79
79
  if (boxRef.current) {
80
80
  const {
81
81
  x,
@@ -91,10 +91,10 @@ const SearchBox = /*#__PURE__*/(0, _react.forwardRef)(({
91
91
  /**
92
92
  * Checks if Lists are smaller then 1
93
93
  */
94
- (0, _react.useEffect)(() => {
94
+ (0, _react2.useEffect)(() => {
95
95
  setHasMultipleGroups(lists.length > 1);
96
96
  }, [lists]);
97
- const filterButtons = (0, _react.useMemo)(() => {
97
+ const filterButtons = (0, _react2.useMemo)(() => {
98
98
  const items = [];
99
99
  if (lists.length <= 1) {
100
100
  return items;
@@ -115,7 +115,7 @@ const SearchBox = /*#__PURE__*/(0, _react.forwardRef)(({
115
115
  /**
116
116
  * Filters the lists by the FilterButtons
117
117
  */
118
- const activeList = (0, _react.useMemo)(() => {
118
+ const activeList = (0, _react2.useMemo)(() => {
119
119
  let newLists = [];
120
120
  if (groups[0] === 'all') {
121
121
  newLists = lists;
@@ -158,7 +158,7 @@ const SearchBox = /*#__PURE__*/(0, _react.forwardRef)(({
158
158
  setMatchingListsItems(filteredMatchingListItems);
159
159
  return newLists;
160
160
  }, [groups, lists, shouldAddInputToList, value]);
161
- const handleOpen = (0, _react.useCallback)(() => {
161
+ const handleOpen = (0, _react2.useCallback)(() => {
162
162
  if (boxRef.current) {
163
163
  const {
164
164
  x,
@@ -172,7 +172,7 @@ const SearchBox = /*#__PURE__*/(0, _react.forwardRef)(({
172
172
  setIsAnimating(true);
173
173
  }
174
174
  }, []);
175
- const handleClose = (0, _react.useCallback)(() => {
175
+ const handleClose = (0, _react2.useCallback)(() => {
176
176
  setIsAnimating(false);
177
177
  }, []);
178
178
  const handleFilterButtonsGroupSelect = keys => {
@@ -182,7 +182,7 @@ const SearchBox = /*#__PURE__*/(0, _react.forwardRef)(({
182
182
  /**
183
183
  * This function closes the list of items
184
184
  */
185
- const handleOutsideClick = (0, _react.useCallback)(event => {
185
+ const handleOutsideClick = (0, _react2.useCallback)(event => {
186
186
  if (boxRef.current && !boxRef.current.contains(event.target) && contentRef.current && !contentRef.current.contains(event.target)) {
187
187
  handleClose();
188
188
  }
@@ -191,7 +191,7 @@ const SearchBox = /*#__PURE__*/(0, _react.forwardRef)(({
191
191
  /**
192
192
  * This hook listens for clicks
193
193
  */
194
- (0, _react.useEffect)(() => {
194
+ (0, _react2.useEffect)(() => {
195
195
  document.addEventListener('click', handleOutsideClick);
196
196
  window.addEventListener('blur', () => handleClose());
197
197
  return () => {
@@ -203,7 +203,7 @@ const SearchBox = /*#__PURE__*/(0, _react.forwardRef)(({
203
203
  /**
204
204
  * This hook calculates the height
205
205
  */
206
- (0, _react.useEffect)(() => {
206
+ (0, _react2.useEffect)(() => {
207
207
  const textArray = [];
208
208
  activeList.forEach(({
209
209
  list,
@@ -226,7 +226,7 @@ const SearchBox = /*#__PURE__*/(0, _react.forwardRef)(({
226
226
  /**
227
227
  * This hook calculates the width
228
228
  */
229
- (0, _react.useEffect)(() => {
229
+ (0, _react2.useEffect)(() => {
230
230
  const input = document.getElementById('search_box_input');
231
231
  const getInputWidth = () => {
232
232
  if (input) {
@@ -237,7 +237,7 @@ const SearchBox = /*#__PURE__*/(0, _react.forwardRef)(({
237
237
  new ResizeObserver(getInputWidth).observe(input);
238
238
  }
239
239
  }, []);
240
- (0, _react.useEffect)(() => {
240
+ (0, _react2.useEffect)(() => {
241
241
  if (selectedId) {
242
242
  activeList.forEach(({
243
243
  list
@@ -248,7 +248,7 @@ const SearchBox = /*#__PURE__*/(0, _react.forwardRef)(({
248
248
  if (selectedItem) {
249
249
  setValue(selectedItem.text);
250
250
  if (selectedItem.imageUrl) {
251
- setSelectedImage(/*#__PURE__*/_react.default.createElement(_SearchBoxItem2.StyledSearchBoxItemImage, {
251
+ setSelectedImage(/*#__PURE__*/_react2.default.createElement(_SearchBoxItem2.StyledSearchBoxItemImage, {
252
252
  src: selectedItem.imageUrl,
253
253
  $shouldShowRoundImage: shouldShowRoundImage
254
254
  }));
@@ -262,15 +262,15 @@ const SearchBox = /*#__PURE__*/(0, _react.forwardRef)(({
262
262
  * This hook resets the value if the selectedId changes to undefined. This is an own useEffect because the value
263
263
  * should not be reset if the list changes and the selectedId is still undefined.
264
264
  */
265
- (0, _react.useEffect)(() => {
265
+ (0, _react2.useEffect)(() => {
266
266
  if (!selectedId) {
267
267
  setValue('');
268
268
  }
269
269
  }, [selectedId]);
270
- (0, _react.useEffect)(() => {
270
+ (0, _react2.useEffect)(() => {
271
271
  isAnimatingRef.current = isAnimating;
272
272
  }, [isAnimating]);
273
- (0, _react.useEffect)(() => {
273
+ (0, _react2.useEffect)(() => {
274
274
  if (matchingListsItems.length !== 0 && !isAnimatingRef.current && hasFocusRef.current) {
275
275
  handleOpen();
276
276
  }
@@ -279,7 +279,7 @@ const SearchBox = /*#__PURE__*/(0, _react.forwardRef)(({
279
279
  /**
280
280
  * This function sets the items on focus if shouldShowContentOnEmptyInput
281
281
  */
282
- const handleFocus = (0, _react.useCallback)(() => {
282
+ const handleFocus = (0, _react2.useCallback)(() => {
283
283
  hasFocusRef.current = true;
284
284
  if (shouldShowContentOnEmptyInput) {
285
285
  const newMatchingItems = [];
@@ -322,7 +322,7 @@ const SearchBox = /*#__PURE__*/(0, _react.forwardRef)(({
322
322
  * This function filters the lists by input
323
323
  */
324
324
 
325
- (0, _react.useEffect)(() => {
325
+ (0, _react2.useEffect)(() => {
326
326
  const newMatchingItems = [];
327
327
  activeList.forEach(({
328
328
  list,
@@ -359,32 +359,32 @@ const SearchBox = /*#__PURE__*/(0, _react.forwardRef)(({
359
359
  });
360
360
  }
361
361
  }, [inputToListValue, activeList, shouldAddInputToList, shouldShowContentOnEmptyInput, value]);
362
- const handleClick = (0, _react.useCallback)(() => {
362
+ const handleClick = (0, _react2.useCallback)(() => {
363
363
  if (isAnimating) {
364
364
  handleClose();
365
365
  } else {
366
366
  handleOpen();
367
367
  }
368
368
  }, [handleClose, handleOpen, isAnimating]);
369
- const rightElement = (0, _react.useMemo)(() => {
369
+ const rightElement = (0, _react2.useMemo)(() => {
370
370
  if (!shouldShowToggleIcon) {
371
371
  return undefined;
372
372
  }
373
- return /*#__PURE__*/_react.default.createElement(_SearchBox.StyledSearchBoxIcon, {
373
+ return /*#__PURE__*/_react2.default.createElement(_SearchBox.StyledSearchBoxIcon, {
374
374
  onClick: handleClick
375
- }, /*#__PURE__*/_react.default.createElement(_Icon.default, {
375
+ }, /*#__PURE__*/_react2.default.createElement(_Icon.default, {
376
376
  icons: ['fa fa-chevron-down'],
377
377
  color: theme['006']
378
378
  }));
379
379
  }, [handleClick, shouldShowToggleIcon, theme]);
380
- const leftElement = (0, _react.useMemo)(() => /*#__PURE__*/_react.default.createElement(_SearchBox.StyledSearchBoxLeftWrapper, null, leftIcons && /*#__PURE__*/_react.default.createElement(_Icon.default, {
380
+ const leftElement = (0, _react2.useMemo)(() => /*#__PURE__*/_react2.default.createElement(_SearchBox.StyledSearchBoxLeftWrapper, null, leftIcons && /*#__PURE__*/_react2.default.createElement(_Icon.default, {
381
381
  icons: leftIcons
382
382
  }), selectedImage && selectedImage), [leftIcons, selectedImage]);
383
383
 
384
384
  /**
385
385
  * This function handles changes of the input
386
386
  */
387
- const handleChange = (0, _react.useCallback)(event => {
387
+ const handleChange = (0, _react2.useCallback)(event => {
388
388
  const filteredLists = [];
389
389
  activeList.forEach(({
390
390
  list,
@@ -426,7 +426,7 @@ const SearchBox = /*#__PURE__*/(0, _react.forwardRef)(({
426
426
  /**
427
427
  * This function handles the blur event of the input
428
428
  */
429
- const handleBlur = (0, _react.useCallback)(event => {
429
+ const handleBlur = (0, _react2.useCallback)(event => {
430
430
  hasFocusRef.current = false;
431
431
  if (typeof onBlur === 'function') {
432
432
  onBlur(event);
@@ -436,14 +436,14 @@ const SearchBox = /*#__PURE__*/(0, _react.forwardRef)(({
436
436
  /**
437
437
  * This function handles the item selection
438
438
  */
439
- const handleSelect = (0, _react.useCallback)(item => {
439
+ const handleSelect = (0, _react2.useCallback)(item => {
440
440
  const newItem = {
441
441
  ...item,
442
442
  text: item.text.replace('<b>', '').replace('</b>', '').replace('</b', '')
443
443
  };
444
444
  setValue(newItem.text);
445
445
  handleClose();
446
- setSelectedImage(newItem.imageUrl ? /*#__PURE__*/_react.default.createElement(_SearchBoxItem2.StyledSearchBoxItemImage, {
446
+ setSelectedImage(newItem.imageUrl ? /*#__PURE__*/_react2.default.createElement(_SearchBoxItem2.StyledSearchBoxItemImage, {
447
447
  src: newItem.imageUrl,
448
448
  $shouldShowRoundImage: shouldShowRoundImage
449
449
  }) : undefined);
@@ -452,7 +452,7 @@ const SearchBox = /*#__PURE__*/(0, _react.forwardRef)(({
452
452
  onSelect(newItem);
453
453
  }
454
454
  }, [handleClose, onSelect, shouldShowRoundImage]);
455
- const content = (0, _react.useMemo)(() => {
455
+ const content = (0, _react2.useMemo)(() => {
456
456
  const items = [];
457
457
  matchingListsItems.forEach(({
458
458
  groupName,
@@ -463,7 +463,7 @@ const SearchBox = /*#__PURE__*/(0, _react.forwardRef)(({
463
463
  return;
464
464
  }
465
465
  if (index !== 0) {
466
- items.push(/*#__PURE__*/_react.default.createElement(_GroupName.default, {
466
+ items.push(/*#__PURE__*/_react2.default.createElement(_GroupName.default, {
467
467
  key: groupName,
468
468
  name: groupName ?? ''
469
469
  }));
@@ -474,7 +474,7 @@ const SearchBox = /*#__PURE__*/(0, _react.forwardRef)(({
474
474
  text,
475
475
  imageUrl
476
476
  }) => {
477
- items.push(/*#__PURE__*/_react.default.createElement(_SearchBoxItem.default, {
477
+ items.push(/*#__PURE__*/_react2.default.createElement(_SearchBoxItem.default, {
478
478
  key: `${id}_${groupName ?? ''}`,
479
479
  id: id,
480
480
  text: text,
@@ -486,7 +486,7 @@ const SearchBox = /*#__PURE__*/(0, _react.forwardRef)(({
486
486
  });
487
487
  });
488
488
  if (shouldAddInputToList && inputToListValue !== '') {
489
- items.push(/*#__PURE__*/_react.default.createElement(_SearchBoxItem.default, {
489
+ items.push(/*#__PURE__*/_react2.default.createElement(_SearchBoxItem.default, {
490
490
  id: "input-value",
491
491
  onSelect: handleSelect,
492
492
  text: `<b>${inputToListValue}</b`
@@ -494,7 +494,7 @@ const SearchBox = /*#__PURE__*/(0, _react.forwardRef)(({
494
494
  }
495
495
  return items;
496
496
  }, [matchingListsItems, shouldAddInputToList, inputToListValue, hasMultipleGroups, shouldShowRoundImage, handleSelect]);
497
- (0, _react.useEffect)(() => {
497
+ (0, _react2.useEffect)(() => {
498
498
  const handleKeyDown = e => {
499
499
  if (!isAnimating || matchingListsItems.length === 0) {
500
500
  return;
@@ -557,27 +557,27 @@ const SearchBox = /*#__PURE__*/(0, _react.forwardRef)(({
557
557
  document.removeEventListener('keydown', handleKeyDown);
558
558
  };
559
559
  }, [filteredChildrenArray, focusedIndex, handleSelect, isAnimating, matchingListsItems.length]);
560
- const handleKeyPress = (0, _react.useCallback)(event => {
560
+ const handleKeyPress = (0, _react2.useCallback)(event => {
561
561
  if (event.keyCode === 27) {
562
562
  setMatchingListsItems([]);
563
563
  }
564
564
  }, []);
565
- (0, _react.useImperativeHandle)(ref, () => ({
565
+ (0, _react2.useImperativeHandle)(ref, () => ({
566
566
  clear: () => setValue('')
567
567
  }), []);
568
- (0, _react.useEffect)(() => {
568
+ (0, _react2.useEffect)(() => {
569
569
  document.addEventListener('keydown', handleKeyPress);
570
570
  return () => {
571
571
  document.addEventListener('keydown', handleKeyPress);
572
572
  };
573
573
  }, [handleKeyPress]);
574
- (0, _react.useEffect)(() => {
574
+ (0, _react2.useEffect)(() => {
575
575
  if (!newContainer) {
576
576
  return;
577
577
  }
578
- setPortal(() => /*#__PURE__*/(0, _reactDom.createPortal)(/*#__PURE__*/_react.default.createElement(_framerMotion.AnimatePresence, {
578
+ setPortal(() => /*#__PURE__*/(0, _reactDom.createPortal)(/*#__PURE__*/_react2.default.createElement(_react.AnimatePresence, {
579
579
  initial: false
580
- }, isAnimating && matchingListsItems.length !== 0 && (value.trim() !== '' || shouldShowContentOnEmptyInput) && /*#__PURE__*/_react.default.createElement(_SearchBoxBody.default, {
580
+ }, isAnimating && matchingListsItems.length !== 0 && (value.trim() !== '' || shouldShowContentOnEmptyInput) && /*#__PURE__*/_react2.default.createElement(_SearchBoxBody.default, {
581
581
  filterButtons: filterButtons,
582
582
  selectedGroups: groups,
583
583
  width: width,
@@ -589,11 +589,11 @@ const SearchBox = /*#__PURE__*/(0, _react.forwardRef)(({
589
589
  shouldHideFilterButtons: shouldHideFilterButtons
590
590
  }, content)), newContainer));
591
591
  }, [browser === null || browser === void 0 ? void 0 : browser.name, newContainer, content, filterButtons, groups, height, internalCoordinates, isAnimating, width, shouldHideFilterButtons, matchingListsItems.length, value, shouldShowContentOnEmptyInput]);
592
- return (0, _react.useMemo)(() => /*#__PURE__*/_react.default.createElement(_SearchBox.StyledSearchBox, {
592
+ return (0, _react2.useMemo)(() => /*#__PURE__*/_react2.default.createElement(_SearchBox.StyledSearchBox, {
593
593
  ref: boxRef
594
- }, /*#__PURE__*/_react.default.createElement("div", {
594
+ }, /*#__PURE__*/_react2.default.createElement("div", {
595
595
  id: "search_box_input"
596
- }, /*#__PURE__*/_react.default.createElement(_Input.default, {
596
+ }, /*#__PURE__*/_react2.default.createElement(_Input.default, {
597
597
  ref: inputRef,
598
598
  onChange: handleChange,
599
599
  onBlur: handleBlur,