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

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 (781) hide show
  1. package/build/404.html +1 -1
  2. package/build/_next/static/CRhIjUFtohDOfdDfzvfXM/_buildManifest.js +1 -0
  3. package/build/_next/static/chunks/925.75d0c8afa7ab7cfa.js +1 -0
  4. package/build/_next/static/chunks/998-a45c3cf6f575e126.js +1 -0
  5. package/build/_next/static/chunks/app/components/alert/page-d591b03a7394f81e.js +1 -0
  6. package/build/_next/static/chunks/app/components/button/page-b922a8f5114b0a69.js +1 -0
  7. package/build/_next/static/chunks/app/components/buttons/page-0a5bf7e5ac7991fb.js +1 -0
  8. package/build/_next/static/chunks/app/components/icon/page-dac6ba29b85d924d.js +1 -0
  9. package/build/_next/static/chunks/app/components/modal/page-4a249b6d271eea91.js +1 -0
  10. package/build/_next/static/chunks/app/components/tabs/page-7d82e8eafd25b86e.js +1 -0
  11. package/build/_next/static/chunks/app/layout-f74d44a2772d8d63.js +1 -0
  12. package/build/_next/static/chunks/app/page-9efa16a51ef59461.js +1 -0
  13. package/build/_next/static/chunks/webpack-623f6e616651e1c0.js +1 -0
  14. package/build/_next/static/css/14f3a3e0186fb7a8.css +3 -0
  15. package/build/_next/static/css/168dd2b7e791cf72.css +1 -0
  16. package/build/_next/static/css/28a41a1d7dcdbfd9.css +1 -0
  17. package/build/_next/static/css/291602d64f1f3570.css +1 -0
  18. package/build/_next/static/css/4c4366b3963177f0.css +1 -0
  19. package/build/_next/static/css/5481aeac9adca710.css +1 -0
  20. package/build/_next/static/css/73b136688c14b891.css +1 -0
  21. package/build/_next/static/css/91c8cf755bf9ff19.css +1 -0
  22. package/build/_next/static/css/c1b0424033f305ff.css +1 -0
  23. package/build/_next/static/css/eea9fd9ccdd56c76.css +1 -0
  24. package/build/_next/static/media/671791babd225be4-s.p.woff2 +0 -0
  25. package/build/_next/static/media/c62d990acddde5f0-s.p.woff2 +0 -0
  26. package/build/_next/static/media/dfdbb1c4973e0bd7-s.p.woff2 +0 -0
  27. package/build/components/Accordion/index.js +1170 -0
  28. package/build/components/Accordion/index.js.map +1 -0
  29. package/build/components/Accordion/style.css +2 -0
  30. package/build/components/Accordion/style.css.map +1 -0
  31. package/build/components/Alert/index.js +1920 -0
  32. package/build/components/Alert/index.js.map +1 -0
  33. package/build/components/Alert/style.css +2 -0
  34. package/build/components/Alert/style.css.map +1 -0
  35. package/build/components/Badge/index.js +6 -3
  36. package/build/components/Badge/index.js.map +1 -1
  37. package/build/components/Badge/style.css +1 -1
  38. package/build/components/Badge/style.css.map +1 -1
  39. package/build/components/Breadcrumbs/index.js +687 -0
  40. package/build/components/Breadcrumbs/index.js.map +1 -0
  41. package/build/components/Breadcrumbs/style.css +2 -0
  42. package/build/components/Breadcrumbs/style.css.map +1 -0
  43. package/build/components/Button/index.js +734 -0
  44. package/build/components/Button/index.js.map +1 -0
  45. package/build/components/Button/style.css +2 -0
  46. package/build/components/Button/style.css.map +1 -0
  47. package/build/components/Buttons/index.js +614 -0
  48. package/build/components/Buttons/index.js.map +1 -0
  49. package/build/components/Buttons/style.css +2 -0
  50. package/build/components/Buttons/style.css.map +1 -0
  51. package/build/components/Container/index.js +611 -0
  52. package/build/components/Container/index.js.map +1 -0
  53. package/build/components/Container/style.css +2 -0
  54. package/build/components/Container/style.css.map +1 -0
  55. package/build/components/Grid/index.js +1082 -0
  56. package/build/components/Grid/index.js.map +1 -0
  57. package/build/components/Grid/style.css +2 -0
  58. package/build/components/Grid/style.css.map +1 -0
  59. package/build/components/Icon/index.js +628 -0
  60. package/build/components/Icon/index.js.map +1 -0
  61. package/build/components/Icon/style.css +2 -0
  62. package/build/components/Icon/style.css.map +1 -0
  63. package/build/components/Image/index.js +659 -0
  64. package/build/components/Image/index.js.map +1 -0
  65. package/build/components/Image/style.css +2 -0
  66. package/build/components/Image/style.css.map +1 -0
  67. package/build/components/Link/index.js +173 -0
  68. package/build/components/Link/index.js.map +1 -0
  69. package/build/components/Link/style.css +2 -0
  70. package/build/components/Link/style.css.map +1 -0
  71. package/build/components/Modal/index.js +3170 -0
  72. package/build/components/Modal/index.js.map +1 -0
  73. package/build/components/Modal/style.css +2 -0
  74. package/build/components/Modal/style.css.map +1 -0
  75. package/build/components/Section/index.js +632 -0
  76. package/build/components/Section/index.js.map +1 -0
  77. package/build/components/Section/style.css +2 -0
  78. package/build/components/Section/style.css.map +1 -0
  79. package/build/components/Tabs/index.js +1056 -0
  80. package/build/components/Tabs/index.js.map +1 -0
  81. package/build/components/Tabs/style.css +2 -0
  82. package/build/components/Tabs/style.css.map +1 -0
  83. package/build/components/alert.html +2 -0
  84. package/build/components/alert.txt +30 -0
  85. package/build/components/badge.html +4 -1
  86. package/build/components/badge.txt +23 -18
  87. package/build/components/button.html +2 -0
  88. package/build/components/button.txt +27 -0
  89. package/build/components/buttons.html +1 -0
  90. package/build/components/buttons.txt +27 -0
  91. package/build/components/icon.html +1 -0
  92. package/build/components/icon.txt +23 -0
  93. package/build/components/index.css +1 -1
  94. package/build/components/index.css.map +1 -1
  95. package/build/components/index.js +3079 -17
  96. package/build/components/index.js.map +1 -1
  97. package/build/components/modal.html +1 -0
  98. package/build/components/modal.txt +29 -0
  99. package/build/components/static.js +1261 -17
  100. package/build/components/static.js.map +1 -1
  101. package/build/components/tabs.html +1 -0
  102. package/build/components/tabs.txt +27 -0
  103. package/build/components/types/components/Alert/Alert.d.ts +25 -0
  104. package/build/components/types/components/Alert/data.d.ts +7 -0
  105. package/build/components/types/components/Alert/index.d.ts +2 -0
  106. package/build/components/types/{Badge → components/Badge}/Badge.d.ts +2 -2
  107. package/build/components/types/components/Badge/index.d.ts +2 -0
  108. package/build/components/types/components/Button/Button.d.ts +25 -0
  109. package/build/components/types/components/Button/IconButton.d.ts +18 -0
  110. package/build/components/types/components/Button/index.d.ts +17 -0
  111. package/build/components/types/components/Buttons/Buttons.d.ts +8 -0
  112. package/build/components/types/components/Buttons/index.d.ts +2 -0
  113. package/build/components/types/components/Container/Container.d.ts +6 -0
  114. package/build/components/types/components/Container/index.d.ts +3 -0
  115. package/build/components/types/components/Icon/Icon.d.ts +18 -0
  116. package/build/components/types/components/Icon/SpritePathContext.d.ts +8 -0
  117. package/build/components/types/components/Icon/index.d.ts +3 -0
  118. package/build/components/types/components/Modal/Modal.d.ts +33 -0
  119. package/build/components/types/components/Modal/Modal.static.d.ts +33 -0
  120. package/build/components/types/components/Modal/ModalBody.d.ts +10 -0
  121. package/build/components/types/components/Modal/ModalCloseButton.d.ts +8 -0
  122. package/build/components/types/components/Modal/ModalTitle.d.ts +9 -0
  123. package/build/components/types/components/Modal/index.d.ts +5 -0
  124. package/build/components/types/components/Section/Section.d.ts +23 -0
  125. package/build/components/types/components/Section/index.d.ts +2 -0
  126. package/build/components/types/components/Tabs/Tab.d.ts +13 -0
  127. package/build/components/types/components/Tabs/TabPanel.d.ts +14 -0
  128. package/build/components/types/components/Tabs/Tabs.d.ts +33 -0
  129. package/build/components/types/components/Tabs/Tabs.static.d.ts +28 -0
  130. package/build/components/types/components/Tabs/index.d.ts +4 -0
  131. package/build/components/types/components/index.d.ts +11 -0
  132. package/build/components/types/utils/ConditionalWrapper.d.ts +13 -0
  133. package/build/components/types/utils/constants.d.ts +18 -0
  134. package/build/components/types/utils/generateId.d.ts +6 -0
  135. package/build/components/types/utils/hooks.d.ts +29 -0
  136. package/build/components/types/utils/keyboard.d.ts +14 -0
  137. package/build/fonts/HelveticaNeue-Bold.woff2 +0 -0
  138. package/build/fonts/HelveticaNeue-Light.woff2 +0 -0
  139. package/build/fonts/HelveticaNeue-Roman.woff2 +0 -0
  140. package/build/index.html +11 -46
  141. package/build/index.txt +22 -17
  142. package/build/lib/after-components.css +1 -1
  143. package/build/lib/after-components.css.map +1 -1
  144. package/build/lib/before-components.css +1 -1
  145. package/build/lib/before-components.css.map +1 -1
  146. package/build/lib/components.css +1 -1
  147. package/build/lib/components.css.map +1 -1
  148. package/build/lib/fonts.css +1 -1
  149. package/build/lib/fonts.css.map +1 -1
  150. package/build/lib/scripts.js +1261 -17
  151. package/build/lib/scripts.js.map +1 -1
  152. package/build/lib/style.css +1 -1
  153. package/build/lib/style.css.map +1 -1
  154. package/build/sprite.svg +1 -0
  155. package/package.json +8 -4
  156. package/public/fonts/HelveticaNeue-Bold.woff2 +0 -0
  157. package/public/fonts/HelveticaNeue-Light.woff2 +0 -0
  158. package/public/fonts/HelveticaNeue-Roman.woff2 +0 -0
  159. package/src/assets/icons/4g.svg +1 -0
  160. package/src/assets/icons/5g.svg +1 -0
  161. package/src/assets/icons/accessibility-mobility.svg +1 -0
  162. package/src/assets/icons/accessibility-motor.svg +1 -0
  163. package/src/assets/icons/accessibility-vision.svg +1 -0
  164. package/src/assets/icons/accessibility.svg +1 -0
  165. package/src/assets/icons/add.svg +1 -0
  166. package/src/assets/icons/advertising.svg +1 -0
  167. package/src/assets/icons/aeroplane.svg +1 -0
  168. package/src/assets/icons/age-rating-3.svg +1 -0
  169. package/src/assets/icons/airbox-auto.svg +1 -0
  170. package/src/assets/icons/alias-numbers.svg +1 -0
  171. package/src/assets/icons/android-manage.svg +1 -0
  172. package/src/assets/icons/antenna.svg +1 -0
  173. package/src/assets/icons/apartment-building.svg +1 -0
  174. package/src/assets/icons/apps.svg +1 -0
  175. package/src/assets/icons/assistance.svg +1 -0
  176. package/src/assets/icons/assistent.svg +1 -0
  177. package/src/assets/icons/at.svg +1 -0
  178. package/src/assets/icons/avatar.svg +1 -0
  179. package/src/assets/icons/backup-internet.svg +1 -0
  180. package/src/assets/icons/bank.svg +1 -0
  181. package/src/assets/icons/battery-charging.svg +1 -0
  182. package/src/assets/icons/battery-full.svg +1 -0
  183. package/src/assets/icons/battery-status-1-3.svg +1 -0
  184. package/src/assets/icons/battery-status-charging.svg +1 -0
  185. package/src/assets/icons/battery-status-full.svg +1 -0
  186. package/src/assets/icons/bed.svg +1 -0
  187. package/src/assets/icons/birth.svg +1 -0
  188. package/src/assets/icons/birthday.svg +1 -0
  189. package/src/assets/icons/bluetooth.svg +1 -0
  190. package/src/assets/icons/boarding-pass.svg +1 -0
  191. package/src/assets/icons/book-award.svg +1 -0
  192. package/src/assets/icons/book.svg +1 -0
  193. package/src/assets/icons/boxes.svg +1 -0
  194. package/src/assets/icons/briefcase.svg +1 -0
  195. package/src/assets/icons/browser-plug-in.svg +1 -0
  196. package/src/assets/icons/business-advisor.svg +1 -0
  197. package/src/assets/icons/business-consultant.svg +1 -0
  198. package/src/assets/icons/business-lounge.svg +1 -0
  199. package/src/assets/icons/buy.svg +1 -0
  200. package/src/assets/icons/calendar-30.svg +1 -0
  201. package/src/assets/icons/calendar-alarm.svg +1 -0
  202. package/src/assets/icons/calendar-day.svg +1 -0
  203. package/src/assets/icons/calendar-month.svg +1 -0
  204. package/src/assets/icons/call-in.svg +1 -0
  205. package/src/assets/icons/call-out.svg +1 -0
  206. package/src/assets/icons/call.svg +1 -0
  207. package/src/assets/icons/camera.svg +1 -0
  208. package/src/assets/icons/car-park.svg +1 -0
  209. package/src/assets/icons/car.svg +1 -0
  210. package/src/assets/icons/card-reader.svg +1 -0
  211. package/src/assets/icons/casting.svg +1 -0
  212. package/src/assets/icons/cest-ici.svg +1 -0
  213. package/src/assets/icons/charger.svg +1 -0
  214. package/src/assets/icons/chatbot.svg +1 -0
  215. package/src/assets/icons/check-your-balance.svg +1 -0
  216. package/src/assets/icons/checked.svg +1 -0
  217. package/src/assets/icons/chevron-down.svg +1 -0
  218. package/src/assets/icons/chevron-end.svg +1 -0
  219. package/src/assets/icons/chevron-left.svg +1 -0
  220. package/src/assets/icons/chevron-right.svg +1 -0
  221. package/src/assets/icons/chevron-start.svg +1 -0
  222. package/src/assets/icons/chevron-up.svg +1 -0
  223. package/src/assets/icons/child.svg +1 -0
  224. package/src/assets/icons/children-channel.svg +1 -0
  225. package/src/assets/icons/childrens-content.svg +1 -0
  226. package/src/assets/icons/christmas-tree.svg +1 -0
  227. package/src/assets/icons/cinema-ticket-2-for-1.svg +1 -0
  228. package/src/assets/icons/cle-pc.svg +1 -0
  229. package/src/assets/icons/clock.svg +1 -0
  230. package/src/assets/icons/close.svg +5 -0
  231. package/src/assets/icons/closed-captions.svg +1 -0
  232. package/src/assets/icons/cloud-backup.svg +1 -0
  233. package/src/assets/icons/cloud-security.svg +1 -0
  234. package/src/assets/icons/collective-class-training.svg +1 -0
  235. package/src/assets/icons/community-sms.svg +1 -0
  236. package/src/assets/icons/company-structure.svg +1 -0
  237. package/src/assets/icons/connections.svg +1 -0
  238. package/src/assets/icons/control-centre.svg +1 -0
  239. package/src/assets/icons/control-my-data.svg +3 -0
  240. package/src/assets/icons/cpu.svg +1 -0
  241. package/src/assets/icons/currency-euro.svg +1 -0
  242. package/src/assets/icons/cyber-shield.svg +1 -0
  243. package/src/assets/icons/dashboard-display.svg +1 -0
  244. package/src/assets/icons/data-analytics.svg +1 -0
  245. package/src/assets/icons/data-centre.svg +1 -0
  246. package/src/assets/icons/data-services.svg +1 -0
  247. package/src/assets/icons/data-traffic.svg +1 -0
  248. package/src/assets/icons/data.svg +1 -0
  249. package/src/assets/icons/delete.svg +1 -0
  250. package/src/assets/icons/desk-phone.svg +1 -0
  251. package/src/assets/icons/desktop-pc.svg +1 -0
  252. package/src/assets/icons/device-fixed-line-phone.svg +1 -0
  253. package/src/assets/icons/device-laptop-computer-connected.svg +1 -0
  254. package/src/assets/icons/device-laptop-computer.svg +1 -0
  255. package/src/assets/icons/device-smart-phone.svg +1 -0
  256. package/src/assets/icons/device-tablet.svg +1 -0
  257. package/src/assets/icons/device-tv.svg +1 -0
  258. package/src/assets/icons/diagnostic.svg +1 -0
  259. package/src/assets/icons/digital-frame.svg +1 -0
  260. package/src/assets/icons/discussion-more.svg +1 -0
  261. package/src/assets/icons/doctor.svg +1 -0
  262. package/src/assets/icons/documentary.svg +1 -0
  263. package/src/assets/icons/donation.svg +1 -0
  264. package/src/assets/icons/download-file.svg +1 -0
  265. package/src/assets/icons/download.svg +1 -0
  266. package/src/assets/icons/e-reader.svg +1 -0
  267. package/src/assets/icons/e-shop.svg +1 -0
  268. package/src/assets/icons/easy-internet.svg +1 -0
  269. package/src/assets/icons/eco-mode.svg +1 -0
  270. package/src/assets/icons/edit.svg +1 -0
  271. package/src/assets/icons/electrcar.svg +1 -0
  272. package/src/assets/icons/email.svg +1 -0
  273. package/src/assets/icons/employees.svg +1 -0
  274. package/src/assets/icons/empty-trash.svg +1 -0
  275. package/src/assets/icons/entertainment.svg +1 -0
  276. package/src/assets/icons/epg.svg +1 -0
  277. package/src/assets/icons/error-severe.svg +1 -0
  278. package/src/assets/icons/ethernet.svg +1 -0
  279. package/src/assets/icons/euro.svg +1 -0
  280. package/src/assets/icons/exit.svg +1 -0
  281. package/src/assets/icons/facebook-2.svg +1 -0
  282. package/src/assets/icons/facebook.svg +1 -0
  283. package/src/assets/icons/factory.svg +1 -0
  284. package/src/assets/icons/family-place.svg +1 -0
  285. package/src/assets/icons/fashion.svg +1 -0
  286. package/src/assets/icons/fast-delivery.svg +1 -0
  287. package/src/assets/icons/file-compressed.svg +1 -0
  288. package/src/assets/icons/file-copy.svg +1 -0
  289. package/src/assets/icons/file-document-compose.svg +1 -0
  290. package/src/assets/icons/file-download.svg +1 -0
  291. package/src/assets/icons/file-draft-edit.svg +1 -0
  292. package/src/assets/icons/file-pdf.svg +1 -0
  293. package/src/assets/icons/file-terms-and-conditions.svg +1 -0
  294. package/src/assets/icons/files.svg +1 -0
  295. package/src/assets/icons/film.svg +1 -0
  296. package/src/assets/icons/filter.svg +1 -0
  297. package/src/assets/icons/finance.svg +1 -0
  298. package/src/assets/icons/firewall.svg +1 -0
  299. package/src/assets/icons/flag.svg +1 -0
  300. package/src/assets/icons/flashlight.svg +1 -0
  301. package/src/assets/icons/flexible-storage.svg +1 -0
  302. package/src/assets/icons/folder.svg +1 -0
  303. package/src/assets/icons/football-match.svg +1 -0
  304. package/src/assets/icons/football-quiz.svg +1 -0
  305. package/src/assets/icons/football.svg +1 -0
  306. package/src/assets/icons/form-tick.svg +1 -0
  307. package/src/assets/icons/front-end-dashboard.svg +1 -0
  308. package/src/assets/icons/funny.svg +1 -0
  309. package/src/assets/icons/futher-education.svg +1 -0
  310. package/src/assets/icons/games.svg +1 -0
  311. package/src/assets/icons/garage-closed.svg +1 -0
  312. package/src/assets/icons/gauge-rate.svg +1 -0
  313. package/src/assets/icons/gears.svg +1 -0
  314. package/src/assets/icons/geolocation.svg +1 -0
  315. package/src/assets/icons/guide-info.svg +1 -0
  316. package/src/assets/icons/hammer.svg +1 -0
  317. package/src/assets/icons/hand-shake.svg +1 -0
  318. package/src/assets/icons/hard-drive.svg +1 -0
  319. package/src/assets/icons/hdmi-key.svg +1 -0
  320. package/src/assets/icons/headphones.svg +1 -0
  321. package/src/assets/icons/health-app.svg +1 -0
  322. package/src/assets/icons/health-monitor.svg +1 -0
  323. package/src/assets/icons/health-patient.svg +1 -0
  324. package/src/assets/icons/heart.svg +1 -0
  325. package/src/assets/icons/home-appliance.svg +1 -0
  326. package/src/assets/icons/home.svg +1 -0
  327. package/src/assets/icons/homelive.svg +1 -0
  328. package/src/assets/icons/hourglass.svg +1 -0
  329. package/src/assets/icons/house.svg +1 -0
  330. package/src/assets/icons/id-card.svg +1 -0
  331. package/src/assets/icons/image.svg +1 -0
  332. package/src/assets/icons/important.svg +1 -0
  333. package/src/assets/icons/improvement.svg +1 -0
  334. package/src/assets/icons/inbox.svg +1 -0
  335. package/src/assets/icons/info.svg +1 -0
  336. package/src/assets/icons/information-data.svg +1 -0
  337. package/src/assets/icons/instagram.svg +1 -0
  338. package/src/assets/icons/international-globe.svg +1 -0
  339. package/src/assets/icons/internet-browser.svg +1 -0
  340. package/src/assets/icons/internet-security-desktop.svg +1 -0
  341. package/src/assets/icons/internet-security-mobile.svg +1 -0
  342. package/src/assets/icons/internet-security-password.svg +1 -0
  343. package/src/assets/icons/internet-usage.svg +1 -0
  344. package/src/assets/icons/internet.svg +1 -0
  345. package/src/assets/icons/invoice-euro.svg +1 -0
  346. package/src/assets/icons/invoices-euro.svg +1 -0
  347. package/src/assets/icons/iso.svg +1 -0
  348. package/src/assets/icons/it-infrastructure.svg +1 -0
  349. package/src/assets/icons/keyboard.svg +1 -0
  350. package/src/assets/icons/la-cle-tv.svg +1 -0
  351. package/src/assets/icons/laptop-connected.svg +1 -0
  352. package/src/assets/icons/laptop.svg +1 -0
  353. package/src/assets/icons/le-vote.svg +1 -0
  354. package/src/assets/icons/link.svg +1 -0
  355. package/src/assets/icons/linkedin-2.svg +1 -0
  356. package/src/assets/icons/linkedin.svg +1 -0
  357. package/src/assets/icons/location-on-map.svg +1 -0
  358. package/src/assets/icons/location-pin.svg +1 -0
  359. package/src/assets/icons/lock-open.svg +1 -0
  360. package/src/assets/icons/lock.svg +1 -0
  361. package/src/assets/icons/logistics.svg +1 -0
  362. package/src/assets/icons/love-logo.svg +1 -0
  363. package/src/assets/icons/mahali.svg +1 -0
  364. package/src/assets/icons/maintenance-man.svg +1 -0
  365. package/src/assets/icons/map-pin.svg +1 -0
  366. package/src/assets/icons/map.svg +1 -0
  367. package/src/assets/icons/medal.svg +1 -0
  368. package/src/assets/icons/medical-app.svg +1 -0
  369. package/src/assets/icons/medical-chart.svg +1 -0
  370. package/src/assets/icons/medicine.svg +1 -0
  371. package/src/assets/icons/menu-arrow.svg +1 -0
  372. package/src/assets/icons/menu-grid.svg +1 -0
  373. package/src/assets/icons/menu.svg +1 -0
  374. package/src/assets/icons/message-alert.svg +1 -0
  375. package/src/assets/icons/messages.svg +1 -0
  376. package/src/assets/icons/micro-sd-card.svg +1 -0
  377. package/src/assets/icons/microphone-mute.svg +1 -0
  378. package/src/assets/icons/microphone.svg +1 -0
  379. package/src/assets/icons/mini-games.svg +1 -0
  380. package/src/assets/icons/mobile-applications.svg +1 -0
  381. package/src/assets/icons/mobile-data-toggle.svg +1 -0
  382. package/src/assets/icons/mobile-insurance.svg +1 -0
  383. package/src/assets/icons/mobile-network-coverage.svg +1 -0
  384. package/src/assets/icons/mobile-payment.svg +1 -0
  385. package/src/assets/icons/mobile-security.svg +1 -0
  386. package/src/assets/icons/mobile-setup.svg +1 -0
  387. package/src/assets/icons/modem.svg +1 -0
  388. package/src/assets/icons/modifier-delete.svg +1 -0
  389. package/src/assets/icons/modifier-done.svg +1 -0
  390. package/src/assets/icons/modifier-download.svg +1 -0
  391. package/src/assets/icons/modifier-upload.svg +1 -0
  392. package/src/assets/icons/money-box.svg +1 -0
  393. package/src/assets/icons/more-dots.svg +1 -0
  394. package/src/assets/icons/multi-sim.svg +1 -0
  395. package/src/assets/icons/music.svg +1 -0
  396. package/src/assets/icons/my-account.svg +1 -0
  397. package/src/assets/icons/my-orange.svg +1 -0
  398. package/src/assets/icons/my-skills.svg +1 -0
  399. package/src/assets/icons/my-vacation.svg +1 -0
  400. package/src/assets/icons/network-dslam.svg +1 -0
  401. package/src/assets/icons/network-gatekeeper.svg +1 -0
  402. package/src/assets/icons/network-gateway.svg +1 -0
  403. package/src/assets/icons/network-optical-amplifier.svg +1 -0
  404. package/src/assets/icons/network-optical-transport.svg +1 -0
  405. package/src/assets/icons/network-wan-optimisation-engine.svg +1 -0
  406. package/src/assets/icons/networks.svg +1 -0
  407. package/src/assets/icons/newspaper.svg +1 -0
  408. package/src/assets/icons/not-checked.svg +1 -0
  409. package/src/assets/icons/notification-alert.svg +1 -0
  410. package/src/assets/icons/office.svg +1 -0
  411. package/src/assets/icons/online-help.svg +1 -0
  412. package/src/assets/icons/orange-assistant.svg +1 -0
  413. package/src/assets/icons/orange-cash.svg +1 -0
  414. package/src/assets/icons/orange-detente.svg +1 -0
  415. package/src/assets/icons/orange-dialler.svg +1 -0
  416. package/src/assets/icons/orange-events.svg +1 -0
  417. package/src/assets/icons/orange-experts-expert.svg +1 -0
  418. package/src/assets/icons/orange-experts-insurance.svg +1 -0
  419. package/src/assets/icons/orange-experts-orange-business-consultant.svg +1 -0
  420. package/src/assets/icons/orange-experts-recycle.svg +1 -0
  421. package/src/assets/icons/orange-experts-repair.svg +1 -0
  422. package/src/assets/icons/orange-football-club.svg +1 -0
  423. package/src/assets/icons/orange-games.svg +1 -0
  424. package/src/assets/icons/orange-messenger.svg +1 -0
  425. package/src/assets/icons/orange-money-nfc.svg +1 -0
  426. package/src/assets/icons/orange-reflect.svg +1 -0
  427. package/src/assets/icons/orange-rewards.svg +1 -0
  428. package/src/assets/icons/orange-tv.svg +1 -0
  429. package/src/assets/icons/orange-vr-experience.svg +1 -0
  430. package/src/assets/icons/outbox.svg +1 -0
  431. package/src/assets/icons/package-content.svg +1 -0
  432. package/src/assets/icons/package-services.svg +1 -0
  433. package/src/assets/icons/package.svg +1 -0
  434. package/src/assets/icons/packaging-icon-hd.svg +1 -0
  435. package/src/assets/icons/parabole-tv.svg +1 -0
  436. package/src/assets/icons/parental-control.svg +1 -0
  437. package/src/assets/icons/pause.svg +1 -0
  438. package/src/assets/icons/payment-card.svg +1 -0
  439. package/src/assets/icons/payment-euro.svg +1 -0
  440. package/src/assets/icons/pda.svg +1 -0
  441. package/src/assets/icons/pdf-file.svg +1 -0
  442. package/src/assets/icons/pencil.svg +1 -0
  443. package/src/assets/icons/personal-hotspot.svg +1 -0
  444. package/src/assets/icons/personal-smartphone-trainer.svg +1 -0
  445. package/src/assets/icons/phone-advisor.svg +1 -0
  446. package/src/assets/icons/play-and-win.svg +1 -0
  447. package/src/assets/icons/play.svg +1 -0
  448. package/src/assets/icons/plug-socket.svg +1 -0
  449. package/src/assets/icons/power.svg +1 -0
  450. package/src/assets/icons/powerstation.svg +1 -0
  451. package/src/assets/icons/presentation.svg +1 -0
  452. package/src/assets/icons/print.svg +1 -0
  453. package/src/assets/icons/printer.svg +1 -0
  454. package/src/assets/icons/real-time.svg +1 -0
  455. package/src/assets/icons/recycle-device.svg +1 -0
  456. package/src/assets/icons/recycle.svg +1 -0
  457. package/src/assets/icons/reduction.svg +1 -0
  458. package/src/assets/icons/reload.svg +1 -0
  459. package/src/assets/icons/reminders.svg +1 -0
  460. package/src/assets/icons/remote-desktop-protocol.svg +1 -0
  461. package/src/assets/icons/remove.svg +1 -0
  462. package/src/assets/icons/repair.svg +1 -0
  463. package/src/assets/icons/reseau.svg +1 -0
  464. package/src/assets/icons/restaurant.svg +1 -0
  465. package/src/assets/icons/rewards.svg +1 -0
  466. package/src/assets/icons/running.svg +1 -0
  467. package/src/assets/icons/safety.svg +1 -0
  468. package/src/assets/icons/satallite.svg +1 -0
  469. package/src/assets/icons/save.svg +1 -0
  470. package/src/assets/icons/school.svg +1 -0
  471. package/src/assets/icons/science.svg +1 -0
  472. package/src/assets/icons/sd-card.svg +1 -0
  473. package/src/assets/icons/search.svg +1 -0
  474. package/src/assets/icons/security-status-good.svg +1 -0
  475. package/src/assets/icons/send.svg +1 -0
  476. package/src/assets/icons/senior-person.svg +1 -0
  477. package/src/assets/icons/server-storage-array.svg +1 -0
  478. package/src/assets/icons/server-tower.svg +1 -0
  479. package/src/assets/icons/session-enter.svg +1 -0
  480. package/src/assets/icons/session-leave.svg +1 -0
  481. package/src/assets/icons/settings.svg +1 -0
  482. package/src/assets/icons/share.svg +1 -0
  483. package/src/assets/icons/shop-pin.svg +1 -0
  484. package/src/assets/icons/shop.svg +1 -0
  485. package/src/assets/icons/showroom-mobile-pro.svg +1 -0
  486. package/src/assets/icons/signal-5-5.svg +1 -0
  487. package/src/assets/icons/silence.svg +1 -0
  488. package/src/assets/icons/sim-e.svg +1 -0
  489. package/src/assets/icons/sim.svg +1 -0
  490. package/src/assets/icons/simple-mode.svg +1 -0
  491. package/src/assets/icons/simplicity.svg +1 -0
  492. package/src/assets/icons/siren.svg +1 -0
  493. package/src/assets/icons/skiing.svg +1 -0
  494. package/src/assets/icons/skip-to-end.svg +1 -0
  495. package/src/assets/icons/skip-to-start.svg +1 -0
  496. package/src/assets/icons/sleep.svg +1 -0
  497. package/src/assets/icons/smart-care.svg +1 -0
  498. package/src/assets/icons/smart-home.svg +1 -0
  499. package/src/assets/icons/smart-tap.svg +1 -0
  500. package/src/assets/icons/smart-watch.svg +1 -0
  501. package/src/assets/icons/sms-alert.svg +1 -0
  502. package/src/assets/icons/sms-message-compose.svg +1 -0
  503. package/src/assets/icons/sms-message.svg +1 -0
  504. package/src/assets/icons/social-network.svg +1 -0
  505. package/src/assets/icons/sofa.svg +1 -0
  506. package/src/assets/icons/sort.svg +1 -0
  507. package/src/assets/icons/stadium.svg +1 -0
  508. package/src/assets/icons/star-empty.svg +1 -0
  509. package/src/assets/icons/star-favourite-half.svg +1 -0
  510. package/src/assets/icons/star-favourite.svg +1 -0
  511. package/src/assets/icons/startover.svg +1 -0
  512. package/src/assets/icons/statistics.svg +1 -0
  513. package/src/assets/icons/stop-secret.svg +1 -0
  514. package/src/assets/icons/storage-cloud.svg +1 -0
  515. package/src/assets/icons/store-locator.svg +1 -0
  516. package/src/assets/icons/street.svg +1 -0
  517. package/src/assets/icons/subscription-package.svg +1 -0
  518. package/src/assets/icons/suitcase.svg +1 -0
  519. package/src/assets/icons/support.svg +1 -0
  520. package/src/assets/icons/surveillance-camera.svg +1 -0
  521. package/src/assets/icons/syncronise.svg +1 -0
  522. package/src/assets/icons/tag-advertising.svg +1 -0
  523. package/src/assets/icons/tag.svg +1 -0
  524. package/src/assets/icons/target-location.svg +1 -0
  525. package/src/assets/icons/tarif.svg +1 -0
  526. package/src/assets/icons/task-list.svg +1 -0
  527. package/src/assets/icons/team-connect.svg +1 -0
  528. package/src/assets/icons/thumb-up.svg +1 -0
  529. package/src/assets/icons/tick.svg +1 -0
  530. package/src/assets/icons/ticket.svg +1 -0
  531. package/src/assets/icons/top-up-card-euro.svg +1 -0
  532. package/src/assets/icons/top-up-euro.svg +1 -0
  533. package/src/assets/icons/top-up-time.svg +1 -0
  534. package/src/assets/icons/town.svg +1 -0
  535. package/src/assets/icons/townhall.svg +1 -0
  536. package/src/assets/icons/train.svg +1 -0
  537. package/src/assets/icons/training-session.svg +1 -0
  538. package/src/assets/icons/tranquility.svg +1 -0
  539. package/src/assets/icons/transfer-data.svg +1 -0
  540. package/src/assets/icons/transfers.svg +1 -0
  541. package/src/assets/icons/trash.svg +1 -0
  542. package/src/assets/icons/tv-channel-list.svg +1 -0
  543. package/src/assets/icons/tv-commande.svg +1 -0
  544. package/src/assets/icons/unlimited-calls.svg +1 -0
  545. package/src/assets/icons/upload.svg +1 -0
  546. package/src/assets/icons/usb-hard-drive.svg +1 -0
  547. package/src/assets/icons/usb-key.svg +1 -0
  548. package/src/assets/icons/user-manual.svg +1 -0
  549. package/src/assets/icons/user.svg +1 -0
  550. package/src/assets/icons/video-call.svg +1 -0
  551. package/src/assets/icons/video-live.svg +1 -0
  552. package/src/assets/icons/video-phone.svg +1 -0
  553. package/src/assets/icons/video-record.svg +1 -0
  554. package/src/assets/icons/video.svg +1 -0
  555. package/src/assets/icons/vip-contact.svg +1 -0
  556. package/src/assets/icons/virtual-gamepad.svg +1 -0
  557. package/src/assets/icons/vod-portrait.svg +1 -0
  558. package/src/assets/icons/volte.svg +1 -0
  559. package/src/assets/icons/volume-status-4-4.svg +1 -0
  560. package/src/assets/icons/vowifi.svg +1 -0
  561. package/src/assets/icons/wallet.svg +1 -0
  562. package/src/assets/icons/warning-important.svg +1 -0
  563. package/src/assets/icons/washroom.svg +1 -0
  564. package/src/assets/icons/watch.svg +1 -0
  565. package/src/assets/icons/water.svg +1 -0
  566. package/src/assets/icons/weather.svg +1 -0
  567. package/src/assets/icons/web-browser.svg +1 -0
  568. package/src/assets/icons/web-camera.svg +1 -0
  569. package/src/assets/icons/weighing-scales.svg +1 -0
  570. package/src/assets/icons/widget.svg +1 -0
  571. package/src/assets/icons/wifi-home.svg +1 -0
  572. package/src/assets/icons/wifi.svg +1 -0
  573. package/src/assets/icons/x.svg +1 -0
  574. package/src/assets/icons/your-balance.svg +1 -0
  575. package/src/assets/icons/youtube.svg +1 -0
  576. package/src/assets/icons/zoom-in.svg +1 -0
  577. package/src/assets/icons/zoom-out.svg +1 -0
  578. package/src/assets/images/developers/hands-with-phones.svg +90 -0
  579. package/src/assets/images/developers/iphone-size-2x.png +0 -0
  580. package/src/assets/images/developers/iphone-xr-white-select.png +0 -0
  581. package/src/assets/images/developers/phones.png +0 -0
  582. package/src/assets/images/developers/router.png +0 -0
  583. package/src/assets/images/developers/rule-component-block.png +0 -0
  584. package/src/assets/images/developers/rule-component-inline.png +0 -0
  585. package/src/assets/images/developers/rule-container.png +0 -0
  586. package/src/assets/images/developers/rule-content.png +0 -0
  587. package/src/assets/images/developers/two-phones.png +0 -0
  588. package/src/assets/logo/logo.svg +1 -0
  589. package/src/components/Accordion/Accordion.mdx +222 -0
  590. package/src/components/Accordion/Accordion.static.ts +104 -0
  591. package/src/components/Accordion/Accordion.tsx +70 -0
  592. package/src/components/Accordion/AccordionHeader.tsx +59 -0
  593. package/src/components/Accordion/AccordionItem.tsx +76 -0
  594. package/src/components/Accordion/HeadingContext.tsx +5 -0
  595. package/src/components/Accordion/index.ts +4 -0
  596. package/src/components/Accordion/styles/config.scss +8 -0
  597. package/src/components/Accordion/styles/mixins.scss +91 -0
  598. package/src/components/Accordion/styles/style.scss +47 -0
  599. package/src/components/Accordion/tests/Accordion.static.test.js +207 -0
  600. package/src/components/Accordion/tests/Accordion.unit.test.js +822 -0
  601. package/src/components/Accordion/tests/data.js +18 -0
  602. package/src/components/Alert/Alert.mdx +141 -0
  603. package/src/components/Alert/Alert.tsx +119 -0
  604. package/src/components/Alert/CHANGELOG.md +33 -0
  605. package/src/components/Alert/data.ts +8 -0
  606. package/src/components/Alert/index.ts +3 -0
  607. package/src/components/Alert/styles/config.scss +58 -0
  608. package/src/components/Alert/styles/mixins.scss +54 -0
  609. package/src/components/Alert/styles/style.scss +44 -0
  610. package/src/components/Alert/tests/Alert.conformance.test.js +30 -0
  611. package/src/components/Alert/tests/Alert.test.js +87 -0
  612. package/src/components/Badge/Badge.tsx +5 -3
  613. package/src/components/Badge/index.ts +1 -1
  614. package/src/components/Badge/styles/config.scss +53 -17
  615. package/src/components/Badge/styles/mixins.scss +8 -2
  616. package/src/components/Badge/styles/style.scss +7 -3
  617. package/src/components/Badge/tests/Badge.conformance.test.js +8 -8
  618. package/src/components/Badge/tests/Badge.unit.test.js +3 -3
  619. package/src/components/Breadcrumbs/BreadcrumbItem.tsx +54 -0
  620. package/src/components/Breadcrumbs/Breadcrumbs.mdx +84 -0
  621. package/src/components/Breadcrumbs/Breadcrumbs.tsx +60 -0
  622. package/src/components/Breadcrumbs/index.ts +5 -0
  623. package/src/components/Breadcrumbs/styles/config.scss +2 -0
  624. package/src/components/Breadcrumbs/styles/mixins.scss +105 -0
  625. package/src/components/Breadcrumbs/styles/style.scss +37 -0
  626. package/src/components/Breadcrumbs/tests/BreadcrumbItem.unit.test.js +295 -0
  627. package/src/components/Breadcrumbs/tests/Breadcrumbs.conformance.test.js +53 -0
  628. package/src/components/Breadcrumbs/tests/Breadcrumbs.integration.test.js +309 -0
  629. package/src/components/Breadcrumbs/tests/Breadcrumbs.unit.test.js +280 -0
  630. package/src/components/Button/Button.mdx +273 -0
  631. package/src/components/Button/Button.tsx +105 -0
  632. package/src/components/Button/IconButton.tsx +67 -0
  633. package/src/components/Button/index.tsx +23 -0
  634. package/src/components/Button/styles/config.scss +229 -0
  635. package/src/components/Button/styles/mixins.scss +164 -0
  636. package/src/components/Button/styles/style.scss +66 -0
  637. package/src/components/Button/tests/Button.conformance.test.js +37 -0
  638. package/src/components/Button/tests/Button.test.js +114 -0
  639. package/src/components/Button/tests/IconButton.unit.test.js +107 -0
  640. package/src/components/Buttons/Buttons.mdx +39 -0
  641. package/src/components/Buttons/Buttons.tsx +34 -0
  642. package/src/components/Buttons/index.ts +3 -0
  643. package/src/components/Buttons/styles/config.scss +3 -0
  644. package/src/components/Buttons/styles/mixins.scss +39 -0
  645. package/src/components/Buttons/styles/style.scss +10 -0
  646. package/src/components/Buttons/tests/Buttons.conformance.test.js +22 -0
  647. package/src/components/Buttons/tests/Buttons.unit.test.js +26 -0
  648. package/src/components/Container/Container.mdx +73 -0
  649. package/src/components/Container/Container.tsx +15 -0
  650. package/src/components/Container/index.ts +5 -0
  651. package/src/components/Container/styles/config.scss +11 -0
  652. package/src/components/Container/styles/mixins.scss +22 -0
  653. package/src/components/Container/styles/style.scss +5 -0
  654. package/src/components/Container/tests/Container.conformance.test.js +209 -0
  655. package/src/components/Container/tests/Container.unit.test.js +320 -0
  656. package/src/components/Grid/Grid.mdx +319 -0
  657. package/src/components/Grid/Grid.tsx +51 -0
  658. package/src/components/Grid/GridCol.tsx +33 -0
  659. package/src/components/Grid/index.ts +6 -0
  660. package/src/components/Grid/styles/config.scss +10 -0
  661. package/src/components/Grid/styles/mixins.scss +126 -0
  662. package/src/components/Grid/styles/style.scss +41 -0
  663. package/src/components/Grid/tests/Grid.unit.test.tsx +533 -0
  664. package/src/components/Grid/tests/GridCol.unit.test.tsx +199 -0
  665. package/src/components/Icon/Icon.mdx +172 -0
  666. package/src/components/Icon/Icon.tsx +73 -0
  667. package/src/components/Icon/IconSearch.jsx +247 -0
  668. package/src/components/Icon/SpritePathContext.tsx +22 -0
  669. package/src/components/Icon/iconSearchTags.ts +437 -0
  670. package/src/components/Icon/index.ts +5 -0
  671. package/src/components/Icon/styles/config.scss +27 -0
  672. package/src/components/Icon/styles/export/color.scss +8 -0
  673. package/src/components/Icon/styles/export/size.scss +13 -0
  674. package/src/components/Icon/styles/mixins.scss +31 -0
  675. package/src/components/Icon/styles/style.scss +13 -0
  676. package/src/components/Icon/tests/Icon.conformance.test.js +22 -0
  677. package/src/components/Icon/tests/Icon.unit.test.js +112 -0
  678. package/src/components/Image/Image.mdx +166 -0
  679. package/src/components/Image/Image.tsx +65 -0
  680. package/src/components/Image/index.ts +7 -0
  681. package/src/components/Image/styles/mixins.scss +12 -0
  682. package/src/components/Image/styles/style.scss +9 -0
  683. package/src/components/Image/tests/Image.conformance.test.js +264 -0
  684. package/src/components/Image/tests/Image.unit.test.js +338 -0
  685. package/src/components/Link/Link.mdx +224 -0
  686. package/src/components/Link/Link.tsx +52 -0
  687. package/src/components/Link/index.ts +3 -0
  688. package/src/components/Link/styles/config.scss +85 -0
  689. package/src/components/Link/styles/mixins.scss +42 -0
  690. package/src/components/Link/styles/style.scss +59 -0
  691. package/src/components/Link/tests/Link.conformance.test.js +302 -0
  692. package/src/components/Link/tests/Link.integration.test.js +393 -0
  693. package/src/components/Link/tests/Link.unit.test.js +308 -0
  694. package/src/components/Modal/Modal.mdx +449 -0
  695. package/src/components/Modal/Modal.static.ts +223 -0
  696. package/src/components/Modal/Modal.tsx +145 -0
  697. package/src/components/Modal/ModalBody.tsx +46 -0
  698. package/src/components/Modal/ModalCloseButton.tsx +26 -0
  699. package/src/components/Modal/ModalTitle.tsx +32 -0
  700. package/src/components/Modal/TODO.md +2 -0
  701. package/src/components/Modal/index.ts +6 -0
  702. package/src/components/Modal/styles/config.scss +42 -0
  703. package/src/components/Modal/styles/mixins.scss +200 -0
  704. package/src/components/Modal/styles/style.scss +97 -0
  705. package/src/components/Modal/tests/Modal.conformance.test.js +41 -0
  706. package/src/components/Modal/tests/Modal.unit.test.js +56 -0
  707. package/src/components/Modal/tests/ModalBody.unit.test.js +39 -0
  708. package/src/components/Modal/tests/ModalCloseButton.unit.test.js +84 -0
  709. package/src/components/Modal/tests/ModalTitle.unit.test.js +25 -0
  710. package/src/components/Section/Section.mdx +397 -0
  711. package/src/components/Section/Section.tsx +54 -0
  712. package/src/components/Section/index.ts +3 -0
  713. package/src/components/Section/styles/config.scss +38 -0
  714. package/src/components/Section/styles/mixins.scss +30 -0
  715. package/src/components/Section/styles/style.scss +35 -0
  716. package/src/components/Section/tests/Section.conformance.test.js +502 -0
  717. package/src/components/Section/tests/Section.unit.test.js +642 -0
  718. package/src/components/Tabs/TODO.md +2 -0
  719. package/src/components/Tabs/Tab.tsx +55 -0
  720. package/src/components/Tabs/TabPanel.tsx +42 -0
  721. package/src/components/Tabs/Tabs.mdx +373 -0
  722. package/src/components/Tabs/Tabs.static.ts +185 -0
  723. package/src/components/Tabs/Tabs.tsx +130 -0
  724. package/src/components/Tabs/index.ts +5 -0
  725. package/src/components/Tabs/styles/config.scss +78 -0
  726. package/src/components/Tabs/styles/mixins.scss +107 -0
  727. package/src/components/Tabs/styles/style.scss +64 -0
  728. package/src/components/Tabs/tests/Tab.unit.test.js +85 -0
  729. package/src/components/Tabs/tests/TabPanel.unit.test.js +53 -0
  730. package/src/components/Tabs/tests/Tabs.unit.test.js +260 -0
  731. package/src/components/index.ts +33 -2
  732. package/src/styles/base/globals.scss +18 -13
  733. package/src/styles/base/styleguide.scss +1 -1
  734. package/src/styles/before-components.scss +1 -1
  735. package/src/styles/export/breakpoint.ts +12 -0
  736. package/src/styles/export/color.scss +1 -1
  737. package/src/styles/tokens/base.scss +6 -4
  738. package/src/styles/tokens/color.scss +127 -25
  739. package/src/styles/tools/convert.scss +1 -1
  740. package/src/styles/typography/config.scss +187 -0
  741. package/src/{components/Typography/styles → styles/typography}/mixins.scss +31 -24
  742. package/src/{components/Typography/styles → styles/typography}/style.scss +9 -3
  743. package/src/styles/utilities/text.scss +2 -2
  744. package/build/.htaccess +0 -7
  745. package/build/_next/static/chunks/app/layout-69efc42b1696abf9.js +0 -1
  746. package/build/_next/static/chunks/app/page-687dfdffc8d1b6e5.js +0 -1
  747. package/build/_next/static/chunks/webpack-778f3ec87f8d2826.js +0 -1
  748. package/build/_next/static/css/08a2fcd6f5aac3e0.css +0 -1
  749. package/build/_next/static/css/d2fc2f581fe4b371.css +0 -1
  750. package/build/_next/static/rsiMOOYAxBtOjvpzBN4vJ/_buildManifest.js +0 -1
  751. package/build/_redirects +0 -1
  752. package/build/components/types/Badge/index.d.ts +0 -2
  753. package/build/components/types/index.d.ts +0 -4
  754. package/build/fonts/HelvNeue55_W1G.eot +0 -0
  755. package/build/fonts/HelvNeue55_W1G.svg +0 -653
  756. package/build/fonts/HelvNeue55_W1G.ttf +0 -0
  757. package/build/fonts/HelvNeue55_W1G.woff +0 -0
  758. package/build/fonts/HelvNeue55_W1G.woff2 +0 -0
  759. package/build/fonts/HelvNeue75_W1G.eot +0 -0
  760. package/build/fonts/HelvNeue75_W1G.svg +0 -653
  761. package/build/fonts/HelvNeue75_W1G.ttf +0 -0
  762. package/build/fonts/HelvNeue75_W1G.woff +0 -0
  763. package/build/fonts/HelvNeue75_W1G.woff2 +0 -0
  764. package/build/manifest.json +0 -15
  765. package/build/sprite-sg.svg +0 -1
  766. package/public/fonts/HelvNeue55_W1G.eot +0 -0
  767. package/public/fonts/HelvNeue55_W1G.svg +0 -653
  768. package/public/fonts/HelvNeue55_W1G.ttf +0 -0
  769. package/public/fonts/HelvNeue55_W1G.woff +0 -0
  770. package/public/fonts/HelvNeue55_W1G.woff2 +0 -0
  771. package/public/fonts/HelvNeue75_W1G.eot +0 -0
  772. package/public/fonts/HelvNeue75_W1G.svg +0 -653
  773. package/public/fonts/HelvNeue75_W1G.ttf +0 -0
  774. package/public/fonts/HelvNeue75_W1G.woff +0 -0
  775. package/public/fonts/HelvNeue75_W1G.woff2 +0 -0
  776. package/src/components/Badge/Badge.test.js +0 -45
  777. package/src/components/Typography/styles/config.scss +0 -181
  778. /package/build/_next/static/{rsiMOOYAxBtOjvpzBN4vJ → CRhIjUFtohDOfdDfzvfXM}/_ssgManifest.js +0 -0
  779. /package/build/_next/static/chunks/{4bd1b696-67ee12fb04071d3b.js → 4bd1b696-40a218329c8ae32b.js} +0 -0
  780. /package/build/_next/static/chunks/{684-2d117c50cbadadca.js → 684-c72f8f73e7f2d568.js} +0 -0
  781. /package/build/_next/static/chunks/app/_not-found/{page-f08302ee705a96b1.js → page-c799b4c91b89a5c2.js} +0 -0
