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,15 +1,16 @@
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,
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'
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'
10
+
11
+ import { getElementFromSelector, isVisible, reflow } from './util/index'
12
+ import EventHandler from './dom/event-handler'
13
+ import SelectorEngine from './dom/selector-engine'
13
14
 
14
15
  import { isScreenMobile } from './util/device'
15
16
  import { getElementIndex } from './util/dom'
@@ -139,33 +140,36 @@ class NavBarCollapsible extends BaseComponent {
139
140
  }
140
141
 
141
142
  dispose() {
142
- EventHandler.off(window, EVENT_RESIZE)
143
-
144
- super.dispose()
143
+ if (typeof window !== 'undefined' && typeof document !== 'undefined') {
144
+ EventHandler.off(window, EVENT_RESIZE)
145
+ super.dispose()
146
+ }
145
147
  }
146
148
 
147
149
  // Private
148
150
 
149
151
  _bindEvents() {
150
- EventHandler.on(window, EVENT_RESIZE, () => this._onResize())
152
+ if (typeof window !== 'undefined' && typeof document !== 'undefined') {
153
+ EventHandler.on(window, EVENT_RESIZE, () => this._onResize())
151
154
 
152
- if (this._overlay) {
153
- EventHandler.on(this._overlay, EVENT_CLICK, () => this.hide())
155
+ if (this._overlay) {
156
+ EventHandler.on(this._overlay, EVENT_CLICK, () => this.hide())
157
+ }
158
+ EventHandler.on(this._btnClose, EVENT_CLICK, (evt) => {
159
+ evt.preventDefault()
160
+ this.hide()
161
+ })
162
+ EventHandler.on(this._btnBack, EVENT_CLICK, (evt) => {
163
+ evt.preventDefault()
164
+ this.hide()
165
+ })
166
+
167
+ this._menuItems.forEach((item) => {
168
+ EventHandler.on(item, EVENT_KEYDOWN, (evt) => this._isMobile && this._onMenuItemKeyDown(evt))
169
+ EventHandler.on(item, EVENT_KEYUP, (evt) => this._isMobile && this._onMenuItemKeyUp(evt))
170
+ EventHandler.on(item, EVENT_CLICK, (evt) => this._isMobile && this._onMenuItemClick(evt))
171
+ })
154
172
  }
155
- EventHandler.on(this._btnClose, EVENT_CLICK, (evt) => {
156
- evt.preventDefault()
157
- this.hide()
158
- })
159
- EventHandler.on(this._btnBack, EVENT_CLICK, (evt) => {
160
- evt.preventDefault()
161
- this.hide()
162
- })
163
-
164
- this._menuItems.forEach((item) => {
165
- EventHandler.on(item, EVENT_KEYDOWN, (evt) => this._isMobile && this._onMenuItemKeyDown(evt))
166
- EventHandler.on(item, EVENT_KEYUP, (evt) => this._isMobile && this._onMenuItemKeyUp(evt))
167
- EventHandler.on(item, EVENT_CLICK, (evt) => this._isMobile && this._onMenuItemClick(evt))
168
- })
169
173
  }
170
174
 
171
175
  _onResize() {
@@ -313,34 +317,32 @@ class NavBarCollapsible extends BaseComponent {
313
317
  * Data Api implementation
314
318
  * ------------------------------------------------------------------------
315
319
  */
316
- /*const navs = SelectorEngine.find(SELECTOR_NAVBAR)
317
- navs.forEach((nav) => {
318
- NavBarCollapsible.getOrCreateInstance(nav)
319
- })*/
320
320
 
321
- EventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
322
- const target = getElementFromSelector(this)
321
+ if (typeof window !== 'undefined' && typeof document !== 'undefined') {
322
+ EventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
323
+ const target = getElementFromSelector(this)
323
324
 
324
- if (['A', 'AREA'].includes(this.tagName)) {
325
- event.preventDefault()
326
- }
327
-
328
- EventHandler.one(target, EVENT_SHOW, (showEvent) => {
329
- if (showEvent.defaultPrevented) {
330
- // only register focus restorer if modal will actually get shown
331
- return
325
+ if (['A', 'AREA'].includes(this.tagName)) {
326
+ event.preventDefault()
332
327
  }
333
328
 
334
- EventHandler.one(target, EVENT_HIDDEN, () => {
335
- if (isVisible(this)) {
336
- this.focus()
329
+ EventHandler.one(target, EVENT_SHOW, (showEvent) => {
330
+ if (showEvent.defaultPrevented) {
331
+ // only register focus restorer if modal will actually get shown
332
+ return
337
333
  }
334
+
335
+ EventHandler.one(target, EVENT_HIDDEN, () => {
336
+ if (isVisible(this)) {
337
+ this.focus()
338
+ }
339
+ })
338
340
  })
339
- })
340
341
 
341
- const data = NavBarCollapsible.getOrCreateInstance(target)
342
+ const data = NavBarCollapsible.getOrCreateInstance(target)
342
343
 
343
- data.toggle(this)
344
- })
344
+ data.toggle(this)
345
+ })
346
+ }
345
347
 
346
348
  export default NavBarCollapsible
@@ -1,8 +1,8 @@
1
- import BaseComponent from 'bootstrap/js/src/base-component.js'
1
+ import BaseComponent from './base-component.js'
2
2
 
3
- import EventHandler from 'bootstrap/js/src/dom/event-handler'
4
- import SelectorEngine from 'bootstrap/js/src/dom/selector-engine'
5
- import Manipulator from 'bootstrap/js/src/dom/manipulator'
3
+ import EventHandler from './dom/event-handler'
4
+ import SelectorEngine from './dom/selector-engine'
5
+ import Manipulator from './dom/manipulator'
6
6
 
7
7
  import onDocumentScroll from './util/on-document-scroll'
8
8
  import NavBarCollapsible from './navbar-collapsible'
@@ -10,17 +10,11 @@ import NavBarCollapsible from './navbar-collapsible'
10
10
  import { documentScrollTo } from './util/tween'
11
11
 
12
12
  const NAME = 'navscroll'
13
- //const DATA_KEY = 'bs.navscroll'
14
- //const EVENT_KEY = `.${DATA_KEY}`
15
- //const DATA_API_KEY = '.data-api'
16
-
17
- //const EVENT_SCROLL = `scroll${EVENT_KEY}`
18
13
 
19
14
  const CLASS_NAME_ACTIVE = 'active'
20
15
 
21
16
  const SELECTOR_NAVSCROLL = '[data-bs-navscroll]' //'.it-navscroll-wrapper'
22
17
  const SELECTOR_LIST = 'ul.link-list'
23
- //const SELECTOR_ITEM = '.nav-item'
24
18
  const SELECTOR_LINK_CONTAINER = 'li.nav-link, li.nav-item'
25
19
  const SELECTOR_LINK = 'a.nav-link'
26
20
  const SELECTOR_LINK_ACTIVE = `${SELECTOR_LINK}.${CLASS_NAME_ACTIVE}`
@@ -64,11 +58,9 @@ class NavScroll extends BaseComponent {
64
58
  }
65
59
 
66
60
  dispose() {
67
- //EventHandler.off(window, EVENT_SCROLL, this._onScroll)
68
61
  if (this._scrollCb) {
69
62
  this._scrollCb.dispose()
70
63
  }
71
-
72
64
  super.dispose()
73
65
  }
74
66
 
@@ -83,8 +75,6 @@ class NavScroll extends BaseComponent {
83
75
  }
84
76
 
85
77
  _bindEvents() {
86
- //EventHandler.on(window, EVENT_SCROLL, this._onScroll)
87
-
88
78
  this._scrollCb = onDocumentScroll(() => this._onScroll())
89
79
 
90
80
  if (this._collapsible) {
@@ -103,11 +93,12 @@ class NavScroll extends BaseComponent {
103
93
  }
104
94
  })
105
95
  })
106
-
107
- EventHandler.on(window, 'load', () => {
108
- //if page is already scrolled
109
- setTimeout(() => this._onScroll(), 150)
110
- })
96
+ if (typeof window !== 'undefined' && typeof document !== 'undefined') {
97
+ EventHandler.on(window, 'load', () => {
98
+ //if page is already scrolled
99
+ setTimeout(() => this._onScroll(), 150)
100
+ })
101
+ }
111
102
  }
