bootstrap-italia 2.12.0 → 2.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (380) hide show
  1. package/README.EN.md +1 -1
  2. package/README.md +1 -1
  3. package/dist/bootstrap-italia.esm.js +1 -1
  4. package/dist/css/bootstrap-italia.min.css +9 -1
  5. package/dist/css/bootstrap-italia.min.css.map +1 -1
  6. package/dist/js/bootstrap-italia.bundle.min.js +19 -23
  7. package/dist/js/bootstrap-italia.min.js +18 -2
  8. package/dist/plugins/accept-overlay.js +19 -9
  9. package/dist/plugins/accept-overlay.js.map +1 -1
  10. package/dist/plugins/accordion.js +19 -24
  11. package/dist/plugins/accordion.js.map +1 -1
  12. package/dist/plugins/alert.js +67 -2
  13. package/dist/plugins/alert.js.map +1 -1
  14. package/dist/plugins/{backToTop.js → back-to-top.js} +14 -5
  15. package/dist/plugins/back-to-top.js.map +1 -0
  16. package/dist/plugins/base-component.js +91 -0
  17. package/dist/plugins/base-component.js.map +1 -0
  18. package/dist/plugins/button.js +58 -2
  19. package/dist/plugins/button.js.map +1 -1
  20. package/dist/plugins/carousel-bi.js +19 -9
  21. package/dist/plugins/carousel-bi.js.map +1 -1
  22. package/dist/plugins/carousel.js +445 -2
  23. package/dist/plugins/carousel.js.map +1 -1
  24. package/dist/plugins/collapse.js +273 -2
  25. package/dist/plugins/collapse.js.map +1 -1
  26. package/dist/plugins/cookiebar.js +39 -52
  27. package/dist/plugins/cookiebar.js.map +1 -1
  28. package/dist/plugins/dimmer.js +19 -8
  29. package/dist/plugins/dimmer.js.map +1 -1
  30. package/dist/plugins/dom/data.js +61 -0
  31. package/dist/plugins/dom/data.js.map +1 -0
  32. package/dist/plugins/dom/event-handler.js +296 -0
  33. package/dist/plugins/dom/event-handler.js.map +1 -0
  34. package/dist/plugins/dom/manipulator.js +76 -0
  35. package/dist/plugins/dom/manipulator.js.map +1 -0
  36. package/dist/plugins/dom/selector-engine.js +82 -0
  37. package/dist/plugins/dom/selector-engine.js.map +1 -0
  38. package/dist/plugins/dropdown.js +433 -2
  39. package/dist/plugins/dropdown.js.map +1 -1
  40. package/dist/plugins/fonts-loader.js +9 -1
  41. package/dist/plugins/fonts-loader.js.map +1 -1
  42. package/dist/plugins/form-validate.js +22 -8
  43. package/dist/plugins/form-validate.js.map +1 -1
  44. package/dist/plugins/forward.js +21 -18
  45. package/dist/plugins/forward.js.map +1 -1
  46. package/dist/plugins/header-sticky.js +11 -2
  47. package/dist/plugins/header-sticky.js.map +1 -1
  48. package/dist/plugins/history-back.js +17 -17
  49. package/dist/plugins/history-back.js.map +1 -1
  50. package/dist/plugins/init.js +9 -0
  51. package/dist/plugins/init.js.map +1 -1
  52. package/dist/plugins/input-label.js +14 -3
  53. package/dist/plugins/input-label.js.map +1 -1
  54. package/dist/plugins/input-number.js +13 -4
  55. package/dist/plugins/input-number.js.map +1 -1
  56. package/dist/plugins/input-password.js +48 -37
  57. package/dist/plugins/input-password.js.map +1 -1
  58. package/dist/plugins/input-search-autocomplete.js +9 -11
  59. package/dist/plugins/input-search-autocomplete.js.map +1 -1
  60. package/dist/plugins/input.js +12 -3
  61. package/dist/plugins/input.js.map +1 -1
  62. package/dist/plugins/list.js +23 -12
  63. package/dist/plugins/list.js.map +1 -1
  64. package/dist/plugins/masonry.js +29 -29
  65. package/dist/plugins/masonry.js.map +1 -1
  66. package/dist/plugins/modal.js +358 -2
  67. package/dist/plugins/modal.js.map +1 -1
  68. package/dist/plugins/navbar-collapsible.js +55 -45
  69. package/dist/plugins/navbar-collapsible.js.map +1 -1
  70. package/dist/plugins/navscroll.js +16 -23
  71. package/dist/plugins/navscroll.js.map +1 -1
  72. package/dist/plugins/notification.js +34 -23
  73. package/dist/plugins/notification.js.map +1 -1
  74. package/dist/plugins/offcanvas.js +259 -2
  75. package/dist/plugins/offcanvas.js.map +1 -1
  76. package/dist/plugins/popover.js +76 -2
  77. package/dist/plugins/popover.js.map +1 -1
  78. package/dist/plugins/progress-donut.js +19 -12
  79. package/dist/plugins/progress-donut.js.map +1 -1
  80. package/dist/plugins/scrollspy.js +273 -2
  81. package/dist/plugins/scrollspy.js.map +1 -1
  82. package/dist/plugins/select-autocomplete.js +10 -1
  83. package/dist/plugins/select-autocomplete.js.map +1 -1
  84. package/dist/plugins/sticky.js +21 -18
  85. package/dist/plugins/sticky.js.map +1 -1
  86. package/dist/plugins/tab.js +244 -27
  87. package/dist/plugins/tab.js.map +1 -1
  88. package/dist/plugins/toast.js +203 -2
  89. package/dist/plugins/toast.js.map +1 -1
  90. package/dist/plugins/tooltip.js +602 -2
  91. package/dist/plugins/tooltip.js.map +1 -1
  92. package/dist/plugins/track-focus.js +8 -0
  93. package/dist/plugins/track-focus.js.map +1 -1
  94. package/dist/plugins/transfer.js +11 -16
  95. package/dist/plugins/transfer.js.map +1 -1
  96. package/dist/plugins/upload-dragdrop.js +13 -4
  97. package/dist/plugins/upload-dragdrop.js.map +1 -1
  98. package/dist/plugins/util/backdrop.js +155 -0
  99. package/dist/plugins/util/backdrop.js.map +1 -0
  100. package/dist/plugins/util/component-functions.js +38 -0
  101. package/dist/plugins/util/component-functions.js.map +1 -0
  102. package/dist/plugins/util/config.js +70 -0
  103. package/dist/plugins/util/config.js.map +1 -0
  104. package/dist/plugins/util/cookies.js +8 -0
  105. package/dist/plugins/util/cookies.js.map +1 -1
  106. package/dist/plugins/util/device.js +0 -3
  107. package/dist/plugins/util/device.js.map +1 -1
  108. package/dist/plugins/util/dom.js +8 -0
  109. package/dist/plugins/util/dom.js.map +1 -1
  110. package/dist/plugins/util/focustrap.js +121 -0
  111. package/dist/plugins/util/focustrap.js.map +1 -0
  112. package/dist/plugins/util/index.js +280 -0
  113. package/dist/plugins/util/index.js.map +1 -0
  114. package/dist/plugins/util/observer.js +8 -0
  115. package/dist/plugins/util/observer.js.map +1 -1
  116. package/dist/plugins/util/on-document-scroll.js +20 -9
  117. package/dist/plugins/util/on-document-scroll.js.map +1 -1
  118. package/dist/plugins/util/pageScroll.js +8 -0
  119. package/dist/plugins/util/pageScroll.js.map +1 -1
  120. package/dist/plugins/util/sanitizer.js +115 -0
  121. package/dist/plugins/util/sanitizer.js.map +1 -0
  122. package/dist/plugins/util/scrollbar.js +120 -0
  123. package/dist/plugins/util/scrollbar.js.map +1 -0
  124. package/dist/plugins/util/swipe.js +150 -0
  125. package/dist/plugins/util/swipe.js.map +1 -0
  126. package/dist/plugins/util/template-factory.js +166 -0
  127. package/dist/plugins/util/template-factory.js.map +1 -0
  128. package/dist/plugins/util/tween.js +10 -1
  129. package/dist/plugins/util/tween.js.map +1 -1
  130. package/dist/plugins/util/youtube-video.js +12 -21
  131. package/dist/plugins/util/youtube-video.js.map +1 -1
  132. package/dist/plugins/videoplayer.js +19 -8
  133. package/dist/plugins/videoplayer.js.map +1 -1
  134. package/dist/version.js +10 -3
  135. package/dist/version.js.map +1 -1
  136. package/package.json +6 -7
  137. package/src/js/bootstrap-italia.entry.js +8 -0
  138. package/src/js/bootstrap-italia.esm.js +9 -1
  139. package/src/js/icons.js +8 -0
  140. package/src/js/load-plugin.js +8 -0
  141. package/src/js/plugins/accept-overlay.js +18 -10
  142. package/src/js/plugins/accordion.js +16 -22
  143. package/src/js/plugins/alert.js +66 -2
  144. package/src/js/plugins/{backToTop.js → back-to-top.js} +12 -4
  145. package/src/js/plugins/base-component.js +89 -0
  146. package/src/js/plugins/button.js +57 -2
  147. package/src/js/plugins/carousel-bi.js +18 -9
  148. package/src/js/plugins/carousel.js +444 -2
  149. package/src/js/plugins/collapse.js +272 -2
  150. package/src/js/plugins/cookiebar.js +37 -60
  151. package/src/js/plugins/dimmer.js +18 -8
  152. package/src/js/plugins/dom/data.js +58 -0
  153. package/src/js/plugins/dom/event-handler.js +301 -0
  154. package/src/js/plugins/dom/manipulator.js +75 -0
  155. package/src/js/plugins/dom/selector-engine.js +80 -0
  156. package/src/js/plugins/dropdown.js +432 -2
  157. package/src/js/plugins/fonts-loader.js +9 -1
  158. package/src/js/plugins/form-validate.js +21 -8
  159. package/src/js/plugins/form.js +11 -3
  160. package/src/js/plugins/forward.js +18 -16
  161. package/src/js/plugins/header-sticky.js +10 -2
  162. package/src/js/plugins/history-back.js +14 -14
  163. package/src/js/plugins/init.js +8 -0
  164. package/src/js/plugins/input-label.js +13 -3
  165. package/src/js/plugins/input-number.js +12 -4
  166. package/src/js/plugins/input-password.js +46 -36
  167. package/src/js/plugins/input-search-autocomplete.js +9 -13
  168. package/src/js/plugins/input.js +11 -3
  169. package/src/js/plugins/list.js +22 -12
  170. package/src/js/plugins/masonry.js +26 -27
  171. package/src/js/plugins/modal.js +357 -2
  172. package/src/js/plugins/navbar-collapsible.js +55 -53
  173. package/src/js/plugins/navscroll.js +16 -23
  174. package/src/js/plugins/notification.js +33 -23
  175. package/src/js/plugins/offcanvas.js +258 -2
  176. package/src/js/plugins/popover.js +75 -2
  177. package/src/js/plugins/progress-donut.js +17 -13
  178. package/src/js/plugins/scrollspy.js +272 -2
  179. package/src/js/plugins/select-autocomplete.js +9 -1
  180. package/src/js/plugins/sticky.js +21 -23
  181. package/src/js/plugins/tab.js +243 -27
  182. package/src/js/plugins/toast.js +206 -2
  183. package/src/js/plugins/tooltip.js +601 -2
  184. package/src/js/plugins/track-focus.js +8 -0
  185. package/src/js/plugins/transfer.js +12 -24
  186. package/src/js/plugins/upload-dragdrop.js +12 -4
  187. package/src/js/plugins/util/backdrop.js +153 -0
  188. package/src/js/plugins/util/component-functions.js +36 -0
  189. package/src/js/plugins/util/config.js +68 -0
  190. package/src/js/plugins/util/cookies.js +8 -0
  191. package/src/js/plugins/util/device.js +0 -3
  192. package/src/js/plugins/util/dom.js +8 -0
  193. package/src/js/plugins/util/focustrap.js +119 -0
  194. package/src/js/plugins/util/index.js +317 -0
  195. package/src/js/plugins/util/observer.js +8 -0
  196. package/src/js/plugins/util/on-document-scroll.js +19 -9
  197. package/src/js/plugins/util/pageScroll.js +8 -0
  198. package/src/js/plugins/util/sanitizer.js +112 -0
  199. package/src/js/plugins/util/scrollbar.js +118 -0
  200. package/src/js/plugins/util/swipe.js +148 -0
  201. package/src/js/plugins/util/template-factory.js +164 -0
  202. package/src/js/plugins/util/tween.js +9 -1
  203. package/src/js/plugins/util/youtube-video.js +12 -21
  204. package/src/js/plugins/videoplayer.js +18 -8
  205. package/src/js/version.js +10 -3
  206. package/src/scss/base/_containers.scss +41 -0
  207. package/src/scss/base/_functions.scss +373 -0
  208. package/src/scss/base/_helpers.scss +10 -0
  209. package/src/scss/base/_maps.scss +54 -0
  210. package/src/scss/base/_mixins.scss +44 -0
  211. package/src/scss/base/_reboot.scss +590 -0
  212. package/src/scss/base/_root.scss +73 -0
  213. package/src/scss/base/_transitions.scss +27 -0
  214. package/src/scss/base/_utilities.scss +742 -0
  215. package/src/scss/base/_variables.scss +2123 -0
  216. package/src/scss/base/_version.scss +3 -0
  217. package/src/scss/base/helpers/_clearfix.scss +3 -0
  218. package/src/scss/base/helpers/_color-bg.scss +10 -0
  219. package/src/scss/base/helpers/_colored-links.scss +16 -0
  220. package/src/scss/base/helpers/_position.scss +36 -0
  221. package/src/scss/base/helpers/_ratio.scss +26 -0
  222. package/src/scss/base/helpers/_stacks.scss +15 -0
  223. package/src/scss/base/helpers/_stretched-link.scss +15 -0
  224. package/src/scss/base/helpers/_text-truncation.scss +7 -0
  225. package/src/scss/base/helpers/_visually-hidden.scss +8 -0
  226. package/src/scss/base/helpers/_vr.scss +8 -0
  227. package/src/scss/base/mixins/_alert.scss +15 -0
  228. package/src/scss/base/mixins/_backdrop.scss +18 -0
  229. package/src/scss/base/mixins/_banner.scss +11 -0
  230. package/src/scss/base/mixins/_border-radius.scss +77 -0
  231. package/src/scss/base/mixins/_box-shadow.scss +18 -0
  232. package/src/scss/base/mixins/_breakpoints.scss +127 -0
  233. package/src/scss/base/mixins/_buttons.scss +141 -0
  234. package/src/scss/base/mixins/_caret.scss +64 -0
  235. package/src/scss/base/mixins/_clearfix.scss +9 -0
  236. package/src/scss/base/mixins/_color-scheme.scss +7 -0
  237. package/src/scss/base/mixins/_container.scss +11 -0
  238. package/src/scss/base/mixins/_deprecate.scss +10 -0
  239. package/src/scss/base/mixins/_forms.scss +152 -0
  240. package/src/scss/base/mixins/_gradients.scss +47 -0
  241. package/src/scss/base/mixins/_grid.scss +151 -0
  242. package/src/scss/base/mixins/_image.scss +15 -0
  243. package/src/scss/base/mixins/_list-group.scss +24 -0
  244. package/src/scss/base/mixins/_lists.scss +7 -0
  245. package/src/scss/base/mixins/_pagination.scss +10 -0
  246. package/src/scss/base/mixins/_reset-text.scss +17 -0
  247. package/src/scss/base/mixins/_resize.scss +6 -0
  248. package/src/scss/base/mixins/_table-variants.scss +24 -0
  249. package/src/scss/base/mixins/_text-truncate.scss +8 -0
  250. package/src/scss/base/mixins/_transition.scss +26 -0
  251. package/src/scss/base/mixins/_utilities.scss +96 -0
  252. package/src/scss/base/mixins/_visually-hidden.scss +29 -0
  253. package/src/scss/base/utilities/_api.scss +45 -0
  254. package/src/scss/base/vendor/_rfs.scss +337 -0
  255. package/src/scss/bootstrap-italia.scss +137 -156
  256. package/src/scss/components/_accordion.scss +297 -0
  257. package/src/scss/{custom → components}/_avatar.scss +75 -35
  258. package/src/scss/components/_badge.scss +60 -0
  259. package/src/scss/components/_breadcrumb.scss +95 -0
  260. package/src/scss/components/_button-group.scss +143 -0
  261. package/src/scss/components/_buttons.scss +467 -0
  262. package/src/scss/{custom → components}/_card.scss +228 -0
  263. package/src/scss/{custom → components}/_carousel.scss +225 -3
  264. package/src/scss/components/_dropdown.scss +480 -0
  265. package/src/scss/{custom → components}/_grid.scss +33 -0
  266. package/src/scss/{custom → components}/_gridlist.scss +7 -0
  267. package/src/scss/{custom → components}/_hero.scss +23 -57
  268. package/src/scss/components/_images.scss +48 -0
  269. package/src/scss/{custom → components}/_linklist.scss +0 -1
  270. package/src/scss/components/_list-group.scss +190 -0
  271. package/src/scss/components/_modal.scss +475 -0
  272. package/src/scss/components/_nav.scss +169 -0
  273. package/src/scss/components/_navbar.scss +273 -0
  274. package/src/scss/components/_offcanvas.scss +144 -0
  275. package/src/scss/components/_pagination.scss +108 -0
  276. package/src/scss/components/_placeholders.scss +51 -0
  277. package/src/scss/components/_popover.scss +298 -0
  278. package/src/scss/components/_progress-bars.scss +126 -0
  279. package/src/scss/{custom → components}/_steppers.scss +2 -2
  280. package/src/scss/{custom → components}/_tab.scss +3 -7
  281. package/src/scss/components/_tables.scss +171 -0
  282. package/src/scss/components/_toasts.scss +73 -0
  283. package/src/scss/{custom → components}/_toolbar.scss +19 -12
  284. package/src/scss/components/_tooltip.scss +139 -0
  285. package/src/scss/{custom → components}/_type.scss +92 -0
  286. package/src/scss/forms/_accessible-autocomplete.scss +188 -0
  287. package/src/scss/forms/_floating-labels.scss +75 -0
  288. package/src/scss/forms/_form-check.scss +175 -0
  289. package/src/scss/forms/_form-control.scss +201 -0
  290. package/src/scss/forms/_form-range.scss +95 -0
  291. package/src/scss/{custom → forms}/_form-select.scss +72 -0
  292. package/src/scss/forms/_form-text.scss +11 -0
  293. package/src/scss/{custom → forms}/_forms.scss +8 -12
  294. package/src/scss/forms/_input-group.scss +129 -0
  295. package/src/scss/forms/_labels.scss +36 -0
  296. package/src/scss/forms/_validation.scss +12 -0
  297. package/src/scss/utilities/icons.scss +5 -5
  298. package/types/index.d.ts +4 -1
  299. package/types/plugins/video.ts +33 -0
  300. package/dist/plugins/backToTop.js.map +0 -1
  301. package/src/scss/_functions.scss +0 -38
  302. package/src/scss/_variables.scss +0 -639
  303. package/src/scss/custom/_accessible-autocomplete.scss +0 -30
  304. package/src/scss/custom/_accordion.scss +0 -176
  305. package/src/scss/custom/_badge.scss +0 -29
  306. package/src/scss/custom/_breadcrumb.scss +0 -51
  307. package/src/scss/custom/_buttons.scss +0 -235
  308. package/src/scss/custom/_componente-base.scss +0 -6
  309. package/src/scss/custom/_dropdown.scss +0 -248
  310. package/src/scss/custom/_form-datepicker.scss +0 -604
  311. package/src/scss/custom/_images.scss +0 -10
  312. package/src/scss/custom/_modal.scss +0 -248
  313. package/src/scss/custom/_popover.scss +0 -106
  314. package/src/scss/custom/_progress-bars.scss +0 -70
  315. package/src/scss/custom/_tables.scss +0 -11
  316. package/src/scss/custom/_timepicker.scss +0 -252
  317. package/src/scss/custom/_tooltip.scss +0 -33
  318. package/src/scss/custom/_version.scss +0 -3
  319. package/src/scss/custom/mixins/_buttons.scss +0 -67
  320. package/src/scss/utilities/colors_vars.scss +0 -426
  321. /package/src/scss/{custom → base}/mixins/_text-emphasis.scss +0 -0
  322. /package/src/scss/{custom → components}/_accept-overlay.scss +0 -0
  323. /package/src/scss/{custom → components}/_affix.scss +0 -0
  324. /package/src/scss/{custom → components}/_alert.scss +0 -0
  325. /package/src/scss/{custom → components}/_anchor.scss +0 -0
  326. /package/src/scss/{custom → components}/_back-to-top.scss +0 -0
  327. /package/src/scss/{custom → components}/_bottomnav.scss +0 -0
  328. /package/src/scss/{custom → components}/_calendar.scss +0 -0
  329. /package/src/scss/{custom → components}/_callout.scss +0 -0
  330. /package/src/scss/{custom → components}/_chips.scss +0 -0
  331. /package/src/scss/{custom → components}/_code.scss +0 -0
  332. /package/src/scss/{custom → components}/_cookiebar.scss +0 -0
  333. /package/src/scss/{custom → components}/_dimmer.scss +0 -0
  334. /package/src/scss/{custom → components}/_figcaption.scss +0 -0
  335. /package/src/scss/{custom → components}/_font.scss +0 -0
  336. /package/src/scss/{custom → components}/_footer.scss +0 -0
  337. /package/src/scss/{custom → components}/_forward.scss +0 -0
  338. /package/src/scss/{custom → components}/_header.scss +0 -0
  339. /package/src/scss/{custom → components}/_headercenter.scss +0 -0
  340. /package/src/scss/{custom → components}/_headercentertheme.scss +0 -0
  341. /package/src/scss/{custom → components}/_headernavbar.scss +0 -0
  342. /package/src/scss/{custom → components}/_headernavbartheme.scss +0 -0
  343. /package/src/scss/{custom → components}/_headerslim.scss +0 -0
  344. /package/src/scss/{custom → components}/_headerslimtheme.scss +0 -0
  345. /package/src/scss/{custom → components}/_imgresponsive.scss +0 -0
  346. /package/src/scss/{custom → components}/_list.scss +0 -0
  347. /package/src/scss/{custom → components}/_map.scss +0 -0
  348. /package/src/scss/{custom → components}/_masonry-loader.scss +0 -0
  349. /package/src/scss/{custom → components}/_megamenu.scss +0 -0
  350. /package/src/scss/{custom → components}/_navigation.scss +0 -0
  351. /package/src/scss/{custom → components}/_navigationtheme.scss +0 -0
  352. /package/src/scss/{custom → components}/_navscroll.scss +0 -0
  353. /package/src/scss/{custom → components}/_navscrolltheme.scss +0 -0
  354. /package/src/scss/{custom → components}/_notifications.scss +0 -0
  355. /package/src/scss/{custom → components}/_overlay-panel.scss +0 -0
  356. /package/src/scss/{custom → components}/_page-scroll.scss +0 -0
  357. /package/src/scss/{custom → components}/_pager.scss +0 -0
  358. /package/src/scss/{custom → components}/_point-list.scss +0 -0
  359. /package/src/scss/{custom → components}/_print.scss +0 -0
  360. /package/src/scss/{custom → components}/_progress-donuts.scss +0 -0
  361. /package/src/scss/{custom → components}/_progress-spinners.scss +0 -0
  362. /package/src/scss/{custom → components}/_rating-list.scss +0 -0
  363. /package/src/scss/{custom → components}/_rating.scss +0 -0
  364. /package/src/scss/{custom → components}/_sections.scss +0 -0
  365. /package/src/scss/{custom → components}/_sidebar.scss +0 -0
  366. /package/src/scss/{custom → components}/_sidebarthemes.scss +0 -0
  367. /package/src/scss/{custom → components}/_skiplinks.scss +0 -0
  368. /package/src/scss/{custom → components}/_sticky.scss +0 -0
  369. /package/src/scss/{custom → components}/_thumbnav.scss +0 -0
  370. /package/src/scss/{custom → components}/_timeline.scss +0 -0
  371. /package/src/scss/{custom → components}/_videoplayer.scss +0 -0
  372. /package/src/scss/{custom → forms}/_autocomplete.scss +0 -0
  373. /package/src/scss/{custom → forms}/_form-input-file.scss +0 -0
  374. /package/src/scss/{custom → forms}/_form-input-number.scss +0 -0
  375. /package/src/scss/{custom → forms}/_form-input-upload.scss +0 -0
  376. /package/src/scss/{custom → forms}/_form-password.scss +0 -0
  377. /package/src/scss/{custom → forms}/_form-toggles.scss +0 -0
  378. /package/src/scss/{custom → forms}/_form-transfer.scss +0 -0
  379. /package/src/scss/{custom → forms}/_just-validate.scss +0 -0
  380. /package/types/plugins/{backToTop.d.ts → back-to-top.d.ts} +0 -0
