bootstrap-italia 2.12.1 → 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/components/_badge.scss +60 -0
  258. package/src/scss/components/_breadcrumb.scss +95 -0
  259. package/src/scss/components/_button-group.scss +143 -0
  260. package/src/scss/components/_buttons.scss +467 -0
  261. package/src/scss/{custom → components}/_card.scss +228 -0
  262. package/src/scss/{custom → components}/_carousel.scss +225 -3
  263. package/src/scss/components/_dropdown.scss +480 -0
  264. package/src/scss/{custom → components}/_grid.scss +33 -0
  265. package/src/scss/{custom → components}/_gridlist.scss +7 -0
  266. package/src/scss/{custom → components}/_hero.scss +23 -57
  267. package/src/scss/components/_images.scss +48 -0
  268. package/src/scss/{custom → components}/_linklist.scss +0 -1
  269. package/src/scss/components/_list-group.scss +190 -0
  270. package/src/scss/components/_modal.scss +475 -0
  271. package/src/scss/components/_nav.scss +169 -0
  272. package/src/scss/components/_navbar.scss +273 -0
  273. package/src/scss/components/_offcanvas.scss +144 -0
  274. package/src/scss/components/_pagination.scss +108 -0
  275. package/src/scss/components/_placeholders.scss +51 -0
  276. package/src/scss/components/_popover.scss +298 -0
  277. package/src/scss/components/_progress-bars.scss +126 -0
  278. package/src/scss/{custom → components}/_steppers.scss +2 -2
  279. package/src/scss/{custom → components}/_tab.scss +3 -7
  280. package/src/scss/components/_tables.scss +171 -0
  281. package/src/scss/components/_toasts.scss +73 -0
  282. package/src/scss/{custom → components}/_toolbar.scss +19 -12
  283. package/src/scss/components/_tooltip.scss +139 -0
  284. package/src/scss/{custom → components}/_type.scss +92 -0
  285. package/src/scss/forms/_accessible-autocomplete.scss +188 -0
  286. package/src/scss/forms/_floating-labels.scss +75 -0
  287. package/src/scss/forms/_form-check.scss +175 -0
  288. package/src/scss/forms/_form-control.scss +201 -0
  289. package/src/scss/forms/_form-range.scss +95 -0
  290. package/src/scss/{custom → forms}/_form-select.scss +72 -0
  291. package/src/scss/forms/_form-text.scss +11 -0
  292. package/src/scss/{custom → forms}/_forms.scss +8 -12
  293. package/src/scss/forms/_input-group.scss +129 -0
  294. package/src/scss/forms/_labels.scss +36 -0
  295. package/src/scss/forms/_validation.scss +12 -0
  296. package/src/scss/utilities/icons.scss +5 -5
  297. package/types/index.d.ts +4 -1
  298. package/types/plugins/video.ts +33 -0
  299. package/dist/plugins/backToTop.js.map +0 -1
  300. package/src/scss/_functions.scss +0 -38
  301. package/src/scss/_variables.scss +0 -639
  302. package/src/scss/custom/_accessible-autocomplete.scss +0 -30
  303. package/src/scss/custom/_accordion.scss +0 -176
  304. package/src/scss/custom/_badge.scss +0 -29
  305. package/src/scss/custom/_breadcrumb.scss +0 -51
  306. package/src/scss/custom/_buttons.scss +0 -235
  307. package/src/scss/custom/_componente-base.scss +0 -6
  308. package/src/scss/custom/_dropdown.scss +0 -248
  309. package/src/scss/custom/_form-datepicker.scss +0 -604
  310. package/src/scss/custom/_images.scss +0 -10
  311. package/src/scss/custom/_modal.scss +0 -248
  312. package/src/scss/custom/_popover.scss +0 -106
  313. package/src/scss/custom/_progress-bars.scss +0 -70
  314. package/src/scss/custom/_tables.scss +0 -11
  315. package/src/scss/custom/_timepicker.scss +0 -252
  316. package/src/scss/custom/_tooltip.scss +0 -33
  317. package/src/scss/custom/_version.scss +0 -3
  318. package/src/scss/custom/mixins/_buttons.scss +0 -67
  319. package/src/scss/utilities/colors_vars.scss +0 -426
  320. /package/src/scss/{custom → base}/mixins/_text-emphasis.scss +0 -0
  321. /package/src/scss/{custom → components}/_accept-overlay.scss +0 -0
  322. /package/src/scss/{custom → components}/_affix.scss +0 -0
  323. /package/src/scss/{custom → components}/_alert.scss +0 -0
  324. /package/src/scss/{custom → components}/_anchor.scss +0 -0
  325. /package/src/scss/{custom → components}/_avatar.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,5 +1,604 @@
