@orangesk/orange-design-system 2.0.0-alpha.1 → 2.0.0-alpha.3

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 (1159) hide show
  1. package/build/components/Accordion/index.js +3 -1157
  2. package/build/components/Accordion/index.js.map +1 -1
  3. package/build/components/Accordion/style.css +1 -1
  4. package/build/components/Accordion/style.css.map +1 -1
  5. package/build/components/Alert/index.js +3 -1907
  6. package/build/components/Alert/index.js.map +1 -1
  7. package/build/components/Alert/style.css +1 -1
  8. package/build/components/Alert/style.css.map +1 -1
  9. package/build/components/AnchorNavigation/index.js +16 -0
  10. package/build/components/AnchorNavigation/index.js.map +1 -0
  11. package/build/components/AnchorNavigation/style.css +2 -0
  12. package/build/components/AnchorNavigation/style.css.map +1 -0
  13. package/build/components/Bar/index.js +16 -0
  14. package/build/components/Bar/index.js.map +1 -0
  15. package/build/components/Bar/style.css +2 -0
  16. package/build/components/Bar/style.css.map +1 -0
  17. package/build/components/BlockAction/index.js +16 -0
  18. package/build/components/BlockAction/index.js.map +1 -0
  19. package/build/components/BlockAction/style.css +2 -0
  20. package/build/components/BlockAction/style.css.map +1 -0
  21. package/build/components/BodyBanner/index.js +16 -0
  22. package/build/components/BodyBanner/index.js.map +1 -0
  23. package/build/components/BodyBanner/style.css +2 -0
  24. package/build/components/BodyBanner/style.css.map +1 -0
  25. package/build/components/Breadcrumbs/index.js +3 -674
  26. package/build/components/Breadcrumbs/index.js.map +1 -1
  27. package/build/components/Breadcrumbs/style.css +1 -1
  28. package/build/components/Breadcrumbs/style.css.map +1 -1
  29. package/build/components/Button/index.js +3 -721
  30. package/build/components/Button/index.js.map +1 -1
  31. package/build/components/Button/style.css +1 -1
  32. package/build/components/Button/style.css.map +1 -1
  33. package/build/components/Buttons/index.js +3 -601
  34. package/build/components/Buttons/index.js.map +1 -1
  35. package/build/components/Buttons/style.css +1 -1
  36. package/build/components/Buttons/style.css.map +1 -1
  37. package/build/components/Card/index.js +16 -0
  38. package/build/components/Card/index.js.map +1 -0
  39. package/build/components/Card/style.css +2 -0
  40. package/build/components/Card/style.css.map +1 -0
  41. package/build/components/Carousel/index.js +16 -0
  42. package/build/components/Carousel/index.js.map +1 -0
  43. package/build/components/Carousel/style.css +2 -0
  44. package/build/components/Carousel/style.css.map +1 -0
  45. package/build/components/CarouselPromotions/index.js +16 -0
  46. package/build/components/CarouselPromotions/index.js.map +1 -0
  47. package/build/components/CarouselPromotions/style.css +2 -0
  48. package/build/components/CarouselPromotions/style.css.map +1 -0
  49. package/build/components/CartTable/index.js +16 -0
  50. package/build/components/CartTable/index.js.map +1 -0
  51. package/build/components/CartTable/style.css +2 -0
  52. package/build/components/CartTable/style.css.map +1 -0
  53. package/build/components/Code/index.js +11 -0
  54. package/build/components/Code/index.js.map +1 -0
  55. package/build/components/Code/style.css +2 -0
  56. package/build/components/Code/style.css.map +1 -0
  57. package/build/components/Container/index.js +3 -598
  58. package/build/components/Container/index.js.map +1 -1
  59. package/build/components/Container/style.css +1 -1
  60. package/build/components/Container/style.css.map +1 -1
  61. package/build/components/Controls/index.js +16 -0
  62. package/build/components/Controls/index.js.map +1 -0
  63. package/build/components/Controls/style.css +2 -0
  64. package/build/components/Controls/style.css.map +1 -0
  65. package/build/components/Cover/index.js +16 -0
  66. package/build/components/Cover/index.js.map +1 -0
  67. package/build/components/Cover/style.css +2 -0
  68. package/build/components/Cover/style.css.map +1 -0
  69. package/build/components/Divider/index.js +16 -0
  70. package/build/components/Divider/index.js.map +1 -0
  71. package/build/components/Divider/style.css +2 -0
  72. package/build/components/Divider/style.css.map +1 -0
  73. package/build/components/DocumentationSidebar/index.js +16 -0
  74. package/build/components/DocumentationSidebar/index.js.map +1 -0
  75. package/build/components/DocumentationSidebar/style.css +2 -0
  76. package/build/components/DocumentationSidebar/style.css.map +1 -0
  77. package/build/components/Dropdown/index.js +16 -0
  78. package/build/components/Dropdown/index.js.map +1 -0
  79. package/build/components/Dropdown/style.css +2 -0
  80. package/build/components/Dropdown/style.css.map +1 -0
  81. package/build/components/Expander/index.js +16 -0
  82. package/build/components/Expander/index.js.map +1 -0
  83. package/build/components/Expander/style.css +2 -0
  84. package/build/components/Expander/style.css.map +1 -0
  85. package/build/components/FeatureAccordion/index.js +16 -0
  86. package/build/components/FeatureAccordion/index.js.map +1 -0
  87. package/build/components/FeatureAccordion/style.css +2 -0
  88. package/build/components/FeatureAccordion/style.css.map +1 -0
  89. package/build/components/Footer/index.js +16 -0
  90. package/build/components/Footer/index.js.map +1 -0
  91. package/build/components/Footer/style.css +2 -0
  92. package/build/components/Footer/style.css.map +1 -0
  93. package/build/components/Forms/index.js +18 -0
  94. package/build/components/Forms/index.js.map +1 -0
  95. package/build/components/Forms/style.css +2 -0
  96. package/build/components/Forms/style.css.map +1 -0
  97. package/build/components/Gauge/index.js +16 -0
  98. package/build/components/Gauge/index.js.map +1 -0
  99. package/build/components/Gauge/style.css +2 -0
  100. package/build/components/Gauge/style.css.map +1 -0
  101. package/build/components/Grid/index.js +3 -1069
  102. package/build/components/Grid/index.js.map +1 -1
  103. package/build/components/Grid/style.css +1 -1
  104. package/build/components/Grid/style.css.map +1 -1
  105. package/build/components/Hero/index.js +16 -0
  106. package/build/components/Hero/index.js.map +1 -0
  107. package/build/components/Hero/style.css +2 -0
  108. package/build/components/Hero/style.css.map +1 -0
  109. package/build/components/Icon/index.js +2 -619
  110. package/build/components/Icon/index.js.map +1 -1
  111. package/build/components/Icon/style.css +1 -1
  112. package/build/components/Icon/style.css.map +1 -1
  113. package/build/components/IconList/index.js +16 -0
  114. package/build/components/IconList/index.js.map +1 -0
  115. package/build/components/IconList/style.css +2 -0
  116. package/build/components/IconList/style.css.map +1 -0
  117. package/build/components/Image/index.js +3 -646
  118. package/build/components/Image/index.js.map +1 -1
  119. package/build/components/Image/style.css +1 -1
  120. package/build/components/Image/style.css.map +1 -1
  121. package/build/components/Link/index.js +2 -168
  122. package/build/components/Link/index.js.map +1 -1
  123. package/build/components/Link/style.css +1 -1
  124. package/build/components/Link/style.css.map +1 -1
  125. package/build/components/List/index.js +16 -0
  126. package/build/components/List/index.js.map +1 -0
  127. package/build/components/List/style.css +2 -0
  128. package/build/components/List/style.css.map +1 -0
  129. package/build/components/Loader/index.js +16 -0
  130. package/build/components/Loader/index.js.map +1 -0
  131. package/build/components/Loader/style.css +2 -0
  132. package/build/components/Loader/style.css.map +1 -0
  133. package/build/components/Modal/index.js +4 -3154
  134. package/build/components/Modal/index.js.map +1 -1
  135. package/build/components/Modal/style.css +1 -1
  136. package/build/components/Modal/style.css.map +1 -1
  137. package/build/components/Pagination/index.js +16 -0
  138. package/build/components/Pagination/index.js.map +1 -0
  139. package/build/components/Pagination/style.css +2 -0
  140. package/build/components/Pagination/style.css.map +1 -0
  141. package/build/components/Preview/index.js +83 -0
  142. package/build/components/Preview/index.js.map +1 -0
  143. package/build/components/Preview/style.css +2 -0
  144. package/build/components/Preview/style.css.map +1 -0
  145. package/build/components/Progress/index.js +16 -0
  146. package/build/components/Progress/index.js.map +1 -0
  147. package/build/components/Progress/style.css +2 -0
  148. package/build/components/Progress/style.css.map +1 -0
  149. package/build/components/PromoBanner/index.js +16 -0
  150. package/build/components/PromoBanner/index.js.map +1 -0
  151. package/build/components/PromoBanner/style.css +2 -0
  152. package/build/components/PromoBanner/style.css.map +1 -0
  153. package/build/components/PromotionCard/index.js +16 -0
  154. package/build/components/PromotionCard/index.js.map +1 -0
  155. package/build/components/PromotionCard/style.css +2 -0
  156. package/build/components/PromotionCard/style.css.map +1 -0
  157. package/build/components/Section/index.js +3 -619
  158. package/build/components/Section/index.js.map +1 -1
  159. package/build/components/Section/style.css +1 -1
  160. package/build/components/Section/style.css.map +1 -1
  161. package/build/components/Skeleton/index.js +16 -0
  162. package/build/components/Skeleton/index.js.map +1 -0
  163. package/build/components/Skeleton/style.css +2 -0
  164. package/build/components/Skeleton/style.css.map +1 -0
  165. package/build/components/SkipLink/index.js +16 -0
  166. package/build/components/SkipLink/index.js.map +1 -0
  167. package/build/components/SkipLink/style.css +2 -0
  168. package/build/components/SkipLink/style.css.map +1 -0
  169. package/build/components/Stepbar/index.js +16 -0
  170. package/build/components/Stepbar/index.js.map +1 -0
  171. package/build/components/Stepbar/style.css +2 -0
  172. package/build/components/Stepbar/style.css.map +1 -0
  173. package/build/components/Sticker/index.js +16 -0
  174. package/build/components/Sticker/index.js.map +1 -0
  175. package/build/components/Sticker/style.css +2 -0
  176. package/build/components/Sticker/style.css.map +1 -0
  177. package/build/components/Table/index.js +16 -0
  178. package/build/components/Table/index.js.map +1 -0
  179. package/build/components/Table/style.css +2 -0
  180. package/build/components/Table/style.css.map +1 -0
  181. package/build/components/Tabs/index.js +3 -1043
  182. package/build/components/Tabs/index.js.map +1 -1
  183. package/build/components/Tabs/style.css +1 -1
  184. package/build/components/Tabs/style.css.map +1 -1
  185. package/build/components/Tag/index.js +16 -0
  186. package/build/components/Tag/index.js.map +1 -0
  187. package/build/components/Tag/style.css +2 -0
  188. package/build/components/Tag/style.css.map +1 -0
  189. package/build/components/Testimonial/index.js +16 -0
  190. package/build/components/Testimonial/index.js.map +1 -0
  191. package/build/components/Testimonial/style.css +2 -0
  192. package/build/components/Testimonial/style.css.map +1 -0
  193. package/build/components/Tile/index.js +16 -0
  194. package/build/components/Tile/index.js.map +1 -0
  195. package/build/components/Tile/style.css +2 -0
  196. package/build/components/Tile/style.css.map +1 -0
  197. package/build/components/Tooltip/index.js +16 -0
  198. package/build/components/Tooltip/index.js.map +1 -0
  199. package/build/components/Tooltip/style.css +2 -0
  200. package/build/components/Tooltip/style.css.map +1 -0
  201. package/build/components/index.css +2 -1
  202. package/build/components/index.css.map +1 -1
  203. package/build/components/index.js +6 -3662
  204. package/build/components/index.js.map +1 -1
  205. package/build/components/static.css +2 -0
  206. package/build/components/static.css.map +1 -0
  207. package/build/components/static.js +4 -2440
  208. package/build/components/static.js.map +1 -1
  209. package/build/components/types/mdx-components.d.ts +2 -0
  210. package/build/components/types/next.config.d.ts +3 -0
  211. package/build/components/types/src/app/ODSLib.d.ts +1 -0
  212. package/build/components/types/src/app/components/accordion/AccordionClientWrapper.d.ts +1 -0
  213. package/build/components/types/src/app/components/alert/AlertClientWrapper.d.ts +1 -0
  214. package/build/components/types/src/app/components/anchor-navigation/AnchorNavigationClientWrapper.d.ts +2 -0
  215. package/build/components/types/src/app/components/body-banner/BodyBannerClientWrapper.d.ts +1 -0
  216. package/build/components/types/src/app/components/code/CodeClientWrapper.d.ts +1 -0
  217. package/build/components/types/src/app/components/cover/CoverClientWrapper.d.ts +1 -0
  218. package/build/components/types/src/app/components/expander/ExpanderClientWrapper.d.ts +1 -0
  219. package/build/components/types/src/app/components/feature-accordion/FeatureAccordionClientWrapper.d.ts +1 -0
  220. package/build/components/types/src/app/components/forms/autocomplete/AutocompleteClientWrapper.d.ts +1 -0
  221. package/build/components/types/src/app/components/forms/datepicker/DatePickerClientWrapper.d.ts +1 -0
  222. package/build/components/types/src/app/components/forms/radio/RadioClientWrapper.d.ts +1 -0
  223. package/build/components/types/src/app/components/gauge/GaugeClientWrapper.d.ts +1 -0
  224. package/build/components/types/src/app/components/hero/HeroClientWrapper.d.ts +1 -0
  225. package/build/components/types/src/app/components/icon-list/IconListClientWrapper.d.ts +1 -0
  226. package/build/components/types/src/app/components/list/ListClientWrapper.d.ts +1 -0
  227. package/build/components/types/src/app/components/pagination/PaginationClientWrapper.d.ts +1 -0
  228. package/build/components/types/src/app/components/progress/ProgressClientWrapper.d.ts +1 -0
  229. package/build/components/types/src/app/components/promo-banner/PromoBannerClientWrapper.d.ts +1 -0
  230. package/build/components/types/src/app/components/promotion-card/PromotionCardWrapper.d.ts +1 -0
  231. package/build/components/types/src/app/components/sticker/StickerClientWrapper.d.ts +1 -0
  232. package/build/components/types/src/app/components/tag/TagClientWrapper.d.ts +1 -0
  233. package/build/components/types/src/app/components/testimonial/TestimonialClientWrapper.d.ts +1 -0
  234. package/build/components/types/src/app/layout.d.ts +4 -0
  235. package/build/components/types/src/app/menuItems.d.ts +24 -0
  236. package/build/components/types/src/components/Accordion/Accordion.d.ts +17 -0
  237. package/build/components/types/src/components/Accordion/Accordion.static.d.ts +17 -0
  238. package/build/components/types/src/components/Accordion/AccordionHeader.d.ts +15 -0
  239. package/build/components/types/src/components/Accordion/AccordionItem.d.ts +19 -0
  240. package/build/components/types/src/components/Accordion/HeadingContext.d.ts +2 -0
  241. package/build/components/types/src/components/Accordion/index.d.ts +3 -0
  242. package/build/components/types/src/components/Accordion/tests/data.d.ts +5 -0
  243. package/build/components/types/{components → src/components}/Alert/Alert.d.ts +2 -2
  244. package/build/components/types/src/components/AnchorNavigation/AnchorNavigation.d.ts +17 -0
  245. package/build/components/types/src/components/AnchorNavigation/AnchorNavigation.static.d.ts +24 -0
  246. package/build/components/types/src/components/AnchorNavigation/index.d.ts +2 -0
  247. package/build/components/types/src/components/Bar/Bar.d.ts +22 -0
  248. package/build/components/types/src/components/Bar/BarBreak.d.ts +12 -0
  249. package/build/components/types/src/components/Bar/BarItem.d.ts +16 -0
  250. package/build/components/types/src/components/Bar/index.d.ts +4 -0
  251. package/build/components/types/src/components/BlockAction/BlockAction.d.ts +9 -0
  252. package/build/components/types/src/components/BlockAction/BlockAction.static.d.ts +19 -0
  253. package/build/components/types/src/components/BlockAction/BlockActionControl.d.ts +9 -0
  254. package/build/components/types/src/components/BlockAction/BlockActionIndicator.d.ts +9 -0
  255. package/build/components/types/src/components/BlockAction/CloneElementWithClassName.d.ts +8 -0
  256. package/build/components/types/src/components/BlockAction/Context.d.ts +13 -0
  257. package/build/components/types/src/components/BlockAction/index.d.ts +16 -0
  258. package/build/components/types/src/components/BodyBanner/BodyBanner.d.ts +20 -0
  259. package/build/components/types/src/components/BodyBanner/index.d.ts +2 -0
  260. package/build/components/types/src/components/Breadcrumbs/BreadcrumbItem.d.ts +15 -0
  261. package/build/components/types/src/components/Breadcrumbs/Breadcrumbs.d.ts +20 -0
  262. package/build/components/types/src/components/Breadcrumbs/index.d.ts +2 -0
  263. package/build/components/types/{components → src/components}/Button/Button.d.ts +1 -1
  264. package/build/components/types/src/components/Card/Card.d.ts +13 -0
  265. package/build/components/types/src/components/Card/CardProductHeader.d.ts +9 -0
  266. package/build/components/types/src/components/Card/CardSection.d.ts +14 -0
  267. package/build/components/types/src/components/Card/index.d.ts +4 -0
  268. package/build/components/types/src/components/Card/tests/data.d.ts +5 -0
  269. package/build/components/types/src/components/Carousel/Carousel.d.ts +12 -0
  270. package/build/components/types/src/components/Carousel/Carousel.static.d.ts +33 -0
  271. package/build/components/types/src/components/Carousel/CarouselItem.d.ts +7 -0
  272. package/build/components/types/src/components/Carousel/constants.d.ts +22 -0
  273. package/build/components/types/src/components/Carousel/index.d.ts +3 -0
  274. package/build/components/types/src/components/CarouselPromotions/CarouselPromotions.d.ts +10 -0
  275. package/build/components/types/src/components/CarouselPromotions/CarouselPromotions.static.d.ts +31 -0
  276. package/build/components/types/src/components/CarouselPromotions/CarouselPromotionsItem.d.ts +12 -0
  277. package/build/components/types/src/components/CarouselPromotions/constants.d.ts +20 -0
  278. package/build/components/types/src/components/CarouselPromotions/index.d.ts +3 -0
  279. package/build/components/types/src/components/CartTable/CartTable.d.ts +13 -0
  280. package/build/components/types/src/components/CartTable/FooterNameColumn.d.ts +7 -0
  281. package/build/components/types/src/components/CartTable/FooterPriceColumn.d.ts +9 -0
  282. package/build/components/types/src/components/CartTable/Price.d.ts +10 -0
  283. package/build/components/types/src/components/CartTable/data.d.ts +33 -0
  284. package/build/components/types/src/components/CartTable/generateFooter.d.ts +22 -0
  285. package/build/components/types/src/components/CartTable/generateRow.d.ts +21 -0
  286. package/build/components/types/src/components/CartTable/generateTotal.d.ts +45 -0
  287. package/build/components/types/src/components/CartTable/index.d.ts +2 -0
  288. package/build/components/types/src/components/Code/Code.d.ts +16 -0
  289. package/build/components/types/src/components/Code/index.d.ts +6 -0
  290. package/build/components/types/src/components/Code/oneDarkProTheme.d.ts +13 -0
  291. package/build/components/types/src/components/Container/Container.d.ts +3 -0
  292. package/build/components/types/src/components/Container/index.d.ts +2 -0
  293. package/build/components/types/src/components/Controls/Controls.d.ts +16 -0
  294. package/build/components/types/src/components/Controls/index.d.ts +2 -0
  295. package/build/components/types/src/components/Cover/Cover.d.ts +42 -0
  296. package/build/components/types/src/components/Cover/index.d.ts +3 -0
  297. package/build/components/types/src/components/Divider/Divider.d.ts +13 -0
  298. package/build/components/types/src/components/Divider/index.d.ts +2 -0
  299. package/build/components/types/src/components/DocumentationSidebar/DocumentationSidebar.d.ts +16 -0
  300. package/build/components/types/src/components/DocumentationSidebar/index.d.ts +3 -0
  301. package/build/components/types/src/components/Dropdown/Dropdown.d.ts +20 -0
  302. package/build/components/types/src/components/Dropdown/Dropdown.static.d.ts +28 -0
  303. package/build/components/types/src/components/Dropdown/DropdownDivider.d.ts +3 -0
  304. package/build/components/types/src/components/Dropdown/DropdownItem.d.ts +9 -0
  305. package/build/components/types/src/components/Dropdown/DropdownToggleButton.d.ts +7 -0
  306. package/build/components/types/src/components/Dropdown/index.d.ts +5 -0
  307. package/build/components/types/src/components/Expander/Expander.d.ts +22 -0
  308. package/build/components/types/src/components/Expander/Expander.static.d.ts +13 -0
  309. package/build/components/types/src/components/Expander/index.d.ts +2 -0
  310. package/build/components/types/src/components/FeatureAccordion/FeatureAccordion.d.ts +11 -0
  311. package/build/components/types/src/components/FeatureAccordion/FeatureAccordion.static.d.ts +23 -0
  312. package/build/components/types/src/components/FeatureAccordion/FeatureAccordionItem.d.ts +11 -0
  313. package/build/components/types/src/components/FeatureAccordion/index.d.ts +2 -0
  314. package/build/components/types/src/components/Footer/Footer.d.ts +12 -0
  315. package/build/components/types/src/components/Footer/data.d.ts +15 -0
  316. package/build/components/types/src/components/Footer/index.d.ts +1 -0
  317. package/build/components/types/src/components/Forms/Autocomplete/Autocomplete.d.ts +17 -0
  318. package/build/components/types/src/components/Forms/Autocomplete/Autocomplete.static.d.ts +21 -0
  319. package/build/components/types/src/components/Forms/Autocomplete/index.d.ts +2 -0
  320. package/build/components/types/src/components/Forms/Checkbox/Checkbox.d.ts +21 -0
  321. package/build/components/types/src/components/Forms/Checkbox/index.d.ts +2 -0
  322. package/build/components/types/src/components/Forms/DatePicker/DatePicker.d.ts +84 -0
  323. package/build/components/types/src/components/Forms/DatePicker/DatePicker.static.d.ts +69 -0
  324. package/build/components/types/src/components/Forms/DatePicker/index.d.ts +2 -0
  325. package/build/components/types/src/components/Forms/Field/Control.d.ts +6 -0
  326. package/build/components/types/src/components/Forms/Field/Description.d.ts +7 -0
  327. package/build/components/types/src/components/Forms/Field/Field.d.ts +17 -0
  328. package/build/components/types/src/components/Forms/Field/FieldContext.d.ts +18 -0
  329. package/build/components/types/src/components/Forms/Field/Label.d.ts +11 -0
  330. package/build/components/types/src/components/Forms/Field/Messages.d.ts +12 -0
  331. package/build/components/types/src/components/Forms/Field/Tooltip.d.ts +11 -0
  332. package/build/components/types/src/components/Forms/Field/index.d.ts +2 -0
  333. package/build/components/types/src/components/Forms/Field/utils.d.ts +16 -0
  334. package/build/components/types/src/components/Forms/Fieldset/Fieldset.d.ts +16 -0
  335. package/build/components/types/src/components/Forms/Fieldset/FieldsetContext.d.ts +7 -0
  336. package/build/components/types/src/components/Forms/Fieldset/docsData.d.ts +59 -0
  337. package/build/components/types/src/components/Forms/Fieldset/index.d.ts +2 -0
  338. package/build/components/types/src/components/Forms/File/File.d.ts +17 -0
  339. package/build/components/types/src/components/Forms/File/File.static.d.ts +27 -0
  340. package/build/components/types/src/components/Forms/File/index.d.ts +2 -0
  341. package/build/components/types/src/components/Forms/Group/Group.d.ts +14 -0
  342. package/build/components/types/src/components/Forms/Group/Item.d.ts +8 -0
  343. package/build/components/types/src/components/Forms/Group/index.d.ts +2 -0
  344. package/build/components/types/src/components/Forms/Hint/Hint.d.ts +7 -0
  345. package/build/components/types/src/components/Forms/Hint/index.d.ts +2 -0
  346. package/build/components/types/src/components/Forms/InputStepper/InputStepper.d.ts +20 -0
  347. package/build/components/types/src/components/Forms/InputStepper/InputStepper.static.d.ts +24 -0
  348. package/build/components/types/src/components/Forms/InputStepper/index.d.ts +2 -0
  349. package/build/components/types/src/components/Forms/Label/Label.d.ts +8 -0
  350. package/build/components/types/src/components/Forms/Label/index.d.ts +2 -0
  351. package/build/components/types/src/components/Forms/Message/Message.d.ts +12 -0
  352. package/build/components/types/src/components/Forms/Message/index.d.ts +2 -0
  353. package/build/components/types/src/components/Forms/Radio/Radio.d.ts +21 -0
  354. package/build/components/types/src/components/Forms/Radio/index.d.ts +2 -0
  355. package/build/components/types/src/components/Forms/RangeSlider/RangeSlider.d.ts +38 -0
  356. package/build/components/types/src/components/Forms/RangeSlider/RangeSlider.static.d.ts +24 -0
  357. package/build/components/types/src/components/Forms/RangeSlider/data.d.ts +49 -0
  358. package/build/components/types/src/components/Forms/RangeSlider/index.d.ts +2 -0
  359. package/build/components/types/src/components/Forms/Select/Select.d.ts +33 -0
  360. package/build/components/types/src/components/Forms/Select/index.d.ts +4 -0
  361. package/build/components/types/src/components/Forms/TextArea/TextArea.d.ts +29 -0
  362. package/build/components/types/src/components/Forms/TextArea/index.d.ts +2 -0
  363. package/build/components/types/src/components/Forms/TextInput/TextInput.d.ts +32 -0
  364. package/build/components/types/src/components/Forms/TextInput/index.d.ts +2 -0
  365. package/build/components/types/src/components/Forms/index.d.ts +16 -0
  366. package/build/components/types/src/components/Gauge/Gauge.d.ts +11 -0
  367. package/build/components/types/src/components/Gauge/GaugeMaker.d.ts +3 -0
  368. package/build/components/types/src/components/Gauge/index.d.ts +2 -0
  369. package/build/components/types/src/components/Grid/Grid.d.ts +14 -0
  370. package/build/components/types/src/components/Grid/GridCol.d.ts +12 -0
  371. package/build/components/types/src/components/Grid/index.d.ts +3 -0
  372. package/build/components/types/src/components/Hero/Hero.d.ts +52 -0
  373. package/build/components/types/src/components/Hero/HeroPlayground.d.ts +2 -0
  374. package/build/components/types/src/components/Hero/index.d.ts +2 -0
  375. package/build/components/types/{components → src/components}/Icon/Icon.d.ts +2 -2
  376. package/build/components/types/src/components/Icon/iconSearchTags.d.ts +419 -0
  377. package/build/components/types/src/components/IconList/IconList.d.ts +13 -0
  378. package/build/components/types/src/components/IconList/Item.d.ts +9 -0
  379. package/build/components/types/src/components/IconList/index.d.ts +3 -0
  380. package/build/components/types/src/components/Image/Image.d.ts +20 -0
  381. package/build/components/types/src/components/Image/index.d.ts +2 -0
  382. package/build/components/types/src/components/Link/Link.d.ts +18 -0
  383. package/build/components/types/src/components/Link/index.d.ts +2 -0
  384. package/build/components/types/src/components/List/ClickableControl.d.ts +9 -0
  385. package/build/components/types/src/components/List/List.d.ts +13 -0
  386. package/build/components/types/src/components/List/ListItem.d.ts +16 -0
  387. package/build/components/types/src/components/List/index.d.ts +3 -0
  388. package/build/components/types/src/components/Loader/Loader.d.ts +14 -0
  389. package/build/components/types/src/components/Loader/Loader.static.d.ts +19 -0
  390. package/build/components/types/src/components/Loader/index.d.ts +2 -0
  391. package/build/components/types/{components → src/components}/Modal/Modal.d.ts +2 -0
  392. package/build/components/types/src/components/Pagination/Pagination.d.ts +28 -0
  393. package/build/components/types/src/components/Pagination/PaginationItem.d.ts +21 -0
  394. package/build/components/types/src/components/Pagination/Separator.d.ts +6 -0
  395. package/build/components/types/src/components/Pagination/helpers.d.ts +23 -0
  396. package/build/components/types/src/components/Pagination/index.d.ts +4 -0
  397. package/build/components/types/src/components/Preview/CodeExample.d.ts +9 -0
  398. package/build/components/types/src/components/Preview/Interact/ButtonShowPropsGroup.d.ts +10 -0
  399. package/build/components/types/src/components/Preview/Interact/Interact.d.ts +17 -0
  400. package/build/components/types/src/components/Preview/Interact/PropCheckbox.d.ts +15 -0
  401. package/build/components/types/src/components/Preview/Interact/PropFormField.d.ts +7 -0
  402. package/build/components/types/src/components/Preview/Interact/PropInput.d.ts +17 -0
  403. package/build/components/types/src/components/Preview/Interact/PropLabelWithTooltip.d.ts +17 -0
  404. package/build/components/types/src/components/Preview/Interact/PropSelect.d.ts +15 -0
  405. package/build/components/types/src/components/Preview/Interact/PropsGroup.d.ts +10 -0
  406. package/build/components/types/src/components/Preview/Interact/Tooltip.d.ts +8 -0
  407. package/build/components/types/src/components/Preview/Interact/helpers.d.ts +19 -0
  408. package/build/components/types/src/components/Preview/Interact/state.d.ts +14 -0
  409. package/build/components/types/src/components/Preview/Preview.d.ts +26 -0
  410. package/build/components/types/src/components/Preview/PreviewTitleBar.d.ts +9 -0
  411. package/build/components/types/src/components/Preview/index.d.ts +7 -0
  412. package/build/components/types/src/components/Progress/Progress.d.ts +15 -0
  413. package/build/components/types/src/components/Progress/index.d.ts +2 -0
  414. package/build/components/types/src/components/PromoBanner/PromoBanner.d.ts +12 -0
  415. package/build/components/types/src/components/PromoBanner/index.d.ts +2 -0
  416. package/build/components/types/src/components/PromotionCard/PromotionCard.d.ts +9 -0
  417. package/build/components/types/src/components/PromotionCard/PromotionCardContent.d.ts +8 -0
  418. package/build/components/types/src/components/PromotionCard/PromotionCardImageWrapper.d.ts +8 -0
  419. package/build/components/types/src/components/PromotionCard/PromotionCardSection.d.ts +9 -0
  420. package/build/components/types/src/components/PromotionCard/PromotionCardTitle.d.ts +8 -0
  421. package/build/components/types/src/components/PromotionCard/constants.d.ts +5 -0
  422. package/build/components/types/src/components/PromotionCard/index.d.ts +6 -0
  423. package/build/components/types/src/components/Skeleton/Skeleton.d.ts +3 -0
  424. package/build/components/types/src/components/Skeleton/index.d.ts +2 -0
  425. package/build/components/types/src/components/SkipLink/SkipLink.d.ts +6 -0
  426. package/build/components/types/src/components/SkipLink/index.d.ts +2 -0
  427. package/build/components/types/src/components/Stepbar/Stepbar.d.ts +21 -0
  428. package/build/components/types/src/components/Stepbar/index.d.ts +2 -0
  429. package/build/components/types/src/components/Sticker/Sticker.d.ts +10 -0
  430. package/build/components/types/src/components/Sticker/index.d.ts +3 -0
  431. package/build/components/types/src/components/Table/Cell.d.ts +11 -0
  432. package/build/components/types/src/components/Table/Footer.d.ts +3 -0
  433. package/build/components/types/src/components/Table/Header.d.ts +3 -0
  434. package/build/components/types/src/components/Table/Row.d.ts +10 -0
  435. package/build/components/types/src/components/Table/Rows.d.ts +3 -0
  436. package/build/components/types/src/components/Table/Table.d.ts +24 -0
  437. package/build/components/types/src/components/Table/Table.static.d.ts +23 -0
  438. package/build/components/types/src/components/Table/TableContext.d.ts +4 -0
  439. package/build/components/types/src/components/Table/docsData.d.ts +39 -0
  440. package/build/components/types/src/components/Table/index.d.ts +3 -0
  441. package/build/components/types/src/components/Table/types.d.ts +34 -0
  442. package/build/components/types/{components → src/components}/Tabs/Tabs.d.ts +1 -3
  443. package/build/components/types/src/components/Tag/Tag.d.ts +24 -0
  444. package/build/components/types/src/components/Tag/TagButton.d.ts +12 -0
  445. package/build/components/types/src/components/Tag/index.d.ts +4 -0
  446. package/build/components/types/src/components/Testimonial/Testimonial.d.ts +10 -0
  447. package/build/components/types/src/components/Testimonial/index.d.ts +2 -0
  448. package/build/components/types/src/components/Tile/Tile.d.ts +23 -0
  449. package/build/components/types/src/components/Tile/index.d.ts +2 -0
  450. package/build/components/types/src/components/Tooltip/InfoTooltip.d.ts +8 -0
  451. package/build/components/types/src/components/Tooltip/Tooltip.d.ts +25 -0
  452. package/build/components/types/src/components/Tooltip/Tooltip.static.d.ts +26 -0
  453. package/build/components/types/src/components/Tooltip/index.d.ts +3 -0
  454. package/build/components/types/src/components/Tooltip/tests/BaseWrapper.d.ts +3 -0
  455. package/build/components/types/src/components/index.d.ts +49 -0
  456. package/build/components/types/src/components/static.d.ts +1 -0
  457. package/build/components/types/src/docs/utils/ToggleButton.d.ts +9 -0
  458. package/build/components/types/src/lib/scripts.d.ts +1 -0
  459. package/build/components/types/src/scripts/index.d.ts +102 -0
  460. package/build/components/types/src/scripts/lib/moduleFactory.d.ts +3 -0
  461. package/build/components/types/src/scripts/modules/SameHeight.d.ts +15 -0
  462. package/build/components/types/src/scripts/modules/Toggle.d.ts +39 -0
  463. package/build/components/types/src/scripts/modules/toggleUtil.d.ts +13 -0
  464. package/build/components/types/src/styles/export/breakpoint.d.ts +9 -0
  465. package/build/components/types/src/utils/ConditionalWrapper.d.ts +10 -0
  466. package/build/components/types/src/utils/classes.d.ts +5 -0
  467. package/build/components/types/src/utils/color.d.ts +20 -0
  468. package/build/components/types/src/utils/helpers.d.ts +11 -0
  469. package/build/components/types/{utils → src/utils}/hooks.d.ts +2 -1
  470. package/build/components/types/src/utils/index.d.ts +5 -0
  471. package/build/images/product-1.svg +10 -0
  472. package/build/images/product-2.svg +14 -0
  473. package/build/images/product-3.svg +9 -0
  474. package/build/lib/after-components.css +1 -1
  475. package/build/lib/after-components.css.map +1 -1
  476. package/build/lib/before-components.css +2 -1
  477. package/build/lib/before-components.css.map +1 -1
  478. package/build/lib/components.css +1 -1
  479. package/build/lib/components.css.map +1 -1
  480. package/build/lib/scripts.css +2 -0
  481. package/build/lib/scripts.css.map +1 -0
  482. package/build/lib/scripts.js +4 -2442
  483. package/build/lib/scripts.js.map +1 -1
  484. package/build/lib/style.css +2 -1
  485. package/build/lib/style.css.map +1 -1
  486. package/build/logo.svg +1 -0
  487. package/package.json +46 -29
  488. package/src/components/Accordion/Accordion.mdx +2 -2
  489. package/src/components/Accordion/Accordion.tsx +12 -20
  490. package/src/components/Accordion/AccordionItem.tsx +16 -26
  491. package/src/components/Accordion/index.ts +3 -3
  492. package/src/components/Accordion/styles/mixins.scss +11 -11
  493. package/src/components/Accordion/styles/style.scss +34 -32
  494. package/src/components/Accordion/tests/Accordion.unit.test.js +2 -2
  495. package/src/components/Accordion/tests/{data.js → data.ts} +9 -7
  496. package/src/components/Alert/Alert.tsx +6 -5
  497. package/src/components/Alert/CHANGELOG.md +33 -0
  498. package/src/components/Alert/styles/config.scss +6 -44
  499. package/src/components/Alert/styles/mixins.scss +20 -8
  500. package/src/components/Alert/styles/style.scss +22 -30
  501. package/src/components/Alert/tests/Alert.test.js +26 -0
  502. package/src/components/AnchorNavigation/AnchorNavigation.static.ts +115 -0
  503. package/src/components/AnchorNavigation/AnchorNavigation.tsx +81 -0
  504. package/src/components/AnchorNavigation/index.tsx +3 -0
  505. package/src/components/AnchorNavigation/styles/mixins.scss +126 -0
  506. package/src/components/AnchorNavigation/styles/style.scss +22 -0
  507. package/src/components/Bar/Bar.mdx +203 -0
  508. package/src/components/Bar/Bar.tsx +58 -0
  509. package/src/components/Bar/BarBreak.tsx +29 -0
  510. package/src/components/Bar/BarItem.tsx +50 -0
  511. package/src/components/Bar/index.ts +5 -0
  512. package/src/components/Bar/styles/config.scss +10 -0
  513. package/src/components/Bar/styles/mixins.scss +84 -0
  514. package/src/components/Bar/styles/style.scss +62 -0
  515. package/src/components/Bar/tests/Bar.conformance.test.js +29 -0
  516. package/src/components/Bar/tests/Bar.unit.test.js +58 -0
  517. package/src/components/Bar/tests/BarBreak.unit.test.js +32 -0
  518. package/src/components/Bar/tests/BarItem.unit.test.js +51 -0
  519. package/src/components/BlockAction/BlockAction.mdx +244 -0
  520. package/src/components/BlockAction/BlockAction.static.ts +104 -0
  521. package/src/components/BlockAction/BlockAction.tsx +27 -0
  522. package/src/components/BlockAction/BlockActionControl.tsx +32 -0
  523. package/src/components/BlockAction/BlockActionIndicator.tsx +32 -0
  524. package/src/components/BlockAction/CloneElementWithClassName.tsx +23 -0
  525. package/src/components/BlockAction/Context.tsx +39 -0
  526. package/src/components/BlockAction/index.tsx +29 -0
  527. package/src/components/BlockAction/styles/config.scss +10 -0
  528. package/src/components/BlockAction/styles/mixins.scss +33 -0
  529. package/src/components/BlockAction/styles/style.scss +35 -0
  530. package/src/components/BlockAction/tests/BlockAction.conformance.test.js +117 -0
  531. package/src/components/BlockAction/tests/BlockAction.unit.test.js +44 -0
  532. package/src/components/BlockAction/tests/BlockActionControl.unit.test.js +146 -0
  533. package/src/components/BlockAction/tests/BlockActionIndicator.unit.test.js +68 -0
  534. package/src/components/BlockAction/tests/CloneElementWithClassName.unit.test.js +33 -0
  535. package/src/components/BodyBanner/BodyBanner.mdx +268 -0
  536. package/src/components/BodyBanner/BodyBanner.tsx +102 -0
  537. package/src/components/BodyBanner/index.tsx +3 -0
  538. package/src/components/BodyBanner/styles/mixins.scss +106 -0
  539. package/src/components/BodyBanner/styles/style.scss +41 -0
  540. package/src/components/Breadcrumbs/BreadcrumbItem.tsx +13 -13
  541. package/src/components/Breadcrumbs/Breadcrumbs.tsx +17 -16
  542. package/src/components/Breadcrumbs/index.ts +2 -4
  543. package/src/components/Breadcrumbs/styles/mixins.scss +16 -28
  544. package/src/components/Breadcrumbs/styles/style.scss +17 -26
  545. package/src/components/Breadcrumbs/tests/BreadcrumbItem.unit.test.js +1 -2
  546. package/src/components/Breadcrumbs/tests/Breadcrumbs.conformance.test.js +16 -17
  547. package/src/components/Breadcrumbs/tests/Breadcrumbs.integration.test.js +21 -19
  548. package/src/components/Breadcrumbs/tests/Breadcrumbs.unit.test.js +28 -21
  549. package/src/components/Button/Button.tsx +4 -3
  550. package/src/components/Button/styles/config.scss +34 -135
  551. package/src/components/Button/styles/mixins.scss +2 -11
  552. package/src/components/Button/styles/style.scss +28 -48
  553. package/src/components/Button/tests/Button.test.js +8 -3
  554. package/src/components/Buttons/styles/style.scss +6 -4
  555. package/src/components/Card/CHANGELOG.md +19 -0
  556. package/src/components/Card/Card.mdx +334 -0
  557. package/src/components/Card/Card.tsx +35 -0
  558. package/src/components/Card/CardProductHeader.tsx +36 -0
  559. package/src/components/Card/CardSection.tsx +44 -0
  560. package/src/components/Card/index.ts +5 -0
  561. package/src/components/Card/styles/config.scss +16 -0
  562. package/src/components/Card/styles/mixins.scss +68 -0
  563. package/src/components/Card/styles/style.scss +39 -0
  564. package/src/components/Card/tests/Card.conformance.test.js +31 -0
  565. package/src/components/Card/tests/Card.unit.test.js +47 -0
  566. package/src/components/Card/tests/CardProductHeader.unit.test.js +61 -0
  567. package/src/components/Card/tests/CardSection.unit.test.js +61 -0
  568. package/src/components/Card/tests/data.ts +44 -0
  569. package/src/components/Carousel/CHANGELOG.md +11 -0
  570. package/src/components/Carousel/Carousel.mdx +159 -0
  571. package/src/components/Carousel/Carousel.static.ts +261 -0
  572. package/src/components/Carousel/Carousel.tsx +98 -0
  573. package/src/components/Carousel/CarouselItem.tsx +29 -0
  574. package/src/components/Carousel/constants.ts +24 -0
  575. package/src/components/Carousel/index.ts +4 -0
  576. package/src/components/Carousel/styles/config.scss +31 -0
  577. package/src/components/Carousel/styles/mixins.scss +196 -0
  578. package/src/components/Carousel/styles/style.scss +65 -0
  579. package/src/components/Carousel/tests/Carousel.conformance.test.js +26 -0
  580. package/src/components/Carousel/tests/Carousel.unit.test.js +207 -0
  581. package/src/components/Carousel/tests/CarouselItem.unit.test.js +31 -0
  582. package/src/components/CarouselPromotions/CarouselPromotions.mdx +246 -0
  583. package/src/components/CarouselPromotions/CarouselPromotions.static.ts +287 -0
  584. package/src/components/CarouselPromotions/CarouselPromotions.tsx +66 -0
  585. package/src/components/CarouselPromotions/CarouselPromotionsItem.tsx +53 -0
  586. package/src/components/CarouselPromotions/constants.ts +23 -0
  587. package/src/components/CarouselPromotions/index.ts +4 -0
  588. package/src/components/CarouselPromotions/styles/config.scss +65 -0
  589. package/src/components/CarouselPromotions/styles/mixins.scss +286 -0
  590. package/src/components/CarouselPromotions/styles/style.scss +51 -0
  591. package/src/components/CarouselPromotions/tests/CarouselPromotions.conformance.test.js +30 -0
  592. package/src/components/CarouselPromotions/tests/CarouselPromotions.unit.test.js +244 -0
  593. package/src/components/CarouselPromotions/tests/CarouselPromotionsItem.unit.test.js +33 -0
  594. package/src/components/CartTable/CartTable.mdx +129 -0
  595. package/src/components/CartTable/CartTable.tsx +111 -0
  596. package/src/components/CartTable/FooterNameColumn.tsx +32 -0
  597. package/src/components/CartTable/FooterPriceColumn.tsx +50 -0
  598. package/src/components/CartTable/Price.tsx +48 -0
  599. package/src/components/CartTable/data.ts +147 -0
  600. package/src/components/CartTable/generateFooter.tsx +97 -0
  601. package/src/components/CartTable/generateRow.tsx +196 -0
  602. package/src/components/CartTable/generateTotal.ts +157 -0
  603. package/src/components/CartTable/index.ts +3 -0
  604. package/src/components/CartTable/styles/config.scss +19 -0
  605. package/src/components/CartTable/styles/mixins.scss +141 -0
  606. package/src/components/CartTable/styles/style.scss +37 -0
  607. package/src/components/CartTable/tests/CartTable.conformance.test.js +16 -0
  608. package/src/components/Code/Code.tsx +85 -0
  609. package/src/components/Code/index.tsx +16 -0
  610. package/src/components/Code/oneDarkProTheme.ts +70 -0
  611. package/src/components/Code/styles/style.scss +58 -0
  612. package/src/components/Container/Container.tsx +11 -9
  613. package/src/components/Container/index.ts +2 -4
  614. package/src/components/Container/styles/style.scss +5 -3
  615. package/src/components/Container/tests/Container.conformance.test.js +58 -53
  616. package/src/components/Container/tests/Container.unit.test.js +125 -134
  617. package/src/components/Controls/Controls.mdx +469 -0
  618. package/src/components/Controls/Controls.tsx +50 -0
  619. package/src/components/Controls/index.ts +3 -0
  620. package/src/components/Controls/styles/config.scss +52 -0
  621. package/src/components/Controls/styles/mixins.scss +70 -0
  622. package/src/components/Controls/styles/style.scss +16 -0
  623. package/src/components/Controls/tests/Controls.test.js +479 -0
  624. package/src/components/Cover/Cover.mdx +87 -0
  625. package/src/components/Cover/Cover.tsx +81 -0
  626. package/src/components/Cover/index.ts +5 -0
  627. package/src/components/Cover/styles/config.scss +55 -0
  628. package/src/components/Cover/styles/mixins.scss +43 -0
  629. package/src/components/Cover/styles/style.scss +32 -0
  630. package/src/components/Cover/tests/Cover.conformance.test.js +28 -0
  631. package/src/components/Cover/tests/Cover.unit.test.js +116 -0
  632. package/src/components/Divider/Divider.mdx +65 -0
  633. package/src/components/Divider/Divider.tsx +57 -0
  634. package/src/components/Divider/index.ts +3 -0
  635. package/src/components/Divider/styles/config.scss +27 -0
  636. package/src/components/Divider/styles/mixins.scss +45 -0
  637. package/src/components/Divider/styles/style.scss +33 -0
  638. package/src/components/{Badge/tests/Badge.conformance.test.js → Divider/tests/Divider.conformance.test.js} +5 -8
  639. package/src/components/Divider/tests/Divider.unit.test.js +80 -0
  640. package/src/components/DocumentationSidebar/DocumentationSidebar.tsx +171 -0
  641. package/src/components/DocumentationSidebar/index.ts +4 -0
  642. package/src/components/DocumentationSidebar/styles/style.scss +230 -0
  643. package/src/components/Dropdown/Dropdown.mdx +260 -0
  644. package/src/components/Dropdown/Dropdown.static.ts +198 -0
  645. package/src/components/Dropdown/Dropdown.tsx +107 -0
  646. package/src/components/Dropdown/DropdownDivider.tsx +17 -0
  647. package/src/components/Dropdown/DropdownItem.tsx +43 -0
  648. package/src/components/Dropdown/DropdownToggleButton.tsx +37 -0
  649. package/src/components/Dropdown/index.ts +6 -0
  650. package/src/components/Dropdown/styles/config.scss +41 -0
  651. package/src/components/Dropdown/styles/mixins.scss +79 -0
  652. package/src/components/Dropdown/styles/style.scss +33 -0
  653. package/src/components/Dropdown/tests/Dropdown.conformance.test.js +48 -0
  654. package/src/components/Dropdown/tests/Dropdown.unit.test.js +69 -0
  655. package/src/components/Expander/Expander.mdx +153 -0
  656. package/src/components/Expander/Expander.static.ts +59 -0
  657. package/src/components/Expander/Expander.tsx +99 -0
  658. package/src/components/Expander/index.ts +3 -0
  659. package/src/components/Expander/styles/style.scss +63 -0
  660. package/src/components/Expander/tests/Expander.conformance.test.js +59 -0
  661. package/src/components/Expander/tests/Expander.unit.test.js +124 -0
  662. package/src/components/FeatureAccordion/FeatureAccordion.mdx +33 -0
  663. package/src/components/FeatureAccordion/FeatureAccordion.static.ts +121 -0
  664. package/src/components/FeatureAccordion/FeatureAccordion.tsx +116 -0
  665. package/src/components/FeatureAccordion/FeatureAccordionItem.tsx +31 -0
  666. package/src/components/FeatureAccordion/index.ts +2 -0
  667. package/src/components/FeatureAccordion/styles/mixins.scss +74 -0
  668. package/src/components/FeatureAccordion/styles/style.scss +21 -0
  669. package/src/components/FeatureAccordion/tests/FeatureAccordion.conformance.test.js +92 -0
  670. package/src/components/FeatureAccordion/tests/FeatureAccordion.unit.test.js +80 -0
  671. package/src/components/Footer/Footer.tsx +93 -0
  672. package/src/components/Footer/data.ts +71 -0
  673. package/src/components/Footer/index.ts +1 -0
  674. package/src/components/Footer/tests/Footer.conformance.test.js +13 -0
  675. package/src/components/Footer/tests/Footer.unit.test.js +66 -0
  676. package/src/components/Forms/Autocomplete/Autocomplete.mdx +198 -0
  677. package/src/components/Forms/Autocomplete/Autocomplete.static.ts +90 -0
  678. package/src/components/Forms/Autocomplete/Autocomplete.tsx +66 -0
  679. package/src/components/Forms/Autocomplete/index.ts +3 -0
  680. package/src/components/Forms/Autocomplete/styles/config.scss +7 -0
  681. package/src/components/Forms/Autocomplete/styles/mixins.scss +78 -0
  682. package/src/components/Forms/Autocomplete/styles/style.scss +66 -0
  683. package/src/components/Forms/Checkbox/Checkbox.mdx +139 -0
  684. package/src/components/Forms/Checkbox/Checkbox.tsx +75 -0
  685. package/src/components/Forms/Checkbox/index.ts +3 -0
  686. package/src/components/Forms/Checkbox/styles/config.scss +25 -0
  687. package/src/components/Forms/Checkbox/styles/mixins.scss +2 -0
  688. package/src/components/Forms/Checkbox/styles/style.scss +89 -0
  689. package/src/components/Forms/Checkbox/tests/Checkbox.unit.test.js +95 -0
  690. package/src/components/Forms/DatePicker/DatePicker.mdx +149 -0
  691. package/src/components/Forms/DatePicker/DatePicker.static.ts +211 -0
  692. package/src/components/Forms/DatePicker/DatePicker.tsx +129 -0
  693. package/src/components/Forms/DatePicker/index.ts +3 -0
  694. package/src/components/Forms/DatePicker/styles/style.scss +183 -0
  695. package/src/components/Forms/DatePicker/tests/DatePicker.unit.test.js +262 -0
  696. package/src/components/Forms/Field/Control.tsx +129 -0
  697. package/src/components/Forms/Field/Description.tsx +40 -0
  698. package/src/components/Forms/Field/Field.mdx +383 -0
  699. package/src/components/Forms/Field/Field.tsx +104 -0
  700. package/src/components/Forms/Field/FieldContext.tsx +24 -0
  701. package/src/components/Forms/Field/Label.tsx +71 -0
  702. package/src/components/Forms/Field/Messages.tsx +36 -0
  703. package/src/components/Forms/Field/Tooltip.tsx +37 -0
  704. package/src/components/Forms/Field/index.ts +3 -0
  705. package/src/components/Forms/Field/styles/config.scss +25 -0
  706. package/src/components/Forms/Field/styles/mixins.scss +43 -0
  707. package/src/components/Forms/Field/styles/style.scss +37 -0
  708. package/src/components/Forms/Field/tests/Autocomplete.Field.conformance.test.js +52 -0
  709. package/src/components/Forms/Field/tests/Checkbox.Field.conformance.test.js +43 -0
  710. package/src/components/Forms/Field/tests/Field.unit.test.js +11 -0
  711. package/src/components/Forms/Field/tests/File.Field.conformance.test.js +47 -0
  712. package/src/components/Forms/Field/tests/Group.Field.conformance.test.js +47 -0
  713. package/src/components/Forms/Field/tests/Label.unit.test.js +163 -0
  714. package/src/components/Forms/Field/tests/Messages.unit.test.js +102 -0
  715. package/src/components/Forms/Field/tests/Radio.Field.conformance.test.js +43 -0
  716. package/src/components/Forms/Field/tests/Rangeslider.Field.test.js +60 -0
  717. package/src/components/Forms/Field/tests/Select.Field.conformance.test.js +45 -0
  718. package/src/components/Forms/Field/tests/Text.Field.conformance.test.js +43 -0
  719. package/src/components/Forms/Field/tests/Textarea.Field.conformance.test.js +43 -0
  720. package/src/components/Forms/Field/tests/Tooltip.unit.test.js +38 -0
  721. package/src/components/Forms/Field/utils.ts +36 -0
  722. package/src/components/Forms/Fieldset/Fieldset.mdx +178 -0
  723. package/src/components/Forms/Fieldset/Fieldset.tsx +62 -0
  724. package/src/components/Forms/Fieldset/FieldsetContext.ts +13 -0
  725. package/src/components/Forms/Fieldset/docsData.ts +75 -0
  726. package/src/components/Forms/Fieldset/index.ts +3 -0
  727. package/src/components/Forms/Fieldset/styles/mixins.scss +6 -0
  728. package/src/components/Forms/Fieldset/styles/style.scss +10 -0
  729. package/src/components/Forms/Fieldset/tests/Fieldset.unit.test.js +63 -0
  730. package/src/components/Forms/File/File.mdx +88 -0
  731. package/src/components/Forms/File/File.static.ts +164 -0
  732. package/src/components/Forms/File/File.tsx +77 -0
  733. package/src/components/Forms/File/index.ts +3 -0
  734. package/src/components/Forms/File/styles/config.scss +12 -0
  735. package/src/components/Forms/File/styles/mixins.scss +87 -0
  736. package/src/components/Forms/File/styles/style.scss +51 -0
  737. package/src/components/Forms/FormTooltip.mdx +51 -0
  738. package/src/components/Forms/Forms.mdx +48 -0
  739. package/src/components/Forms/Group/CHANGELOG.md +5 -0
  740. package/src/components/Forms/Group/Group.mdx +146 -0
  741. package/src/components/Forms/Group/Group.tsx +74 -0
  742. package/src/components/Forms/Group/Item.tsx +35 -0
  743. package/src/components/Forms/Group/index.ts +3 -0
  744. package/src/components/Forms/Group/styles/config.scss +9 -0
  745. package/src/components/Forms/Group/styles/mixins.scss +50 -0
  746. package/src/components/Forms/Group/styles/style.scss +19 -0
  747. package/src/components/Forms/Group/tests/Group.unit.test.js +171 -0
  748. package/src/components/Forms/Group/tests/Item.unit.test.js +31 -0
  749. package/src/components/Forms/Hint/Hint.mdx +40 -0
  750. package/src/components/Forms/Hint/Hint.tsx +21 -0
  751. package/src/components/Forms/Hint/index.ts +3 -0
  752. package/src/components/Forms/Hint/styles/config.scss +5 -0
  753. package/src/components/Forms/Hint/styles/mixins.scss +6 -0
  754. package/src/components/Forms/Hint/styles/style.scss +7 -0
  755. package/src/components/Forms/Hint/tests/Hint.unit.test.js +35 -0
  756. package/src/components/Forms/InputStepper/InputStepper.mdx +147 -0
  757. package/src/components/Forms/InputStepper/InputStepper.static.ts +187 -0
  758. package/src/components/Forms/InputStepper/InputStepper.tsx +86 -0
  759. package/src/components/Forms/InputStepper/index.ts +3 -0
  760. package/src/components/Forms/InputStepper/styles/style.scss +210 -0
  761. package/src/components/Forms/InputStepper/tests/InputStepper.unit.test.js +54 -0
  762. package/src/components/Forms/Label/Label.mdx +95 -0
  763. package/src/components/Forms/Label/Label.tsx +26 -0
  764. package/src/components/Forms/Label/index.ts +3 -0
  765. package/src/components/Forms/Label/styles/config.scss +4 -0
  766. package/src/components/Forms/Label/styles/mixins.scss +6 -0
  767. package/src/components/Forms/Label/styles/style.scss +11 -0
  768. package/src/components/Forms/Label/tests/Label.unit.test.js +42 -0
  769. package/src/components/Forms/Message/Message.mdx +40 -0
  770. package/src/components/Forms/Message/Message.tsx +58 -0
  771. package/src/components/Forms/Message/index.ts +3 -0
  772. package/src/components/Forms/Message/styles/config.scss +15 -0
  773. package/src/components/Forms/Message/styles/mixins.scss +12 -0
  774. package/src/components/Forms/Message/styles/style.scss +11 -0
  775. package/src/components/Forms/Message/tests/Message.unit.test.js +71 -0
  776. package/src/components/Forms/Radio/Radio.mdx +98 -0
  777. package/src/components/Forms/Radio/Radio.tsx +70 -0
  778. package/src/components/Forms/Radio/index.ts +3 -0
  779. package/src/components/Forms/Radio/styles/config.scss +25 -0
  780. package/src/components/Forms/Radio/styles/mixins.scss +6 -0
  781. package/src/components/Forms/Radio/styles/style.scss +25 -0
  782. package/src/components/Forms/Radio/tests/Radio.unit.test.js +105 -0
  783. package/src/components/Forms/RangeSlider/RangeSlider.mdx +304 -0
  784. package/src/components/Forms/RangeSlider/RangeSlider.static.ts +121 -0
  785. package/src/components/Forms/RangeSlider/RangeSlider.tsx +98 -0
  786. package/src/components/Forms/RangeSlider/data.ts +50 -0
  787. package/src/components/Forms/RangeSlider/index.ts +3 -0
  788. package/src/components/Forms/RangeSlider/styles/config.scss +32 -0
  789. package/src/components/Forms/RangeSlider/styles/mixins.scss +139 -0
  790. package/src/components/Forms/RangeSlider/styles/style.scss +97 -0
  791. package/src/components/Forms/Select/Select.mdx +106 -0
  792. package/src/components/Forms/Select/Select.tsx +97 -0
  793. package/src/components/Forms/Select/index.tsx +9 -0
  794. package/src/components/Forms/Select/styles/config.scss +53 -0
  795. package/src/components/Forms/Select/styles/mixins.scss +34 -0
  796. package/src/components/Forms/Select/styles/style.scss +22 -0
  797. package/src/components/Forms/Select/tests/Select.unit.test.js +98 -0
  798. package/src/components/Forms/TextArea/TextArea.mdx +109 -0
  799. package/src/components/Forms/TextArea/TextArea.tsx +84 -0
  800. package/src/components/Forms/TextArea/index.ts +3 -0
  801. package/src/components/Forms/TextArea/styles/config.scss +35 -0
  802. package/src/components/Forms/TextArea/styles/mixins.scss +48 -0
  803. package/src/components/Forms/TextArea/styles/style.scss +22 -0
  804. package/src/components/Forms/TextArea/tests/TextArea.unit.test.js +127 -0
  805. package/src/components/Forms/TextInput/TextInput.mdx +153 -0
  806. package/src/components/Forms/TextInput/TextInput.tsx +101 -0
  807. package/src/components/Forms/TextInput/index.ts +3 -0
  808. package/src/components/Forms/TextInput/styles/config.scss +60 -0
  809. package/src/components/Forms/TextInput/styles/mixins.scss +80 -0
  810. package/src/components/Forms/TextInput/styles/style.scss +30 -0
  811. package/src/components/Forms/TextInput/tests/TextInput.unit.test.js +108 -0
  812. package/src/components/Forms/index.ts +16 -0
  813. package/src/components/Forms/styles/config.scss +41 -0
  814. package/src/components/Forms/styles/mixins.scss +44 -0
  815. package/src/components/Gauge/Gauge.mdx +35 -0
  816. package/src/components/Gauge/Gauge.tsx +72 -0
  817. package/src/components/Gauge/GaugeMaker.tsx +90 -0
  818. package/src/components/Gauge/index.ts +3 -0
  819. package/src/components/Gauge/styles/style.scss +34 -0
  820. package/src/components/Gauge/tests/Gauge.conformance.test.js +25 -0
  821. package/src/components/Gauge/tests/Gauge.unit.test.js +35 -0
  822. package/src/components/Grid/Grid.mdx +20 -19
  823. package/src/components/Grid/Grid.tsx +27 -22
  824. package/src/components/Grid/index.ts +3 -5
  825. package/src/components/Grid/styles/style.scss +29 -27
  826. package/src/components/Grid/tests/Grid.unit.test.js +572 -0
  827. package/src/components/Grid/tests/GridCol.unit.test.js +223 -0
  828. package/src/components/Hero/Hero.mdx +168 -0
  829. package/src/components/Hero/Hero.tsx +182 -0
  830. package/src/components/Hero/HeroPlayground.tsx +369 -0
  831. package/src/components/Hero/index.ts +3 -0
  832. package/src/components/Hero/styles/config.scss +23 -0
  833. package/src/components/Hero/styles/mixins.scss +173 -0
  834. package/src/components/Hero/styles/style.scss +59 -0
  835. package/src/components/Hero/tests/Hero.conformance.test.js +29 -0
  836. package/src/components/Hero/tests/Hero.unit.test.js +272 -0
  837. package/src/components/Hero/tests/data.js +40 -0
  838. package/src/components/Icon/Icon.tsx +2 -2
  839. package/src/components/Icon/IconSearch.jsx +2 -0
  840. package/src/components/Icon/styles/config.scss +5 -5
  841. package/src/components/Icon/styles/style.scss +12 -10
  842. package/src/components/IconList/IconList.mdx +53 -0
  843. package/src/components/IconList/IconList.tsx +30 -0
  844. package/src/components/IconList/Item.tsx +39 -0
  845. package/src/components/IconList/index.ts +4 -0
  846. package/src/components/IconList/styles/config.scss +3 -0
  847. package/src/components/IconList/styles/mixins.scss +33 -0
  848. package/src/components/IconList/styles/style.scss +21 -0
  849. package/src/components/IconList/tests/IconList.conformance.test.js +55 -0
  850. package/src/components/IconList/tests/IconList.unit.test.js +79 -0
  851. package/src/components/IconList/tests/Item.unit.test.js +143 -0
  852. package/src/components/Image/Image.mdx +29 -20
  853. package/src/components/Image/Image.tsx +12 -13
  854. package/src/components/Image/index.ts +2 -6
  855. package/src/components/Image/styles/style.scss +9 -6
  856. package/src/components/Image/tests/Image.conformance.test.js +1 -1
  857. package/src/components/Image/tests/Image.unit.test.js +166 -188
  858. package/src/components/Link/CHANGELOG.md +25 -0
  859. package/src/components/Link/Link.tsx +14 -9
  860. package/src/components/Link/styles/mixins.scss +8 -17
  861. package/src/components/Link/styles/style.scss +37 -54
  862. package/src/components/Link/tests/Link.conformance.test.js +7 -25
  863. package/src/components/Link/tests/Link.unit.test.js +20 -33
  864. package/src/components/List/ClickableControl.tsx +33 -0
  865. package/src/components/List/List.mdx +216 -0
  866. package/src/components/List/List.tsx +40 -0
  867. package/src/components/List/ListItem.tsx +44 -0
  868. package/src/components/List/index.ts +5 -0
  869. package/src/components/List/styles/config.scss +38 -0
  870. package/src/components/List/styles/mixins.scss +99 -0
  871. package/src/components/List/styles/style.scss +48 -0
  872. package/src/components/List/tests/ClickableControl.unit.test.js +100 -0
  873. package/src/components/List/tests/List.conformance.test.js +69 -0
  874. package/src/components/List/tests/List.unit.test.js +47 -0
  875. package/src/components/List/tests/ListItem.unit.test.js +104 -0
  876. package/src/components/Loader/Loader.mdx +148 -0
  877. package/src/components/Loader/Loader.static.ts +85 -0
  878. package/src/components/Loader/Loader.tsx +75 -0
  879. package/src/components/Loader/index.ts +3 -0
  880. package/src/components/Loader/styles/config.scss +16 -0
  881. package/src/components/Loader/styles/mixins.scss +66 -0
  882. package/src/components/Loader/styles/style.scss +38 -0
  883. package/src/components/Loader/tests/Loader.conformance.test.js +22 -0
  884. package/src/components/Loader/tests/Loader.unit.test.js +59 -0
  885. package/src/components/Loader/tests/test.scss +5 -0
  886. package/src/components/Modal/Modal.mdx +86 -86
  887. package/src/components/Modal/Modal.tsx +5 -0
  888. package/src/components/Modal/styles/config.scss +7 -8
  889. package/src/components/Modal/styles/mixins.scss +2 -2
  890. package/src/components/Modal/styles/style.scss +65 -63
  891. package/src/components/Modal/tests/Modal.unit.test.js +22 -0
  892. package/src/components/Pagination/Pagination.mdx +45 -0
  893. package/src/components/Pagination/Pagination.tsx +86 -0
  894. package/src/components/Pagination/PaginationItem.tsx +61 -0
  895. package/src/components/Pagination/Separator.tsx +19 -0
  896. package/src/components/Pagination/helpers.ts +71 -0
  897. package/src/components/Pagination/index.ts +5 -0
  898. package/src/components/Pagination/styles/mixins.scss +43 -0
  899. package/src/components/Pagination/styles/style.scss +28 -0
  900. package/src/components/Pagination/tests/Item.unit.test.js +96 -0
  901. package/src/components/Pagination/tests/Pagination.conformance.test.js +41 -0
  902. package/src/components/Pagination/tests/Pagination.unit.test.js +108 -0
  903. package/src/components/Pagination/tests/Separator.unit.test.js +25 -0
  904. package/src/components/Pagination/tests/utils.js +12 -0
  905. package/src/components/Preview/CodeExample.tsx +238 -0
  906. package/src/components/Preview/Interact/ButtonShowPropsGroup.tsx +38 -0
  907. package/src/components/Preview/Interact/Interact.tsx +263 -0
  908. package/src/components/Preview/Interact/PropCheckbox.tsx +50 -0
  909. package/src/components/Preview/Interact/PropFormField.tsx +76 -0
  910. package/src/components/Preview/Interact/PropInput.tsx +72 -0
  911. package/src/components/Preview/Interact/PropLabelWithTooltip.tsx +77 -0
  912. package/src/components/Preview/Interact/PropSelect.tsx +60 -0
  913. package/src/components/Preview/Interact/PropsGroup.tsx +49 -0
  914. package/src/components/Preview/Interact/Tooltip.tsx +17 -0
  915. package/src/components/Preview/Interact/helpers.ts +60 -0
  916. package/src/components/Preview/Interact/state.ts +18 -0
  917. package/src/components/Preview/Preview.docs.mdx +153 -0
  918. package/src/components/Preview/Preview.test.js +66 -0
  919. package/src/components/Preview/Preview.tsx +273 -0
  920. package/src/components/Preview/PreviewTitleBar.tsx +32 -0
  921. package/src/components/Preview/index.tsx +16 -0
  922. package/src/components/Preview/styles/style.scss +340 -0
  923. package/src/components/Progress/Progress.mdx +119 -0
  924. package/src/components/Progress/Progress.tsx +60 -0
  925. package/src/components/Progress/index.ts +3 -0
  926. package/src/components/Progress/styles/config.scss +19 -0
  927. package/src/components/Progress/styles/mixins.scss +40 -0
  928. package/src/components/Progress/styles/style.scss +31 -0
  929. package/src/components/Progress/tests/Progress.conformance.test.js +27 -0
  930. package/src/components/Progress/tests/Progress.unit.test.js +108 -0
  931. package/src/components/PromoBanner/PromoBanner.tsx +65 -0
  932. package/src/components/PromoBanner/index.ts +2 -0
  933. package/src/components/PromoBanner/styles/mixins.scss +37 -0
  934. package/src/components/PromoBanner/styles/style.scss +23 -0
  935. package/src/components/PromotionCard/PromotionCard.mdx +191 -0
  936. package/src/components/PromotionCard/PromotionCard.tsx +31 -0
  937. package/src/components/PromotionCard/PromotionCardContent.tsx +25 -0
  938. package/src/components/PromotionCard/PromotionCardImageWrapper.tsx +25 -0
  939. package/src/components/PromotionCard/PromotionCardSection.tsx +29 -0
  940. package/src/components/PromotionCard/PromotionCardTitle.tsx +24 -0
  941. package/src/components/PromotionCard/constants.ts +5 -0
  942. package/src/components/PromotionCard/index.ts +7 -0
  943. package/src/components/PromotionCard/styles/config.scss +4 -0
  944. package/src/components/PromotionCard/styles/mixins.scss +89 -0
  945. package/src/components/PromotionCard/styles/style.scss +25 -0
  946. package/src/components/Section/Section.tsx +1 -1
  947. package/src/components/Section/styles/style.scss +28 -26
  948. package/src/components/Skeleton/Skeleton.mdx +90 -0
  949. package/src/components/Skeleton/Skeleton.tsx +21 -0
  950. package/src/components/Skeleton/index.ts +3 -0
  951. package/src/components/Skeleton/styles/config.scss +31 -0
  952. package/src/components/Skeleton/styles/mixins.scss +22 -0
  953. package/src/components/Skeleton/styles/style.scss +7 -0
  954. package/src/components/Skeleton/tests/Skeleton.conformance.test.js +16 -0
  955. package/src/components/Skeleton/tests/Skeleton.unit.test.js +22 -0
  956. package/src/components/SkipLink/SkipLink.mdx +23 -0
  957. package/src/components/SkipLink/SkipLink.tsx +25 -0
  958. package/src/components/SkipLink/index.ts +3 -0
  959. package/src/components/SkipLink/styles/style.scss +20 -0
  960. package/src/components/SkipLink/tests/SkipLink.unit.test.js +88 -0
  961. package/src/components/Stepbar/Stepbar.mdx +137 -0
  962. package/src/components/Stepbar/Stepbar.tsx +100 -0
  963. package/src/components/Stepbar/index.ts +3 -0
  964. package/src/components/Stepbar/styles/config.scss +91 -0
  965. package/src/components/Stepbar/styles/mixins.scss +132 -0
  966. package/src/components/Stepbar/styles/style.scss +77 -0
  967. package/src/components/Stepbar/tests/Stepbar.conformance.test.js +34 -0
  968. package/src/components/Stepbar/tests/Stepbar.unit.test.js +92 -0
  969. package/src/components/Sticker/Sticker.mdx +50 -0
  970. package/src/components/Sticker/Sticker.tsx +31 -0
  971. package/src/components/Sticker/index.ts +4 -0
  972. package/src/components/Sticker/styles/config.scss +31 -0
  973. package/src/components/Sticker/styles/mixins.scss +25 -0
  974. package/src/components/Sticker/styles/style.scss +22 -0
  975. package/src/components/Sticker/tests/Sticker.conformance.test.js +17 -0
  976. package/src/components/Sticker/tests/Sticker.unit.test.js +42 -0
  977. package/src/components/Table/Cell.tsx +22 -0
  978. package/src/components/Table/Footer.tsx +25 -0
  979. package/src/components/Table/Header.tsx +73 -0
  980. package/src/components/Table/Row.tsx +70 -0
  981. package/src/components/Table/Rows.tsx +36 -0
  982. package/src/components/Table/Table.mdx +199 -0
  983. package/src/components/Table/Table.static.ts +146 -0
  984. package/src/components/Table/Table.tsx +130 -0
  985. package/src/components/Table/TableContext.ts +9 -0
  986. package/src/components/Table/docsData.ts +210 -0
  987. package/src/components/Table/index.ts +4 -0
  988. package/src/components/Table/styles/config.scss +4 -0
  989. package/src/components/Table/styles/mixins.scss +115 -0
  990. package/src/components/Table/styles/style.scss +103 -0
  991. package/src/components/Table/tests/Cell.unit.test.js +59 -0
  992. package/src/components/Table/tests/Footer.unit.test.js +70 -0
  993. package/src/components/Table/tests/Header.unit.test.js +120 -0
  994. package/src/components/Table/tests/Row.unit.test.js +206 -0
  995. package/src/components/Table/tests/Rows.unit.test.js +92 -0
  996. package/src/components/Table/tests/Table.conformance.test.js +74 -0
  997. package/src/components/Table/tests/Table.unit.test.js +296 -0
  998. package/src/components/Table/types.ts +40 -0
  999. package/src/components/Tabs/Tabs.tsx +4 -5
  1000. package/src/components/Tabs/styles/config.scss +29 -48
  1001. package/src/components/Tabs/styles/mixins.scss +20 -29
  1002. package/src/components/Tabs/styles/style.scss +34 -42
  1003. package/src/components/Tabs/tests/Tabs.unit.test.js +8 -0
  1004. package/src/components/Tag/CHANGELOG.md +93 -0
  1005. package/src/components/Tag/Tag.mdx +52 -0
  1006. package/src/components/Tag/Tag.tsx +118 -0
  1007. package/src/components/Tag/TagButton.tsx +67 -0
  1008. package/src/components/Tag/index.ts +5 -0
  1009. package/src/components/Tag/styles/config.scss +132 -0
  1010. package/src/components/Tag/styles/mixins.scss +54 -0
  1011. package/src/components/Tag/styles/style.scss +69 -0
  1012. package/src/components/Tag/tests/Tag.conformance.test.js +44 -0
  1013. package/src/components/Tag/tests/Tag.unit.test.js +93 -0
  1014. package/src/components/Tag/tests/TagButton.conformance.test.js +24 -0
  1015. package/src/components/Tag/tests/TagButton.unit.test.js +96 -0
  1016. package/src/components/Testimonial/Testimonial.mdx +41 -0
  1017. package/src/components/Testimonial/Testimonial.tsx +38 -0
  1018. package/src/components/Testimonial/index.ts +3 -0
  1019. package/src/components/Testimonial/styles/config.scss +39 -0
  1020. package/src/components/Testimonial/styles/mixins.scss +40 -0
  1021. package/src/components/Testimonial/styles/style.scss +16 -0
  1022. package/src/components/Testimonial/tests/Testimonial.conformance.test.js +17 -0
  1023. package/src/components/Testimonial/tests/Testimonial.unit.test.js +44 -0
  1024. package/src/components/Tile/CHANGELOG.md +14 -0
  1025. package/src/components/Tile/Tile.mdx +163 -0
  1026. package/src/components/Tile/Tile.tsx +86 -0
  1027. package/src/components/Tile/index.ts +3 -0
  1028. package/src/components/Tile/styles/config.scss +17 -0
  1029. package/src/components/Tile/styles/mixins.scss +78 -0
  1030. package/src/components/Tile/styles/style.scss +55 -0
  1031. package/src/components/Tile/tests/Tile.conformance.test.js +16 -0
  1032. package/src/components/Tile/tests/Tile.unit.test.js +126 -0
  1033. package/src/components/Tooltip/InfoTooltip.tsx +40 -0
  1034. package/src/components/Tooltip/TODO.md +1 -0
  1035. package/src/components/Tooltip/Tooltip.mdx +227 -0
  1036. package/src/components/Tooltip/Tooltip.static.ts +213 -0
  1037. package/src/components/Tooltip/Tooltip.tsx +107 -0
  1038. package/src/components/Tooltip/index.ts +4 -0
  1039. package/src/components/Tooltip/styles/config.scss +59 -0
  1040. package/src/components/Tooltip/styles/mixins.scss +94 -0
  1041. package/src/components/Tooltip/styles/style.scss +30 -0
  1042. package/src/components/Tooltip/tests/BaseWrapper.tsx +10 -0
  1043. package/src/components/Tooltip/tests/InfoTooltip.unit.test.js +98 -0
  1044. package/src/components/Tooltip/tests/Tooltip.conformance.test.js +44 -0
  1045. package/src/components/Tooltip/tests/Tooltip.unit.test.js +326 -0
  1046. package/src/components/index.ts +147 -3
  1047. package/src/components/static.ts +1 -1
  1048. package/src/styles/base/globals-forms.scss +15 -13
  1049. package/src/styles/base/globals.scss +132 -103
  1050. package/src/styles/before-components.scss +18 -4
  1051. package/src/styles/export/base.scss +1 -1
  1052. package/src/styles/export/color.scss +22 -22
  1053. package/src/styles/shame.scss +10 -8
  1054. package/src/styles/tokens/base.scss +4 -4
  1055. package/src/styles/tokens/color.scss +11 -11
  1056. package/src/styles/typography/mixins.scss +1 -1
  1057. package/src/styles/typography/style.scss +43 -41
  1058. package/src/styles/utilities/border.scss +16 -15
  1059. package/src/styles/utilities/color.scss +115 -95
  1060. package/src/styles/utilities/horizontal-scroll.scss +40 -36
  1061. package/src/styles/utilities/layout.scss +159 -157
  1062. package/src/styles/utilities/text.scss +98 -84
  1063. package/src/styles/utilities/visibility.scss +66 -62
  1064. package/build/404.html +0 -1
  1065. package/build/_next/static/CRhIjUFtohDOfdDfzvfXM/_buildManifest.js +0 -1
  1066. package/build/_next/static/CRhIjUFtohDOfdDfzvfXM/_ssgManifest.js +0 -1
  1067. package/build/_next/static/chunks/4bd1b696-40a218329c8ae32b.js +0 -1
  1068. package/build/_next/static/chunks/684-c72f8f73e7f2d568.js +0 -1
  1069. package/build/_next/static/chunks/925.75d0c8afa7ab7cfa.js +0 -1
  1070. package/build/_next/static/chunks/998-a45c3cf6f575e126.js +0 -1
  1071. package/build/_next/static/chunks/app/_not-found/page-c799b4c91b89a5c2.js +0 -1
  1072. package/build/_next/static/chunks/app/components/alert/page-d591b03a7394f81e.js +0 -1
  1073. package/build/_next/static/chunks/app/components/badge/page-bbcffd5558aeab06.js +0 -1
  1074. package/build/_next/static/chunks/app/components/button/page-b922a8f5114b0a69.js +0 -1
  1075. package/build/_next/static/chunks/app/components/buttons/page-0a5bf7e5ac7991fb.js +0 -1
  1076. package/build/_next/static/chunks/app/components/icon/page-dac6ba29b85d924d.js +0 -1
  1077. package/build/_next/static/chunks/app/components/modal/page-4a249b6d271eea91.js +0 -1
  1078. package/build/_next/static/chunks/app/components/tabs/page-7d82e8eafd25b86e.js +0 -1
  1079. package/build/_next/static/chunks/app/layout-f74d44a2772d8d63.js +0 -1
  1080. package/build/_next/static/chunks/app/page-9efa16a51ef59461.js +0 -1
  1081. package/build/_next/static/chunks/framework-f593a28cde54158e.js +0 -1
  1082. package/build/_next/static/chunks/main-43608b6b4bb05f8f.js +0 -1
  1083. package/build/_next/static/chunks/main-app-ce2a2222e012907f.js +0 -1
  1084. package/build/_next/static/chunks/pages/_app-da15c11dea942c36.js +0 -1
  1085. package/build/_next/static/chunks/pages/_error-cc3f077a18ea1793.js +0 -1
  1086. package/build/_next/static/chunks/polyfills-42372ed130431b0a.js +0 -1
  1087. package/build/_next/static/chunks/webpack-623f6e616651e1c0.js +0 -1
  1088. package/build/_next/static/css/14f3a3e0186fb7a8.css +0 -3
  1089. package/build/_next/static/css/168dd2b7e791cf72.css +0 -1
  1090. package/build/_next/static/css/28a41a1d7dcdbfd9.css +0 -1
  1091. package/build/_next/static/css/291602d64f1f3570.css +0 -1
  1092. package/build/_next/static/css/4c4366b3963177f0.css +0 -1
  1093. package/build/_next/static/css/5481aeac9adca710.css +0 -1
  1094. package/build/_next/static/css/73b136688c14b891.css +0 -1
  1095. package/build/_next/static/css/91c8cf755bf9ff19.css +0 -1
  1096. package/build/_next/static/css/c1b0424033f305ff.css +0 -1
  1097. package/build/_next/static/css/eea9fd9ccdd56c76.css +0 -1
  1098. package/build/_next/static/media/671791babd225be4-s.p.woff2 +0 -0
  1099. package/build/_next/static/media/c62d990acddde5f0-s.p.woff2 +0 -0
  1100. package/build/_next/static/media/dfdbb1c4973e0bd7-s.p.woff2 +0 -0
  1101. package/build/components/Badge/index.js +0 -619
  1102. package/build/components/Badge/index.js.map +0 -1
  1103. package/build/components/Badge/style.css +0 -2
  1104. package/build/components/Badge/style.css.map +0 -1
  1105. package/build/components/alert.html +0 -2
  1106. package/build/components/alert.txt +0 -30
  1107. package/build/components/badge.html +0 -4
  1108. package/build/components/badge.txt +0 -24
  1109. package/build/components/button.html +0 -2
  1110. package/build/components/button.txt +0 -27
  1111. package/build/components/buttons.html +0 -1
  1112. package/build/components/buttons.txt +0 -27
  1113. package/build/components/icon.html +0 -1
  1114. package/build/components/icon.txt +0 -23
  1115. package/build/components/modal.html +0 -1
  1116. package/build/components/modal.txt +0 -29
  1117. package/build/components/tabs.html +0 -1
  1118. package/build/components/tabs.txt +0 -27
  1119. package/build/components/types/components/Badge/Badge.d.ts +0 -12
  1120. package/build/components/types/components/Badge/index.d.ts +0 -2
  1121. package/build/components/types/components/Container/Container.d.ts +0 -6
  1122. package/build/components/types/components/Container/index.d.ts +0 -3
  1123. package/build/components/types/components/index.d.ts +0 -11
  1124. package/build/components/types/utils/ConditionalWrapper.d.ts +0 -13
  1125. package/build/index.html +0 -11
  1126. package/build/index.txt +0 -23
  1127. package/src/components/Badge/Badge.mdx +0 -52
  1128. package/src/components/Badge/Badge.tsx +0 -47
  1129. package/src/components/Badge/index.ts +0 -3
  1130. package/src/components/Badge/styles/config.scss +0 -88
  1131. package/src/components/Badge/styles/mixins.scss +0 -26
  1132. package/src/components/Badge/styles/style.scss +0 -21
  1133. package/src/components/Badge/tests/Badge.unit.test.js +0 -50
  1134. package/src/components/Grid/tests/Grid.unit.test.tsx +0 -533
  1135. package/src/components/Grid/tests/GridCol.unit.test.tsx +0 -199
  1136. package/src/components/Link/styles/config.scss +0 -85
  1137. package/src/components/Link/tests/Link.integration.test.js +0 -393
  1138. /package/build/components/types/{components → src/components}/Alert/data.d.ts +0 -0
  1139. /package/build/components/types/{components → src/components}/Alert/index.d.ts +0 -0
  1140. /package/build/components/types/{components → src/components}/Button/IconButton.d.ts +0 -0
  1141. /package/build/components/types/{components → src/components}/Button/index.d.ts +0 -0
  1142. /package/build/components/types/{components → src/components}/Buttons/Buttons.d.ts +0 -0
  1143. /package/build/components/types/{components → src/components}/Buttons/index.d.ts +0 -0
  1144. /package/build/components/types/{components → src/components}/Icon/SpritePathContext.d.ts +0 -0
  1145. /package/build/components/types/{components → src/components}/Icon/index.d.ts +0 -0
  1146. /package/build/components/types/{components → src/components}/Modal/Modal.static.d.ts +0 -0
  1147. /package/build/components/types/{components → src/components}/Modal/ModalBody.d.ts +0 -0
  1148. /package/build/components/types/{components → src/components}/Modal/ModalCloseButton.d.ts +0 -0
  1149. /package/build/components/types/{components → src/components}/Modal/ModalTitle.d.ts +0 -0
  1150. /package/build/components/types/{components → src/components}/Modal/index.d.ts +0 -0
  1151. /package/build/components/types/{components → src/components}/Section/Section.d.ts +0 -0
  1152. /package/build/components/types/{components → src/components}/Section/index.d.ts +0 -0
  1153. /package/build/components/types/{components → src/components}/Tabs/Tab.d.ts +0 -0
  1154. /package/build/components/types/{components → src/components}/Tabs/TabPanel.d.ts +0 -0
  1155. /package/build/components/types/{components → src/components}/Tabs/Tabs.static.d.ts +0 -0
  1156. /package/build/components/types/{components → src/components}/Tabs/index.d.ts +0 -0
  1157. /package/build/components/types/{utils → src/utils}/constants.d.ts +0 -0
  1158. /package/build/components/types/{utils → src/utils}/generateId.d.ts +0 -0
  1159. /package/build/components/types/{utils → src/utils}/keyboard.d.ts +0 -0
