@okam/stack-ui 1.25.3 → 1.25.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (382) hide show
  1. package/components/Accordion/components/AccordionItem.d.ts +3 -0
  2. package/components/Accordion/components/AriaAccordionItem.d.ts +3 -0
  3. package/components/Accordion/hooks/useAccordionState.d.ts +10 -0
  4. package/components/Accordion/index.d.ts +3 -0
  5. package/{src/components/Accordion/interface.ts → components/Accordion/interface.d.ts} +17 -23
  6. package/components/Alerts/components/AlertsCloseButton.d.ts +4 -0
  7. package/components/Alerts/components/AlertsItem.d.ts +3 -0
  8. package/components/Alerts/components/AlertsNavigationButton.d.ts +8 -0
  9. package/components/Alerts/components/AlertsSwiper.d.ts +3 -0
  10. package/components/Alerts/components/pagination/AlertsPagination.d.ts +3 -0
  11. package/components/Alerts/components/pagination/AlertsPaginationBullet.d.ts +3 -0
  12. package/components/Alerts/index.d.ts +3 -0
  13. package/components/Alerts/interface.d.ts +41 -0
  14. package/components/Box/index.d.ts +5 -0
  15. package/components/Box/interface.d.ts +11 -0
  16. package/components/Button/index.d.ts +6 -0
  17. package/components/Button/interface.d.ts +20 -0
  18. package/components/Calendar/RangeCalendar.d.ts +3 -0
  19. package/components/Calendar/components/CalendarCell.d.ts +3 -0
  20. package/components/Calendar/components/CalendarGrid.d.ts +3 -0
  21. package/components/Calendar/index.d.ts +3 -0
  22. package/components/Calendar/interface.d.ts +32 -0
  23. package/components/Carousel/index.d.ts +3 -0
  24. package/components/Carousel/interface.d.ts +24 -0
  25. package/components/Date/index.d.ts +3 -0
  26. package/components/Date/interface.d.ts +6 -0
  27. package/components/Dialog/index.d.ts +2 -0
  28. package/components/Dialog/interface.d.ts +6 -0
  29. package/components/DirectusImg/index.d.ts +3 -0
  30. package/components/DirectusImg/interface.d.ts +17 -0
  31. package/components/Icon/index.d.ts +3 -0
  32. package/components/Icon/interface.d.ts +7 -0
  33. package/components/Img/index.d.ts +3 -0
  34. package/components/Img/interface.d.ts +6 -0
  35. package/components/Lightbox/index.d.ts +3 -0
  36. package/components/Lightbox/interface.d.ts +25 -0
  37. package/components/Menu/Menu.d.ts +3 -0
  38. package/components/Menu/MenuSidePanel.d.ts +3 -0
  39. package/components/Menu/components/InnerContent.d.ts +3 -0
  40. package/components/Menu/components/MenuItems.d.ts +3 -0
  41. package/components/Menu/components/TabContainer.d.ts +3 -0
  42. package/components/Menu/interface.d.ts +31 -0
  43. package/components/Modal/components/ModalDialog.d.ts +3 -0
  44. package/components/Modal/components/ModalOverlay.d.ts +3 -0
  45. package/components/Modal/index.d.ts +3 -0
  46. package/{src/components/Modal/interface.ts → components/Modal/interface.d.ts} +11 -14
  47. package/components/Popover/index.d.ts +3 -0
  48. package/components/Popover/interface.d.ts +21 -0
  49. package/components/ShareButton/index.d.ts +4 -0
  50. package/components/ShareButton/interface.d.ts +26 -0
  51. package/components/ShareButton/utils/generateUtmTags.d.ts +2 -0
  52. package/components/ShareButton/utils/useFacebookShareUrl.d.ts +2 -0
  53. package/components/ShareButton/utils/useMailToShareUrl.d.ts +2 -0
  54. package/components/ShareButton/utils/useTwitterShareUrl.d.ts +2 -0
  55. package/components/ShareButton/utils/useWindow.d.ts +5 -0
  56. package/components/SidePanel/index.d.ts +4 -0
  57. package/components/SidePanel/interface.d.ts +12 -0
  58. package/components/TabList/components/TabPanel/TabPanel.d.ts +4 -0
  59. package/components/TabList/interface.d.ts +18 -0
  60. package/components/Typography/index.d.ts +5 -0
  61. package/components/Typography/interface.d.ts +10 -0
  62. package/components/WysiwygBlock/index.d.ts +3 -0
  63. package/components/WysiwygBlock/interface.d.ts +5 -0
  64. package/components/fields/Checkbox/Checkbox.interface.d.ts +18 -0
  65. package/components/fields/Checkbox/index.d.ts +3 -0
  66. package/components/fields/CheckboxGroup/components/CheckboxGroupItem/index.d.ts +3 -0
  67. package/components/fields/CheckboxGroup/index.d.ts +3 -0
  68. package/components/fields/CheckboxGroup/interface.d.ts +13 -0
  69. package/components/fields/DatePicker/DateRangePicker.d.ts +3 -0
  70. package/components/fields/DatePicker/components/CalendarPopover.d.ts +2 -0
  71. package/components/fields/DatePicker/components/DateField.d.ts +4 -0
  72. package/components/fields/DatePicker/index.d.ts +3 -0
  73. package/components/fields/DatePicker/interface.d.ts +37 -0
  74. package/components/fields/Radio/Radio.interface.d.ts +26 -0
  75. package/components/fields/Radio/index.d.ts +4 -0
  76. package/components/fields/RadioGroup/index.d.ts +3 -0
  77. package/components/fields/RadioGroup/interface.d.ts +9 -0
  78. package/components/fields/SearchField/index.d.ts +3 -0
  79. package/components/fields/SearchField/interface.d.ts +9 -0
  80. package/components/fields/Select/Select.d.ts +4 -0
  81. package/components/fields/Select/Select.interface.d.ts +26 -0
  82. package/components/fields/Select/components/Listbox.d.ts +4 -0
  83. package/{src/components/fields/Select/components/Listbox.interface.ts → components/fields/Select/components/Listbox.interface.d.ts} +8 -11
  84. package/components/fields/Select/components/Popover.d.ts +3 -0
  85. package/components/fields/Select/components/Popover.interface.d.ts +13 -0
  86. package/components/fields/SelectItem/SelectItem.d.ts +3 -0
  87. package/{src/components/fields/SelectItem/SelectItem.interface.ts → components/fields/SelectItem/SelectItem.interface.d.ts} +3 -4
  88. package/components/fields/TextArea/index.d.ts +4 -0
  89. package/components/fields/TextInputField/index.d.ts +4 -0
  90. package/components/fields/TextInputField/interface.d.ts +24 -0
  91. package/components/icons/ArrowDown.d.ts +3 -0
  92. package/components/icons/ArrowLeft.d.ts +3 -0
  93. package/components/icons/ArrowRight.d.ts +3 -0
  94. package/components/icons/Check.d.ts +3 -0
  95. package/components/icons/ChevronLeft.d.ts +3 -0
  96. package/components/icons/ChevronRight.d.ts +3 -0
  97. package/components/icons/CloseBtn.d.ts +3 -0
  98. package/components/icons/Facebook.d.ts +3 -0
  99. package/components/icons/FacebookColored.d.ts +3 -0
  100. package/components/icons/FacebookRounded.d.ts +3 -0
  101. package/components/icons/Globe.d.ts +3 -0
  102. package/components/icons/IconFallback.d.ts +3 -0
  103. package/components/icons/Instagram.d.ts +3 -0
  104. package/components/icons/InstagramColored.d.ts +3 -0
  105. package/components/icons/Link.d.ts +3 -0
  106. package/components/icons/LinkedIn.d.ts +3 -0
  107. package/components/icons/Mail.d.ts +3 -0
  108. package/components/icons/Plus.d.ts +3 -0
  109. package/components/icons/Search.d.ts +3 -0
  110. package/components/icons/Share.d.ts +3 -0
  111. package/components/icons/Twitter.d.ts +3 -0
  112. package/components/icons/TwitterColored.d.ts +3 -0
  113. package/components/icons/Upload.d.ts +3 -0
  114. package/components/icons/X.d.ts +3 -0
  115. package/components/icons/YouTube.d.ts +3 -0
  116. package/components/icons/YouTubeColored.d.ts +3 -0
  117. package/components/icons/index.d.ts +24 -0
  118. package/{src/index.ts → index.d.ts} +57 -72
  119. package/index.js +110 -0
  120. package/index.mjs +12755 -0
  121. package/package.json +1 -1
  122. package/providers/Accordion/index.d.ts +4 -0
  123. package/providers/Accordion/interface.d.ts +12 -0
  124. package/providers/Alerts/index.d.ts +4 -0
  125. package/providers/Alerts/interface.d.ts +9 -0
  126. package/providers/CheckboxGroup/index.d.ts +5 -0
  127. package/{src/providers/CheckboxGroup/interface.ts → providers/CheckboxGroup/interface.d.ts} +4 -5
  128. package/providers/Client/index.d.ts +4 -0
  129. package/providers/Client/interface.d.ts +10 -0
  130. package/providers/Menu/index.d.ts +4 -0
  131. package/providers/Menu/interface.d.ts +28 -0
  132. package/providers/RadioGroup/RadioGroup.d.ts +5 -0
  133. package/providers/RadioGroup/RadioGroup.interface.d.ts +7 -0
  134. package/providers/SidePanel/index.d.ts +4 -0
  135. package/providers/SidePanel/interface.d.ts +23 -0
  136. package/providers/Theme/hooks.d.ts +3 -0
  137. package/providers/Theme/index.d.ts +10 -0
  138. package/providers/Theme/interface.d.ts +24 -0
  139. package/providers/Theme/utils.d.ts +2 -0
  140. package/providers/UserSearchQuery/index.d.ts +4 -0
  141. package/providers/UserSearchQuery/interface.d.ts +10 -0
  142. package/style.css +1 -0
  143. package/theme/Accordion/index.d.ts +274 -0
  144. package/theme/Alerts/index.d.ts +1167 -0
  145. package/theme/Box/index.d.ts +214 -0
  146. package/theme/Button/index.d.ts +121 -0
  147. package/theme/Calendar/index.d.ts +366 -0
  148. package/theme/Carousel/index.d.ts +9 -0
  149. package/theme/Checkbox/index.d.ts +159 -0
  150. package/theme/CheckboxGroup/index.d.ts +30 -0
  151. package/theme/DatePicker/index.d.ts +43 -0
  152. package/theme/Image/index.d.ts +3 -0
  153. package/theme/LightBox/index.d.ts +455 -0
  154. package/theme/Radio/index.d.ts +108 -0
  155. package/theme/RadioGroup/index.d.ts +30 -0
  156. package/theme/Search/index.d.ts +30 -0
  157. package/theme/ShareButton/index.d.ts +174 -0
  158. package/theme/SidePanel/index.d.ts +3 -0
  159. package/theme/TextArea/index.d.ts +29 -0
  160. package/theme/Typography/index.d.ts +233 -0
  161. package/theme/index.d.ts +5 -0
  162. package/transitions/AccordionTransition.d.ts +4 -0
  163. package/transitions/ModalTransition.d.ts +7 -0
  164. package/transitions/RenderWithOpacity.d.ts +4 -0
  165. package/transitions/RenderWithSlide.d.ts +7 -0
  166. package/transitions/SidePanelTransition.d.ts +7 -0
  167. package/types/components.d.ts +28 -0
  168. package/.eslintrc.js +0 -32
  169. package/.storybook/.eslintrc.js +0 -29
  170. package/.storybook/main.ts +0 -33
  171. package/.storybook/preview.js +0 -56
  172. package/.storybook/tsconfig.json +0 -17
  173. package/CHANGELOG.md +0 -574
  174. package/README.md +0 -8
  175. package/postcss.config.js +0 -15
  176. package/project.json +0 -77
  177. package/src/_stories/icons/code-brackets.svg +0 -1
  178. package/src/_stories/icons/colors.svg +0 -1
  179. package/src/_stories/icons/comments.svg +0 -1
  180. package/src/_stories/icons/direction.svg +0 -1
  181. package/src/_stories/icons/flow.svg +0 -1
  182. package/src/_stories/icons/plugin.svg +0 -1
  183. package/src/_stories/icons/repo.svg +0 -1
  184. package/src/_stories/icons/stackalt.svg +0 -1
  185. package/src/components/Accordion/accordion.stories.mdx +0 -240
  186. package/src/components/Accordion/components/AccordionItem.tsx +0 -53
  187. package/src/components/Accordion/components/AriaAccordionItem.tsx +0 -76
  188. package/src/components/Accordion/hooks/useAccordionState.ts +0 -46
  189. package/src/components/Accordion/index.tsx +0 -38
  190. package/src/components/Alerts/alerts.stories.mdx +0 -282
  191. package/src/components/Alerts/components/AlertsCloseButton.tsx +0 -20
  192. package/src/components/Alerts/components/AlertsItem.tsx +0 -39
  193. package/src/components/Alerts/components/AlertsNavigationButton.tsx +0 -71
  194. package/src/components/Alerts/components/AlertsSwiper.tsx +0 -125
  195. package/src/components/Alerts/components/pagination/AlertsPagination.tsx +0 -32
  196. package/src/components/Alerts/components/pagination/AlertsPaginationBullet.tsx +0 -61
  197. package/src/components/Alerts/index.tsx +0 -54
  198. package/src/components/Alerts/interface.ts +0 -51
  199. package/src/components/Box/box.stories.mdx +0 -27
  200. package/src/components/Box/index.tsx +0 -36
  201. package/src/components/Box/interface.ts +0 -10
  202. package/src/components/Button/button.stories.mdx +0 -99
  203. package/src/components/Button/index.tsx +0 -92
  204. package/src/components/Button/interface.ts +0 -22
  205. package/src/components/Calendar/RangeCalendar.tsx +0 -61
  206. package/src/components/Calendar/calendar.stories.mdx +0 -28
  207. package/src/components/Calendar/components/CalendarCell.tsx +0 -60
  208. package/src/components/Calendar/components/CalendarGrid.tsx +0 -44
  209. package/src/components/Calendar/index.tsx +0 -63
  210. package/src/components/Calendar/interface.ts +0 -37
  211. package/src/components/Carousel/carousel.stories.mdx +0 -182
  212. package/src/components/Carousel/index.tsx +0 -99
  213. package/src/components/Carousel/interface.ts +0 -26
  214. package/src/components/Date/date.stories.mdx +0 -122
  215. package/src/components/Date/index.tsx +0 -35
  216. package/src/components/Date/interface.ts +0 -7
  217. package/src/components/Dialog/index.tsx +0 -14
  218. package/src/components/Dialog/interface.ts +0 -6
  219. package/src/components/DirectusImg/index.tsx +0 -59
  220. package/src/components/DirectusImg/interface.ts +0 -19
  221. package/src/components/Icon/index.tsx +0 -40
  222. package/src/components/Icon/interface.ts +0 -8
  223. package/src/components/Img/img.stories.mdx +0 -28
  224. package/src/components/Img/index.tsx +0 -30
  225. package/src/components/Img/interface.ts +0 -9
  226. package/src/components/Lightbox/hooks/overlay/index.tsx +0 -36
  227. package/src/components/Lightbox/index.tsx +0 -82
  228. package/src/components/Lightbox/interface.ts +0 -28
  229. package/src/components/Lightbox/lightbox.stories.mdx +0 -79
  230. package/src/components/Menu/Menu.tsx +0 -43
  231. package/src/components/Menu/MenuSidePanel.tsx +0 -41
  232. package/src/components/Menu/components/InnerContent.tsx +0 -26
  233. package/src/components/Menu/components/MenuItems.tsx +0 -133
  234. package/src/components/Menu/components/TabContainer.tsx +0 -13
  235. package/src/components/Menu/interface.ts +0 -41
  236. package/src/components/Menu/menu.stories.mdx +0 -23
  237. package/src/components/Modal/components/ModalDialog.tsx +0 -31
  238. package/src/components/Modal/components/ModalOverlay.tsx +0 -21
  239. package/src/components/Modal/index.tsx +0 -32
  240. package/src/components/Popover/index.tsx +0 -138
  241. package/src/components/Popover/interface.ts +0 -25
  242. package/src/components/Popover/popover.stories.mdx +0 -66
  243. package/src/components/ShareButton/index.tsx +0 -172
  244. package/src/components/ShareButton/interface.ts +0 -29
  245. package/src/components/ShareButton/share-button.stories.mdx +0 -48
  246. package/src/components/ShareButton/utils/generateUtmTags.ts +0 -4
  247. package/src/components/ShareButton/utils/useFacebookShareUrl.ts +0 -15
  248. package/src/components/ShareButton/utils/useMailToShareUrl.ts +0 -15
  249. package/src/components/ShareButton/utils/useTwitterShareUrl.ts +0 -15
  250. package/src/components/ShareButton/utils/useWindow.ts +0 -17
  251. package/src/components/SidePanel/index.tsx +0 -43
  252. package/src/components/SidePanel/interface.ts +0 -16
  253. package/src/components/SidePanel/side-panel.stories.mdx +0 -44
  254. package/src/components/TabList/components/Tab/Tab.tsx +0 -19
  255. package/src/components/TabList/components/TabPanel/TabPanel.tsx +0 -27
  256. package/src/components/TabList/index.tsx +0 -44
  257. package/src/components/TabList/interface.ts +0 -23
  258. package/src/components/Typography/index.tsx +0 -35
  259. package/src/components/Typography/interface.ts +0 -9
  260. package/src/components/Typography/typo.stories.mdx +0 -157
  261. package/src/components/WysiwygBlock/index.tsx +0 -20
  262. package/src/components/WysiwygBlock/interface.ts +0 -7
  263. package/src/components/WysiwygBlock/wysiwyg.stories.mdx +0 -53
  264. package/src/components/fields/Checkbox/Checkbox.interface.ts +0 -21
  265. package/src/components/fields/Checkbox/Checkbox.stories.mdx +0 -127
  266. package/src/components/fields/Checkbox/index.tsx +0 -62
  267. package/src/components/fields/CheckboxGroup/checkbox-group.stories.mdx +0 -59
  268. package/src/components/fields/CheckboxGroup/components/CheckboxGroupItem/index.tsx +0 -66
  269. package/src/components/fields/CheckboxGroup/index.tsx +0 -49
  270. package/src/components/fields/CheckboxGroup/interface.ts +0 -17
  271. package/src/components/fields/DatePicker/DateRangePicker.tsx +0 -73
  272. package/src/components/fields/DatePicker/components/CalendarPopover.tsx +0 -31
  273. package/src/components/fields/DatePicker/components/DateField.tsx +0 -61
  274. package/src/components/fields/DatePicker/date-picker.stories.mdx +0 -55
  275. package/src/components/fields/DatePicker/index.tsx +0 -71
  276. package/src/components/fields/DatePicker/interface.ts +0 -69
  277. package/src/components/fields/Radio/Radio.interface.ts +0 -30
  278. package/src/components/fields/Radio/index.tsx +0 -63
  279. package/src/components/fields/RadioGroup/index.tsx +0 -33
  280. package/src/components/fields/RadioGroup/interface.ts +0 -10
  281. package/src/components/fields/RadioGroup/radio-group.stories.mdx +0 -56
  282. package/src/components/fields/SearchField/index.tsx +0 -59
  283. package/src/components/fields/SearchField/interface.ts +0 -10
  284. package/src/components/fields/SearchField/search.stories.mdx +0 -91
  285. package/src/components/fields/Select/Select.interface.ts +0 -24
  286. package/src/components/fields/Select/Select.stories.mdx +0 -53
  287. package/src/components/fields/Select/Select.tsx +0 -108
  288. package/src/components/fields/Select/components/Listbox.tsx +0 -40
  289. package/src/components/fields/Select/components/Popover.interface.ts +0 -14
  290. package/src/components/fields/Select/components/Popover.tsx +0 -32
  291. package/src/components/fields/SelectItem/SelectItem.tsx +0 -10
  292. package/src/components/fields/TextArea/index.tsx +0 -105
  293. package/src/components/fields/TextArea/textArea.stories.mdx +0 -60
  294. package/src/components/fields/TextInputField/index.tsx +0 -107
  295. package/src/components/fields/TextInputField/interface.ts +0 -30
  296. package/src/components/fields/TextInputField/text-input-field.stories.mdx +0 -64
  297. package/src/components/icons/ArrowDown.tsx +0 -11
  298. package/src/components/icons/ArrowLeft.tsx +0 -18
  299. package/src/components/icons/ArrowRight.tsx +0 -18
  300. package/src/components/icons/Check.tsx +0 -11
  301. package/src/components/icons/ChevronLeft.tsx +0 -11
  302. package/src/components/icons/ChevronRight.tsx +0 -11
  303. package/src/components/icons/CloseBtn.tsx +0 -11
  304. package/src/components/icons/Facebook.tsx +0 -14
  305. package/src/components/icons/FacebookColored.tsx +0 -16
  306. package/src/components/icons/FacebookRounded.tsx +0 -16
  307. package/src/components/icons/Globe.tsx +0 -38
  308. package/src/components/icons/IconFallback.tsx +0 -8
  309. package/src/components/icons/Instagram.tsx +0 -14
  310. package/src/components/icons/InstagramColored.tsx +0 -59
  311. package/src/components/icons/Link.tsx +0 -14
  312. package/src/components/icons/LinkedIn.tsx +0 -16
  313. package/src/components/icons/Mail.tsx +0 -16
  314. package/src/components/icons/Plus.tsx +0 -18
  315. package/src/components/icons/Search.tsx +0 -19
  316. package/src/components/icons/Share.tsx +0 -16
  317. package/src/components/icons/Twitter.tsx +0 -16
  318. package/src/components/icons/TwitterColored.tsx +0 -16
  319. package/src/components/icons/Upload.tsx +0 -14
  320. package/src/components/icons/X.tsx +0 -14
  321. package/src/components/icons/YouTube.tsx +0 -16
  322. package/src/components/icons/YouTubeColored.tsx +0 -17
  323. package/src/components/icons/index.ts +0 -24
  324. package/src/examples/PageLayout/index.tsx +0 -61
  325. package/src/examples/PageLayout/layout.stories.mdx +0 -35
  326. package/src/message.tsx +0 -8
  327. package/src/providers/Accordion/index.tsx +0 -15
  328. package/src/providers/Accordion/interface.ts +0 -14
  329. package/src/providers/Alerts/index.tsx +0 -15
  330. package/src/providers/Alerts/interface.ts +0 -11
  331. package/src/providers/CheckboxGroup/index.tsx +0 -22
  332. package/src/providers/Client/index.tsx +0 -21
  333. package/src/providers/Client/interface.ts +0 -13
  334. package/src/providers/Menu/index.tsx +0 -43
  335. package/src/providers/Menu/interface.ts +0 -32
  336. package/src/providers/RadioGroup/RadioGroup.interface.ts +0 -8
  337. package/src/providers/RadioGroup/RadioGroup.tsx +0 -25
  338. package/src/providers/SidePanel/index.tsx +0 -55
  339. package/src/providers/SidePanel/interface.ts +0 -26
  340. package/src/providers/Theme/hooks.ts +0 -25
  341. package/src/providers/Theme/index.tsx +0 -40
  342. package/src/providers/Theme/interface.ts +0 -28
  343. package/src/providers/Theme/utils.ts +0 -3
  344. package/src/providers/UserSearchQuery/index.tsx +0 -20
  345. package/src/providers/UserSearchQuery/interface.ts +0 -12
  346. package/src/storybook/Lightbox/LightboxControlledState.tsx +0 -28
  347. package/src/storybook/Menu/Menu.tsx +0 -177
  348. package/src/storybook/Menu/NestedMenu.tsx +0 -24
  349. package/src/storybook/Menu/mock.tsx +0 -84
  350. package/src/storybook/SelectField/index.tsx +0 -57
  351. package/src/storybook/ShareButtonExample/index.tsx +0 -66
  352. package/src/tailwind.css +0 -3
  353. package/src/theme/Accordion/index.tsx +0 -101
  354. package/src/theme/Alerts/index.ts +0 -97
  355. package/src/theme/Box/index.ts +0 -45
  356. package/src/theme/Button/index.tsx +0 -72
  357. package/src/theme/Calendar/index.tsx +0 -167
  358. package/src/theme/Carousel/index.ts +0 -36
  359. package/src/theme/Checkbox/index.ts +0 -49
  360. package/src/theme/CheckboxGroup/index.ts +0 -14
  361. package/src/theme/DatePicker/index.tsx +0 -42
  362. package/src/theme/Image/index.ts +0 -8
  363. package/src/theme/LightBox/index.ts +0 -56
  364. package/src/theme/Radio/index.ts +0 -31
  365. package/src/theme/RadioGroup/index.ts +0 -14
  366. package/src/theme/Search/index.ts +0 -20
  367. package/src/theme/ShareButton/index.tsx +0 -76
  368. package/src/theme/SidePanel/index.ts +0 -9
  369. package/src/theme/TextArea/index.ts +0 -25
  370. package/src/theme/Typography/index.tsx +0 -44
  371. package/src/theme/index.tsx +0 -178
  372. package/src/transitions/AccordionTransition.tsx +0 -26
  373. package/src/transitions/ModalTransition.tsx +0 -38
  374. package/src/transitions/RenderWithOpacity.tsx +0 -25
  375. package/src/transitions/RenderWithSlide.tsx +0 -21
  376. package/src/transitions/SidePanelTransition.tsx +0 -30
  377. package/src/types/components.ts +0 -34
  378. package/static/images/image.png +0 -0
  379. package/tailwind.config.js +0 -14
  380. package/tsconfig.json +0 -20
  381. package/tsconfig.lib.json +0 -25
  382. package/vite.config.ts +0 -58
