gd-design-library 0.3.4 → 0.4.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 (395) hide show
  1. package/CHANGELOG.md +86 -17
  2. package/README.md +2 -0
  3. package/assets/icons/account_circle.js +17 -1
  4. package/assets/icons/arrow-down.js +15 -1
  5. package/assets/icons/arrow-forward.js +17 -1
  6. package/assets/icons/attachment.js +17 -1
  7. package/assets/icons/check.js +16 -1
  8. package/assets/icons/chevron-left.js +17 -1
  9. package/assets/icons/chevron-right.js +17 -1
  10. package/assets/icons/content-copy.js +17 -1
  11. package/assets/icons/cross.js +16 -1
  12. package/assets/icons/delete_outlined.js +17 -1
  13. package/assets/icons/dot.js +16 -1
  14. package/assets/icons/edit.js +17 -1
  15. package/assets/icons/error_outline.js +22 -1
  16. package/assets/icons/eye.js +17 -1
  17. package/assets/icons/favorite.js +17 -1
  18. package/assets/icons/favorite_outlined.js +17 -1
  19. package/assets/icons/file-copy.js +16 -1
  20. package/assets/icons/filter.js +17 -1
  21. package/assets/icons/folder.js +17 -1
  22. package/assets/icons/folderOpen.js +17 -1
  23. package/assets/icons/home.js +17 -1
  24. package/assets/icons/keyboard-arrow-down.js +12 -1
  25. package/assets/icons/local_shipping.js +17 -1
  26. package/assets/icons/minus.js +16 -1
  27. package/assets/icons/mobile_menu_button.js +17 -1
  28. package/assets/icons/paymentCard.js +17 -1
  29. package/assets/icons/plus.js +16 -1
  30. package/assets/icons/portrait.js +17 -1
  31. package/assets/icons/processing.js +17 -1
  32. package/assets/icons/ruler.js +17 -1
  33. package/assets/icons/search.js +17 -1
  34. package/assets/icons/shopping_bag.js +17 -1
  35. package/assets/icons/slash.js +17 -1
  36. package/assets/icons/star.js +16 -1
  37. package/assets/icons/starOutlined.js +16 -1
  38. package/assets/icons/thumb-down.js +17 -1
  39. package/assets/icons/thumb-up.js +17 -1
  40. package/assets/icons/toast_error.js +20 -1
  41. package/assets/icons/toast_info.js +16 -1
  42. package/assets/icons/toast_success.js +20 -1
  43. package/assets/icons/toast_warning.js +16 -1
  44. package/assets/icons/upload.js +17 -1
  45. package/assets/icons/volume-up.js +17 -1
  46. package/assets/icons/wifiTethering.js +17 -1
  47. package/assets/svg/checkbox_bg_checked.svg.js +5 -2
  48. package/assets/svg/checkbox_border.svg.js +5 -2
  49. package/assets/svg/checkbox_disabled_bg_checked.svg.js +5 -2
  50. package/assets/svg/radio_bg.svg.js +5 -2
  51. package/assets/svg/radio_bg_checked.svg.js +5 -2
  52. package/components/core/Breadcrumbs/Breadcrumbs.js +34 -1
  53. package/components/core/Breadcrumbs/BreadcrumbsStyled.js +58 -1
  54. package/components/core/Breadcrumbs/constants.js +4 -1
  55. package/components/core/Button/Button.js +43 -1
  56. package/components/core/Button/ButtonStyled.js +53 -1
  57. package/components/core/Button/constants.js +4 -1
  58. package/components/core/Dropdown/Dropdown.js +38 -1
  59. package/components/core/Dropdown/DropdownStyled.js +20 -1
  60. package/components/core/Dropdown/constants.js +4 -1
  61. package/components/core/Dropdown/hooks/useDropdown.js +12 -1
  62. package/components/core/DropdownItem/DropdownItem.js +38 -1
  63. package/components/core/DropdownItem/DropdownItemStyled.js +17 -1
  64. package/components/core/DropdownItem/constants.js +4 -1
  65. package/components/core/Form/Form.js +48 -1
  66. package/components/core/Form/FormStyled.js +16 -1
  67. package/components/core/Form/constants.js +4 -1
  68. package/components/core/Form/utils.js +34 -1
  69. package/components/core/Icon/Icon.js +33 -1
  70. package/components/core/Icon/constants.js +92 -1
  71. package/components/core/Image/Image.js +39 -1
  72. package/components/core/Image/ImageStyled.js +54 -1
  73. package/components/core/Image/constants.js +4 -1
  74. package/components/core/InlineNotification/InlineNotification.js +38 -1
  75. package/components/core/InlineNotification/InlineNotificationStyled.js +29 -1
  76. package/components/core/InlineNotification/constants.js +21 -1
  77. package/components/core/Input/Input.js +72 -1
  78. package/components/core/Input/InputAdornment/InputAdornment.js +18 -1
  79. package/components/core/Input/InputAdornment/InputAdornmentStyled.js +15 -1
  80. package/components/core/Input/InputAdornment/constants.js +4 -1
  81. package/components/core/Input/InputHelper/InputHelper.js +22 -1
  82. package/components/core/Input/InputHelper/InputHelperStyled.js +17 -1
  83. package/components/core/Input/InputHelper/constants.js +4 -1
  84. package/components/core/Input/InputStyled.js +18 -1
  85. package/components/core/Input/InputWrapper/InputWrapper.js +22 -1
  86. package/components/core/Input/InputWrapper/InputWrapperStyled.js +21 -1
  87. package/components/core/Input/InputWrapper/constants.js +5 -1
  88. package/components/core/Input/constants.js +18 -1
  89. package/components/core/Input/useInputHandlers.js +31 -1
  90. package/components/core/InputFile/InputFile.js +40 -1
  91. package/components/core/InputFile/InputFileStyled.js +27 -1
  92. package/components/core/InputFile/constants.js +6 -1
  93. package/components/core/Label/Label.js +27 -1
  94. package/components/core/Label/LabelStyled.js +17 -1
  95. package/components/core/Label/constants.js +4 -1
  96. package/components/core/Link/Link.js +43 -1
  97. package/components/core/Link/LinkStyled.js +22 -1
  98. package/components/core/Link/constants.js +4 -1
  99. package/components/core/List/List.js +45 -1
  100. package/components/core/List/ListStyled.js +31 -1
  101. package/components/core/List/constants.js +4 -1
  102. package/components/core/Loader/Loader.js +28 -1
  103. package/components/core/Loader/LoaderStyled.js +41 -1
  104. package/components/core/Loader/constants.js +6 -1
  105. package/components/core/Loader/utils.js +37 -1
  106. package/components/core/Menu/Menu.js +100 -1
  107. package/components/core/Menu/MenuStyled.js +31 -1
  108. package/components/core/Menu/constants.js +24 -1
  109. package/components/core/Modal/Modal.js +47 -1
  110. package/components/core/Modal/ModalStyled.js +76 -1
  111. package/components/core/Modal/constants.js +4 -1
  112. package/components/core/Portal/Portal.d.ts +1 -2
  113. package/components/core/Portal/Portal.js +19 -1
  114. package/components/core/Portal/index.d.ts +1 -1
  115. package/components/core/Scroll/Scroll.js +40 -1
  116. package/components/core/Scroll/ScrollBar.js +68 -1
  117. package/components/core/Scroll/ScrollStyled.js +56 -1
  118. package/components/core/Scroll/constants.js +6 -1
  119. package/components/core/Scroll/utils.js +41 -1
  120. package/components/core/Select/Select.js +145 -1
  121. package/components/core/Select/SelectStyled.js +70 -1
  122. package/components/core/Select/constants.js +5 -1
  123. package/components/core/Select/hooks/useSelectContext.js +12 -1
  124. package/components/core/Separator/Separator.js +36 -1
  125. package/components/core/Separator/SeparatorStyled.js +61 -1
  126. package/components/core/Separator/constants.js +4 -1
  127. package/components/core/Skeleton/Skeleton.js +24 -1
  128. package/components/core/Skeleton/SkeletonStyled.js +28 -1
  129. package/components/core/Skeleton/constants.js +6 -1
  130. package/components/core/Slider/Slider.js +35 -1
  131. package/components/core/Slider/SliderStyled.js +20 -1
  132. package/components/core/Slider/constants.js +6 -1
  133. package/components/core/Snackbar/Snackbar.js +46 -1
  134. package/components/core/Snackbar/SnackbarManager.js +48 -1
  135. package/components/core/Snackbar/SnackbarStyled.js +109 -5
  136. package/components/core/Snackbar/constants.js +10 -1
  137. package/components/core/Switch/Switch.js +36 -1
  138. package/components/core/Switch/SwitchStyled.js +56 -1
  139. package/components/core/Switch/constants.js +4 -1
  140. package/components/core/Textarea/Textarea.js +41 -1
  141. package/components/core/Textarea/Textarea.types.d.ts +1 -3
  142. package/components/core/Textarea/Textarea.types.js +6 -1
  143. package/components/core/Textarea/TextareaStyled.js +29 -1
  144. package/components/core/Textarea/constants.js +4 -1
  145. package/components/core/Textarea/hooks/useDynamicHeightAdjustment.js +8 -1
  146. package/components/core/Textarea/hooks/useResizeObserver.js +24 -1
  147. package/components/core/Toggle/Toggle.js +37 -1
  148. package/components/core/Toggle/ToggleStyled.js +18 -1
  149. package/components/core/Toggle/constants.js +4 -1
  150. package/components/core/Tooltip/Tooltip.js +40 -1
  151. package/components/core/Tooltip/Tooltip.types.js +4 -1
  152. package/components/core/Tooltip/TooltipStyled.js +23 -1
  153. package/components/core/Tooltip/constants.js +6 -1
  154. package/components/core/Tooltip/utils.js +64 -1
  155. package/components/core/Typography/Typography.js +26 -1
  156. package/components/core/Typography/TypographyStyled.js +32 -1
  157. package/components/core/Typography/constants.js +4 -1
  158. package/components/core/Wrapper/Wrapper.js +20 -1
  159. package/components/core/Wrapper/WrapperStyled.js +23 -1
  160. package/components/core/Wrapper/constants.js +4 -1
  161. package/components/core/index.d.ts +1 -1
  162. package/components/core/types/roles.types.js +4 -1
  163. package/components/domainSpecific/Accordion/Accordion.js +35 -1
  164. package/components/domainSpecific/Accordion/AccordionContent/AccordionContent.js +21 -1
  165. package/components/domainSpecific/Accordion/AccordionHeader/AccordionHeader.js +29 -1
  166. package/components/domainSpecific/Accordion/AccordionItem/AccordionItem.js +26 -1
  167. package/components/domainSpecific/Accordion/AccordionStyled.js +39 -1
  168. package/components/domainSpecific/Accordion/constants.js +7 -1
  169. package/components/domainSpecific/Accordion/hooks/useAccordion.js +12 -1
  170. package/components/domainSpecific/Avatar/Avatar.js +44 -1
  171. package/components/domainSpecific/Avatar/AvatarStyled.js +63 -1
  172. package/components/domainSpecific/Avatar/constants.js +6 -1
  173. package/components/domainSpecific/Card/Card.js +47 -1
  174. package/components/domainSpecific/Card/CardButton/CardButton.js +25 -1
  175. package/components/domainSpecific/Card/CardButton/CardButtonStyled.js +18 -1
  176. package/components/domainSpecific/Card/CardButton/constants.js +4 -1
  177. package/components/domainSpecific/Card/CardCounter/CardCounter.js +26 -1
  178. package/components/domainSpecific/Card/CardCounter/CardCounterStyled.js +17 -1
  179. package/components/domainSpecific/Card/CardCounter/constants.js +4 -1
  180. package/components/domainSpecific/Card/CardDescription/CardDescription.js +24 -1
  181. package/components/domainSpecific/Card/CardDescription/CardDescriptionStyled.js +24 -1
  182. package/components/domainSpecific/Card/CardDescription/constants.js +10 -1
  183. package/components/domainSpecific/Card/CardImage/CardImage.js +26 -1
  184. package/components/domainSpecific/Card/CardImage/CardImageStyled.js +18 -1
  185. package/components/domainSpecific/Card/CardImage/constants.js +4 -1
  186. package/components/domainSpecific/Card/CardPrice/CardPrice.js +22 -1
  187. package/components/domainSpecific/Card/CardPrice/CardPriceStyled.js +18 -1
  188. package/components/domainSpecific/Card/CardPrice/constants.js +4 -1
  189. package/components/domainSpecific/Card/CardRating/CardRating.js +30 -1
  190. package/components/domainSpecific/Card/CardRating/CardRatingStyled.js +18 -1
  191. package/components/domainSpecific/Card/CardRating/constants.js +6 -1
  192. package/components/domainSpecific/Card/CardTitle/CardTitle.js +25 -1
  193. package/components/domainSpecific/Card/CardTitle/CardTitleStyled.js +24 -1
  194. package/components/domainSpecific/Card/CardTitle/constants.js +10 -1
  195. package/components/domainSpecific/Card/CartStyled.js +26 -1
  196. package/components/domainSpecific/Card/constants.js +4 -1
  197. package/components/domainSpecific/Carousel/Carousel.js +137 -1
  198. package/components/domainSpecific/Carousel/Carousel.types.d.ts +1 -12
  199. package/components/domainSpecific/Carousel/CarouselStyled.js +143 -1
  200. package/components/domainSpecific/Carousel/constants.js +4 -1
  201. package/components/domainSpecific/ChatBubble/ChatBubble.js +26 -1
  202. package/components/domainSpecific/ChatBubble/ChatBubbleStyled.js +43 -1
  203. package/components/domainSpecific/ChatBubble/constants.js +4 -1
  204. package/components/domainSpecific/ContentCarousel/ContentCarousel.js +69 -1
  205. package/components/domainSpecific/ContentCarousel/ContentCarouselStyled.js +32 -1
  206. package/components/domainSpecific/ContentCarousel/constants.js +4 -1
  207. package/components/domainSpecific/Counter/Counter.js +55 -1
  208. package/components/domainSpecific/Counter/CounterStyled.js +27 -1
  209. package/components/domainSpecific/Counter/constants.js +8 -1
  210. package/components/domainSpecific/DragAndDropFiles/DragAndDropFiles.js +48 -1
  211. package/components/domainSpecific/DragAndDropFiles/DragAndDropFilesStyled.js +16 -1
  212. package/components/domainSpecific/DragAndDropFiles/constants.js +4 -1
  213. package/components/domainSpecific/DragAndDropFiles/hooks/useDragAndDrop/useDragAndDrop.js +49 -1
  214. package/components/domainSpecific/Header/Header.js +88 -1
  215. package/components/domainSpecific/Header/HeaderStyled.js +136 -1
  216. package/components/domainSpecific/Header/constants.js +4 -1
  217. package/components/domainSpecific/Price/Price.js +23 -1
  218. package/components/domainSpecific/Price/PriceStyled.js +42 -1
  219. package/components/domainSpecific/Price/constants.js +4 -1
  220. package/components/domainSpecific/ProgressBar/ProgressBar.js +29 -1
  221. package/components/domainSpecific/ProgressBar/ProgressBarStyled.js +70 -1
  222. package/components/domainSpecific/ProgressBar/constants.js +7 -1
  223. package/components/domainSpecific/RadioGroup/RadioGroup.js +54 -1
  224. package/components/domainSpecific/RadioGroup/RadioGroup.types.js +4 -1
  225. package/components/domainSpecific/RadioGroup/RadioGroupItem/RadioGroupItem.js +37 -1
  226. package/components/domainSpecific/RadioGroup/RadioGroupStyled.js +130 -1
  227. package/components/domainSpecific/RadioGroup/constants.js +5 -1
  228. package/components/domainSpecific/Rating/Rating.js +63 -1
  229. package/components/domainSpecific/Rating/RatingStyled.js +61 -1
  230. package/components/domainSpecific/Rating/constants.js +9 -1
  231. package/components/domainSpecific/Search/Search.js +58 -1
  232. package/components/domainSpecific/Search/SearchStyled.js +16 -1
  233. package/components/domainSpecific/Search/constants.js +7 -1
  234. package/components/domainSpecific/SearchModal/SearchInput/SearchInput.js +26 -1
  235. package/components/domainSpecific/SearchModal/SearchInput/SearchInputStyled.js +25 -1
  236. package/components/domainSpecific/SearchModal/SearchInput/constants.js +6 -1
  237. package/components/domainSpecific/SearchModal/SearchItems/SearchItems.js +48 -1
  238. package/components/domainSpecific/SearchModal/SearchItems/SearchItemsStyled.js +82 -1
  239. package/components/domainSpecific/SearchModal/SearchItems/constants.js +10 -1
  240. package/components/domainSpecific/SearchModal/SearchItems/utils.js +7 -1
  241. package/components/domainSpecific/SearchModal/SearchLoader/SearchLoader.js +20 -1
  242. package/components/domainSpecific/SearchModal/SearchLoader/SearchLoaderStyled.js +14 -1
  243. package/components/domainSpecific/SearchModal/SearchLoader/constants.js +4 -1
  244. package/components/domainSpecific/SearchModal/SearchModal.js +39 -1
  245. package/components/domainSpecific/SearchModal/SearchModalStyled.js +29 -1
  246. package/components/domainSpecific/SearchModal/constants.js +8 -1
  247. package/components/domainSpecific/Stepper/Stepper.js +42 -1
  248. package/components/domainSpecific/Stepper/StepperStyled.js +58 -1
  249. package/components/domainSpecific/Stepper/constants.js +4 -1
  250. package/components/domainSpecific/Stepper/utils.js +37 -1
  251. package/components/domainSpecific/Tabs/Tabs.js +40 -1
  252. package/components/domainSpecific/Tabs/TabsStyled.js +79 -1
  253. package/components/domainSpecific/Tabs/constants.js +6 -1
  254. package/components/index.types.js +4 -1
  255. package/components/layout/ChatContainer/ChatContainer.js +51 -1
  256. package/components/layout/ChatContainer/ChatContainer.types.d.ts +1 -6
  257. package/components/layout/ChatContainer/ChatContainerStyled.js +71 -1
  258. package/components/layout/ChatContainer/constants.js +4 -1
  259. package/components/layout/Column/Column.js +26 -1
  260. package/components/layout/Column/ColumnStyled.js +36 -1
  261. package/components/layout/Column/constants.js +4 -1
  262. package/components/layout/FlexContainer/FlexContainer.js +25 -1
  263. package/components/layout/FlexContainer/FlexContainerStyled.js +27 -1
  264. package/components/layout/FlexContainer/constants.js +4 -1
  265. package/components/layout/FlexContainer/utils.js +18 -1
  266. package/components/layout/Row/Row.js +26 -1
  267. package/components/layout/Row/RowStyled.js +36 -1
  268. package/components/layout/Row/constants.js +4 -1
  269. package/components/templates/SkeletonSearch/SkeletonSearch.js +30 -1
  270. package/components/templates/SkeletonSearch/SkeletonSearchStyled.js +97 -1
  271. package/components/templates/SkeletonSearch/constants.js +5 -1
  272. package/components/widget/DragAndDrop/DragAndDrop.js +74 -1
  273. package/components/widget/DragAndDrop/DragAndDropStyled.js +61 -1
  274. package/components/widget/DragAndDrop/constants.js +4 -1
  275. package/components/widget/DragAndDrop/utils/validators.js +17 -1
  276. package/constants/keyboard.js +10 -1
  277. package/constants/positioning.js +12 -1
  278. package/constants/timers.js +5 -1
  279. package/hooks/useAutoFocus/useAutoFocus.js +11 -1
  280. package/hooks/useCarousel/useCarousel.js +61 -1
  281. package/hooks/useClickOutside/useClickOutside.js +15 -1
  282. package/hooks/useKeyControls/useKeyControls.js +19 -1
  283. package/hooks/useMediaQuery/useMediaQuery.js +14 -1
  284. package/hooks/useTheme/useTheme.js +48 -1
  285. package/index.js +350 -1
  286. package/package.json +17 -2
  287. package/stories/components/TokenViewer/TokenViewer.d.ts +2 -0
  288. package/stories/components/TokenViewer/TokenViewer.types.d.ts +12 -0
  289. package/stories/components/TokenViewer/TokenViewerStyled.d.ts +11 -0
  290. package/stories/components/TokenViewer/index.d.ts +1 -0
  291. package/tokens/accordion.js +72 -1
  292. package/tokens/animations.js +63 -1
  293. package/tokens/avatar.d.ts +22 -15
  294. package/tokens/avatar.js +153 -1
  295. package/tokens/borders.js +17 -1
  296. package/tokens/breadcrumbs.js +37 -1
  297. package/tokens/breakpoints.d.ts +8 -0
  298. package/tokens/breakpoints.js +12 -0
  299. package/tokens/button.js +146 -1
  300. package/tokens/card.d.ts +5 -1
  301. package/tokens/card.js +191 -1
  302. package/tokens/carousel.js +216 -1
  303. package/tokens/chat.d.ts +4 -0
  304. package/tokens/chat.js +122 -1
  305. package/tokens/chatbubble.d.ts +1 -3
  306. package/tokens/chatbubble.js +75 -1
  307. package/tokens/colors.js +157 -1
  308. package/tokens/column.js +9 -1
  309. package/tokens/constants.js +4 -1
  310. package/tokens/counter.js +37 -1
  311. package/tokens/cursors.js +20 -1
  312. package/tokens/defaultTheme.d.ts +154 -47
  313. package/tokens/defaultTheme.js +123 -1
  314. package/tokens/display.js +19 -1
  315. package/tokens/draganddrop.js +87 -1
  316. package/tokens/draganddropfiles.js +6 -1
  317. package/tokens/flexContainer.js +13 -1
  318. package/tokens/font.js +52 -1
  319. package/tokens/form.js +6 -1
  320. package/tokens/header.js +123 -1
  321. package/tokens/icon.js +32 -1
  322. package/tokens/image.js +40 -1
  323. package/tokens/index.d.ts +71 -47
  324. package/tokens/index.js +145 -1
  325. package/tokens/inlineNotification.js +75 -1
  326. package/tokens/input.js +192 -1
  327. package/tokens/inputfile.js +12 -1
  328. package/tokens/label.js +9 -1
  329. package/tokens/link.js +66 -1
  330. package/tokens/list.js +87 -1
  331. package/tokens/loader.js +141 -1
  332. package/tokens/menu.js +19 -1
  333. package/tokens/modal.js +108 -1
  334. package/tokens/price.js +32 -1
  335. package/tokens/progressbar.js +60 -1
  336. package/tokens/radiogroup.js +103 -2
  337. package/tokens/radius.js +14 -1
  338. package/tokens/rating.js +73 -1
  339. package/tokens/reset.js +4 -1
  340. package/tokens/row.js +8 -1
  341. package/tokens/scroll.js +99 -1
  342. package/tokens/search.js +45 -1
  343. package/tokens/searchModal.js +159 -1
  344. package/tokens/select.js +99 -1
  345. package/tokens/separator.js +63 -1
  346. package/tokens/shadow.js +25 -1
  347. package/tokens/skeleton.js +77 -1
  348. package/tokens/slider.js +45 -1
  349. package/tokens/snackbar.d.ts +30 -28
  350. package/tokens/snackbar.js +169 -1
  351. package/tokens/spacing.js +13 -1
  352. package/tokens/stepper.js +147 -1
  353. package/tokens/switch.js +76 -1
  354. package/tokens/tabs.js +108 -1
  355. package/tokens/textarea.js +45 -1
  356. package/tokens/toggle.js +19 -1
  357. package/tokens/tooltip.js +69 -1
  358. package/tokens/types/index.types.js +4 -1
  359. package/tokens/typography.js +134 -1
  360. package/tokens/utils.d.ts +6 -0
  361. package/tokens/utils.js +88 -1
  362. package/tokens/values.js +73 -1
  363. package/tokens/wrapper.js +34 -1
  364. package/types/accesability.js +4 -1
  365. package/types/button.js +7 -1
  366. package/types/card.js +5 -1
  367. package/types/carousel.d.ts +12 -1
  368. package/types/carousel.js +6 -0
  369. package/types/chat.js +4 -1
  370. package/types/common.js +5 -1
  371. package/types/cursors.js +4 -1
  372. package/types/index.d.ts +1 -0
  373. package/types/input.js +6 -1
  374. package/types/label.js +4 -1
  375. package/types/layout.js +4 -1
  376. package/types/link.js +5 -1
  377. package/types/list.js +4 -1
  378. package/types/separator.js +5 -1
  379. package/types/skeleton.js +4 -1
  380. package/types/snackbar.js +5 -1
  381. package/types/stepper.js +5 -1
  382. package/types/typography.js +6 -1
  383. package/types/wrapper.js +4 -1
  384. package/utils/animationFrame.js +17 -1
  385. package/utils/common.js +4 -1
  386. package/utils/date.js +11 -1
  387. package/utils/focus.js +54 -1
  388. package/utils/helpers.js +42 -1
  389. package/utils/layout.js +32 -1
  390. package/utils/math.js +11 -1
  391. package/utils/setInRange.js +11 -1
  392. package/utils/uniqueKeys.js +4 -1
  393. package/components/domainSpecific/Carousel/Carousel.types.js +0 -1
  394. package/components/layout/ChatContainer/ChatContainer.types.js +0 -1
  395. /package/{gd-design-library.css → assets/styles.css} +0 -0