@@ -1,6 +1,14 @@
1
- import BaseComponent from 'bootstrap/js/src/base-component'
2
- import EventHandler from 'bootstrap/js/src/dom/event-handler'
3
- import SelectorEngine from 'bootstrap/js/src/dom/selector-engine'
1
+ /**
2
+ * --------------------------------------------------------------------------
3
+ * Bootstrap Italia (https://italia.github.io/bootstrap-italia/)
4
+ * Authors: https://github.com/italia/bootstrap-italia/blob/main/AUTHORS
5
+ * Licensed under BSD-3-Clause license (https://github.com/italia/bootstrap-italia/blob/main/LICENSE)
6
+ * --------------------------------------------------------------------------
7
+ */
8
+
9
+ import BaseComponent from './base-component'
10
+ import EventHandler from './dom/event-handler'
11
+ import SelectorEngine from './dom/selector-engine'
4
12
 
5
13
  import InputLabel from './input-label'
6
14
 
@@ -127,7 +135,7 @@ const createInput = (element) => {
127
135
  return null
128
136
  }
129
137
 
130
- if (typeof document !== 'undefined') {
138
+ if (typeof window !== 'undefined' && typeof document !== 'undefined') {
131
139
  document.addEventListener('DOMContentLoaded', function () {
132
140
  var frmel = document.querySelectorAll(SELECTOR_INPUT + ', label')
133
141
  frmel.forEach(function (item) {
@@ -1,7 +1,15 @@
1
- import BaseComponent from 'bootstrap/js/src/base-component'
2
- import EventHandler from 'bootstrap/js/src/dom/event-handler'
3
- import SelectorEngine from 'bootstrap/js/src/dom/selector-engine'
4
- import Manipulator from 'bootstrap/js/src/dom/manipulator'
1
+ /**
2
+ * --------------------------------------------------------------------------
3
+ * Bootstrap Italia (https://italia.github.io/bootstrap-italia/)
4
+ * Authors: https://github.com/italia/bootstrap-italia/blob/main/AUTHORS
5
+ * Licensed under BSD-3-Clause license (https://github.com/italia/bootstrap-italia/blob/main/LICENSE)
6
+ * --------------------------------------------------------------------------
7
+ */
8
+
9
+ import BaseComponent from './base-component'
10
+ import EventHandler from './dom/event-handler'
11
+ import SelectorEngine from './dom/selector-engine'
12
+ import Manipulator from './dom/manipulator'
5
13
 
6
14
  import InputLabel from './input-label'
7
15
 
@@ -439,42 +447,44 @@ class InputPassword extends BaseComponent {
439
447
  * ------------------------------------------------------------------------
440
448
  */
441
449
 
442
- const createInput = (element) => {
443
- if (element && element.matches(SELECTOR_PASSWORD)) {
444
- return InputPassword.getOrCreateInstance(element)
450
+ if (typeof window !== 'undefined' && typeof document !== 'undefined') {
451
+ const createInput = (element) => {
452
+ if (element && element.matches(SELECTOR_PASSWORD)) {
453
+ return InputPassword.getOrCreateInstance(element)
454
+ }
455
+ return null
445
456
  }
446
- return null
447
- }
448
457
 
449
- const initInputPassword = () => {
450
- const element = SelectorEngine.findOne(SELECTOR_PASSWORD)
451
- if (element) {
452
- InputPassword.getOrCreateInstance(element)
458
+ const initInputPassword = () => {
459
+ const element = SelectorEngine.findOne(SELECTOR_PASSWORD)
460
+ if (element) {
461
+ InputPassword.getOrCreateInstance(element)
462
+ }
453
463
  }
454
- }
455
464
 
456
- if (document.readyState !== 'loading') {
457
- initInputPassword()
458
- } else {
459
- document.addEventListener('DOMContentLoaded', initInputPassword)
460
- }
461
-
462
- EventHandler.on(document, EVENT_MOUSEDOWN_DATA_API, SELECTOR_PASSWORD + ', label', function () {
463
- const target = InputLabel.getInputFromLabel(this) || this
464
- createInput(target)
465
- })
466
- EventHandler.on(document, EVENT_KEYUP_DATA_API, SELECTOR_PASSWORD + ', label', function () {
467
- const target = InputLabel.getInputFromLabel(this) || this
468
- const element = createInput(target)
469
- if (element && element._label) {
470
- element._label._labelOut()
465
+ if (document.readyState !== 'loading') {
466
+ initInputPassword()
467
+ } else {
468
+ document.addEventListener('DOMContentLoaded', initInputPassword)
471
469
  }
472
- })
473
- EventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_BTN_SHOW_PWD, function () {
474
- const target = this.parentNode && this.parentNode.querySelector(SELECTOR_PASSWORD)
475
- if (target) {
476
- InputPassword.getOrCreateInstance(target)
477
- }
478
- })
470
+
471
+ EventHandler.on(document, EVENT_MOUSEDOWN_DATA_API, SELECTOR_PASSWORD + ', label', function () {
472
+ const target = InputLabel.getInputFromLabel(this) || this
473
+ createInput(target)
474
+ })
475
+ EventHandler.on(document, EVENT_KEYUP_DATA_API, SELECTOR_PASSWORD + ', label', function () {
476
+ const target = InputLabel.getInputFromLabel(this) || this
477
+ const element = createInput(target)
478
+ if (element && element._label) {
479
+ element._label._labelOut()
480
+ }
481
+ })
482
+ EventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_BTN_SHOW_PWD, function () {
483
+ const target = this.parentNode && this.parentNode.querySelector(SELECTOR_PASSWORD)
484
+ if (target) {
485
+ InputPassword.getOrCreateInstance(target)
486
+ }
487
+ })
488
+ }
479
489
 
480
490
  export default InputPassword
@@ -1,9 +1,13 @@
1
- //import BaseComponent from 'bootstrap/js/src/base-component.js'
2
-
3
- import BaseComponent from 'bootstrap/js/src/base-component'
4
- import EventHandler from 'bootstrap/js/src/dom/event-handler'
5
- //import SelectorEngine from 'bootstrap/js/src/dom/selector-engine'
1
+ /**
2
+ * --------------------------------------------------------------------------
3
+ * Bootstrap Italia (https://italia.github.io/bootstrap-italia/)
4
+ * Authors: https://github.com/italia/bootstrap-italia/blob/main/AUTHORS
5
+ * Licensed under BSD-3-Clause license (https://github.com/italia/bootstrap-italia/blob/main/LICENSE)
6
+ * --------------------------------------------------------------------------
7
+ */
6
8
 
9
+ import BaseComponent from './base-component'
10
+ import EventHandler from './dom/event-handler'
7
11
  import InputLabel from './input-label'
8
12
 
9
13
  const NAME = 'inputsearchautocomplete'
@@ -125,14 +129,6 @@ class InputSearch extends BaseComponent {
125
129
  * ------------------------------------------------------------------------
126
130
  */
127
131
 
128
- /*const inputs = SelectorEngine.find(SELECTOR_SEARCH)
129
- inputs.forEach((input) => {
130
- EventHandler.one(input, EVENT_KEYUP_DATA_API, () => {
131
- const searchInput = InputSearch.getOrCreateInstance(input)
132
- searchInput.search()
133
- })
134
- })*/
135
-
136
132
  const createInput = (element) => {
137
133
  if (element && element.matches(SELECTOR_SEARCH)) {
138
134
  return InputSearch.getOrCreateInstance(element)
@@ -1,7 +1,15 @@
1
- import BaseComponent from 'bootstrap/js/src/base-component.js'
1
+ /**
2
+ * --------------------------------------------------------------------------
3
+ * Bootstrap Italia (https://italia.github.io/bootstrap-italia/)
4
+ * Authors: https://github.com/italia/bootstrap-italia/blob/main/AUTHORS
5
+ * Licensed under BSD-3-Clause license (https://github.com/italia/bootstrap-italia/blob/main/LICENSE)
6
+ * --------------------------------------------------------------------------
7
+ */
8
+
9
+ import BaseComponent from './base-component.js'
2
10
 
3
- import EventHandler from 'bootstrap/js/src/dom/event-handler'
4
- import SelectorEngine from 'bootstrap/js/src/dom/selector-engine'
11
+ import EventHandler from './dom/event-handler'
12
+ import SelectorEngine from './dom/selector-engine'
5
13
 
6
14
  import InputLabel from './input-label'
7
15
 
@@ -1,7 +1,15 @@
1
- import BaseComponent from 'bootstrap/js/src/base-component.js'
1
+ /**
2
+ * --------------------------------------------------------------------------
3
+ * Bootstrap Italia (https://italia.github.io/bootstrap-italia/)
4
+ * Authors: https://github.com/italia/bootstrap-italia/blob/main/AUTHORS
5
+ * Licensed under BSD-3-Clause license (https://github.com/italia/bootstrap-italia/blob/main/LICENSE)
6
+ * --------------------------------------------------------------------------
7
+ */
2
8
 
3
- import SelectorEngine from 'bootstrap/js/src/dom/selector-engine'
4
- import EventHandler from 'bootstrap/js/src/dom/event-handler'
9
+ import BaseComponent from './base-component.js'
10
+
11
+ import SelectorEngine from './dom/selector-engine'
12
+ import EventHandler from './dom/event-handler'
5
13
 
6
14
  const NAME = 'list'
7
15
  const DATA_KEY = 'bs.list'
@@ -63,16 +71,18 @@ class List extends BaseComponent {
63
71
  * ------------------------------------------------------------------------
64
72
  */
65
73
 
66
- SelectorEngine.find(SELECTOR_LIST).forEach((list) => {
67
- SelectorEngine.find(SELECTOR_ITEM_CHECKBOX, list).forEach((checkbox) => {
68
- EventHandler.one(checkbox.closest('a'), EVENT_CLICK_DATA_API, (evt) => {
69
- if (!List.getInstance(list)) {
70
- evt.preventDefault()
71
- const listObj = List.getOrCreateInstance(list)
72
- listObj.toggleCheckbox(evt.currentTarget)
73
- }
74
+ if (typeof window !== 'undefined' && typeof document !== 'undefined') {
75
+ SelectorEngine.find(SELECTOR_LIST).forEach((list) => {
76
+ SelectorEngine.find(SELECTOR_ITEM_CHECKBOX, list).forEach((checkbox) => {
77
+ EventHandler.one(checkbox.closest('a'), EVENT_CLICK_DATA_API, (evt) => {
78
+ if (!List.getInstance(list)) {
79
+ evt.preventDefault()
80
+ const listObj = List.getOrCreateInstance(list)
81
+ listObj.toggleCheckbox(evt.currentTarget)
82
+ }
83
+ })
74
84
  })
75
85
  })
76
- })
86
+ }
77
87
 
78
88
  export default List
@@ -1,14 +1,19 @@
1
- import BaseComponent from 'bootstrap/js/src/base-component.js'
1
+ /**
2
+ * --------------------------------------------------------------------------
3
+ * Bootstrap Italia (https://italia.github.io/bootstrap-italia/)
4
+ * Authors: https://github.com/italia/bootstrap-italia/blob/main/AUTHORS
5
+ * Licensed under BSD-3-Clause license (https://github.com/italia/bootstrap-italia/blob/main/LICENSE)
6
+ * --------------------------------------------------------------------------
7
+ */
8
+
9
+ import BaseComponent from './base-component.js'
2
10
 
3
- import SelectorEngine from 'bootstrap/js/src/dom/selector-engine'
4
- import Manipulator from 'bootstrap/js/src/dom/manipulator'
11
+ import SelectorEngine from './dom/selector-engine'
12
+ import Manipulator from './dom/manipulator'
5
13
 
6
- import MasonryPlugin from 'masonry-layout'
14
+ import MiniMasonry from 'minimasonry/src/minimasonry'
7
15
 
8
16
  const NAME = 'masonry'
9
- //const DATA_KEY = 'bs.masonry'
10
- //const EVENT_KEY = `.${DATA_KEY}`
11
- //const DATA_API_KEY = '.data-api'
12
17
 
13
18
  const CLASS_NAME_SHOW = 'show'
14
19
  const CLASS_NAME_LOADER = 'masonry-loader'
@@ -24,13 +29,13 @@ class Masonry extends BaseComponent {
24
29
  constructor(element, config) {
25
30
  super(element)
26
31
 
27
- this._config = this._getConfig(config)
28
- this._masonry = null
29
-
30
- this._images = SelectorEngine.find('img', this._element)
31
- this._loadCounter = 0
32
-
33
- this._init()
32
+ if (typeof window !== 'undefined' && typeof document !== 'undefined') {
33
+ this._config = this._getConfig(config)
34
+ this._masonry = null
35
+ this._images = SelectorEngine.find('img', this._element)
36
+ this._loadCounter = 0
37
+ this._init()
38
+ }
34
39
  }
35
40
 
36
41
  // Getters
@@ -61,8 +66,6 @@ class Masonry extends BaseComponent {
61
66
 
62
67
  _init() {
63
68
  if (this._images.length > 0) {
64
- //this._showLoader()
65
-
66
69
  this._images.forEach((img) => {
67
70
  const imgDummy = new Image()
68
71
  imgDummy.onload = () => this._onLoadEnd()
@@ -76,13 +79,14 @@ class Masonry extends BaseComponent {
76
79
  _onLoadEnd() {
77
80
  this._loadCounter++
78
81
  if (this._loadCounter >= this._images.length) {
79
- //this._hideLoader()
80
82
  this._initMasonry()
81
83
  }
82
84
  }
83
85
 
84
86
  _initMasonry() {
85
- this._masonry = new MasonryPlugin(this._element, this._config)
87
+ const config = this._config
88
+ config.container = this._element
89
+ this._masonry = new MiniMasonry(config) //new MasonryPlugin(this._element, this._config)
86
90
  }
87
91
 
88
92
  _createLoader() {
@@ -123,18 +127,13 @@ class Masonry extends BaseComponent {
123
127
  * ------------------------------------------------------------------------
124
128
  */
125
129
 
126
- const masonries = SelectorEngine.find(SELECTOR_DATA_TOGGLE)
127
- if (masonries.length > 0) {
128
- /*if (!MASONRY_EXISTS) {
129
- console.warn('[Masonry] Masonry component needs Masonry library to work properly')
130
- } else {
130
+ if (typeof window !== 'undefined' && typeof document !== 'undefined') {
131
+ const masonries = SelectorEngine.find(SELECTOR_DATA_TOGGLE)
132
+ if (masonries.length > 0) {
131
133
  masonries.forEach((masonry) => {
132
134
  Masonry.getOrCreateInstance(masonry)
133
135
  })
134
- }*/
135
- masonries.forEach((masonry) => {
136
- Masonry.getOrCreateInstance(masonry)
137
- })
136
+ }
138
137
  }
139
138
 
140
139
  export default Masonry
@@ -1,5 +1,360 @@
1
- import { default as BSModal } from 'bootstrap/js/src/modal'
1
+ /**
2
+ * --------------------------------------------------------------------------
3
+ * Bootstrap Italia (https://italia.github.io/bootstrap-italia/)
4
+ * Authors: https://github.com/italia/bootstrap-italia/blob/main/AUTHORS
5
+ * Licensed under BSD-3-Clause license (https://github.com/italia/bootstrap-italia/blob/main/LICENSE)
6
+ * This a fork of Bootstrap: Initial license and original file name below
7
+ * Bootstrap (v5.2.3): modal.js
8
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
9
+ * --------------------------------------------------------------------------
10
+ */
2
11
 
3
- class Modal extends BSModal {}
12
+ import { getElementFromSelector, isRTL, isVisible, reflow } from './util/index'
13
+ import EventHandler from './dom/event-handler'
14
+ import SelectorEngine from './dom/selector-engine'
15
+ import ScrollBarHelper from './util/scrollbar'
16
+ import BaseComponent from './base-component'
17
+ import Backdrop from './util/backdrop'
18
+ import FocusTrap from './util/focustrap'
19
+ import { enableDismissTrigger } from './util/component-functions'
20
+
21
+ /**
22
+ * Constants
23
+ */
24
+
25
+ const NAME = 'modal'
26
+ const DATA_KEY = 'bs.modal'
27
+ const EVENT_KEY = `.${DATA_KEY}`
28
+ const DATA_API_KEY = '.data-api'
29
+ const ESCAPE_KEY = 'Escape'
30
+
31
+ const EVENT_HIDE = `hide${EVENT_KEY}`
32
+ const EVENT_HIDE_PREVENTED = `hidePrevented${EVENT_KEY}`
33
+ const EVENT_HIDDEN = `hidden${EVENT_KEY}`
34
+ const EVENT_SHOW = `show${EVENT_KEY}`
35
+ const EVENT_SHOWN = `shown${EVENT_KEY}`
36
+ const EVENT_RESIZE = `resize${EVENT_KEY}`
37
+ const EVENT_CLICK_DISMISS = `click.dismiss${EVENT_KEY}`
38
+ const EVENT_MOUSEDOWN_DISMISS = `mousedown.dismiss${EVENT_KEY}`
39
+ const EVENT_KEYDOWN_DISMISS = `keydown.dismiss${EVENT_KEY}`
40
+ const EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`
41
+
42
+ const CLASS_NAME_OPEN = 'modal-open'
43
+ const CLASS_NAME_FADE = 'fade'
44
+ const CLASS_NAME_SHOW = 'show'
45
+ const CLASS_NAME_STATIC = 'modal-static'
46
+
47
+ const OPEN_SELECTOR = '.modal.show'
48
+ const SELECTOR_DIALOG = '.modal-dialog'
49
+ const SELECTOR_MODAL_BODY = '.modal-body'
50
+ const SELECTOR_DATA_TOGGLE = '[data-bs-toggle="modal"]'
51
+
52
+ const Default = {
53
+ backdrop: true,
54
+ focus: true,
55
+ keyboard: true,
56
+ }
57
+
58
+ const DefaultType = {
59
+ backdrop: '(boolean|string)',
60
+ focus: 'boolean',
61
+ keyboard: 'boolean',
62
+ }
63
+
64
+ /**
65
+ * Class definition
66
+ */
67
+
68
+ class Modal extends BaseComponent {
69
+ constructor(element, config) {
70
+ super(element, config)
71
+
72
+ this._dialog = SelectorEngine.findOne(SELECTOR_DIALOG, this._element)
73
+ this._backdrop = this._initializeBackDrop()
74
+ this._focustrap = this._initializeFocusTrap()
75
+ this._isShown = false
76
+ this._isTransitioning = false
77
+ this._scrollBar = new ScrollBarHelper()
78
+
79
+ this._addEventListeners()
80
+ }
81
+
82
+ // Getters
83
+ static get Default() {
84
+ return Default
85
+ }
86
+
87
+ static get DefaultType() {
88
+ return DefaultType
89
+ }
90
+
91
+ static get NAME() {
92
+ return NAME
93
+ }
94
+
95
+ // Public
96
+ toggle(relatedTarget) {
97
+ return this._isShown ? this.hide() : this.show(relatedTarget)
98
+ }
99
+
100
+ show(relatedTarget) {
101
+ if (this._isShown || this._isTransitioning) {
102
+ return
103
+ }
104
+
105
+ const showEvent = EventHandler.trigger(this._element, EVENT_SHOW, {
106
+ relatedTarget,
107
+ })
108
+
109
+ if (showEvent.defaultPrevented) {
110
+ return
111
+ }
112
+
113
+ this._isShown = true
114
+ this._isTransitioning = true
115
+
116
+ this._scrollBar.hide()
117
+
118
+ document.body.classList.add(CLASS_NAME_OPEN)
119
+
120
+ this._adjustDialog()
121
+
122
+ this._backdrop.show(() => this._showElement(relatedTarget))
123
+ }
124
+
125
+ hide() {
126
+ if (!this._isShown || this._isTransitioning) {
127
+ return
128
+ }
129
+
130
+ const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE)
131
+
132
+ if (hideEvent.defaultPrevented) {
133
+ return
134
+ }
135
+
136
+ this._isShown = false
137
+ this._isTransitioning = true
138
+ this._focustrap.deactivate()
139
+
140
+ this._element.classList.remove(CLASS_NAME_SHOW)
141
+
142
+ this._queueCallback(() => this._hideModal(), this._element, this._isAnimated())
143
+ }
144
+
145
+ dispose() {
146
+ for (const htmlElement of [window, this._dialog]) {
147
+ EventHandler.off(htmlElement, EVENT_KEY)
148
+ }
149
+
150
+ this._backdrop.dispose()
151
+ this._focustrap.deactivate()
152
+ super.dispose()
153
+ }
154
+
155
+ handleUpdate() {
156
+ this._adjustDialog()
157
+ }
158
+
159
+ // Private
160
+ _initializeBackDrop() {
161
+ return new Backdrop({
162
+ isVisible: Boolean(this._config.backdrop), // 'static' option will be translated to true, and booleans will keep their value,
163
+ isAnimated: this._isAnimated(),
164
+ })
165
+ }
166
+
167
+ _initializeFocusTrap() {
168
+ return new FocusTrap({
169
+ trapElement: this._element,
170
+ })
171
+ }
172
+
173
+ _showElement(relatedTarget) {
174
+ // try to append dynamic modal
175
+ if (!document.body.contains(this._element)) {
176
+ document.body.append(this._element)
177
+ }
178
+
179
+ this._element.style.display = 'block'
180
+ this._element.removeAttribute('aria-hidden')
181
+ this._element.setAttribute('aria-modal', true)
182
+ this._element.setAttribute('role', 'dialog')
183
+ this._element.scrollTop = 0
184
+
185
+ const modalBody = SelectorEngine.findOne(SELECTOR_MODAL_BODY, this._dialog)
186
+ if (modalBody) {
187
+ modalBody.scrollTop = 0
188
+ }
189
+
190
+ reflow(this._element)
191
+
192
+ this._element.classList.add(CLASS_NAME_SHOW)
193
+
194
+ const transitionComplete = () => {
195
+ if (this._config.focus) {
196
+ this._focustrap.activate()
197
+ }
198
+
199
+ this._isTransitioning = false
200
+ EventHandler.trigger(this._element, EVENT_SHOWN, {
201
+ relatedTarget,
202
+ })
203
+ }
204
+
205
+ this._queueCallback(transitionComplete, this._dialog, this._isAnimated())
206
+ }
207
+
208
+ _addEventListeners() {
209
+ EventHandler.on(this._element, EVENT_KEYDOWN_DISMISS, (event) => {
210
+ if (event.key !== ESCAPE_KEY) {
211
+ return
212
+ }
213
+
214
+ if (this._config.keyboard) {
215
+ event.preventDefault()
216
+ this.hide()
217
+ return
218
+ }
219
+
220
+ this._triggerBackdropTransition()
221
+ })
222
+
223
+ EventHandler.on(window, EVENT_RESIZE, () => {
224
+ if (this._isShown && !this._isTransitioning) {
225
+ this._adjustDialog()
226
+ }
227
+ })
228
+
229
+ EventHandler.on(this._element, EVENT_MOUSEDOWN_DISMISS, (event) => {
230
+ // a bad trick to segregate clicks that may start inside dialog but end outside, and avoid listen to scrollbar clicks
231
+ EventHandler.one(this._element, EVENT_CLICK_DISMISS, (event2) => {
232
+ if (this._element !== event.target || this._element !== event2.target) {
233
+ return
234
+ }
235
+
236
+ if (this._config.backdrop === 'static') {
237
+ this._triggerBackdropTransition()
238
+ return
239
+ }
240
+
241
+ if (this._config.backdrop) {
242
+ this.hide()
243
+ }
244
+ })
245
+ })
246
+ }
247
+
248
+ _hideModal() {
249
+ this._element.style.display = 'none'
250
+ this._element.setAttribute('aria-hidden', true)
251
+ this._element.removeAttribute('aria-modal')
252
+ this._element.removeAttribute('role')
253
+ this._isTransitioning = false
254
+
255
+ this._backdrop.hide(() => {
256
+ document.body.classList.remove(CLASS_NAME_OPEN)
257
+ this._resetAdjustments()
258
+ this._scrollBar.reset()
259
+ EventHandler.trigger(this._element, EVENT_HIDDEN)
260
+ })
261
+ }
262
+
263
+ _isAnimated() {
264
+ return this._element.classList.contains(CLASS_NAME_FADE)
265
+ }
266
+
267
+ _triggerBackdropTransition() {
268
+ const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE_PREVENTED)
269
+ if (hideEvent.defaultPrevented) {
270
+ return
271
+ }
272
+
273
+ const isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight
274
+ const initialOverflowY = this._element.style.overflowY
275
+ // return if the following background transition hasn't yet completed
276
+ if (initialOverflowY === 'hidden' || this._element.classList.contains(CLASS_NAME_STATIC)) {
277
+ return
278
+ }
279
+
280
+ if (!isModalOverflowing) {
281
+ this._element.style.overflowY = 'hidden'
282
+ }
283
+
284
+ this._element.classList.add(CLASS_NAME_STATIC)
285
+ this._queueCallback(() => {
286
+ this._element.classList.remove(CLASS_NAME_STATIC)
287
+ this._queueCallback(() => {
288
+ this._element.style.overflowY = initialOverflowY
289
+ }, this._dialog)
290
+ }, this._dialog)
291
+
292
+ this._element.focus()
293
+ }
294
+
295
+ /**
296
+ * The following methods are used to handle overflowing modals
297
+ */
298
+
299
+ _adjustDialog() {
300
+ const isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight
301
+ const scrollbarWidth = this._scrollBar.getWidth()
302
+ const isBodyOverflowing = scrollbarWidth > 0
303
+
304
+ if (isBodyOverflowing && !isModalOverflowing) {
305
+ const property = isRTL() ? 'paddingLeft' : 'paddingRight'
306
+ this._element.style[property] = `${scrollbarWidth}px`
307
+ }
308
+
309
+ if (!isBodyOverflowing && isModalOverflowing) {
310
+ const property = isRTL() ? 'paddingRight' : 'paddingLeft'
311
+ this._element.style[property] = `${scrollbarWidth}px`
312
+ }
313
+ }
314
+
315
+ _resetAdjustments() {
316
+ this._element.style.paddingLeft = ''
317
+ this._element.style.paddingRight = ''
318
+ }
319
+ }
320
+
321
+ /**
322
+ * Data API implementation
323
+ */
324
+
325
+ if (typeof window !== 'undefined' && typeof document !== 'undefined') {
326
+ EventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
327
+ const target = getElementFromSelector(this)
328
+
329
+ if (['A', 'AREA'].includes(this.tagName)) {
330
+ event.preventDefault()
331
+ }
332
+
333
+ EventHandler.one(target, EVENT_SHOW, (showEvent) => {
334
+ if (showEvent.defaultPrevented) {
335
+ // only register focus restorer if modal will actually get shown
336
+ return
337
+ }
338
+
339
+ EventHandler.one(target, EVENT_HIDDEN, () => {
340
+ if (isVisible(this)) {
341
+ this.focus()
342
+ }
343
+ })
344
+ })
345
+
346
+ // avoid conflict when clicking modal toggler while another one is open
347
+ const alreadyOpen = SelectorEngine.findOne(OPEN_SELECTOR)
348
+ if (alreadyOpen) {
349
+ Modal.getInstance(alreadyOpen).hide()
350
+ }
351
+
352
+ const data = Modal.getOrCreateInstance(target)
353
+
354
+ data.toggle(this)
355
+ })
356
+
357
+ enableDismissTrigger(Modal)
358
+ }
4
359
 
5
360
  export default Modal