@@ -1,1520 +1,9 @@
1
- import React, { useRef, useEffect, useCallback, cloneElement, useContext } from 'react';
2
-
3
- function _arrayLikeToArray(r, a) {
4
- (null == a || a > r.length) && (a = r.length);
5
- for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
6
- return n;
7
- }
8
- function _arrayWithHoles(r) {
9
- if (Array.isArray(r)) return r;
10
- }
11
- function _classCallCheck(a, n) {
12
- if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
13
- }
14
- function _defineProperties(e, r) {
15
- for (var t = 0; t < r.length; t++) {
16
- var o = r[t];
17
- o.enumerable = o.enumerable || false, o.configurable = true, "value" in o && (o.writable = true), Object.defineProperty(e, _toPropertyKey(o.key), o);
18
- }
19
- }
20
- function _createClass(e, r, t) {
21
- return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", {
22
- writable: false
23
- }), e;
24
- }
25
- function _defineProperty(e, r, t) {
26
- return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
27
- value: t,
28
- enumerable: true,
29
- configurable: true,
30
- writable: true
31
- }) : e[r] = t, e;
32
- }
33
- function _iterableToArrayLimit(r, l) {
34
- var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
35
- if (null != t) {
36
- var e,
37
- n,
38
- i,
39
- u,
40
- a = [],
41
- f = true,
42
- o = false;
43
- try {
44
- if (i = (t = t.call(r)).next, 0 === l) ; else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
45
- } catch (r) {
46
- o = true, n = r;
47
- } finally {
48
- try {
49
- if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
50
- } finally {
51
- if (o) throw n;
52
- }
53
- }
54
- return a;
55
- }
56
- }
57
- function _nonIterableRest() {
58
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
59
- }
60
- function ownKeys(e, r) {
61
- var t = Object.keys(e);
62
- if (Object.getOwnPropertySymbols) {
63
- var o = Object.getOwnPropertySymbols(e);
64
- r && (o = o.filter(function (r) {
65
- return Object.getOwnPropertyDescriptor(e, r).enumerable;
66
- })), t.push.apply(t, o);
67
- }
68
- return t;
69
- }
70
- function _objectSpread2(e) {
71
- for (var r = 1; r < arguments.length; r++) {
72
- var t = null != arguments[r] ? arguments[r] : {};
73
- r % 2 ? ownKeys(Object(t), true).forEach(function (r) {
74
- _defineProperty(e, r, t[r]);
75
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
76
- Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
77
- });
78
- }
79
- return e;
80
- }
81
- function _slicedToArray(r, e) {
82
- return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
83
- }
84
- function _toPrimitive(t, r) {
85
- if ("object" != typeof t || !t) return t;
86
- var e = t[Symbol.toPrimitive];
87
- if (void 0 !== e) {
88
- var i = e.call(t, r);
89
- if ("object" != typeof i) return i;
90
- throw new TypeError("@@toPrimitive must return a primitive value.");
91
- }
92
- return ("string" === r ? String : Number)(t);
93
- }
94
- function _toPropertyKey(t) {
95
- var i = _toPrimitive(t, "string");
96
- return "symbol" == typeof i ? i : i + "";
97
- }
98
- function _unsupportedIterableToArray(r, a) {
99
- if (r) {
100
- if ("string" == typeof r) return _arrayLikeToArray(r, a);
101
- var t = {}.toString.call(r).slice(8, -1);
102
- return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
103
- }
104
- }
105
-
106
- /******************************************************************************
107
- Copyright (c) Microsoft Corporation.
108
-
109
- Permission to use, copy, modify, and/or distribute this software for any
110
- purpose with or without fee is hereby granted.
111
-
112
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
113
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
114
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
115
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
116
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
117
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
118
- PERFORMANCE OF THIS SOFTWARE.
119
- ***************************************************************************** */
120
- /* global Reflect, Promise, SuppressedError, Symbol, Iterator */
121
-
122
-
123
- function __rest(s, e) {
124
- var t = {};
125
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
126
- t[p] = s[p];
127
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
128
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
129
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
130
- t[p[i]] = s[p[i]];
131
- }
132
- return t;
133
- }
134
-
135
- typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
136
- var e = new Error(message);
137
- return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
138
- };
139
-
140
- function getDefaultExportFromCjs (x) {
141
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
142
- }
143
-
144
- var classnames = {exports: {}};
145
-
1
+ import e,{useRef as t,useEffect as n,useCallback as r,cloneElement as o,useContext as i}from"react";function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function s(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,f(r.key),r)}}function l(e,t,n){return(t=f(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach(function(t){l(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function d(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,c=!1;try{if(i=(n=n.call(e)).next,0===t);else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return a(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}function h(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function y(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}"function"==typeof SuppressedError&&SuppressedError;var m,p={exports:{}};
146
2
  /*!
147
3
  Copyright (c) 2018 Jed Watson.
148
4
  Licensed under the MIT License (MIT), see
149
5
  http://jedwatson.github.io/classnames
150
- */
151
-
152
- var hasRequiredClassnames;
153
-
154
- function requireClassnames () {
155
- if (hasRequiredClassnames) return classnames.exports;
156
- hasRequiredClassnames = 1;
157
- (function (module) {
158
- /* global define */
159
-
160
- (function () {
161
-
162
- var hasOwn = {}.hasOwnProperty;
163
-
164
- function classNames () {
165
- var classes = '';
166
-
167
- for (var i = 0; i < arguments.length; i++) {
168
- var arg = arguments[i];
169
- if (arg) {
170
- classes = appendClass(classes, parseValue(arg));
171
- }
172
- }
173
-
174
- return classes;
175
- }
176
-
177
- function parseValue (arg) {
178
- if (typeof arg === 'string' || typeof arg === 'number') {
179
- return arg;
180
- }
181
-
182
- if (typeof arg !== 'object') {
183
- return '';
184
- }
185
-
186
- if (Array.isArray(arg)) {
187
- return classNames.apply(null, arg);
188
- }
189
-
190
- if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {
191
- return arg.toString();
192
- }
193
-
194
- var classes = '';
195
-
196
- for (var key in arg) {
197
- if (hasOwn.call(arg, key) && arg[key]) {
198
- classes = appendClass(classes, key);
199
- }
200
- }
201
-
202
- return classes;
203
- }
204
-
205
- function appendClass (value, newClass) {
206
- if (!newClass) {
207
- return value;
208
- }
209
-
210
- if (value) {
211
- return value + ' ' + newClass;
212
- }
213
-
214
- return value + newClass;
215
- }
216
-
217
- if (module.exports) {
218
- classNames.default = classNames;
219
- module.exports = classNames;
220
- } else {
221
- window.classNames = classNames;
222
- }
223
- }());
224
- } (classnames));
225
- return classnames.exports;
226
- }
227
-
228
- var classnamesExports = requireClassnames();
229
- var cx = /*@__PURE__*/getDefaultExportFromCjs(classnamesExports);
230
-
231
- /**
232
- * A hook to create and manage an instance of a "static" class
233
- * @param StaticClass The class to instantiate
234
- * @param config Configuration options for the class
235
- * @returns [ref callback, instance reference]
236
- */
237
- var useStatic = function useStatic(StaticClass) {
238
- var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
239
- var instance = useRef(null);
240
- var configRef = useRef(config);
241
- useEffect(function () {
242
- configRef.current = config !== null && config !== void 0 ? config : {};
243
- }, [config]);
244
- var ref = useCallback(function (node) {
245
- var _a, _b;
246
- // use latest config available
247
- var currentConfig = configRef.current;
248
- if (node) {
249
- if (instance.current === null) {
250
- instance.current = new StaticClass(node, currentConfig);
251
- } else {
252
- (_b = (_a = instance.current).update) === null || _b === void 0 ? void 0 : _b.call(_a, currentConfig);
253
- }
254
- }
255
- }, [StaticClass]);
256
- useEffect(function () {
257
- return function () {
258
- var _a, _b;
259
- if (instance.current) {
260
- (_b = (_a = instance.current).destroy) === null || _b === void 0 ? void 0 : _b.call(_a);
261
- instance.current = null;
262
- }
263
- };
264
- }, []);
265
- return [ref, instance];
266
- };
267
-
268
- var propTypes$1 = {exports: {}};
269
-
270
- var reactIs = {exports: {}};
271
-
272
- var reactIs_production_min = {};
273
-
274
- /** @license React v16.13.1
275
- * react-is.production.min.js
276
- *
277
- * Copyright (c) Facebook, Inc. and its affiliates.
278
- *
279
- * This source code is licensed under the MIT license found in the
280
- * LICENSE file in the root directory of this source tree.
281
- */
282
-
283
- var hasRequiredReactIs_production_min;
284
-
285
- function requireReactIs_production_min () {
286
- if (hasRequiredReactIs_production_min) return reactIs_production_min;
287
- hasRequiredReactIs_production_min = 1;
288
- var b="function"===typeof Symbol&&Symbol.for,c=b?Symbol.for("react.element"):60103,d=b?Symbol.for("react.portal"):60106,e=b?Symbol.for("react.fragment"):60107,f=b?Symbol.for("react.strict_mode"):60108,g=b?Symbol.for("react.profiler"):60114,h=b?Symbol.for("react.provider"):60109,k=b?Symbol.for("react.context"):60110,l=b?Symbol.for("react.async_mode"):60111,m=b?Symbol.for("react.concurrent_mode"):60111,n=b?Symbol.for("react.forward_ref"):60112,p=b?Symbol.for("react.suspense"):60113,q=b?
289
- Symbol.for("react.suspense_list"):60120,r=b?Symbol.for("react.memo"):60115,t=b?Symbol.for("react.lazy"):60116,v=b?Symbol.for("react.block"):60121,w=b?Symbol.for("react.fundamental"):60117,x=b?Symbol.for("react.responder"):60118,y=b?Symbol.for("react.scope"):60119;
290
- function z(a){if("object"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}reactIs_production_min.AsyncMode=l;reactIs_production_min.ConcurrentMode=m;reactIs_production_min.ContextConsumer=k;reactIs_production_min.ContextProvider=h;reactIs_production_min.Element=c;reactIs_production_min.ForwardRef=n;reactIs_production_min.Fragment=e;reactIs_production_min.Lazy=t;reactIs_production_min.Memo=r;reactIs_production_min.Portal=d;
291
- reactIs_production_min.Profiler=g;reactIs_production_min.StrictMode=f;reactIs_production_min.Suspense=p;reactIs_production_min.isAsyncMode=function(a){return A(a)||z(a)===l};reactIs_production_min.isConcurrentMode=A;reactIs_production_min.isContextConsumer=function(a){return z(a)===k};reactIs_production_min.isContextProvider=function(a){return z(a)===h};reactIs_production_min.isElement=function(a){return "object"===typeof a&&null!==a&&a.$$typeof===c};reactIs_production_min.isForwardRef=function(a){return z(a)===n};reactIs_production_min.isFragment=function(a){return z(a)===e};reactIs_production_min.isLazy=function(a){return z(a)===t};
292
- reactIs_production_min.isMemo=function(a){return z(a)===r};reactIs_production_min.isPortal=function(a){return z(a)===d};reactIs_production_min.isProfiler=function(a){return z(a)===g};reactIs_production_min.isStrictMode=function(a){return z(a)===f};reactIs_production_min.isSuspense=function(a){return z(a)===p};
293
- reactIs_production_min.isValidElementType=function(a){return "string"===typeof a||"function"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||"object"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};reactIs_production_min.typeOf=z;
294
- return reactIs_production_min;
295
- }
296
-
297
- var reactIs_development = {};
298
-
299
- /** @license React v16.13.1
300
- * react-is.development.js
301
- *
302
- * Copyright (c) Facebook, Inc. and its affiliates.
303
- *
304
- * This source code is licensed under the MIT license found in the
305
- * LICENSE file in the root directory of this source tree.
306
- */
307
-
308
- var hasRequiredReactIs_development;
309
-
310
- function requireReactIs_development () {
311
- if (hasRequiredReactIs_development) return reactIs_development;
312
- hasRequiredReactIs_development = 1;
313
-
314
-
315
-
316
- if (process.env.NODE_ENV !== "production") {
317
- (function() {
318
-
319
- // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
320
- // nor polyfill, then a plain number is used for performance.
321
- var hasSymbol = typeof Symbol === 'function' && Symbol.for;
322
- var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
323
- var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
324
- var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
325
- var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
326
- var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
327
- var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
328
- var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
329
- // (unstable) APIs that have been removed. Can we remove the symbols?
330
-
331
- var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
332
- var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
333
- var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
334
- var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
335
- var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
336
- var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
337
- var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
338
- var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
339
- var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
340
- var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;
341
- var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
342
-
343
- function isValidElementType(type) {
344
- return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
345
- type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);
346
- }
347
-
348
- function typeOf(object) {
349
- if (typeof object === 'object' && object !== null) {
350
- var $$typeof = object.$$typeof;
351
-
352
- switch ($$typeof) {
353
- case REACT_ELEMENT_TYPE:
354
- var type = object.type;
355
-
356
- switch (type) {
357
- case REACT_ASYNC_MODE_TYPE:
358
- case REACT_CONCURRENT_MODE_TYPE:
359
- case REACT_FRAGMENT_TYPE:
360
- case REACT_PROFILER_TYPE:
361
- case REACT_STRICT_MODE_TYPE:
362
- case REACT_SUSPENSE_TYPE:
363
- return type;
364
-
365
- default:
366
- var $$typeofType = type && type.$$typeof;
367
-
368
- switch ($$typeofType) {
369
- case REACT_CONTEXT_TYPE:
370
- case REACT_FORWARD_REF_TYPE:
371
- case REACT_LAZY_TYPE:
372
- case REACT_MEMO_TYPE:
373
- case REACT_PROVIDER_TYPE:
374
- return $$typeofType;
375
-
376
- default:
377
- return $$typeof;
378
- }
379
-
380
- }
381
-
382
- case REACT_PORTAL_TYPE:
383
- return $$typeof;
384
- }
385
- }
386
-
387
- return undefined;
388
- } // AsyncMode is deprecated along with isAsyncMode
389
-
390
- var AsyncMode = REACT_ASYNC_MODE_TYPE;
391
- var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
392
- var ContextConsumer = REACT_CONTEXT_TYPE;
393
- var ContextProvider = REACT_PROVIDER_TYPE;
394
- var Element = REACT_ELEMENT_TYPE;
395
- var ForwardRef = REACT_FORWARD_REF_TYPE;
396
- var Fragment = REACT_FRAGMENT_TYPE;
397
- var Lazy = REACT_LAZY_TYPE;
398
- var Memo = REACT_MEMO_TYPE;
399
- var Portal = REACT_PORTAL_TYPE;
400
- var Profiler = REACT_PROFILER_TYPE;
401
- var StrictMode = REACT_STRICT_MODE_TYPE;
402
- var Suspense = REACT_SUSPENSE_TYPE;
403
- var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated
404
-
405
- function isAsyncMode(object) {
406
- {
407
- if (!hasWarnedAboutDeprecatedIsAsyncMode) {
408
- hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
409
-
410
- console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');
411
- }
412
- }
413
-
414
- return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
415
- }
416
- function isConcurrentMode(object) {
417
- return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
418
- }
419
- function isContextConsumer(object) {
420
- return typeOf(object) === REACT_CONTEXT_TYPE;
421
- }
422
- function isContextProvider(object) {
423
- return typeOf(object) === REACT_PROVIDER_TYPE;
424
- }
425
- function isElement(object) {
426
- return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
427
- }
428
- function isForwardRef(object) {
429
- return typeOf(object) === REACT_FORWARD_REF_TYPE;
430
- }
431
- function isFragment(object) {
432
- return typeOf(object) === REACT_FRAGMENT_TYPE;
433
- }
434
- function isLazy(object) {
435
- return typeOf(object) === REACT_LAZY_TYPE;
436
- }
437
- function isMemo(object) {
438
- return typeOf(object) === REACT_MEMO_TYPE;
439
- }
440
- function isPortal(object) {
441
- return typeOf(object) === REACT_PORTAL_TYPE;
442
- }
443
- function isProfiler(object) {
444
- return typeOf(object) === REACT_PROFILER_TYPE;
445
- }
446
- function isStrictMode(object) {
447
- return typeOf(object) === REACT_STRICT_MODE_TYPE;
448
- }
449
- function isSuspense(object) {
450
- return typeOf(object) === REACT_SUSPENSE_TYPE;
451
- }
452
-
453
- reactIs_development.AsyncMode = AsyncMode;
454
- reactIs_development.ConcurrentMode = ConcurrentMode;
455
- reactIs_development.ContextConsumer = ContextConsumer;
456
- reactIs_development.ContextProvider = ContextProvider;
457
- reactIs_development.Element = Element;
458
- reactIs_development.ForwardRef = ForwardRef;
459
- reactIs_development.Fragment = Fragment;
460
- reactIs_development.Lazy = Lazy;
461
- reactIs_development.Memo = Memo;
462
- reactIs_development.Portal = Portal;
463
- reactIs_development.Profiler = Profiler;
464
- reactIs_development.StrictMode = StrictMode;
465
- reactIs_development.Suspense = Suspense;
466
- reactIs_development.isAsyncMode = isAsyncMode;
467
- reactIs_development.isConcurrentMode = isConcurrentMode;
468
- reactIs_development.isContextConsumer = isContextConsumer;
469
- reactIs_development.isContextProvider = isContextProvider;
470
- reactIs_development.isElement = isElement;
471
- reactIs_development.isForwardRef = isForwardRef;
472
- reactIs_development.isFragment = isFragment;
473
- reactIs_development.isLazy = isLazy;
474
- reactIs_development.isMemo = isMemo;
475
- reactIs_development.isPortal = isPortal;
476
- reactIs_development.isProfiler = isProfiler;
477
- reactIs_development.isStrictMode = isStrictMode;
478
- reactIs_development.isSuspense = isSuspense;
479
- reactIs_development.isValidElementType = isValidElementType;
480
- reactIs_development.typeOf = typeOf;
481
- })();
482
- }
483
- return reactIs_development;
484
- }
485
-
486
- var hasRequiredReactIs;
487
-
488
- function requireReactIs () {
489
- if (hasRequiredReactIs) return reactIs.exports;
490
- hasRequiredReactIs = 1;
491
-
492
- if (process.env.NODE_ENV === 'production') {
493
- reactIs.exports = requireReactIs_production_min();
494
- } else {
495
- reactIs.exports = requireReactIs_development();
496
- }
497
- return reactIs.exports;
498
- }
499
-
500
- /*
501
- object-assign
502
- (c) Sindre Sorhus
503
- @license MIT
504
- */
505
-
506
- var objectAssign;
507
- var hasRequiredObjectAssign;
508
-
509
- function requireObjectAssign () {
510
- if (hasRequiredObjectAssign) return objectAssign;
511
- hasRequiredObjectAssign = 1;
512
- /* eslint-disable no-unused-vars */
513
- var getOwnPropertySymbols = Object.getOwnPropertySymbols;
514
- var hasOwnProperty = Object.prototype.hasOwnProperty;
515
- var propIsEnumerable = Object.prototype.propertyIsEnumerable;
516
-
517
- function toObject(val) {
518
- if (val === null || val === undefined) {
519
- throw new TypeError('Object.assign cannot be called with null or undefined');
520
- }
521
-
522
- return Object(val);
523
- }
524
-
525
- function shouldUseNative() {
526
- try {
527
- if (!Object.assign) {
528
- return false;
529
- }
530
-
531
- // Detect buggy property enumeration order in older V8 versions.
532
-
533
- // https://bugs.chromium.org/p/v8/issues/detail?id=4118
534
- var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
535
- test1[5] = 'de';
536
- if (Object.getOwnPropertyNames(test1)[0] === '5') {
537
- return false;
538
- }
539
-
540
- // https://bugs.chromium.org/p/v8/issues/detail?id=3056
541
- var test2 = {};
542
- for (var i = 0; i < 10; i++) {
543
- test2['_' + String.fromCharCode(i)] = i;
544
- }
545
- var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
546
- return test2[n];
547
- });
548
- if (order2.join('') !== '0123456789') {
549
- return false;
550
- }
551
-
552
- // https://bugs.chromium.org/p/v8/issues/detail?id=3056
553
- var test3 = {};
554
- 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
555
- test3[letter] = letter;
556
- });
557
- if (Object.keys(Object.assign({}, test3)).join('') !==
558
- 'abcdefghijklmnopqrst') {
559
- return false;
560
- }
561
-
562
- return true;
563
- } catch (err) {
564
- // We don't expect any of the above to throw, but better to be safe.
565
- return false;
566
- }
567
- }
568
-
569
- objectAssign = shouldUseNative() ? Object.assign : function (target, source) {
570
- var from;
571
- var to = toObject(target);
572
- var symbols;
573
-
574
- for (var s = 1; s < arguments.length; s++) {
575
- from = Object(arguments[s]);
576
-
577
- for (var key in from) {
578
- if (hasOwnProperty.call(from, key)) {
579
- to[key] = from[key];
580
- }
581
- }
582
-
583
- if (getOwnPropertySymbols) {
584
- symbols = getOwnPropertySymbols(from);
585
- for (var i = 0; i < symbols.length; i++) {
586
- if (propIsEnumerable.call(from, symbols[i])) {
587
- to[symbols[i]] = from[symbols[i]];
588
- }
589
- }
590
- }
591
- }
592
-
593
- return to;
594
- };
595
- return objectAssign;
596
- }
597
-
598
- /**
599
- * Copyright (c) 2013-present, Facebook, Inc.
600
- *
601
- * This source code is licensed under the MIT license found in the
602
- * LICENSE file in the root directory of this source tree.
603
- */
604
-
605
- var ReactPropTypesSecret_1;
606
- var hasRequiredReactPropTypesSecret;
607
-
608
- function requireReactPropTypesSecret () {
609
- if (hasRequiredReactPropTypesSecret) return ReactPropTypesSecret_1;
610
- hasRequiredReactPropTypesSecret = 1;
611
-
612
- var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
613
-
614
- ReactPropTypesSecret_1 = ReactPropTypesSecret;
615
- return ReactPropTypesSecret_1;
616
- }
617
-
618
- var has;
619
- var hasRequiredHas;
620
-
621
- function requireHas () {
622
- if (hasRequiredHas) return has;
623
- hasRequiredHas = 1;
624
- has = Function.call.bind(Object.prototype.hasOwnProperty);
625
- return has;
626
- }
627
-
628
- /**
629
- * Copyright (c) 2013-present, Facebook, Inc.
630
- *
631
- * This source code is licensed under the MIT license found in the
632
- * LICENSE file in the root directory of this source tree.
633
- */
634
-
635
- var checkPropTypes_1;
636
- var hasRequiredCheckPropTypes;
637
-
638
- function requireCheckPropTypes () {
639
- if (hasRequiredCheckPropTypes) return checkPropTypes_1;
640
- hasRequiredCheckPropTypes = 1;
641
-
642
- var printWarning = function() {};
643
-
644
- if (process.env.NODE_ENV !== 'production') {
645
- var ReactPropTypesSecret = requireReactPropTypesSecret();
646
- var loggedTypeFailures = {};
647
- var has = requireHas();
648
-
649
- printWarning = function(text) {
650
- var message = 'Warning: ' + text;
651
- if (typeof console !== 'undefined') {
652
- console.error(message);
653
- }
654
- try {
655
- // --- Welcome to debugging React ---
656
- // This error was thrown as a convenience so that you can use this stack
657
- // to find the callsite that caused this warning to fire.
658
- throw new Error(message);
659
- } catch (x) { /**/ }
660
- };
661
- }
662
-
663
- /**
664
- * Assert that the values match with the type specs.
665
- * Error messages are memorized and will only be shown once.
666
- *
667
- * @param {object} typeSpecs Map of name to a ReactPropType
668
- * @param {object} values Runtime values that need to be type-checked
669
- * @param {string} location e.g. "prop", "context", "child context"
670
- * @param {string} componentName Name of the component for error messages.
671
- * @param {?Function} getStack Returns the component stack.
672
- * @private
673
- */
674
- function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
675
- if (process.env.NODE_ENV !== 'production') {
676
- for (var typeSpecName in typeSpecs) {
677
- if (has(typeSpecs, typeSpecName)) {
678
- var error;
679
- // Prop type validation may throw. In case they do, we don't want to
680
- // fail the render phase where it didn't fail before. So we log it.
681
- // After these have been cleaned up, we'll let them throw.
682
- try {
683
- // This is intentionally an invariant that gets caught. It's the same
684
- // behavior as without this statement except with a better message.
685
- if (typeof typeSpecs[typeSpecName] !== 'function') {
686
- var err = Error(
687
- (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +
688
- 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' +
689
- 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'
690
- );
691
- err.name = 'Invariant Violation';
692
- throw err;
693
- }
694
- error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
695
- } catch (ex) {
696
- error = ex;
697
- }
698
- if (error && !(error instanceof Error)) {
699
- printWarning(
700
- (componentName || 'React class') + ': type specification of ' +
701
- location + ' `' + typeSpecName + '` is invalid; the type checker ' +
702
- 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +
703
- 'You may have forgotten to pass an argument to the type checker ' +
704
- 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +
705
- 'shape all require an argument).'
706
- );
707
- }
708
- if (error instanceof Error && !(error.message in loggedTypeFailures)) {
709
- // Only monitor this failure once because there tends to be a lot of the
710
- // same error.
711
- loggedTypeFailures[error.message] = true;
712
-
713
- var stack = getStack ? getStack() : '';
714
-
715
- printWarning(
716
- 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')
717
- );
718
- }
719
- }
720
- }
721
- }
722
- }
723
-
724
- /**
725
- * Resets warning cache when testing.
726
- *
727
- * @private
728
- */
729
- checkPropTypes.resetWarningCache = function() {
730
- if (process.env.NODE_ENV !== 'production') {
731
- loggedTypeFailures = {};
732
- }
733
- };
734
-
735
- checkPropTypes_1 = checkPropTypes;
736
- return checkPropTypes_1;
737
- }
738
-
739
- /**
740
- * Copyright (c) 2013-present, Facebook, Inc.
741
- *
742
- * This source code is licensed under the MIT license found in the
743
- * LICENSE file in the root directory of this source tree.
744
- */
745
-
746
- var factoryWithTypeCheckers;
747
- var hasRequiredFactoryWithTypeCheckers;
748
-
749
- function requireFactoryWithTypeCheckers () {
750
- if (hasRequiredFactoryWithTypeCheckers) return factoryWithTypeCheckers;
751
- hasRequiredFactoryWithTypeCheckers = 1;
752
-
753
- var ReactIs = requireReactIs();
754
- var assign = requireObjectAssign();
755
-
756
- var ReactPropTypesSecret = requireReactPropTypesSecret();
757
- var has = requireHas();
758
- var checkPropTypes = requireCheckPropTypes();
759
-
760
- var printWarning = function() {};
761
-
762
- if (process.env.NODE_ENV !== 'production') {
763
- printWarning = function(text) {
764
- var message = 'Warning: ' + text;
765
- if (typeof console !== 'undefined') {
766
- console.error(message);
767
- }
768
- try {
769
- // --- Welcome to debugging React ---
770
- // This error was thrown as a convenience so that you can use this stack
771
- // to find the callsite that caused this warning to fire.
772
- throw new Error(message);
773
- } catch (x) {}
774
- };
775
- }
776
-
777
- function emptyFunctionThatReturnsNull() {
778
- return null;
779
- }
780
-
781
- factoryWithTypeCheckers = function(isValidElement, throwOnDirectAccess) {
782
- /* global Symbol */
783
- var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
784
- var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
785
-
786
- /**
787
- * Returns the iterator method function contained on the iterable object.
788
- *
789
- * Be sure to invoke the function with the iterable as context:
790
- *
791
- * var iteratorFn = getIteratorFn(myIterable);
792
- * if (iteratorFn) {
793
- * var iterator = iteratorFn.call(myIterable);
794
- * ...
795
- * }
796
- *
797
- * @param {?object} maybeIterable
798
- * @return {?function}
799
- */
800
- function getIteratorFn(maybeIterable) {
801
- var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
802
- if (typeof iteratorFn === 'function') {
803
- return iteratorFn;
804
- }
805
- }
806
-
807
- /**
808
- * Collection of methods that allow declaration and validation of props that are
809
- * supplied to React components. Example usage:
810
- *
811
- * var Props = require('ReactPropTypes');
812
- * var MyArticle = React.createClass({
813
- * propTypes: {
814
- * // An optional string prop named "description".
815
- * description: Props.string,
816
- *
817
- * // A required enum prop named "category".
818
- * category: Props.oneOf(['News','Photos']).isRequired,
819
- *
820
- * // A prop named "dialog" that requires an instance of Dialog.
821
- * dialog: Props.instanceOf(Dialog).isRequired
822
- * },
823
- * render: function() { ... }
824
- * });
825
- *
826
- * A more formal specification of how these methods are used:
827
- *
828
- * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
829
- * decl := ReactPropTypes.{type}(.isRequired)?
830
- *
831
- * Each and every declaration produces a function with the same signature. This
832
- * allows the creation of custom validation functions. For example:
833
- *
834
- * var MyLink = React.createClass({
835
- * propTypes: {
836
- * // An optional string or URI prop named "href".
837
- * href: function(props, propName, componentName) {
838
- * var propValue = props[propName];
839
- * if (propValue != null && typeof propValue !== 'string' &&
840
- * !(propValue instanceof URI)) {
841
- * return new Error(
842
- * 'Expected a string or an URI for ' + propName + ' in ' +
843
- * componentName
844
- * );
845
- * }
846
- * }
847
- * },
848
- * render: function() {...}
849
- * });
850
- *
851
- * @internal
852
- */
853
-
854
- var ANONYMOUS = '<<anonymous>>';
855
-
856
- // Important!
857
- // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
858
- var ReactPropTypes = {
859
- array: createPrimitiveTypeChecker('array'),
860
- bigint: createPrimitiveTypeChecker('bigint'),
861
- bool: createPrimitiveTypeChecker('boolean'),
862
- func: createPrimitiveTypeChecker('function'),
863
- number: createPrimitiveTypeChecker('number'),
864
- object: createPrimitiveTypeChecker('object'),
865
- string: createPrimitiveTypeChecker('string'),
866
- symbol: createPrimitiveTypeChecker('symbol'),
867
-
868
- any: createAnyTypeChecker(),
869
- arrayOf: createArrayOfTypeChecker,
870
- element: createElementTypeChecker(),
871
- elementType: createElementTypeTypeChecker(),
872
- instanceOf: createInstanceTypeChecker,
873
- node: createNodeChecker(),
874
- objectOf: createObjectOfTypeChecker,
875
- oneOf: createEnumTypeChecker,
876
- oneOfType: createUnionTypeChecker,
877
- shape: createShapeTypeChecker,
878
- exact: createStrictShapeTypeChecker,
879
- };
880
-
881
- /**
882
- * inlined Object.is polyfill to avoid requiring consumers ship their own
883
- * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
884
- */
885
- /*eslint-disable no-self-compare*/
886
- function is(x, y) {
887
- // SameValue algorithm
888
- if (x === y) {
889
- // Steps 1-5, 7-10
890
- // Steps 6.b-6.e: +0 != -0
891
- return x !== 0 || 1 / x === 1 / y;
892
- } else {
893
- // Step 6.a: NaN == NaN
894
- return x !== x && y !== y;
895
- }
896
- }
897
- /*eslint-enable no-self-compare*/
898
-
899
- /**
900
- * We use an Error-like object for backward compatibility as people may call
901
- * PropTypes directly and inspect their output. However, we don't use real
902
- * Errors anymore. We don't inspect their stack anyway, and creating them
903
- * is prohibitively expensive if they are created too often, such as what
904
- * happens in oneOfType() for any type before the one that matched.
905
- */
906
- function PropTypeError(message, data) {
907
- this.message = message;
908
- this.data = data && typeof data === 'object' ? data: {};
909
- this.stack = '';
910
- }
911
- // Make `instanceof Error` still work for returned errors.
912
- PropTypeError.prototype = Error.prototype;
913
-
914
- function createChainableTypeChecker(validate) {
915
- if (process.env.NODE_ENV !== 'production') {
916
- var manualPropTypeCallCache = {};
917
- var manualPropTypeWarningCount = 0;
918
- }
919
- function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
920
- componentName = componentName || ANONYMOUS;
921
- propFullName = propFullName || propName;
922
-
923
- if (secret !== ReactPropTypesSecret) {
924
- if (throwOnDirectAccess) {
925
- // New behavior only for users of `prop-types` package
926
- var err = new Error(
927
- 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
928
- 'Use `PropTypes.checkPropTypes()` to call them. ' +
929
- 'Read more at http://fb.me/use-check-prop-types'
930
- );
931
- err.name = 'Invariant Violation';
932
- throw err;
933
- } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {
934
- // Old behavior for people using React.PropTypes
935
- var cacheKey = componentName + ':' + propName;
936
- if (
937
- !manualPropTypeCallCache[cacheKey] &&
938
- // Avoid spamming the console because they are often not actionable except for lib authors
939
- manualPropTypeWarningCount < 3
940
- ) {
941
- printWarning(
942
- 'You are manually calling a React.PropTypes validation ' +
943
- 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +
944
- 'and will throw in the standalone `prop-types` package. ' +
945
- 'You may be seeing this warning due to a third-party PropTypes ' +
946
- 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'
947
- );
948
- manualPropTypeCallCache[cacheKey] = true;
949
- manualPropTypeWarningCount++;
950
- }
951
- }
952
- }
953
- if (props[propName] == null) {
954
- if (isRequired) {
955
- if (props[propName] === null) {
956
- return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
957
- }
958
- return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
959
- }
960
- return null;
961
- } else {
962
- return validate(props, propName, componentName, location, propFullName);
963
- }
964
- }
965
-
966
- var chainedCheckType = checkType.bind(null, false);
967
- chainedCheckType.isRequired = checkType.bind(null, true);
968
-
969
- return chainedCheckType;
970
- }
971
-
972
- function createPrimitiveTypeChecker(expectedType) {
973
- function validate(props, propName, componentName, location, propFullName, secret) {
974
- var propValue = props[propName];
975
- var propType = getPropType(propValue);
976
- if (propType !== expectedType) {
977
- // `propValue` being instance of, say, date/regexp, pass the 'object'
978
- // check, but we can offer a more precise error message here rather than
979
- // 'of type `object`'.
980
- var preciseType = getPreciseType(propValue);
981
-
982
- return new PropTypeError(
983
- 'Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'),
984
- {expectedType: expectedType}
985
- );
986
- }
987
- return null;
988
- }
989
- return createChainableTypeChecker(validate);
990
- }
991
-
992
- function createAnyTypeChecker() {
993
- return createChainableTypeChecker(emptyFunctionThatReturnsNull);
994
- }
995
-
996
- function createArrayOfTypeChecker(typeChecker) {
997
- function validate(props, propName, componentName, location, propFullName) {
998
- if (typeof typeChecker !== 'function') {
999
- return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
1000
- }
1001
- var propValue = props[propName];
1002
- if (!Array.isArray(propValue)) {
1003
- var propType = getPropType(propValue);
1004
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
1005
- }
1006
- for (var i = 0; i < propValue.length; i++) {
1007
- var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);
1008
- if (error instanceof Error) {
1009
- return error;
1010
- }
1011
- }
1012
- return null;
1013
- }
1014
- return createChainableTypeChecker(validate);
1015
- }
1016
-
1017
- function createElementTypeChecker() {
1018
- function validate(props, propName, componentName, location, propFullName) {
1019
- var propValue = props[propName];
1020
- if (!isValidElement(propValue)) {
1021
- var propType = getPropType(propValue);
1022
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
1023
- }
1024
- return null;
1025
- }
1026
- return createChainableTypeChecker(validate);
1027
- }
1028
-
1029
- function createElementTypeTypeChecker() {
1030
- function validate(props, propName, componentName, location, propFullName) {
1031
- var propValue = props[propName];
1032
- if (!ReactIs.isValidElementType(propValue)) {
1033
- var propType = getPropType(propValue);
1034
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));
1035
- }
1036
- return null;
1037
- }
1038
- return createChainableTypeChecker(validate);
1039
- }
1040
-
1041
- function createInstanceTypeChecker(expectedClass) {
1042
- function validate(props, propName, componentName, location, propFullName) {
1043
- if (!(props[propName] instanceof expectedClass)) {
1044
- var expectedClassName = expectedClass.name || ANONYMOUS;
1045
- var actualClassName = getClassName(props[propName]);
1046
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
1047
- }
1048
- return null;
1049
- }
1050
- return createChainableTypeChecker(validate);
1051
- }
1052
-
1053
- function createEnumTypeChecker(expectedValues) {
1054
- if (!Array.isArray(expectedValues)) {
1055
- if (process.env.NODE_ENV !== 'production') {
1056
- if (arguments.length > 1) {
1057
- printWarning(
1058
- 'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +
1059
- 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'
1060
- );
1061
- } else {
1062
- printWarning('Invalid argument supplied to oneOf, expected an array.');
1063
- }
1064
- }
1065
- return emptyFunctionThatReturnsNull;
1066
- }
1067
-
1068
- function validate(props, propName, componentName, location, propFullName) {
1069
- var propValue = props[propName];
1070
- for (var i = 0; i < expectedValues.length; i++) {
1071
- if (is(propValue, expectedValues[i])) {
1072
- return null;
1073
- }
1074
- }
1075
-
1076
- var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
1077
- var type = getPreciseType(value);
1078
- if (type === 'symbol') {
1079
- return String(value);
1080
- }
1081
- return value;
1082
- });
1083
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
1084
- }
1085
- return createChainableTypeChecker(validate);
1086
- }
1087
-
1088
- function createObjectOfTypeChecker(typeChecker) {
1089
- function validate(props, propName, componentName, location, propFullName) {
1090
- if (typeof typeChecker !== 'function') {
1091
- return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
1092
- }
1093
- var propValue = props[propName];
1094
- var propType = getPropType(propValue);
1095
- if (propType !== 'object') {
1096
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
1097
- }
1098
- for (var key in propValue) {
1099
- if (has(propValue, key)) {
1100
- var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
1101
- if (error instanceof Error) {
1102
- return error;
1103
- }
1104
- }
1105
- }
1106
- return null;
1107
- }
1108
- return createChainableTypeChecker(validate);
1109
- }
1110
-
1111
- function createUnionTypeChecker(arrayOfTypeCheckers) {
1112
- if (!Array.isArray(arrayOfTypeCheckers)) {
1113
- process.env.NODE_ENV !== 'production' ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;
1114
- return emptyFunctionThatReturnsNull;
1115
- }
1116
-
1117
- for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
1118
- var checker = arrayOfTypeCheckers[i];
1119
- if (typeof checker !== 'function') {
1120
- printWarning(
1121
- 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +
1122
- 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'
1123
- );
1124
- return emptyFunctionThatReturnsNull;
1125
- }
1126
- }
1127
-
1128
- function validate(props, propName, componentName, location, propFullName) {
1129
- var expectedTypes = [];
1130
- for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
1131
- var checker = arrayOfTypeCheckers[i];
1132
- var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret);
1133
- if (checkerResult == null) {
1134
- return null;
1135
- }
1136
- if (checkerResult.data && has(checkerResult.data, 'expectedType')) {
1137
- expectedTypes.push(checkerResult.data.expectedType);
1138
- }
1139
- }
1140
- var expectedTypesMessage = (expectedTypes.length > 0) ? ', expected one of type [' + expectedTypes.join(', ') + ']': '';
1141
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.'));
1142
- }
1143
- return createChainableTypeChecker(validate);
1144
- }
1145
-
1146
- function createNodeChecker() {
1147
- function validate(props, propName, componentName, location, propFullName) {
1148
- if (!isNode(props[propName])) {
1149
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
1150
- }
1151
- return null;
1152
- }
1153
- return createChainableTypeChecker(validate);
1154
- }
1155
-
1156
- function invalidValidatorError(componentName, location, propFullName, key, type) {
1157
- return new PropTypeError(
1158
- (componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' +
1159
- 'it must be a function, usually from the `prop-types` package, but received `' + type + '`.'
1160
- );
1161
- }
1162
-
1163
- function createShapeTypeChecker(shapeTypes) {
1164
- function validate(props, propName, componentName, location, propFullName) {
1165
- var propValue = props[propName];
1166
- var propType = getPropType(propValue);
1167
- if (propType !== 'object') {
1168
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
1169
- }
1170
- for (var key in shapeTypes) {
1171
- var checker = shapeTypes[key];
1172
- if (typeof checker !== 'function') {
1173
- return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
1174
- }
1175
- var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
1176
- if (error) {
1177
- return error;
1178
- }
1179
- }
1180
- return null;
1181
- }
1182
- return createChainableTypeChecker(validate);
1183
- }
1184
-
1185
- function createStrictShapeTypeChecker(shapeTypes) {
1186
- function validate(props, propName, componentName, location, propFullName) {
1187
- var propValue = props[propName];
1188
- var propType = getPropType(propValue);
1189
- if (propType !== 'object') {
1190
- return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
1191
- }
1192
- // We need to check all keys in case some are required but missing from props.
1193
- var allKeys = assign({}, props[propName], shapeTypes);
1194
- for (var key in allKeys) {
1195
- var checker = shapeTypes[key];
1196
- if (has(shapeTypes, key) && typeof checker !== 'function') {
1197
- return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
1198
- }
1199
- if (!checker) {
1200
- return new PropTypeError(
1201
- 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +
1202
- '\nBad object: ' + JSON.stringify(props[propName], null, ' ') +
1203
- '\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')
1204
- );
1205
- }
1206
- var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
1207
- if (error) {
1208
- return error;
1209
- }
1210
- }
1211
- return null;
1212
- }
1213
-
1214
- return createChainableTypeChecker(validate);
1215
- }
1216
-
1217
- function isNode(propValue) {
1218
- switch (typeof propValue) {
1219
- case 'number':
1220
- case 'string':
1221
- case 'undefined':
1222
- return true;
1223
- case 'boolean':
1224
- return !propValue;
1225
- case 'object':
1226
- if (Array.isArray(propValue)) {
1227
- return propValue.every(isNode);
1228
- }
1229
- if (propValue === null || isValidElement(propValue)) {
1230
- return true;
1231
- }
1232
-
1233
- var iteratorFn = getIteratorFn(propValue);
1234
- if (iteratorFn) {
1235
- var iterator = iteratorFn.call(propValue);
1236
- var step;
1237
- if (iteratorFn !== propValue.entries) {
1238
- while (!(step = iterator.next()).done) {
1239
- if (!isNode(step.value)) {
1240
- return false;
1241
- }
1242
- }
1243
- } else {
1244
- // Iterator will provide entry [k,v] tuples rather than values.
1245
- while (!(step = iterator.next()).done) {
1246
- var entry = step.value;
1247
- if (entry) {
1248
- if (!isNode(entry[1])) {
1249
- return false;
1250
- }
1251
- }
1252
- }
1253
- }
1254
- } else {
1255
- return false;
1256
- }
1257
-
1258
- return true;
1259
- default:
1260
- return false;
1261
- }
1262
- }
1263
-
1264
- function isSymbol(propType, propValue) {
1265
- // Native Symbol.
1266
- if (propType === 'symbol') {
1267
- return true;
1268
- }
1269
-
1270
- // falsy value can't be a Symbol
1271
- if (!propValue) {
1272
- return false;
1273
- }
1274
-
1275
- // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
1276
- if (propValue['@@toStringTag'] === 'Symbol') {
1277
- return true;
1278
- }
1279
-
1280
- // Fallback for non-spec compliant Symbols which are polyfilled.
1281
- if (typeof Symbol === 'function' && propValue instanceof Symbol) {
1282
- return true;
1283
- }
1284
-
1285
- return false;
1286
- }
1287
-
1288
- // Equivalent of `typeof` but with special handling for array and regexp.
1289
- function getPropType(propValue) {
1290
- var propType = typeof propValue;
1291
- if (Array.isArray(propValue)) {
1292
- return 'array';
1293
- }
1294
- if (propValue instanceof RegExp) {
1295
- // Old webkits (at least until Android 4.0) return 'function' rather than
1296
- // 'object' for typeof a RegExp. We'll normalize this here so that /bla/
1297
- // passes PropTypes.object.
1298
- return 'object';
1299
- }
1300
- if (isSymbol(propType, propValue)) {
1301
- return 'symbol';
1302
- }
1303
- return propType;
1304
- }
1305
-
1306
- // This handles more types than `getPropType`. Only used for error messages.
1307
- // See `createPrimitiveTypeChecker`.
1308
- function getPreciseType(propValue) {
1309
- if (typeof propValue === 'undefined' || propValue === null) {
1310
- return '' + propValue;
1311
- }
1312
- var propType = getPropType(propValue);
1313
- if (propType === 'object') {
1314
- if (propValue instanceof Date) {
1315
- return 'date';
1316
- } else if (propValue instanceof RegExp) {
1317
- return 'regexp';
1318
- }
1319
- }
1320
- return propType;
1321
- }
1322
-
1323
- // Returns a string that is postfixed to a warning about an invalid type.
1324
- // For example, "undefined" or "of type array"
1325
- function getPostfixForTypeWarning(value) {
1326
- var type = getPreciseType(value);
1327
- switch (type) {
1328
- case 'array':
1329
- case 'object':
1330
- return 'an ' + type;
1331
- case 'boolean':
1332
- case 'date':
1333
- case 'regexp':
1334
- return 'a ' + type;
1335
- default:
1336
- return type;
1337
- }
1338
- }
1339
-
1340
- // Returns class name of the object, if any.
1341
- function getClassName(propValue) {
1342
- if (!propValue.constructor || !propValue.constructor.name) {
1343
- return ANONYMOUS;
1344
- }
1345
- return propValue.constructor.name;
1346
- }
1347
-
1348
- ReactPropTypes.checkPropTypes = checkPropTypes;
1349
- ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;
1350
- ReactPropTypes.PropTypes = ReactPropTypes;
1351
-
1352
- return ReactPropTypes;
1353
- };
1354
- return factoryWithTypeCheckers;
1355
- }
1356
-
1357
- /**
1358
- * Copyright (c) 2013-present, Facebook, Inc.
1359
- *
1360
- * This source code is licensed under the MIT license found in the
1361
- * LICENSE file in the root directory of this source tree.
1362
- */
1363
-
1364
- var factoryWithThrowingShims;
1365
- var hasRequiredFactoryWithThrowingShims;
1366
-
1367
- function requireFactoryWithThrowingShims () {
1368
- if (hasRequiredFactoryWithThrowingShims) return factoryWithThrowingShims;
1369
- hasRequiredFactoryWithThrowingShims = 1;
1370
-
1371
- var ReactPropTypesSecret = requireReactPropTypesSecret();
1372
-
1373
- function emptyFunction() {}
1374
- function emptyFunctionWithReset() {}
1375
- emptyFunctionWithReset.resetWarningCache = emptyFunction;
1376
-
1377
- factoryWithThrowingShims = function() {
1378
- function shim(props, propName, componentName, location, propFullName, secret) {
1379
- if (secret === ReactPropTypesSecret) {
1380
- // It is still safe when called from React.
1381
- return;
1382
- }
1383
- var err = new Error(
1384
- 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
1385
- 'Use PropTypes.checkPropTypes() to call them. ' +
1386
- 'Read more at http://fb.me/use-check-prop-types'
1387
- );
1388
- err.name = 'Invariant Violation';
1389
- throw err;
1390
- } shim.isRequired = shim;
1391
- function getShim() {
1392
- return shim;
1393
- } // Important!
1394
- // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
1395
- var ReactPropTypes = {
1396
- array: shim,
1397
- bigint: shim,
1398
- bool: shim,
1399
- func: shim,
1400
- number: shim,
1401
- object: shim,
1402
- string: shim,
1403
- symbol: shim,
1404
-
1405
- any: shim,
1406
- arrayOf: getShim,
1407
- element: shim,
1408
- elementType: shim,
1409
- instanceOf: getShim,
1410
- node: shim,
1411
- objectOf: getShim,
1412
- oneOf: getShim,
1413
- oneOfType: getShim,
1414
- shape: getShim,
1415
- exact: getShim,
1416
-
1417
- checkPropTypes: emptyFunctionWithReset,
1418
- resetWarningCache: emptyFunction
1419
- };
1420
-
1421
- ReactPropTypes.PropTypes = ReactPropTypes;
1422
-
1423
- return ReactPropTypes;
1424
- };
1425
- return factoryWithThrowingShims;
1426
- }
1427
-
1428
- /**
1429
- * Copyright (c) 2013-present, Facebook, Inc.
1430
- *
1431
- * This source code is licensed under the MIT license found in the
1432
- * LICENSE file in the root directory of this source tree.
1433
- */
1434
-
1435
- var hasRequiredPropTypes;
1436
-
1437
- function requirePropTypes () {
1438
- if (hasRequiredPropTypes) return propTypes$1.exports;
1439
- hasRequiredPropTypes = 1;
1440
- if (process.env.NODE_ENV !== 'production') {
1441
- var ReactIs = requireReactIs();
1442
-
1443
- // By explicitly using `prop-types` you are opting into new development behavior.
1444
- // http://fb.me/prop-types-in-prod
1445
- var throwOnDirectAccess = true;
1446
- propTypes$1.exports = requireFactoryWithTypeCheckers()(ReactIs.isElement, throwOnDirectAccess);
1447
- } else {
1448
- // By explicitly using `prop-types` you are opting into new production behavior.
1449
- // http://fb.me/prop-types-in-prod
1450
- propTypes$1.exports = requireFactoryWithThrowingShims()();
1451
- }
1452
- return propTypes$1.exports;
1453
- }
1454
-
1455
- var propTypesExports = requirePropTypes();
1456
-
1457
- var propTypes = {
1458
- /** When to wrap children */
1459
- condition: propTypesExports.bool,
1460
- /** Wrapper element */
1461
- wrapper: propTypesExports.element
1462
- };
1463
- var ConditionalWrapper = function ConditionalWrapper(_ref) {
1464
- var condition = _ref.condition,
1465
- wrapper = _ref.wrapper,
1466
- children = _ref.children;
1467
- return condition ? /*#__PURE__*/cloneElement(wrapper, wrapper.props, children) : children;
1468
- };
1469
- ConditionalWrapper.propTypes = propTypes;
1470
-
1471
- var jsxRuntime = {exports: {}};
1472
-
1473
- var reactJsxRuntime_production = {};
1474
-
1475
- /**
1476
- * @license React
1477
- * react-jsx-runtime.production.js
1478
- *
1479
- * Copyright (c) Meta Platforms, Inc. and affiliates.
1480
- *
1481
- * This source code is licensed under the MIT license found in the
1482
- * LICENSE file in the root directory of this source tree.
1483
- */
1484
-
1485
- var hasRequiredReactJsxRuntime_production;
1486
-
1487
- function requireReactJsxRuntime_production () {
1488
- if (hasRequiredReactJsxRuntime_production) return reactJsxRuntime_production;
1489
- hasRequiredReactJsxRuntime_production = 1;
1490
- var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
1491
- REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
1492
- function jsxProd(type, config, maybeKey) {
1493
- var key = null;
1494
- void 0 !== maybeKey && (key = "" + maybeKey);
1495
- void 0 !== config.key && (key = "" + config.key);
1496
- if ("key" in config) {
1497
- maybeKey = {};
1498
- for (var propName in config)
1499
- "key" !== propName && (maybeKey[propName] = config[propName]);
1500
- } else maybeKey = config;
1501
- config = maybeKey.ref;
1502
- return {
1503
- $$typeof: REACT_ELEMENT_TYPE,
1504
- type: type,
1505
- key: key,
1506
- ref: void 0 !== config ? config : null,
1507
- props: maybeKey
1508
- };
1509
- }
1510
- reactJsxRuntime_production.Fragment = REACT_FRAGMENT_TYPE;
1511
- reactJsxRuntime_production.jsx = jsxProd;
1512
- reactJsxRuntime_production.jsxs = jsxProd;
1513
- return reactJsxRuntime_production;
1514
- }
1515
-
1516
- var reactJsxRuntime_development = {};
1517
-
6
+ */var v,b=y((m||(m=1,v=p,function(){var e={}.hasOwnProperty;function t(){for(var e="",t=0;t<arguments.length;t++){var o=arguments[t];o&&(e=r(e,n(o)))}return e}function n(n){if("string"==typeof n||"number"==typeof n)return n;if("object"!=typeof n)return"";if(Array.isArray(n))return t.apply(null,n);if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]"))return n.toString();var o="";for(var i in n)e.call(n,i)&&n[i]&&(o=r(o,i));return o}function r(e,t){return t?e?e+" "+t:e+t:e}v.exports?(t.default=t,v.exports=t):window.classNames=t}()),p.exports)),g=function(e){var t=e.condition,n=e.wrapper,r=e.children;return t?o(n,void 0,r):r};g.displayName="ConditionalWrapper";var w,S={exports:{}},k={};var N,j,O={};
1518
7
  /**
1519
8
  * @license React
1520
9
  * react-jsx-runtime.development.js
@@ -1523,1648 +12,9 @@ var reactJsxRuntime_development = {};
1523
12
  *
1524
13
  * This source code is licensed under the MIT license found in the
1525
14
  * LICENSE file in the root directory of this source tree.
1526
- */
1527
-
1528
- var hasRequiredReactJsxRuntime_development;
1529
-
1530
- function requireReactJsxRuntime_development () {
1531
- if (hasRequiredReactJsxRuntime_development) return reactJsxRuntime_development;
1532
- hasRequiredReactJsxRuntime_development = 1;
1533
- "production" !== process.env.NODE_ENV &&
1534
- (function () {
1535
- function getComponentNameFromType(type) {
1536
- if (null == type) return null;
1537
- if ("function" === typeof type)
1538
- return type.$$typeof === REACT_CLIENT_REFERENCE
1539
- ? null
1540
- : type.displayName || type.name || null;
1541
- if ("string" === typeof type) return type;
1542
- switch (type) {
1543
- case REACT_FRAGMENT_TYPE:
1544
- return "Fragment";
1545
- case REACT_PROFILER_TYPE:
1546
- return "Profiler";
1547
- case REACT_STRICT_MODE_TYPE:
1548
- return "StrictMode";
1549
- case REACT_SUSPENSE_TYPE:
1550
- return "Suspense";
1551
- case REACT_SUSPENSE_LIST_TYPE:
1552
- return "SuspenseList";
1553
- case REACT_ACTIVITY_TYPE:
1554
- return "Activity";
1555
- }
1556
- if ("object" === typeof type)
1557
- switch (
1558
- ("number" === typeof type.tag &&
1559
- console.error(
1560
- "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
1561
- ),
1562
- type.$$typeof)
1563
- ) {
1564
- case REACT_PORTAL_TYPE:
1565
- return "Portal";
1566
- case REACT_CONTEXT_TYPE:
1567
- return (type.displayName || "Context") + ".Provider";
1568
- case REACT_CONSUMER_TYPE:
1569
- return (type._context.displayName || "Context") + ".Consumer";
1570
- case REACT_FORWARD_REF_TYPE:
1571
- var innerType = type.render;
1572
- type = type.displayName;
1573
- type ||
1574
- ((type = innerType.displayName || innerType.name || ""),
1575
- (type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef"));
1576
- return type;
1577
- case REACT_MEMO_TYPE:
1578
- return (
1579
- (innerType = type.displayName || null),
1580
- null !== innerType
1581
- ? innerType
1582
- : getComponentNameFromType(type.type) || "Memo"
1583
- );
1584
- case REACT_LAZY_TYPE:
1585
- innerType = type._payload;
1586
- type = type._init;
1587
- try {
1588
- return getComponentNameFromType(type(innerType));
1589
- } catch (x) {}
1590
- }
1591
- return null;
1592
- }
1593
- function testStringCoercion(value) {
1594
- return "" + value;
1595
- }
1596
- function checkKeyStringCoercion(value) {
1597
- try {
1598
- testStringCoercion(value);
1599
- var JSCompiler_inline_result = !1;
1600
- } catch (e) {
1601
- JSCompiler_inline_result = true;
1602
- }
1603
- if (JSCompiler_inline_result) {
1604
- JSCompiler_inline_result = console;
1605
- var JSCompiler_temp_const = JSCompiler_inline_result.error;
1606
- var JSCompiler_inline_result$jscomp$0 =
1607
- ("function" === typeof Symbol &&
1608
- Symbol.toStringTag &&
1609
- value[Symbol.toStringTag]) ||
1610
- value.constructor.name ||
1611
- "Object";
1612
- JSCompiler_temp_const.call(
1613
- JSCompiler_inline_result,
1614
- "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
1615
- JSCompiler_inline_result$jscomp$0
1616
- );
1617
- return testStringCoercion(value);
1618
- }
1619
- }
1620
- function getTaskName(type) {
1621
- if (type === REACT_FRAGMENT_TYPE) return "<>";
1622
- if (
1623
- "object" === typeof type &&
1624
- null !== type &&
1625
- type.$$typeof === REACT_LAZY_TYPE
1626
- )
1627
- return "<...>";
1628
- try {
1629
- var name = getComponentNameFromType(type);
1630
- return name ? "<" + name + ">" : "<...>";
1631
- } catch (x) {
1632
- return "<...>";
1633
- }
1634
- }
1635
- function getOwner() {
1636
- var dispatcher = ReactSharedInternals.A;
1637
- return null === dispatcher ? null : dispatcher.getOwner();
1638
- }
1639
- function UnknownOwner() {
1640
- return Error("react-stack-top-frame");
1641
- }
1642
- function hasValidKey(config) {
1643
- if (hasOwnProperty.call(config, "key")) {
1644
- var getter = Object.getOwnPropertyDescriptor(config, "key").get;
1645
- if (getter && getter.isReactWarning) return false;
1646
- }
1647
- return void 0 !== config.key;
1648
- }
1649
- function defineKeyPropWarningGetter(props, displayName) {
1650
- function warnAboutAccessingKey() {
1651
- specialPropKeyWarningShown ||
1652
- ((specialPropKeyWarningShown = true),
1653
- console.error(
1654
- "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
1655
- displayName
1656
- ));
1657
- }
1658
- warnAboutAccessingKey.isReactWarning = true;
1659
- Object.defineProperty(props, "key", {
1660
- get: warnAboutAccessingKey,
1661
- configurable: true
1662
- });
1663
- }
1664
- function elementRefGetterWithDeprecationWarning() {
1665
- var componentName = getComponentNameFromType(this.type);
1666
- didWarnAboutElementRef[componentName] ||
1667
- ((didWarnAboutElementRef[componentName] = true),
1668
- console.error(
1669
- "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
1670
- ));
1671
- componentName = this.props.ref;
1672
- return void 0 !== componentName ? componentName : null;
1673
- }
1674
- function ReactElement(
1675
- type,
1676
- key,
1677
- self,
1678
- source,
1679
- owner,
1680
- props,
1681
- debugStack,
1682
- debugTask
1683
- ) {
1684
- self = props.ref;
1685
- type = {
1686
- $$typeof: REACT_ELEMENT_TYPE,
1687
- type: type,
1688
- key: key,
1689
- props: props,
1690
- _owner: owner
1691
- };
1692
- null !== (void 0 !== self ? self : null)
1693
- ? Object.defineProperty(type, "ref", {
1694
- enumerable: false,
1695
- get: elementRefGetterWithDeprecationWarning
1696
- })
1697
- : Object.defineProperty(type, "ref", { enumerable: false, value: null });
1698
- type._store = {};
1699
- Object.defineProperty(type._store, "validated", {
1700
- configurable: false,
1701
- enumerable: false,
1702
- writable: true,
1703
- value: 0
1704
- });
1705
- Object.defineProperty(type, "_debugInfo", {
1706
- configurable: false,
1707
- enumerable: false,
1708
- writable: true,
1709
- value: null
1710
- });
1711
- Object.defineProperty(type, "_debugStack", {
1712
- configurable: false,
1713
- enumerable: false,
1714
- writable: true,
1715
- value: debugStack
1716
- });
1717
- Object.defineProperty(type, "_debugTask", {
1718
- configurable: false,
1719
- enumerable: false,
1720
- writable: true,
1721
- value: debugTask
1722
- });
1723
- Object.freeze && (Object.freeze(type.props), Object.freeze(type));
1724
- return type;
1725
- }
1726
- function jsxDEVImpl(
1727
- type,
1728
- config,
1729
- maybeKey,
1730
- isStaticChildren,
1731
- source,
1732
- self,
1733
- debugStack,
1734
- debugTask
1735
- ) {
1736
- var children = config.children;
1737
- if (void 0 !== children)
1738
- if (isStaticChildren)
1739
- if (isArrayImpl(children)) {
1740
- for (
1741
- isStaticChildren = 0;
1742
- isStaticChildren < children.length;
1743
- isStaticChildren++
1744
- )
1745
- validateChildKeys(children[isStaticChildren]);
1746
- Object.freeze && Object.freeze(children);
1747
- } else
1748
- console.error(
1749
- "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
1750
- );
1751
- else validateChildKeys(children);
1752
- if (hasOwnProperty.call(config, "key")) {
1753
- children = getComponentNameFromType(type);
1754
- var keys = Object.keys(config).filter(function (k) {
1755
- return "key" !== k;
1756
- });
1757
- isStaticChildren =
1758
- 0 < keys.length
1759
- ? "{key: someKey, " + keys.join(": ..., ") + ": ...}"
1760
- : "{key: someKey}";
1761
- didWarnAboutKeySpread[children + isStaticChildren] ||
1762
- ((keys =
1763
- 0 < keys.length ? "{" + keys.join(": ..., ") + ": ...}" : "{}"),
1764
- console.error(
1765
- 'A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',
1766
- isStaticChildren,
1767
- children,
1768
- keys,
1769
- children
1770
- ),
1771
- (didWarnAboutKeySpread[children + isStaticChildren] = true));
1772
- }
1773
- children = null;
1774
- void 0 !== maybeKey &&
1775
- (checkKeyStringCoercion(maybeKey), (children = "" + maybeKey));
1776
- hasValidKey(config) &&
1777
- (checkKeyStringCoercion(config.key), (children = "" + config.key));
1778
- if ("key" in config) {
1779
- maybeKey = {};
1780
- for (var propName in config)
1781
- "key" !== propName && (maybeKey[propName] = config[propName]);
1782
- } else maybeKey = config;
1783
- children &&
1784
- defineKeyPropWarningGetter(
1785
- maybeKey,
1786
- "function" === typeof type
1787
- ? type.displayName || type.name || "Unknown"
1788
- : type
1789
- );
1790
- return ReactElement(
1791
- type,
1792
- children,
1793
- self,
1794
- source,
1795
- getOwner(),
1796
- maybeKey,
1797
- debugStack,
1798
- debugTask
1799
- );
1800
- }
1801
- function validateChildKeys(node) {
1802
- "object" === typeof node &&
1803
- null !== node &&
1804
- node.$$typeof === REACT_ELEMENT_TYPE &&
1805
- node._store &&
1806
- (node._store.validated = 1);
1807
- }
1808
- var React$1 = React,
1809
- REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
1810
- REACT_PORTAL_TYPE = Symbol.for("react.portal"),
1811
- REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
1812
- REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
1813
- REACT_PROFILER_TYPE = Symbol.for("react.profiler");
1814
- var REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
1815
- REACT_CONTEXT_TYPE = Symbol.for("react.context"),
1816
- REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
1817
- REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
1818
- REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"),
1819
- REACT_MEMO_TYPE = Symbol.for("react.memo"),
1820
- REACT_LAZY_TYPE = Symbol.for("react.lazy"),
1821
- REACT_ACTIVITY_TYPE = Symbol.for("react.activity"),
1822
- REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"),
1823
- ReactSharedInternals =
1824
- React$1.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,
1825
- hasOwnProperty = Object.prototype.hasOwnProperty,
1826
- isArrayImpl = Array.isArray,
1827
- createTask = console.createTask
1828
- ? console.createTask
1829
- : function () {
1830
- return null;
1831
- };
1832
- React$1 = {
1833
- "react-stack-bottom-frame": function (callStackForError) {
1834
- return callStackForError();
1835
- }
1836
- };
1837
- var specialPropKeyWarningShown;
1838
- var didWarnAboutElementRef = {};
1839
- var unknownOwnerDebugStack = React$1["react-stack-bottom-frame"].bind(
1840
- React$1,
1841
- UnknownOwner
1842
- )();
1843
- var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
1844
- var didWarnAboutKeySpread = {};
1845
- reactJsxRuntime_development.Fragment = REACT_FRAGMENT_TYPE;
1846
- reactJsxRuntime_development.jsx = function (type, config, maybeKey, source, self) {
1847
- var trackActualOwner =
1848
- 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
1849
- return jsxDEVImpl(
1850
- type,
1851
- config,
1852
- maybeKey,
1853
- false,
1854
- source,
1855
- self,
1856
- trackActualOwner
1857
- ? Error("react-stack-top-frame")
1858
- : unknownOwnerDebugStack,
1859
- trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
1860
- );
1861
- };
1862
- reactJsxRuntime_development.jsxs = function (type, config, maybeKey, source, self) {
1863
- var trackActualOwner =
1864
- 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
1865
- return jsxDEVImpl(
1866
- type,
1867
- config,
1868
- maybeKey,
1869
- true,
1870
- source,
1871
- self,
1872
- trackActualOwner
1873
- ? Error("react-stack-top-frame")
1874
- : unknownOwnerDebugStack,
1875
- trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
1876
- );
1877
- };
1878
- })();
1879
- return reactJsxRuntime_development;
1880
- }
1881
-
1882
- var hasRequiredJsxRuntime;
1883
-
1884
- function requireJsxRuntime () {
1885
- if (hasRequiredJsxRuntime) return jsxRuntime.exports;
1886
- hasRequiredJsxRuntime = 1;
1887
-
1888
- if (process.env.NODE_ENV === 'production') {
1889
- jsxRuntime.exports = requireReactJsxRuntime_production();
1890
- } else {
1891
- jsxRuntime.exports = requireReactJsxRuntime_development();
1892
- }
1893
- return jsxRuntime.exports;
1894
- }
1895
-
1896
- var jsxRuntimeExports = requireJsxRuntime();
1897
-
1898
- var CLASS_ROOT$4 = "btn";
1899
- var Button = /*#__PURE__*/React.forwardRef(function (props, ref) {
1900
- var className = props.className,
1901
- children = props.children,
1902
- _props$htmlType = props.htmlType,
1903
- htmlType = _props$htmlType === void 0 ? "button" : _props$htmlType,
1904
- href = props.href,
1905
- isActive = props.isActive,
1906
- isDefault = props.isDefault,
1907
- isDisabled = props.isDisabled,
1908
- isInverse = props.isInverse,
1909
- size = props.size,
1910
- isSquare = props.isSquare,
1911
- type = props.type,
1912
- elemRef = props.elemRef,
1913
- other = __rest(props, ["className", "children", "htmlType", "href", "isActive", "isDefault", "isDisabled", "isInverse", "size", "isSquare", "type", "elemRef"]);
1914
- var classes = cx(CLASS_ROOT$4, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(CLASS_ROOT$4, "--square"), isSquare), "".concat(CLASS_ROOT$4, "--").concat(size), size), "".concat(CLASS_ROOT$4, "--").concat(type), type), "".concat(CLASS_ROOT$4, "--default"), isDefault), "".concat(CLASS_ROOT$4, "--inverse"), isInverse), "is-active", isActive), className);
1915
- if (href) {
1916
- // Anchor element
1917
- var anchorProps = other;
1918
- return /*#__PURE__*/jsxRuntimeExports.jsx("a", _objectSpread2(_objectSpread2({
1919
- href: href,
1920
- className: classes,
1921
- "aria-disabled": isDisabled ? "true" : undefined,
1922
- ref: elemRef || ref
1923
- }, anchorProps), {}, {
1924
- children: children
1925
- }));
1926
- } else {
1927
- // Button element
1928
- var buttonProps = other;
1929
- return /*#__PURE__*/jsxRuntimeExports.jsx("button", _objectSpread2(_objectSpread2({
1930
- type: htmlType,
1931
- className: classes,
1932
- disabled: isDisabled ? true : undefined,
1933
- "aria-disabled": isDisabled ? "true" : undefined,
1934
- ref: elemRef || ref
1935
- }, buttonProps), {}, {
1936
- children: children
1937
- }));
1938
- }
1939
- });
1940
- Button.displayName = "Button";
1941
-
1942
- var SpritePathContext = /*#__PURE__*/React.createContext("/sprite.svg");
1943
-
1944
- var CLASS_ROOT$3 = "icon";
1945
- var Icon = function Icon(_a) {
1946
- var className = _a.className,
1947
- alt = _a.alt,
1948
- color = _a.color,
1949
- name = _a.name,
1950
- size = _a.size,
1951
- _a$spritePath = _a.spritePath,
1952
- spritePath = _a$spritePath === void 0 ? "/sprite.svg" : _a$spritePath,
1953
- other = __rest(_a, ["className", "alt", "color", "name", "size", "spritePath"]);
1954
- var contextPath = useContext(SpritePathContext);
1955
- var classes = cx(CLASS_ROOT$3, _defineProperty(_defineProperty({}, "".concat(CLASS_ROOT$3, "--").concat(size), size), "".concat(CLASS_ROOT$3, "--").concat(color), color), className);
1956
- return /*#__PURE__*/jsxRuntimeExports.jsxs("svg", _objectSpread2(_objectSpread2({
1957
- className: classes,
1958
- "aria-hidden": alt !== undefined ? undefined : "true",
1959
- role: alt !== undefined ? "img" : undefined
1960
- }, other), {}, {
1961
- children: [alt !== undefined && alt.length > 0 && /*#__PURE__*/jsxRuntimeExports.jsx("title", {
1962
- children: alt
1963
- }), /*#__PURE__*/jsxRuntimeExports.jsx("use", {
1964
- xlinkHref: spritePath !== "/sprite.svg" || typeof contextPath === "undefined" ? "".concat(spritePath, "#").concat(name) : "".concat(contextPath, "#").concat(name)
1965
- })]
1966
- }));
1967
- };
1968
- Icon.displayName = "Icon";
1969
-
1970
- var IconButton = /*#__PURE__*/React.forwardRef(function (_a, ref) {
1971
- var iconName = _a.iconName,
1972
- _a$iconPosition = _a.iconPosition,
1973
- iconPosition = _a$iconPosition === void 0 ? "left" : _a$iconPosition,
1974
- iconClassName = _a.iconClassName,
1975
- children = _a.children,
1976
- size = _a.size,
1977
- isSquare = _a.isSquare,
1978
- other = __rest(_a, ["iconName", "iconPosition", "iconClassName", "children", "size", "isSquare"]);
1979
- var IconComponent = function IconComponent(_a) {
1980
- var className = _a.className,
1981
- props = __rest(_a, ["className"]);
1982
- return /*#__PURE__*/jsxRuntimeExports.jsx(Icon, _objectSpread2({
1983
- name: iconName,
1984
- size: size !== null && size !== void 0 ? size : "medium",
1985
- className: cx(iconClassName, className)
1986
- }, props));
1987
- };
1988
- if (isSquare) {
1989
- return /*#__PURE__*/jsxRuntimeExports.jsxs(Button, _objectSpread2(_objectSpread2({
1990
- size: size,
1991
- isSquare: true
1992
- }, other), {}, {
1993
- ref: ref,
1994
- children: [/*#__PURE__*/jsxRuntimeExports.jsx(IconComponent, {}), /*#__PURE__*/jsxRuntimeExports.jsx("span", {
1995
- className: "visually-hidden",
1996
- children: children
1997
- })]
1998
- }));
1999
- }
2000
- return /*#__PURE__*/jsxRuntimeExports.jsxs(Button, _objectSpread2(_objectSpread2({
2001
- ref: ref,
2002
- size: size
2003
- }, other), {}, {
2004
- children: [iconPosition === "left" && /*#__PURE__*/jsxRuntimeExports.jsx(IconComponent, {
2005
- className: "btn__icon-left"
2006
- }), children, iconPosition === "right" && /*#__PURE__*/jsxRuntimeExports.jsx(IconComponent, {
2007
- className: "btn__icon-right"
2008
- })]
2009
- }));
2010
- });
2011
- IconButton.displayName = "IconButton";
2012
-
2013
- var CLASS_ROOT$2 = "buttons";
2014
- var Buttons = function Buttons(_a) {
2015
- var isStackedOnXs = _a.isStackedOnXs,
2016
- children = _a.children,
2017
- className = _a.className,
2018
- other = __rest(_a, ["isStackedOnXs", "children", "className"]);
2019
- return /*#__PURE__*/jsxRuntimeExports.jsx("div", _objectSpread2(_objectSpread2({
2020
- className: cx(CLASS_ROOT$2, _defineProperty({}, "".concat(CLASS_ROOT$2, "--stack-on-xs"), isStackedOnXs), className)
2021
- }, other), {}, {
2022
- children: children
2023
- }));
2024
- };
2025
- Buttons.displayName = "Buttons";
2026
-
2027
- const not = {
2028
- inert: ':not([inert]):not([inert] *)',
2029
- negTabIndex: ':not([tabindex^="-"])',
2030
- disabled: ':not(:disabled)',
2031
- };
2032
-
2033
- var focusableSelectors = [
2034
- `a[href]${not.inert}${not.negTabIndex}`,
2035
- `area[href]${not.inert}${not.negTabIndex}`,
2036
- `input:not([type="hidden"]):not([type="radio"])${not.inert}${not.negTabIndex}${not.disabled}`,
2037
- `input[type="radio"]${not.inert}${not.negTabIndex}${not.disabled}`,
2038
- `select${not.inert}${not.negTabIndex}${not.disabled}`,
2039
- `textarea${not.inert}${not.negTabIndex}${not.disabled}`,
2040
- `button${not.inert}${not.negTabIndex}${not.disabled}`,
2041
- `details${not.inert} > summary:first-of-type${not.negTabIndex}`,
2042
- // Discard until Firefox supports `:has()`
2043
- // See: https://github.com/KittyGiraudel/focusable-selectors/issues/12
2044
- // `details:not(:has(> summary))${not.inert}${not.negTabIndex}`,
2045
- `iframe${not.inert}${not.negTabIndex}`,
2046
- `audio[controls]${not.inert}${not.negTabIndex}`,
2047
- `video[controls]${not.inert}${not.negTabIndex}`,
2048
- `[contenteditable]${not.inert}${not.negTabIndex}`,
2049
- `[tabindex]${not.inert}${not.negTabIndex}`,
2050
- ];
2051
-
2052
- /**
2053
- * Set the focus to the first element with `autofocus` with the element or the
2054
- * element itself.
2055
- */
2056
- function focus(el) {
2057
- (el.querySelector('[autofocus]') || el).focus();
2058
- }
2059
- /**
2060
- * Get the first and last focusable elements within a given element.
2061
- */
2062
- function getFocusableEdges(el) {
2063
- // Check for a focusable element within the subtree of the given element.
2064
- const firstEl = findFocusableEl(el, true);
2065
- // Only if we find the first element do we need to look for the last one. If
2066
- // there’s no last element, we set `lastEl` as a reference to `firstEl` so
2067
- // that the returned array is still always of length 2.
2068
- const lastEl = firstEl ? findFocusableEl(el, false) || firstEl : null;
2069
- return [firstEl, lastEl];
2070
- }
2071
- /**
2072
- * Find the first focusable element inside the given element if `forward` is
2073
- * truthy or the last focusable element otherwise.
2074
- */
2075
- function findFocusableEl(el, forward) {
2076
- // If we’re walking forward, check if this element is focusable, and return it
2077
- // immediately if it is.
2078
- if (forward && isFocusable(el))
2079
- return el;
2080
- // We should only search the subtree of this element if it can have focusable
2081
- // children.
2082
- if (canHaveFocusableChildren(el)) {
2083
- // Start walking the DOM tree, looking for focusable elements.
2084
- // Case 1: If this element has a shadow root, search it recursively.
2085
- if (el.shadowRoot) {
2086
- // Descend into this subtree.
2087
- let next = getNextChildEl(el.shadowRoot, forward);
2088
- // Traverse the siblings, searching the subtree of each one for focusable
2089
- // elements.
2090
- while (next) {
2091
- const focusableEl = findFocusableEl(next, forward);
2092
- if (focusableEl)
2093
- return focusableEl;
2094
- next = getNextSiblingEl(next, forward);
2095
- }
2096
- }
2097
- // Case 2: If this element is a slot for a Custom Element, search its
2098
- // assigned elements recursively.
2099
- else if (el.localName === 'slot') {
2100
- const assignedElements = el.assignedElements({
2101
- flatten: true,
2102
- });
2103
- if (!forward)
2104
- assignedElements.reverse();
2105
- for (const assignedElement of assignedElements) {
2106
- const focusableEl = findFocusableEl(assignedElement, forward);
2107
- if (focusableEl)
2108
- return focusableEl;
2109
- }
2110
- }
2111
- // Case 3: this is a regular Light DOM element. Search its subtree.
2112
- else {
2113
- // Descend into this subtree.
2114
- let next = getNextChildEl(el, forward);
2115
- // Traverse siblings, searching the subtree of each one
2116
- // for focusable elements.
2117
- while (next) {
2118
- const focusableEl = findFocusableEl(next, forward);
2119
- if (focusableEl)
2120
- return focusableEl;
2121
- next = getNextSiblingEl(next, forward);
2122
- }
2123
- }
2124
- }
2125
- // If we’re walking backward, we want to check the element’s entire subtree
2126
- // before checking the element itself. If this element is focusable, return
2127
- // it.
2128
- if (!forward && isFocusable(el))
2129
- return el;
2130
- return null;
2131
- }
2132
- function getNextChildEl(el, forward) {
2133
- return forward ? el.firstElementChild : el.lastElementChild;
2134
- }
2135
- function getNextSiblingEl(el, forward) {
2136
- return forward ? el.nextElementSibling : el.previousElementSibling;
2137
- }
2138
- /**
2139
- * Determine if an element is hidden from the user.
2140
- */
2141
- const isHidden$1 = (el) => {
2142
- // Browsers hide all non-<summary> descendants of closed <details> elements
2143
- // from user interaction, but those non-<summary> elements may still match our
2144
- // focusable-selectors and may still have dimensions, so we need a special
2145
- // case to ignore them.
2146
- if (el.matches('details:not([open]) *') &&
2147
- !el.matches('details>summary:first-of-type'))
2148
- return true;
2149
- // If this element has no painted dimensions, it's hidden.
2150
- return !(el.offsetWidth || el.offsetHeight || el.getClientRects().length);
2151
- };
2152
- /**
2153
- * Determine if an element is focusable and has user-visible painted dimensions.
2154
- */
2155
- const isFocusable = (el) => {
2156
- // A shadow host that delegates focus will never directly receive focus,
2157
- // even with `tabindex=0`. Consider our <fancy-button> custom element, which
2158
- // delegates focus to its shadow button:
2159
- //
2160
- // <fancy-button tabindex="0">
2161
- // #shadow-root
2162
- // <button><slot></slot></button>
2163
- // </fancy-button>
2164
- //
2165
- // The browser acts as as if there is only one focusable element – the shadow
2166
- // button. Our library should behave the same way.
2167
- if (el.shadowRoot?.delegatesFocus)
2168
- return false;
2169
- return el.matches(focusableSelectors.join(',')) && !isHidden$1(el);
2170
- };
2171
- /**
2172
- * Determine if an element can have focusable children. Useful for bailing out
2173
- * early when walking the DOM tree.
2174
- * @example
2175
- * This div is inert, so none of its children can be focused, even though they
2176
- * meet our criteria for what is focusable. Once we check the div, we can skip
2177
- * the rest of the subtree.
2178
- * ```html
2179
- * <div inert>
2180
- * <button>Button</button>
2181
- * <a href="#">Link</a>
2182
- * </div>
2183
- * ```
2184
- */
2185
- function canHaveFocusableChildren(el) {
2186
- // The browser will never send focus into a Shadow DOM if the host element
2187
- // has a negative tabindex. This applies to both slotted Light DOM Shadow DOM
2188
- // children
2189
- if (el.shadowRoot && el.getAttribute('tabindex') === '-1')
2190
- return false;
2191
- // Elemments matching this selector are either hidden entirely from the user,
2192
- // or are visible but unavailable for interaction. Their descentants can never
2193
- // receive focus.
2194
- return !el.matches(':disabled,[hidden],[inert]');
2195
- }
2196
- /**
2197
- * Get the active element, accounting for Shadow DOM subtrees.
2198
- * @author Cory LaViska
2199
- * @see: https://www.abeautifulsite.net/posts/finding-the-active-element-in-a-shadow-root/
2200
- */
2201
- function getActiveEl(root = document) {
2202
- const activeEl = root.activeElement;
2203
- if (!activeEl)
2204
- return null;
2205
- // If there’s a shadow root, recursively find the active element within it.
2206
- // If the recursive call returns null, return the active element
2207
- // of the top-level Document.
2208
- if (activeEl.shadowRoot)
2209
- return getActiveEl(activeEl.shadowRoot) || document.activeElement;
2210
- // If not, we can just return the active element
2211
- return activeEl;
2212
- }
2213
- /**
2214
- * Trap the focus inside the given element
2215
- */
2216
- function trapTabKey(el, event) {
2217
- const [firstFocusableEl, lastFocusableEl] = getFocusableEdges(el);
2218
- // If there are no focusable children in the dialog, prevent the user from
2219
- // tabbing out of it
2220
- if (!firstFocusableEl)
2221
- return event.preventDefault();
2222
- const activeEl = getActiveEl();
2223
- // If the SHIFT key is pressed while tabbing (moving backwards) and the
2224
- // currently focused item is the first one, move the focus to the last
2225
- // focusable item from the dialog element
2226
- if (event.shiftKey && activeEl === firstFocusableEl) {
2227
- // @ts-ignore: we know that `lastFocusableEl` is not null here
2228
- lastFocusableEl.focus();
2229
- event.preventDefault();
2230
- }
2231
- // If the SHIFT key is not pressed (moving forwards) and the currently focused
2232
- // item is the last one, move the focus to the first focusable item from the
2233
- // dialog element
2234
- else if (!event.shiftKey && activeEl === lastFocusableEl) {
2235
- firstFocusableEl.focus();
2236
- event.preventDefault();
2237
- }
2238
- }
2239
- /**
2240
- * Find the closest element to the given element matching the given selector,
2241
- * accounting for Shadow DOM subtrees.
2242
- * @author Louis St-Amour
2243
- * @see: https://stackoverflow.com/a/56105394
2244
- */
2245
- function closest(selector, base) {
2246
- function from(el) {
2247
- if (!el || el === document || el === window)
2248
- return null;
2249
- // Reading the `assignedSlot` property from the element (as suggested by the
2250
- // aforementioned StackOverflow answer) is not enough, because it does not
2251
- // take into consideration elements nested deeply within a <slot>. For these
2252
- // elements, the `assignedSlot` property is `null` as it is only specified
2253
- // for top-level elements within a <slot>. To still find the closest <slot>,
2254
- // we walk up the tree looking for the `assignedSlot` property.
2255
- const slot = findAssignedSlot(el);
2256
- if (slot)
2257
- el = slot;
2258
- return (el.closest(selector) ||
2259
- from(el.getRootNode().host));
2260
- }
2261
- return from(base);
2262
- }
2263
- function findAssignedSlot(node) {
2264
- return (node.assignedSlot ||
2265
- (node.parentNode ? findAssignedSlot(node.parentNode) : null));
2266
- }
2267
-
2268
- const SCOPE = 'data-a11y-dialog';
2269
- class A11yDialog {
2270
- $el;
2271
- id;
2272
- previouslyFocused;
2273
- shown;
2274
- constructor(element) {
2275
- this.$el = element;
2276
- this.id = this.$el.getAttribute(SCOPE) || this.$el.id;
2277
- this.previouslyFocused = null;
2278
- this.shown = false;
2279
- this.maintainFocus = this.maintainFocus.bind(this);
2280
- this.bindKeypress = this.bindKeypress.bind(this);
2281
- this.handleTriggerClicks = this.handleTriggerClicks.bind(this);
2282
- this.show = this.show.bind(this);
2283
- this.hide = this.hide.bind(this);
2284
- this.$el.setAttribute('aria-hidden', 'true');
2285
- this.$el.setAttribute('aria-modal', 'true');
2286
- this.$el.setAttribute('tabindex', '-1');
2287
- if (!this.$el.hasAttribute('role')) {
2288
- this.$el.setAttribute('role', 'dialog');
2289
- }
2290
- document.addEventListener('click', this.handleTriggerClicks, true);
2291
- }
2292
- /**
2293
- * Destroy the current instance (after making sure the dialog has been hidden)
2294
- * and remove all associated listeners from dialog openers and closers
2295
- */
2296
- destroy() {
2297
- // Dispatch a `destroy` event
2298
- const destroyEvent = this.fire('destroy');
2299
- // If the event was prevented, do not continue with the normal behavior
2300
- if (destroyEvent.defaultPrevented)
2301
- return this;
2302
- // Hide the dialog to avoid destroying an open instance
2303
- this.hide();
2304
- // Remove the click event delegates for our openers and closers
2305
- document.removeEventListener('click', this.handleTriggerClicks, true);
2306
- // Clone and replace the dialog element to prevent memory leaks caused by
2307
- // event listeners that the author might not have cleaned up.
2308
- this.$el.replaceWith(this.$el.cloneNode(true));
2309
- return this;
2310
- }
2311
- /**
2312
- * Show the dialog element, trap the current focus within it, listen for some
2313
- * specific key presses and fire all registered callbacks for `show` event
2314
- */
2315
- show(event) {
2316
- // If the dialog is already open, abort
2317
- if (this.shown)
2318
- return this;
2319
- // Dispatch a `show` event
2320
- const showEvent = this.fire('show', event);
2321
- // If the event was prevented, do not continue with the normal behavior
2322
- if (showEvent.defaultPrevented)
2323
- return this;
2324
- // Keep a reference to the currently focused element to be able to restore
2325
- // it later
2326
- this.shown = true;
2327
- this.$el.removeAttribute('aria-hidden');
2328
- this.previouslyFocused = getActiveEl();
2329
- // Due to a long lasting bug in Safari, clicking an interactive element
2330
- // (like a <button>) does *not* move the focus to that element, which means
2331
- // `document.activeElement` is whatever element is currently focused (like
2332
- // an <input>), or the <body> element otherwise. We can work around that
2333
- // problem by checking whether the focused element is the <body>, and if it,
2334
- // store the click event target.
2335
- // See: https://bugs.webkit.org/show_bug.cgi?id=22261
2336
- if (this.previouslyFocused?.tagName === 'BODY' && event?.target) {
2337
- this.previouslyFocused = event.target;
2338
- }
2339
- // Set the focus to the dialog element
2340
- // See: https://github.com/KittyGiraudel/a11y-dialog/pull/583
2341
- if (event?.type === 'focus') {
2342
- this.maintainFocus();
2343
- }
2344
- else {
2345
- focus(this.$el);
2346
- }
2347
- // Bind a focus event listener to the body element to make sure the focus
2348
- // stays trapped inside the dialog while open, and start listening for some
2349
- // specific key presses (TAB and ESC)
2350
- document.body.addEventListener('focus', this.maintainFocus, true);
2351
- this.$el.addEventListener('keydown', this.bindKeypress, true);
2352
- return this;
2353
- }
2354
- /**
2355
- * Hide the dialog element, restore the focus to the previously active
2356
- * element, stop listening for some specific key presses and fire all
2357
- * registered callbacks for `hide` event
2358
- */
2359
- hide(event) {
2360
- // If the dialog is already closed, abort
2361
- if (!this.shown)
2362
- return this;
2363
- // Dispatch a `hide` event
2364
- const hideEvent = this.fire('hide', event);
2365
- // If the event was prevented, do not continue with the normal behavior
2366
- if (hideEvent.defaultPrevented)
2367
- return this;
2368
- this.shown = false;
2369
- this.$el.setAttribute('aria-hidden', 'true');
2370
- // Remove the focus event listener to the body element and stop listening
2371
- // for specific key presses
2372
- document.body.removeEventListener('focus', this.maintainFocus, true);
2373
- this.$el.removeEventListener('keydown', this.bindKeypress, true);
2374
- // Ensure the previously focused element (if any) has a `focus` method
2375
- // before attempting to call it to account for SVG elements
2376
- // See: https://github.com/KittyGiraudel/a11y-dialog/issues/108
2377
- this.previouslyFocused?.focus?.();
2378
- return this;
2379
- }
2380
- /**
2381
- * Register a new callback for the given event type
2382
- */
2383
- on(type, handler, options) {
2384
- this.$el.addEventListener(type, handler, options);
2385
- return this;
2386
- }
2387
- /**
2388
- * Unregister an existing callback for the given event type
2389
- */
2390
- off(type, handler, options) {
2391
- this.$el.removeEventListener(type, handler, options);
2392
- return this;
2393
- }
2394
- /**
2395
- * Dispatch and return a custom event from the DOM element associated with
2396
- * this dialog; this allows authors to listen for and respond to the events
2397
- * in their own code
2398
- */
2399
- fire(type, event) {
2400
- const customEvent = new CustomEvent(type, {
2401
- detail: event,
2402
- cancelable: true,
2403
- });
2404
- this.$el.dispatchEvent(customEvent);
2405
- return customEvent;
2406
- }
2407
- /**
2408
- * Add a delegated event listener for when elememts that open or close the
2409
- * dialog are clicked, and call `show` or `hide`, respectively
2410
- */
2411
- handleTriggerClicks(event) {
2412
- // We need to retrieve the click target while accounting for Shadow DOM.
2413
- // When within a web component, `event.target` is the shadow root (e.g.
2414
- // `<my-dialog>`), so we need to use `event.composedPath()` to get the click
2415
- // target
2416
- // See: https://github.com/KittyGiraudel/a11y-dialog/issues/582
2417
- const target = event.composedPath()[0];
2418
- const opener = closest(`[${SCOPE}-show="${this.id}"]`, target);
2419
- const explicitCloser = closest(`[${SCOPE}-hide="${this.id}"]`, target);
2420
- const implicitCloser = closest(`[${SCOPE}-hide]`, target) &&
2421
- closest('[aria-modal="true"]', target) === this.$el;
2422
- // We use `closest(..)` (instead of `matches(..)`) so that clicking an
2423
- // element nested within a dialog opener does cause the dialog to open, and
2424
- // we use our custom `closest(..)` function so that it can cross shadow
2425
- // boundaries
2426
- // See: https://github.com/KittyGiraudel/a11y-dialog/issues/712
2427
- if (opener)
2428
- this.show(event);
2429
- if (explicitCloser || implicitCloser)
2430
- this.hide(event);
2431
- }
2432
- /**
2433
- * Private event handler used when listening to some specific key presses
2434
- * (namely ESC and TAB)
2435
- */
2436
- bindKeypress(event) {
2437
- // This is an escape hatch in case there are nested open dialogs, so that
2438
- // only the top most dialog gets interacted with (`closest` is basically
2439
- // `Element.prototype.closest()` accounting for Shadow DOM subtrees)
2440
- if (closest('[aria-modal="true"]', getActiveEl()) !== this.$el) {
2441
- return;
2442
- }
2443
- let hasOpenPopover = false;
2444
- try {
2445
- hasOpenPopover = !!this.$el.querySelector('[popover]:not([popover="manual"]):popover-open');
2446
- }
2447
- catch {
2448
- // Run that DOM query in a try/catch because not all browsers support the
2449
- // `:popover-open` selector, which would cause the whole expression to
2450
- // fail
2451
- // See: https://caniuse.com/mdn-css_selectors_popover-open
2452
- // See: https://github.com/KittyGiraudel/a11y-dialog/pull/578#discussion_r1343215149
2453
- }
2454
- // If the dialog is shown and the ESC key is pressed, prevent any further
2455
- // effects from the ESC key and hide the dialog, unless:
2456
- // - its role is `alertdialog`, which means it should be modal
2457
- // - or it contains an open popover, in which case ESC should close it
2458
- if (event.key === 'Escape' &&
2459
- this.$el.getAttribute('role') !== 'alertdialog' &&
2460
- !hasOpenPopover) {
2461
- event.preventDefault();
2462
- this.hide(event);
2463
- }
2464
- // If the dialog is shown and the TAB key is pressed, make sure the focus
2465
- // stays trapped within the dialog element
2466
- if (event.key === 'Tab') {
2467
- trapTabKey(this.$el, event);
2468
- }
2469
- }
2470
- /**
2471
- * If the dialog is shown and the focus is not within a dialog element (either
2472
- * this one or another one in case of nested dialogs) or an element with the
2473
- * ignore attribute, move it back to the dialog container
2474
- * See: https://github.com/KittyGiraudel/a11y-dialog/issues/177
2475
- */
2476
- maintainFocus() {
2477
- // We use `getActiveEl()` and not `event.target` here because the latter can
2478
- // be a shadow root. This can happen when having a focusable element after
2479
- // slotted content: tabbing out of it causes this focus listener to trigger
2480
- // with the shadow root as a target event. In such a case, the focus would
2481
- // be incorrectly moved to the dialog, which shouldn’t happen. Getting the
2482
- // active element (while accounting for Shadow DOM) avoids that problem.
2483
- // See: https://github.com/KittyGiraudel/a11y-dialog/issues/778
2484
- const target = getActiveEl();
2485
- if (!closest(`[aria-modal="true"], [${SCOPE}-ignore-focus-trap]`, target)) {
2486
- focus(this.$el);
2487
- }
2488
- }
2489
- }
2490
-
2491
- function instantiateDialogs() {
2492
- for (const el of document.querySelectorAll('[data-a11y-dialog]')) {
2493
- new A11yDialog(el);
2494
- }
2495
- }
2496
- if (typeof document !== 'undefined') {
2497
- if (document.readyState === 'loading') {
2498
- document.addEventListener('DOMContentLoaded', instantiateDialogs);
2499
- }
2500
- else {
2501
- instantiateDialogs();
2502
- }
2503
- }
2504
-
15
+ */function $(){return N||(N=1,"production"!==process.env.NODE_ENV&&function(){function t(e){if(null==e)return null;if("function"==typeof e)return e.$$typeof===j?null:e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case h:return"Fragment";case m:return"Profiler";case y:return"StrictMode";case g:return"Suspense";case w:return"SuspenseList";case N:return"Activity"}if("object"==typeof e)switch("number"==typeof e.tag&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case f:return"Portal";case v:return(e.displayName||"Context")+".Provider";case p:return(e._context.displayName||"Context")+".Consumer";case b:var n=e.render;return(e=e.displayName)||(e=""!==(e=n.displayName||n.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case S:return null!==(n=e.displayName||null)?n:t(e.type)||"Memo";case k:n=e._payload,e=e._init;try{return t(e(n))}catch(e){}}return null}function n(e){return""+e}function r(e){try{n(e);var t=!1}catch(e){t=!0}if(t){var r=(t=console).error,o="function"==typeof Symbol&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return r.call(t,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",o),n(e)}}function o(e){if(e===h)return"<>";if("object"==typeof e&&null!==e&&e.$$typeof===k)return"<...>";try{var n=t(e);return n?"<"+n+">":"<...>"}catch(e){return"<...>"}}function i(){return Error("react-stack-top-frame")}function a(){var e=t(this.type);return A[e]||(A[e]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),void 0!==(e=this.props.ref)?e:null}function s(e,n,o,i,s,u,f,h){var y,m=n.children;if(void 0!==m)if(i)if(E(m)){for(i=0;i<m.length;i++)l(m[i]);Object.freeze&&Object.freeze(m)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else l(m);if(x.call(n,"key")){m=t(e);var p=Object.keys(n).filter(function(e){return"key"!==e});i=0<p.length?"{key: someKey, "+p.join(": ..., ")+": ...}":"{key: someKey}",P[m+i]||(p=0<p.length?"{"+p.join(": ..., ")+": ...}":"{}",console.error('A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',i,m,p,m),P[m+i]=!0)}if(m=null,void 0!==o&&(r(o),m=""+o),function(e){if(x.call(e,"key")){var t=Object.getOwnPropertyDescriptor(e,"key").get;if(t&&t.isReactWarning)return!1}return void 0!==e.key}(n)&&(r(n.key),m=""+n.key),"key"in n)for(var v in o={},n)"key"!==v&&(o[v]=n[v]);else o=n;return m&&function(e,t){function n(){c||(c=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",t))}n.isReactWarning=!0,Object.defineProperty(e,"key",{get:n,configurable:!0})}(o,"function"==typeof e?e.displayName||e.name||"Unknown":e),function(e,t,n,r,o,i,s,l){return n=i.ref,e={$$typeof:d,type:e,key:t,props:i,_owner:o},null!==(void 0!==n?n:null)?Object.defineProperty(e,"ref",{enumerable:!1,get:a}):Object.defineProperty(e,"ref",{enumerable:!1,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(e,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:s}),Object.defineProperty(e,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:l}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}(e,m,u,0,null===(y=$.A)?null:y.getOwner(),o,f,h)}function l(e){"object"==typeof e&&null!==e&&e.$$typeof===d&&e._store&&(e._store.validated=1)}var c,u=e,d=Symbol.for("react.transitional.element"),f=Symbol.for("react.portal"),h=Symbol.for("react.fragment"),y=Symbol.for("react.strict_mode"),m=Symbol.for("react.profiler"),p=Symbol.for("react.consumer"),v=Symbol.for("react.context"),b=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),w=Symbol.for("react.suspense_list"),S=Symbol.for("react.memo"),k=Symbol.for("react.lazy"),N=Symbol.for("react.activity"),j=Symbol.for("react.client.reference"),$=u.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,x=Object.prototype.hasOwnProperty,E=Array.isArray,_=console.createTask?console.createTask:function(){return null},A={},T=(u={react_stack_bottom_frame:function(e){return e()}}).react_stack_bottom_frame.bind(u,i)(),R=_(o(i)),P={};O.Fragment=h,O.jsx=function(e,t,n,r,i){var a=1e4>$.recentlyCreatedOwnerStacks++;return s(e,t,n,!1,0,i,a?Error("react-stack-top-frame"):T,a?_(o(e)):R)},O.jsxs=function(e,t,n,r,i){var a=1e4>$.recentlyCreatedOwnerStacks++;return s(e,t,n,!0,0,i,a?Error("react-stack-top-frame"):T,a?_(o(e)):R)}}()),O}var x=(j||(j=1,"production"===process.env.NODE_ENV?S.exports=function(){if(w)return k;w=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(t,n,r){var o=null;if(void 0!==r&&(o=""+r),void 0!==n.key&&(o=""+n.key),"key"in n)for(var i in r={},n)"key"!==i&&(r[i]=n[i]);else r=n;return n=r.ref,{$$typeof:e,type:t,key:o,ref:void 0!==n?n:null,props:r}}return k.Fragment=t,k.jsx=n,k.jsxs=n,k}():S.exports=$()),S.exports),E="btn",_=e.forwardRef(function(e,t){var n=e.className,r=e.children,o=e.htmlType,i=void 0===o?"button":o,a=e.href,s=e.isActive,c=e.isDefault,d=e.isDisabled,f=e.colorScheme,y=e.size,m=e.isSquare,p=e.type,v=e.elemRef,g=h(e,["className","children","htmlType","href","isActive","isDefault","isDisabled","colorScheme","size","isSquare","type","elemRef"]),w=b(E,l(l(l(l(l(l(l({},"".concat(E,"--square"),m),"".concat(E,"--").concat(y),y),"".concat(E,"--").concat(p),p),"".concat(E,"--default"),c),"is-dark","dark"===f),"is-light","light"===f),"is-active",s),n);if(a){var S=g;return x.jsx("a",u(u({href:a,className:w,"aria-disabled":d?"true":void 0,ref:v||t},S),{},{children:r}))}var k=g;return x.jsx("button",u(u({type:i,className:w,disabled:!!d||void 0,"aria-disabled":d?"true":void 0,ref:v||t},k),{},{children:r}))});_.displayName="Button";var A=e.createContext("/sprite.svg"),T="icon",R=function(e){var t=e.className,n=e.alt,r=e.color,o=e.name,a=e.size,s=e.spritePath,c=void 0===s?"/sprite.svg":s,d=h(e,["className","alt","color","name","size","spritePath"]),f=i(A),y=b(T,l(l({},"".concat(T,"--").concat(a),a),"".concat(T,"--").concat(r),r),t);return x.jsxs("svg",u(u({className:y,"aria-hidden":void 0!==n?void 0:"true",role:void 0!==n?"img":void 0},d),{},{children:[void 0!==n&&n.length>0&&x.jsx("title",{children:n}),x.jsx("use",{xlinkHref:"/sprite.svg"!==c||void 0===f?"".concat(c,"#").concat(o):"".concat(f,"#").concat(o)})]}))};R.displayName="Icon";var P=e.forwardRef(function(e,t){var n=e.iconName,r=e.iconPosition,o=void 0===r?"left":r,i=e.iconClassName,a=e.children,s=e.size,l=e.isSquare,c=h(e,["iconName","iconPosition","iconClassName","children","size","isSquare"]),d=function(e){var t=e.className,r=h(e,["className"]);return x.jsx(R,u({name:n,size:null!=s?s:"medium",className:b(i,t)},r))};return l?x.jsxs(_,u(u({size:s,isSquare:!0},c),{},{ref:t,children:[x.jsx(d,{}),x.jsx("span",{className:"visually-hidden",children:a})]})):x.jsxs(_,u(u({ref:t,size:s},c),{},{children:["left"===o&&x.jsx(d,{className:"btn__icon-left"}),a,"right"===o&&x.jsx(d,{className:"btn__icon-right"})]}))});P.displayName="IconButton";var I="buttons",C=function(e){var t=e.isStackedOnXs,n=e.children,r=e.className,o=h(e,["isStackedOnXs","children","className"]);return x.jsx("div",u(u({className:b(I,l({},"".concat(I,"--stack-on-xs"),t),r)},o),{},{children:n}))};C.displayName="Buttons";const D=":not([inert]):not([inert] *)",F=':not([tabindex^="-"])',M=":not(:disabled)";var L=[`a[href]${D}${F}`,`area[href]${D}${F}`,`input:not([type="hidden"]):not([type="radio"])${D}${F}${M}`,`input[type="radio"]${D}${F}${M}`,`select${D}${F}${M}`,`textarea${D}${F}${M}`,`button${D}${F}${M}`,`details${D} > summary:first-of-type${F}`,`iframe${D}${F}`,`audio[controls]${D}${F}`,`video[controls]${D}${F}`,`[contenteditable]${D}${F}`,`[tabindex]${D}${F}`];function z(e){(e.querySelector("[autofocus]")||e).focus()}function B(e,t){if(t&&K(e))return e;if(function(e){return(!e.shadowRoot||"-1"!==e.getAttribute("tabindex"))&&!e.matches(":disabled,[hidden],[inert]")}(e))if(e.shadowRoot){let n=q(e.shadowRoot,t);for(;n;){const e=B(n,t);if(e)return e;n=U(n,t)}}else if("slot"===e.localName){const n=e.assignedElements({flatten:!0});t||n.reverse();for(const e of n){const n=B(e,t);if(n)return n}}else{let n=q(e,t);for(;n;){const e=B(n,t);if(e)return e;n=U(n,t)}}return!t&&K(e)?e:null}function q(e,t){return t?e.firstElementChild:e.lastElementChild}function U(e,t){return t?e.nextElementSibling:e.previousElementSibling}const K=e=>!e.shadowRoot?.delegatesFocus&&(e.matches(L.join(","))&&!(e=>!(!e.matches("details:not([open]) *")||e.matches("details>summary:first-of-type"))||!(e.offsetWidth||e.offsetHeight||e.getClientRects().length))(e));function H(e=document){const t=e.activeElement;return t?t.shadowRoot?H(t.shadowRoot)||document.activeElement:t:null}function W(e,t){const[n,r]=function(e){const t=B(e,!0);return[t,t?B(e,!1)||t:null]}(e);if(!n)return t.preventDefault();const o=H();t.shiftKey&&o===n?(r.focus(),t.preventDefault()):t.shiftKey||o!==r||(n.focus(),t.preventDefault())}function X(e,t){return function t(n){if(!n||n===document||n===window)return null;const r=V(n);return r&&(n=r),n.closest(e)||t(n.getRootNode().host)}(t)}function V(e){return e.assignedSlot||(e.parentNode?V(e.parentNode):null)}const Y="data-a11y-dialog";class J{$el;id;previouslyFocused;shown;constructor(e){this.$el=e,this.id=this.$el.getAttribute(Y)||this.$el.id,this.previouslyFocused=null,this.shown=!1,this.maintainFocus=this.maintainFocus.bind(this),this.bindKeypress=this.bindKeypress.bind(this),this.handleTriggerClicks=this.handleTriggerClicks.bind(this),this.show=this.show.bind(this),this.hide=this.hide.bind(this),this.$el.setAttribute("aria-hidden","true"),this.$el.setAttribute("aria-modal","true"),this.$el.setAttribute("tabindex","-1"),this.$el.hasAttribute("role")||this.$el.setAttribute("role","dialog"),document.addEventListener("click",this.handleTriggerClicks,!0)}destroy(){return this.fire("destroy").defaultPrevented||(this.hide(),document.removeEventListener("click",this.handleTriggerClicks,!0),this.$el.replaceWith(this.$el.cloneNode(!0))),this}show(e){if(this.shown)return this;return this.fire("show",e).defaultPrevented||(this.shown=!0,this.$el.removeAttribute("aria-hidden"),this.previouslyFocused=H(),"BODY"===this.previouslyFocused?.tagName&&e?.target&&(this.previouslyFocused=e.target),"focus"===e?.type?this.maintainFocus():z(this.$el),document.body.addEventListener("focus",this.maintainFocus,!0),this.$el.addEventListener("keydown",this.bindKeypress,!0)),this}hide(e){if(!this.shown)return this;return this.fire("hide",e).defaultPrevented||(this.shown=!1,this.$el.setAttribute("aria-hidden","true"),document.body.removeEventListener("focus",this.maintainFocus,!0),this.$el.removeEventListener("keydown",this.bindKeypress,!0),this.previouslyFocused?.focus?.()),this}on(e,t,n){return this.$el.addEventListener(e,t,n),this}off(e,t,n){return this.$el.removeEventListener(e,t,n),this}fire(e,t){const n=new CustomEvent(e,{detail:t,cancelable:!0});return this.$el.dispatchEvent(n),n}handleTriggerClicks(e){const t=e.composedPath()[0],n=X(`[${Y}-show="${this.id}"]`,t),r=X(`[${Y}-hide="${this.id}"]`,t),o=X(`[${Y}-hide]`,t)&&X('[aria-modal="true"]',t)===this.$el;n&&this.show(e),(r||o)&&this.hide(e)}bindKeypress(e){if(X('[aria-modal="true"]',H())!==this.$el)return;let t=!1;try{t=!!this.$el.querySelector('[popover]:not([popover="manual"]):popover-open')}catch{}"Escape"!==e.key||"alertdialog"===this.$el.getAttribute("role")||t||(e.preventDefault(),this.hide(e)),"Tab"===e.key&&W(this.$el,e)}maintainFocus(){const e=H();X(`[aria-modal="true"], [${Y}-ignore-focus-trap]`,e)||z(this.$el)}}function G(){for(const e of document.querySelectorAll("[data-a11y-dialog]"))new J(e)}"undefined"!=typeof document&&("loading"===document.readyState?document.addEventListener("DOMContentLoaded",G):G());
2505
16
  /*!
2506
17
  * tabbable 6.2.0
2507
18
  * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
2508
- */
2509
- // NOTE: separate `:not()` selectors has broader browser support than the newer
2510
- // `:not([inert], [inert] *)` (Feb 2023)
2511
- // CAREFUL: JSDom does not support `:not([inert] *)` as a selector; using it causes
2512
- // the entire query to fail, resulting in no nodes found, which will break a lot
2513
- // of things... so we have to rely on JS to identify nodes inside an inert container
2514
- var candidateSelectors = ['input:not([inert])', 'select:not([inert])', 'textarea:not([inert])', 'a[href]:not([inert])', 'button:not([inert])', '[tabindex]:not(slot):not([inert])', 'audio[controls]:not([inert])', 'video[controls]:not([inert])', '[contenteditable]:not([contenteditable="false"]):not([inert])', 'details>summary:first-of-type:not([inert])', 'details:not([inert])'];
2515
- var candidateSelector = /* #__PURE__ */candidateSelectors.join(',');
2516
- var NoElement = typeof Element === 'undefined';
2517
- var matches = NoElement ? function () {} : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;
2518
- var getRootNode = !NoElement && Element.prototype.getRootNode ? function (element) {
2519
- var _element$getRootNode;
2520
- return element === null || element === void 0 ? void 0 : (_element$getRootNode = element.getRootNode) === null || _element$getRootNode === void 0 ? void 0 : _element$getRootNode.call(element);
2521
- } : function (element) {
2522
- return element === null || element === void 0 ? void 0 : element.ownerDocument;
2523
- };
2524
-
2525
- /**
2526
- * Determines if a node is inert or in an inert ancestor.
2527
- * @param {Element} [node]
2528
- * @param {boolean} [lookUp] If true and `node` is not inert, looks up at ancestors to
2529
- * see if any of them are inert. If false, only `node` itself is considered.
2530
- * @returns {boolean} True if inert itself or by way of being in an inert ancestor.
2531
- * False if `node` is falsy.
2532
- */
2533
- var isInert = function isInert(node, lookUp) {
2534
- var _node$getAttribute;
2535
- if (lookUp === void 0) {
2536
- lookUp = true;
2537
- }
2538
- // CAREFUL: JSDom does not support inert at all, so we can't use the `HTMLElement.inert`
2539
- // JS API property; we have to check the attribute, which can either be empty or 'true';
2540
- // if it's `null` (not specified) or 'false', it's an active element
2541
- var inertAtt = node === null || node === void 0 ? void 0 : (_node$getAttribute = node.getAttribute) === null || _node$getAttribute === void 0 ? void 0 : _node$getAttribute.call(node, 'inert');
2542
- var inert = inertAtt === '' || inertAtt === 'true';
2543
-
2544
- // NOTE: this could also be handled with `node.matches('[inert], :is([inert] *)')`
2545
- // if it weren't for `matches()` not being a function on shadow roots; the following
2546
- // code works for any kind of node
2547
- // CAREFUL: JSDom does not appear to support certain selectors like `:not([inert] *)`
2548
- // so it likely would not support `:is([inert] *)` either...
2549
- var result = inert || lookUp && node && isInert(node.parentNode); // recursive
2550
-
2551
- return result;
2552
- };
2553
-
2554
- /**
2555
- * Determines if a node's content is editable.
2556
- * @param {Element} [node]
2557
- * @returns True if it's content-editable; false if it's not or `node` is falsy.
2558
- */
2559
- var isContentEditable = function isContentEditable(node) {
2560
- var _node$getAttribute2;
2561
- // CAREFUL: JSDom does not support the `HTMLElement.isContentEditable` API so we have
2562
- // to use the attribute directly to check for this, which can either be empty or 'true';
2563
- // if it's `null` (not specified) or 'false', it's a non-editable element
2564
- var attValue = node === null || node === void 0 ? void 0 : (_node$getAttribute2 = node.getAttribute) === null || _node$getAttribute2 === void 0 ? void 0 : _node$getAttribute2.call(node, 'contenteditable');
2565
- return attValue === '' || attValue === 'true';
2566
- };
2567
-
2568
- /**
2569
- * @private
2570
- * Determines if the node has an explicitly specified `tabindex` attribute.
2571
- * @param {HTMLElement} node
2572
- * @returns {boolean} True if so; false if not.
2573
- */
2574
- var hasTabIndex = function hasTabIndex(node) {
2575
- return !isNaN(parseInt(node.getAttribute('tabindex'), 10));
2576
- };
2577
-
2578
- /**
2579
- * Determine the tab index of a given node.
2580
- * @param {HTMLElement} node
2581
- * @returns {number} Tab order (negative, 0, or positive number).
2582
- * @throws {Error} If `node` is falsy.
2583
- */
2584
- var getTabIndex = function getTabIndex(node) {
2585
- if (!node) {
2586
- throw new Error('No node provided');
2587
- }
2588
- if (node.tabIndex < 0) {
2589
- // in Chrome, <details/>, <audio controls/> and <video controls/> elements get a default
2590
- // `tabIndex` of -1 when the 'tabindex' attribute isn't specified in the DOM,
2591
- // yet they are still part of the regular tab order; in FF, they get a default
2592
- // `tabIndex` of 0; since Chrome still puts those elements in the regular tab
2593
- // order, consider their tab index to be 0.
2594
- // Also browsers do not return `tabIndex` correctly for contentEditable nodes;
2595
- // so if they don't have a tabindex attribute specifically set, assume it's 0.
2596
- if ((/^(AUDIO|VIDEO|DETAILS)$/.test(node.tagName) || isContentEditable(node)) && !hasTabIndex(node)) {
2597
- return 0;
2598
- }
2599
- }
2600
- return node.tabIndex;
2601
- };
2602
- var isInput = function isInput(node) {
2603
- return node.tagName === 'INPUT';
2604
- };
2605
- var isHiddenInput = function isHiddenInput(node) {
2606
- return isInput(node) && node.type === 'hidden';
2607
- };
2608
- var isDetailsWithSummary = function isDetailsWithSummary(node) {
2609
- var r = node.tagName === 'DETAILS' && Array.prototype.slice.apply(node.children).some(function (child) {
2610
- return child.tagName === 'SUMMARY';
2611
- });
2612
- return r;
2613
- };
2614
- var getCheckedRadio = function getCheckedRadio(nodes, form) {
2615
- for (var i = 0; i < nodes.length; i++) {
2616
- if (nodes[i].checked && nodes[i].form === form) {
2617
- return nodes[i];
2618
- }
2619
- }
2620
- };
2621
- var isTabbableRadio = function isTabbableRadio(node) {
2622
- if (!node.name) {
2623
- return true;
2624
- }
2625
- var radioScope = node.form || getRootNode(node);
2626
- var queryRadios = function queryRadios(name) {
2627
- return radioScope.querySelectorAll('input[type="radio"][name="' + name + '"]');
2628
- };
2629
- var radioSet;
2630
- if (typeof window !== 'undefined' && typeof window.CSS !== 'undefined' && typeof window.CSS.escape === 'function') {
2631
- radioSet = queryRadios(window.CSS.escape(node.name));
2632
- } else {
2633
- try {
2634
- radioSet = queryRadios(node.name);
2635
- } catch (err) {
2636
- // eslint-disable-next-line no-console
2637
- console.error('Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s', err.message);
2638
- return false;
2639
- }
2640
- }
2641
- var checked = getCheckedRadio(radioSet, node.form);
2642
- return !checked || checked === node;
2643
- };
2644
- var isRadio = function isRadio(node) {
2645
- return isInput(node) && node.type === 'radio';
2646
- };
2647
- var isNonTabbableRadio = function isNonTabbableRadio(node) {
2648
- return isRadio(node) && !isTabbableRadio(node);
2649
- };
2650
-
2651
- // determines if a node is ultimately attached to the window's document
2652
- var isNodeAttached = function isNodeAttached(node) {
2653
- var _nodeRoot;
2654
- // The root node is the shadow root if the node is in a shadow DOM; some document otherwise
2655
- // (but NOT _the_ document; see second 'If' comment below for more).
2656
- // If rootNode is shadow root, it'll have a host, which is the element to which the shadow
2657
- // is attached, and the one we need to check if it's in the document or not (because the
2658
- // shadow, and all nodes it contains, is never considered in the document since shadows
2659
- // behave like self-contained DOMs; but if the shadow's HOST, which is part of the document,
2660
- // is hidden, or is not in the document itself but is detached, it will affect the shadow's
2661
- // visibility, including all the nodes it contains). The host could be any normal node,
2662
- // or a custom element (i.e. web component). Either way, that's the one that is considered
2663
- // part of the document, not the shadow root, nor any of its children (i.e. the node being
2664
- // tested).
2665
- // To further complicate things, we have to look all the way up until we find a shadow HOST
2666
- // that is attached (or find none) because the node might be in nested shadows...
2667
- // If rootNode is not a shadow root, it won't have a host, and so rootNode should be the
2668
- // document (per the docs) and while it's a Document-type object, that document does not
2669
- // appear to be the same as the node's `ownerDocument` for some reason, so it's safer
2670
- // to ignore the rootNode at this point, and use `node.ownerDocument`. Otherwise,
2671
- // using `rootNode.contains(node)` will _always_ be true we'll get false-positives when
2672
- // node is actually detached.
2673
- // NOTE: If `nodeRootHost` or `node` happens to be the `document` itself (which is possible
2674
- // if a tabbable/focusable node was quickly added to the DOM, focused, and then removed
2675
- // from the DOM as in https://github.com/focus-trap/focus-trap-react/issues/905), then
2676
- // `ownerDocument` will be `null`, hence the optional chaining on it.
2677
- var nodeRoot = node && getRootNode(node);
2678
- var nodeRootHost = (_nodeRoot = nodeRoot) === null || _nodeRoot === void 0 ? void 0 : _nodeRoot.host;
2679
-
2680
- // in some cases, a detached node will return itself as the root instead of a document or
2681
- // shadow root object, in which case, we shouldn't try to look further up the host chain
2682
- var attached = false;
2683
- if (nodeRoot && nodeRoot !== node) {
2684
- var _nodeRootHost, _nodeRootHost$ownerDo, _node$ownerDocument;
2685
- attached = !!((_nodeRootHost = nodeRootHost) !== null && _nodeRootHost !== void 0 && (_nodeRootHost$ownerDo = _nodeRootHost.ownerDocument) !== null && _nodeRootHost$ownerDo !== void 0 && _nodeRootHost$ownerDo.contains(nodeRootHost) || node !== null && node !== void 0 && (_node$ownerDocument = node.ownerDocument) !== null && _node$ownerDocument !== void 0 && _node$ownerDocument.contains(node));
2686
- while (!attached && nodeRootHost) {
2687
- var _nodeRoot2, _nodeRootHost2, _nodeRootHost2$ownerD;
2688
- // since it's not attached and we have a root host, the node MUST be in a nested shadow DOM,
2689
- // which means we need to get the host's host and check if that parent host is contained
2690
- // in (i.e. attached to) the document
2691
- nodeRoot = getRootNode(nodeRootHost);
2692
- nodeRootHost = (_nodeRoot2 = nodeRoot) === null || _nodeRoot2 === void 0 ? void 0 : _nodeRoot2.host;
2693
- attached = !!((_nodeRootHost2 = nodeRootHost) !== null && _nodeRootHost2 !== void 0 && (_nodeRootHost2$ownerD = _nodeRootHost2.ownerDocument) !== null && _nodeRootHost2$ownerD !== void 0 && _nodeRootHost2$ownerD.contains(nodeRootHost));
2694
- }
2695
- }
2696
- return attached;
2697
- };
2698
- var isZeroArea = function isZeroArea(node) {
2699
- var _node$getBoundingClie = node.getBoundingClientRect(),
2700
- width = _node$getBoundingClie.width,
2701
- height = _node$getBoundingClie.height;
2702
- return width === 0 && height === 0;
2703
- };
2704
- var isHidden = function isHidden(node, _ref) {
2705
- var displayCheck = _ref.displayCheck,
2706
- getShadowRoot = _ref.getShadowRoot;
2707
- // NOTE: visibility will be `undefined` if node is detached from the document
2708
- // (see notes about this further down), which means we will consider it visible
2709
- // (this is legacy behavior from a very long way back)
2710
- // NOTE: we check this regardless of `displayCheck="none"` because this is a
2711
- // _visibility_ check, not a _display_ check
2712
- if (getComputedStyle(node).visibility === 'hidden') {
2713
- return true;
2714
- }
2715
- var isDirectSummary = matches.call(node, 'details>summary:first-of-type');
2716
- var nodeUnderDetails = isDirectSummary ? node.parentElement : node;
2717
- if (matches.call(nodeUnderDetails, 'details:not([open]) *')) {
2718
- return true;
2719
- }
2720
- if (!displayCheck || displayCheck === 'full' || displayCheck === 'legacy-full') {
2721
- if (typeof getShadowRoot === 'function') {
2722
- // figure out if we should consider the node to be in an undisclosed shadow and use the
2723
- // 'non-zero-area' fallback
2724
- var originalNode = node;
2725
- while (node) {
2726
- var parentElement = node.parentElement;
2727
- var rootNode = getRootNode(node);
2728
- if (parentElement && !parentElement.shadowRoot && getShadowRoot(parentElement) === true // check if there's an undisclosed shadow
2729
- ) {
2730
- // node has an undisclosed shadow which means we can only treat it as a black box, so we
2731
- // fall back to a non-zero-area test
2732
- return isZeroArea(node);
2733
- } else if (node.assignedSlot) {
2734
- // iterate up slot
2735
- node = node.assignedSlot;
2736
- } else if (!parentElement && rootNode !== node.ownerDocument) {
2737
- // cross shadow boundary
2738
- node = rootNode.host;
2739
- } else {
2740
- // iterate up normal dom
2741
- node = parentElement;
2742
- }
2743
- }
2744
- node = originalNode;
2745
- }
2746
- // else, `getShadowRoot` might be true, but all that does is enable shadow DOM support
2747
- // (i.e. it does not also presume that all nodes might have undisclosed shadows); or
2748
- // it might be a falsy value, which means shadow DOM support is disabled
2749
-
2750
- // Since we didn't find it sitting in an undisclosed shadow (or shadows are disabled)
2751
- // now we can just test to see if it would normally be visible or not, provided it's
2752
- // attached to the main document.
2753
- // NOTE: We must consider case where node is inside a shadow DOM and given directly to
2754
- // `isTabbable()` or `isFocusable()` -- regardless of `getShadowRoot` option setting.
2755
-
2756
- if (isNodeAttached(node)) {
2757
- // this works wherever the node is: if there's at least one client rect, it's
2758
- // somehow displayed; it also covers the CSS 'display: contents' case where the
2759
- // node itself is hidden in place of its contents; and there's no need to search
2760
- // up the hierarchy either
2761
- return !node.getClientRects().length;
2762
- }
2763
-
2764
- // Else, the node isn't attached to the document, which means the `getClientRects()`
2765
- // API will __always__ return zero rects (this can happen, for example, if React
2766
- // is used to render nodes onto a detached tree, as confirmed in this thread:
2767
- // https://github.com/facebook/react/issues/9117#issuecomment-284228870)
2768
- //
2769
- // It also means that even window.getComputedStyle(node).display will return `undefined`
2770
- // because styles are only computed for nodes that are in the document.
2771
- //
2772
- // NOTE: THIS HAS BEEN THE CASE FOR YEARS. It is not new, nor is it caused by tabbable
2773
- // somehow. Though it was never stated officially, anyone who has ever used tabbable
2774
- // APIs on nodes in detached containers has actually implicitly used tabbable in what
2775
- // was later (as of v5.2.0 on Apr 9, 2021) called `displayCheck="none"` mode -- essentially
2776
- // considering __everything__ to be visible because of the innability to determine styles.
2777
- //
2778
- // v6.0.0: As of this major release, the default 'full' option __no longer treats detached
2779
- // nodes as visible with the 'none' fallback.__
2780
- if (displayCheck !== 'legacy-full') {
2781
- return true; // hidden
2782
- }
2783
- // else, fallback to 'none' mode and consider the node visible
2784
- } else if (displayCheck === 'non-zero-area') {
2785
- // NOTE: Even though this tests that the node's client rect is non-zero to determine
2786
- // whether it's displayed, and that a detached node will __always__ have a zero-area
2787
- // client rect, we don't special-case for whether the node is attached or not. In
2788
- // this mode, we do want to consider nodes that have a zero area to be hidden at all
2789
- // times, and that includes attached or not.
2790
- return isZeroArea(node);
2791
- }
2792
-
2793
- // visible, as far as we can tell, or per current `displayCheck=none` mode, we assume
2794
- // it's visible
2795
- return false;
2796
- };
2797
-
2798
- // form fields (nested) inside a disabled fieldset are not focusable/tabbable
2799
- // unless they are in the _first_ <legend> element of the top-most disabled
2800
- // fieldset
2801
- var isDisabledFromFieldset = function isDisabledFromFieldset(node) {
2802
- if (/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(node.tagName)) {
2803
- var parentNode = node.parentElement;
2804
- // check if `node` is contained in a disabled <fieldset>
2805
- while (parentNode) {
2806
- if (parentNode.tagName === 'FIELDSET' && parentNode.disabled) {
2807
- // look for the first <legend> among the children of the disabled <fieldset>
2808
- for (var i = 0; i < parentNode.children.length; i++) {
2809
- var child = parentNode.children.item(i);
2810
- // when the first <legend> (in document order) is found
2811
- if (child.tagName === 'LEGEND') {
2812
- // if its parent <fieldset> is not nested in another disabled <fieldset>,
2813
- // return whether `node` is a descendant of its first <legend>
2814
- return matches.call(parentNode, 'fieldset[disabled] *') ? true : !child.contains(node);
2815
- }
2816
- }
2817
- // the disabled <fieldset> containing `node` has no <legend>
2818
- return true;
2819
- }
2820
- parentNode = parentNode.parentElement;
2821
- }
2822
- }
2823
-
2824
- // else, node's tabbable/focusable state should not be affected by a fieldset's
2825
- // enabled/disabled state
2826
- return false;
2827
- };
2828
- var isNodeMatchingSelectorFocusable = function isNodeMatchingSelectorFocusable(options, node) {
2829
- if (node.disabled ||
2830
- // we must do an inert look up to filter out any elements inside an inert ancestor
2831
- // because we're limited in the type of selectors we can use in JSDom (see related
2832
- // note related to `candidateSelectors`)
2833
- isInert(node) || isHiddenInput(node) || isHidden(node, options) ||
2834
- // For a details element with a summary, the summary element gets the focus
2835
- isDetailsWithSummary(node) || isDisabledFromFieldset(node)) {
2836
- return false;
2837
- }
2838
- return true;
2839
- };
2840
- var isNodeMatchingSelectorTabbable = function isNodeMatchingSelectorTabbable(options, node) {
2841
- if (isNonTabbableRadio(node) || getTabIndex(node) < 0 || !isNodeMatchingSelectorFocusable(options, node)) {
2842
- return false;
2843
- }
2844
- return true;
2845
- };
2846
- var isTabbable = function isTabbable(node, options) {
2847
- options = options || {};
2848
- if (!node) {
2849
- throw new Error('No node provided');
2850
- }
2851
- if (matches.call(node, candidateSelector) === false) {
2852
- return false;
2853
- }
2854
- return isNodeMatchingSelectorTabbable(options, node);
2855
- };
2856
-
2857
- var defaultConfig = function defaultConfig() {
2858
- return {
2859
- /** Class which indicates that modal is open */
2860
- classModalIsOpen: "is-active",
2861
- /** Class on body which indicates that modal is open */
2862
- classModalIsOpenBody: "has-modal",
2863
- /** Root of page content which should be hidden when modal is open */
2864
- root: "#root",
2865
- /** Move modal into this element selector (must be unique in DOM) */
2866
- modalsRoot: "#root-modals"
2867
- };
2868
- };
2869
- var Modal$1 = /*#__PURE__*/function () {
2870
- function Modal(element, config) {
2871
- _classCallCheck(this, Modal);
2872
- this.element = element;
2873
- this.config = Object.assign(Object.assign({}, defaultConfig()), config);
2874
- this.handleShow = this.handleShow.bind(this);
2875
- this.handleHide = this.handleHide.bind(this);
2876
- this.show = this.show.bind(this);
2877
- this.hide = this.hide.bind(this);
2878
- this.headerFirstItemSpacing = this.headerFirstItemSpacing.bind(this);
2879
- Modal.moveToModalRoot = Modal.moveToModalRoot.bind(this);
2880
- Modal.lockBody = Modal.lockBody.bind(this);
2881
- Modal.unlockBody = Modal.unlockBody.bind(this);
2882
- this.element.ODS_Modal = this;
2883
- this.init();
2884
- return this;
2885
- }
2886
- return _createClass(Modal, [{
2887
- key: "handleShow",
2888
- value: function handleShow(el) {
2889
- Modal.lockBody();
2890
- if (el) el.classList.add(this.config.classModalIsOpen);
2891
- // Long modals can have first focusabble element under the fold, so static content above the fold should be focused instead to prevent undesirable scrolling
2892
- var initialFocusEl = el.querySelector("[data-a11y-dialog-initial-focus]");
2893
- if (!initialFocusEl) {
2894
- return;
2895
- }
2896
- // set tabindex to -1 so element can't be focused via keyboard
2897
- if (!isTabbable(initialFocusEl)) {
2898
- initialFocusEl.setAttribute("tabindex", "-1");
2899
- }
2900
- initialFocusEl.focus();
2901
- }
2902
- }, {
2903
- key: "handleHide",
2904
- value: function handleHide(el) {
2905
- Modal.unlockBody();
2906
- if (el) el.classList.remove(this.config.classModalIsOpen);
2907
- }
2908
- }, {
2909
- key: "show",
2910
- value: function show() {
2911
- this.instance.show();
2912
- }
2913
- }, {
2914
- key: "hide",
2915
- value: function hide() {
2916
- this.instance.hide();
2917
- }
2918
- }, {
2919
- key: "headerFirstItemSpacing",
2920
- value: function headerFirstItemSpacing() {
2921
- /**
2922
- * Target the first element which is not .btn inside .modal__header and add margin-right 40px.
2923
- * css has its limitations and it is not possible with pseudo selectors
2924
- */
2925
- var modalHeader = this.element.querySelector(".modal__header");
2926
- if (modalHeader) {
2927
- var firstNonBtnElement = Array.from(modalHeader.children).find(function (child) {
2928
- return !child.classList.contains("btn");
2929
- });
2930
- if (firstNonBtnElement) {
2931
- firstNonBtnElement.style.marginRight = "40px";
2932
- }
2933
- }
2934
- }
2935
- }, {
2936
- key: "init",
2937
- value: function init() {
2938
- var _this = this;
2939
- if (this.config.modalsRoot) {
2940
- Modal.moveToModalRoot(this.element, document.querySelector(this.config.modalsRoot));
2941
- }
2942
- this.instance = new A11yDialog(this.element);
2943
- this.instance.on("show", function (event) {
2944
- var dialogEl = event.currentTarget;
2945
- _this.handleShow(dialogEl);
2946
- });
2947
- this.instance.on("hide", function (event) {
2948
- var dialogEl = event.currentTarget;
2949
- _this.handleHide(dialogEl);
2950
- });
2951
- this.headerFirstItemSpacing();
2952
- }
2953
- }, {
2954
- key: "destroy",
2955
- value: function destroy() {
2956
- this.instance.destroy();
2957
- this.element.ODS_Modal = this;
2958
- }
2959
- }, {
2960
- key: "update",
2961
- value: function update() {
2962
- this.destroy();
2963
- this.init();
2964
- }
2965
- }], [{
2966
- key: "getInstance",
2967
- value: function getInstance(el) {
2968
- if (!el) return null;
2969
- var modalEl = el;
2970
- return modalEl.ODS_Modal || null;
2971
- }
2972
- }, {
2973
- key: "moveToModalRoot",
2974
- value: function moveToModalRoot(el, container) {
2975
- var _a;
2976
- if (container) {
2977
- container.appendChild(el);
2978
- } else {
2979
- console.warn("`modalsRoot: ".concat((_a = this.config) === null || _a === void 0 ? void 0 : _a.modalsRoot, "` element is not present in DOM. Modal will be placed inside content which can affect it's styling. Please provide `modalsRoot` selector (should be placed outside of main contant, usualy in end of <body /> tag)"));
2980
- }
2981
- }
2982
- }, {
2983
- key: "lockBody",
2984
- value: function lockBody(className, root) {
2985
- var _a, _b;
2986
- var actualClassName = className || ((_a = this.config) === null || _a === void 0 ? void 0 : _a.classModalIsOpenBody);
2987
- var actualRoot = root || ((_b = this.config) === null || _b === void 0 ? void 0 : _b.root);
2988
- var container = document.querySelector(actualRoot);
2989
- // store current scrollTop value
2990
- var scrollTop = document.documentElement.scrollTop || document.body.scrollTop;
2991
- document.body.setAttribute("data-lock-scrolltop", scrollTop.toString());
2992
- // add locking styles to body
2993
- document.body.style.height = "100%";
2994
- document.body.style.width = "100%";
2995
- document.body.style.overflow = "hidden";
2996
- document.body.style.position = "fixed";
2997
- // add locking styles to scrollTop
2998
- if (container) {
2999
- container.style.height = "100%";
3000
- container.style.width = "100%";
3001
- container.style.overflow = "hidden";
3002
- container.style.position = "fixed";
3003
- // scroll page-container to scrollTop position
3004
- container.scrollTop = scrollTop;
3005
- }
3006
- // add modal class
3007
- document.body.classList.add(actualClassName);
3008
- // attempt to scroll top fixed position
3009
- window.requestAnimationFrame(function () {
3010
- window.scrollTo(0, scrollTop);
3011
- });
3012
- }
3013
- }, {
3014
- key: "unlockBody",
3015
- value: function unlockBody(className, root) {
3016
- var _a, _b;
3017
- var actualClassName = className || ((_a = this.config) === null || _a === void 0 ? void 0 : _a.classModalIsOpenBody);
3018
- var actualRoot = root || ((_b = this.config) === null || _b === void 0 ? void 0 : _b.root);
3019
- var container = document.querySelector(actualRoot);
3020
- var scrollTop = document.body.getAttribute("data-lock-scrolltop") || "0";
3021
- // remove locking styles from body
3022
- document.body.style.height = "";
3023
- document.body.style.width = "";
3024
- document.body.style.overflow = "";
3025
- document.body.style.position = "";
3026
- // add modal class
3027
- document.body.classList.remove(actualClassName);
3028
- // remove locking styles from page-container
3029
- if (container) {
3030
- container.style.height = "";
3031
- container.style.width = "";
3032
- container.style.overflow = "";
3033
- container.style.position = "";
3034
- }
3035
- // set scroll position back
3036
- window.requestAnimationFrame(function () {
3037
- window.scrollTo({
3038
- left: 0,
3039
- top: parseInt(scrollTop, 10),
3040
- behavior: "instant"
3041
- });
3042
- });
3043
- }
3044
- }]);
3045
- }();
3046
-
3047
- var ModalCloseButton = function ModalCloseButton(props) {
3048
- return /*#__PURE__*/jsxRuntimeExports.jsx(IconButton, _objectSpread2({
3049
- iconName: "delete",
3050
- type: "ghost",
3051
- isSquare: true,
3052
- size: "small",
3053
- className: "modal__close",
3054
- "data-a11y-dialog-hide": true,
3055
- "aria-label": "Zatvori\u0165"
3056
- }, props));
3057
- };
3058
- ModalCloseButton.displayName = "ModalCloseButton";
3059
-
3060
- var ModalTitle = function ModalTitle(_a) {
3061
- var size = _a.size,
3062
- className = _a.className,
3063
- children = _a.children,
3064
- other = __rest(_a, ["size", "className", "children"]);
3065
- return /*#__PURE__*/jsxRuntimeExports.jsx("h2", _objectSpread2(_objectSpread2({
3066
- className: cx(className, {
3067
- "display-3": size === "large",
3068
- h2: size === "small"
3069
- })
3070
- }, other), {}, {
3071
- children: children
3072
- }));
3073
- };
3074
- ModalTitle.displayName = "ModalTitle";
3075
-
3076
- var CLASS_ROOT$1 = "modal__body";
3077
- var ModalBody = function ModalBody(_a) {
3078
- var color = _a.color,
3079
- className = _a.className,
3080
- children = _a.children,
3081
- other = __rest(_a, ["color", "className", "children"]);
3082
- return /*#__PURE__*/jsxRuntimeExports.jsx("div", _objectSpread2(_objectSpread2({
3083
- className: cx(CLASS_ROOT$1, className, _defineProperty(_defineProperty({}, "bg-".concat(color), color), "".concat(CLASS_ROOT$1, "--colorful"), color))
3084
- }, other), {}, {
3085
- children: children
3086
- }));
3087
- };
3088
- ModalBody.displayName = "ModalBody";
3089
-
3090
- var CLASS_ROOT = "modal";
3091
- var defaultProps = {
3092
- actions: [/*#__PURE__*/jsxRuntimeExports.jsx(Button, {
3093
- "data-a11y-dialog-hide": true,
3094
- children: "Zatvori\u0165"
3095
- }, "1")],
3096
- noInit: false
3097
- };
3098
- var Modal = function Modal(_a) {
3099
- var _a$actions = _a.actions,
3100
- actions = _a$actions === void 0 ? defaultProps.actions : _a$actions,
3101
- className = _a.className,
3102
- children = _a.children,
3103
- hasStickyFooter = _a.hasStickyFooter,
3104
- id = _a.id,
3105
- _a$noInit = _a.noInit,
3106
- noInit = _a$noInit === void 0 ? defaultProps.noInit : _a$noInit,
3107
- isActive = _a.isActive,
3108
- size = _a.size,
3109
- title = _a.title,
3110
- renderBody = _a.renderBody,
3111
- renderTitle = _a.renderTitle,
3112
- renderFooter = _a.renderFooter,
3113
- fullHeight = _a.fullHeight,
3114
- other = __rest(_a, ["actions", "className", "children", "hasStickyFooter", "id", "noInit", "isActive", "size", "title", "renderBody", "renderTitle", "renderFooter", "fullHeight"]);
3115
- var _useStatic = useStatic(Modal$1),
3116
- _useStatic2 = _slicedToArray(_useStatic, 2),
3117
- modalRef = _useStatic2[0],
3118
- instance = _useStatic2[1];
3119
- useEffect(function () {
3120
- if (isActive && instance && instance.current) {
3121
- instance.current.show();
3122
- }
3123
- }, [instance, isActive]);
3124
- var dialogClasses = cx("".concat(CLASS_ROOT, "__dialog"), _defineProperty(_defineProperty({}, "".concat(CLASS_ROOT, "__dialog--").concat(size), size), "".concat(CLASS_ROOT, "__dialog--full-height"), fullHeight), className);
3125
- var titleId = "".concat(id, "-title");
3126
- var dialogTitle = renderTitle ? renderTitle(id) : /*#__PURE__*/jsxRuntimeExports.jsx(ModalTitle, {
3127
- id: titleId,
3128
- size: size,
3129
- "data-a11y-dialog-initial-focus": true,
3130
- children: title
3131
- });
3132
- return /*#__PURE__*/jsxRuntimeExports.jsxs("div", {
3133
- id: id,
3134
- "data-modal": !noInit,
3135
- className: CLASS_ROOT,
3136
- ref: modalRef,
3137
- role: "dialog",
3138
- "aria-hidden": "true",
3139
- "aria-modal": "true",
3140
- "aria-labelledby": titleId,
3141
- children: [/*#__PURE__*/jsxRuntimeExports.jsx("div", {
3142
- className: "modal__overlay",
3143
- tabIndex: -1,
3144
- "data-a11y-dialog-hide": true
3145
- }), /*#__PURE__*/jsxRuntimeExports.jsxs("div", _objectSpread2(_objectSpread2({
3146
- className: dialogClasses,
3147
- role: "document"
3148
- }, other), {}, {
3149
- children: [/*#__PURE__*/jsxRuntimeExports.jsxs("div", {
3150
- className: "".concat(CLASS_ROOT, "__header"),
3151
- children: [/*#__PURE__*/jsxRuntimeExports.jsx(ModalCloseButton, {}), dialogTitle]
3152
- }), renderBody ? renderBody() : /*#__PURE__*/jsxRuntimeExports.jsx(ModalBody, {
3153
- children: children
3154
- }), /*#__PURE__*/jsxRuntimeExports.jsx("div", {
3155
- className: cx("".concat(CLASS_ROOT, "__footer"), _defineProperty({}, "".concat(CLASS_ROOT, "__footer--sticky"), hasStickyFooter)),
3156
- children: renderFooter ? renderFooter() : /*#__PURE__*/jsxRuntimeExports.jsx(ConditionalWrapper, {
3157
- condition: actions.length > 1,
3158
- wrapper: /*#__PURE__*/jsxRuntimeExports.jsx(Buttons, {}),
3159
- children: actions.map(function (action) {
3160
- return action;
3161
- })
3162
- })
3163
- })]
3164
- }))]
3165
- });
3166
- };
3167
- Modal.displayName = "Modal";
3168
-
3169
- export { Modal, ModalBody, ModalCloseButton, ModalTitle };
19
+ */var Z=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"].join(","),Q="undefined"==typeof Element,ee=Q?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,te=!Q&&Element.prototype.getRootNode?function(e){var t;return null==e||null===(t=e.getRootNode)||void 0===t?void 0:t.call(e)}:function(e){return null==e?void 0:e.ownerDocument},ne=function e(t,n){var r;void 0===n&&(n=!0);var o=null==t||null===(r=t.getAttribute)||void 0===r?void 0:r.call(t,"inert");return""===o||"true"===o||n&&t&&e(t.parentNode)},re=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||function(e){var t,n=null==e||null===(t=e.getAttribute)||void 0===t?void 0:t.call(e,"contenteditable");return""===n||"true"===n}(e))&&!function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))}(e)?0:e.tabIndex},oe=function(e){return"INPUT"===e.tagName},ie=function(e){return function(e){return oe(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,n=e.form||te(e),r=function(e){return n.querySelectorAll('input[type="radio"][name="'+e+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)t=r(window.CSS.escape(e.name));else try{t=r(e.name)}catch(e){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",e.message),!1}var o=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]}(t,e.form);return!o||o===e}(e)},ae=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return 0===n&&0===r},se=function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if("hidden"===getComputedStyle(e).visibility)return!0;var o=ee.call(e,"details>summary:first-of-type")?e.parentElement:e;if(ee.call(o,"details:not([open]) *"))return!0;if(n&&"full"!==n&&"legacy-full"!==n){if("non-zero-area"===n)return ae(e)}else{if("function"==typeof r){for(var i=e;e;){var a=e.parentElement,s=te(e);if(a&&!a.shadowRoot&&!0===r(a))return ae(e);e=e.assignedSlot?e.assignedSlot:a||s===e.ownerDocument?a:s.host}e=i}if(function(e){var t,n,r,o,i=e&&te(e),a=null===(t=i)||void 0===t?void 0:t.host,s=!1;if(i&&i!==e)for(s=!!(null!==(n=a)&&void 0!==n&&null!==(r=n.ownerDocument)&&void 0!==r&&r.contains(a)||null!=e&&null!==(o=e.ownerDocument)&&void 0!==o&&o.contains(e));!s&&a;){var l,c,u;s=!(null===(c=a=null===(l=i=te(a))||void 0===l?void 0:l.host)||void 0===c||null===(u=c.ownerDocument)||void 0===u||!u.contains(a))}return s}(e))return!e.getClientRects().length;if("legacy-full"!==n)return!0}return!1},le=function(e,t){return!(t.disabled||ne(t)||function(e){return oe(e)&&"hidden"===e.type}(t)||se(t,e)||function(e){return"DETAILS"===e.tagName&&Array.prototype.slice.apply(e.children).some(function(e){return"SUMMARY"===e.tagName})}(t)||function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if("LEGEND"===r.tagName)return!!ee.call(t,"fieldset[disabled] *")||!r.contains(e)}return!0}t=t.parentElement}return!1}(t))},ce=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return!1!==ee.call(e,Z)&&function(e,t){return!(ie(t)||re(t)<0||!le(e,t))}(t,e)},ue=function(){function e(t,n){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.element=t,this.config=Object.assign(Object.assign({},{classModalIsOpen:"is-active",classModalIsOpenBody:"has-modal",root:"#root",modalsRoot:"#root-modals"}),n),this.handleShow=this.handleShow.bind(this),this.handleHide=this.handleHide.bind(this),this.show=this.show.bind(this),this.hide=this.hide.bind(this),this.headerFirstItemSpacing=this.headerFirstItemSpacing.bind(this),e.moveToModalRoot=e.moveToModalRoot.bind(this),e.lockBody=e.lockBody.bind(this),e.unlockBody=e.unlockBody.bind(this),this.element.ODS_Modal=this,this.init(),this}return t=e,r=[{key:"getInstance",value:function(e){return e&&e.ODS_Modal||null}},{key:"moveToModalRoot",value:function(e,t){var n;t?t.appendChild(e):console.warn("`modalsRoot: ".concat(null===(n=this.config)||void 0===n?void 0:n.modalsRoot,"` element is not present in DOM. Modal will be placed inside content which can affect it's styling. Please provide `modalsRoot` selector (should be placed outside of main contant, usualy in end of <body /> tag)"))}},{key:"lockBody",value:function(e,t){var n,r,o=e||(null===(n=this.config)||void 0===n?void 0:n.classModalIsOpenBody),i=t||(null===(r=this.config)||void 0===r?void 0:r.root),a=document.querySelector(i),s=document.documentElement.scrollTop||document.body.scrollTop;document.body.setAttribute("data-lock-scrolltop",s.toString()),document.body.style.height="100%",document.body.style.width="100%",document.body.style.overflow="hidden",document.body.style.position="fixed",a&&(a.style.height="100%",a.style.width="100%",a.style.overflow="hidden",a.style.position="fixed",a.scrollTop=s),document.body.classList.add(o),window.requestAnimationFrame(function(){window.scrollTo(0,s)})}},{key:"unlockBody",value:function(e,t){var n,r,o=e||(null===(n=this.config)||void 0===n?void 0:n.classModalIsOpenBody),i=t||(null===(r=this.config)||void 0===r?void 0:r.root),a=document.querySelector(i),s=document.body.getAttribute("data-lock-scrolltop")||"0";document.body.style.height="",document.body.style.width="",document.body.style.overflow="",document.body.style.position="",document.body.classList.remove(o),a&&(a.style.height="",a.style.width="",a.style.overflow="",a.style.position=""),window.requestAnimationFrame(function(){window.scrollTo({left:0,top:parseInt(s,10),behavior:"instant"})})}}],(n=[{key:"handleShow",value:function(t){e.lockBody(),t&&t.classList.add(this.config.classModalIsOpen);var n=t.querySelector("[data-a11y-dialog-initial-focus]");n&&(ce(n)||n.setAttribute("tabindex","-1"),n.focus())}},{key:"handleHide",value:function(t){e.unlockBody(),t&&t.classList.remove(this.config.classModalIsOpen)}},{key:"show",value:function(){this.instance.show()}},{key:"hide",value:function(){this.instance.hide()}},{key:"headerFirstItemSpacing",value:function(){var e=this.element.querySelector(".modal__header");if(e){var t=Array.from(e.children).find(function(e){return!e.classList.contains("btn")});t&&(t.style.marginRight="40px")}}},{key:"init",value:function(){var t=this;this.config.modalsRoot&&e.moveToModalRoot(this.element,document.querySelector(this.config.modalsRoot)),this.instance=new J(this.element),this.instance.on("show",function(e){var n=e.currentTarget;t.handleShow(n)}),this.instance.on("hide",function(e){var n=e.currentTarget;t.handleHide(n)}),this.headerFirstItemSpacing()}},{key:"destroy",value:function(){this.instance.destroy(),this.element.ODS_Modal=this}},{key:"update",value:function(){this.destroy(),this.init()}}])&&s(t.prototype,n),r&&s(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,n,r}(),de=function(e){return x.jsx(P,u({iconName:"delete",type:"ghost",isSquare:!0,size:"small",className:"modal__close","data-a11y-dialog-hide":!0,"aria-label":"Zatvoriť"},e))};de.displayName="ModalCloseButton";var fe=function(e){var t=e.size,n=e.className,r=e.children,o=h(e,["size","className","children"]);return x.jsx("h2",u(u({className:b(n,{"display-3":"large"===t,h2:"small"===t})},o),{},{children:r}))};fe.displayName="ModalTitle";var he="modal__body",ye=function(e){var t=e.color,n=e.className,r=e.children,o=h(e,["color","className","children"]);return x.jsx("div",u(u({className:b(he,n,l(l({},"bg-".concat(t),t),"".concat(he,"--colorful"),t))},o),{},{children:r}))};ye.displayName="ModalBody";var me="modal",pe={actions:[x.jsx(_,{"data-a11y-dialog-hide":!0,children:"Zatvoriť"},"1")],noInit:!1},ve=function(e){var o=e.actions,i=void 0===o?pe.actions:o,a=e.className,s=e.children,c=e.hasStickyFooter,f=e.id,y=e.noInit,m=void 0===y?pe.noInit:y,p=e.isActive,v=e.size,w=e.title,S=e.renderBody,k=e.renderTitle,N=e.renderFooter,j=e.fullHeight,O=e.colorScheme,$=h(e,["actions","className","children","hasStickyFooter","id","noInit","isActive","size","title","renderBody","renderTitle","renderFooter","fullHeight","colorScheme"]),E=function(e){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=t(null),a=t(o);n(function(){a.current=null!=o?o:{}},[o]);var s=r(function(t){var n,r,o=a.current;t&&(null===i.current?i.current=new e(t,o):null===(r=(n=i.current).update)||void 0===r||r.call(n,o))},[e]);return n(function(){return function(){var e,t;i.current&&(null===(t=(e=i.current).destroy)||void 0===t||t.call(e),i.current=null)}},[]),[s,i]}(ue),_=d(E,2),A=_[0],T=_[1];n(function(){p&&T&&T.current&&T.current.show()},[T,p]);var R=b("".concat(me,"__dialog"),l(l(l(l({},"".concat(me,"__dialog--").concat(v),v),"".concat(me,"__dialog--full-height"),j),"is-dark","dark"===O),"is-light","light"===O),a),P="".concat(f,"-title"),I=k?k(f):x.jsx(fe,{id:P,size:v,"data-a11y-dialog-initial-focus":!0,children:w});return x.jsxs("div",{id:f,"data-modal":!m,className:me,ref:A,role:"dialog","aria-hidden":"true","aria-modal":"true","aria-labelledby":P,children:[x.jsx("div",{className:"modal__overlay",tabIndex:-1,"data-a11y-dialog-hide":!0}),x.jsxs("div",u(u({className:R,role:"document"},$),{},{children:[x.jsxs("div",{className:"".concat(me,"__header"),children:[x.jsx(de,{}),I]}),S?S():x.jsx(ye,{children:s}),x.jsx("div",{className:b("".concat(me,"__footer"),l({},"".concat(me,"__footer--sticky"),c)),children:N?N():x.jsx(g,{condition:i.length>1,wrapper:x.jsx(C,{}),children:i.map(function(e){return e})})})]}))]})};ve.displayName="Modal";export{ve as Modal,ye as ModalBody,de as ModalCloseButton,fe as ModalTitle};
3170
20
  //# sourceMappingURL=index.js.map