@@ -1 +1,24 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react"),n=require("../../../../utils/helpers.js"),i=(e,r)=>{const t=s.useRef(!1);s.useEffect(()=>{if(!e.current||!r)return;const c=new ResizeObserver(()=>{if(!t.current){t.current=!0;return}r&&e.current&&r({width:n.get(e,"current.scrollWidth",0),height:n.get(e,"current.scrollHeight",0)})});return c.observe(e.current),()=>{c.disconnect()}},[r])};exports.useResizeObserver=i;
1
+ import { useRef as i, useEffect as s } from "react";
2
+ import { get as n } from "../../../../utils/helpers.js";
3
+ const l = (r, e) => {
4
+ const t = i(!1);
5
+ s(() => {
6
+ if (!r.current || !e) return;
7
+ const c = new ResizeObserver(() => {
8
+ if (!t.current) {
9
+ t.current = !0;
10
+ return;
11
+ }
12
+ e && r.current && e({
13
+ width: n(r, "current.scrollWidth", 0),
14
+ height: n(r, "current.scrollHeight", 0)
15
+ });
16
+ });
17
+ return c.observe(r.current), () => {
18
+ c.disconnect();
19
+ };
20
+ }, [e]);
21
+ };
22
+ export {
23
+ l as useResizeObserver
24
+ };
@@ -1 +1,37 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("@emotion/react/jsx-runtime"),u=require("react"),N=require("../../../hooks/useTheme/useTheme.js"),c=require("../../../types/button.js"),h=require("../Button/Button.js"),i=require("./constants.js"),p=require("./ToggleStyled.js"),v=e=>typeof e=="object"?e:{label:e,value:e},g=u.forwardRef((e,d)=>{const{items:T=[],onValueChange:n,value:b,renderItemContent:r,disabled:s=!1,...m}=e,{theme:f}=N.useTheme(),q=u.useCallback(t=>{n&&n(t)},[n]);return l.jsx(p.ToggleStyled,{ref:d,"data-testid":i.COMPONENT_NAME,theme:f,disabled:s,...m,children:T.map((t,a)=>{const o=v(t),C={variant:o.value===b?c.ButtonVariant.Contained:c.ButtonVariant.Text,onClick:()=>q(o.value),disabled:s};return l.jsx(h.Button,{...C,children:r?r(t,a):o.label},`toggle-${a}`)})})});g.displayName=i.COMPONENT_NAME;exports.Toggle=g;
1
+ "use client";
2
+ import { jsx as s } from "@emotion/react/jsx-runtime";
3
+ import { forwardRef as C, useCallback as h } from "react";
4
+ import { COMPONENT_NAME as c } from "./constants.js";
5
+ import { ToggleStyled as v } from "./ToggleStyled.js";
6
+ import { useTheme as T } from "../../../hooks/useTheme/useTheme.js";
7
+ import { ButtonVariant as m } from "../../../types/button.js";
8
+ import { Button as I } from "../Button/Button.js";
9
+ const N = (t) => typeof t == "object" ? t : {
10
+ label: t,
11
+ value: t
12
+ }, x = C((t, i) => {
13
+ const {
14
+ items: u = [],
15
+ onValueChange: o,
16
+ value: f,
17
+ renderItemContent: n,
18
+ disabled: a = !1,
19
+ ...p
20
+ } = t, {
21
+ theme: d
22
+ } = T(), g = h((e) => {
23
+ o && o(e);
24
+ }, [o]);
25
+ return /* @__PURE__ */ s(v, { ref: i, "data-testid": c, theme: d, disabled: a, ...p, children: u.map((e, l) => {
26
+ const r = N(e), b = {
27
+ variant: r.value === f ? m.Contained : m.Text,
28
+ onClick: () => g(r.value),
29
+ disabled: a
30
+ };
31
+ return /* @__PURE__ */ s(I, { ...b, children: n ? n(e, l) : r.label }, `toggle-${l}`);
32
+ }) });
33
+ });
34
+ x.displayName = c;
35
+ export {
36
+ x as Toggle
37
+ };
@@ -1 +1,18 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("@emotion/react/jsx-runtime"),n=require("react"),t=require("../../../utils/helpers.js"),u=n.forwardRef((s,r)=>{const{theme:{switchToggle:e}={},disabled:o,styles:l={},...c}=s,d=[t.get(e,"default",{}),l,o?t.get(e,"disabled",{}):{}];return i.jsx("div",{css:d,...c,ref:r})});exports.ToggleStyled=u;
1
+ "use client";
2
+ import { jsx as m } from "@emotion/react/jsx-runtime";
3
+ import { forwardRef as c } from "react";
4
+ import { get as t } from "../../../utils/helpers.js";
5
+ const n = c((o, s) => {
6
+ const {
7
+ theme: {
8
+ switchToggle: e
9
+ } = {},
10
+ disabled: r,
11
+ styles: d = {},
12
+ ...l
13
+ } = o, i = [t(e, "default", {}), d, r ? t(e, "disabled", {}) : {}];
14
+ return /* @__PURE__ */ m("div", { css: i, ...l, ref: s });
15
+ });
16
+ export {
17
+ n as ToggleStyled
18
+ };
@@ -1 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="Toggle";exports.COMPONENT_NAME=e;
1
+ const o = "Toggle";
2
+ export {
3
+ o as COMPONENT_NAME
4
+ };
@@ -1 +1,40 @@
1
- "use client";"use strict";const e=require("@emotion/react/jsx-runtime"),E=require("react"),j=require("../../../hooks/useTheme/useTheme.js");require("../Breadcrumbs/Breadcrumbs.js");require("../Button/Button.js");require("../Dropdown/Dropdown.js");require("../Dropdown/hooks/useDropdown.js");require("../DropdownItem/DropdownItem.js");require("../Form/Form.js");require("../Icon/Icon.js");require("../Image/Image.js");require("../InlineNotification/InlineNotification.js");require("../Input/Input.js");require("../InputFile/InputFile.js");require("../Label/Label.js");require("../Link/Link.js");require("../List/List.js");require("../Loader/Loader.js");require("../Menu/Menu.js");require("../Modal/Modal.js");const w=require("../Portal/Portal.js");require("../Scroll/Scroll.js");require("../Select/Select.js");require("../Separator/Separator.js");require("../Skeleton/Skeleton.js");require("../Slider/SliderStyled.js");require("../Slider/Slider.js");require("../Snackbar/Snackbar.js");require("uuid");require("../Snackbar/SnackbarStyled.js");require("../Snackbar/constants.js");require("../Switch/Switch.js");require("../Toggle/Toggle.js");require("../Typography/Typography.js");require("../Wrapper/Wrapper.js");require("../Textarea/Textarea.js");require("../../layout/FlexContainer/FlexContainer.js");require("../../layout/Column/Column.js");require("../../layout/Row/Row.js");require("../../layout/ChatContainer/ChatContainer.js");require("../../domainSpecific/Accordion/hooks/useAccordion.js");require("embla-carousel-react");require("../../domainSpecific/Avatar/Avatar.js");require("../../domainSpecific/Card/Card.js");require("../../domainSpecific/Carousel/Carousel.js");require("../../domainSpecific/ChatBubble/ChatBubble.js");require("../../domainSpecific/ContentCarousel/ContentCarousel.js");require("../../domainSpecific/Counter/Counter.js");require("../../domainSpecific/DragAndDropFiles/DragAndDropFiles.js");require("../../domainSpecific/Header/Header.js");require("../../domainSpecific/Price/Price.js");require("../../domainSpecific/ProgressBar/ProgressBar.js");require("../../domainSpecific/RadioGroup/RadioGroup.js");require("../../domainSpecific/Rating/Rating.js");require("../../domainSpecific/Search/Search.js");require("../../domainSpecific/SearchModal/SearchModal.js");require("../../domainSpecific/Stepper/Stepper.js");require("../../domainSpecific/Tabs/Tabs.js");require("../../widget/DragAndDrop/DragAndDrop.js");require("../../templates/SkeletonSearch/SkeletonSearch.js");const q=require("./constants.js"),O=require("./utils.js"),t=require("./TooltipStyled.js"),R=E.forwardRef((o,s)=>{const{children:l,content:n,position:c,delay:a,classNames:p="",gap:d,styles:h,...r}=o,{theme:T}=j.useTheme(),{isVisible:f,coords:i,containerRef:N,tooltipRef:m,showTooltip:y,hideTooltip:M,positionWithFallback:u}=O.useTooltip(c,a,d),x=`${p.trim()} tooltip-${u}`;return e.jsxs(t.TooltipWrapperStyled,{ref:N,onMouseEnter:y,onMouseLeave:M,...r,"data-testid":`${q.COMPONENT_NAME}-wrapper`,styles:h,children:[l,f&&e.jsx(w,{withWrapper:!1,ref:s,children:e.jsx(t.TooltipStyled,{"data-testid":q.COMPONENT_NAME,className:x,ref:m,position:u,theme:T,style:{top:i.top,left:i.left},...r,children:n})})]})});module.exports=R;
1
+ "use client";
2
+ import { jsxs as x, jsx as r } from "@emotion/react/jsx-runtime";
3
+ import { forwardRef as E } from "react";
4
+ import { COMPONENT_NAME as i } from "./constants.js";
5
+ import { useTooltip as R } from "./utils.js";
6
+ import { TooltipWrapperStyled as W, TooltipStyled as $ } from "./TooltipStyled.js";
7
+ import { useTheme as b } from "../../../hooks/useTheme/useTheme.js";
8
+ import { Portal as j } from "../Portal/Portal.js";
9
+ const A = E((s, l) => {
10
+ const {
11
+ children: p,
12
+ content: a,
13
+ position: n,
14
+ delay: m,
15
+ classNames: f = "",
16
+ gap: c,
17
+ styles: d,
18
+ ...o
19
+ } = s, {
20
+ theme: h
21
+ } = b(), {
22
+ isVisible: T,
23
+ coords: t,
24
+ containerRef: u,
25
+ tooltipRef: y,
26
+ showTooltip: N,
27
+ hideTooltip: w,
28
+ positionWithFallback: e
29
+ } = R(n, m, c), M = `${f.trim()} tooltip-${e}`;
30
+ return /* @__PURE__ */ x(W, { ref: u, onMouseEnter: N, onMouseLeave: w, ...o, "data-testid": `${i}-wrapper`, styles: d, children: [
31
+ p,
32
+ T && /* @__PURE__ */ r(j, { withWrapper: !1, ref: l, children: /* @__PURE__ */ r($, { "data-testid": i, className: M, ref: y, position: e, theme: h, style: {
33
+ top: t.top,
34
+ left: t.left
35
+ }, ...o, children: a }) })
36
+ ] });
37
+ });
38
+ export {
39
+ A as default
40
+ };
@@ -1 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var e=(t=>(t.Top="top",t.Bottom="bottom",t.Left="left",t.Right="right",t))(e||{});exports.TooltipPosition=e;
1
+ var t = /* @__PURE__ */ ((r) => (r.Top = "top", r.Bottom = "bottom", r.Left = "left", r.Right = "right", r))(t || {});
2
+ export {
3
+ t as TooltipPosition
4
+ };
@@ -1 +1,23 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("@emotion/react/jsx-runtime"),i=require("react"),p=require("../../../utils/helpers.js"),n=i.forwardRef((e,t)=>{const{theme:r,styles:o={},...s}=e,l=[p.get(r,"tooltip.wrapper.default",{}),o];return c.jsx("div",{css:l,...s,ref:t})}),d=i.forwardRef((e,t)=>{const{theme:r,styles:o={},...s}=e,l=[p.get(r,"tooltip.default",{}),o];return c.jsx("div",{css:l,...s,ref:t})});exports.TooltipStyled=d;exports.TooltipWrapperStyled=n;
1
+ "use client";
2
+ import { jsx as l } from "@emotion/react/jsx-runtime";
3
+ import { forwardRef as c } from "react";
4
+ import { get as i } from "../../../utils/helpers.js";
5
+ const n = c((t, e) => {
6
+ const {
7
+ theme: o,
8
+ styles: r = {},
9
+ ...s
10
+ } = t, p = [i(o, "tooltip.wrapper.default", {}), r];
11
+ return /* @__PURE__ */ l("div", { css: p, ...s, ref: e });
12
+ }), u = c((t, e) => {
13
+ const {
14
+ theme: o,
15
+ styles: r = {},
16
+ ...s
17
+ } = t, p = [i(o, "tooltip.default", {}), r];
18
+ return /* @__PURE__ */ l("div", { css: p, ...s, ref: e });
19
+ });
20
+ export {
21
+ u as TooltipStyled,
22
+ n as TooltipWrapperStyled
23
+ };
@@ -1 +1,6 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t="Tooltip",A=10,E=200;exports.COMPONENT_NAME=t;exports.DEFAULT_DELAY=E;exports.DEFAULT_GAP=A;
1
+ const o = "Tooltip", t = 10, A = 200;
2
+ export {
3
+ o as COMPONENT_NAME,
4
+ A as DEFAULT_DELAY,
5
+ t as DEFAULT_GAP
6
+ };
@@ -1 +1,64 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react"),o=require("./Tooltip.types.js"),h=require("./constants.js"),F=(t=o.TooltipPosition.Top,l=h.DEFAULT_DELAY,i=h.DEFAULT_GAP)=>{const[e,p]=s.useState(!1),[g,P]=s.useState({top:0,left:0}),[m,b]=s.useState(t),r=s.useRef(null),u=s.useRef(null),n=s.useRef(null),k=s.useCallback(()=>{n.current=setTimeout(()=>{r.current&&(p(!0),requestAnimationFrame(()=>{if(u.current&&r.current){const T=r.current.getBoundingClientRect(),f=u.current.getBoundingClientRect(),d=w(T,f,t,i),c=a(t,f,d);b(c),P(c===t?d:w(T,f,c,i))}}))},l)},[l,t,i]),B=()=>{n.current&&clearTimeout(n.current),p(!1)};return s.useEffect(()=>()=>{n.current&&(clearTimeout(n.current),n.current=null)},[]),{isVisible:e,coords:g,containerRef:r,tooltipRef:u,showTooltip:k,hideTooltip:B,positionWithFallback:m}},w=(t,l,i,e)=>{switch(i){case o.TooltipPosition.Top:return{top:t.top+window.scrollY-l.height-e,left:t.left+window.scrollX+t.width/2};case o.TooltipPosition.Bottom:return{top:t.top+window.scrollY+t.height+e,left:t.left+window.scrollX+t.width/2};case o.TooltipPosition.Left:return{top:t.top+window.scrollY+t.height/2,left:t.left+window.scrollX-l.width-e};case o.TooltipPosition.Right:return{top:t.top+window.scrollY+t.height/2,left:t.right+window.scrollX+e};default:throw Error(`Unexpected position '${i}'`)}},a=(t,l,i)=>{let e=t;return t===o.TooltipPosition.Top&&i.top<0?e=o.TooltipPosition.Bottom:t===o.TooltipPosition.Bottom&&i.top+l.height>window.innerHeight+window.scrollY?e=o.TooltipPosition.Top:t===o.TooltipPosition.Left&&i.left<0?e=o.TooltipPosition.Right:t===o.TooltipPosition.Right&&i.left+l.width>window.innerWidth+window.scrollX&&(e=o.TooltipPosition.Left),e};exports.getCoords=w;exports.getFallbackPosition=a;exports.useTooltip=F;
1
+ import { useState as w, useRef as c, useCallback as F, useEffect as L } from "react";
2
+ import { TooltipPosition as o } from "./Tooltip.types.js";
3
+ import { DEFAULT_DELAY as Y, DEFAULT_GAP as A } from "./constants.js";
4
+ const U = (t = o.Top, r = Y, l = A) => {
5
+ const [e, h] = w(!1), [T, g] = w({
6
+ top: 0,
7
+ left: 0
8
+ }), [a, B] = w(t), i = c(null), n = c(null), s = c(null), b = F(() => {
9
+ s.current = setTimeout(() => {
10
+ i.current && (h(!0), requestAnimationFrame(() => {
11
+ if (n.current && i.current) {
12
+ const d = i.current.getBoundingClientRect(), f = n.current.getBoundingClientRect(), p = m(d, f, t, l), u = C(t, f, p);
13
+ B(u), g(u === t ? p : m(d, f, u, l));
14
+ }
15
+ }));
16
+ }, r);
17
+ }, [r, t, l]), k = () => {
18
+ s.current && clearTimeout(s.current), h(!1);
19
+ };
20
+ return L(() => () => {
21
+ s.current && (clearTimeout(s.current), s.current = null);
22
+ }, []), {
23
+ isVisible: e,
24
+ coords: T,
25
+ containerRef: i,
26
+ tooltipRef: n,
27
+ showTooltip: b,
28
+ hideTooltip: k,
29
+ positionWithFallback: a
30
+ };
31
+ }, m = (t, r, l, e) => {
32
+ switch (l) {
33
+ case o.Top:
34
+ return {
35
+ top: t.top + window.scrollY - r.height - e,
36
+ left: t.left + window.scrollX + t.width / 2
37
+ };
38
+ case o.Bottom:
39
+ return {
40
+ top: t.top + window.scrollY + t.height + e,
41
+ left: t.left + window.scrollX + t.width / 2
42
+ };
43
+ case o.Left:
44
+ return {
45
+ top: t.top + window.scrollY + t.height / 2,
46
+ left: t.left + window.scrollX - r.width - e
47
+ };
48
+ case o.Right:
49
+ return {
50
+ top: t.top + window.scrollY + t.height / 2,
51
+ left: t.right + window.scrollX + e
52
+ };
53
+ default:
54
+ throw Error(`Unexpected position '${l}'`);
55
+ }
56
+ }, C = (t, r, l) => {
57
+ let e = t;
58
+ return t === o.Top && l.top < 0 ? e = o.Bottom : t === o.Bottom && l.top + r.height > window.innerHeight + window.scrollY ? e = o.Top : t === o.Left && l.left < 0 ? e = o.Right : t === o.Right && l.left + r.width > window.innerWidth + window.scrollX && (e = o.Left), e;
59
+ };
60
+ export {
61
+ m as getCoords,
62
+ C as getFallbackPosition,
63
+ U as useTooltip
64
+ };
@@ -1 +1,26 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("@emotion/react/jsx-runtime"),T=require("react"),d=require("../../../hooks/useTheme/useTheme.js"),t=require("../../../types/typography.js"),r=require("./constants.js"),N=require("./TypographyStyled.js"),a=T.forwardRef((s,n)=>{const{variant:e=t.TypographyVariant.Inherit,as:i,size:o,children:y,align:c=t.TextAlign.Start,color:l,styleVariant:p,...u}=s,{theme:g}=d.useTheme();return h.jsx(N.TypographyStyled,{ref:n,theme:g,$as:i||e,$variant:e,$align:c,$size:o,$color:l,$styleVariant:p,"data-testid":r.COMPONENT_NAME,...u,children:y})});a.displayName=r.COMPONENT_NAME;exports.Typography=a;
1
+ "use client";
2
+ import { jsx as f } from "@emotion/react/jsx-runtime";
3
+ import { forwardRef as c } from "react";
4
+ import { COMPONENT_NAME as t } from "./constants.js";
5
+ import { TypographyStyled as h } from "./TypographyStyled.js";
6
+ import { TypographyVariant as d, TextAlign as g } from "../../../types/typography.js";
7
+ import { useTheme as T } from "../../../hooks/useTheme/useTheme.js";
8
+ const $ = c((o, a) => {
9
+ const {
10
+ variant: r = d.Inherit,
11
+ as: e,
12
+ size: i,
13
+ children: m,
14
+ align: n = g.Start,
15
+ color: s,
16
+ styleVariant: p,
17
+ ...l
18
+ } = o, {
19
+ theme: y
20
+ } = T();
21
+ return /* @__PURE__ */ f(h, { ref: a, theme: y, $as: e || r, $variant: r, $align: n, $size: i, $color: s, $styleVariant: p, "data-testid": t, ...l, children: m });
22
+ });
23
+ $.displayName = t;
24
+ export {
25
+ $ as Typography
26
+ };
@@ -1 +1,32 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("@emotion/react/jsx-runtime"),x=require("react"),t=require("../../../utils/helpers.js"),j=require("../../../types/common.js"),a=require("../../../types/typography.js"),z=x.forwardRef((y,c)=>{const{theme:{typography:e,colors:i}={},$as:p="span",$color:r,$align:l=a.TextAlign.Start,$variant:n=a.TypographyVariant.Inherit,$size:g=j.SizeVariant.Md,$styleVariant:s,styles:u,...S}=y,h=t.get(e,"base",{}),d=t.get(e,n,{}),m=t.get(e,[n,g],{}),$=r&&t.get(i,r,r),o=typeof s=="string"?[s]:s,T=o==null?void 0:o.reduce((b,f)=>({...b,...t.get(e,["styleVariant",f],{})}),{}),q=[h,d,m,T,{textAlign:l,color:$},u];return v.jsx(p,{css:q,...S,ref:c})});exports.TypographyStyled=z;
1
+ "use client";
2
+ import { jsx as T } from "@emotion/react/jsx-runtime";
3
+ import { forwardRef as v } from "react";
4
+ import { TextAlign as z, TypographyVariant as V } from "../../../types/typography.js";
5
+ import { SizeVariant as b } from "../../../types/common.js";
6
+ import { get as t } from "../../../utils/helpers.js";
7
+ const M = v((a, p) => {
8
+ const {
9
+ theme: {
10
+ typography: o,
11
+ colors: i
12
+ } = {},
13
+ $as: y = "span",
14
+ $color: r,
15
+ $align: c = z.Start,
16
+ $variant: n = V.Inherit,
17
+ $size: l = b.Md,
18
+ $styleVariant: e,
19
+ styles: m,
20
+ ...g
21
+ } = a, S = t(o, "base", {}), f = t(o, n, {}), u = t(o, [n, l], {}), d = r && t(i, r, r), s = typeof e == "string" ? [e] : e, h = s == null ? void 0 : s.reduce(($, x) => ({
22
+ ...$,
23
+ ...t(o, ["styleVariant", x], {})
24
+ }), {});
25
+ return /* @__PURE__ */ T(y, { css: [S, f, u, h, {
26
+ textAlign: c,
27
+ color: d
28
+ }, m], ...g, ref: p });
29
+ });
30
+ export {
31
+ M as TypographyStyled
32
+ };
@@ -1 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t="typography";exports.COMPONENT_NAME=t;
1
+ const o = "typography";
2
+ export {
3
+ o as COMPONENT_NAME
4
+ };
@@ -1 +1,20 @@
1
- "use client";"use strict";const i=require("@emotion/react/jsx-runtime"),c=require("react"),o=require("../../../hooks/useTheme/useTheme.js"),u=require("../../../types/wrapper.js"),p=require("./constants.js"),d=require("./WrapperStyled.js"),q=c.forwardRef((e,r)=>{const{variant:t=u.WrapperVariant.Inline,children:s,...n}=e,{theme:a}=o.useTheme();return i.jsx(d.WrapperStyled,{ref:r,$variant:t,theme:a,"data-testid":p.COMPONENT_NAME,...n,children:s})});module.exports=q;
1
+ "use client";
2
+ import { jsx as i } from "@emotion/react/jsx-runtime";
3
+ import { forwardRef as p } from "react";
4
+ import { COMPONENT_NAME as n } from "./constants.js";
5
+ import { WrapperStyled as f } from "./WrapperStyled.js";
6
+ import { useTheme as s } from "../../../hooks/useTheme/useTheme.js";
7
+ import { WrapperVariant as d } from "../../../types/wrapper.js";
8
+ const v = p((r, t) => {
9
+ const {
10
+ variant: e = d.Inline,
11
+ children: o,
12
+ ...a
13
+ } = r, {
14
+ theme: m
15
+ } = s();
16
+ return /* @__PURE__ */ i(f, { ref: t, $variant: e, theme: m, "data-testid": n, ...a, children: o });
17
+ });
18
+ export {
19
+ v as default
20
+ };
@@ -1 +1,23 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("@emotion/react/jsx-runtime"),u=require("react"),r=require("../../../utils/helpers.js"),d=require("../../../types/wrapper.js"),y=u.forwardRef((t,s)=>{const{theme:{wrapper:e}={},$variant:n=d.WrapperVariant.Inline,styles:a={},...o}=t,p=r.get(e,"default",{}),c=r.get(e,n,{}),i={...p,...c,...a};return l.jsx("div",{css:i,...o,ref:s})});exports.WrapperStyled=y;
1
+ "use client";
2
+ import { jsx as c } from "@emotion/react/jsx-runtime";
3
+ import { forwardRef as f } from "react";
4
+ import { WrapperVariant as l } from "../../../types/wrapper.js";
5
+ import { get as t } from "../../../utils/helpers.js";
6
+ const v = f((e, o) => {
7
+ const {
8
+ theme: {
9
+ wrapper: r
10
+ } = {},
11
+ $variant: s = l.Inline,
12
+ styles: p = {},
13
+ ...a
14
+ } = e, n = t(r, "default", {}), i = t(r, s, {}), m = {
15
+ ...n,
16
+ ...i,
17
+ ...p
18
+ };
19
+ return /* @__PURE__ */ c("div", { css: m, ...a, ref: o });
20
+ });
21
+ export {
22
+ v as WrapperStyled
23
+ };
@@ -1 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="wrapper";exports.COMPONENT_NAME=e;
1
+ const p = "wrapper";
2
+ export {
3
+ p as COMPONENT_NAME
4
+ };
@@ -27,4 +27,4 @@ export * from './Tooltip';
27
27
  export * from './Typography';