1
- import { default as BSTooltip } from 'bootstrap/js/src/tooltip'
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): tooltip.js
8
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
9
+ * --------------------------------------------------------------------------
10
+ */
2
11
 
3
- class Tooltip extends BSTooltip {}
12
+ import * as Popper from '@popperjs/core'
13
+ import { findShadowRoot, getElement, getUID, isRTL, noop } from './util/index'
14
+ import { DefaultAllowlist } from './util/sanitizer'
15
+ import EventHandler from './dom/event-handler'
16
+ import Manipulator from './dom/manipulator'
17
+ import BaseComponent from './base-component'
18
+ import TemplateFactory from './util/template-factory'
19
+
20
+ /**
21
+ * Constants
22
+ */
23
+
24
+ const NAME = 'tooltip'
25
+ const DISALLOWED_ATTRIBUTES = new Set(['sanitize', 'allowList', 'sanitizeFn'])
26
+
27
+ const CLASS_NAME_FADE = 'fade'
28
+ const CLASS_NAME_MODAL = 'modal'
29
+ const CLASS_NAME_SHOW = 'show'
30
+
31
+ const SELECTOR_TOOLTIP_INNER = '.tooltip-inner'
32
+ const SELECTOR_MODAL = `.${CLASS_NAME_MODAL}`
33
+
34
+ const EVENT_MODAL_HIDE = 'hide.bs.modal'
35
+
36
+ const TRIGGER_HOVER = 'hover'
37
+ const TRIGGER_FOCUS = 'focus'
38
+ const TRIGGER_CLICK = 'click'
39
+ const TRIGGER_MANUAL = 'manual'
40
+
41
+ const EVENT_HIDE = 'hide'
42
+ const EVENT_HIDDEN = 'hidden'
43
+ const EVENT_SHOW = 'show'
44
+ const EVENT_SHOWN = 'shown'
45
+ const EVENT_INSERTED = 'inserted'
46
+ const EVENT_CLICK = 'click'
47
+ const EVENT_FOCUSIN = 'focusin'
48
+ const EVENT_FOCUSOUT = 'focusout'
49
+ const EVENT_MOUSEENTER = 'mouseenter'
50
+ const EVENT_MOUSELEAVE = 'mouseleave'
51
+
52
+ const AttachmentMap = {
53
+ AUTO: 'auto',
54
+ TOP: 'top',
55
+ RIGHT: isRTL() ? 'left' : 'right',
56
+ BOTTOM: 'bottom',
57
+ LEFT: isRTL() ? 'right' : 'left',
58
+ }
59
+
60
+ const Default = {
61
+ allowList: DefaultAllowlist,
62
+ animation: true,
63
+ boundary: 'clippingParents',
64
+ container: false,
65
+ customClass: '',
66
+ delay: 0,
67
+ fallbackPlacements: ['top', 'right', 'bottom', 'left'],
68
+ html: false,
69
+ offset: [0, 0],
70
+ placement: 'top',
71
+ popperConfig: null,
72
+ sanitize: true,
73
+ sanitizeFn: null,
74
+ selector: false,
75
+ template: '<div class="tooltip" role="tooltip">' + '<div class="tooltip-arrow"></div>' + '<div class="tooltip-inner"></div>' + '</div>',
76
+ title: '',
77
+ trigger: 'hover focus',
78
+ }
79
+
80
+ const DefaultType = {
81
+ allowList: 'object',
82
+ animation: 'boolean',
83
+ boundary: '(string|element)',
84
+ container: '(string|element|boolean)',
85
+ customClass: '(string|function)',
86
+ delay: '(number|object)',
87
+ fallbackPlacements: 'array',
88
+ html: 'boolean',
89
+ offset: '(array|string|function)',
90
+ placement: '(string|function)',
91
+ popperConfig: '(null|object|function)',
92
+ sanitize: 'boolean',
93
+ sanitizeFn: '(null|function)',
94
+ selector: '(string|boolean)',
95
+ template: 'string',
96
+ title: '(string|element|function)',
97
+ trigger: 'string',
98
+ }
99
+
100
+ /**
101
+ * Class definition
102
+ */
103
+
104
+ class Tooltip extends BaseComponent {
105
+ constructor(element, config) {
106
+ if (typeof Popper === 'undefined') {
107
+ throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)")
108
+ }
109
+
110
+ super(element, config)
111
+
112
+ // Private
113
+ this._isEnabled = true
114
+ this._timeout = 0
115
+ this._isHovered = null
116
+ this._activeTrigger = {}
117
+ this._popper = null
118
+ this._templateFactory = null
119
+ this._newContent = null
120
+
121
+ // Protected
122
+ this.tip = null
123
+
124
+ this._setListeners()
125
+
126
+ if (!this._config.selector) {
127
+ this._fixTitle()
128
+ }
129
+ }
130
+
131
+ // Getters
132
+ static get Default() {
133
+ return Default
134
+ }
135
+
136
+ static get DefaultType() {
137
+ return DefaultType
138
+ }
139
+
140
+ static get NAME() {
141
+ return NAME
142
+ }
143
+
144
+ // Public
145
+ enable() {
146
+ this._isEnabled = true
147
+ }
148
+
149
+ disable() {
150
+ this._isEnabled = false
151
+ }
152
+
153
+ toggleEnabled() {
154
+ this._isEnabled = !this._isEnabled
155
+ }
156
+
157
+ toggle() {
158
+ if (!this._isEnabled) {
159
+ return
160
+ }
161
+
162
+ this._activeTrigger.click = !this._activeTrigger.click
163
+ if (this._isShown()) {
164
+ this._leave()
165
+ return
166
+ }
167
+
168
+ this._enter()
169
+ }
170
+
171
+ dispose() {
172
+ clearTimeout(this._timeout)
173
+
174
+ EventHandler.off(this._element.closest(SELECTOR_MODAL), EVENT_MODAL_HIDE, this._hideModalHandler)
175
+
176
+ if (this._element.getAttribute('data-bs-original-title')) {
177
+ this._element.setAttribute('title', this._element.getAttribute('data-bs-original-title'))
178
+ }
179
+
180
+ this._disposePopper()
181
+ super.dispose()
182
+ }
183
+
184
+ show() {
185
+ if (this._element.style.display === 'none') {
186
+ throw new Error('Please use show on visible elements')
187
+ }
188
+
189
+ if (!(this._isWithContent() && this._isEnabled)) {
190
+ return
191
+ }
192
+
193
+ const showEvent = EventHandler.trigger(this._element, this.constructor.eventName(EVENT_SHOW))
194
+ const shadowRoot = findShadowRoot(this._element)
195
+ const isInTheDom = (shadowRoot || this._element.ownerDocument.documentElement).contains(this._element)
196
+
197
+ if (showEvent.defaultPrevented || !isInTheDom) {
198
+ return
199
+ }
200
+
201
+ // todo v6 remove this OR make it optional
202
+ this._disposePopper()
203
+
204
+ const tip = this._getTipElement()
205
+
206
+ this._element.setAttribute('aria-describedby', tip.getAttribute('id'))
207
+
208
+ const { container } = this._config
209
+
210
+ if (!this._element.ownerDocument.documentElement.contains(this.tip)) {
211
+ container.append(tip)
212
+ EventHandler.trigger(this._element, this.constructor.eventName(EVENT_INSERTED))
213
+ }
214
+
215
+ this._popper = this._createPopper(tip)
216
+
217
+ tip.classList.add(CLASS_NAME_SHOW)
218
+
219
+ // If this is a touch-enabled device we add extra
220
+ // empty mouseover listeners to the body's immediate children;
221
+ // only needed because of broken event delegation on iOS
222
+ // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html
223
+ if ('ontouchstart' in document.documentElement) {
224
+ for (const element of [].concat(...document.body.children)) {
225
+ EventHandler.on(element, 'mouseover', noop)
226
+ }
227
+ }
228
+
229
+ const complete = () => {
230
+ EventHandler.trigger(this._element, this.constructor.eventName(EVENT_SHOWN))
231
+
232
+ if (this._isHovered === false) {
233
+ this._leave()
234
+ }
235
+
236
+ this._isHovered = false
237
+ }
238
+
239
+ this._queueCallback(complete, this.tip, this._isAnimated())
240
+ }
241
+
242
+ hide() {
243
+ if (!this._isShown()) {
244
+ return
245
+ }
246
+
247
+ const hideEvent = EventHandler.trigger(this._element, this.constructor.eventName(EVENT_HIDE))
248
+ if (hideEvent.defaultPrevented) {
249
+ return
250
+ }
251
+
252
+ const tip = this._getTipElement()
253
+ tip.classList.remove(CLASS_NAME_SHOW)
254
+
255
+ // If this is a touch-enabled device we remove the extra
256
+ // empty mouseover listeners we added for iOS support
257
+ if ('ontouchstart' in document.documentElement) {
258
+ for (const element of [].concat(...document.body.children)) {
259
+ EventHandler.off(element, 'mouseover', noop)
260
+ }
261
+ }
262
+
263
+ this._activeTrigger[TRIGGER_CLICK] = false
264
+ this._activeTrigger[TRIGGER_FOCUS] = false
265
+ this._activeTrigger[TRIGGER_HOVER] = false
266
+ this._isHovered = null // it is a trick to support manual triggering
267
+
268
+ const complete = () => {
269
+ if (this._isWithActiveTrigger()) {
270
+ return
271
+ }
272
+
273
+ if (!this._isHovered) {
274
+ this._disposePopper()
275
+ }
276
+
277
+ this._element.removeAttribute('aria-describedby')
278
+ EventHandler.trigger(this._element, this.constructor.eventName(EVENT_HIDDEN))
279
+ }
280
+
281
+ this._queueCallback(complete, this.tip, this._isAnimated())
282
+ }
283
+
284
+ update() {
285
+ if (this._popper) {
286
+ this._popper.update()
287
+ }
288
+ }
289
+
290
+ // Protected
291
+ _isWithContent() {
292
+ return Boolean(this._getTitle())
293
+ }
294
+
295
+ _getTipElement() {
296
+ if (!this.tip) {
297
+ this.tip = this._createTipElement(this._newContent || this._getContentForTemplate())
298
+ }
299
+
300
+ return this.tip
301
+ }
302
+
303
+ _createTipElement(content) {
304
+ const tip = this._getTemplateFactory(content).toHtml()
305
+
306
+ // todo: remove this check on v6
307
+ if (!tip) {
308
+ return null
309
+ }
310
+
311
+ tip.classList.remove(CLASS_NAME_FADE, CLASS_NAME_SHOW)
312
+ // todo: on v6 the following can be achieved with CSS only
313
+ tip.classList.add(`bs-${this.constructor.NAME}-auto`)
314
+
315
+ const tipId = getUID(this.constructor.NAME).toString()
316
+
317
+ tip.setAttribute('id', tipId)
318
+
319
+ if (this._isAnimated()) {
320
+ tip.classList.add(CLASS_NAME_FADE)
321
+ }
322
+
323
+ return tip
324
+ }
325
+
326
+ setContent(content) {
327
+ this._newContent = content
328
+ if (this._isShown()) {
329
+ this._disposePopper()
330
+ this.show()
331
+ }
332
+ }
333
+
334
+ _getTemplateFactory(content) {
335
+ if (this._templateFactory) {
336
+ this._templateFactory.changeContent(content)
337
+ } else {
338
+ this._templateFactory = new TemplateFactory({
339
+ ...this._config,
340
+ // the `content` var has to be after `this._config`
341
+ // to override config.content in case of popover
342
+ content,
343
+ extraClass: this._resolvePossibleFunction(this._config.customClass),
344
+ })
345
+ }
346
+
347
+ return this._templateFactory
348
+ }
349
+
350
+ _getContentForTemplate() {
351
+ return {
352
+ [SELECTOR_TOOLTIP_INNER]: this._getTitle(),
353
+ }
354
+ }
355
+
356
+ _getTitle() {
357
+ return this._resolvePossibleFunction(this._config.title) || this._element.getAttribute('data-bs-original-title')
358
+ }
359
+
360
+ // Private
361
+ _initializeOnDelegatedTarget(event) {
362
+ return this.constructor.getOrCreateInstance(event.delegateTarget, this._getDelegateConfig())
363
+ }
364
+
365
+ _isAnimated() {
366
+ return this._config.animation || (this.tip && this.tip.classList.contains(CLASS_NAME_FADE))
367
+ }
368
+
369
+ _isShown() {
370
+ return this.tip && this.tip.classList.contains(CLASS_NAME_SHOW)
371
+ }
372
+
373
+ _createPopper(tip) {
374
+ const placement = typeof this._config.placement === 'function' ? this._config.placement.call(this, tip, this._element) : this._config.placement
375
+ const attachment = AttachmentMap[placement.toUpperCase()]
376
+ return Popper.createPopper(this._element, tip, this._getPopperConfig(attachment))
377
+ }
378
+
379
+ _getOffset() {
380
+ const { offset } = this._config
381
+
382
+ if (typeof offset === 'string') {
383
+ return offset.split(',').map((value) => Number.parseInt(value, 10))
384
+ }
385
+
386
+ if (typeof offset === 'function') {
387
+ return (popperData) => offset(popperData, this._element)
388
+ }
389
+
390
+ return offset
391
+ }
392
+
393
+ _resolvePossibleFunction(arg) {
394
+ return typeof arg === 'function' ? arg.call(this._element) : arg
395
+ }
396
+
397
+ _getPopperConfig(attachment) {
398
+ const defaultBsPopperConfig = {
399
+ placement: attachment,
400
+ modifiers: [
401
+ {
402
+ name: 'flip',
403
+ options: {
404
+ fallbackPlacements: this._config.fallbackPlacements,
405
+ },
406
+ },
407
+ {
408
+ name: 'offset',
409
+ options: {
410
+ offset: this._getOffset(),
411
+ },
412
+ },
413
+ {
414
+ name: 'preventOverflow',
415
+ options: {
416
+ boundary: this._config.boundary,
417
+ },
418
+ },
419
+ {
420
+ name: 'arrow',
421
+ options: {
422
+ element: `.${this.constructor.NAME}-arrow`,
423
+ },
424
+ },
425
+ {
426
+ name: 'preSetPlacement',
427
+ enabled: true,
428
+ phase: 'beforeMain',
429
+ fn: (data) => {
430
+ // Pre-set Popper's placement attribute in order to read the arrow sizes properly.
431
+ // Otherwise, Popper mixes up the width and height dimensions since the initial arrow style is for top placement
432
+ this._getTipElement().setAttribute('data-popper-placement', data.state.placement)
433
+ },
434
+ },
435
+ ],
436
+ }
437
+
438
+ return {
439
+ ...defaultBsPopperConfig,
440
+ ...(typeof this._config.popperConfig === 'function' ? this._config.popperConfig(defaultBsPopperConfig) : this._config.popperConfig),
441
+ }
442
+ }
443
+
444
+ _setListeners() {
445
+ const triggers = this._config.trigger.split(' ')
446
+
447
+ for (const trigger of triggers) {
448
+ if (trigger === 'click') {
449
+ EventHandler.on(this._element, this.constructor.eventName(EVENT_CLICK), this._config.selector, (event) => {
450
+ const context = this._initializeOnDelegatedTarget(event)
451
+ context.toggle()
452
+ })
453
+ } else if (trigger !== TRIGGER_MANUAL) {
454
+ const eventIn = trigger === TRIGGER_HOVER ? this.constructor.eventName(EVENT_MOUSEENTER) : this.constructor.eventName(EVENT_FOCUSIN)
455
+ const eventOut = trigger === TRIGGER_HOVER ? this.constructor.eventName(EVENT_MOUSELEAVE) : this.constructor.eventName(EVENT_FOCUSOUT)
456
+
457
+ EventHandler.on(this._element, eventIn, this._config.selector, (event) => {
458
+ const context = this._initializeOnDelegatedTarget(event)
459
+ context._activeTrigger[event.type === 'focusin' ? TRIGGER_FOCUS : TRIGGER_HOVER] = true
460
+ context._enter()
461
+ })
462
+ EventHandler.on(this._element, eventOut, this._config.selector, (event) => {
463
+ const context = this._initializeOnDelegatedTarget(event)
464
+ context._activeTrigger[event.type === 'focusout' ? TRIGGER_FOCUS : TRIGGER_HOVER] = context._element.contains(event.relatedTarget)
465
+
466
+ context._leave()
467
+ })
468
+ }
469
+ }
470
+
471
+ this._hideModalHandler = () => {
472
+ if (this._element) {
473
+ this.hide()
474
+ }
475
+ }
476
+
477
+ EventHandler.on(this._element.closest(SELECTOR_MODAL), EVENT_MODAL_HIDE, this._hideModalHandler)
478
+ }
479
+
480
+ _fixTitle() {
481
+ const title = this._element.getAttribute('title')
482
+
483
+ if (!title) {
484
+ return
485
+ }
486
+
487
+ if (!this._element.getAttribute('aria-label') && !this._element.textContent.trim()) {
488
+ this._element.setAttribute('aria-label', title)
489
+ }
490
+
491
+ this._element.setAttribute('data-bs-original-title', title) // DO NOT USE IT. Is only for backwards compatibility
492
+ this._element.removeAttribute('title')
493
+ }
494
+
495
+ _enter() {
496
+ if (this._isShown() || this._isHovered) {
497
+ this._isHovered = true
498
+ return
499
+ }
500
+
501
+ this._isHovered = true
502
+
503
+ this._setTimeout(() => {
504
+ if (this._isHovered) {
505
+ this.show()
506
+ }
507
+ }, this._config.delay.show)
508
+ }
509
+
510
+ _leave() {
511
+ if (this._isWithActiveTrigger()) {
512
+ return
513
+ }
514
+
515
+ this._isHovered = false
516
+
517
+ this._setTimeout(() => {
518
+ if (!this._isHovered) {
519
+ this.hide()
520
+ }
521
+ }, this._config.delay.hide)
522
+ }
523
+
524
+ _setTimeout(handler, timeout) {
525
+ clearTimeout(this._timeout)
526
+ this._timeout = setTimeout(handler, timeout)
527
+ }
528
+
529
+ _isWithActiveTrigger() {
530
+ return Object.values(this._activeTrigger).includes(true)
531
+ }
532
+
533
+ _getConfig(config) {
534
+ const dataAttributes = Manipulator.getDataAttributes(this._element)
535
+
536
+ for (const dataAttribute of Object.keys(dataAttributes)) {
537
+ if (DISALLOWED_ATTRIBUTES.has(dataAttribute)) {
538
+ delete dataAttributes[dataAttribute]
539
+ }
540
+ }
541
+
542
+ config = {
543
+ ...dataAttributes,
544
+ ...(typeof config === 'object' && config ? config : {}),
545
+ }
546
+ config = this._mergeConfigObj(config)
547
+ config = this._configAfterMerge(config)
548
+ this._typeCheckConfig(config)
549
+ return config
550
+ }
551
+
552
+ _configAfterMerge(config) {
553
+ config.container = config.container === false ? document.body : getElement(config.container)
554
+
555
+ if (typeof config.delay === 'number') {
556
+ config.delay = {
557
+ show: config.delay,
558
+ hide: config.delay,
559
+ }
560
+ }
561
+
562
+ if (typeof config.title === 'number') {
563
+ config.title = config.title.toString()
564
+ }
565
+
566
+ if (typeof config.content === 'number') {
567
+ config.content = config.content.toString()
568
+ }
569
+
570
+ return config
571
+ }
572
+
573
+ _getDelegateConfig() {
574
+ const config = {}
575
+
576
+ for (const key in this._config) {
577
+ if (this.constructor.Default[key] !== this._config[key]) {
578
+ config[key] = this._config[key]
579
+ }
580
+ }
581
+
582
+ config.selector = false
583
+ config.trigger = 'manual'
584
+
585
+ // In the future can be replaced with:
586
+ // const keysWithDifferentValues = Object.entries(this._config).filter(entry => this.constructor.Default[entry[0]] !== this._config[entry[0]])
587
+ // `Object.fromEntries(keysWithDifferentValues)`
588
+ return config
589
+ }
590
+
591
+ _disposePopper() {
592
+ if (this._popper) {
593
+ this._popper.destroy()
594
+ this._popper = null
595
+ }
596
+
597
+ if (this.tip) {
598
+ this.tip.remove()
599
+ this.tip = null
600
+ }
601
+ }
602
+ }
4
603
 
