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 client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("@emotion/react/jsx-runtime"),m=require("react"),h=require("../../../hooks/useTheme/useTheme.js"),S=require("../../../types/skeleton.js"),e=require("./constants.js"),N=require("./SkeletonStyled.js"),k=m.forwardRef((t,n)=>{const{variant:r=S.SkeletonVariant.Rounded,children:i,animationName:o,animationProps:a=e.BASE_ANIMATION,width:s,height:c,...u}=t,{theme:l}=h.useTheme();return d.jsx(N.SkeletonStyled,{ref:n,theme:l,$width:s,$height:c,$variant:r,$animationName:o,$animationProps:a,"data-testid":e.COMPONENT_NAME,...u,children:i})});exports.Skeleton=k;
1
+ "use client";
2
+ import { jsx as f } from "@emotion/react/jsx-runtime";
3
+ import { forwardRef as h } from "react";
4
+ import { BASE_ANIMATION as p, COMPONENT_NAME as N } from "./constants.js";
5
+ import { SkeletonStyled as l } from "./SkeletonStyled.js";
6
+ import { SkeletonVariant as c } from "../../../types/skeleton.js";
7
+ import { useTheme as S } from "../../../hooks/useTheme/useTheme.js";
8
+ const M = h((t, o) => {
9
+ const {
10
+ variant: e = c.Rounded,
11
+ children: r,
12
+ animationName: i,
13
+ animationProps: n = p,
14
+ width: m,
15
+ height: a,
16
+ ...s
17
+ } = t, {
18
+ theme: d
19
+ } = S();
20
+ return /* @__PURE__ */ f(l, { ref: o, theme: d, $width: m, $height: a, $variant: e, $animationName: i, $animationProps: n, "data-testid": N, ...s, children: r });
21
+ });
22
+ export {
23
+ M as Skeleton
24
+ };
@@ -1 +1,28 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("@emotion/react/jsx-runtime"),p=require("react"),e=require("../../../utils/helpers.js"),r=require("../../../tokens/utils.js"),$=require("../../../types/skeleton.js"),q=p.forwardRef((a,i)=>{const{theme:{skeleton:t,animations:l}={},$variant:c=$.SkeletonVariant.Rounded,styles:m={},$animationName:n="blinkKeyframes",$animationProps:u,...y}=a,s=e.get(l,n??"",null),o=s?r.convertJsonToCssKeyframeCss(s):n,S={animation:`${o} ${u}`},{boxStyles:d,restProps:f}=r.getBoxStyles(y),k=[e.get(t,"default",{}),e.get(t,c,{}),d,o?S:{},m];return g.jsx("span",{css:k,...f,ref:i})});exports.SkeletonStyled=q;
1
+ "use client";
2
+ import { jsx as S } from "@emotion/react/jsx-runtime";
3
+ import { forwardRef as $ } from "react";
4
+ import { convertJsonToCssKeyframeCss as k, getBoxStyles as x } from "../../../tokens/utils.js";
5
+ import { SkeletonVariant as K } from "../../../types/skeleton.js";
6
+ import { get as t } from "../../../utils/helpers.js";
7
+ const P = $((a, r) => {
8
+ const {
9
+ theme: {
10
+ skeleton: o,
11
+ animations: m
12
+ } = {},
13
+ $variant: i = K.Rounded,
14
+ styles: l = {},
15
+ $animationName: e = "blinkKeyframes",
16
+ $animationProps: f,
17
+ ...c
18
+ } = a, n = t(m, e ?? "", null), s = n ? k(n) : e, p = {
19
+ animation: `${s} ${f}`
20
+ }, {
21
+ boxStyles: y,
22
+ restProps: d
23
+ } = x(c), u = [t(o, "default", {}), t(o, i, {}), y, s ? p : {}, l];
24
+ return /* @__PURE__ */ S("span", { css: u, ...d, ref: r });
25
+ });
26
+ export {
27
+ P as SkeletonStyled
28
+ };
@@ -1 +1,6 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../../constants/timers.js"),A="Skeleton",N=`${e.BASE_ANIMATION_MS}ms ease-in-out ${e.BASE_ANIMATION_DELAY_MS}ms infinite`;exports.BASE_ANIMATION=N;exports.COMPONENT_NAME=A;
1
+ import { BASE_ANIMATION_MS as A, BASE_ANIMATION_DELAY_MS as N } from "../../../constants/timers.js";
2
+ const t = "Skeleton", M = `${A}ms ease-in-out ${N}ms infinite`;
3
+ export {
4
+ M as BASE_ANIMATION,
5
+ t as COMPONENT_NAME
6
+ };
@@ -1 +1,35 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=require("@emotion/react/jsx-runtime"),i=require("react"),g=require("../../../hooks/useTheme/useTheme.js"),A=require("../../../utils/setInRange.js"),a=require("./constants.js"),M=require("./SliderStyled.js"),c=i.forwardRef((d,m)=>{const{min:e=a.SLIDER_MIN_VALUE_DEFAULT,max:t=a.SLIDER_MAX_VALUE_DEFAULT,value:r,onChange:n,disabled:u,...E}=d,{theme:S}=g.useTheme(),[s,l]=i.useState(r||e);i.useEffect(()=>{r!==void 0&&l(r)},[r]);const v=f=>{const o=A.setInRange({min:e,max:t,value:Number(f.target.value)});l(o),n==null||n(o)},N=t>e?(s-e)/(t-e):e;return _.jsx(M.StyledSlider,{"data-testid":a.COMPONENT_NAME,type:"range",role:"slider",min:e,max:t,value:s,disabled:u,theme:S,fillRatio:N,onChange:v,"aria-valuenow":s,"aria-valuemin":e,"aria-valuemax":t,"aria-disabled":u,ref:m,...E})});c.displayName=a.COMPONENT_NAME;exports.Slider=c;
1
+ "use client";
2
+ import { jsx as v } from "@emotion/react/jsx-runtime";
3
+ import { forwardRef as _, useState as A, useEffect as L } from "react";
4
+ import { SLIDER_MIN_VALUE_DEFAULT as N, SLIDER_MAX_VALUE_DEFAULT as S, COMPONENT_NAME as n } from "./constants.js";
5
+ import { StyledSlider as R } from "./SliderStyled.js";
6
+ import { setInRange as V } from "../../../utils/setInRange.js";
7
+ import { useTheme as g } from "../../../hooks/useTheme/useTheme.js";
8
+ const h = _((s, u) => {
9
+ const {
10
+ min: e = N,
11
+ max: a = S,
12
+ value: r,
13
+ onChange: t,
14
+ disabled: i,
15
+ ...d
16
+ } = s, {
17
+ theme: f
18
+ } = g(), [o, l] = A(r || e);
19
+ L(() => {
20
+ r !== void 0 && l(r);
21
+ }, [r]);
22
+ const c = (E) => {
23
+ const m = V({
24
+ min: e,
25
+ max: a,
26
+ value: Number(E.target.value)
27
+ });
28
+ l(m), t == null || t(m);
29
+ }, p = a > e ? (o - e) / (a - e) : e;
30
+ return /* @__PURE__ */ v(R, { "data-testid": n, type: "range", role: "slider", min: e, max: a, value: o, disabled: i, theme: f, fillRatio: p, onChange: c, "aria-valuenow": o, "aria-valuemin": e, "aria-valuemax": a, "aria-disabled": i, ref: u, ...d });
31
+ });
32
+ h.displayName = n;
33
+ export {
34
+ h as Slider
35
+ };
@@ -1 +1,20 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("@emotion/react/jsx-runtime"),d=require("react"),n=require("../../../utils/helpers.js"),u=d.forwardRef((e,t)=>{const{theme:{slider:r}={},fillRatio:s,styles:l={},...i}=e,o=[n.get(r,"default",{}),{"--gd-slider-fill-ratio":s},l];return c.jsx("input",{css:o,...i,ref:t})});exports.StyledSlider=u;
1
+ "use client";
2
+ import { jsx as f } from "@emotion/react/jsx-runtime";
3
+ import { forwardRef as d } from "react";
4
+ import { get as m } from "../../../utils/helpers.js";
5
+ const u = d((t, e) => {
6
+ const {
7
+ theme: {
8
+ slider: r
9
+ } = {},
10
+ fillRatio: o,
11
+ styles: s = {},
12
+ ...i
13
+ } = t, l = [m(r, "default", {}), {
14
+ "--gd-slider-fill-ratio": o
15
+ }, s];
16
+ return /* @__PURE__ */ f("input", { css: l, ...i, ref: e });
17
+ });
18
+ export {
19
+ u as StyledSlider
20
+ };
@@ -1 +1,6 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=0,_=100,A="Slider";exports.COMPONENT_NAME=A;exports.SLIDER_MAX_VALUE_DEFAULT=_;exports.SLIDER_MIN_VALUE_DEFAULT=E;
1
+ const E = 0, _ = 100, A = "Slider";
2
+ export {
3
+ A as COMPONENT_NAME,
4
+ _ as SLIDER_MAX_VALUE_DEFAULT,
5
+ E as SLIDER_MIN_VALUE_DEFAULT
6
+ };
@@ -1 +1,46 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@emotion/react/jsx-runtime"),u=require("react"),x=require("../../../hooks/useTheme/useTheme.js");require("../../../tokens/separator.js");require("../../../tokens/draganddrop.js");require("../../../tokens/avatar.js");require("../../../tokens/chatbubble.js");require("../../../tokens/radiogroup.js");require("../../../tokens/searchModal.js");require("../../../tokens/carousel.js");require("../../../tokens/progressbar.js");require("../../../tokens/card.js");require("../../../tokens/counter.js");require("../../../tokens/font.js");require("../../../tokens/spacing.js");require("../../../tokens/radius.js");require("../../../tokens/typography.js");require("../../../tokens/borders.js");require("../../../tokens/button.js");require("../../../tokens/input.js");require("../../../tokens/label.js");require("../../../tokens/link.js");require("../../../tokens/wrapper.js");require("../../../tokens/loader.js");require("../../../tokens/toggle.js");require("../../../tokens/skeleton.js");require("../../../tokens/snackbar.js");require("../../../tokens/list.js");require("../../../tokens/select.js");require("../../../tokens/search.js");require("../../../tokens/breadcrumbs.js");require("../../../tokens/icon.js");;/* empty css */require("../../../tokens/tabs.js");require("../../../tokens/stepper.js");require("../../../tokens/rating.js");require("../../../tokens/header.js");require("../../../tokens/switch.js");require("../../../tokens/chat.js");require("../../../tokens/slider.js");require("../../../tokens/menu.js");require("../../../tokens/scroll.js");require("../../../tokens/values.js");require("../../../tokens/flexContainer.js");require("../../../tokens/tooltip.js");require("../../../tokens/modal.js");require("../../../tokens/image.js");require("../../../tokens/price.js");require("../../../tokens/accordion.js");require("../../../tokens/inlineNotification.js");const f=require("../../../tokens/utils.js"),a=require("./constants.js"),r=require("./SnackbarStyled.js"),A=u.forwardRef((d,S)=>{const{title:b,message:o,variant:q=a.DEFAULT_VARIANT,isAnimated:k=!0,duration:n,onClose:t,action:c,colored:y=!1,dismissOnClick:m=!0,icon:C,...T}=d,{theme:i}=x.useTheme(),[l,h]=u.useState(!1),s=u.useCallback(()=>{h(!0),setTimeout(()=>t==null?void 0:t(),a.ANIMATION_DURATION)},[]);return u.useEffect(()=>{if(!n)return;const j=setTimeout(()=>{s()},n);return()=>clearTimeout(j)},[n]),e.jsxs(r.SnackbarStyled,{ref:S,$variant:q,$colored:y,$isClosing:l,$isAnimated:k,onClick:m?s:void 0,theme:i,role:"alert","aria-live":"polite","aria-hidden":l,"data-testid":a.COMPONENT_NAME,...f.convertToInlineBoxStyles(T),children:[t&&e.jsx(r.CloseButtonWrapperStyled,{theme:i,onClick:s,"aria-label":"Close notification",children:e.jsx(r.CloseButtonIconStyled,{theme:i})}),e.jsxs(r.SnackbarBodyStyled,{theme:i,children:[C||e.jsx(r.SnackbarIconStyled,{theme:i,$variant:q}),e.jsxs(r.SnackbarContentStyled,{theme:i,children:[e.jsx(r.SnackbarTitleStyled,{children:b}),o&&e.jsx(r.SnackbarDescriptionStyled,{children:o}),c&&e.jsx(r.SnackbarActionsContainerStyled,{theme:i,children:c})]})]})]})});exports.Snackbar=A;
1
+ "use client";
2
+ import { jsxs as o, jsx as t } from "@emotion/react/jsx-runtime";
3
+ import { forwardRef as T, useState as b, useCallback as A, useEffect as I } from "react";
4
+ import { DEFAULT_VARIANT as N, ANIMATION_DURATION as v, COMPONENT_NAME as O } from "./constants.js";
5
+ import { SnackbarStyled as $, CloseButtonWrapperStyled as g, CloseButtonIconStyled as x, SnackbarBodyStyled as B, SnackbarIconStyled as E, SnackbarContentStyled as D, SnackbarTitleStyled as M, SnackbarDescriptionStyled as R, SnackbarActionsContainerStyled as _ } from "./SnackbarStyled.js";
6
+ import { useTheme as j } from "../../../hooks/useTheme/useTheme.js";
7
+ import { convertToInlineBoxStyles as P } from "../../../tokens/utils.js";
8
+ const q = T((d, m) => {
9
+ const {
10
+ title: S,
11
+ message: a,
12
+ variant: l = N,
13
+ isAnimated: u = !0,
14
+ duration: i,
15
+ onClose: r,
16
+ action: s,
17
+ colored: f = !1,
18
+ dismissOnClick: C = !0,
19
+ icon: k,
20
+ ...p
21
+ } = d, {
22
+ theme: e
23
+ } = j(), [c, h] = b(!1), n = A(() => {
24
+ h(!0), setTimeout(() => r == null ? void 0 : r(), v);
25
+ }, []);
26
+ return I(() => {
27
+ if (!i) return;
28
+ const y = setTimeout(() => {
29
+ n();
30
+ }, i);
31
+ return () => clearTimeout(y);
32
+ }, [i]), /* @__PURE__ */ o($, { ref: m, $variant: l, $colored: f, $isClosing: c, $isAnimated: u, onClick: C ? n : void 0, theme: e, role: "alert", "aria-live": "polite", "aria-hidden": c, "data-testid": O, ...P(p), children: [
33
+ r && /* @__PURE__ */ t(g, { theme: e, onClick: n, "aria-label": "Close notification", children: /* @__PURE__ */ t(x, { theme: e }) }),
34
+ /* @__PURE__ */ o(B, { theme: e, children: [
35
+ k || /* @__PURE__ */ t(E, { theme: e, $variant: l }),
36
+ /* @__PURE__ */ o(D, { theme: e, children: [
37
+ /* @__PURE__ */ t(M, { children: S }),
38
+ a && /* @__PURE__ */ t(R, { children: a }),
39
+ s && /* @__PURE__ */ t(_, { theme: e, children: s })
40
+ ] })
41
+ ] })
42
+ ] });
43
+ });
44
+ export {
45
+ q as Snackbar
46
+ };
@@ -1 +1,48 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("@emotion/react/jsx-runtime"),a=require("react"),b=require("uuid"),h=require("../../../utils/helpers.js"),p=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 A=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");const T=require("./Snackbar.js"),f=require("./SnackbarStyled.js"),n=require("./constants.js");require("../Switch/Switch.js");require("../Toggle/Toggle.js");require("../Tooltip/Tooltip.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");let t=[];const s=[],S=()=>{s.forEach(e=>e(t))},O=e=>{const o={id:h.get(e,"id",b.v4()),variant:n.DEFAULT_VARIANT,position:n.DEFAULT_POSITION,duration:n.DEFAULT_DURATION,...e};t=[...t,o].slice(-50),S()},E=e=>{t=t.filter(q=>q.id!==e),S()},N=e=>O(e),m=()=>{const{theme:e}=p.useTheme(),[q,o]=a.useState(t);a.useEffect(()=>{const r=u=>o(u);return s.push(r),()=>{const u=s.indexOf(r);u>-1&&s.splice(u,1)}},[]);const l=a.useMemo(()=>q.reduce((r,u)=>{const i=u.position||n.DEFAULT_POSITION;return r[i]=r[i]||[],r[i].push(u),r},{}),[q]);return q.length?c.jsx(A,{withWrapper:!1,"data-testid":n.COMPONENT_SNACKBAR_MANAGER_NAME,children:Object.entries(l).map(([r,u])=>c.jsx(f.SnackbarContainerStyled,{theme:e,$position:r,children:u.map(i=>c.jsx(T.Snackbar,{...i,onClose:()=>{var d;(d=i.onClose)==null||d.call(i),E(i.id)}},i.id))},r))}):null};exports.SnackbarManager=m;exports.showSnackbar=N;
1
+ "use client";
2
+ import { jsx as m } from "@emotion/react/jsx-runtime";
3
+ import { useState as a, useEffect as l, useMemo as S } from "react";
4
+ import { v4 as A } from "uuid";
5
+ import { SnackbarContainerStyled as h } from "./SnackbarStyled.js";
6
+ import { Snackbar as E } from "./Snackbar.js";
7
+ import { DEFAULT_DURATION as N, DEFAULT_POSITION as p, DEFAULT_VARIANT as T, COMPONENT_SNACKBAR_MANAGER_NAME as b } from "./constants.js";
8
+ import { get as O } from "../../../utils/helpers.js";
9
+ import { useTheme as _ } from "../../../hooks/useTheme/useTheme.js";
10
+ import { Portal as C } from "../Portal/Portal.js";
11
+ let i = [];
12
+ const s = [], d = () => {
13
+ s.forEach((e) => e(i));
14
+ }, M = (e) => {
15
+ const c = {
16
+ id: O(e, "id", A()),
17
+ variant: T,
18
+ position: p,
19
+ duration: N,
20
+ ...e
21
+ };
22
+ i = [...i, c].slice(-50), d();
23
+ }, g = (e) => {
24
+ i = i.filter((n) => n.id !== e), d();
25
+ }, v = (e) => M(e), y = () => {
26
+ const {
27
+ theme: e
28
+ } = _(), [n, c] = a(i);
29
+ l(() => {
30
+ const o = (r) => c(r);
31
+ return s.push(o), () => {
32
+ const r = s.indexOf(o);
33
+ r > -1 && s.splice(r, 1);
34
+ };
35
+ }, []);
36
+ const f = S(() => n.reduce((o, r) => {
37
+ const t = r.position || p;
38
+ return o[t] = o[t] || [], o[t].push(r), o;
39
+ }, {}), [n]);
40
+ return n.length ? /* @__PURE__ */ m(C, { withWrapper: !1, "data-testid": b, children: Object.entries(f).map(([o, r]) => /* @__PURE__ */ m(h, { theme: e, $position: o, children: r.map((t) => /* @__PURE__ */ m(E, { ...t, onClose: () => {
41
+ var u;
42
+ (u = t.onClose) == null || u.call(t), g(t.id);
43
+ } }, t.id)) }, o)) }) : null;
44
+ };
45
+ export {
46
+ y as SnackbarManager,
47
+ v as showSnackbar
48
+ };
@@ -1,5 +1,109 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("@emotion/react/jsx-runtime"),V=require("react"),o=require("../../../utils/helpers.js"),c=require("../../../tokens/utils.js"),g=require("../Icon/Icon.js"),p=require("../Typography/Typography.js"),a=require("../../../types/typography.js"),O=V.forwardRef((n,e)=>{var d,S,u,b;const{theme:{animations:t,snackbar:s}={},$variant:k,$colored:m,$isClosing:h,$isAnimated:C,styles:x,...v}=n,T=c.convertJsonToCssKeyframeCss(t==null?void 0:t.slideIn),$=c.convertJsonToCssKeyframeCss(t==null?void 0:t.slideOut),{boxStyles:j,restProps:B}=c.getBoxStyles(v),i=(S=(d=s==null?void 0:s.snackbar)==null?void 0:d.animation)==null?void 0:S.duration,l=(b=(u=s==null?void 0:s.snackbar)==null?void 0:u.animation)==null?void 0:b.timing,f=`
2
- ${$} ${i} ${l} forwards
3
- `,A=`
4
- ${T} ${i} ${l}
5
- `,y=o.get(s,"snackbar.background.default"),I=o.get(s,"snackbar.default",{}),q={background:m?o.get(s,`snackbar.background.variants.${k}`,y):y},P=[C?{animation:{animation:h?f:A}}:{},I,q,j,x];return r.jsx("div",{css:P,...B,ref:e})}),w=n=>{const{theme:{snackbar:e}={},...t}=n;return r.jsx("div",{css:o.get(e,"closeButton",{}),...t})},D=n=>{const{theme:{snackbar:e}={}}=n,t=o.get(e,"icons.close",{name:"cross"});return r.jsx(g.Icon,{...t})},J=n=>{const{$variant:e,theme:{snackbar:t}={}}=n,s=o.get(t,["icons",e],{name:""});return r.jsx(g.Icon,{...s})},K=n=>{const{theme:{snackbar:e}={},...t}=n;return r.jsx("div",{css:o.get(e,"snackbarBody",{}),...t})},N=n=>{const{theme:{snackbar:e}={},...t}=n;return r.jsx("div",{css:o.get(e,"snackbarContent",{}),...t})},R=n=>r.jsx(p.Typography,{align:a.TextAlign.Start,variant:a.TypographyVariant.Body2,styleVariant:a.TypographyStyleVariant.Semibold,...n}),W=n=>r.jsx(p.Typography,{align:a.TextAlign.Start,variant:a.TypographyVariant.Body2,styleVariant:a.TypographyStyleVariant.Normal,...n}),M=n=>{const{theme:{snackbar:e}={},...t}=n;return r.jsx("div",{css:o.get(e,"actionsContainer",{}),...t})},z=n=>{const{theme:{snackbar:e}={},$position:t,...s}=n;return r.jsx("div",{css:o.get(e,["positions",t],{}),...s})};exports.CloseButtonIconStyled=D;exports.CloseButtonWrapperStyled=w;exports.SnackbarActionsContainerStyled=M;exports.SnackbarBodyStyled=K;exports.SnackbarContainerStyled=z;exports.SnackbarContentStyled=N;exports.SnackbarDescriptionStyled=W;exports.SnackbarIconStyled=J;exports.SnackbarStyled=O;exports.SnackbarTitleStyled=R;
1
+ "use client";
2
+ import { jsx as e } from "@emotion/react/jsx-runtime";
3
+ import { forwardRef as O } from "react";
4
+ import { convertJsonToCssKeyframeCss as S, getBoxStyles as j } from "../../../tokens/utils.js";
5
+ import { Typography as p } from "../Typography/Typography.js";
6
+ import { get as r } from "../../../utils/helpers.js";
7
+ import { Icon as b } from "../Icon/Icon.js";
8
+ import { TypographyStyleVariant as k, TypographyVariant as f, TextAlign as g } from "../../../types/typography.js";
9
+ const G = O((n, o) => {
10
+ var l, m, y, u;
11
+ const {
12
+ theme: {
13
+ animations: t,
14
+ snackbar: s
15
+ } = {},
16
+ $variant: a,
17
+ $colored: $,
18
+ $isClosing: v,
19
+ $isAnimated: h,
20
+ styles: C,
21
+ ...B
22
+ } = n, A = S(t == null ? void 0 : t.slideIn), T = S(t == null ? void 0 : t.slideOut), {
23
+ boxStyles: x,
24
+ restProps: I
25
+ } = j(B), c = (m = (l = s == null ? void 0 : s.snackbar) == null ? void 0 : l.animation) == null ? void 0 : m.duration, i = (u = (y = s == null ? void 0 : s.snackbar) == null ? void 0 : y.animation) == null ? void 0 : u.timing, P = `
26
+ ${T} ${c} ${i} forwards
27
+ `, V = `
28
+ ${A} ${c} ${i}
29
+ `, d = r(s, "snackbar.background.default"), w = r(s, "snackbar.default", {}), N = {
30
+ background: $ ? r(s, `snackbar.background.variants.${a}`, d) : d
31
+ };
32
+ return /* @__PURE__ */ e("div", { css: [h ? {
33
+ animation: {
34
+ animation: v ? P : V
35
+ }
36
+ } : {}, w, N, x, C], ...I, ref: o });
37
+ }), H = (n) => {
38
+ const {
39
+ theme: {
40
+ snackbar: o
41
+ } = {},
42
+ ...t
43
+ } = n;
44
+ return /* @__PURE__ */ e("div", { css: r(o, "closeButton", {}), ...t });
45
+ }, L = (n) => {
46
+ const {
47
+ theme: {
48
+ snackbar: o
49
+ } = {}
50
+ } = n, t = r(o, "icons.close", {
51
+ name: "cross"
52
+ });
53
+ return /* @__PURE__ */ e(b, { ...t });
54
+ }, M = (n) => {
55
+ const {
56
+ $variant: o,
57
+ theme: {
58
+ snackbar: t
59
+ } = {}
60
+ } = n, s = r(t, ["icons", o], {
61
+ name: ""
62
+ });
63
+ return /* @__PURE__ */ e(b, { ...s });
64
+ }, Q = (n) => {
65
+ const {
66
+ theme: {
67
+ snackbar: o
68
+ } = {},
69
+ ...t
70
+ } = n;
71
+ return /* @__PURE__ */ e("div", { css: r(o, "snackbarBody", {}), ...t });
72
+ }, U = (n) => {
73
+ const {
74
+ theme: {
75
+ snackbar: o
76
+ } = {},
77
+ ...t
78
+ } = n;
79
+ return /* @__PURE__ */ e("div", { css: r(o, "snackbarContent", {}), ...t });
80
+ }, X = (n) => /* @__PURE__ */ e(p, { align: g.Start, variant: f.Body2, styleVariant: k.Semibold, ...n }), Y = (n) => /* @__PURE__ */ e(p, { align: g.Start, variant: f.Body2, styleVariant: k.Normal, ...n }), Z = (n) => {
81
+ const {
82
+ theme: {
83
+ snackbar: o
84
+ } = {},
85
+ ...t
86
+ } = n;
87
+ return /* @__PURE__ */ e("div", { css: r(o, "actionsContainer", {}), ...t });
88
+ }, _ = (n) => {
89
+ const {
90
+ theme: {
91
+ snackbar: o
92
+ } = {},
93
+ $position: t,
94
+ ...s
95
+ } = n, a = [r(o, "container.default", {}), r(o, ["positions", t], {})];
96
+ return /* @__PURE__ */ e("div", { css: a, ...s });
97
+ };
98
+ export {
99
+ L as CloseButtonIconStyled,
100
+ H as CloseButtonWrapperStyled,
101
+ Z as SnackbarActionsContainerStyled,
102
+ Q as SnackbarBodyStyled,
103
+ _ as SnackbarContainerStyled,
104
+ U as SnackbarContentStyled,
105
+ Y as SnackbarDescriptionStyled,
106
+ M as SnackbarIconStyled,
107
+ G as SnackbarStyled,
108
+ X as SnackbarTitleStyled
109
+ };
@@ -1 +1,10 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const A=require("../../../types/snackbar.js"),N="Snackbar",T="Snackbar-manager",O=A.SnackbarVariant.Info,n=A.SnackbarPosition.BottomRight,t=3e3,a=300;exports.ANIMATION_DURATION=a;exports.COMPONENT_NAME=N;exports.COMPONENT_SNACKBAR_MANAGER_NAME=T;exports.DEFAULT_DURATION=t;exports.DEFAULT_POSITION=n;exports.DEFAULT_VARIANT=O;
1
+ import { SnackbarPosition as A, SnackbarVariant as n } from "../../../types/snackbar.js";
2
+ const N = "Snackbar", t = "Snackbar-manager", a = n.Info, c = A.BottomRight, T = 3e3, r = 300;
3
+ export {
4
+ r as ANIMATION_DURATION,
5
+ N as COMPONENT_NAME,
6
+ t as COMPONENT_SNACKBAR_MANAGER_NAME,
7
+ T as DEFAULT_DURATION,
8
+ c as DEFAULT_POSITION,
9
+ a as DEFAULT_VARIANT
10
+ };
@@ -1 +1,36 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("@emotion/react/jsx-runtime"),c=require("react"),O=require("../../../hooks/useTheme/useTheme.js"),f=require("../../../types/label.js"),a=require("./constants.js"),l=require("./SwitchStyled.js"),k=c.forwardRef((S,b)=>{const{onValueChange:d,checked:r=!1,disabled:i=!1,label:w=f.LabelPosition.Right,children:E,...n}=S,{theme:t}=O.useTheme(),[h,o]=c.useState(r),u=c.useCallback(e=>{o(e),d==null||d(e)},[d]),M=c.useCallback(e=>{var N;i||u((N=e==null?void 0:e.target)==null?void 0:N.checked)},[i,u]);return c.useEffect(()=>{o(r)},[r]),s.jsxs(l.SwitchWrapperStyled,{theme:t,ref:b,$disabled:i,"data-testid":`${a.COMPONENT_NAME}-wrapper`,...n,children:[s.jsx(l.SwitchLabelStyled,{className:"gd-switch-label",theme:t,$label:w,"data-testid":`${a.COMPONENT_NAME}-label`,children:E}),s.jsxs(l.SwitchStyled,{"data-testid":a.COMPONENT_NAME,theme:t,children:[s.jsx(l.SwitchSliderStyled,{className:"gd-switch-slider",theme:t,$checked:h,"data-testid":`${a.COMPONENT_NAME}-slider`}),s.jsx(l.HiddenCheckboxStyled,{theme:t,checked:h,disabled:i,onChange:M,"data-testid":`${a.COMPONENT_NAME}-checkbox`,...n})]})]})});exports.Switch=k;
1
+ "use client";
2
+ import { jsxs as f, jsx as c } from "@emotion/react/jsx-runtime";
3
+ import { forwardRef as u, useState as $, useCallback as n, useEffect as x } from "react";
4
+ import { COMPONENT_NAME as d } from "./constants.js";
5
+ import { SwitchWrapperStyled as y, SwitchLabelStyled as N, SwitchStyled as g, SwitchSliderStyled as C, HiddenCheckboxStyled as E } from "./SwitchStyled.js";
6
+ import { LabelPosition as j } from "../../../types/label.js";
7
+ import { useTheme as I } from "../../../hooks/useTheme/useTheme.js";
8
+ const A = u((p, S) => {
9
+ const {
10
+ onValueChange: a,
11
+ checked: s = !1,
12
+ disabled: r = !1,
13
+ label: b = j.Right,
14
+ children: w,
15
+ ...i
16
+ } = p, {
17
+ theme: t
18
+ } = I(), [l, o] = $(s), h = n((e) => {
19
+ o(e), a == null || a(e);
20
+ }, [a]), k = n((e) => {
21
+ var m;
22
+ r || h((m = e == null ? void 0 : e.target) == null ? void 0 : m.checked);
23
+ }, [r, h]);
24
+ return x(() => {
25
+ o(s);
26
+ }, [s]), /* @__PURE__ */ f(y, { theme: t, ref: S, $disabled: r, "data-testid": `${d}-wrapper`, ...i, children: [
27
+ /* @__PURE__ */ c(N, { className: "gd-switch-label", theme: t, $label: b, "data-testid": `${d}-label`, children: w }),
28
+ /* @__PURE__ */ f(g, { "data-testid": d, theme: t, children: [
29
+ /* @__PURE__ */ c(C, { className: "gd-switch-slider", theme: t, $checked: l, "data-testid": `${d}-slider` }),
30
+ /* @__PURE__ */ c(E, { theme: t, checked: l, disabled: r, onChange: k, "data-testid": `${d}-checkbox`, ...i })
31
+ ] })
32
+ ] });
33
+ });
34
+ export {
35
+ A as Switch
36
+ };
@@ -1 +1,56 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("@emotion/react/jsx-runtime"),i=require("react"),c=require("../../../utils/helpers.js"),n=s=>{const{theme:{switchToken:e}={},...t}=s,r=c.get(e,"checkbox",{});return l.jsx("input",{type:"checkbox",css:r,...t})},h=i.forwardRef((s,e)=>{const{theme:{switchToken:t}={},styles:r={},$disabled:d,...o}=s;return l.jsx("div",{css:[c.get(t,"wrapper.default",{}),d?c.get(t,"wrapper.disabled",{}):{},r],...o,ref:e})}),S=s=>{const{theme:{switchToken:e}={},$label:t,...r}=s;return l.jsx("div",{css:[c.get(e,"label.default",{}),c.get(e,["label",t],{})],...r})},a=s=>{const{theme:{switchToken:e}={},$checked:t,...r}=s;return l.jsx("div",{css:[c.get(e,"slider.default",{}),t?c.get(e,"slider.checked",{}):{}],...r})},u=s=>{const{theme:{switchToken:e}={},...t}=s;return l.jsx("label",{css:[c.get(e,"default",{})],...t})};exports.HiddenCheckboxStyled=n;exports.SwitchLabelStyled=S;exports.SwitchSliderStyled=a;exports.SwitchStyled=u;exports.SwitchWrapperStyled=h;
1
+ "use client";
2
+ import { jsx as o } from "@emotion/react/jsx-runtime";
3
+ import { forwardRef as n } from "react";
4
+ import { get as r } from "../../../utils/helpers.js";
5
+ const a = (s) => {
6
+ const {
7
+ theme: {
8
+ switchToken: e
9
+ } = {},
10
+ ...t
11
+ } = s, c = r(e, "checkbox", {});
12
+ return /* @__PURE__ */ o("input", { type: "checkbox", css: c, ...t });
13
+ }, m = n((s, e) => {
14
+ const {
15
+ theme: {
16
+ switchToken: t
17
+ } = {},
18
+ styles: c = {},
19
+ $disabled: l,
20
+ ...d
21
+ } = s;
22
+ return /* @__PURE__ */ o("div", { css: [r(t, "wrapper.default", {}), l ? r(t, "wrapper.disabled", {}) : {}, c], ...d, ref: e });
23
+ }), u = (s) => {
24
+ const {
25
+ theme: {
26
+ switchToken: e
27
+ } = {},
28
+ $label: t,
29
+ ...c
30
+ } = s;
31
+ return /* @__PURE__ */ o("div", { css: [r(e, "label.default", {}), r(e, ["label", t], {})], ...c });
32
+ }, w = (s) => {
33
+ const {
34
+ theme: {
35
+ switchToken: e
36
+ } = {},
37
+ $checked: t,
38
+ ...c
39
+ } = s;
40
+ return /* @__PURE__ */ o("div", { css: [r(e, "slider.default", {}), t ? r(e, "slider.checked", {}) : {}], ...c });
41
+ }, S = (s) => {
42
+ const {
43
+ theme: {
44
+ switchToken: e
45
+ } = {},
46
+ ...t
47
+ } = s;
48
+ return /* @__PURE__ */ o("label", { css: [r(e, "default", {})], ...t });
49
+ };
50
+ export {
51
+ a as HiddenCheckboxStyled,
52
+ u as SwitchLabelStyled,
53
+ w as SwitchSliderStyled,
54
+ S as SwitchStyled,
55
+ m as SwitchWrapperStyled
56
+ };
@@ -1 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t="Switch";exports.COMPONENT_NAME=t;
1
+ const t = "Switch";
2
+ export {
3
+ t as COMPONENT_NAME
4
+ };
@@ -1 +1,41 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("@emotion/react/jsx-runtime"),t=require("react"),z=require("../../../hooks/useAutoFocus/useAutoFocus.js"),C=require("../../../hooks/useTheme/useTheme.js"),n=require("./constants.js"),p=require("./hooks/useDynamicHeightAdjustment.js"),M=require("./hooks/useResizeObserver.js"),$=require("./TextareaStyled.js"),r=require("./Textarea.types.js"),u=t.forwardRef((o,c)=>{const{errorText:l,onChange:a,onCustomResize:d,defaultValue:m="",variant:x=r.TextareaVariant.Outlined,color:h=r.TextareaColorVariant.Primary,resize:T=r.TextareaResize.None,ariaDescribedBy:f,maxLength:g,minHeight:y,maxHeight:b,dynamicHeightAdjustment:q=!1,disabled:H=!1,readOnly:O=!1,autoFocus:s=!1,...A}=o,{theme:N}=C.useTheme(),e=t.useRef(null);t.useImperativeHandle(c,()=>e.current),z.useAutoFocus(e,s),M.useResizeObserver(e,d);const R=p.useDynamicHeightAdjustment(e,q),j=i=>{R(i),a&&a(i)};return v.jsx($.TextareaStyled,{theme:N,ref:e,"aria-invalid":l?"true":"false","aria-describedby":f,"aria-multiline":"true",role:"textbox",$variant:x,$color:h,$resize:T,maxLength:g,disabled:H,readOnly:O,autoFocus:s,onChange:j,$minHeight:y,$maxHeight:b,defaultValue:m,"data-testid":n.COMPONENT_NAME,...A})});u.displayName=n.COMPONENT_NAME;exports.Textarea=u;
1
+ "use client";
2
+ import { jsx as z } from "@emotion/react/jsx-runtime";
3
+ import { forwardRef as A, useRef as C, useImperativeHandle as N } from "react";
4
+ import { COMPONENT_NAME as i } from "./constants.js";
5
+ import { TextareaStyled as O } from "./TextareaStyled.js";
6
+ import { TextareaVariant as $, TextareaColorVariant as j, TextareaResize as v } from "./Textarea.types.js";
7
+ import { useAutoFocus as I } from "../../../hooks/useAutoFocus/useAutoFocus.js";
8
+ import { useResizeObserver as V } from "./hooks/useResizeObserver.js";
9
+ import { useDynamicHeightAdjustment as D } from "./hooks/useDynamicHeightAdjustment.js";
10
+ import { useTheme as E } from "../../../hooks/useTheme/useTheme.js";
11
+ const F = A((o, n) => {
12
+ const {
13
+ errorText: s,
14
+ onChange: t,
15
+ onCustomResize: m,
16
+ defaultValue: l = "",
17
+ variant: u = $.Outlined,
18
+ color: d = j.Primary,
19
+ resize: f = v.None,
20
+ ariaDescribedBy: c,
21
+ maxLength: h,
22
+ minHeight: p,
23
+ maxHeight: x,
24
+ dynamicHeightAdjustment: g = !1,
25
+ disabled: y = !1,
26
+ readOnly: H = !1,
27
+ autoFocus: r = !1,
28
+ ...T
29
+ } = o, {
30
+ theme: b
31
+ } = E(), e = C(null);
32
+ N(n, () => e.current), I(e, r), V(e, m);
33
+ const R = D(e, g);
34
+ return /* @__PURE__ */ z(O, { theme: b, ref: e, "aria-invalid": s ? "true" : "false", "aria-describedby": c, "aria-multiline": "true", role: "textbox", $variant: u, $color: d, $resize: f, maxLength: h, disabled: y, readOnly: H, autoFocus: r, onChange: (a) => {
35
+ R(a), t && t(a);
36
+ }, $minHeight: p, $maxHeight: x, defaultValue: l, "data-testid": i, ...T });
37
+ });
38
+ F.displayName = i;
39
+ export {
40
+ F as Textarea
41
+ };
@@ -27,8 +27,6 @@ export interface TextareaProps extends CommonCssComponentProps<HTMLTextAreaEleme
27
27
  color?: EnumOrPrimitive<TextareaColorVariant>;