28
28
  export * from './Wrapper';
29
29
  export * from './types/index.types';
30
- export { Textarea } from './Textarea';
30
+ export * from './Textarea';
@@ -1 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var r=(e=>(e.Link="link",e.Region="region",e))(r||{});exports.Roles=r;
1
+ var r = /* @__PURE__ */ ((n) => (n.Link = "link", n.Region = "region", n))(r || {});
2
+ export {
3
+ r as Roles
4
+ };
@@ -1 +1,35 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const O=require("@emotion/react/jsx-runtime"),c=require("react"),m=require("../../../utils/helpers.js"),b=require("./hooks/useAccordion.js"),f=({children:l,allowMultipleExpand:u=!1,value:i,defaultValue:I=[],onChange:s})=>{const[p,a]=c.useState(I),r=m.isArray(i),t=r?i:p,o=c.useCallback(e=>{if(r){s==null||s(e);return}a(e)},[s,r]),d=c.useCallback(e=>{if(t.includes(e)){const n=m.without(t,e);o(n)}else{const n=u?[...t,e]:[e];o(n)}},[u,t,o]),A=c.useMemo(()=>({openedItems:t,toggleItem:d}),[d,t]);return O.jsx(b.AccordionContext.Provider,{value:A,children:l})};exports.Accordion=f;
1
+ "use client";
2
+ import { jsx as O } from "@emotion/react/jsx-runtime";
3
+ import { useState as x, useCallback as i, useMemo as A } from "react";
4
+ import { isArray as a, without as b } from "../../../utils/helpers.js";
5
+ import { AccordionContext as j } from "./hooks/useAccordion.js";
6
+ const z = ({
7
+ children: p,
8
+ allowMultipleExpand: m = !1,
9
+ value: n,
10
+ defaultValue: u = [],
11
+ onChange: s
12
+ }) => {
13
+ const [I, f] = x(u), o = a(n), e = o ? n : I, r = i((t) => {
14
+ if (o) {
15
+ s == null || s(t);
16
+ return;
17
+ }
18
+ f(t);
19
+ }, [s, o]), d = i((t) => {
20
+ if (e.includes(t)) {
21
+ const c = b(e, t);
22
+ r(c);
23
+ } else {
24
+ const c = m ? [...e, t] : [t];
25
+ r(c);
26
+ }
27
+ }, [m, e, r]), l = A(() => ({
28
+ openedItems: e,
29
+ toggleItem: d
30
+ }), [d, e]);
31
+ return /* @__PURE__ */ O(j.Provider, { value: l, children: p });
32
+ };
33
+ export {
34
+ z as Accordion
35
+ };
@@ -1 +1,21 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("@emotion/react/jsx-runtime"),s=require("../../../../hooks/useTheme/useTheme.js");require("../../../core/Breadcrumbs/Breadcrumbs.js");require("../../../core/Button/Button.js");require("../../../core/Dropdown/Dropdown.js");require("../../../core/Dropdown/hooks/useDropdown.js");require("../../../core/DropdownItem/DropdownItem.js");require("../../../core/Form/Form.js");require("../../../core/Icon/Icon.js");require("../../../core/Image/Image.js");require("../../../core/InlineNotification/InlineNotification.js");require("../../../core/Input/Input.js");require("../../../core/InputFile/InputFile.js");require("../../../core/Label/Label.js");require("../../../core/Link/Link.js");require("../../../core/List/List.js");require("../../../core/Loader/Loader.js");require("../../../core/Menu/Menu.js");require("../../../core/Modal/Modal.js");require("../../../core/Portal/Portal.js");require("../../../core/Scroll/Scroll.js");require("../../../core/Select/Select.js");require("../../../core/Separator/Separator.js");require("../../../core/Skeleton/Skeleton.js");require("../../../core/Slider/SliderStyled.js");require("../../../core/Slider/Slider.js");require("../../../core/Snackbar/Snackbar.js");require("react");require("uuid");require("../../../layout/FlexContainer/FlexContainer.js");require("../../../layout/Column/Column.js");require("../../../layout/Row/Row.js");require("../../../layout/ChatContainer/ChatContainer.js");require("../hooks/useAccordion.js");require("embla-carousel-react");const d=require("../constants.js"),a=require("../AccordionStyled.js");require("../../Avatar/Avatar.js");require("../../Card/Card.js");require("../../Carousel/Carousel.js");require("../../ChatBubble/ChatBubble.js");require("../../ContentCarousel/ContentCarousel.js");require("../../Counter/Counter.js");require("../../DragAndDropFiles/DragAndDropFiles.js");require("../../Header/Header.js");require("../../Price/Price.js");require("../../ProgressBar/ProgressBar.js");require("../../RadioGroup/RadioGroup.js");require("../../Rating/Rating.js");require("../../Search/Search.js");require("../../SearchModal/SearchModal.js");require("../../Stepper/Stepper.js");require("../../Tabs/Tabs.js");require("../../../widget/DragAndDrop/DragAndDrop.js");require("../../../templates/SkeletonSearch/SkeletonSearch.js");require("../../../core/Snackbar/SnackbarStyled.js");require("../../../core/Snackbar/constants.js");require("../../../core/Switch/Switch.js");require("../../../core/Toggle/Toggle.js");require("../../../core/Tooltip/Tooltip.js");require("../../../core/Typography/Typography.js");require("../../../core/Wrapper/Wrapper.js");const l=require("../../../core/types/roles.types.js");require("../../../core/Textarea/Textarea.js");const y=({children:r,id:e,className:i="",isOpen:u=!1,styles:q={}})=>{const o=`accordion-panel-${e}`,t=`accordion-header-${e}`,{theme:n}=s.useTheme();return c.jsx(a.AccordionContentStyled,{id:o,role:l.Roles.Region,"data-testid":`${d.CONTENT_COMPONENT}-${e}`,"aria-labelledby":t,$isOpen:u,styles:q,theme:n,className:i,children:r})};exports.AccordionContent=y;
1
+ "use client";
2
+ import { jsx as m } from "@emotion/react/jsx-runtime";
3
+ import { CONTENT_COMPONENT as d } from "../constants.js";
4
+ import { AccordionContentStyled as s } from "../AccordionStyled.js";
5
+ import { useTheme as l } from "../../../../hooks/useTheme/useTheme.js";
6
+ import { Roles as p } from "../../../core/types/roles.types.js";
7
+ const O = ({
8
+ children: e,
9
+ id: o,
10
+ className: r = "",
11
+ isOpen: t = !1,
12
+ styles: n = {}
13
+ }) => {
14
+ const c = `accordion-panel-${o}`, i = `accordion-header-${o}`, {
15
+ theme: a
16
+ } = l();
17
+ return /* @__PURE__ */ m(s, { id: c, role: p.Region, "data-testid": `${d}-${o}`, "aria-labelledby": i, $isOpen: t, styles: n, theme: a, className: r, children: e });
18
+ };
19
+ export {
20
+ O as AccordionContent
21
+ };
@@ -1 +1,29 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("@emotion/react/jsx-runtime"),A=require("../../../../hooks/useTheme/useTheme.js");require("react");require("embla-carousel-react");const q=require("../hooks/useAccordion.js"),m=require("../constants.js"),t=require("../AccordionStyled.js"),y=({children:s,id:e,styles:i={},className:d="",isOpen:r=!1,expandIcon:c})=>{const{theme:o}=A.useTheme(),{toggleItem:a}=q.useAccordion(),l=`accordion-header-${e}`,u=`accordion-panel-${e}`,h=()=>{e&&a(e)};return n.jsxs(t.AccordionHeaderStyled,{theme:o,id:l,"data-testid":`${m.HEADER_COMPONENT}-${e}`,className:d,"aria-expanded":r,"aria-controls":u,onClick:h,styles:i,children:[s,c&&n.jsx(t.AccordionIconStyled,{theme:o,$isOpen:r,children:c})]})};exports.AccordionHeader=y;
1
+ "use client";
2
+ import { jsxs as m, jsx as p } from "@emotion/react/jsx-runtime";
3
+ import { HEADER_COMPONENT as f } from "../constants.js";
4
+ import { AccordionHeaderStyled as h, AccordionIconStyled as A } from "../AccordionStyled.js";
5
+ import { useTheme as $ } from "../../../../hooks/useTheme/useTheme.js";
6
+ import { useAccordion as u } from "../hooks/useAccordion.js";
7
+ const g = ({
8
+ children: t,
9
+ id: o,
10
+ styles: n = {},
11
+ className: d = "",
12
+ isOpen: e = !1,
13
+ expandIcon: r
14
+ }) => {
15
+ const {
16
+ theme: c
17
+ } = $(), {
18
+ toggleItem: i
19
+ } = u(), a = `accordion-header-${o}`, s = `accordion-panel-${o}`, l = () => {
20
+ o && i(o);
21
+ };
22
+ return /* @__PURE__ */ m(h, { theme: c, id: a, "data-testid": `${f}-${o}`, className: d, "aria-expanded": e, "aria-controls": s, onClick: l, styles: n, children: [
23
+ t,
24
+ r && /* @__PURE__ */ p(A, { theme: c, $isOpen: e, children: r })
25
+ ] });
26
+ };
27
+ export {
28
+ g as AccordionHeader
29
+ };
@@ -1 +1,26 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("@emotion/react/jsx-runtime"),t=require("react"),d=require("../../../../hooks/useTheme/useTheme.js");require("embla-carousel-react");const a=require("../hooks/useAccordion.js"),m=require("../constants.js"),q=require("../AccordionStyled.js"),A=({children:o,id:e,styles:c={},className:s=""})=>{const{openedItems:u}=a.useAccordion(),{theme:i}=d.useTheme(),n=e&&u.includes(e);return l.jsx(q.AccordionItemStyled,{"data-testid":`${m.ITEM_COMPONENT}-${e}`,"data-open":n,"data-value":e,theme:i,className:s,styles:c,children:t.Children.map(o,r=>t.isValidElement(r)?t.cloneElement(r,{id:e,isOpen:n}):null)})};exports.AccordionItem=A;
1
+ "use client";
2
+ import { jsx as s } from "@emotion/react/jsx-runtime";
3
+ import { Children as l, isValidElement as p, cloneElement as a } from "react";
4
+ import { ITEM_COMPONENT as u } from "../constants.js";
5
+ import { AccordionItemStyled as d } from "../AccordionStyled.js";
6
+ import { useAccordion as f } from "../hooks/useAccordion.js";
7
+ import { useTheme as E } from "../../../../hooks/useTheme/useTheme.js";
8
+ const C = ({
9
+ children: r,
10
+ id: e,
11
+ styles: n = {},
12
+ className: m = ""
13
+ }) => {
14
+ const {
15
+ openedItems: c
16
+ } = f(), {
17
+ theme: i
18
+ } = E(), t = e && c.includes(e);
19
+ return /* @__PURE__ */ s(d, { "data-testid": `${u}-${e}`, "data-open": t, "data-value": e, theme: i, className: m, styles: n, children: l.map(r, (o) => p(o) ? a(o, {
20
+ id: e,
21
+ isOpen: t
22
+ }) : null) });
23
+ };
24
+ export {
25
+ C as AccordionItem
26
+ };
@@ -1 +1,39 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("@emotion/react/jsx-runtime"),e=require("../../../utils/helpers.js");require("react");const u=c=>{const{theme:n,$isOpen:s,styles:d={},...t}=c,o=e.get(n,"accordion.content",{}),l=s?"opened":"closed",i=[e.get(o,"default",{}),e.get(o,l,{}),d];return r.jsx("div",{css:i,...t})},y=c=>{const{theme:n,styles:s,...d}=c,t=e.get(n,"accordion.header",{}),o=[e.get(t,"default",{}),s];return r.jsx("button",{css:o,...d})},S=c=>{const{theme:n,styles:s,...d}=c,t=e.get(n,"accordion.item",{}),o=[e.get(t,"default",{}),s];return r.jsx("div",{css:o,...d})},m=c=>{const{theme:n,$isOpen:s,...d}=c,t=e.get(n,"accordion.icon",{}),o=s?"opened":"closed",l=[e.get(t,"default",{}),e.get(t,o,{})];return r.jsx("span",{css:l,...d})};exports.AccordionContentStyled=u;exports.AccordionHeaderStyled=y;exports.AccordionIconStyled=m;exports.AccordionItemStyled=S;
1
+ "use client";
2
+ import { jsx as r } from "@emotion/react/jsx-runtime";
3
+ import { get as t } from "../../../utils/helpers.js";
4
+ const y = (n) => {
5
+ const {
6
+ theme: c,
7
+ $isOpen: s,
8
+ styles: d = {},
9
+ ...e
10
+ } = n, o = t(c, "accordion.content", {}), l = s ? "opened" : "closed", m = [t(o, "default", {}), t(o, l, {}), d];
11
+ return /* @__PURE__ */ r("div", { css: m, ...e });
12
+ }, u = (n) => {
13
+ const {
14
+ theme: c,
15
+ styles: s,
16
+ ...d
17
+ } = n, e = t(c, "accordion.header", {}), o = [t(e, "default", {}), s];
18
+ return /* @__PURE__ */ r("button", { css: o, ...d });
19
+ }, S = (n) => {
20
+ const {
21
+ theme: c,
22
+ styles: s,
23
+ ...d
24
+ } = n, e = t(c, "accordion.item", {}), o = [t(e, "default", {}), s];
25
+ return /* @__PURE__ */ r("div", { css: o, ...d });
26
+ }, a = (n) => {
27
+ const {
28
+ theme: c,
29
+ $isOpen: s,
30
+ ...d
31
+ } = n, e = t(c, "accordion.icon", {}), o = s ? "opened" : "closed", l = [t(e, "default", {}), t(e, o, {})];
32
+ return /* @__PURE__ */ r("span", { css: l, ...d });
33
+ };
34
+ export {
35
+ y as AccordionContentStyled,
36
+ u as AccordionHeaderStyled,
37
+ a as AccordionIconStyled,
38
+ S as AccordionItemStyled
39
+ };
@@ -1 +1,7 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o="AccordionItem",E="AccordionContent",O="AccordionHeader",N="Accordion Context must be inside Accordion component";exports.CONTENT_COMPONENT=E;exports.CONTEXT_ERROR_MESSAGE=N;exports.HEADER_COMPONENT=O;exports.ITEM_COMPONENT=o;
1
+ const o = "AccordionItem", c = "AccordionContent", n = "AccordionHeader", t = "Accordion Context must be inside Accordion component";
2
+ export {
3
+ c as CONTENT_COMPONENT,
4
+ t as CONTEXT_ERROR_MESSAGE,
5
+ n as HEADER_COMPONENT,
6
+ o as ITEM_COMPONENT
7
+ };
@@ -1 +1,12 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),n=require("../constants.js"),o=e.createContext(null),c=()=>{const t=e.useContext(o);if(!t)throw new Error(n.CONTEXT_ERROR_MESSAGE);return t};exports.AccordionContext=o;exports.useAccordion=c;
1
+ "use client";
2
+ import { createContext as t, useContext as r } from "react";
3
+ import { CONTEXT_ERROR_MESSAGE as e } from "../constants.js";
4
+ const n = t(null), s = () => {
5
+ const o = r(n);
6
+ if (!o) throw new Error(e);
7
+ return o;
8
+ };
9
+ export {
10
+ n as AccordionContext,
11
+ s as useAccordion
12
+ };