@@ -1,282 +0,0 @@
1
- import { Canvas, Meta, Story } from '@storybook/addon-docs'
2
- import { ArgTypes } from '@storybook/blocks'
3
- import Alerts from '.'
4
- import Box from '../Box'
5
- import Typography from '../Typography'
6
-
7
- <Meta
8
- title="Base components/Alerts"
9
- parameters={{
10
- layout: 'fullscreen',
11
- controls: {
12
- include: ['alerts']
13
- }
14
- }}
15
- component={Alerts}
16
- args={{
17
- a11y: {
18
- nextSlideMessage: 'Next alert',
19
- prevSlideMessage: 'Previous alert',
20
- paginationBulletMessage: 'Navigate to slide number {{index}}'
21
- },
22
- closeButtonAriaLabel: 'Close alerts',
23
- onOpenChange: (isOpen) => console.log(`Alerts component was ${isOpen ? 'opened' : 'closed'}`),
24
- onNavigationPrev: () => console.log('Navigated to previous slide'),
25
- onNavigationNext: () => console.log('Navigated to next slide'),
26
- }}
27
- argTypes={{
28
- closeButton: {
29
- table: {
30
- defaultValue: {
31
- summary: 'AlertsCloseButton'
32
- }
33
- }
34
- },
35
- a11y: {
36
- description: "React Swiper's accessibility module parameters"
37
- },
38
- children: {
39
- description: 'Function looping through every alert and passing the current alert. Can be used for rendering all alerts wrapping `AlertsItem` in another component',
40
- table: {
41
- type: {
42
- summary: '(alert: TAlertsItem) => React.ReactNode'
43
- },
44
- defaultValue: {
45
- summary: '(alert: TAlertsItem) => <AlertsItem {...alert />}'
46
- }
47
- }
48
- },
49
- prevButton: {
50
- description: 'Custom previous button component for the carousel. Falls back to an arrow button',
51
- table: {
52
- defaultValue: {
53
- summary: 'AlertsNavigationButton'
54
- }
55
- }
56
- },
57
- nextButton: {
58
- description: 'Custom previous button component for the carousel. Falls back to an arrow button',
59
- table: {
60
- defaultValue: {
61
- summary: 'AlertsNavigationButton'
62
- }
63
- }
64
- },
65
- setOpen: {
66
- description: 'For controlled states'
67
- },
68
- onOpenChange: {
69
- table: {
70
- type: {
71
- summary: '(isOpen) => void'
72
- }
73
- },
74
- description: 'Triggered when the alerts are closed or opened'
75
- },
76
- modules: {
77
- table: {
78
- defaultValue: {
79
- summary: "['A11y', 'Keyboard']"
80
- },
81
- type: {
82
- summary: 'Array<A11y | Autoplay | Controller | EffectCoverflow | EffectCube | EffectFade | EffectFlip | EffectCreative | EffectCards | HashNavigation | History | Keyboard | Lazy | Mousewheel | Navigation | Pagination | Parallax | Scrollbar | Thumbs | Virtual | Zoom | FreeMode | Grid | Manipulation>'
83
- }
84
- },
85
- description: 'String list of modules the swiper will automatically import'
86
- }
87
- }}
88
- />
89
-
90
- export const Template = (args) => (
91
- <Alerts {...args} />
92
- )
93
-
94
- # Alerts
95
-
96
- ### A closable and navigable carousel showcasing multiple alerts
97
-
98
- ## Props
99
-
100
- <ArgTypes include={[
101
- 'alerts',
102
- 'onOpenChange',
103
- 'a11y',
104
- 'closeButtonAriaLabel',
105
- 'setOpen',
106
- 'nextButton',
107
- 'prevButton',
108
- 'closeButton',
109
- 'transitionComponent',
110
- 'themeName',
111
- 'tokens',
112
- 'customTheme',
113
- 'as',
114
- 'onSwiper',
115
- 'onNavigationPrev',
116
- 'onNavigationNext',
117
- 'children',
118
- 'modules',
119
- ]} />
120
-
121
- ## Showcase
122
-
123
- ### Single alert
124
-
125
- <Canvas>
126
- <Story
127
- name="Single alert"
128
- args={{
129
- alerts: [{
130
- id: '1',
131
- title: 'Alert 1 title',
132
- 'aria-label': 'Alert 1 aria',
133
- icon: 'X',
134
- content: (
135
- <>
136
- <Box>
137
- <Typography tokens={{ size: 'h4' }}>This is alert 1 large content</Typography>
138
- </Box>
139
- <Box>
140
- <Typography tokens={{ size: 'xs' }}>This is alert 1 small content</Typography>
141
- </Box>
142
- </>
143
- )
144
- }]
145
- }}
146
- >
147
- {Template.bind({})}
148
- </Story>
149
- </Canvas>
150
-
151
- ### Navigation
152
-
153
- <Canvas>
154
- <Story
155
- name="Navigation"
156
- args={{
157
- modules: ['Navigation'],
158
- alerts: [
159
- {
160
- id: '1',
161
- title: 'Alert 1 title',
162
- 'aria-label': 'Alert 1 aria',
163
- icon: 'X',
164
- content: (
165
- <>
166
- <Box>
167
- <Typography tokens={{ size: 'h4' }}>This is alert 1 large content</Typography>
168
- </Box>
169
- <Box>
170
- <Typography tokens={{ size: 'xs' }}>This is alert 1 small content</Typography>
171
- </Box>
172
- </>
173
- )
174
- },
175
- {
176
- button: {
177
- href: '#',
178
- as: 'a',
179
- children: 'Consulter toutes les alertes'
180
- },
181
- id: '2',
182
- title: 'Alert 2 title',
183
- 'aria-label': 'Alert 2 aria',
184
- icon: 'YouTube',
185
- },
186
- {
187
- id: '3',
188
- title: 'Alert 3 title',
189
- 'aria-label': 'Alert 3 aria',
190
- icon: 'Mail',
191
- },
192
- ]
193
- }}
194
- >
195
- {Template.bind({})}
196
- </Story>
197
- </Canvas>
198
-
199
- ### Pagination
200
-
201
- <Canvas>
202
- <Story
203
- name="Pagination"
204
- args={{
205
- modules: ['Pagination'],
206
- alerts: [
207
- {
208
- id: '1',
209
- 'aria-label': 'Alert 1 aria',
210
- icon: 'X',
211
- content: (
212
- <>
213
- <Box>
214
- <Typography tokens={{ size: 'h4' }}>This is alert 1 large content</Typography>
215
- </Box>
216
- <Box>
217
- <Typography tokens={{ size: 'xs' }}>This is alert 1 small content</Typography>
218
- </Box>
219
- </>
220
- )
221
- },
222
- {
223
- id: '2',
224
- title: 'Alert 2 title',
225
- 'aria-label': 'Alert 2 aria',
226
- icon: 'YouTube',
227
- },
228
- {
229
- id: '3',
230
- title: 'Alert 3 title',
231
- 'aria-label': 'Alert 3 aria',
232
- icon: 'Mail',
233
- },
234
- ]
235
- }}
236
- >
237
- {Template.bind({})}
238
- </Story>
239
- </Canvas>
240
-
241
- ### Pagination & Navigation
242
-
243
- <Canvas>
244
- <Story
245
- name="Pagination & Navigation"
246
- args={{
247
- modules: ['Pagination', 'Navigation'],
248
- alerts: [
249
- {
250
- id: '1',
251
- title: 'Alert 1 title',
252
- 'aria-label': 'Alert 1 aria',
253
- icon: 'X',
254
- content: (
255
- <>
256
- <Box>
257
- <Typography tokens={{ size: 'h4' }}>This is alert 1 large content</Typography>
258
- </Box>
259
- <Box>
260
- <Typography tokens={{ size: 'xs' }}>This is alert 1 small content</Typography>
261
- </Box>
262
- </>
263
- )
264
- },
265
- {
266
- id: '2',
267
- title: 'Alert 2 title',
268
- 'aria-label': 'Alert 2 aria',
269
- icon: 'YouTube',
270
- },
271
- {
272
- id: '3',
273
- title: 'Alert 3 title',
274
- 'aria-label': 'Alert 3 aria',
275
- icon: 'Mail',
276
- },
277
- ]
278
- }}
279
- >
280
- {Template.bind({})}
281
- </Story>
282
- </Canvas>
@@ -1,20 +0,0 @@
1
- import type { Ref } from 'react'
2
- import { forwardRef } from 'react'
3
- import { ButtonWithForwardRef } from '../../Button'
4
- import type { TButtonProps } from '../../Button/interface'
5
- import Icon from '../../Icon'
6
- import CloseBtn from '../../icons/CloseBtn'
7
-
8
- const AlertsCloseButton = forwardRef((props: TButtonProps, ref: Ref<HTMLButtonElement & HTMLAnchorElement>) => {
9
- const { themeName = 'alerts.closeBtn', ...rest } = props
10
-
11
- return (
12
- <ButtonWithForwardRef ref={ref} themeName={themeName} {...rest}>
13
- <Icon icon={<CloseBtn />} />
14
- </ButtonWithForwardRef>
15
- )
16
- })
17
-
18
- AlertsCloseButton.displayName = 'AlertsCloseButton'
19
-
20
- export default AlertsCloseButton
@@ -1,39 +0,0 @@
1
- 'use client'
2
-
3
- import React from 'react'
4
- import { useSwiperSlide } from 'swiper/react'
5
- import Box from '../../Box'
6
- import Button from '../../Button'
7
- import Icon from '../../Icon'
8
- import type { TAlertsItemProps } from '../interface'
9
-
10
- const AlertsItem = (props: TAlertsItemProps) => {
11
- const { title, button, content, themeName = 'alerts.item', tokens, icon, id } = props
12
- const { isActive } = useSwiperSlide()
13
-
14
- if (!title && !button && !content && !icon) return null
15
-
16
- return (
17
- <>
18
- {icon && <Icon icon={icon} themeName={`${themeName}.icon`} tokens={tokens} />}
19
- {(title || button || content) && (
20
- <Box themeName={`${themeName}.container`} tokens={tokens}>
21
- {title && (
22
- <Box as="span" themeName={`${themeName}.title`} tokens={tokens} {...{ id }}>
23
- {title}
24
- </Box>
25
- )}
26
- {button && (
27
- <Button tabIndex={isActive ? 0 : -1} themeName={`${themeName}.button`} tokens={tokens} {...button} />
28
- )}
29
- {content &&
30
- (React.isValidElement(content)
31
- ? React.cloneElement(content, { ...content.props, themeName: `${themeName}.content`, tokens })
32
- : content)}
33
- </Box>
34
- )}
35
- </>
36
- )
37
- }
38
-
39
- export default AlertsItem
@@ -1,71 +0,0 @@
1
- import type { Ref } from 'react'
2
- import { forwardRef } from 'react'
3
- import { FocusRing, usePress } from 'react-aria'
4
- import { useAlertsController } from '../../../providers/Alerts'
5
- import { ButtonWithForwardRef } from '../../Button'
6
- import type { TButtonProps } from '../../Button/interface'
7
- import Icon from '../../Icon'
8
-
9
- type TAlertsNavigationButtonProps = TButtonProps & {
10
- onSubmit?: () => void
11
- }
12
-
13
- const AlertsNavigationButton = forwardRef(
14
- (props: TAlertsNavigationButtonProps, ref: Ref<HTMLButtonElement & HTMLAnchorElement>) => {
15
- const { themeName = 'alerts.navigationBtn', tokens, customTheme, children, onSubmit, ...rest } = props
16
- const { isDisabled } = rest
17
-
18
- const { pressProps } = usePress({
19
- onPress: () => onSubmit?.(),
20
- })
21
-
22
- return (
23
- <FocusRing within focusRingClass="has-focus-ring">
24
- <ButtonWithForwardRef
25
- themeName={themeName}
26
- tokens={tokens}
27
- ref={ref}
28
- {...pressProps}
29
- {...rest}
30
- {...{ 'aria-disabled': isDisabled }}
31
- >
32
- {children}
33
- </ButtonWithForwardRef>
34
- </FocusRing>
35
- )
36
- },
37
- )
38
-
39
- export const AlertsNextNavigationButton = forwardRef(
40
- (props: TButtonProps, ref: Ref<HTMLButtonElement & HTMLAnchorElement>) => {
41
- const { controller } = useAlertsController()
42
-
43
- const disabled = controller?.activeIndex === (controller?.slides?.length ?? 1) - 1
44
-
45
- return (
46
- <AlertsNavigationButton onSubmit={() => controller?.slideNext()} {...props} ref={ref} isDisabled={disabled}>
47
- <Icon icon="ArrowRight" />
48
- </AlertsNavigationButton>
49
- )
50
- },
51
- )
52
-
53
- export const AlertsPrevNavigationButton = forwardRef(
54
- (props: TButtonProps, ref: Ref<HTMLButtonElement & HTMLAnchorElement>) => {
55
- const { controller } = useAlertsController()
56
-
57
- const disabled = controller?.activeIndex === 0
58
-
59
- return (
60
- <AlertsNavigationButton onSubmit={() => controller?.slidePrev()} {...props} ref={ref} isDisabled={disabled}>
61
- <Icon icon="ArrowLeft" />
62
- </AlertsNavigationButton>
63
- )
64
- },
65
- )
66
-
67
- AlertsNavigationButton.displayName = 'AlertsNavigationButton'
68
- AlertsNextNavigationButton.displayName = 'AlertsNextNavigationButton'
69
- AlertsPrevNavigationButton.displayName = 'AlertsPrevNavigationButton'
70
-
71
- export default AlertsNavigationButton
@@ -1,125 +0,0 @@
1
- import { useRef, useState } from 'react'
2
- import slugify from 'slugify'
3
- import * as swiperModules from 'swiper/modules'
4
- import type { SwiperClass } from 'swiper/react'
5
- import { Swiper, SwiperSlide } from 'swiper/react'
6
- import { AlertsControllerContextProvider } from '../../../providers/Alerts'
7
- import useThemeContext from '../../../providers/Theme/hooks'
8
- import type { TAlertsComponentProps, TAlertsProps } from '../interface'
9
- import AlertsItem from './AlertsItem'
10
- import 'swiper/css'
11
- import 'swiper/css/pagination'
12
- import { AlertsNextNavigationButton, AlertsPrevNavigationButton } from './AlertsNavigationButton'
13
- import AlertsPagination from './pagination/AlertsPagination'
14
-
15
- const AlertsSwiper = (props: TAlertsProps) => {
16
- const {
17
- themeName,
18
- tokens,
19
- customTheme,
20
- children = (itemProps) => <AlertsItem {...itemProps} />,
21
- alerts,
22
- a11y,
23
- slidesPerView = 1,
24
- spaceBetween = 50,
25
- modules,
26
- prevButton: PrevButton = AlertsPrevNavigationButton,
27
- nextButton: NextButton = AlertsNextNavigationButton,
28
- ...rest
29
- } = props
30
- const prevButtonRef = useRef(null)
31
- const nextButtonRef = useRef(null)
32
-
33
- const {
34
- itemRoleDescriptionMessage = 'slide',
35
- slideRole = 'group',
36
- containerRoleDescriptionMessage = 'carousel',
37
- paginationGroupLabel = 'pagination',
38
- } = a11y ?? {}
39
-
40
- const itemWrapperTheme = useThemeContext(`${themeName}.item.wrapper`, tokens, customTheme)
41
- const swiperTheme = useThemeContext(`${themeName}.swiper.swiper`, tokens, customTheme)
42
- const swiperWrapperTheme = useThemeContext(`${themeName}.swiper.wrapper`, tokens, customTheme)
43
-
44
- const defaultModules: TAlertsComponentProps['modules'] = ['A11y']
45
-
46
- const importedModules = [...(modules?.filter((module) => module !== 'Pagination') ?? []), ...defaultModules].map(
47
- (module) => swiperModules[module],
48
- )
49
-
50
- const hasNavigation = modules?.includes('Navigation')
51
- const hasPagination = modules?.includes('Pagination')
52
-
53
- const [controller, setController] = useState<SwiperClass>()
54
- const [activeIndex, setActiveIndex] = useState<number>(0)
55
-
56
- return (
57
- <AlertsControllerContextProvider controller={controller}>
58
- {hasNavigation && (
59
- <PrevButton
60
- themeName={`${themeName}.navigation.button`}
61
- tokens={{ ...tokens, order: 'prev' }}
62
- ref={prevButtonRef}
63
- aria-label={a11y?.prevSlideMessage}
64
- />
65
- )}
66
- {hasNavigation && (
67
- <NextButton
68
- themeName={`${themeName}.navigation.button`}
69
- tokens={{ ...tokens, order: 'next' }}
70
- ref={nextButtonRef}
71
- aria-label={a11y?.nextSlideMessage}
72
- />
73
- )}
74
- {hasPagination && (
75
- <AlertsPagination
76
- themeName={`${themeName}.pagination`}
77
- tokens={tokens}
78
- activeIndex={activeIndex}
79
- alerts={alerts}
80
- paginationGroupLabel={paginationGroupLabel}
81
- />
82
- )}
83
- <Swiper
84
- tabIndex={0}
85
- {...rest}
86
- onSwiper={(c) => {
87
- setController(c)
88
- setActiveIndex(c.activeIndex)
89
- }}
90
- onSlideChange={(c) => setActiveIndex(c.activeIndex)}
91
- role="group"
92
- aria-roledescription={containerRoleDescriptionMessage ?? undefined}
93
- slidesPerView={slidesPerView}
94
- spaceBetween={spaceBetween}
95
- className={swiperTheme}
96
- wrapperClass={swiperWrapperTheme}
97
- modules={importedModules}
98
- keyboard={{
99
- enabled: true,
100
- onlyInViewport: false,
101
- }}
102
- a11y={a11y}
103
- >
104
- {alerts.map((alert) => {
105
- const { id, title, ariaLabel } = alert
106
-
107
- return (
108
- <SwiperSlide
109
- key={id}
110
- className={itemWrapperTheme}
111
- {...(title ? { 'aria-labelledby': id } : { 'aria-label': ariaLabel })}
112
- {...{ id: slugify(`${id}-${title}`) }}
113
- role={slideRole}
114
- aria-roledescription={itemRoleDescriptionMessage ?? undefined}
115
- >
116
- {children({ ...alert, themeName: `${themeName}.item`, tokens })}
117
- </SwiperSlide>
118
- )
119
- })}
120
- </Swiper>
121
- </AlertsControllerContextProvider>
122
- )
123
- }
124
-
125
- export default AlertsSwiper
@@ -1,32 +0,0 @@
1
- import { FocusScope } from 'react-aria'
2
- import Box from '../../../Box'
3
- import type { TAlertsPaginationProps } from '../../interface'
4
- import AlertsPaginationBullet from './AlertsPaginationBullet'
5
-
6
- const AlertsPagination = (props: TAlertsPaginationProps) => {
7
- const { themeName, tokens, alerts, activeIndex, paginationGroupLabel } = props
8
-
9
- return (
10
- <Box
11
- as="div"
12
- themeName={`${themeName}.wrapper`}
13
- tokens={tokens}
14
- {...{ role: 'group', 'aria-label': paginationGroupLabel }}
15
- >
16
- <FocusScope>
17
- {alerts.map((_, index) => (
18
- <AlertsPaginationBullet
19
- key={JSON.stringify(_)}
20
- index={index}
21
- activeIndex={activeIndex}
22
- alerts={alerts}
23
- themeName={themeName}
24
- tokens={tokens}
25
- />
26
- ))}
27
- </FocusScope>
28
- </Box>
29
- )
30
- }
31
-
32
- export default AlertsPagination
@@ -1,61 +0,0 @@
1
- import { useAlertsController } from 'libs/stack/stack-ui/src/providers/Alerts'
2
- import { useFocusManager, useKeyboard, usePress } from 'react-aria'
3
- import slugify from 'slugify'
4
- import Button from '../../../Button'
5
- import type { TAlertsPaginationBulletProps } from '../../interface'
6
-
7
- const AlertsPaginationBullet = (props: TAlertsPaginationBulletProps) => {
8
- const { themeName, tokens, alerts, activeIndex, index } = props
9
-
10
- const { controller } = useAlertsController()
11
-
12
- const focusManager = useFocusManager()
13
- const prevIndex = index === 0 ? alerts.length - 1 : index - 1
14
- const nextIndex = index === alerts.length - 1 ? 0 : index + 1
15
-
16
- const { keyboardProps } = useKeyboard({
17
- onKeyUp: (e) => {
18
- if (e.key === 'ArrowLeft') {
19
- e.preventDefault()
20
- focusManager?.focusPrevious({ wrap: true })
21
- controller?.slideTo(prevIndex)
22
- }
23
-
24
- if (e.key === 'ArrowRight') {
25
- e.preventDefault()
26
- focusManager?.focusNext({ wrap: true })
27
- controller?.slideTo(nextIndex)
28
- }
29
- },
30
- })
31
-
32
- const { pressProps } = usePress({
33
- onPress: () => controller?.slideTo(index),
34
- })
35
-
36
- const alert = alerts[index]
37
- const isActive = index === activeIndex
38
- const { title, id } = alert
39
-
40
- const hasTitle = title && title.length > 0
41
-
42
- return (
43
- <Button
44
- as="button"
45
- {...{
46
- tabIndex: 0,
47
- role: 'button',
48
- 'aria-current': isActive ? 'true' : 'false',
49
- 'aria-disabled': isActive,
50
- 'aria-label': !hasTitle ? `${index + 1} / ${alerts.length}` : undefined,
51
- 'aria-labelledby': hasTitle ? slugify(`${id}-${title}`) : undefined,
52
- }}
53
- {...keyboardProps}
54
- {...pressProps}
55
- themeName={`${themeName}.bullet`}
56
- tokens={{ ...tokens, active: isActive }}
57
- />
58
- )
59
- }
60
-
61
- export default AlertsPaginationBullet
@@ -1,54 +0,0 @@
1
- 'use client'
2
-
3
- import { useRef } from 'react'
4
- import { useOverlayTriggerState } from 'react-stately'
5
- import RenderWithOpacity from '../../transitions/RenderWithOpacity'
6
- import Box from '../Box'
7
- import useOverlayHook from '../Lightbox/hooks/overlay'
8
- import AlertsCloseButton from './components/AlertsCloseButton'
9
- import AlertsSwiper from './components/AlertsSwiper'
10
- import type { TAlertsProps } from './interface'
11
-
12
- const Alerts = (props: TAlertsProps) => {
13
- const {
14
- themeName = 'alerts',
15
- tokens,
16
- customTheme,
17
- defaultOpen = true,
18
- closeButton: CloseButton = AlertsCloseButton,
19
- transitionComponent: TransitionComponent = RenderWithOpacity,
20
- closeButtonAriaLabel,
21
- isOpen,
22
- onOpenChange,
23
- setOpen,
24
- ...rest
25
- } = props
26
-
27
- const triggerRef = useRef(null)
28
-
29
- const state = useOverlayTriggerState({ ...props, defaultOpen })
30
-
31
- const { triggerProps, overlayProps } = useOverlayHook({ ...props, type: 'dialog' }, state, triggerRef)
32
-
33
- return (
34
- <TransitionComponent
35
- {...overlayProps}
36
- role="alert"
37
- themeName={`${themeName}.wrapper`}
38
- tokens={tokens}
39
- isVisible={state.isOpen}
40
- >
41
- <CloseButton
42
- ref={triggerRef}
43
- themeName={`${themeName}.closeBtn`}
44
- aria-label={closeButtonAriaLabel}
45
- {...triggerProps}
46
- />
47
- <Box themeName={`${themeName}.container`} tokens={tokens}>
48
- <AlertsSwiper themeName={themeName} tokens={tokens} {...rest} />
49
- </Box>
50
- </TransitionComponent>
51
- )
52
- }
53
-
54
- export default Alerts