@@ -1,5 +1,27 @@
1
- import require$$0 from 'react';
1
+ import React, { useContext, cloneElement, useRef, useEffect, useCallback } from 'react';
2
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
+ }
3
25
  function _defineProperty(e, r, t) {
4
26
  return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
5
27
  value: t,
@@ -8,6 +30,36 @@ function _defineProperty(e, r, t) {
8
30
  writable: true
9
31
  }) : e[r] = t, e;
10
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) {
45
+ if (Object(t) !== t) return;
46
+ f = !1;
47
+ } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
48
+ } catch (r) {
49
+ o = true, n = r;
50
+ } finally {
51
+ try {
52
+ if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
53
+ } finally {
54
+ if (o) throw n;
55
+ }
56
+ }
57
+ return a;
58
+ }
59
+ }
60
+ function _nonIterableRest() {
61
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
62
+ }
11
63
  function ownKeys(e, r) {
12
64
  var t = Object.keys(e);
13
65
  if (Object.getOwnPropertySymbols) {
@@ -29,6 +81,9 @@ function _objectSpread2(e) {
29
81
  }
30
82
  return e;
31
83
  }
84
+ function _slicedToArray(r, e) {
85
+ return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
86
+ }
32
87
  function _toPrimitive(t, r) {
33
88
  if ("object" != typeof t || !t) return t;
34
89
  var e = t[Symbol.toPrimitive];
@@ -43,6 +98,13 @@ function _toPropertyKey(t) {
43
98
  var i = _toPrimitive(t, "string");
44
99
  return "symbol" == typeof i ? i : i + "";
45
100
  }
101
+ function _unsupportedIterableToArray(r, a) {
102
+ if (r) {
103
+ if ("string" == typeof r) return _arrayLikeToArray(r, a);
104
+ var t = {}.toString.call(r).slice(8, -1);
105
+ 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;
106
+ }
107
+ }
46
108
 
47
109
  /******************************************************************************
48
110
  Copyright (c) Microsoft Corporation.
@@ -506,7 +568,7 @@ function requireReactJsxRuntime_development () {
506
568
  node._store &&
507
569
  (node._store.validated = 1);
508
570
  }
509
- var React = require$$0,
571
+ var React$1 = React,
510
572
  REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
511
573
  REACT_PORTAL_TYPE = Symbol.for("react.portal"),
512
574
  REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
@@ -522,7 +584,7 @@ function requireReactJsxRuntime_development () {
522
584
  REACT_ACTIVITY_TYPE = Symbol.for("react.activity"),
523
585
  REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"),
524
586
  ReactSharedInternals =
525
- React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,
587
+ React$1.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,
526
588
  hasOwnProperty = Object.prototype.hasOwnProperty,
527
589
  isArrayImpl = Array.isArray,
528
590
  createTask = console.createTask
@@ -530,15 +592,15 @@ function requireReactJsxRuntime_development () {
530
592
  : function () {
531
593
  return null;
532
594
  };
533
- React = {
595
+ React$1 = {
534
596
  "react-stack-bottom-frame": function (callStackForError) {
535
597
  return callStackForError();
536
598
  }
537
599
  };
538
600
  var specialPropKeyWarningShown;
539
601
  var didWarnAboutElementRef = {};
540
- var unknownOwnerDebugStack = React["react-stack-bottom-frame"].bind(
541
- React,
602
+ var unknownOwnerDebugStack = React$1["react-stack-bottom-frame"].bind(
603
+ React$1,
542
604
  UnknownOwner
543
605
  )();
544
606
  var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
@@ -596,21 +658,3021 @@ function requireJsxRuntime () {
596
658
 
597
659
  var jsxRuntimeExports = requireJsxRuntime();
598
660
 
599
- var CLASS_ROOT = "badge";
600
- var Badge = function Badge(_a) {
601
- var color = _a.color,
602
- isRound = _a.isRound,
603
- className = _a.className,
661
+ var SpritePathContext = /*#__PURE__*/React.createContext("/sprite.svg");
662
+
663
+ var CLASS_ROOT$8 = "icon";
664
+ var Icon = function Icon(_a) {
665
+ var className = _a.className,
666
+ alt = _a.alt,
667
+ color = _a.color,
668
+ name = _a.name,
669
+ size = _a.size,
670
+ _a$spritePath = _a.spritePath,
671
+ spritePath = _a$spritePath === void 0 ? "/sprite.svg" : _a$spritePath,
672
+ other = __rest(_a, ["className", "alt", "color", "name", "size", "spritePath"]);
673
+ var contextPath = useContext(SpritePathContext);
674
+ var classes = cx(CLASS_ROOT$8, _defineProperty(_defineProperty({}, "".concat(CLASS_ROOT$8, "--").concat(size), size), "".concat(CLASS_ROOT$8, "--").concat(color), color), className);
675
+ return /*#__PURE__*/jsxRuntimeExports.jsxs("svg", _objectSpread2(_objectSpread2({
676
+ className: classes,
677
+ "aria-hidden": alt !== undefined ? undefined : "true",
678
+ role: alt !== undefined ? "img" : undefined
679
+ }, other), {}, {
680
+ children: [alt !== undefined && alt.length > 0 && /*#__PURE__*/jsxRuntimeExports.jsx("title", {
681
+ children: alt
682
+ }), /*#__PURE__*/jsxRuntimeExports.jsx("use", {
683
+ xlinkHref: spritePath !== "/sprite.svg" || typeof contextPath === "undefined" ? "".concat(spritePath, "#").concat(name) : "".concat(contextPath, "#").concat(name)
684
+ })]
685
+ }));
686
+ };
687
+ Icon.displayName = "Icon";
688
+
689
+ var CLASS_ROOT$7 = "buttons";
690
+ var Buttons = function Buttons(_a) {
691
+ var isStackedOnXs = _a.isStackedOnXs,
604
692
  children = _a.children,
605
- other = __rest(_a, ["color", "isRound", "className", "children"]);
606
- var classes = cx(CLASS_ROOT, className, _defineProperty(_defineProperty({}, "badge--".concat(color), color), "badge--round", isRound));
607
- return /*#__PURE__*/jsxRuntimeExports.jsx("span", _objectSpread2(_objectSpread2({
608
- className: classes
693
+ className = _a.className,
694
+ other = __rest(_a, ["isStackedOnXs", "children", "className"]);
695
+ return /*#__PURE__*/jsxRuntimeExports.jsx("div", _objectSpread2(_objectSpread2({
696
+ className: cx(CLASS_ROOT$7, _defineProperty({}, "".concat(CLASS_ROOT$7, "--stack-on-xs"), isStackedOnXs), className)
609
697
  }, other), {}, {
610
698
  children: children
611
699
  }));
612
700
  };
613
- Badge.displayName = "Badge";
701
+ Buttons.displayName = "Buttons";
702
+
703
+ var propTypes$1 = {exports: {}};
704
+
705
+ var reactIs = {exports: {}};
706
+
707
+ var reactIs_production_min = {};
708
+
709
+ /** @license React v16.13.1
710
+ * react-is.production.min.js
711
+ *
712
+ * Copyright (c) Facebook, Inc. and its affiliates.
713
+ *
714
+ * This source code is licensed under the MIT license found in the
715
+ * LICENSE file in the root directory of this source tree.
716
+ */
717
+
718
+ var hasRequiredReactIs_production_min;
719
+
720
+ function requireReactIs_production_min () {
721
+ if (hasRequiredReactIs_production_min) return reactIs_production_min;
722
+ hasRequiredReactIs_production_min = 1;
723
+ 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?
724
+ 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;
725
+ 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;
726
+ 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};
727
+ 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};
728
+ 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;
729
+ return reactIs_production_min;
730
+ }
731
+
732
+ var reactIs_development = {};
733
+
734
+ /** @license React v16.13.1
735
+ * react-is.development.js
736
+ *
737
+ * Copyright (c) Facebook, Inc. and its affiliates.
738
+ *
739
+ * This source code is licensed under the MIT license found in the
740
+ * LICENSE file in the root directory of this source tree.
741
+ */
742
+
743
+ var hasRequiredReactIs_development;
744
+
745
+ function requireReactIs_development () {
746
+ if (hasRequiredReactIs_development) return reactIs_development;
747
+ hasRequiredReactIs_development = 1;
748
+
749
+
750
+
751
+ if (process.env.NODE_ENV !== "production") {
752
+ (function() {
753
+
754
+ // The Symbol used to tag the ReactElement-like types. If there is no native Symbol
755
+ // nor polyfill, then a plain number is used for performance.
756
+ var hasSymbol = typeof Symbol === 'function' && Symbol.for;
757
+ var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for('react.element') : 0xeac7;
758
+ var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
759
+ var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
760
+ var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
761
+ var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
762
+ var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
763
+ var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
764
+ // (unstable) APIs that have been removed. Can we remove the symbols?
765
+
766
+ var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
767
+ var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
768
+ var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
769
+ var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
770
+ var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
771
+ var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
772
+ var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
773
+ var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
774
+ var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
775
+ var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;
776
+ var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
777
+
778
+ function isValidElementType(type) {
779
+ return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
780
+ 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);
781
+ }
782
+
783
+ function typeOf(object) {
784
+ if (typeof object === 'object' && object !== null) {
785
+ var $$typeof = object.$$typeof;
786
+
787
+ switch ($$typeof) {
788
+ case REACT_ELEMENT_TYPE:
789
+ var type = object.type;
790
+
791
+ switch (type) {
792
+ case REACT_ASYNC_MODE_TYPE:
793
+ case REACT_CONCURRENT_MODE_TYPE:
794
+ case REACT_FRAGMENT_TYPE:
795
+ case REACT_PROFILER_TYPE:
796
+ case REACT_STRICT_MODE_TYPE:
797
+ case REACT_SUSPENSE_TYPE:
798
+ return type;
799
+
800
+ default:
801
+ var $$typeofType = type && type.$$typeof;
802
+
803
+ switch ($$typeofType) {
804
+ case REACT_CONTEXT_TYPE:
805
+ case REACT_FORWARD_REF_TYPE:
806
+ case REACT_LAZY_TYPE:
807
+ case REACT_MEMO_TYPE:
808
+ case REACT_PROVIDER_TYPE:
809
+ return $$typeofType;
810
+
811
+ default:
812
+ return $$typeof;
813
+ }
814
+
815
+ }
816
+
817
+ case REACT_PORTAL_TYPE:
818
+ return $$typeof;
819
+ }
820
+ }
821
+
822
+ return undefined;
823
+ } // AsyncMode is deprecated along with isAsyncMode
824
+
825
+ var AsyncMode = REACT_ASYNC_MODE_TYPE;
826
+ var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
827
+ var ContextConsumer = REACT_CONTEXT_TYPE;
828
+ var ContextProvider = REACT_PROVIDER_TYPE;
829
+ var Element = REACT_ELEMENT_TYPE;
830
+ var ForwardRef = REACT_FORWARD_REF_TYPE;
831
+ var Fragment = REACT_FRAGMENT_TYPE;
832
+ var Lazy = REACT_LAZY_TYPE;
833
+ var Memo = REACT_MEMO_TYPE;
834
+ var Portal = REACT_PORTAL_TYPE;
835
+ var Profiler = REACT_PROFILER_TYPE;
836
+ var StrictMode = REACT_STRICT_MODE_TYPE;
837
+ var Suspense = REACT_SUSPENSE_TYPE;
838
+ var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated
839
+
840
+ function isAsyncMode(object) {
841
+ {
842
+ if (!hasWarnedAboutDeprecatedIsAsyncMode) {
843
+ hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
844
+
845
+ 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.');
846
+ }
847
+ }
848
+
849
+ return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
850
+ }
851
+ function isConcurrentMode(object) {
852
+ return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
853
+ }
854
+ function isContextConsumer(object) {
855
+ return typeOf(object) === REACT_CONTEXT_TYPE;
856
+ }
857
+ function isContextProvider(object) {
858
+ return typeOf(object) === REACT_PROVIDER_TYPE;
859
+ }
860
+ function isElement(object) {
861
+ return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
862
+ }
863
+ function isForwardRef(object) {
864
+ return typeOf(object) === REACT_FORWARD_REF_TYPE;
865
+ }
866
+ function isFragment(object) {
867
+ return typeOf(object) === REACT_FRAGMENT_TYPE;
868
+ }
869
+ function isLazy(object) {
870
+ return typeOf(object) === REACT_LAZY_TYPE;
871
+ }
872
+ function isMemo(object) {
873
+ return typeOf(object) === REACT_MEMO_TYPE;
874
+ }
875
+ function isPortal(object) {
876
+ return typeOf(object) === REACT_PORTAL_TYPE;
877
+ }
878
+ function isProfiler(object) {
879
+ return typeOf(object) === REACT_PROFILER_TYPE;
880
+ }
881
+ function isStrictMode(object) {
882
+ return typeOf(object) === REACT_STRICT_MODE_TYPE;
883
+ }
884
+ function isSuspense(object) {
885
+ return typeOf(object) === REACT_SUSPENSE_TYPE;
886
+ }
887
+
888
+ reactIs_development.AsyncMode = AsyncMode;
889
+ reactIs_development.ConcurrentMode = ConcurrentMode;
890
+ reactIs_development.ContextConsumer = ContextConsumer;
891
+ reactIs_development.ContextProvider = ContextProvider;
892
+ reactIs_development.Element = Element;
893
+ reactIs_development.ForwardRef = ForwardRef;
894
+ reactIs_development.Fragment = Fragment;
895
+ reactIs_development.Lazy = Lazy;
896
+ reactIs_development.Memo = Memo;
897
+ reactIs_development.Portal = Portal;
898
+ reactIs_development.Profiler = Profiler;
899
+ reactIs_development.StrictMode = StrictMode;
900
+ reactIs_development.Suspense = Suspense;
901
+ reactIs_development.isAsyncMode = isAsyncMode;
902
+ reactIs_development.isConcurrentMode = isConcurrentMode;
903
+ reactIs_development.isContextConsumer = isContextConsumer;
904
+ reactIs_development.isContextProvider = isContextProvider;
905
+ reactIs_development.isElement = isElement;
906
+ reactIs_development.isForwardRef = isForwardRef;
907
+ reactIs_development.isFragment = isFragment;
908
+ reactIs_development.isLazy = isLazy;
909
+ reactIs_development.isMemo = isMemo;
910
+ reactIs_development.isPortal = isPortal;
911
+ reactIs_development.isProfiler = isProfiler;
912
+ reactIs_development.isStrictMode = isStrictMode;
913
+ reactIs_development.isSuspense = isSuspense;
914
+ reactIs_development.isValidElementType = isValidElementType;
915
+ reactIs_development.typeOf = typeOf;
916
+ })();
917
+ }
918
+ return reactIs_development;
919
+ }
920
+
921
+ var hasRequiredReactIs;
922
+
923
+ function requireReactIs () {
924
+ if (hasRequiredReactIs) return reactIs.exports;
925
+ hasRequiredReactIs = 1;
926
+
927
+ if (process.env.NODE_ENV === 'production') {
928
+ reactIs.exports = requireReactIs_production_min();
929
+ } else {
930
+ reactIs.exports = requireReactIs_development();
931
+ }
932
+ return reactIs.exports;
933
+ }
934
+
935
+ /*
936
+ object-assign
937
+ (c) Sindre Sorhus
938
+ @license MIT
939
+ */
940
+
941
+ var objectAssign;
942
+ var hasRequiredObjectAssign;
943
+
944
+ function requireObjectAssign () {
945
+ if (hasRequiredObjectAssign) return objectAssign;
946
+ hasRequiredObjectAssign = 1;
947
+ /* eslint-disable no-unused-vars */
948
+ var getOwnPropertySymbols = Object.getOwnPropertySymbols;
949
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
950
+ var propIsEnumerable = Object.prototype.propertyIsEnumerable;
951
+
952
+ function toObject(val) {
953
+ if (val === null || val === undefined) {
954
+ throw new TypeError('Object.assign cannot be called with null or undefined');
955
+ }
956
+
957
+ return Object(val);
958
+ }
959
+
960
+ function shouldUseNative() {
961
+ try {
962
+ if (!Object.assign) {
963
+ return false;
964
+ }
965
+
966
+ // Detect buggy property enumeration order in older V8 versions.
967
+
968
+ // https://bugs.chromium.org/p/v8/issues/detail?id=4118
969
+ var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
970
+ test1[5] = 'de';
971
+ if (Object.getOwnPropertyNames(test1)[0] === '5') {
972
+ return false;
973
+ }
974
+
975
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3056
976
+ var test2 = {};
977
+ for (var i = 0; i < 10; i++) {
978
+ test2['_' + String.fromCharCode(i)] = i;
979
+ }
980
+ var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
981
+ return test2[n];
982
+ });
983
+ if (order2.join('') !== '0123456789') {
984
+ return false;
985
+ }
986
+
987
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3056
988
+ var test3 = {};
989
+ 'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
990
+ test3[letter] = letter;
991
+ });
992
+ if (Object.keys(Object.assign({}, test3)).join('') !==
993
+ 'abcdefghijklmnopqrst') {
994
+ return false;
995
+ }
996
+
997
+ return true;
998
+ } catch (err) {
999
+ // We don't expect any of the above to throw, but better to be safe.
1000
+ return false;
1001
+ }
1002
+ }
1003
+
1004
+ objectAssign = shouldUseNative() ? Object.assign : function (target, source) {
1005
+ var from;
1006
+ var to = toObject(target);
1007
+ var symbols;
1008
+
1009
+ for (var s = 1; s < arguments.length; s++) {
1010
+ from = Object(arguments[s]);
1011
+
1012
+ for (var key in from) {
1013
+ if (hasOwnProperty.call(from, key)) {
1014
+ to[key] = from[key];
1015
+ }
1016
+ }
1017
+
1018
+ if (getOwnPropertySymbols) {
1019
+ symbols = getOwnPropertySymbols(from);
1020
+ for (var i = 0; i < symbols.length; i++) {
1021
+ if (propIsEnumerable.call(from, symbols[i])) {
1022
+ to[symbols[i]] = from[symbols[i]];
1023
+ }
1024
+ }
1025
+ }
1026
+ }
1027
+
1028
+ return to;
1029
+ };
1030
+ return objectAssign;
1031
+ }
1032
+
1033
+ /**
1034
+ * Copyright (c) 2013-present, Facebook, Inc.
1035
+ *
1036
+ * This source code is licensed under the MIT license found in the
1037
+ * LICENSE file in the root directory of this source tree.
1038
+ */
1039
+
1040
+ var ReactPropTypesSecret_1;
1041
+ var hasRequiredReactPropTypesSecret;
1042
+
1043
+ function requireReactPropTypesSecret () {
1044
+ if (hasRequiredReactPropTypesSecret) return ReactPropTypesSecret_1;
1045
+ hasRequiredReactPropTypesSecret = 1;
1046
+
1047
+ var ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';
1048
+
1049
+ ReactPropTypesSecret_1 = ReactPropTypesSecret;
1050
+ return ReactPropTypesSecret_1;
1051
+ }
1052
+
1053
+ var has;
1054
+ var hasRequiredHas;
1055
+
1056
+ function requireHas () {
1057
+ if (hasRequiredHas) return has;
1058
+ hasRequiredHas = 1;
1059
+ has = Function.call.bind(Object.prototype.hasOwnProperty);
1060
+ return has;
1061
+ }
1062
+
1063
+ /**
1064
+ * Copyright (c) 2013-present, Facebook, Inc.
1065
+ *
1066
+ * This source code is licensed under the MIT license found in the
1067
+ * LICENSE file in the root directory of this source tree.
1068
+ */
1069
+
1070
+ var checkPropTypes_1;
1071
+ var hasRequiredCheckPropTypes;
1072
+
1073
+ function requireCheckPropTypes () {
1074
+ if (hasRequiredCheckPropTypes) return checkPropTypes_1;
1075
+ hasRequiredCheckPropTypes = 1;
1076
+
1077
+ var printWarning = function() {};
1078
+
1079
+ if (process.env.NODE_ENV !== 'production') {
1080
+ var ReactPropTypesSecret = requireReactPropTypesSecret();
1081
+ var loggedTypeFailures = {};
1082
+ var has = requireHas();
1083
+
1084
+ printWarning = function(text) {
1085
+ var message = 'Warning: ' + text;
1086
+ if (typeof console !== 'undefined') {
1087
+ console.error(message);
1088
+ }
1089
+ try {
1090
+ // --- Welcome to debugging React ---
1091
+ // This error was thrown as a convenience so that you can use this stack
1092
+ // to find the callsite that caused this warning to fire.
1093
+ throw new Error(message);
1094
+ } catch (x) { /**/ }
1095
+ };
1096
+ }
1097
+
1098
+ /**
1099
+ * Assert that the values match with the type specs.
1100
+ * Error messages are memorized and will only be shown once.
1101
+ *
1102
+ * @param {object} typeSpecs Map of name to a ReactPropType
1103
+ * @param {object} values Runtime values that need to be type-checked
1104
+ * @param {string} location e.g. "prop", "context", "child context"
1105
+ * @param {string} componentName Name of the component for error messages.
1106
+ * @param {?Function} getStack Returns the component stack.
1107
+ * @private
1108
+ */
1109
+ function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
1110
+ if (process.env.NODE_ENV !== 'production') {
1111
+ for (var typeSpecName in typeSpecs) {
1112
+ if (has(typeSpecs, typeSpecName)) {
1113
+ var error;
1114
+ // Prop type validation may throw. In case they do, we don't want to
1115
+ // fail the render phase where it didn't fail before. So we log it.
1116
+ // After these have been cleaned up, we'll let them throw.
1117
+ try {
1118
+ // This is intentionally an invariant that gets caught. It's the same
1119
+ // behavior as without this statement except with a better message.
1120
+ if (typeof typeSpecs[typeSpecName] !== 'function') {
1121
+ var err = Error(
1122
+ (componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +
1123
+ 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' +
1124
+ 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'
1125
+ );
1126
+ err.name = 'Invariant Violation';
1127
+ throw err;
1128
+ }
1129
+ error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
1130
+ } catch (ex) {
1131
+ error = ex;
1132
+ }
1133
+ if (error && !(error instanceof Error)) {
1134
+ printWarning(
1135
+ (componentName || 'React class') + ': type specification of ' +
1136
+ location + ' `' + typeSpecName + '` is invalid; the type checker ' +
1137
+ 'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +
1138
+ 'You may have forgotten to pass an argument to the type checker ' +
1139
+ 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +
1140
+ 'shape all require an argument).'
1141
+ );
1142
+ }
1143
+ if (error instanceof Error && !(error.message in loggedTypeFailures)) {
1144
+ // Only monitor this failure once because there tends to be a lot of the
1145
+ // same error.
1146
+ loggedTypeFailures[error.message] = true;
1147
+
1148
+ var stack = getStack ? getStack() : '';
1149
+
1150
+ printWarning(
1151
+ 'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')
1152
+ );
1153
+ }
1154
+ }
1155
+ }
1156
+ }
1157
+ }
1158
+
1159
+ /**
1160
+ * Resets warning cache when testing.
1161
+ *
1162
+ * @private
1163
+ */
1164
+ checkPropTypes.resetWarningCache = function() {
1165
+ if (process.env.NODE_ENV !== 'production') {
1166
+ loggedTypeFailures = {};
1167
+ }
1168
+ };
1169
+
1170
+ checkPropTypes_1 = checkPropTypes;
1171
+ return checkPropTypes_1;
1172
+ }
1173
+
1174
+ /**
1175
+ * Copyright (c) 2013-present, Facebook, Inc.
1176
+ *
1177
+ * This source code is licensed under the MIT license found in the
1178
+ * LICENSE file in the root directory of this source tree.
1179
+ */
1180
+
1181
+ var factoryWithTypeCheckers;
1182
+ var hasRequiredFactoryWithTypeCheckers;
1183
+
1184
+ function requireFactoryWithTypeCheckers () {
1185
+ if (hasRequiredFactoryWithTypeCheckers) return factoryWithTypeCheckers;
1186
+ hasRequiredFactoryWithTypeCheckers = 1;
1187
+
1188
+ var ReactIs = requireReactIs();
1189
+ var assign = requireObjectAssign();
1190
+
1191
+ var ReactPropTypesSecret = requireReactPropTypesSecret();
1192
+ var has = requireHas();
1193
+ var checkPropTypes = requireCheckPropTypes();
1194
+
1195
+ var printWarning = function() {};
1196
+
1197
+ if (process.env.NODE_ENV !== 'production') {
1198
+ printWarning = function(text) {
1199
+ var message = 'Warning: ' + text;
1200
+ if (typeof console !== 'undefined') {
1201
+ console.error(message);
1202
+ }
1203
+ try {
1204
+ // --- Welcome to debugging React ---
1205
+ // This error was thrown as a convenience so that you can use this stack
1206
+ // to find the callsite that caused this warning to fire.
1207
+ throw new Error(message);
1208
+ } catch (x) {}
1209
+ };
1210
+ }
1211
+
1212
+ function emptyFunctionThatReturnsNull() {
1213
+ return null;
1214
+ }
1215
+
1216
+ factoryWithTypeCheckers = function(isValidElement, throwOnDirectAccess) {
1217
+ /* global Symbol */
1218
+ var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
1219
+ var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
1220
+
1221
+ /**
1222
+ * Returns the iterator method function contained on the iterable object.
1223
+ *
1224
+ * Be sure to invoke the function with the iterable as context:
1225
+ *
1226
+ * var iteratorFn = getIteratorFn(myIterable);
1227
+ * if (iteratorFn) {
1228
+ * var iterator = iteratorFn.call(myIterable);
1229
+ * ...
1230
+ * }
1231
+ *
1232
+ * @param {?object} maybeIterable
1233
+ * @return {?function}
1234
+ */
1235
+ function getIteratorFn(maybeIterable) {
1236
+ var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
1237
+ if (typeof iteratorFn === 'function') {
1238
+ return iteratorFn;
1239
+ }
1240
+ }
1241
+
1242
+ /**
1243
+ * Collection of methods that allow declaration and validation of props that are
1244
+ * supplied to React components. Example usage:
1245
+ *
1246
+ * var Props = require('ReactPropTypes');
1247
+ * var MyArticle = React.createClass({
1248
+ * propTypes: {
1249
+ * // An optional string prop named "description".
1250
+ * description: Props.string,
1251
+ *
1252
+ * // A required enum prop named "category".
1253
+ * category: Props.oneOf(['News','Photos']).isRequired,
1254
+ *
1255
+ * // A prop named "dialog" that requires an instance of Dialog.
1256
+ * dialog: Props.instanceOf(Dialog).isRequired
1257
+ * },
1258
+ * render: function() { ... }
1259
+ * });
1260
+ *
1261
+ * A more formal specification of how these methods are used:
1262
+ *
1263
+ * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
1264
+ * decl := ReactPropTypes.{type}(.isRequired)?
1265
+ *
1266
+ * Each and every declaration produces a function with the same signature. This
1267
+ * allows the creation of custom validation functions. For example:
1268
+ *
1269
+ * var MyLink = React.createClass({
1270
+ * propTypes: {
1271
+ * // An optional string or URI prop named "href".
1272
+ * href: function(props, propName, componentName) {
1273
+ * var propValue = props[propName];
1274
+ * if (propValue != null && typeof propValue !== 'string' &&
1275
+ * !(propValue instanceof URI)) {
1276
+ * return new Error(
1277
+ * 'Expected a string or an URI for ' + propName + ' in ' +
1278
+ * componentName
1279
+ * );
1280
+ * }
1281
+ * }
1282
+ * },
1283
+ * render: function() {...}
1284
+ * });
1285
+ *
1286
+ * @internal
1287
+ */
1288
+
1289
+ var ANONYMOUS = '<<anonymous>>';
1290
+
1291
+ // Important!
1292
+ // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
1293
+ var ReactPropTypes = {
1294
+ array: createPrimitiveTypeChecker('array'),
1295
+ bigint: createPrimitiveTypeChecker('bigint'),
1296
+ bool: createPrimitiveTypeChecker('boolean'),
1297
+ func: createPrimitiveTypeChecker('function'),
1298
+ number: createPrimitiveTypeChecker('number'),
1299
+ object: createPrimitiveTypeChecker('object'),
1300
+ string: createPrimitiveTypeChecker('string'),
1301
+ symbol: createPrimitiveTypeChecker('symbol'),
1302
+
1303
+ any: createAnyTypeChecker(),
1304
+ arrayOf: createArrayOfTypeChecker,
1305
+ element: createElementTypeChecker(),
1306
+ elementType: createElementTypeTypeChecker(),
1307
+ instanceOf: createInstanceTypeChecker,
1308
+ node: createNodeChecker(),
1309
+ objectOf: createObjectOfTypeChecker,
1310
+ oneOf: createEnumTypeChecker,
1311
+ oneOfType: createUnionTypeChecker,
1312
+ shape: createShapeTypeChecker,
1313
+ exact: createStrictShapeTypeChecker,
1314
+ };
1315
+
1316
+ /**
1317
+ * inlined Object.is polyfill to avoid requiring consumers ship their own
1318
+ * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
1319
+ */
1320
+ /*eslint-disable no-self-compare*/
1321
+ function is(x, y) {
1322
+ // SameValue algorithm
1323
+ if (x === y) {
1324
+ // Steps 1-5, 7-10
1325
+ // Steps 6.b-6.e: +0 != -0
1326
+ return x !== 0 || 1 / x === 1 / y;
1327
+ } else {
1328
+ // Step 6.a: NaN == NaN
1329
+ return x !== x && y !== y;
1330
+ }
1331
+ }
1332
+ /*eslint-enable no-self-compare*/
1333
+
1334
+ /**
1335
+ * We use an Error-like object for backward compatibility as people may call
1336
+ * PropTypes directly and inspect their output. However, we don't use real
1337
+ * Errors anymore. We don't inspect their stack anyway, and creating them
1338
+ * is prohibitively expensive if they are created too often, such as what
1339
+ * happens in oneOfType() for any type before the one that matched.
1340
+ */
1341
+ function PropTypeError(message, data) {
1342
+ this.message = message;
1343
+ this.data = data && typeof data === 'object' ? data: {};
1344
+ this.stack = '';
1345
+ }
1346
+ // Make `instanceof Error` still work for returned errors.
1347
+ PropTypeError.prototype = Error.prototype;
1348
+
1349
+ function createChainableTypeChecker(validate) {
1350
+ if (process.env.NODE_ENV !== 'production') {
1351
+ var manualPropTypeCallCache = {};
1352
+ var manualPropTypeWarningCount = 0;
1353
+ }
1354
+ function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
1355
+ componentName = componentName || ANONYMOUS;
1356
+ propFullName = propFullName || propName;
1357
+
1358
+ if (secret !== ReactPropTypesSecret) {
1359
+ if (throwOnDirectAccess) {
1360
+ // New behavior only for users of `prop-types` package
1361
+ var err = new Error(
1362
+ 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
1363
+ 'Use `PropTypes.checkPropTypes()` to call them. ' +
1364
+ 'Read more at http://fb.me/use-check-prop-types'
1365
+ );
1366
+ err.name = 'Invariant Violation';
1367
+ throw err;
1368
+ } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {
1369
+ // Old behavior for people using React.PropTypes
1370
+ var cacheKey = componentName + ':' + propName;
1371
+ if (
1372
+ !manualPropTypeCallCache[cacheKey] &&
1373
+ // Avoid spamming the console because they are often not actionable except for lib authors
1374
+ manualPropTypeWarningCount < 3
1375
+ ) {
1376
+ printWarning(
1377
+ 'You are manually calling a React.PropTypes validation ' +
1378
+ 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +
1379
+ 'and will throw in the standalone `prop-types` package. ' +
1380
+ 'You may be seeing this warning due to a third-party PropTypes ' +
1381
+ 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'
1382
+ );
1383
+ manualPropTypeCallCache[cacheKey] = true;
1384
+ manualPropTypeWarningCount++;
1385
+ }
1386
+ }
1387
+ }
1388
+ if (props[propName] == null) {
1389
+ if (isRequired) {
1390
+ if (props[propName] === null) {
1391
+ return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
1392
+ }
1393
+ return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
1394
+ }
1395
+ return null;
1396
+ } else {
1397
+ return validate(props, propName, componentName, location, propFullName);
1398
+ }
1399
+ }
1400
+
1401
+ var chainedCheckType = checkType.bind(null, false);
1402
+ chainedCheckType.isRequired = checkType.bind(null, true);
1403
+
1404
+ return chainedCheckType;
1405
+ }
1406
+
1407
+ function createPrimitiveTypeChecker(expectedType) {
1408
+ function validate(props, propName, componentName, location, propFullName, secret) {
1409
+ var propValue = props[propName];
1410
+ var propType = getPropType(propValue);
1411
+ if (propType !== expectedType) {
1412
+ // `propValue` being instance of, say, date/regexp, pass the 'object'
1413
+ // check, but we can offer a more precise error message here rather than
1414
+ // 'of type `object`'.
1415
+ var preciseType = getPreciseType(propValue);
1416
+
1417
+ return new PropTypeError(
1418
+ 'Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'),
1419
+ {expectedType: expectedType}
1420
+ );
1421
+ }
1422
+ return null;
1423
+ }
1424
+ return createChainableTypeChecker(validate);
1425
+ }
1426
+
1427
+ function createAnyTypeChecker() {
1428
+ return createChainableTypeChecker(emptyFunctionThatReturnsNull);
1429
+ }
1430
+
1431
+ function createArrayOfTypeChecker(typeChecker) {
1432
+ function validate(props, propName, componentName, location, propFullName) {
1433
+ if (typeof typeChecker !== 'function') {
1434
+ return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
1435
+ }
1436
+ var propValue = props[propName];
1437
+ if (!Array.isArray(propValue)) {
1438
+ var propType = getPropType(propValue);
1439
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
1440
+ }
1441
+ for (var i = 0; i < propValue.length; i++) {
1442
+ var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);
1443
+ if (error instanceof Error) {
1444
+ return error;
1445
+ }
1446
+ }
1447
+ return null;
1448
+ }
1449
+ return createChainableTypeChecker(validate);
1450
+ }
1451
+
1452
+ function createElementTypeChecker() {
1453
+ function validate(props, propName, componentName, location, propFullName) {
1454
+ var propValue = props[propName];
1455
+ if (!isValidElement(propValue)) {
1456
+ var propType = getPropType(propValue);
1457
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
1458
+ }
1459
+ return null;
1460
+ }
1461
+ return createChainableTypeChecker(validate);
1462
+ }
1463
+
1464
+ function createElementTypeTypeChecker() {
1465
+ function validate(props, propName, componentName, location, propFullName) {
1466
+ var propValue = props[propName];
1467
+ if (!ReactIs.isValidElementType(propValue)) {
1468
+ var propType = getPropType(propValue);
1469
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));
1470
+ }
1471
+ return null;
1472
+ }
1473
+ return createChainableTypeChecker(validate);
1474
+ }
1475
+
1476
+ function createInstanceTypeChecker(expectedClass) {
1477
+ function validate(props, propName, componentName, location, propFullName) {
1478
+ if (!(props[propName] instanceof expectedClass)) {
1479
+ var expectedClassName = expectedClass.name || ANONYMOUS;
1480
+ var actualClassName = getClassName(props[propName]);
1481
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
1482
+ }
1483
+ return null;
1484
+ }
1485
+ return createChainableTypeChecker(validate);
1486
+ }
1487
+
1488
+ function createEnumTypeChecker(expectedValues) {
1489
+ if (!Array.isArray(expectedValues)) {
1490
+ if (process.env.NODE_ENV !== 'production') {
1491
+ if (arguments.length > 1) {
1492
+ printWarning(
1493
+ 'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +
1494
+ 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'
1495
+ );
1496
+ } else {
1497
+ printWarning('Invalid argument supplied to oneOf, expected an array.');
1498
+ }
1499
+ }
1500
+ return emptyFunctionThatReturnsNull;
1501
+ }
1502
+
1503
+ function validate(props, propName, componentName, location, propFullName) {
1504
+ var propValue = props[propName];
1505
+ for (var i = 0; i < expectedValues.length; i++) {
1506
+ if (is(propValue, expectedValues[i])) {
1507
+ return null;
1508
+ }
1509
+ }
1510
+
1511
+ var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
1512
+ var type = getPreciseType(value);
1513
+ if (type === 'symbol') {
1514
+ return String(value);
1515
+ }
1516
+ return value;
1517
+ });
1518
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
1519
+ }
1520
+ return createChainableTypeChecker(validate);
1521
+ }
1522
+
1523
+ function createObjectOfTypeChecker(typeChecker) {
1524
+ function validate(props, propName, componentName, location, propFullName) {
1525
+ if (typeof typeChecker !== 'function') {
1526
+ return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
1527
+ }
1528
+ var propValue = props[propName];
1529
+ var propType = getPropType(propValue);
1530
+ if (propType !== 'object') {
1531
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
1532
+ }
1533
+ for (var key in propValue) {
1534
+ if (has(propValue, key)) {
1535
+ var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
1536
+ if (error instanceof Error) {
1537
+ return error;
1538
+ }
1539
+ }
1540
+ }
1541
+ return null;
1542
+ }
1543
+ return createChainableTypeChecker(validate);
1544
+ }
1545
+
1546
+ function createUnionTypeChecker(arrayOfTypeCheckers) {
1547
+ if (!Array.isArray(arrayOfTypeCheckers)) {
1548
+ process.env.NODE_ENV !== 'production' ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;
1549
+ return emptyFunctionThatReturnsNull;
1550
+ }
1551
+
1552
+ for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
1553
+ var checker = arrayOfTypeCheckers[i];
1554
+ if (typeof checker !== 'function') {
1555
+ printWarning(
1556
+ 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +
1557
+ 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'
1558
+ );
1559
+ return emptyFunctionThatReturnsNull;
1560
+ }
1561
+ }
1562
+
1563
+ function validate(props, propName, componentName, location, propFullName) {
1564
+ var expectedTypes = [];
1565
+ for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
1566
+ var checker = arrayOfTypeCheckers[i];
1567
+ var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret);
1568
+ if (checkerResult == null) {
1569
+ return null;
1570
+ }
1571
+ if (checkerResult.data && has(checkerResult.data, 'expectedType')) {
1572
+ expectedTypes.push(checkerResult.data.expectedType);
1573
+ }
1574
+ }
1575
+ var expectedTypesMessage = (expectedTypes.length > 0) ? ', expected one of type [' + expectedTypes.join(', ') + ']': '';
1576
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`' + expectedTypesMessage + '.'));
1577
+ }
1578
+ return createChainableTypeChecker(validate);
1579
+ }
1580
+
1581
+ function createNodeChecker() {
1582
+ function validate(props, propName, componentName, location, propFullName) {
1583
+ if (!isNode(props[propName])) {
1584
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
1585
+ }
1586
+ return null;
1587
+ }
1588
+ return createChainableTypeChecker(validate);
1589
+ }
1590
+
1591
+ function invalidValidatorError(componentName, location, propFullName, key, type) {
1592
+ return new PropTypeError(
1593
+ (componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' +
1594
+ 'it must be a function, usually from the `prop-types` package, but received `' + type + '`.'
1595
+ );
1596
+ }
1597
+
1598
+ function createShapeTypeChecker(shapeTypes) {
1599
+ function validate(props, propName, componentName, location, propFullName) {
1600
+ var propValue = props[propName];
1601
+ var propType = getPropType(propValue);
1602
+ if (propType !== 'object') {
1603
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
1604
+ }
1605
+ for (var key in shapeTypes) {
1606
+ var checker = shapeTypes[key];
1607
+ if (typeof checker !== 'function') {
1608
+ return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
1609
+ }
1610
+ var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
1611
+ if (error) {
1612
+ return error;
1613
+ }
1614
+ }
1615
+ return null;
1616
+ }
1617
+ return createChainableTypeChecker(validate);
1618
+ }
1619
+
1620
+ function createStrictShapeTypeChecker(shapeTypes) {
1621
+ function validate(props, propName, componentName, location, propFullName) {
1622
+ var propValue = props[propName];
1623
+ var propType = getPropType(propValue);
1624
+ if (propType !== 'object') {
1625
+ return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
1626
+ }
1627
+ // We need to check all keys in case some are required but missing from props.
1628
+ var allKeys = assign({}, props[propName], shapeTypes);
1629
+ for (var key in allKeys) {
1630
+ var checker = shapeTypes[key];
1631
+ if (has(shapeTypes, key) && typeof checker !== 'function') {
1632
+ return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
1633
+ }
1634
+ if (!checker) {
1635
+ return new PropTypeError(
1636
+ 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +
1637
+ '\nBad object: ' + JSON.stringify(props[propName], null, ' ') +
1638
+ '\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')
1639
+ );
1640
+ }
1641
+ var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);
1642
+ if (error) {
1643
+ return error;
1644
+ }
1645
+ }
1646
+ return null;
1647
+ }
1648
+
1649
+ return createChainableTypeChecker(validate);
1650
+ }
1651
+
1652
+ function isNode(propValue) {
1653
+ switch (typeof propValue) {
1654
+ case 'number':
1655
+ case 'string':
1656
+ case 'undefined':
1657
+ return true;
1658
+ case 'boolean':
1659
+ return !propValue;
1660
+ case 'object':
1661
+ if (Array.isArray(propValue)) {
1662
+ return propValue.every(isNode);
1663
+ }
1664
+ if (propValue === null || isValidElement(propValue)) {
1665
+ return true;
1666
+ }
1667
+
1668
+ var iteratorFn = getIteratorFn(propValue);
1669
+ if (iteratorFn) {
1670
+ var iterator = iteratorFn.call(propValue);
1671
+ var step;
1672
+ if (iteratorFn !== propValue.entries) {
1673
+ while (!(step = iterator.next()).done) {
1674
+ if (!isNode(step.value)) {
1675
+ return false;
1676
+ }
1677
+ }
1678
+ } else {
1679
+ // Iterator will provide entry [k,v] tuples rather than values.
1680
+ while (!(step = iterator.next()).done) {
1681
+ var entry = step.value;
1682
+ if (entry) {
1683
+ if (!isNode(entry[1])) {
1684
+ return false;
1685
+ }
1686
+ }
1687
+ }
1688
+ }
1689
+ } else {
1690
+ return false;
1691
+ }
1692
+
1693
+ return true;
1694
+ default:
1695
+ return false;
1696
+ }
1697
+ }
1698
+
1699
+ function isSymbol(propType, propValue) {
1700
+ // Native Symbol.
1701
+ if (propType === 'symbol') {
1702
+ return true;
1703
+ }
1704
+
1705
+ // falsy value can't be a Symbol
1706
+ if (!propValue) {
1707
+ return false;
1708
+ }
1709
+
1710
+ // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'
1711
+ if (propValue['@@toStringTag'] === 'Symbol') {
1712
+ return true;
1713
+ }
1714
+
1715
+ // Fallback for non-spec compliant Symbols which are polyfilled.
1716
+ if (typeof Symbol === 'function' && propValue instanceof Symbol) {
1717
+ return true;
1718
+ }
1719
+
1720
+ return false;
1721
+ }
1722
+
1723
+ // Equivalent of `typeof` but with special handling for array and regexp.
1724
+ function getPropType(propValue) {
1725
+ var propType = typeof propValue;
1726
+ if (Array.isArray(propValue)) {
1727
+ return 'array';
1728
+ }
1729
+ if (propValue instanceof RegExp) {
1730
+ // Old webkits (at least until Android 4.0) return 'function' rather than
1731
+ // 'object' for typeof a RegExp. We'll normalize this here so that /bla/
1732
+ // passes PropTypes.object.
1733
+ return 'object';
1734
+ }
1735
+ if (isSymbol(propType, propValue)) {
1736
+ return 'symbol';
1737
+ }
1738
+ return propType;
1739
+ }
1740
+
1741
+ // This handles more types than `getPropType`. Only used for error messages.
1742
+ // See `createPrimitiveTypeChecker`.
1743
+ function getPreciseType(propValue) {
1744
+ if (typeof propValue === 'undefined' || propValue === null) {
1745
+ return '' + propValue;
1746
+ }
1747
+ var propType = getPropType(propValue);
1748
+ if (propType === 'object') {
1749
+ if (propValue instanceof Date) {
1750
+ return 'date';
1751
+ } else if (propValue instanceof RegExp) {
1752
+ return 'regexp';
1753
+ }
1754
+ }
1755
+ return propType;
1756
+ }
1757
+
1758
+ // Returns a string that is postfixed to a warning about an invalid type.
1759
+ // For example, "undefined" or "of type array"
1760
+ function getPostfixForTypeWarning(value) {
1761
+ var type = getPreciseType(value);
1762
+ switch (type) {
1763
+ case 'array':
1764
+ case 'object':
1765
+ return 'an ' + type;
1766
+ case 'boolean':
1767
+ case 'date':
1768
+ case 'regexp':
1769
+ return 'a ' + type;
1770
+ default:
1771
+ return type;
1772
+ }
1773
+ }
1774
+
1775
+ // Returns class name of the object, if any.
1776
+ function getClassName(propValue) {
1777
+ if (!propValue.constructor || !propValue.constructor.name) {
1778
+ return ANONYMOUS;
1779
+ }
1780
+ return propValue.constructor.name;
1781
+ }
1782
+
1783
+ ReactPropTypes.checkPropTypes = checkPropTypes;
1784
+ ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;
1785
+ ReactPropTypes.PropTypes = ReactPropTypes;
1786
+
1787
+ return ReactPropTypes;
1788
+ };
1789
+ return factoryWithTypeCheckers;
1790
+ }
1791
+
1792
+ /**
1793
+ * Copyright (c) 2013-present, Facebook, Inc.
1794
+ *
1795
+ * This source code is licensed under the MIT license found in the
1796
+ * LICENSE file in the root directory of this source tree.
1797
+ */
1798
+
1799
+ var factoryWithThrowingShims;
1800
+ var hasRequiredFactoryWithThrowingShims;
1801
+
1802
+ function requireFactoryWithThrowingShims () {
1803
+ if (hasRequiredFactoryWithThrowingShims) return factoryWithThrowingShims;
1804
+ hasRequiredFactoryWithThrowingShims = 1;
1805
+
1806
+ var ReactPropTypesSecret = requireReactPropTypesSecret();
1807
+
1808
+ function emptyFunction() {}
1809
+ function emptyFunctionWithReset() {}
1810
+ emptyFunctionWithReset.resetWarningCache = emptyFunction;
1811
+
1812
+ factoryWithThrowingShims = function() {
1813
+ function shim(props, propName, componentName, location, propFullName, secret) {
1814
+ if (secret === ReactPropTypesSecret) {
1815
+ // It is still safe when called from React.
1816
+ return;
1817
+ }
1818
+ var err = new Error(
1819
+ 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
1820
+ 'Use PropTypes.checkPropTypes() to call them. ' +
1821
+ 'Read more at http://fb.me/use-check-prop-types'
1822
+ );
1823
+ err.name = 'Invariant Violation';
1824
+ throw err;
1825
+ } shim.isRequired = shim;
1826
+ function getShim() {
1827
+ return shim;
1828
+ } // Important!
1829
+ // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
1830
+ var ReactPropTypes = {
1831
+ array: shim,
1832
+ bigint: shim,
1833
+ bool: shim,
1834
+ func: shim,
1835
+ number: shim,
1836
+ object: shim,
1837
+ string: shim,
1838
+ symbol: shim,
1839
+
1840
+ any: shim,
1841
+ arrayOf: getShim,
1842
+ element: shim,
1843
+ elementType: shim,
1844
+ instanceOf: getShim,
1845
+ node: shim,
1846
+ objectOf: getShim,
1847
+ oneOf: getShim,
1848
+ oneOfType: getShim,
1849
+ shape: getShim,
1850
+ exact: getShim,
1851
+
1852
+ checkPropTypes: emptyFunctionWithReset,
1853
+ resetWarningCache: emptyFunction
1854
+ };
1855
+
1856
+ ReactPropTypes.PropTypes = ReactPropTypes;
1857
+
1858
+ return ReactPropTypes;
1859
+ };
1860
+ return factoryWithThrowingShims;
1861
+ }
1862
+
1863
+ /**
1864
+ * Copyright (c) 2013-present, Facebook, Inc.
1865
+ *
1866
+ * This source code is licensed under the MIT license found in the
1867
+ * LICENSE file in the root directory of this source tree.
1868
+ */
1869
+
1870
+ var hasRequiredPropTypes;
1871
+
1872
+ function requirePropTypes () {
1873
+ if (hasRequiredPropTypes) return propTypes$1.exports;
1874
+ hasRequiredPropTypes = 1;
1875
+ if (process.env.NODE_ENV !== 'production') {
1876
+ var ReactIs = requireReactIs();
1877
+
1878
+ // By explicitly using `prop-types` you are opting into new development behavior.
1879
+ // http://fb.me/prop-types-in-prod
1880
+ var throwOnDirectAccess = true;
1881
+ propTypes$1.exports = requireFactoryWithTypeCheckers()(ReactIs.isElement, throwOnDirectAccess);
1882
+ } else {
1883
+ // By explicitly using `prop-types` you are opting into new production behavior.
1884
+ // http://fb.me/prop-types-in-prod
1885
+ propTypes$1.exports = requireFactoryWithThrowingShims()();
1886
+ }
1887
+ return propTypes$1.exports;
1888
+ }
1889
+
1890
+ var propTypesExports = requirePropTypes();
1891
+
1892
+ var propTypes = {
1893
+ /** When to wrap children */
1894
+ condition: propTypesExports.bool,
1895
+ /** Wrapper element */
1896
+ wrapper: propTypesExports.element
1897
+ };
1898
+ var ConditionalWrapper = function ConditionalWrapper(_ref) {
1899
+ var condition = _ref.condition,
1900
+ wrapper = _ref.wrapper,
1901
+ children = _ref.children;
1902
+ return condition ? /*#__PURE__*/cloneElement(wrapper, wrapper.props, children) : children;
1903
+ };
1904
+ ConditionalWrapper.propTypes = propTypes;
1905
+
1906
+ var alertData = {
1907
+ warning: "warning-important",
1908
+ info: "info",
1909
+ danger: "error-severe",
1910
+ success: "checked"
1911
+ };
1912
+
1913
+ var CLASS_ROOT$6 = "alert";
1914
+ var Alert = function Alert(_a) {
1915
+ var className = _a.className,
1916
+ _a$type = _a.type,
1917
+ type = _a$type === void 0 ? "info" : _a$type,
1918
+ title = _a.title,
1919
+ renderTitle = _a.renderTitle,
1920
+ description = _a.description,
1921
+ _a$headingLevel = _a.headingLevel,
1922
+ headingLevel = _a$headingLevel === void 0 ? 3 : _a$headingLevel,
1923
+ actionButtons = _a.actionButtons,
1924
+ isFullWidth = _a.isFullWidth,
1925
+ isInverse = _a.isInverse,
1926
+ onClose = _a.onClose,
1927
+ other = __rest(_a, ["className", "type", "title", "renderTitle", "description", "headingLevel", "actionButtons", "isFullWidth", "isInverse", "onClose"]);
1928
+ var HEADINGTAG = "h".concat(headingLevel);
1929
+ var classes = cx(CLASS_ROOT$6, _defineProperty(_defineProperty(_defineProperty({}, "".concat(CLASS_ROOT$6, "--").concat(type), type), "".concat(CLASS_ROOT$6, "--full-width"), isFullWidth), "".concat(CLASS_ROOT$6, "--inverse"), isInverse), className);
1930
+ var alertTitle = renderTitle && renderTitle(Object.assign({
1931
+ className: className,
1932
+ type: type,
1933
+ title: title,
1934
+ renderTitle: renderTitle,
1935
+ description: description,
1936
+ headingLevel: headingLevel,
1937
+ actionButtons: actionButtons,
1938
+ isFullWidth: isFullWidth,
1939
+ isInverse: isInverse,
1940
+ onClose: onClose
1941
+ }, other)) || title && /*#__PURE__*/React.createElement(HEADINGTAG, {
1942
+ className: "".concat(CLASS_ROOT$6, "__title")
1943
+ }, title);
1944
+ return /*#__PURE__*/jsxRuntimeExports.jsxs("div", _objectSpread2(_objectSpread2({
1945
+ className: classes
1946
+ }, other), {}, {
1947
+ children: [/*#__PURE__*/jsxRuntimeExports.jsx("div", {
1948
+ className: "".concat(CLASS_ROOT$6, "__icon"),
1949
+ children: /*#__PURE__*/jsxRuntimeExports.jsx(Icon, {
1950
+ name: alertData[type],
1951
+ color: type,
1952
+ size: "medium"
1953
+ })
1954
+ }), /*#__PURE__*/jsxRuntimeExports.jsxs("div", {
1955
+ className: "".concat(CLASS_ROOT$6, "__content"),
1956
+ children: [alertTitle, description && /*#__PURE__*/jsxRuntimeExports.jsx(ConditionalWrapper, {
1957
+ condition: typeof description === "string",
1958
+ wrapper: /*#__PURE__*/jsxRuntimeExports.jsx("p", {}),
1959
+ children: description
1960
+ }), actionButtons && /*#__PURE__*/jsxRuntimeExports.jsx(ConditionalWrapper, {
1961
+ condition: React.Children.count(actionButtons) > 1,
1962
+ wrapper: /*#__PURE__*/jsxRuntimeExports.jsx(Buttons, {}),
1963
+ children: React.Children.map(actionButtons, function (button) {
1964
+ return button;
1965
+ })
1966
+ })]
1967
+ }), onClose && /*#__PURE__*/jsxRuntimeExports.jsx("div", {
1968
+ className: "".concat(CLASS_ROOT$6, "__close"),
1969
+ children: /*#__PURE__*/jsxRuntimeExports.jsx("button", {
1970
+ onClick: onClose,
1971
+ children: /*#__PURE__*/jsxRuntimeExports.jsx(Icon, {
1972
+ name: "close",
1973
+ size: "medium"
1974
+ })
1975
+ })
1976
+ })]
1977
+ }));
1978
+ };
1979
+ Alert.displayName = "Alert";
1980
+
1981
+ var CLASS_ROOT$5 = "badge";
1982
+ var Badge = function Badge(_a) {
1983
+ var color = _a.color,
1984
+ isDark = _a.isDark,
1985
+ isRound = _a.isRound,
1986
+ className = _a.className,
1987
+ children = _a.children,
1988
+ other = __rest(_a, ["color", "isDark", "isRound", "className", "children"]);
1989
+ var classes = cx(CLASS_ROOT$5, className, _defineProperty(_defineProperty({
1990
+ "badge--dark": isDark
1991
+ }, "badge--".concat(color), color), "badge--round", isRound));
1992
+ return /*#__PURE__*/jsxRuntimeExports.jsx("span", _objectSpread2(_objectSpread2({
1993
+ className: classes
1994
+ }, other), {}, {
1995
+ children: children
1996
+ }));
1997
+ };
1998
+ Badge.displayName = "Badge";
1999
+
2000
+ var CLASS_ROOT$4 = "btn";
2001
+ var Button = /*#__PURE__*/React.forwardRef(function (props, ref) {
2002
+ var className = props.className,
2003
+ children = props.children,
2004
+ _props$htmlType = props.htmlType,
2005
+ htmlType = _props$htmlType === void 0 ? "button" : _props$htmlType,
2006
+ href = props.href,
2007
+ isActive = props.isActive,
2008
+ isDefault = props.isDefault,
2009
+ isDisabled = props.isDisabled,
2010
+ isInverse = props.isInverse,
2011
+ size = props.size,
2012
+ isSquare = props.isSquare,
2013
+ type = props.type,
2014
+ elemRef = props.elemRef,
2015
+ other = __rest(props, ["className", "children", "htmlType", "href", "isActive", "isDefault", "isDisabled", "isInverse", "size", "isSquare", "type", "elemRef"]);
2016
+ 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);
2017
+ if (href) {
2018
+ // Anchor element
2019
+ var anchorProps = other;
2020
+ return /*#__PURE__*/jsxRuntimeExports.jsx("a", _objectSpread2(_objectSpread2({
2021
+ href: href,
2022
+ className: classes,
2023
+ "aria-disabled": isDisabled ? "true" : undefined,
2024
+ ref: elemRef || ref
2025
+ }, anchorProps), {}, {
2026
+ children: children
2027
+ }));
2028
+ } else {
2029
+ // Button element
2030
+ var buttonProps = other;
2031
+ return /*#__PURE__*/jsxRuntimeExports.jsx("button", _objectSpread2(_objectSpread2({
2032
+ type: htmlType,
2033
+ className: classes,
2034
+ disabled: isDisabled ? true : undefined,
2035
+ "aria-disabled": isDisabled ? "true" : undefined,
2036
+ ref: elemRef || ref
2037
+ }, buttonProps), {}, {
2038
+ children: children
2039
+ }));
2040
+ }
2041
+ });
2042
+ Button.displayName = "Button";
2043
+
2044
+ var IconButton = /*#__PURE__*/React.forwardRef(function (_a, ref) {
2045
+ var iconName = _a.iconName,
2046
+ _a$iconPosition = _a.iconPosition,
2047
+ iconPosition = _a$iconPosition === void 0 ? "left" : _a$iconPosition,
2048
+ iconClassName = _a.iconClassName,
2049
+ children = _a.children,
2050
+ size = _a.size,
2051
+ isSquare = _a.isSquare,
2052
+ other = __rest(_a, ["iconName", "iconPosition", "iconClassName", "children", "size", "isSquare"]);
2053
+ var IconComponent = function IconComponent(_a) {
2054
+ var className = _a.className,
2055
+ props = __rest(_a, ["className"]);
2056
+ return /*#__PURE__*/jsxRuntimeExports.jsx(Icon, _objectSpread2({
2057
+ name: iconName,
2058
+ size: size !== null && size !== void 0 ? size : "medium",
2059
+ className: cx(iconClassName, className)
2060
+ }, props));
2061
+ };
2062
+ if (isSquare) {
2063
+ return /*#__PURE__*/jsxRuntimeExports.jsxs(Button, _objectSpread2(_objectSpread2({
2064
+ size: size,
2065
+ isSquare: true
2066
+ }, other), {}, {
2067
+ ref: ref,
2068
+ children: [/*#__PURE__*/jsxRuntimeExports.jsx(IconComponent, {}), /*#__PURE__*/jsxRuntimeExports.jsx("span", {
2069
+ className: "visually-hidden",
2070
+ children: children
2071
+ })]
2072
+ }));
2073
+ }
2074
+ return /*#__PURE__*/jsxRuntimeExports.jsxs(Button, _objectSpread2(_objectSpread2({
2075
+ ref: ref,
2076
+ size: size
2077
+ }, other), {}, {
2078
+ children: [iconPosition === "left" && /*#__PURE__*/jsxRuntimeExports.jsx(IconComponent, {
2079
+ className: "btn__icon-left"
2080
+ }), children, iconPosition === "right" && /*#__PURE__*/jsxRuntimeExports.jsx(IconComponent, {
2081
+ className: "btn__icon-right"
2082
+ })]
2083
+ }));
2084
+ });
2085
+ IconButton.displayName = "IconButton";
2086
+
2087
+ var ButtonPrimary = function ButtonPrimary(props) {
2088
+ return /*#__PURE__*/jsxRuntimeExports.jsx(Button, _objectSpread2({
2089
+ type: "primary"
2090
+ }, props));
2091
+ };
2092
+ ButtonPrimary.displayName = "ButtonPrimary";
2093
+ var ButtonFill = function ButtonFill(props) {
2094
+ return /*#__PURE__*/jsxRuntimeExports.jsx(Button, _objectSpread2({
2095
+ type: "fill"
2096
+ }, props));
2097
+ };
2098
+ ButtonFill.displayName = "ButtonFill";
2099
+ var ButtonGhost = function ButtonGhost(props) {
2100
+ return /*#__PURE__*/jsxRuntimeExports.jsx(Button, _objectSpread2({
2101
+ type: "ghost"
2102
+ }, props));
2103
+ };
2104
+ ButtonGhost.displayName = "ButtonGhost";
2105
+
2106
+ var idx = 0;
2107
+ var uuid = function uuid() {
2108
+ return idx += 1;
2109
+ };
2110
+ /**
2111
+ * Generates a unique ID string with an optional name prefix
2112
+ * @param name Optional prefix for the ID
2113
+ * @returns A unique ID string
2114
+ */
2115
+ function generateId(name) {
2116
+ return "id".concat('', "-").concat(uuid());
2117
+ }
2118
+
2119
+ /**
2120
+ * A hook to create and manage an instance of a "static" class
2121
+ * @param StaticClass The class to instantiate
2122
+ * @param config Configuration options for the class
2123
+ * @returns [ref callback, instance reference]
2124
+ */
2125
+ var useStatic = function useStatic(StaticClass) {
2126
+ var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
2127
+ var instance = useRef(null);
2128
+ var configRef = useRef(config);
2129
+ useEffect(function () {
2130
+ configRef.current = config !== null && config !== void 0 ? config : {};
2131
+ }, [config]);
2132
+ var ref = useCallback(function (node) {
2133
+ var _a, _b;
2134
+ // use latest config available
2135
+ var currentConfig = configRef.current;
2136
+ if (node) {
2137
+ if (instance.current === null) {
2138
+ instance.current = new StaticClass(node, currentConfig);
2139
+ } else {
2140
+ (_b = (_a = instance.current).update) === null || _b === void 0 ? void 0 : _b.call(_a, currentConfig);
2141
+ }
2142
+ }
2143
+ }, [StaticClass]);
2144
+ useEffect(function () {
2145
+ return function () {
2146
+ var _a, _b;
2147
+ if (instance.current) {
2148
+ (_b = (_a = instance.current).destroy) === null || _b === void 0 ? void 0 : _b.call(_a);
2149
+ instance.current = null;
2150
+ }
2151
+ };
2152
+ }, []);
2153
+ return [ref, instance];
2154
+ };
2155
+
2156
+ const not = {
2157
+ inert: ':not([inert]):not([inert] *)',
2158
+ negTabIndex: ':not([tabindex^="-"])',
2159
+ disabled: ':not(:disabled)',
2160
+ };
2161
+
2162
+ var focusableSelectors = [
2163
+ `a[href]${not.inert}${not.negTabIndex}`,
2164
+ `area[href]${not.inert}${not.negTabIndex}`,
2165
+ `input:not([type="hidden"]):not([type="radio"])${not.inert}${not.negTabIndex}${not.disabled}`,
2166
+ `input[type="radio"]${not.inert}${not.negTabIndex}${not.disabled}`,
2167
+ `select${not.inert}${not.negTabIndex}${not.disabled}`,
2168
+ `textarea${not.inert}${not.negTabIndex}${not.disabled}`,
2169
+ `button${not.inert}${not.negTabIndex}${not.disabled}`,
2170
+ `details${not.inert} > summary:first-of-type${not.negTabIndex}`,
2171
+ // Discard until Firefox supports `:has()`
2172
+ // See: https://github.com/KittyGiraudel/focusable-selectors/issues/12
2173
+ // `details:not(:has(> summary))${not.inert}${not.negTabIndex}`,
2174
+ `iframe${not.inert}${not.negTabIndex}`,
2175
+ `audio[controls]${not.inert}${not.negTabIndex}`,
2176
+ `video[controls]${not.inert}${not.negTabIndex}`,
2177
+ `[contenteditable]${not.inert}${not.negTabIndex}`,
2178
+ `[tabindex]${not.inert}${not.negTabIndex}`,
2179
+ ];
2180
+
2181
+ /**
2182
+ * Set the focus to the first element with `autofocus` with the element or the
2183
+ * element itself.
2184
+ */
2185
+ function focus(el) {
2186
+ (el.querySelector('[autofocus]') || el).focus();
2187
+ }
2188
+ /**
2189
+ * Get the first and last focusable elements within a given element.
2190
+ */
2191
+ function getFocusableEdges(el) {
2192
+ // Check for a focusable element within the subtree of the given element.
2193
+ const firstEl = findFocusableEl(el, true);
2194
+ // Only if we find the first element do we need to look for the last one. If
2195
+ // there’s no last element, we set `lastEl` as a reference to `firstEl` so
2196
+ // that the returned array is still always of length 2.
2197
+ const lastEl = firstEl ? findFocusableEl(el, false) || firstEl : null;
2198
+ return [firstEl, lastEl];
2199
+ }
2200
+ /**
2201
+ * Find the first focusable element inside the given element if `forward` is
2202
+ * truthy or the last focusable element otherwise.
2203
+ */
2204
+ function findFocusableEl(el, forward) {
2205
+ // If we’re walking forward, check if this element is focusable, and return it
2206
+ // immediately if it is.
2207
+ if (forward && isFocusable(el))
2208
+ return el;
2209
+ // We should only search the subtree of this element if it can have focusable
2210
+ // children.
2211
+ if (canHaveFocusableChildren(el)) {
2212
+ // Start walking the DOM tree, looking for focusable elements.
2213
+ // Case 1: If this element has a shadow root, search it recursively.
2214
+ if (el.shadowRoot) {
2215
+ // Descend into this subtree.
2216
+ let next = getNextChildEl(el.shadowRoot, forward);
2217
+ // Traverse the siblings, searching the subtree of each one for focusable
2218
+ // elements.
2219
+ while (next) {
2220
+ const focusableEl = findFocusableEl(next, forward);
2221
+ if (focusableEl)
2222
+ return focusableEl;
2223
+ next = getNextSiblingEl(next, forward);
2224
+ }
2225
+ }
2226
+ // Case 2: If this element is a slot for a Custom Element, search its
2227
+ // assigned elements recursively.
2228
+ else if (el.localName === 'slot') {
2229
+ const assignedElements = el.assignedElements({
2230
+ flatten: true,
2231
+ });
2232
+ if (!forward)
2233
+ assignedElements.reverse();
2234
+ for (const assignedElement of assignedElements) {
2235
+ const focusableEl = findFocusableEl(assignedElement, forward);
2236
+ if (focusableEl)
2237
+ return focusableEl;
2238
+ }
2239
+ }
2240
+ // Case 3: this is a regular Light DOM element. Search its subtree.
2241
+ else {
2242
+ // Descend into this subtree.
2243
+ let next = getNextChildEl(el, forward);
2244
+ // Traverse siblings, searching the subtree of each one
2245
+ // for focusable elements.
2246
+ while (next) {
2247
+ const focusableEl = findFocusableEl(next, forward);
2248
+ if (focusableEl)
2249
+ return focusableEl;
2250
+ next = getNextSiblingEl(next, forward);
2251
+ }
2252
+ }
2253
+ }
2254
+ // If we’re walking backward, we want to check the element’s entire subtree
2255
+ // before checking the element itself. If this element is focusable, return
2256
+ // it.
2257
+ if (!forward && isFocusable(el))
2258
+ return el;
2259
+ return null;
2260
+ }
2261
+ function getNextChildEl(el, forward) {
2262
+ return forward ? el.firstElementChild : el.lastElementChild;
2263
+ }
2264
+ function getNextSiblingEl(el, forward) {
2265
+ return forward ? el.nextElementSibling : el.previousElementSibling;
2266
+ }
2267
+ /**
2268
+ * Determine if an element is hidden from the user.
2269
+ */
2270
+ const isHidden$1 = (el) => {
2271
+ // Browsers hide all non-<summary> descendants of closed <details> elements
2272
+ // from user interaction, but those non-<summary> elements may still match our
2273
+ // focusable-selectors and may still have dimensions, so we need a special
2274
+ // case to ignore them.
2275
+ if (el.matches('details:not([open]) *') &&
2276
+ !el.matches('details>summary:first-of-type'))
2277
+ return true;
2278
+ // If this element has no painted dimensions, it's hidden.
2279
+ return !(el.offsetWidth || el.offsetHeight || el.getClientRects().length);
2280
+ };
2281
+ /**
2282
+ * Determine if an element is focusable and has user-visible painted dimensions.
2283
+ */
2284
+ const isFocusable = (el) => {
2285
+ // A shadow host that delegates focus will never directly receive focus,
2286
+ // even with `tabindex=0`. Consider our <fancy-button> custom element, which
2287
+ // delegates focus to its shadow button:
2288
+ //
2289
+ // <fancy-button tabindex="0">
2290
+ // #shadow-root
2291
+ // <button><slot></slot></button>
2292
+ // </fancy-button>
2293
+ //
2294
+ // The browser acts as as if there is only one focusable element – the shadow
2295
+ // button. Our library should behave the same way.
2296
+ if (el.shadowRoot?.delegatesFocus)
2297
+ return false;
2298
+ return el.matches(focusableSelectors.join(',')) && !isHidden$1(el);
2299
+ };
2300
+ /**
2301
+ * Determine if an element can have focusable children. Useful for bailing out
2302
+ * early when walking the DOM tree.
2303
+ * @example
2304
+ * This div is inert, so none of its children can be focused, even though they
2305
+ * meet our criteria for what is focusable. Once we check the div, we can skip
2306
+ * the rest of the subtree.
2307
+ * ```html
2308
+ * <div inert>
2309
+ * <button>Button</button>
2310
+ * <a href="#">Link</a>
2311
+ * </div>
2312
+ * ```
2313
+ */
2314
+ function canHaveFocusableChildren(el) {
2315
+ // The browser will never send focus into a Shadow DOM if the host element
2316
+ // has a negative tabindex. This applies to both slotted Light DOM Shadow DOM
2317
+ // children
2318
+ if (el.shadowRoot && el.getAttribute('tabindex') === '-1')
2319
+ return false;
2320
+ // Elemments matching this selector are either hidden entirely from the user,
2321
+ // or are visible but unavailable for interaction. Their descentants can never
2322
+ // receive focus.
2323
+ return !el.matches(':disabled,[hidden],[inert]');
2324
+ }
2325
+ /**
2326
+ * Get the active element, accounting for Shadow DOM subtrees.
2327
+ * @author Cory LaViska
2328
+ * @see: https://www.abeautifulsite.net/posts/finding-the-active-element-in-a-shadow-root/
2329
+ */
2330
+ function getActiveEl(root = document) {
2331
+ const activeEl = root.activeElement;
2332
+ if (!activeEl)
2333
+ return null;
2334
+ // If there’s a shadow root, recursively find the active element within it.
2335
+ // If the recursive call returns null, return the active element
2336
+ // of the top-level Document.
2337
+ if (activeEl.shadowRoot)
2338
+ return getActiveEl(activeEl.shadowRoot) || document.activeElement;
2339
+ // If not, we can just return the active element
2340
+ return activeEl;
2341
+ }
2342
+ /**
2343
+ * Trap the focus inside the given element
2344
+ */
2345
+ function trapTabKey(el, event) {
2346
+ const [firstFocusableEl, lastFocusableEl] = getFocusableEdges(el);
2347
+ // If there are no focusable children in the dialog, prevent the user from
2348
+ // tabbing out of it
2349
+ if (!firstFocusableEl)
2350
+ return event.preventDefault();
2351
+ const activeEl = getActiveEl();
2352
+ // If the SHIFT key is pressed while tabbing (moving backwards) and the
2353
+ // currently focused item is the first one, move the focus to the last
2354
+ // focusable item from the dialog element
2355
+ if (event.shiftKey && activeEl === firstFocusableEl) {
2356
+ // @ts-ignore: we know that `lastFocusableEl` is not null here
2357
+ lastFocusableEl.focus();
2358
+ event.preventDefault();
2359
+ }
2360
+ // If the SHIFT key is not pressed (moving forwards) and the currently focused
2361
+ // item is the last one, move the focus to the first focusable item from the
2362
+ // dialog element
2363
+ else if (!event.shiftKey && activeEl === lastFocusableEl) {
2364
+ firstFocusableEl.focus();
2365
+ event.preventDefault();
2366
+ }
2367
+ }
2368
+ /**
2369
+ * Find the closest element to the given element matching the given selector,
2370
+ * accounting for Shadow DOM subtrees.
2371
+ * @author Louis St-Amour
2372
+ * @see: https://stackoverflow.com/a/56105394
2373
+ */
2374
+ function closest(selector, base) {
2375
+ function from(el) {
2376
+ if (!el || el === document || el === window)
2377
+ return null;
2378
+ // Reading the `assignedSlot` property from the element (as suggested by the
2379
+ // aforementioned StackOverflow answer) is not enough, because it does not
2380
+ // take into consideration elements nested deeply within a <slot>. For these
2381
+ // elements, the `assignedSlot` property is `null` as it is only specified
2382
+ // for top-level elements within a <slot>. To still find the closest <slot>,
2383
+ // we walk up the tree looking for the `assignedSlot` property.
2384
+ const slot = findAssignedSlot(el);
2385
+ if (slot)
2386
+ el = slot;
2387
+ return (el.closest(selector) ||
2388
+ from(el.getRootNode().host));
2389
+ }
2390
+ return from(base);
2391
+ }
2392
+ function findAssignedSlot(node) {
2393
+ return (node.assignedSlot ||
2394
+ (node.parentNode ? findAssignedSlot(node.parentNode) : null));
2395
+ }
2396
+
2397
+ const SCOPE = 'data-a11y-dialog';
2398
+ class A11yDialog {
2399
+ $el;
2400
+ id;
2401
+ previouslyFocused;
2402
+ shown;
2403
+ constructor(element) {
2404
+ this.$el = element;
2405
+ this.id = this.$el.getAttribute(SCOPE) || this.$el.id;
2406
+ this.previouslyFocused = null;
2407
+ this.shown = false;
2408
+ this.maintainFocus = this.maintainFocus.bind(this);
2409
+ this.bindKeypress = this.bindKeypress.bind(this);
2410
+ this.handleTriggerClicks = this.handleTriggerClicks.bind(this);
2411
+ this.show = this.show.bind(this);
2412
+ this.hide = this.hide.bind(this);
2413
+ this.$el.setAttribute('aria-hidden', 'true');
2414
+ this.$el.setAttribute('aria-modal', 'true');
2415
+ this.$el.setAttribute('tabindex', '-1');
2416
+ if (!this.$el.hasAttribute('role')) {
2417
+ this.$el.setAttribute('role', 'dialog');
2418
+ }
2419
+ document.addEventListener('click', this.handleTriggerClicks, true);
2420
+ }
2421
+ /**
2422
+ * Destroy the current instance (after making sure the dialog has been hidden)
2423
+ * and remove all associated listeners from dialog openers and closers
2424
+ */
2425
+ destroy() {
2426
+ // Dispatch a `destroy` event
2427
+ const destroyEvent = this.fire('destroy');
2428
+ // If the event was prevented, do not continue with the normal behavior
2429
+ if (destroyEvent.defaultPrevented)
2430
+ return this;
2431
+ // Hide the dialog to avoid destroying an open instance
2432
+ this.hide();
2433
+ // Remove the click event delegates for our openers and closers
2434
+ document.removeEventListener('click', this.handleTriggerClicks, true);
2435
+ // Clone and replace the dialog element to prevent memory leaks caused by
2436
+ // event listeners that the author might not have cleaned up.
2437
+ this.$el.replaceWith(this.$el.cloneNode(true));
2438
+ return this;
2439
+ }
2440
+ /**
2441
+ * Show the dialog element, trap the current focus within it, listen for some
2442
+ * specific key presses and fire all registered callbacks for `show` event
2443
+ */
2444
+ show(event) {
2445
+ // If the dialog is already open, abort
2446
+ if (this.shown)
2447
+ return this;
2448
+ // Dispatch a `show` event
2449
+ const showEvent = this.fire('show', event);
2450
+ // If the event was prevented, do not continue with the normal behavior
2451
+ if (showEvent.defaultPrevented)
2452
+ return this;
2453
+ // Keep a reference to the currently focused element to be able to restore
2454
+ // it later
2455
+ this.shown = true;
2456
+ this.$el.removeAttribute('aria-hidden');
2457
+ this.previouslyFocused = getActiveEl();
2458
+ // Due to a long lasting bug in Safari, clicking an interactive element
2459
+ // (like a <button>) does *not* move the focus to that element, which means
2460
+ // `document.activeElement` is whatever element is currently focused (like
2461
+ // an <input>), or the <body> element otherwise. We can work around that
2462
+ // problem by checking whether the focused element is the <body>, and if it,
2463
+ // store the click event target.
2464
+ // See: https://bugs.webkit.org/show_bug.cgi?id=22261
2465
+ if (this.previouslyFocused?.tagName === 'BODY' && event?.target) {
2466
+ this.previouslyFocused = event.target;
2467
+ }
2468
+ // Set the focus to the dialog element
2469
+ // See: https://github.com/KittyGiraudel/a11y-dialog/pull/583
2470
+ if (event?.type === 'focus') {
2471
+ this.maintainFocus();
2472
+ }
2473
+ else {
2474
+ focus(this.$el);
2475
+ }
2476
+ // Bind a focus event listener to the body element to make sure the focus
2477
+ // stays trapped inside the dialog while open, and start listening for some
2478
+ // specific key presses (TAB and ESC)
2479
+ document.body.addEventListener('focus', this.maintainFocus, true);
2480
+ this.$el.addEventListener('keydown', this.bindKeypress, true);
2481
+ return this;
2482
+ }
2483
+ /**
2484
+ * Hide the dialog element, restore the focus to the previously active
2485
+ * element, stop listening for some specific key presses and fire all
2486
+ * registered callbacks for `hide` event
2487
+ */
2488
+ hide(event) {
2489
+ // If the dialog is already closed, abort
2490
+ if (!this.shown)
2491
+ return this;
2492
+ // Dispatch a `hide` event
2493
+ const hideEvent = this.fire('hide', event);
2494
+ // If the event was prevented, do not continue with the normal behavior
2495
+ if (hideEvent.defaultPrevented)
2496
+ return this;
2497
+ this.shown = false;
2498
+ this.$el.setAttribute('aria-hidden', 'true');
2499
+ // Remove the focus event listener to the body element and stop listening
2500
+ // for specific key presses
2501
+ document.body.removeEventListener('focus', this.maintainFocus, true);
2502
+ this.$el.removeEventListener('keydown', this.bindKeypress, true);
2503
+ // Ensure the previously focused element (if any) has a `focus` method
2504
+ // before attempting to call it to account for SVG elements
2505
+ // See: https://github.com/KittyGiraudel/a11y-dialog/issues/108
2506
+ this.previouslyFocused?.focus?.();
2507
+ return this;
2508
+ }
2509
+ /**
2510
+ * Register a new callback for the given event type
2511
+ */
2512
+ on(type, handler, options) {
2513
+ this.$el.addEventListener(type, handler, options);
2514
+ return this;
2515
+ }
2516
+ /**
2517
+ * Unregister an existing callback for the given event type
2518
+ */
2519
+ off(type, handler, options) {
2520
+ this.$el.removeEventListener(type, handler, options);
2521
+ return this;
2522
+ }
2523
+ /**
2524
+ * Dispatch and return a custom event from the DOM element associated with
2525
+ * this dialog; this allows authors to listen for and respond to the events
2526
+ * in their own code
2527
+ */
2528
+ fire(type, event) {
2529
+ const customEvent = new CustomEvent(type, {
2530
+ detail: event,
2531
+ cancelable: true,
2532
+ });
2533
+ this.$el.dispatchEvent(customEvent);
2534
+ return customEvent;
2535
+ }
2536
+ /**
2537
+ * Add a delegated event listener for when elememts that open or close the
2538
+ * dialog are clicked, and call `show` or `hide`, respectively
2539
+ */
2540
+ handleTriggerClicks(event) {
2541
+ // We need to retrieve the click target while accounting for Shadow DOM.
2542
+ // When within a web component, `event.target` is the shadow root (e.g.
2543
+ // `<my-dialog>`), so we need to use `event.composedPath()` to get the click
2544
+ // target
2545
+ // See: https://github.com/KittyGiraudel/a11y-dialog/issues/582
2546
+ const target = event.composedPath()[0];
2547
+ const opener = closest(`[${SCOPE}-show="${this.id}"]`, target);
2548
+ const explicitCloser = closest(`[${SCOPE}-hide="${this.id}"]`, target);
2549
+ const implicitCloser = closest(`[${SCOPE}-hide]`, target) &&
2550
+ closest('[aria-modal="true"]', target) === this.$el;
2551
+ // We use `closest(..)` (instead of `matches(..)`) so that clicking an
2552
+ // element nested within a dialog opener does cause the dialog to open, and
2553
+ // we use our custom `closest(..)` function so that it can cross shadow
2554
+ // boundaries
2555
+ // See: https://github.com/KittyGiraudel/a11y-dialog/issues/712
2556
+ if (opener)
2557
+ this.show(event);
2558
+ if (explicitCloser || implicitCloser)
2559
+ this.hide(event);
2560
+ }
2561
+ /**
2562
+ * Private event handler used when listening to some specific key presses
2563
+ * (namely ESC and TAB)
2564
+ */
2565
+ bindKeypress(event) {
2566
+ // This is an escape hatch in case there are nested open dialogs, so that
2567
+ // only the top most dialog gets interacted with (`closest` is basically
2568
+ // `Element.prototype.closest()` accounting for Shadow DOM subtrees)
2569
+ if (closest('[aria-modal="true"]', getActiveEl()) !== this.$el) {
2570
+ return;
2571
+ }
2572
+ let hasOpenPopover = false;
2573
+ try {
2574
+ hasOpenPopover = !!this.$el.querySelector('[popover]:not([popover="manual"]):popover-open');
2575
+ }
2576
+ catch {
2577
+ // Run that DOM query in a try/catch because not all browsers support the
2578
+ // `:popover-open` selector, which would cause the whole expression to
2579
+ // fail
2580
+ // See: https://caniuse.com/mdn-css_selectors_popover-open
2581
+ // See: https://github.com/KittyGiraudel/a11y-dialog/pull/578#discussion_r1343215149
2582
+ }
2583
+ // If the dialog is shown and the ESC key is pressed, prevent any further
2584
+ // effects from the ESC key and hide the dialog, unless:
2585
+ // - its role is `alertdialog`, which means it should be modal
2586
+ // - or it contains an open popover, in which case ESC should close it
2587
+ if (event.key === 'Escape' &&
2588
+ this.$el.getAttribute('role') !== 'alertdialog' &&
2589
+ !hasOpenPopover) {
2590
+ event.preventDefault();
2591
+ this.hide(event);
2592
+ }
2593
+ // If the dialog is shown and the TAB key is pressed, make sure the focus
2594
+ // stays trapped within the dialog element
2595
+ if (event.key === 'Tab') {
2596
+ trapTabKey(this.$el, event);
2597
+ }
2598
+ }
2599
+ /**
2600
+ * If the dialog is shown and the focus is not within a dialog element (either
2601
+ * this one or another one in case of nested dialogs) or an element with the
2602
+ * ignore attribute, move it back to the dialog container
2603
+ * See: https://github.com/KittyGiraudel/a11y-dialog/issues/177
2604
+ */
2605
+ maintainFocus() {
2606
+ // We use `getActiveEl()` and not `event.target` here because the latter can
2607
+ // be a shadow root. This can happen when having a focusable element after
2608
+ // slotted content: tabbing out of it causes this focus listener to trigger
2609
+ // with the shadow root as a target event. In such a case, the focus would
2610
+ // be incorrectly moved to the dialog, which shouldn’t happen. Getting the
2611
+ // active element (while accounting for Shadow DOM) avoids that problem.
2612
+ // See: https://github.com/KittyGiraudel/a11y-dialog/issues/778
2613
+ const target = getActiveEl();
2614
+ if (!closest(`[aria-modal="true"], [${SCOPE}-ignore-focus-trap]`, target)) {
2615
+ focus(this.$el);
2616
+ }
2617
+ }
2618
+ }
2619
+
2620
+ function instantiateDialogs() {
2621
+ for (const el of document.querySelectorAll('[data-a11y-dialog]')) {
2622
+ new A11yDialog(el);
2623
+ }
2624
+ }
2625
+ if (typeof document !== 'undefined') {
2626
+ if (document.readyState === 'loading') {
2627
+ document.addEventListener('DOMContentLoaded', instantiateDialogs);
2628
+ }
2629
+ else {
2630
+ instantiateDialogs();
2631
+ }
2632
+ }
2633
+
2634
+ /*!
2635
+ * tabbable 6.2.0
2636
+ * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
2637
+ */
2638
+ // NOTE: separate `:not()` selectors has broader browser support than the newer
2639
+ // `:not([inert], [inert] *)` (Feb 2023)
2640
+ // CAREFUL: JSDom does not support `:not([inert] *)` as a selector; using it causes
2641
+ // the entire query to fail, resulting in no nodes found, which will break a lot
2642
+ // of things... so we have to rely on JS to identify nodes inside an inert container
2643
+ 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])'];
2644
+ var candidateSelector = /* #__PURE__ */candidateSelectors.join(',');
2645
+ var NoElement = typeof Element === 'undefined';
2646
+ var matches = NoElement ? function () {} : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;
2647
+ var getRootNode = !NoElement && Element.prototype.getRootNode ? function (element) {
2648
+ var _element$getRootNode;
2649
+ return element === null || element === void 0 ? void 0 : (_element$getRootNode = element.getRootNode) === null || _element$getRootNode === void 0 ? void 0 : _element$getRootNode.call(element);
2650
+ } : function (element) {
2651
+ return element === null || element === void 0 ? void 0 : element.ownerDocument;
2652
+ };
2653
+
2654
+ /**
2655
+ * Determines if a node is inert or in an inert ancestor.
2656
+ * @param {Element} [node]
2657
+ * @param {boolean} [lookUp] If true and `node` is not inert, looks up at ancestors to
2658
+ * see if any of them are inert. If false, only `node` itself is considered.
2659
+ * @returns {boolean} True if inert itself or by way of being in an inert ancestor.
2660
+ * False if `node` is falsy.
2661
+ */
2662
+ var isInert = function isInert(node, lookUp) {
2663
+ var _node$getAttribute;
2664
+ if (lookUp === void 0) {
2665
+ lookUp = true;
2666
+ }
2667
+ // CAREFUL: JSDom does not support inert at all, so we can't use the `HTMLElement.inert`
2668
+ // JS API property; we have to check the attribute, which can either be empty or 'true';
2669
+ // if it's `null` (not specified) or 'false', it's an active element
2670
+ 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');
2671
+ var inert = inertAtt === '' || inertAtt === 'true';
2672
+
2673
+ // NOTE: this could also be handled with `node.matches('[inert], :is([inert] *)')`
2674
+ // if it weren't for `matches()` not being a function on shadow roots; the following
2675
+ // code works for any kind of node
2676
+ // CAREFUL: JSDom does not appear to support certain selectors like `:not([inert] *)`
2677
+ // so it likely would not support `:is([inert] *)` either...
2678
+ var result = inert || lookUp && node && isInert(node.parentNode); // recursive
2679
+
2680
+ return result;
2681
+ };
2682
+
2683
+ /**
2684
+ * Determines if a node's content is editable.
2685
+ * @param {Element} [node]
2686
+ * @returns True if it's content-editable; false if it's not or `node` is falsy.
2687
+ */
2688
+ var isContentEditable = function isContentEditable(node) {
2689
+ var _node$getAttribute2;
2690
+ // CAREFUL: JSDom does not support the `HTMLElement.isContentEditable` API so we have
2691
+ // to use the attribute directly to check for this, which can either be empty or 'true';
2692
+ // if it's `null` (not specified) or 'false', it's a non-editable element
2693
+ 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');
2694
+ return attValue === '' || attValue === 'true';
2695
+ };
2696
+
2697
+ /**
2698
+ * @private
2699
+ * Determines if the node has an explicitly specified `tabindex` attribute.
2700
+ * @param {HTMLElement} node
2701
+ * @returns {boolean} True if so; false if not.
2702
+ */
2703
+ var hasTabIndex = function hasTabIndex(node) {
2704
+ return !isNaN(parseInt(node.getAttribute('tabindex'), 10));
2705
+ };
2706
+
2707
+ /**
2708
+ * Determine the tab index of a given node.
2709
+ * @param {HTMLElement} node
2710
+ * @returns {number} Tab order (negative, 0, or positive number).
2711
+ * @throws {Error} If `node` is falsy.
2712
+ */
2713
+ var getTabIndex = function getTabIndex(node) {
2714
+ if (!node) {
2715
+ throw new Error('No node provided');
2716
+ }
2717
+ if (node.tabIndex < 0) {
2718
+ // in Chrome, <details/>, <audio controls/> and <video controls/> elements get a default
2719
+ // `tabIndex` of -1 when the 'tabindex' attribute isn't specified in the DOM,
2720
+ // yet they are still part of the regular tab order; in FF, they get a default
2721
+ // `tabIndex` of 0; since Chrome still puts those elements in the regular tab
2722
+ // order, consider their tab index to be 0.
2723
+ // Also browsers do not return `tabIndex` correctly for contentEditable nodes;
2724
+ // so if they don't have a tabindex attribute specifically set, assume it's 0.
2725
+ if ((/^(AUDIO|VIDEO|DETAILS)$/.test(node.tagName) || isContentEditable(node)) && !hasTabIndex(node)) {
2726
+ return 0;
2727
+ }
2728
+ }
2729
+ return node.tabIndex;
2730
+ };
2731
+ var isInput = function isInput(node) {
2732
+ return node.tagName === 'INPUT';
2733
+ };
2734
+ var isHiddenInput = function isHiddenInput(node) {
2735
+ return isInput(node) && node.type === 'hidden';
2736
+ };
2737
+ var isDetailsWithSummary = function isDetailsWithSummary(node) {
2738
+ var r = node.tagName === 'DETAILS' && Array.prototype.slice.apply(node.children).some(function (child) {
2739
+ return child.tagName === 'SUMMARY';
2740
+ });
2741
+ return r;
2742
+ };
2743
+ var getCheckedRadio = function getCheckedRadio(nodes, form) {
2744
+ for (var i = 0; i < nodes.length; i++) {
2745
+ if (nodes[i].checked && nodes[i].form === form) {
2746
+ return nodes[i];
2747
+ }
2748
+ }
2749
+ };
2750
+ var isTabbableRadio = function isTabbableRadio(node) {
2751
+ if (!node.name) {
2752
+ return true;
2753
+ }
2754
+ var radioScope = node.form || getRootNode(node);
2755
+ var queryRadios = function queryRadios(name) {
2756
+ return radioScope.querySelectorAll('input[type="radio"][name="' + name + '"]');
2757
+ };
2758
+ var radioSet;
2759
+ if (typeof window !== 'undefined' && typeof window.CSS !== 'undefined' && typeof window.CSS.escape === 'function') {
2760
+ radioSet = queryRadios(window.CSS.escape(node.name));
2761
+ } else {
2762
+ try {
2763
+ radioSet = queryRadios(node.name);
2764
+ } catch (err) {
2765
+ // eslint-disable-next-line no-console
2766
+ 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);
2767
+ return false;
2768
+ }
2769
+ }
2770
+ var checked = getCheckedRadio(radioSet, node.form);
2771
+ return !checked || checked === node;
2772
+ };
2773
+ var isRadio = function isRadio(node) {
2774
+ return isInput(node) && node.type === 'radio';
2775
+ };
2776
+ var isNonTabbableRadio = function isNonTabbableRadio(node) {
2777
+ return isRadio(node) && !isTabbableRadio(node);
2778
+ };
2779
+
2780
+ // determines if a node is ultimately attached to the window's document
2781
+ var isNodeAttached = function isNodeAttached(node) {
2782
+ var _nodeRoot;
2783
+ // The root node is the shadow root if the node is in a shadow DOM; some document otherwise
2784
+ // (but NOT _the_ document; see second 'If' comment below for more).
2785
+ // If rootNode is shadow root, it'll have a host, which is the element to which the shadow
2786
+ // is attached, and the one we need to check if it's in the document or not (because the
2787
+ // shadow, and all nodes it contains, is never considered in the document since shadows
2788
+ // behave like self-contained DOMs; but if the shadow's HOST, which is part of the document,
2789
+ // is hidden, or is not in the document itself but is detached, it will affect the shadow's
2790
+ // visibility, including all the nodes it contains). The host could be any normal node,
2791
+ // or a custom element (i.e. web component). Either way, that's the one that is considered
2792
+ // part of the document, not the shadow root, nor any of its children (i.e. the node being
2793
+ // tested).
2794
+ // To further complicate things, we have to look all the way up until we find a shadow HOST
2795
+ // that is attached (or find none) because the node might be in nested shadows...
2796
+ // If rootNode is not a shadow root, it won't have a host, and so rootNode should be the
2797
+ // document (per the docs) and while it's a Document-type object, that document does not
2798
+ // appear to be the same as the node's `ownerDocument` for some reason, so it's safer
2799
+ // to ignore the rootNode at this point, and use `node.ownerDocument`. Otherwise,
2800
+ // using `rootNode.contains(node)` will _always_ be true we'll get false-positives when
2801
+ // node is actually detached.
2802
+ // NOTE: If `nodeRootHost` or `node` happens to be the `document` itself (which is possible
2803
+ // if a tabbable/focusable node was quickly added to the DOM, focused, and then removed
2804
+ // from the DOM as in https://github.com/focus-trap/focus-trap-react/issues/905), then
2805
+ // `ownerDocument` will be `null`, hence the optional chaining on it.
2806
+ var nodeRoot = node && getRootNode(node);
2807
+ var nodeRootHost = (_nodeRoot = nodeRoot) === null || _nodeRoot === void 0 ? void 0 : _nodeRoot.host;
2808
+
2809
+ // in some cases, a detached node will return itself as the root instead of a document or
2810
+ // shadow root object, in which case, we shouldn't try to look further up the host chain
2811
+ var attached = false;
2812
+ if (nodeRoot && nodeRoot !== node) {
2813
+ var _nodeRootHost, _nodeRootHost$ownerDo, _node$ownerDocument;
2814
+ 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));
2815
+ while (!attached && nodeRootHost) {
2816
+ var _nodeRoot2, _nodeRootHost2, _nodeRootHost2$ownerD;
2817
+ // since it's not attached and we have a root host, the node MUST be in a nested shadow DOM,
2818
+ // which means we need to get the host's host and check if that parent host is contained
2819
+ // in (i.e. attached to) the document
2820
+ nodeRoot = getRootNode(nodeRootHost);
2821
+ nodeRootHost = (_nodeRoot2 = nodeRoot) === null || _nodeRoot2 === void 0 ? void 0 : _nodeRoot2.host;
2822
+ attached = !!((_nodeRootHost2 = nodeRootHost) !== null && _nodeRootHost2 !== void 0 && (_nodeRootHost2$ownerD = _nodeRootHost2.ownerDocument) !== null && _nodeRootHost2$ownerD !== void 0 && _nodeRootHost2$ownerD.contains(nodeRootHost));
2823
+ }
2824
+ }
2825
+ return attached;
2826
+ };
2827
+ var isZeroArea = function isZeroArea(node) {
2828
+ var _node$getBoundingClie = node.getBoundingClientRect(),
2829
+ width = _node$getBoundingClie.width,
2830
+ height = _node$getBoundingClie.height;
2831
+ return width === 0 && height === 0;
2832
+ };
2833
+ var isHidden = function isHidden(node, _ref) {
2834
+ var displayCheck = _ref.displayCheck,
2835
+ getShadowRoot = _ref.getShadowRoot;
2836
+ // NOTE: visibility will be `undefined` if node is detached from the document
2837
+ // (see notes about this further down), which means we will consider it visible
2838
+ // (this is legacy behavior from a very long way back)
2839
+ // NOTE: we check this regardless of `displayCheck="none"` because this is a
2840
+ // _visibility_ check, not a _display_ check
2841
+ if (getComputedStyle(node).visibility === 'hidden') {
2842
+ return true;
2843
+ }
2844
+ var isDirectSummary = matches.call(node, 'details>summary:first-of-type');
2845
+ var nodeUnderDetails = isDirectSummary ? node.parentElement : node;
2846
+ if (matches.call(nodeUnderDetails, 'details:not([open]) *')) {
2847
+ return true;
2848
+ }
2849
+ if (!displayCheck || displayCheck === 'full' || displayCheck === 'legacy-full') {
2850
+ if (typeof getShadowRoot === 'function') {
2851
+ // figure out if we should consider the node to be in an undisclosed shadow and use the
2852
+ // 'non-zero-area' fallback
2853
+ var originalNode = node;
2854
+ while (node) {
2855
+ var parentElement = node.parentElement;
2856
+ var rootNode = getRootNode(node);
2857
+ if (parentElement && !parentElement.shadowRoot && getShadowRoot(parentElement) === true // check if there's an undisclosed shadow
2858
+ ) {
2859
+ // node has an undisclosed shadow which means we can only treat it as a black box, so we
2860
+ // fall back to a non-zero-area test
2861
+ return isZeroArea(node);
2862
+ } else if (node.assignedSlot) {
2863
+ // iterate up slot
2864
+ node = node.assignedSlot;
2865
+ } else if (!parentElement && rootNode !== node.ownerDocument) {
2866
+ // cross shadow boundary
2867
+ node = rootNode.host;
2868
+ } else {
2869
+ // iterate up normal dom
2870
+ node = parentElement;
2871
+ }
2872
+ }
2873
+ node = originalNode;
2874
+ }
2875
+ // else, `getShadowRoot` might be true, but all that does is enable shadow DOM support
2876
+ // (i.e. it does not also presume that all nodes might have undisclosed shadows); or
2877
+ // it might be a falsy value, which means shadow DOM support is disabled
2878
+
2879
+ // Since we didn't find it sitting in an undisclosed shadow (or shadows are disabled)
2880
+ // now we can just test to see if it would normally be visible or not, provided it's
2881
+ // attached to the main document.
2882
+ // NOTE: We must consider case where node is inside a shadow DOM and given directly to
2883
+ // `isTabbable()` or `isFocusable()` -- regardless of `getShadowRoot` option setting.
2884
+
2885
+ if (isNodeAttached(node)) {
2886
+ // this works wherever the node is: if there's at least one client rect, it's
2887
+ // somehow displayed; it also covers the CSS 'display: contents' case where the
2888
+ // node itself is hidden in place of its contents; and there's no need to search
2889
+ // up the hierarchy either
2890
+ return !node.getClientRects().length;
2891
+ }
2892
+
2893
+ // Else, the node isn't attached to the document, which means the `getClientRects()`
2894
+ // API will __always__ return zero rects (this can happen, for example, if React
2895
+ // is used to render nodes onto a detached tree, as confirmed in this thread:
2896
+ // https://github.com/facebook/react/issues/9117#issuecomment-284228870)
2897
+ //
2898
+ // It also means that even window.getComputedStyle(node).display will return `undefined`
2899
+ // because styles are only computed for nodes that are in the document.
2900
+ //
2901
+ // NOTE: THIS HAS BEEN THE CASE FOR YEARS. It is not new, nor is it caused by tabbable
2902
+ // somehow. Though it was never stated officially, anyone who has ever used tabbable
2903
+ // APIs on nodes in detached containers has actually implicitly used tabbable in what
2904
+ // was later (as of v5.2.0 on Apr 9, 2021) called `displayCheck="none"` mode -- essentially
2905
+ // considering __everything__ to be visible because of the innability to determine styles.
2906
+ //
2907
+ // v6.0.0: As of this major release, the default 'full' option __no longer treats detached
2908
+ // nodes as visible with the 'none' fallback.__
2909
+ if (displayCheck !== 'legacy-full') {
2910
+ return true; // hidden
2911
+ }
2912
+ // else, fallback to 'none' mode and consider the node visible
2913
+ } else if (displayCheck === 'non-zero-area') {
2914
+ // NOTE: Even though this tests that the node's client rect is non-zero to determine
2915
+ // whether it's displayed, and that a detached node will __always__ have a zero-area
2916
+ // client rect, we don't special-case for whether the node is attached or not. In
2917
+ // this mode, we do want to consider nodes that have a zero area to be hidden at all
2918
+ // times, and that includes attached or not.
2919
+ return isZeroArea(node);
2920
+ }
2921
+
2922
+ // visible, as far as we can tell, or per current `displayCheck=none` mode, we assume
2923
+ // it's visible
2924
+ return false;
2925
+ };
2926
+
2927
+ // form fields (nested) inside a disabled fieldset are not focusable/tabbable
2928
+ // unless they are in the _first_ <legend> element of the top-most disabled
2929
+ // fieldset
2930
+ var isDisabledFromFieldset = function isDisabledFromFieldset(node) {
2931
+ if (/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(node.tagName)) {
2932
+ var parentNode = node.parentElement;
2933
+ // check if `node` is contained in a disabled <fieldset>
2934
+ while (parentNode) {
2935
+ if (parentNode.tagName === 'FIELDSET' && parentNode.disabled) {
2936
+ // look for the first <legend> among the children of the disabled <fieldset>
2937
+ for (var i = 0; i < parentNode.children.length; i++) {
2938
+ var child = parentNode.children.item(i);
2939
+ // when the first <legend> (in document order) is found
2940
+ if (child.tagName === 'LEGEND') {
2941
+ // if its parent <fieldset> is not nested in another disabled <fieldset>,
2942
+ // return whether `node` is a descendant of its first <legend>
2943
+ return matches.call(parentNode, 'fieldset[disabled] *') ? true : !child.contains(node);
2944
+ }
2945
+ }
2946
+ // the disabled <fieldset> containing `node` has no <legend>
2947
+ return true;
2948
+ }
2949
+ parentNode = parentNode.parentElement;
2950
+ }
2951
+ }
2952
+
2953
+ // else, node's tabbable/focusable state should not be affected by a fieldset's
2954
+ // enabled/disabled state
2955
+ return false;
2956
+ };
2957
+ var isNodeMatchingSelectorFocusable = function isNodeMatchingSelectorFocusable(options, node) {
2958
+ if (node.disabled ||
2959
+ // we must do an inert look up to filter out any elements inside an inert ancestor
2960
+ // because we're limited in the type of selectors we can use in JSDom (see related
2961
+ // note related to `candidateSelectors`)
2962
+ isInert(node) || isHiddenInput(node) || isHidden(node, options) ||
2963
+ // For a details element with a summary, the summary element gets the focus
2964
+ isDetailsWithSummary(node) || isDisabledFromFieldset(node)) {
2965
+ return false;
2966
+ }
2967
+ return true;
2968
+ };
2969
+ var isNodeMatchingSelectorTabbable = function isNodeMatchingSelectorTabbable(options, node) {
2970
+ if (isNonTabbableRadio(node) || getTabIndex(node) < 0 || !isNodeMatchingSelectorFocusable(options, node)) {
2971
+ return false;
2972
+ }
2973
+ return true;
2974
+ };
2975
+ var isTabbable = function isTabbable(node, options) {
2976
+ options = options || {};
2977
+ if (!node) {
2978
+ throw new Error('No node provided');
2979
+ }
2980
+ if (matches.call(node, candidateSelector) === false) {
2981
+ return false;
2982
+ }
2983
+ return isNodeMatchingSelectorTabbable(options, node);
2984
+ };
2985
+
2986
+ var defaultConfig$1 = function defaultConfig() {
2987
+ return {
2988
+ /** Class which indicates that modal is open */
2989
+ classModalIsOpen: "is-active",
2990
+ /** Class on body which indicates that modal is open */
2991
+ classModalIsOpenBody: "has-modal",
2992
+ /** Root of page content which should be hidden when modal is open */
2993
+ root: "#root",
2994
+ /** Move modal into this element selector (must be unique in DOM) */
2995
+ modalsRoot: "#root-modals"
2996
+ };
2997
+ };
2998
+ var Modal$1 = /*#__PURE__*/function () {
2999
+ function Modal(element, config) {
3000
+ _classCallCheck(this, Modal);
3001
+ this.element = element;
3002
+ this.config = Object.assign(Object.assign({}, defaultConfig$1()), config);
3003
+ this.handleShow = this.handleShow.bind(this);
3004
+ this.handleHide = this.handleHide.bind(this);
3005
+ this.show = this.show.bind(this);
3006
+ this.hide = this.hide.bind(this);
3007
+ this.headerFirstItemSpacing = this.headerFirstItemSpacing.bind(this);
3008
+ Modal.moveToModalRoot = Modal.moveToModalRoot.bind(this);
3009
+ Modal.lockBody = Modal.lockBody.bind(this);
3010
+ Modal.unlockBody = Modal.unlockBody.bind(this);
3011
+ this.element.ODS_Modal = this;
3012
+ this.init();
3013
+ return this;
3014
+ }
3015
+ return _createClass(Modal, [{
3016
+ key: "handleShow",
3017
+ value: function handleShow(el) {
3018
+ Modal.lockBody();
3019
+ if (el) el.classList.add(this.config.classModalIsOpen);
3020
+ // Long modals can have first focusabble element under the fold, so static content above the fold should be focused instead to prevent undesirable scrolling
3021
+ var initialFocusEl = el.querySelector("[data-a11y-dialog-initial-focus]");
3022
+ if (!initialFocusEl) {
3023
+ return;
3024
+ }
3025
+ // set tabindex to -1 so element can't be focused via keyboard
3026
+ if (!isTabbable(initialFocusEl)) {
3027
+ initialFocusEl.setAttribute("tabindex", "-1");
3028
+ }
3029
+ initialFocusEl.focus();
3030
+ }
3031
+ }, {
3032
+ key: "handleHide",
3033
+ value: function handleHide(el) {
3034
+ Modal.unlockBody();
3035
+ if (el) el.classList.remove(this.config.classModalIsOpen);
3036
+ }
3037
+ }, {
3038
+ key: "show",
3039
+ value: function show() {
3040
+ this.instance.show();
3041
+ }
3042
+ }, {
3043
+ key: "hide",
3044
+ value: function hide() {
3045
+ this.instance.hide();
3046
+ }
3047
+ }, {
3048
+ key: "headerFirstItemSpacing",
3049
+ value: function headerFirstItemSpacing() {
3050
+ /**
3051
+ * Target the first element which is not .btn inside .modal__header and add margin-right 40px.
3052
+ * css has its limitations and it is not possible with pseudo selectors
3053
+ */
3054
+ var modalHeader = this.element.querySelector(".modal__header");
3055
+ if (modalHeader) {
3056
+ var firstNonBtnElement = Array.from(modalHeader.children).find(function (child) {
3057
+ return !child.classList.contains("btn");
3058
+ });
3059
+ if (firstNonBtnElement) {
3060
+ firstNonBtnElement.style.marginRight = "40px";
3061
+ }
3062
+ }
3063
+ }
3064
+ }, {
3065
+ key: "init",
3066
+ value: function init() {
3067
+ var _this = this;
3068
+ if (this.config.modalsRoot) {
3069
+ Modal.moveToModalRoot(this.element, document.querySelector(this.config.modalsRoot));
3070
+ }
3071
+ this.instance = new A11yDialog(this.element);
3072
+ this.instance.on("show", function (event) {
3073
+ var dialogEl = event.currentTarget;
3074
+ _this.handleShow(dialogEl);
3075
+ });
3076
+ this.instance.on("hide", function (event) {
3077
+ var dialogEl = event.currentTarget;
3078
+ _this.handleHide(dialogEl);
3079
+ });
3080
+ this.headerFirstItemSpacing();
3081
+ }
3082
+ }, {
3083
+ key: "destroy",
3084
+ value: function destroy() {
3085
+ this.instance.destroy();
3086
+ this.element.ODS_Modal = this;
3087
+ }
3088
+ }, {
3089
+ key: "update",
3090
+ value: function update() {
3091
+ this.destroy();
3092
+ this.init();
3093
+ }
3094
+ }], [{
3095
+ key: "getInstance",
3096
+ value: function getInstance(el) {
3097
+ if (!el) return null;
3098
+ var modalEl = el;
3099
+ return modalEl.ODS_Modal || null;
3100
+ }
3101
+ }, {
3102
+ key: "moveToModalRoot",
3103
+ value: function moveToModalRoot(el, container) {
3104
+ var _a;
3105
+ if (container) {
3106
+ container.appendChild(el);
3107
+ } else {
3108
+ 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)"));
3109
+ }
3110
+ }
3111
+ }, {
3112
+ key: "lockBody",
3113
+ value: function lockBody(className, root) {
3114
+ var _a, _b;
3115
+ var actualClassName = className || ((_a = this.config) === null || _a === void 0 ? void 0 : _a.classModalIsOpenBody);
3116
+ var actualRoot = root || ((_b = this.config) === null || _b === void 0 ? void 0 : _b.root);
3117
+ var container = document.querySelector(actualRoot);
3118
+ // store current scrollTop value
3119
+ var scrollTop = document.documentElement.scrollTop || document.body.scrollTop;
3120
+ document.body.setAttribute("data-lock-scrolltop", scrollTop.toString());
3121
+ // add locking styles to body
3122
+ document.body.style.height = "100%";
3123
+ document.body.style.width = "100%";
3124
+ document.body.style.overflow = "hidden";
3125
+ document.body.style.position = "fixed";
3126
+ // add locking styles to scrollTop
3127
+ if (container) {
3128
+ container.style.height = "100%";
3129
+ container.style.width = "100%";
3130
+ container.style.overflow = "hidden";
3131
+ container.style.position = "fixed";
3132
+ // scroll page-container to scrollTop position
3133
+ container.scrollTop = scrollTop;
3134
+ }
3135
+ // add modal class
3136
+ document.body.classList.add(actualClassName);
3137
+ // attempt to scroll top fixed position
3138
+ window.requestAnimationFrame(function () {
3139
+ window.scrollTo(0, scrollTop);
3140
+ });
3141
+ }
3142
+ }, {
3143
+ key: "unlockBody",
3144
+ value: function unlockBody(className, root) {
3145
+ var _a, _b;
3146
+ var actualClassName = className || ((_a = this.config) === null || _a === void 0 ? void 0 : _a.classModalIsOpenBody);
3147
+ var actualRoot = root || ((_b = this.config) === null || _b === void 0 ? void 0 : _b.root);
3148
+ var container = document.querySelector(actualRoot);
3149
+ var scrollTop = document.body.getAttribute("data-lock-scrolltop") || "0";
3150
+ // remove locking styles from body
3151
+ document.body.style.height = "";
3152
+ document.body.style.width = "";
3153
+ document.body.style.overflow = "";
3154
+ document.body.style.position = "";
3155
+ // add modal class
3156
+ document.body.classList.remove(actualClassName);
3157
+ // remove locking styles from page-container
3158
+ if (container) {
3159
+ container.style.height = "";
3160
+ container.style.width = "";
3161
+ container.style.overflow = "";
3162
+ container.style.position = "";
3163
+ }
3164
+ // set scroll position back
3165
+ window.requestAnimationFrame(function () {
3166
+ window.scrollTo({
3167
+ left: 0,
3168
+ top: parseInt(scrollTop, 10),
3169
+ behavior: "instant"
3170
+ });
3171
+ });
3172
+ }
3173
+ }]);
3174
+ }();
3175
+
3176
+ var ModalCloseButton = function ModalCloseButton(props) {
3177
+ return /*#__PURE__*/jsxRuntimeExports.jsx(IconButton, _objectSpread2({
3178
+ iconName: "delete",
3179
+ type: "ghost",
3180
+ isSquare: true,
3181
+ size: "small",
3182
+ className: "modal__close",
3183
+ "data-a11y-dialog-hide": true,
3184
+ "aria-label": "Zatvori\u0165"
3185
+ }, props));
3186
+ };
3187
+ ModalCloseButton.displayName = "ModalCloseButton";
3188
+
3189
+ var ModalTitle = function ModalTitle(_a) {
3190
+ var size = _a.size,
3191
+ className = _a.className,
3192
+ children = _a.children,
3193
+ other = __rest(_a, ["size", "className", "children"]);
3194
+ return /*#__PURE__*/jsxRuntimeExports.jsx("h2", _objectSpread2(_objectSpread2({
3195
+ className: cx(className, {
3196
+ "display-3": size === "large",
3197
+ h2: size === "small"
3198
+ })
3199
+ }, other), {}, {
3200
+ children: children
3201
+ }));
3202
+ };
3203
+ ModalTitle.displayName = "ModalTitle";
3204
+
3205
+ var CLASS_ROOT$3 = "modal__body";
3206
+ var ModalBody = function ModalBody(_a) {
3207
+ var color = _a.color,
3208
+ className = _a.className,
3209
+ children = _a.children,
3210
+ other = __rest(_a, ["color", "className", "children"]);
3211
+ return /*#__PURE__*/jsxRuntimeExports.jsx("div", _objectSpread2(_objectSpread2({
3212
+ className: cx(CLASS_ROOT$3, className, _defineProperty(_defineProperty({}, "bg-".concat(color), color), "".concat(CLASS_ROOT$3, "--colorful"), color))
3213
+ }, other), {}, {
3214
+ children: children
3215
+ }));
3216
+ };
3217
+ ModalBody.displayName = "ModalBody";
3218
+
3219
+ var CLASS_ROOT$2 = "modal";
3220
+ var defaultProps = {
3221
+ actions: [/*#__PURE__*/jsxRuntimeExports.jsx(Button, {
3222
+ "data-a11y-dialog-hide": true,
3223
+ children: "Zatvori\u0165"
3224
+ }, "1")],
3225
+ noInit: false
3226
+ };
3227
+ var Modal = function Modal(_a) {
3228
+ var _a$actions = _a.actions,
3229
+ actions = _a$actions === void 0 ? defaultProps.actions : _a$actions,
3230
+ className = _a.className,
3231
+ children = _a.children,
3232
+ hasStickyFooter = _a.hasStickyFooter,
3233
+ id = _a.id,
3234
+ _a$noInit = _a.noInit,
3235
+ noInit = _a$noInit === void 0 ? defaultProps.noInit : _a$noInit,
3236
+ isActive = _a.isActive,
3237
+ size = _a.size,
3238
+ title = _a.title,
3239
+ renderBody = _a.renderBody,
3240
+ renderTitle = _a.renderTitle,
3241
+ renderFooter = _a.renderFooter,
3242
+ fullHeight = _a.fullHeight,
3243
+ other = __rest(_a, ["actions", "className", "children", "hasStickyFooter", "id", "noInit", "isActive", "size", "title", "renderBody", "renderTitle", "renderFooter", "fullHeight"]);
3244
+ var _useStatic = useStatic(Modal$1),
3245
+ _useStatic2 = _slicedToArray(_useStatic, 2),
3246
+ modalRef = _useStatic2[0],
3247
+ instance = _useStatic2[1];
3248
+ useEffect(function () {
3249
+ if (isActive && instance && instance.current) {
3250
+ instance.current.show();
3251
+ }
3252
+ }, [instance, isActive]);
3253
+ var dialogClasses = cx("".concat(CLASS_ROOT$2, "__dialog"), _defineProperty(_defineProperty({}, "".concat(CLASS_ROOT$2, "__dialog--").concat(size), size), "".concat(CLASS_ROOT$2, "__dialog--full-height"), fullHeight), className);
3254
+ var titleId = "".concat(id, "-title");
3255
+ var dialogTitle = renderTitle ? renderTitle(id) : /*#__PURE__*/jsxRuntimeExports.jsx(ModalTitle, {
3256
+ id: titleId,
3257
+ size: size,
3258
+ "data-a11y-dialog-initial-focus": true,
3259
+ children: title
3260
+ });
3261
+ return /*#__PURE__*/jsxRuntimeExports.jsxs("div", {
3262
+ id: id,
3263
+ "data-modal": !noInit,
3264
+ className: CLASS_ROOT$2,
3265
+ ref: modalRef,
3266
+ role: "dialog",
3267
+ "aria-hidden": "true",
3268
+ "aria-modal": "true",
3269
+ "aria-labelledby": titleId,
3270
+ children: [/*#__PURE__*/jsxRuntimeExports.jsx("div", {
3271
+ className: "modal__overlay",
3272
+ tabIndex: -1,
3273
+ "data-a11y-dialog-hide": true
3274
+ }), /*#__PURE__*/jsxRuntimeExports.jsxs("div", _objectSpread2(_objectSpread2({
3275
+ className: dialogClasses,
3276
+ role: "document"
3277
+ }, other), {}, {
3278
+ children: [/*#__PURE__*/jsxRuntimeExports.jsxs("div", {
3279
+ className: "".concat(CLASS_ROOT$2, "__header"),
3280
+ children: [/*#__PURE__*/jsxRuntimeExports.jsx(ModalCloseButton, {}), dialogTitle]
3281
+ }), renderBody ? renderBody() : /*#__PURE__*/jsxRuntimeExports.jsx(ModalBody, {
3282
+ children: children
3283
+ }), /*#__PURE__*/jsxRuntimeExports.jsx("div", {
3284
+ className: cx("".concat(CLASS_ROOT$2, "__footer"), _defineProperty({}, "".concat(CLASS_ROOT$2, "__footer--sticky"), hasStickyFooter)),
3285
+ children: renderFooter ? renderFooter() : /*#__PURE__*/jsxRuntimeExports.jsx(ConditionalWrapper, {
3286
+ condition: actions.length > 1,
3287
+ wrapper: /*#__PURE__*/jsxRuntimeExports.jsx(Buttons, {}),
3288
+ children: actions.map(function (action) {
3289
+ return action;
3290
+ })
3291
+ })
3292
+ })]
3293
+ }))]
3294
+ });
3295
+ };
3296
+ Modal.displayName = "Modal";
3297
+
3298
+ var CLASS_ROOT$1 = 'container';
3299
+ var Container = function Container(_a) {
3300
+ var className = _a.className,
3301
+ other = __rest(_a, ["className"]);
3302
+ var classes = cx(CLASS_ROOT$1, className);
3303
+ return /*#__PURE__*/jsxRuntimeExports.jsx("div", _objectSpread2({
3304
+ className: classes
3305
+ }, other));
3306
+ };
3307
+ Container.displayName = 'Container';
3308
+
3309
+ var CLASS_ROOT = "section";
3310
+ var Section = function Section(_a) {
3311
+ var className = _a.className,
3312
+ _a$color = _a.color,
3313
+ color = _a$color === void 0 ? "white" : _a$color,
3314
+ spacing = _a.spacing,
3315
+ _a$tag = _a.tag,
3316
+ Tag = _a$tag === void 0 ? "div" : _a$tag,
3317
+ children = _a.children,
3318
+ other = __rest(_a, ["className", "color", "spacing", "tag", "children"]);
3319
+ var classes = cx(CLASS_ROOT, _defineProperty(_defineProperty({}, "".concat(CLASS_ROOT, "--").concat(spacing), spacing), "bg-".concat(color), color !== "white"), className);
3320
+ return /*#__PURE__*/jsxRuntimeExports.jsx(Tag, _objectSpread2(_objectSpread2({
3321
+ className: classes
3322
+ }, other), {}, {
3323
+ children: /*#__PURE__*/jsxRuntimeExports.jsx(Container, {
3324
+ children: children
3325
+ })
3326
+ }));
3327
+ };
3328
+ Section.displayName = "Section";
3329
+
3330
+ var CLASS_TABLIST_ITEM = "tab-list__item";
3331
+ var CLASS_TABLIST_TAB = "tab-list__tab";
3332
+ var Tab = function Tab(_a) {
3333
+ var href = _a.href,
3334
+ children = _a.children,
3335
+ className = _a.className,
3336
+ controls = _a.controls,
3337
+ isDisabled = _a.isDisabled,
3338
+ isActive = _a.isActive,
3339
+ other = __rest(_a, ["href", "children", "className", "controls", "isDisabled", "isActive"]);
3340
+ var tabClasses = cx(CLASS_TABLIST_TAB, className);
3341
+ var tabindex = isActive ? 0 : -1;
3342
+ var Tag = href ? "a" : "button";
3343
+ return /*#__PURE__*/jsxRuntimeExports.jsx("li", {
3344
+ className: CLASS_TABLIST_ITEM,
3345
+ role: "presentation",
3346
+ children: /*#__PURE__*/jsxRuntimeExports.jsx(Tag, _objectSpread2(_objectSpread2({
3347
+ type: href ? undefined : "button",
3348
+ role: href ? undefined : "tab",
3349
+ href: href,
3350
+ className: tabClasses,
3351
+ "aria-selected": isActive,
3352
+ "aria-controls": controls || undefined,
3353
+ tabIndex: tabindex,
3354
+ "aria-disabled": isDisabled
3355
+ }, other), {}, {
3356
+ children: children
3357
+ }))
3358
+ });
3359
+ };
3360
+ Tab.displayName = "Tab";
3361
+
3362
+ // we use array to include old browser key names like IE11
3363
+ // ie. navigation keys https://developer.mozilla.org/en-US/docs/Web/API/UI_Events/Keyboard_event_key_values#navigation_keys
3364
+ var keys = {
3365
+ TAB: ['Tab'],
3366
+ ARROWLEFT: ['Left', 'ArrowLeft'],
3367
+ ARROWUP: ['Up', 'ArrowUp'],
3368
+ ARROWRIGHT: ['Right', 'ArrowRight'],
3369
+ ARROWDOWN: ['Down', 'ArrowDown']
3370
+ };
3371
+
3372
+ var RovingTabindex = /*#__PURE__*/function () {
3373
+ function RovingTabindex(elems) {
3374
+ var config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
3375
+ direction: 'horizontal'
3376
+ };
3377
+ _classCallCheck(this, RovingTabindex);
3378
+ this.elems = elems;
3379
+ this.config = config;
3380
+ this.isActive = false;
3381
+ this.onKeydown = this.onKeydown.bind(this);
3382
+ }
3383
+ return _createClass(RovingTabindex, [{
3384
+ key: "init",
3385
+ value: function init() {
3386
+ document.addEventListener('keydown', this.onKeydown);
3387
+ this.isActive = true;
3388
+ }
3389
+ }, {
3390
+ key: "destroy",
3391
+ value: function destroy() {
3392
+ document.removeEventListener('keydown', this.onKeydown);
3393
+ this.isActive = false;
3394
+ }
3395
+ }, {
3396
+ key: "update",
3397
+ value: function update(elems) {
3398
+ this.elems = elems;
3399
+ }
3400
+ }, {
3401
+ key: "onKeydown",
3402
+ value: function onKeydown(e) {
3403
+ var activeElemIndex = this.elems.indexOf(document.activeElement);
3404
+ if ((keys.ARROWUP.includes(e.key) || keys.ARROWDOWN.includes(e.key)) && this.config.direction === 'horizontal') {
3405
+ return;
3406
+ }
3407
+ if ((keys.ARROWLEFT.includes(e.key) || keys.ARROWRIGHT.includes(e.key)) && this.config.direction === 'vertical') {
3408
+ return;
3409
+ }
3410
+ if (keys.ARROWDOWN.includes(e.key) || keys.ARROWRIGHT.includes(e.key)) {
3411
+ e.preventDefault();
3412
+ if (activeElemIndex >= 0 && activeElemIndex < this.elems.length - 1) {
3413
+ this.elems[activeElemIndex + 1].focus();
3414
+ } else {
3415
+ this.elems[0].focus();
3416
+ }
3417
+ }
3418
+ if (keys.ARROWUP.includes(e.key) || keys.ARROWLEFT.includes(e.key)) {
3419
+ e.preventDefault();
3420
+ if (activeElemIndex >= 1) {
3421
+ this.elems[activeElemIndex - 1].focus();
3422
+ } else {
3423
+ this.elems[this.elems.length - 1].focus();
3424
+ }
3425
+ }
3426
+ if (keys.TAB.includes(e.key)) {
3427
+ this.destroy();
3428
+ }
3429
+ }
3430
+ }]);
3431
+ }();
3432
+
3433
+ var defaultConfig = {
3434
+ tabSelector: '[role="tab"]'
3435
+ };
3436
+ var Tabs$1 = /*#__PURE__*/function () {
3437
+ function Tabs(element, config) {
3438
+ _classCallCheck(this, Tabs);
3439
+ this.isActive = function (el) {
3440
+ return el ? !el.hasAttribute("hidden") : false;
3441
+ };
3442
+ this.isSelected = function (el) {
3443
+ return el.getAttribute("aria-selected") === "true";
3444
+ };
3445
+ this.element = element;
3446
+ this.config = Object.assign(Object.assign({}, defaultConfig), config);
3447
+ this.tabs = [];
3448
+ this.tabPanels = [];
3449
+ this.activeTabIndex = null;
3450
+ this.rovingTabindex = null;
3451
+ this.handleClick = this.handleClick.bind(this);
3452
+ this.handleTabFocus = this.handleTabFocus.bind(this);
3453
+ this.element.ODS_Tabs = this;
3454
+ this.init();
3455
+ return this;
3456
+ }
3457
+ return _createClass(Tabs, [{
3458
+ key: "init",
3459
+ value: function init() {
3460
+ var _this = this;
3461
+ this.tabs = Array.from(this.element.querySelectorAll(this.config.tabSelector));
3462
+ this.tabs.map(function (tab, index) {
3463
+ var controlId = tab.getAttribute("aria-controls");
3464
+ _this.tabPanels.push(controlId ? document.getElementById(controlId) : null);
3465
+ tab.addEventListener("click", _this.handleClick);
3466
+ tab.addEventListener("focus", _this.handleTabFocus);
3467
+ if (_this.isSelected(tab)) {
3468
+ _this.activeTabIndex = index;
3469
+ }
3470
+ return tab;
3471
+ });
3472
+ if (!this.rovingTabindex) {
3473
+ this.rovingTabindex = new RovingTabindex(this.tabs, {
3474
+ direction: "any"
3475
+ });
3476
+ } else {
3477
+ this.rovingTabindex.update(this.tabs);
3478
+ }
3479
+ if (this.activeTabIndex !== null) {
3480
+ this.toggleTabPanel(this.tabPanels[this.activeTabIndex], "on");
3481
+ } else if (this.tabs.length > 0) {
3482
+ this.activateNthTab(0);
3483
+ }
3484
+ }
3485
+ }, {
3486
+ key: "destroy",
3487
+ value: function destroy() {
3488
+ var _this2 = this;
3489
+ this.tabs.map(function (tab) {
3490
+ tab.removeEventListener("click", _this2.handleClick);
3491
+ tab.removeEventListener("focus", _this2.handleTabFocus);
3492
+ return tab;
3493
+ });
3494
+ this.tabs = [];
3495
+ this.tabPanels = [];
3496
+ if (this.rovingTabindex) {
3497
+ this.rovingTabindex.destroy();
3498
+ }
3499
+ this.element.ODS_Tabs = null;
3500
+ }
3501
+ }, {
3502
+ key: "update",
3503
+ value: function update() {
3504
+ this.destroy();
3505
+ this.init();
3506
+ }
3507
+ }, {
3508
+ key: "handleClick",
3509
+ value: function handleClick(e) {
3510
+ var _this3 = this;
3511
+ var clickedTab = e.currentTarget;
3512
+ if (clickedTab.hasAttribute("aria-disabled")) {
3513
+ e.preventDefault();
3514
+ return;
3515
+ }
3516
+ this.tabs.map(function (tab, i) {
3517
+ if (tab === clickedTab) {
3518
+ _this3.activeTabIndex = i;
3519
+ return _this3.toggleTab(tab, "on");
3520
+ }
3521
+ return _this3.toggleTab(tab, "off");
3522
+ });
3523
+ this.tabPanels.map(function (tabPanel) {
3524
+ if (tabPanel && tabPanel.getAttribute("id") === clickedTab.getAttribute("aria-controls")) {
3525
+ return _this3.toggleTabPanel(tabPanel, "on");
3526
+ }
3527
+ return _this3.toggleTabPanel(tabPanel, "off");
3528
+ });
3529
+ }
3530
+ }, {
3531
+ key: "toggleTab",
3532
+ value: function toggleTab(el, state) {
3533
+ var isActive = this.isSelected(el);
3534
+ if (state === "on" && !isActive) {
3535
+ el.setAttribute("aria-selected", "true");
3536
+ el.setAttribute("tabindex", "0");
3537
+ }
3538
+ if (state === "off" && isActive) {
3539
+ el.setAttribute("aria-selected", "false");
3540
+ el.setAttribute("tabindex", "-1");
3541
+ }
3542
+ }
3543
+ }, {
3544
+ key: "toggleTabPanel",
3545
+ value: function toggleTabPanel(el, state) {
3546
+ if (!el) return;
3547
+ var isActive = this.isActive(el);
3548
+ if (state === "on" && !isActive) {
3549
+ el.removeAttribute("hidden");
3550
+ }
3551
+ if (state === "off" && isActive) {
3552
+ el.setAttribute("hidden", "");
3553
+ }
3554
+ }
3555
+ }, {
3556
+ key: "activateNthTab",
3557
+ value: function activateNthTab(index) {
3558
+ var _this4 = this;
3559
+ this.tabs.map(function (tab, i) {
3560
+ if (i === index) {
3561
+ _this4.activeTabIndex = i;
3562
+ return _this4.toggleTab(tab, "on");
3563
+ }
3564
+ return _this4.toggleTab(tab, "off");
3565
+ });
3566
+ this.tabPanels.map(function (tabPanel, i) {
3567
+ if (i === index) {
3568
+ return _this4.toggleTabPanel(tabPanel, "on");
3569
+ }
3570
+ return _this4.toggleTabPanel(tabPanel, "off");
3571
+ });
3572
+ }
3573
+ }, {
3574
+ key: "handleTabFocus",
3575
+ value: function handleTabFocus() {
3576
+ if (this.rovingTabindex && !this.rovingTabindex.isActive) {
3577
+ this.rovingTabindex.init();
3578
+ }
3579
+ }
3580
+ }], [{
3581
+ key: "getInstance",
3582
+ value: function getInstance(el) {
3583
+ return el && el.ODS_Tabs ? el.ODS_Tabs : null;
3584
+ }
3585
+ }]);
3586
+ }();
3587
+
3588
+ var Tabs = function Tabs(_a) {
3589
+ var _a$activeTabIndex = _a.activeTabIndex,
3590
+ activeTabIndex = _a$activeTabIndex === void 0 ? 0 : _a$activeTabIndex,
3591
+ className = _a.className,
3592
+ classesTabNav = _a.classesTabNav,
3593
+ _a$colour = _a.colour,
3594
+ colour = _a$colour === void 0 ? "default" : _a$colour,
3595
+ isFullWidth = _a.isFullWidth,
3596
+ isLink = _a.isLink,
3597
+ hasEqualTabWidth = _a.hasEqualTabWidth,
3598
+ _a$variant = _a.variant,
3599
+ variant = _a$variant === void 0 ? "standard" : _a$variant,
3600
+ children = _a.children,
3601
+ other = __rest(_a, ["activeTabIndex", "className", "classesTabNav", "colour", "isFullWidth", "isLink", "hasEqualTabWidth", "variant", "children"]);
3602
+ var CLASS_TABNAV = "tab-list";
3603
+ var tabNavClasses = cx(CLASS_TABNAV, _defineProperty({}, "".concat(CLASS_TABNAV, "--equal"), hasEqualTabWidth), _defineProperty({}, "".concat(CLASS_TABNAV, "--fullwidth"), isFullWidth), _defineProperty({}, "".concat(CLASS_TABNAV, "--inverse"), colour === "inverse"), _defineProperty({}, "".concat(CLASS_TABNAV, "--light"), variant === "light"), classesTabNav, className);
3604
+ var _useStatic = useStatic(Tabs$1),
3605
+ _useStatic2 = _slicedToArray(_useStatic, 1),
3606
+ tabListRef = _useStatic2[0];
3607
+ function getTabs() {
3608
+ return children.map(function (tabPanel, i) {
3609
+ var isActive = i === activeTabIndex;
3610
+ var _tabPanel$props = tabPanel.props,
3611
+ renderTab = _tabPanel$props.renderTab,
3612
+ id = _tabPanel$props.id,
3613
+ isDisabled = _tabPanel$props.isDisabled,
3614
+ tab = _tabPanel$props.tab,
3615
+ href = _tabPanel$props.href;
3616
+ if (!renderTab) {
3617
+ return /*#__PURE__*/React.createElement(Tab, {
3618
+ key: id,
3619
+ controls: !href ? id : "",
3620
+ href: href,
3621
+ isDisabled: isDisabled,
3622
+ isActive: isActive
3623
+ }, tab);
3624
+ }
3625
+ var renderedTab = renderTab(tabPanel.props);
3626
+ return /*#__PURE__*/React.cloneElement(renderedTab, {
3627
+ key: id,
3628
+ isActive: isActive
3629
+ });
3630
+ });
3631
+ }
3632
+ function getPanels() {
3633
+ return children.map(function (tabPanel, i) {
3634
+ var isActive = i === activeTabIndex;
3635
+ var id = tabPanel.props.id;
3636
+ return /*#__PURE__*/React.cloneElement(tabPanel, {
3637
+ key: id,
3638
+ isActive: isActive,
3639
+ tab: undefined
3640
+ });
3641
+ });
3642
+ }
3643
+ return /*#__PURE__*/jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, {
3644
+ children: [/*#__PURE__*/jsxRuntimeExports.jsxs("ul", _objectSpread2(_objectSpread2({
3645
+ className: tabNavClasses,
3646
+ role: isLink ? "navigation" : "tablist",
3647
+ ref: tabListRef,
3648
+ "data-tabs": isLink ? undefined : "true"
3649
+ }, other), {}, {
3650
+ children: [getTabs(), isFullWidth && /*#__PURE__*/jsxRuntimeExports.jsx("li", {
3651
+ role: "presentation",
3652
+ className: "tab-list__hr"
3653
+ })]
3654
+ })), !isLink ? getPanels() : null]
3655
+ });
3656
+ };
3657
+ Tabs.displayName = "Tabs";
3658
+
3659
+ var TabPanel = function TabPanel(_a) {
3660
+ var children = _a.children,
3661
+ isActive = _a.isActive,
3662
+ id = _a.id,
3663
+ href = _a.href,
3664
+ other = __rest(_a, ["children", "isActive", "id", "href"]);
3665
+ var currentId = id || generateId();
3666
+ return /*#__PURE__*/jsxRuntimeExports.jsx("div", _objectSpread2(_objectSpread2({
3667
+ id: currentId,
3668
+ role: href ? "" : "tabpanel",
3669
+ tabIndex: 0,
3670
+ hidden: !isActive
3671
+ }, other), {}, {
3672
+ children: children
3673
+ }));
3674
+ };
3675
+ TabPanel.displayName = "TabPanel";
614
3676
 
615
- export { Badge };
3677
+ export { Alert, Badge, Button, ButtonFill, ButtonGhost, ButtonPrimary, Buttons, Icon, IconButton, Modal, ModalBody, ModalCloseButton, ModalTitle, Section, Tab, TabPanel, Tabs };
616
3678
  //# sourceMappingURL=index.js.map