28
28
  resize?: EnumOrPrimitive<TextareaResize>;
29
29
  name?: string;
30
- label?: string;
31
- helperText?: string;
32
30
  placeholder?: string;
33
31
  ariaDescribedBy?: string;
34
32
  value?: string;
@@ -37,7 +35,6 @@ export interface TextareaProps extends CommonCssComponentProps<HTMLTextAreaEleme
37
35
  readOnly?: boolean;
38
36
  errorText?: string;
39
37
  maxLength?: number;
40
- maxLengthCountShow?: boolean;
41
38
  dynamicHeightAdjustment?: boolean;
42
39
  onCustomResize?: (newSize: {
43
40
  height: number;
@@ -45,6 +42,7 @@ export interface TextareaProps extends CommonCssComponentProps<HTMLTextAreaEleme
45
42
  }) => void;
46
43
  minHeight?: string;
47
44
  maxHeight?: string;
45
+ rows?: string | number;
48
46
  }
49
47
  export interface TextareaStyledProps extends CommonCssComponentStyledProps<HTMLTextAreaElement> {
50
48
  $minHeight?: string;
@@ -1 +1,6 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var r=(n=>(n.None="none",n.Both="both",n.Horizontal="horizontal",n.Vertical="vertical",n))(r||{}),o=(n=>(n.Outlined="outlined",n.Contained="contained",n.Text="text",n))(o||{}),t=(n=>(n.Primary="primary",n.Secondary="secondary",n.Success="success",n.Warning="warning",n.Error="error",n))(t||{});exports.TextareaColorVariant=t;exports.TextareaResize=r;exports.TextareaVariant=o;
1
+ var c = /* @__PURE__ */ ((n) => (n.None = "none", n.Both = "both", n.Horizontal = "horizontal", n.Vertical = "vertical", n))(c || {}), r = /* @__PURE__ */ ((n) => (n.Outlined = "outlined", n.Contained = "contained", n.Text = "text", n))(r || {}), o = /* @__PURE__ */ ((n) => (n.Primary = "primary", n.Secondary = "secondary", n.Success = "success", n.Warning = "warning", n.Error = "error", n))(o || {});
2
+ export {
3
+ o as TextareaColorVariant,
4
+ c as TextareaResize,
5
+ r as TextareaVariant
6
+ };
@@ -1 +1,29 @@
1
- "use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("@emotion/react/jsx-runtime"),g=require("react"),i=require("../../../utils/helpers.js"),e=require("./Textarea.types.js"),y=g.forwardRef((s,n)=>{const{theme:{textarea:t}={},$variant:o=e.TextareaVariant.Outlined,$color:c=e.TextareaColorVariant.Primary,styles:l={},$resize:u=e.TextareaResize.None,$minHeight:r,$maxHeight:a,...x}=s,m=[i.get(t,"default",{}),i.get(t,[o,c],{}),r?{minHeight:r}:{},a?{maxHeight:a}:{},{resize:u},l];return d.jsx("textarea",{css:m,...x,ref:n})});exports.TextareaStyled=y;
1
+ "use client";
2
+ import { jsx as c } from "@emotion/react/jsx-runtime";
3
+ import { forwardRef as p } from "react";
4
+ import { TextareaVariant as d, TextareaColorVariant as g, TextareaResize as h } from "./Textarea.types.js";
5
+ import { get as a } from "../../../utils/helpers.js";
6
+ const T = p((i, o) => {
7
+ const {
8
+ theme: {
9
+ textarea: e
10
+ } = {},
11
+ $variant: m = d.Outlined,
12
+ $color: s = g.Primary,
13
+ styles: n = {},
14
+ $resize: x = h.None,
15
+ $minHeight: t,
16
+ $maxHeight: r,
17
+ ...f
18
+ } = i, l = [a(e, "default", {}), a(e, [m, s], {}), t ? {
19
+ minHeight: t
20
+ } : {}, r ? {
21
+ maxHeight: r
22
+ } : {}, {
23
+ resize: x
24
+ }, n];
25
+ return /* @__PURE__ */ c("textarea", { css: l, ...f, ref: o });
26
+ });
27
+ export {
28
+ T as TextareaStyled
29
+ };
@@ -1 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="Textarea";exports.COMPONENT_NAME=e;
1
+ const e = "Textarea";
2
+ export {
3
+ e as COMPONENT_NAME
4
+ };
@@ -1 +1,8 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react"),s=(t,e)=>c.useCallback(r=>{var u;!e||!t.current||(t.current.style.height="auto",t.current.style.height=`${t.current.scrollHeight||((u=r==null?void 0:r.target)==null?void 0:u.scrollHeight)}px`)},[e,t]);exports.useDynamicHeightAdjustment=s;
1
+ import { useCallback as l } from "react";
2
+ const s = (r, u) => l((t) => {
3
+ var c;
4
+ !u || !r.current || (r.current.style.height = "auto", r.current.style.height = `${r.current.scrollHeight || ((c = t == null ? void 0 : t.target) == null ? void 0 : c.scrollHeight)}px`);
5
+ }, [u, r]);
6
+ export {
7
+ s as useDynamicHeightAdjustment
8
+ };