112
103
 
113
104
  _onCollapseOpened() {
@@ -247,9 +238,11 @@ class NavScroll extends BaseComponent {
247
238
  * ------------------------------------------------------------------------
248
239
  */
249
240
 
250
- const navs = SelectorEngine.find(SELECTOR_NAVSCROLL)
251
- navs.map((nav) => {
252
- NavScroll.getOrCreateInstance(nav)
253
- })
241
+ if (typeof window !== 'undefined' && typeof document !== 'undefined') {
242
+ const navs = SelectorEngine.find(SELECTOR_NAVSCROLL)
243
+ navs.map((nav) => {
244
+ NavScroll.getOrCreateInstance(nav)
245
+ })
246
+ }
254
247
 
255
248
  export default NavScroll
@@ -1,8 +1,16 @@
1
- import BaseComponent from 'bootstrap/js/src/base-component.js'
2
- import { getElementFromSelector, isVisible, reflow } from 'bootstrap/js/src/util'
3
- import Manipulator from 'bootstrap/js/src/dom/manipulator'
4
- import EventHandler from 'bootstrap/js/src/dom/event-handler'
5
- import { enableDismissTrigger } from 'bootstrap/js/src/util/component-functions'
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'
10
+ import { getElementFromSelector, isVisible, reflow } from './util/index'
11
+ import Manipulator from './dom/manipulator'
12
+ import EventHandler from './dom/event-handler'
13
+ import { enableDismissTrigger } from './util/component-functions'
6
14
 
7
15
  const NAME = 'notification'
8
16
  const DATA_KEY = 'bs.notification'
@@ -155,31 +163,33 @@ class Notification extends BaseComponent {
155
163
  * ------------------------------------------------------------------------
156
164
  */
157
165
 
158
- EventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
159
- const target = getElementFromSelector(this)
160
-
161
- if (['A', 'AREA'].includes(this.tagName)) {
162
- event.preventDefault()
163
- }
166
+ if (typeof window !== 'undefined' && typeof document !== 'undefined') {
167
+ EventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
168
+ const target = getElementFromSelector(this)
164
169
 
165
- EventHandler.one(target, EVENT_SHOW, (showEvent) => {
166
- if (showEvent.defaultPrevented) {
167
- // only register focus restorer if modal will actually get shown
168
- return
170
+ if (['A', 'AREA'].includes(this.tagName)) {
171
+ event.preventDefault()
169
172
  }
170
173
 
171
- EventHandler.one(target, EVENT_HIDDEN, () => {
172
- if (isVisible(this)) {
173
- this.focus()
174
+ EventHandler.one(target, EVENT_SHOW, (showEvent) => {
175
+ if (showEvent.defaultPrevented) {
176
+ // only register focus restorer if modal will actually get shown
177
+ return
174
178
  }
179
+
180
+ EventHandler.one(target, EVENT_HIDDEN, () => {
181
+ if (isVisible(this)) {
182
+ this.focus()
183
+ }
184
+ })
175
185
  })
176
- })
177
186
 
178
- const data = Notification.getOrCreateInstance(target)
187
+ const data = Notification.getOrCreateInstance(target)
179
188
 
180
- data.toggle(this)
181
- })
189
+ data.toggle(this)
190
+ })
182
191
 
183
- enableDismissTrigger(Notification)
192
+ enableDismissTrigger(Notification)
193
+ }
184
194
 
185
195
  export default Notification
@@ -1,5 +1,261 @@
1
- import { default as BSOffcanvas } from 'bootstrap/js/src/offcanvas'
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): offcanvas.js
8
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
9
+ * --------------------------------------------------------------------------
10
+ */
2
11
 
3
- class Offcanvas extends BSOffcanvas {}
12
+ import { getElementFromSelector, isDisabled, isVisible } from './util/index'
13
+ import ScrollBarHelper from './util/scrollbar'
14
+ import EventHandler from './dom/event-handler'
15
+ import BaseComponent from './base-component'
16
+ import SelectorEngine from './dom/selector-engine'
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 = 'offcanvas'
26
+ const DATA_KEY = 'bs.offcanvas'
27
+ const EVENT_KEY = `.${DATA_KEY}`
28
+ const DATA_API_KEY = '.data-api'
29
+ const EVENT_LOAD_DATA_API = `load${EVENT_KEY}${DATA_API_KEY}`
30
+ const ESCAPE_KEY = 'Escape'
31
+
32
+ const CLASS_NAME_SHOW = 'show'
33
+ const CLASS_NAME_SHOWING = 'showing'
34
+ const CLASS_NAME_HIDING = 'hiding'
35
+ const CLASS_NAME_BACKDROP = 'offcanvas-backdrop'
36
+ const OPEN_SELECTOR = '.offcanvas.show'
37
+
38
+ const EVENT_SHOW = `show${EVENT_KEY}`
39
+ const EVENT_SHOWN = `shown${EVENT_KEY}`
40
+ const EVENT_HIDE = `hide${EVENT_KEY}`
41
+ const EVENT_HIDE_PREVENTED = `hidePrevented${EVENT_KEY}`
42
+ const EVENT_HIDDEN = `hidden${EVENT_KEY}`
43
+ const EVENT_RESIZE = `resize${EVENT_KEY}`
44
+ const EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`
45
+ const EVENT_KEYDOWN_DISMISS = `keydown.dismiss${EVENT_KEY}`
46
+
47
+ const SELECTOR_DATA_TOGGLE = '[data-bs-toggle="offcanvas"]'
48
+
49
+ const Default = {
50
+ backdrop: true,
51
+ keyboard: true,
52
+ scroll: false,
53
+ }
54
+
55
+ const DefaultType = {
56
+ backdrop: '(boolean|string)',
57
+ keyboard: 'boolean',
58
+ scroll: 'boolean',
59
+ }
60
+
61
+ /**
62
+ * Class definition
63
+ */
64
+
65
+ class Offcanvas extends BaseComponent {
66
+ constructor(element, config) {
67
+ super(element, config)
68
+
69
+ this._isShown = false
70
+ this._backdrop = this._initializeBackDrop()
71
+ this._focustrap = this._initializeFocusTrap()
72
+ this._addEventListeners()
73
+ }
74
+
75
+ // Getters
76
+ static get Default() {
77
+ return Default
78
+ }
79
+
80
+ static get DefaultType() {
81
+ return DefaultType
82
+ }
83
+
84
+ static get NAME() {
85
+ return NAME
86
+ }
87
+
88
+ // Public
89
+ toggle(relatedTarget) {
90
+ return this._isShown ? this.hide() : this.show(relatedTarget)
91
+ }
92
+
93
+ show(relatedTarget) {
94
+ if (this._isShown) {
95
+ return
96
+ }
97
+
98
+ const showEvent = EventHandler.trigger(this._element, EVENT_SHOW, { relatedTarget })
99
+
100
+ if (showEvent.defaultPrevented) {
101
+ return
102
+ }
103
+
104
+ this._isShown = true
105
+ this._backdrop.show()
106
+
107
+ if (!this._config.scroll) {
108
+ new ScrollBarHelper().hide()
109
+ }
110
+
111
+ this._element.setAttribute('aria-modal', true)
112
+ this._element.setAttribute('role', 'dialog')
113
+ this._element.classList.add(CLASS_NAME_SHOWING)
114
+
115
+ const completeCallBack = () => {
116
+ if (!this._config.scroll || this._config.backdrop) {
117
+ this._focustrap.activate()
118
+ }
119
+
120
+ this._element.classList.add(CLASS_NAME_SHOW)
121
+ this._element.classList.remove(CLASS_NAME_SHOWING)
122
+ EventHandler.trigger(this._element, EVENT_SHOWN, { relatedTarget })
123
+ }
124
+
125
+ this._queueCallback(completeCallBack, this._element, true)
126
+ }
127
+
128
+ hide() {
129
+ if (!this._isShown) {
130
+ return
131
+ }
132
+
133
+ const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE)
134
+
135
+ if (hideEvent.defaultPrevented) {
136
+ return
137
+ }
138
+
139
+ this._focustrap.deactivate()
140
+ this._element.blur()
141
+ this._isShown = false
142
+ this._element.classList.add(CLASS_NAME_HIDING)
143
+ this._backdrop.hide()
144
+
145
+ const completeCallback = () => {
146
+ this._element.classList.remove(CLASS_NAME_SHOW, CLASS_NAME_HIDING)
147
+ this._element.removeAttribute('aria-modal')
148
+ this._element.removeAttribute('role')
149
+
150
+ if (!this._config.scroll) {
151
+ new ScrollBarHelper().reset()
152
+ }
153
+
154
+ EventHandler.trigger(this._element, EVENT_HIDDEN)
155
+ }
156
+
157
+ this._queueCallback(completeCallback, this._element, true)
158
+ }
159
+
160
+ dispose() {
161
+ this._backdrop.dispose()
162
+ this._focustrap.deactivate()
163
+ super.dispose()
164
+ }
165
+
166
+ // Private
167
+ _initializeBackDrop() {
168
+ const clickCallback = () => {
169
+ if (this._config.backdrop === 'static') {
170
+ EventHandler.trigger(this._element, EVENT_HIDE_PREVENTED)
171
+ return
172
+ }
173
+
174
+ this.hide()
175
+ }
176
+
177
+ // 'static' option will be translated to true, and booleans will keep their value
178
+ const isVisible = Boolean(this._config.backdrop)
179
+
180
+ return new Backdrop({
181
+ className: CLASS_NAME_BACKDROP,
182
+ isVisible,
183
+ isAnimated: true,
184
+ rootElement: this._element.parentNode,
185
+ clickCallback: isVisible ? clickCallback : null,
186
+ })
187
+ }
188
+
189
+ _initializeFocusTrap() {
190
+ return new FocusTrap({
191
+ trapElement: this._element,
192
+ })
193
+ }
194
+
195
+ _addEventListeners() {
196
+ EventHandler.on(this._element, EVENT_KEYDOWN_DISMISS, (event) => {
197
+ if (event.key !== ESCAPE_KEY) {
198
+ return
199
+ }
200
+
201
+ if (!this._config.keyboard) {
202
+ EventHandler.trigger(this._element, EVENT_HIDE_PREVENTED)
203
+ return
204
+ }
205
+
206
+ this.hide()
207
+ })
208
+ }
209
+ }
210
+
211
+ /**
212
+ * Data API implementation
213
+ */
214
+
215
+ if (typeof window !== 'undefined' && typeof document !== 'undefined') {
216
+ EventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {
217
+ const target = getElementFromSelector(this)
218
+
219
+ if (['A', 'AREA'].includes(this.tagName)) {
220
+ event.preventDefault()
221
+ }
222
+
223
+ if (isDisabled(this)) {
224
+ return
225
+ }
226
+
227
+ EventHandler.one(target, EVENT_HIDDEN, () => {
228
+ // focus on trigger when it is closed
229
+ if (isVisible(this)) {
230
+ this.focus()
231
+ }
232
+ })
233
+
234
+ // avoid conflict when clicking a toggler of an offcanvas, while another is open
235
+ const alreadyOpen = SelectorEngine.findOne(OPEN_SELECTOR)
236
+ if (alreadyOpen && alreadyOpen !== target) {
237
+ Offcanvas.getInstance(alreadyOpen).hide()
238
+ }
239
+
240
+ const data = Offcanvas.getOrCreateInstance(target)
241
+ data.toggle(this)
242
+ })
243
+
244
+ EventHandler.on(window, EVENT_LOAD_DATA_API, () => {
245
+ for (const selector of SelectorEngine.find(OPEN_SELECTOR)) {
246
+ Offcanvas.getOrCreateInstance(selector).show()
247
+ }
248
+ })
249
+
250
+ EventHandler.on(window, EVENT_RESIZE, () => {
251
+ for (const element of SelectorEngine.find('[aria-modal][class*=show][class*=offcanvas-]')) {
252
+ if (getComputedStyle(element).position !== 'fixed') {
253
+ Offcanvas.getOrCreateInstance(element).hide()
254
+ }
255
+ }
256
+ })
257
+
258
+ enableDismissTrigger(Offcanvas)
259
+ }
4
260
 
5
261
  export default Offcanvas
@@ -1,5 +1,78 @@
1
- import { default as BSPopover } from 'bootstrap/js/src/popover'
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): popover.js
8
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
9
+ * --------------------------------------------------------------------------
10
+ */
2
11
 
3
- class Popover extends BSPopover {}
12
+ import Tooltip from './tooltip'
13
+
14
+ /**
15
+ * Constants
16
+ */
17
+
18
+ const NAME = 'popover'
19
+
20
+ const SELECTOR_TITLE = '.popover-header'
21
+ const SELECTOR_CONTENT = '.popover-body'
22
+
23
+ const Default = {
24
+ ...Tooltip.Default,
25
+ content: '',
26
+ offset: [0, 8],
27
+ placement: 'right',
28
+ template:
29
+ '<div class="popover" role="tooltip">' +
30
+ '<div class="popover-arrow"></div>' +
31
+ '<h3 class="popover-header"></h3>' +
32
+ '<div class="popover-body"></div>' +
33
+ '</div>',
34
+ trigger: 'click',
35
+ }
36
+
37
+ const DefaultType = {
38
+ ...Tooltip.DefaultType,
39
+ content: '(null|string|element|function)',
40
+ }
41
+
42
+ /**
43
+ * Class definition
44
+ */
45
+
46
+ class Popover extends Tooltip {
47
+ // Getters
48
+ static get Default() {
49
+ return Default
50
+ }
51
+
52
+ static get DefaultType() {
53
+ return DefaultType
54
+ }
55
+
56
+ static get NAME() {
57
+ return NAME
58
+ }
59
+
60
+ // Overrides
61
+ _isWithContent() {
62
+ return this._getTitle() || this._getContent()
63
+ }
64
+
65
+ // Private
66
+ _getContentForTemplate() {
67
+ return {
68
+ [SELECTOR_TITLE]: this._getTitle(),
69
+ [SELECTOR_CONTENT]: this._getContent(),
70
+ }
71
+ }
72
+
73
+ _getContent() {
74
+ return this._resolvePossibleFunction(this._config.content)
75
+ }
76
+ }
4
77
 
5
78
  export default Popover
@@ -1,15 +1,17 @@
1
- import ProgressBar from 'progressbar.js'
2
- 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
+ */
3
8
 
4
- //import EventHandler from 'bootstrap/js/src/dom/event-handler'
5
- import SelectorEngine from 'bootstrap/js/src/dom/selector-engine'
6
- import Manipulator from 'bootstrap/js/src/dom/manipulator'
9
+ import Circle from 'progressbar.js/src/circle.js'
10
+ import BaseComponent from './base-component.js'
11
+ import SelectorEngine from './dom/selector-engine'
12
+ import Manipulator from './dom/manipulator'
7
13
 
8
14
  const NAME = 'progressdonut'
9
- //const DATA_KEY = 'bs.progressdonut'
10
- //const EVENT_KEY = `.${DATA_KEY}`
11
- //const DATA_API_KEY = '.data-api'
12
-
13
15
  const SELECTOR_DONUT = '[data-bs-progress-donut]'
14
16
 
15
17
  const Default = {
@@ -89,7 +91,7 @@ class ProgressDonut extends BaseComponent {
89
91
  }
90
92
 
91
93
  _init() {
92
- this._bar = new ProgressBar.Circle(this._element, this._config)
94
+ this._bar = new Circle(this._element, this._config)
93
95
 
94
96
  if (this._config.value > 0) {
95
97
  this.set(this._config.value)
@@ -103,8 +105,10 @@ class ProgressDonut extends BaseComponent {
103
105
  * ------------------------------------------------------------------------
104
106
  */
105
107
 
106
- SelectorEngine.find(SELECTOR_DONUT).forEach((donut) => {
107
- ProgressDonut.getOrCreateInstance(donut)
108
- })
108
+ if (typeof window !== 'undefined' && typeof document !== 'undefined') {
109
+ SelectorEngine.find(SELECTOR_DONUT).forEach((donut) => {
110
+ ProgressDonut.getOrCreateInstance(donut)
111
+ })
112
+ }
109
113
 
110
114
  export default ProgressDonut