5
604
  export default Tooltip
@@ -1,3 +1,11 @@
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
+
1
9
  const DATA_MOUSE_FOCUS = 'data-focus-mouse'
2
10
  const CLASS_NAME_MOUSE_FOCUS = 'focus--mouse'
3
11
 
@@ -1,16 +1,7 @@
1
- import BaseComponent from 'bootstrap/js/src/base-component.js'
2
-
3
- /*import {
4
- //defineJQueryPlugin,
5
- //getElementFromSelector,
6
- //isVisible,
7
- //reflow,
8
- //typeCheckConfig,
9
- getSelectorFromElement, //in base al bs-target
10
- } from 'bootstrap/js/src/util'*/
11
- import EventHandler from 'bootstrap/js/src/dom/event-handler'
12
- import SelectorEngine from 'bootstrap/js/src/dom/selector-engine'
13
- //import Manipulator from 'bootstrap/js/src/dom/manipulator'
1
+ import BaseComponent from './base-component.js'
2
+
3
+ import EventHandler from './dom/event-handler'
4
+ import SelectorEngine from './dom/selector-engine'
14
5
 
15
6
  const NAME = 'transfer'
16
7
  const DATA_KEY = 'bs.transfer'
@@ -19,7 +10,6 @@ const DATA_API_KEY = '.data-api'
19
10
 
20
11
  const EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`
21
12
  const EVENT_KEYUP_DATA_API = `keyup${EVENT_KEY}${DATA_API_KEY}`
22
- //const EVENT_SCROLL = `scroll${EVENT_KEY}`
23
13
  const EVENT_CLICK = `click${EVENT_KEY}`
24
14
 
25
15
  const CLASS_NAME_ACTIVE = 'active'
@@ -260,15 +250,13 @@ class Transfer extends BaseComponent {
260
250
  * ------------------------------------------------------------------------
261
251
  */
262
252
 
263
- /*SelectorEngine.find(SELECTOR_BLOCK).forEach((block) => {
264
- Transfer.getOrCreateInstance(block)
265
- })*/
266
-
267
- EventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_BLOCK + ' .form-check label', function () {
268
- Transfer.getOrCreateInstance(this.closest(SELECTOR_BLOCK))
269
- })
270
- EventHandler.on(document, EVENT_KEYUP_DATA_API, SELECTOR_BLOCK + ' .form-check label', function () {
271
- Transfer.getOrCreateInstance(this.closest(SELECTOR_BLOCK))
272
- })
253
+ if (typeof window !== 'undefined' && typeof document !== 'undefined') {
254
+ EventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_BLOCK + ' .form-check label', function () {
255
+ Transfer.getOrCreateInstance(this.closest(SELECTOR_BLOCK))
256
+ })
257
+ EventHandler.on(document, EVENT_KEYUP_DATA_API, SELECTOR_BLOCK + ' .form-check label', function () {
258
+ Transfer.getOrCreateInstance(this.closest(SELECTOR_BLOCK))
259
+ })
260
+ }
273
261
 
274
262
  export default Transfer
@@ -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 ProgressDonut from './progress-donut'
7
15
 
@@ -134,7 +142,7 @@ const createInput = (element) => {
134
142
  return null
135
143
  }
136
144
 
137
- if (typeof document !== 'undefined') {
145
+ if (typeof window !== 'undefined' && typeof document !== 'undefined') {
138
146
  document.addEventListener('dragenter', function (evt) {
139
147
  createInput(evt.target)
140
148
  })