@coreui/coreui 4.2.5 → 5.0.0-alpha.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 (205) hide show
  1. package/LICENSE +1 -2
  2. package/README.md +1 -1
  3. package/dist/css/coreui-grid.css +134 -23
  4. package/dist/css/coreui-grid.css.map +1 -1
  5. package/dist/css/coreui-grid.min.css +3 -5
  6. package/dist/css/coreui-grid.min.css.map +1 -1
  7. package/dist/css/coreui-grid.rtl.css +217 -114
  8. package/dist/css/coreui-grid.rtl.css.map +1 -1
  9. package/dist/css/coreui-grid.rtl.min.css +3 -11
  10. package/dist/css/coreui-grid.rtl.min.css.map +1 -1
  11. package/dist/css/coreui-reboot.css +152 -37
  12. package/dist/css/coreui-reboot.css.map +1 -1
  13. package/dist/css/coreui-reboot.min.css +3 -5
  14. package/dist/css/coreui-reboot.min.css.map +1 -1
  15. package/dist/css/coreui-reboot.rtl.css +160 -48
  16. package/dist/css/coreui-reboot.rtl.css.map +1 -1
  17. package/dist/css/coreui-reboot.rtl.min.css +3 -11
  18. package/dist/css/coreui-reboot.rtl.min.css.map +1 -1
  19. package/dist/css/coreui-utilities.css +1117 -105
  20. package/dist/css/coreui-utilities.css.map +1 -1
  21. package/dist/css/coreui-utilities.min.css +3 -5
  22. package/dist/css/coreui-utilities.min.css.map +1 -1
  23. package/dist/css/coreui-utilities.rtl.css +1262 -247
  24. package/dist/css/coreui-utilities.rtl.css.map +1 -1
  25. package/dist/css/coreui-utilities.rtl.min.css +3 -11
  26. package/dist/css/coreui-utilities.rtl.min.css.map +1 -1
  27. package/dist/css/coreui.css +2415 -1223
  28. package/dist/css/coreui.css.map +1 -1
  29. package/dist/css/coreui.min.css +3 -5
  30. package/dist/css/coreui.min.css.map +1 -1
  31. package/dist/css/coreui.rtl.css +2822 -1575
  32. package/dist/css/coreui.rtl.css.map +1 -1
  33. package/dist/css/coreui.rtl.min.css +3 -11
  34. package/dist/css/coreui.rtl.min.css.map +1 -1
  35. package/dist/js/coreui.bundle.js +80 -80
  36. package/dist/js/coreui.bundle.js.map +1 -1
  37. package/dist/js/coreui.bundle.min.js +4 -4
  38. package/dist/js/coreui.bundle.min.js.map +1 -1
  39. package/dist/js/coreui.esm.js +78 -78
  40. package/dist/js/coreui.esm.js.map +1 -1
  41. package/dist/js/coreui.esm.min.js +4 -4
  42. package/dist/js/coreui.esm.min.js.map +1 -1
  43. package/dist/js/coreui.js +80 -80
  44. package/dist/js/coreui.js.map +1 -1
  45. package/dist/js/coreui.min.js +4 -4
  46. package/dist/js/coreui.min.js.map +1 -1
  47. package/js/dist/alert.js +5 -5
  48. package/js/dist/alert.js.map +1 -1
  49. package/js/dist/base-component.js +6 -6
  50. package/js/dist/base-component.js.map +1 -1
  51. package/js/dist/button.js +5 -5
  52. package/js/dist/button.js.map +1 -1
  53. package/js/dist/carousel.js +5 -5
  54. package/js/dist/carousel.js.map +1 -1
  55. package/js/dist/collapse.js +5 -5
  56. package/js/dist/collapse.js.map +1 -1
  57. package/js/dist/dom/data.js +6 -6
  58. package/js/dist/dom/data.js.map +1 -1
  59. package/js/dist/dom/event-handler.js +6 -6
  60. package/js/dist/dom/event-handler.js.map +1 -1
  61. package/js/dist/dom/manipulator.js +7 -7
  62. package/js/dist/dom/manipulator.js.map +1 -1
  63. package/js/dist/dom/selector-engine.js +6 -6
  64. package/js/dist/dom/selector-engine.js.map +1 -1
  65. package/js/dist/dropdown.js +7 -7
  66. package/js/dist/dropdown.js.map +1 -1
  67. package/js/dist/modal.js +5 -5
  68. package/js/dist/modal.js.map +1 -1
  69. package/js/dist/navigation.js +5 -5
  70. package/js/dist/navigation.js.map +1 -1
  71. package/js/dist/offcanvas.js +6 -6
  72. package/js/dist/offcanvas.js.map +1 -1
  73. package/js/dist/popover.js +5 -5
  74. package/js/dist/popover.js.map +1 -1
  75. package/js/dist/scrollspy.js +12 -12
  76. package/js/dist/scrollspy.js.map +1 -1
  77. package/js/dist/sidebar.js +5 -5
  78. package/js/dist/sidebar.js.map +1 -1
  79. package/js/dist/tab.js +5 -5
  80. package/js/dist/tab.js.map +1 -1
  81. package/js/dist/toast.js +5 -5
  82. package/js/dist/toast.js.map +1 -1
  83. package/js/dist/tooltip.js +6 -6
  84. package/js/dist/tooltip.js.map +1 -1
  85. package/js/dist/util/backdrop.js +6 -6
  86. package/js/dist/util/backdrop.js.map +1 -1
  87. package/js/dist/util/component-functions.js +6 -6
  88. package/js/dist/util/component-functions.js.map +1 -1
  89. package/js/dist/util/config.js +6 -6
  90. package/js/dist/util/config.js.map +1 -1
  91. package/js/dist/util/focustrap.js +6 -6
  92. package/js/dist/util/focustrap.js.map +1 -1
  93. package/js/dist/util/index.js +6 -6
  94. package/js/dist/util/index.js.map +1 -1
  95. package/js/dist/util/sanitizer.js +6 -6
  96. package/js/dist/util/sanitizer.js.map +1 -1
  97. package/js/dist/util/scrollbar.js +6 -6
  98. package/js/dist/util/scrollbar.js.map +1 -1
  99. package/js/dist/util/swipe.js +6 -6
  100. package/js/dist/util/swipe.js.map +1 -1
  101. package/js/dist/util/template-factory.js +6 -6
  102. package/js/dist/util/template-factory.js.map +1 -1
  103. package/js/src/alert.js +2 -2
  104. package/js/src/base-component.js +3 -3
  105. package/js/src/button.js +2 -3
  106. package/js/src/carousel.js +2 -2
  107. package/js/src/collapse.js +2 -2
  108. package/js/src/dom/data.js +3 -3
  109. package/js/src/dom/event-handler.js +3 -3
  110. package/js/src/dom/manipulator.js +4 -4
  111. package/js/src/dom/selector-engine.js +3 -3
  112. package/js/src/dropdown.js +4 -4
  113. package/js/src/modal.js +2 -2
  114. package/js/src/navigation.js +2 -2
  115. package/js/src/offcanvas.js +3 -3
  116. package/js/src/popover.js +2 -2
  117. package/js/src/scrollspy.js +6 -6
  118. package/js/src/sidebar.js +2 -2
  119. package/js/src/tab.js +2 -2
  120. package/js/src/toast.js +2 -2
  121. package/js/src/tooltip.js +3 -3
  122. package/js/src/util/backdrop.js +3 -3
  123. package/js/src/util/component-functions.js +3 -3
  124. package/js/src/util/config.js +3 -3
  125. package/js/src/util/focustrap.js +3 -3
  126. package/js/src/util/index.js +3 -3
  127. package/js/src/util/sanitizer.js +3 -3
  128. package/js/src/util/scrollbar.js +3 -3
  129. package/js/src/util/swipe.js +3 -3
  130. package/js/src/util/template-factory.js +4 -3
  131. package/package.json +9 -6
  132. package/scss/_accordion.scss +9 -1
  133. package/scss/_alert.scss +9 -13
  134. package/scss/_avatar.scss +4 -4
  135. package/scss/_badge.scss +1 -10
  136. package/scss/_breadcrumb.scss +4 -9
  137. package/scss/_button-group.scss +4 -4
  138. package/scss/_buttons.scss +70 -15
  139. package/scss/_callout.scss +2 -2
  140. package/scss/_card.scss +7 -3
  141. package/scss/_carousel.scss +17 -7
  142. package/scss/_close.scss +30 -9
  143. package/scss/_dropdown.scss +9 -9
  144. package/scss/_functions.scss +6 -81
  145. package/scss/_images.scss +3 -3
  146. package/scss/_list-group.scss +22 -6
  147. package/scss/_maps.scss +71 -0
  148. package/scss/_mixins.scss +4 -9
  149. package/scss/_modal.scss +2 -2
  150. package/scss/_nav.scss +41 -4
  151. package/scss/_navbar.scss +14 -3
  152. package/scss/_offcanvas.scss +12 -10
  153. package/scss/_pagination.scss +2 -2
  154. package/scss/_progress.scss +10 -44
  155. package/scss/_reboot.scss +22 -21
  156. package/scss/_root.scss +134 -7
  157. package/scss/_sidebar.scss +11 -0
  158. package/scss/_tables.scss +1 -5
  159. package/scss/_toasts.scss +2 -2
  160. package/scss/_tooltip.scss +10 -10
  161. package/scss/_type.scss +3 -1
  162. package/scss/_utilities.scss +160 -53
  163. package/scss/_variables-dark.scss +109 -0
  164. package/scss/_variables.scss +402 -538
  165. package/scss/coreui-grid.scss +4 -8
  166. package/scss/coreui-reboot.scss +4 -7
  167. package/scss/coreui-utilities.scss +3 -7
  168. package/scss/coreui.scss +5 -10
  169. package/scss/forms/_floating-labels.scss +16 -1
  170. package/scss/forms/_form-check.scss +30 -53
  171. package/scss/forms/_form-control.scss +18 -11
  172. package/scss/forms/_form-range.scss +8 -8
  173. package/scss/forms/_form-select.scss +24 -14
  174. package/scss/forms/_form-text.scss +1 -1
  175. package/scss/forms/_input-group.scss +5 -5
  176. package/scss/forms/_labels.scss +2 -2
  177. package/scss/helpers/_colored-links.scss +2 -2
  178. package/scss/helpers/_ratio.scss +1 -1
  179. package/scss/helpers/_vr.scss +0 -1
  180. package/scss/mixins/_alert.scss +4 -1
  181. package/scss/mixins/_banner.scss +7 -0
  182. package/scss/mixins/_border-radius.scss +7 -7
  183. package/scss/mixins/_breakpoints.scss +0 -13
  184. package/scss/mixins/_buttons.scss +49 -53
  185. package/scss/mixins/_caret.scss +31 -26
  186. package/scss/mixins/_color-mode.scss +21 -0
  187. package/scss/mixins/_forms.scss +15 -14
  188. package/scss/mixins/_grid.scss +2 -2
  189. package/scss/mixins/_list-group.scss +22 -11
  190. package/scss/mixins/_lists.scss +1 -1
  191. package/scss/mixins/_utilities.scss +29 -14
  192. package/scss/sidebar/_sidebar-narrow.scss +6 -6
  193. package/scss/sidebar/_sidebar-nav.scss +4 -4
  194. package/scss/sidebar/_sidebar.scss +20 -20
  195. package/scss/tests/mixins/_color-modes.test.scss +69 -0
  196. package/scss/tests/mixins/_utilities.test.scss +393 -0
  197. package/scss/tests/utilities/_api.test.scss +75 -0
  198. package/scss/_header.scss +0 -195
  199. package/scss/_subheader.scss +0 -72
  200. package/scss/coreui-grid.rtl.scss +0 -12
  201. package/scss/coreui-reboot.rtl.scss +0 -12
  202. package/scss/coreui-utilities.rtl.scss +0 -12
  203. package/scss/coreui.rtl.scss +0 -12
  204. package/scss/mixins/_css-vars.scss +0 -87
  205. package/scss/mixins/_ltr-rtl.scss +0 -87
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * --------------------------------------------------------------------------
3
- * CoreUI (v4.2.5): dropdown.js
4
- * Licensed under MIT (https://coreui.io/license)
3
+ * CoreUI (__COREUI_VERSION__): dropdown.js
4
+ * Licensed under MIT (https://github.com/coreui/coreui/blob/main/LICENSE)
5
5
  *
6
6
  * This component is a modified version of the Bootstrap's dropdown.js
7
7
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
@@ -99,7 +99,7 @@ class Dropdown extends BaseComponent {
99
99
 
100
100
  this._popper = null
101
101
  this._parent = this._element.parentNode // dropdown wrapper
102
- // todo: v6 revert #37011 & change markup https://getbootstrap.com/docs/5.2/forms/input-group/
102
+ // todo: v6 revert #37011 & change markup https://getbootstrap.com/docs/5.3/forms/input-group/
103
103
  this._menu = SelectorEngine.next(this._element, SELECTOR_MENU)[0] ||
104
104
  SelectorEngine.prev(this._element, SELECTOR_MENU)[0] ||
105
105
  SelectorEngine.findOne(SELECTOR_MENU, this._parent)
@@ -412,7 +412,7 @@ class Dropdown extends BaseComponent {
412
412
 
413
413
  event.preventDefault()
414
414
 
415
- // todo: v6 revert #37011 & change markup https://getbootstrap.com/docs/5.2/forms/input-group/
415
+ // todo: v6 revert #37011 & change markup https://getbootstrap.com/docs/5.3/forms/input-group/
416
416
  const getToggleButton = this.matches(SELECTOR_DATA_TOGGLE) ?
417
417
  this :
418
418
  (SelectorEngine.prev(this, SELECTOR_DATA_TOGGLE)[0] ||
package/js/src/modal.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * --------------------------------------------------------------------------
3
- * CoreUI (v4.2.5): modal.js
4
- * Licensed under MIT (https://coreui.io/license)
3
+ * CoreUI (__COREUI_VERSION__): modal.js
4
+ * Licensed under MIT (https://github.com/coreui/coreui/blob/main/LICENSE)
5
5
  *
6
6
  * This component is a modified version of the Bootstrap's modal.js
7
7
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * --------------------------------------------------------------------------
3
- * CoreUI (v4.2.5): navigation.js
4
- * Licensed under MIT (https://coreui.io/license)
3
+ * CoreUI (__COREUI_VERSION__): navigation.js
4
+ * Licensed under MIT (https://github.com/coreui/coreui/blob/main/LICENSE)
5
5
  * --------------------------------------------------------------------------
6
6
  */
7
7
 
@@ -1,10 +1,10 @@
1
1
  /**
2
2
  * --------------------------------------------------------------------------
3
- * CoreUI (v4.2.5): dropdown.js
4
- * Licensed under MIT (https://coreui.io/license)
3
+ * CoreUI (__COREUI_VERSION__): offcanvas.js
4
+ * Licensed under MIT (https://github.com/coreui/coreui/blob/main/LICENSE)
5
5
  *
6
6
  * This component is a modified version of the Bootstrap's offcanvas.js
7
- * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
7
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
8
8
  * --------------------------------------------------------------------------
9
9
  */
10
10
 
package/js/src/popover.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * --------------------------------------------------------------------------
3
- * CoreUI (v4.2.5): popover.js
4
- * Licensed under MIT (https://coreui.io/license)
3
+ * CoreUI (__COREUI_VERSION__): popover.js
4
+ * Licensed under MIT (https://github.com/coreui/coreui/blob/main/LICENSE)
5
5
  *
6
6
  * This component is a modified version of the Bootstrap's popover.js
7
7
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
@@ -1,17 +1,17 @@
1
1
  /**
2
2
  * --------------------------------------------------------------------------
3
- * CoreUI (v4.2.5): scrollspy.js
4
- * Licensed under MIT (https://coreui.io/license)
3
+ * CoreUI (__COREUI_VERSION__): scrollspy.js
4
+ * Licensed under MIT (https://github.com/coreui/coreui/blob/main/LICENSE)
5
5
  *
6
6
  * This component is a modified version of the Bootstrap's scrollspy.js
7
7
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
8
8
  * --------------------------------------------------------------------------
9
9
  */
10
10
 
11
- import { defineJQueryPlugin, getElement, isDisabled, isVisible } from './util/index'
12
- import EventHandler from './dom/event-handler'
13
- import SelectorEngine from './dom/selector-engine'
14
- import BaseComponent from './base-component'
11
+ import { defineJQueryPlugin, getElement, isDisabled, isVisible } from './util/index.js'
12
+ import EventHandler from './dom/event-handler.js'
13
+ import SelectorEngine from './dom/selector-engine.js'
14
+ import BaseComponent from './base-component.js'
15
15
 
16
16
  /**
17
17
  * Constants
package/js/src/sidebar.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * --------------------------------------------------------------------------
3
- * CoreUI (v4.2.5): sidebar.js
4
- * Licensed under MIT (https://coreui.io/license)
3
+ * CoreUI (__COREUI_VERSION__): sidebar.js
4
+ * Licensed under MIT (https://github.com/coreui/coreui/blob/main/LICENSE)
5
5
  * --------------------------------------------------------------------------
6
6
  */
7
7
 
package/js/src/tab.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * --------------------------------------------------------------------------
3
- * CoreUI (v4.2.5): tab.js
4
- * Licensed under MIT (https://coreui.io/license)
3
+ * CoreUI (__COREUI_VERSION__): tab.js
4
+ * Licensed under MIT (https://github.com/coreui/coreui/blob/main/LICENSE)
5
5
  *
6
6
  * This component is a modified version of the Bootstrap's tab.js
7
7
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
package/js/src/toast.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * --------------------------------------------------------------------------
3
- * CoreUI (v4.2.5): toast.js
4
- * Licensed under MIT (https://coreui.io/license)
3
+ * CoreUI (__COREUI_VERSION__): toast.js
4
+ * Licensed under MIT (https://github.com/coreui/coreui/blob/main/LICENSE)
5
5
  *
6
6
  * This component is a modified version of the Bootstrap's toast.js
7
7
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
package/js/src/tooltip.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * --------------------------------------------------------------------------
3
- * CoreUI (v4.2.5): tooltip.js
4
- * Licensed under MIT (https://coreui.io/license)
3
+ * CoreUI (__COREUI_VERSION__): tooltip.js
4
+ * Licensed under MIT (https://github.com/coreui/coreui/blob/main/LICENSE)
5
5
  *
6
6
  * This component is a modified version of the Bootstrap's tooltip.js
7
7
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
@@ -312,7 +312,7 @@ class Tooltip extends BaseComponent {
312
312
 
313
313
  tip.classList.remove(CLASS_NAME_FADE, CLASS_NAME_SHOW)
314
314
  // todo: on v6 the following can be achieved with CSS only
315
- tip.classList.add(`bs-${this.constructor.NAME}-auto`)
315
+ tip.classList.add(`cui-${this.constructor.NAME}-auto`)
316
316
 
317
317
  const tipId = getUID(this.constructor.NAME).toString()
318
318
 
@@ -1,9 +1,9 @@
1
1
  /**
2
2
  * --------------------------------------------------------------------------
3
- * CoreUI (v4.2.5): tab.js
4
- * Licensed under MIT (https://coreui.io/license)
3
+ * CoreUI (__COREUI_VERSION__): util/backdrop.js
4
+ * Licensed under MIT (https://github.com/coreui/coreui/blob/main/LICENSE)
5
5
  *
6
- * This is a modified version of the Bootstrap's util/backdrop.js
6
+ * This component is a modified version of the Bootstrap's util/backdrop.js
7
7
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
8
8
  * --------------------------------------------------------------------------
9
9
  */
@@ -1,9 +1,9 @@
1
1
  /**
2
2
  * --------------------------------------------------------------------------
3
- * CoreUI (v4.2.5): tab.js
4
- * Licensed under MIT (https://coreui.io/license)
3
+ * CoreUI (__COREUI_VERSION__): util/component-functions.js
4
+ * Licensed under MIT (https://github.com/coreui/coreui/blob/main/LICENSE)
5
5
  *
6
- * This is a modified version of the Bootstrap's util/component-functions.js
6
+ * This component is a modified version of the Bootstrap's util/component-functions.js
7
7
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
8
8
  * --------------------------------------------------------------------------
9
9
  */
@@ -1,9 +1,9 @@
1
1
  /**
2
2
  * --------------------------------------------------------------------------
3
- * CoreUI (v4.2.5): tab.js
4
- * Licensed under MIT (https://coreui.io/license)
3
+ * CoreUI (__COREUI_VERSION__): util/config.js
4
+ * Licensed under MIT (https://github.com/coreui/coreui/blob/main/LICENSE)
5
5
  *
6
- * This is a modified version of the Bootstrap's util/config.js
6
+ * This component is a modified version of the Bootstrap's util/config.js
7
7
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
8
8
  * --------------------------------------------------------------------------
9
9
  */
@@ -1,9 +1,9 @@
1
1
  /**
2
2
  * --------------------------------------------------------------------------
3
- * CoreUI (v4.2.5): tab.js
4
- * Licensed under MIT (https://coreui.io/license)
3
+ * CoreUI (__COREUI_VERSION__): util/focustrap.js
4
+ * Licensed under MIT (https://github.com/coreui/coreui/blob/main/LICENSE)
5
5
  *
6
- * This is a modified version of the Bootstrap's util/focustrap.js
6
+ * This component is a modified version of the Bootstrap's util/focustrap.js
7
7
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
8
8
  * --------------------------------------------------------------------------
9
9
  */
@@ -1,9 +1,9 @@
1
1
  /**
2
2
  * --------------------------------------------------------------------------
3
- * CoreUI (v4.2.5): tab.js
4
- * Licensed under MIT (https://coreui.io/license)
3
+ * CoreUI (__COREUI_VERSION__): util/index.js
4
+ * Licensed under MIT (https://github.com/coreui/coreui/blob/main/LICENSE)
5
5
  *
6
- * This is a modified version of the Bootstrap's util/index.js
6
+ * This component is a modified version of the Bootstrap's util/index.js
7
7
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
8
8
  * --------------------------------------------------------------------------
9
9
  */
@@ -1,9 +1,9 @@
1
1
  /**
2
2
  * --------------------------------------------------------------------------
3
- * CoreUI (v4.2.5): tab.js
4
- * Licensed under MIT (https://coreui.io/license)
3
+ * CoreUI (__COREUI_VERSION__): util/sanitizer.js
4
+ * Licensed under MIT (https://github.com/coreui/coreui/blob/main/LICENSE)
5
5
  *
6
- * This is a modified version of the Bootstrap's util/sanitizer.js
6
+ * This component is a modified version of the Bootstrap's util/sanitizer.js
7
7
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
8
8
  * --------------------------------------------------------------------------
9
9
  */
@@ -1,9 +1,9 @@
1
1
  /**
2
2
  * --------------------------------------------------------------------------
3
- * CoreUI (v4.2.5): tab.js
4
- * Licensed under MIT (https://coreui.io/license)
3
+ * CoreUI (__COREUI_VERSION__): util/scrollBar.js
4
+ * Licensed under MIT (https://github.com/coreui/coreui/blob/main/LICENSE)
5
5
  *
6
- * This is a modified version of the Bootstrap's util/scrollBar.js
6
+ * This component is a modified version of the Bootstrap's util/scrollBar.js
7
7
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
8
8
  * --------------------------------------------------------------------------
9
9
  */
@@ -1,9 +1,9 @@
1
1
  /**
2
2
  * --------------------------------------------------------------------------
3
- * CoreUI (v4.2.5): tab.js
4
- * Licensed under MIT (https://coreui.io/license)
3
+ * CoreUI (__COREUI_VERSION__): util/swipe.js
4
+ * Licensed under MIT (https://github.com/coreui/coreui/blob/main/LICENSE)
5
5
  *
6
- * This is a modified version of the Bootstrap's util/swipe.js
6
+ * This component is a modified version of the Bootstrap's util/swipe.js
7
7
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
8
8
  * --------------------------------------------------------------------------
9
9
  */
@@ -1,9 +1,10 @@
1
+
1
2
  /**
2
3
  * --------------------------------------------------------------------------
3
- * CoreUI (v4.2.5): tab.js
4
- * Licensed under MIT (https://coreui.io/license)
4
+ * CoreUI (__COREUI_VERSION__): util/template-factory.js
5
+ * Licensed under MIT (https://github.com/coreui/coreui/blob/main/LICENSE)
5
6
  *
6
- * This is a modified version of the Bootstrap's util/template-factory.js
7
+ * This component is a modified version of the Bootstrap's util/template-factory.js
7
8
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
8
9
  * --------------------------------------------------------------------------
9
10
  */
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@coreui/coreui",
3
3
  "description": "The most popular front-end framework for developing responsive, mobile-first projects on the web rewritten and maintained by the CoreUI Team",
4
- "version": "4.2.5",
4
+ "version": "5.0.0-alpha.0",
5
5
  "config": {
6
- "version_short": "4.2"
6
+ "version_short": "5.0"
7
7
  },
8
8
  "keywords": [
9
9
  "css",
@@ -19,9 +19,9 @@
19
19
  "scripts": {
20
20
  "start": "npm-run-all --parallel watch docs-serve",
21
21
  "bundlewatch": "bundlewatch --config .bundlewatch.config.json",
22
- "changelog": "auto-changelog --template build/changelog-template.hbs --commit-limit false --package --backfill-limit 0 --starting-version v4.2.5",
23
- "css": "npm-run-all css-compile css-prefix css-minify",
22
+ "css": "npm-run-all css-compile css-prefix css-rtl css-minify",
24
23
  "css-compile": "sass --style expanded --source-map --embed-sources --no-error-css scss/:dist/css/",
24
+ "css-rtl": "cross-env NODE_ENV=RTL postcss --config build/postcss.config.js --dir \"dist/css\" --ext \".rtl.css\" \"dist/css/*.css\" \"!dist/css/*.min.css\" \"!dist/css/*.rtl.css\"",
25
25
  "css-lint": "npm-run-all --aggregate-output --continue-on-error --parallel css-lint-*",
26
26
  "css-lint-stylelint": "stylelint \"**/*.{css,scss}\" --cache --cache-location .cache/.stylelintcache --rd",
27
27
  "css-lint-vars": "fusv scss/ docs/assets/scss/",
@@ -30,6 +30,7 @@
30
30
  "css-minify-rtl": "cleancss -O1 --format breakWith=lf --with-rebase --source-map --source-map-inline-sources --output dist/css/ --batch --batch-suffix \".min\" \"dist/css/*rtl.css\" \"!dist/css/*.min.css\"",
31
31
  "css-prefix": "npm-run-all --aggregate-output --parallel css-prefix-*",
32
32
  "css-prefix-main": "postcss --config build/postcss.config.js --replace \"dist/css/*.css\" \"!dist/css/*.rtl*.css\" \"!dist/css/*.min.css\"",
33
+ "css-test": "jasmine --config=scss/tests/jasmine.js",
33
34
  "js": "npm-run-all js-compile js-minify",
34
35
  "js-compile": "npm-run-all --aggregate-output --parallel js-compile-*",
35
36
  "js-compile-standalone": "rollup --environment BUNDLE:false --config build/rollup.config.js --sourcemap",
@@ -50,14 +51,14 @@
50
51
  "js-test-jquery": "cross-env JQUERY=true npm run js-test-karma",
51
52
  "lint": "npm-run-all --aggregate-output --continue-on-error --parallel js-lint css-lint lockfile-lint",
52
53
  "docs": "npm-run-all docs-build docs-lint",
53
- "docs-build": "hugo --cleanDestinationDir --enableGitInfo",
54
+ "docs-build": "hugo --cleanDestinationDir",
54
55
  "docs-compile": "npm run docs-build",
55
56
  "docs-vnu": "node build/vnu-jar.js",
56
57
  "docs-lint": "npm run docs-vnu",
57
58
  "docs-serve": "hugo server --port 9001 --disableFastRender",
58
59
  "docs-serve-only": "npx sirv-cli _gh_pages --port 9001",
59
60
  "lockfile-lint": "lockfile-lint --allowed-hosts npm --allowed-schemes https: --empty-hostname false --type npm --path package-lock.json",
60
- "update-deps": "ncu -u -x globby,karma-browserstack-launcher,karma-rollup-preprocessor && echo Manually update site/assets/js/vendor",
61
+ "update-deps": "ncu -u -x globby,karma-browserstack-launcher,karma-rollup-preprocessor,terser && echo Manually update docs/assets/js/vendor",
61
62
  "release": "npm-run-all dist release-sri docs-build release-zip*",
62
63
  "release-sri": "node build/generate-sri.js",
63
64
  "release-version": "node build/change-version.js",
@@ -66,7 +67,9 @@
66
67
  "test": "npm-run-all lint dist js-test docs-build docs-lint",
67
68
  "watch": "npm-run-all --parallel watch-*",
68
69
  "watch-css-main": "nodemon --watch scss/ --ext scss --exec \"npm-run-all css-lint css-compile css-prefix\"",
70
+ "watch-css-dist": "nodemon --watch dist/css/ --ext css --ignore \"dist/css/*.rtl.*\" --exec \"npm run css-rtl\"",
69
71
  "watch-css-docs": "nodemon --watch docs/assets/scss/ --ext scss --exec \"npm run css-lint\"",
72
+ "watch-css-test": "nodemon --watch scss/ --ext scss,js --exec \"npm run css-test\"",
70
73
  "watch-js-main": "nodemon --watch js/src/ --ext js --exec \"npm-run-all js-lint js-compile\"",
71
74
  "watch-js-docs": "nodemon --watch docs/assets/js/ --ext js --exec \"npm run js-lint\""
72
75
  },
@@ -13,7 +13,6 @@
13
13
  --#{$prefix}accordion-inner-border-radius: #{$accordion-inner-border-radius};
14
14
  --#{$prefix}accordion-btn-padding-x: #{$accordion-button-padding-x};
15
15
  --#{$prefix}accordion-btn-padding-y: #{$accordion-button-padding-y};
16
- --#{$prefix}accordion-btn-color: #{$accordion-color};
17
16
  --#{$prefix}accordion-btn-color: #{$accordion-button-color};
18
17
  --#{$prefix}accordion-btn-bg: #{$accordion-button-bg};
19
18
  --#{$prefix}accordion-btn-icon: #{escape-svg($accordion-button-icon)};
@@ -148,3 +147,12 @@
148
147
  }
149
148
  }
150
149
  }
150
+
151
+ @if $enable-dark-mode {
152
+ @include color-mode(dark) {
153
+ .accordion-button::after {
154
+ --#{$prefix}accordion-btn-icon: #{escape-svg($accordion-button-icon-dark)};
155
+ --#{$prefix}accordion-btn-active-icon: #{escape-svg($accordion-button-active-icon-dark)};
156
+ }
157
+ }
158
+ }
package/scss/_alert.scss CHANGED
@@ -12,6 +12,7 @@
12
12
  --#{$prefix}alert-border-color: transparent;
13
13
  --#{$prefix}alert-border: #{$alert-border-width} solid var(--#{$prefix}alert-border-color);
14
14
  --#{$prefix}alert-border-radius: #{$alert-border-radius};
15
+ --#{$prefix}alert-link-color: inherit;
15
16
  // scss-docs-end alert-css-vars
16
17
 
17
18
  position: relative;
@@ -41,13 +42,13 @@
41
42
  // Expand the right padding and account for the close button's positioning.
42
43
 
43
44
  .alert-dismissible {
44
- @include ltr-rtl("padding-right", $alert-dismissible-padding-r);
45
+ padding-right: $alert-dismissible-padding-r;
45
46
 
46
47
  // Adjust close link position
47
48
  .btn-close {
48
49
  position: absolute;
49
50
  top: 0;
50
- @include ltr-rtl("right", 0);
51
+ right: 0;
51
52
  z-index: $stretched-link-z-index + 1;
52
53
  padding: $alert-padding-y * 1.25 $alert-padding-x;
53
54
  }
@@ -55,18 +56,13 @@
55
56
 
56
57
 
57
58
  // scss-docs-start alert-modifiers
58
- // Generate contextual modifier classes for colorizing the alert.
59
-
60
- @each $state, $value in $alert-variants {
61
- $alert-background: map-get($value, "alert-bg");
62
- $alert-border: map-get($value, "alert-border");
63
- $alert-color: map-get($value, "alert-color");
64
-
65
- @if (contrast-ratio($alert-background, $alert-color) < $min-contrast-ratio) {
66
- $alert-color: mix(map-get($value, "base-color"), color-contrast($alert-background), abs($alert-color-scale));
67
- }
59
+ // Generate contextual modifier classes for colorizing the alert
60
+ @each $state in map-keys($theme-colors) {
68
61
  .alert-#{$state} {
69
- @include alert-variant($alert-background, $alert-border, $alert-color);
62
+ --#{$prefix}alert-color: var(--#{$prefix}#{$state}-text);
63
+ --#{$prefix}alert-bg: var(--#{$prefix}#{$state}-bg-subtle);
64
+ --#{$prefix}alert-border-color: var(--#{$prefix}#{$state}-border-subtle);
65
+ --#{$prefix}alert-link-color: var(--#{$prefix}#{$state}-text);
70
66
  }
71
67
  }
72
68
  // scss-docs-end alert-modifiers
package/scss/_avatar.scss CHANGED
@@ -17,7 +17,7 @@
17
17
 
18
18
  .avatar-status {
19
19
  position: absolute;
20
- @include ltr-rtl("right", 0);
20
+ right: 0;
21
21
  bottom: 0;
22
22
  display: block;
23
23
  border: 1px solid $white;
@@ -34,16 +34,16 @@
34
34
  display: flex;
35
35
 
36
36
  .avatar {
37
- @include ltr-rtl("margin-right", - ($avatar-width * .4));
37
+ margin-right: - ($avatar-width * .4);
38
38
 
39
39
  &:hover {
40
- @include ltr-rtl("margin-right", 0);
40
+ margin-right: 0;
41
41
  }
42
42
  }
43
43
 
44
44
  @each $width, $value in $avatar-widths {
45
45
  .avatar-#{$width} {
46
- @include ltr-rtl("margin-right", - ($value * .4));
46
+ margin-right: - ($value * .4);
47
47
  }
48
48
  }
49
49
  }
package/scss/_badge.scss CHANGED
@@ -22,7 +22,7 @@
22
22
  text-align: center;
23
23
  white-space: nowrap;
24
24
  vertical-align: baseline;
25
- border-radius: var(--#{$prefix}badge-border-radius, 0); // stylelint-disable-line property-disallowed-list
25
+ @include border-radius(var(--#{$prefix}badge-border-radius));
26
26
  @include gradient-bg();
27
27
 
28
28
  // Empty badges collapse automatically
@@ -36,12 +36,3 @@
36
36
  position: relative;
37
37
  top: -1px;
38
38
  }
39
-
40
- //
41
- // Badge Sizes
42
- //
43
-
44
- .badge-sm {
45
- padding: $badge-padding-y-sm $badge-padding-x-sm;
46
- @include font-size($badge-font-size-sm);
47
- }
@@ -24,18 +24,13 @@
24
24
  .breadcrumb-item {
25
25
  // The separator between breadcrumbs (by default, a forward-slash: "/")
26
26
  + .breadcrumb-item {
27
- @include ltr-rtl("padding-left", var(--#{$prefix}breadcrumb-item-padding-x));
27
+ padding-left: var(--#{$prefix}breadcrumb-item-padding-x);
28
28
 
29
29
  &::before {
30
- @include ltr-rtl("float", left); // Suppress inline spacings and underlining of the separator
31
- @include ltr-rtl("padding-right", var(--#{$prefix}breadcrumb-item-padding-x));
30
+ float: left; // Suppress inline spacings and underlining of the separator
31
+ padding-right: var(--#{$prefix}breadcrumb-item-padding-x);
32
32
  color: var(--#{$prefix}breadcrumb-divider-color);
33
- @include ltr-rtl(
34
- "content",
35
- var(--#{$prefix}breadcrumb-divider, escape-svg($breadcrumb-divider)),
36
- null,
37
- var(--#{$prefix}breadcrumb-divider-flipped, escape-svg($breadcrumb-divider-flipped))
38
- );
33
+ content: var(--#{$prefix}breadcrumb-divider, escape-svg($breadcrumb-divider)) #{"/* rtl:"} var(--#{$prefix}breadcrumb-divider, escape-svg($breadcrumb-divider-flipped)) #{"*/"};
39
34
  }
40
35
  }
41
36
 
@@ -39,7 +39,7 @@
39
39
  // Prevent double borders when buttons are next to each other
40
40
  > :not(.btn-check:first-child) + .btn,
41
41
  > .btn-group:not(:first-child) {
42
- @include ltr-rtl("margin-left", -$btn-border-width);
42
+ margin-left: calc($btn-border-width * -1); // stylelint-disable-line function-disallowed-list
43
43
  }
44
44
 
45
45
  // Reset rounded corners
@@ -79,11 +79,11 @@
79
79
  &::after,
80
80
  .dropup &::after,
81
81
  .dropend &::after {
82
- @include ltr-rtl("margin-left", 0);
82
+ margin-left: 0;
83
83
  }
84
84
 
85
85
  .dropstart &::before {
86
- @include ltr-rtl("margin-right", 0);
86
+ margin-right: 0;
87
87
  }
88
88
  }
89
89
 
@@ -126,7 +126,7 @@
126
126
 
127
127
  > .btn:not(:first-child),
128
128
  > .btn-group:not(:first-child) {
129
- margin-top: -$btn-border-width;
129
+ margin-top: calc($btn-border-width * -1); // stylelint-disable-line function-disallowed-list
130
130
  }
131
131
 
132
132
  // Reset rounded corners
@@ -118,32 +118,82 @@
118
118
  // Alternate buttons
119
119
  //
120
120
 
121
- .btn-transparent {
122
- --#{$prefix}btn-active-border-color: transparent;
123
- --#{$prefix}btn-disabled-border-color: transparent;
124
- --#{$prefix}btn-hover-border-color: transparent;
121
+ // scss-docs-start btn-variant-loops
122
+ @each $color, $value in $theme-colors {
123
+ .btn-#{$color} {
124
+ @if $color == "light" {
125
+ @include button-variant(
126
+ $value,
127
+ $value,
128
+ $hover-background: shade-color($value, $btn-hover-bg-shade-amount),
129
+ $hover-border: shade-color($value, $btn-hover-border-shade-amount),
130
+ $active-background: shade-color($value, $btn-active-bg-shade-amount),
131
+ $active-border: shade-color($value, $btn-active-border-shade-amount)
132
+ );
133
+ } @else if $color == "dark" {
134
+ @include button-variant(
135
+ $value,
136
+ $value,
137
+ $hover-background: tint-color($value, $btn-hover-bg-tint-amount),
138
+ $hover-border: tint-color($value, $btn-hover-border-tint-amount),
139
+ $active-background: tint-color($value, $btn-active-bg-tint-amount),
140
+ $active-border: tint-color($value, $btn-active-border-tint-amount)
141
+ );
142
+ } @else {
143
+ @include button-variant($value, $value);
144
+ }
145
+ }
125
146
  }
126
147
 
127
- // scss-docs-start btn-variant-loops
128
- @each $state, $variant in $button-variants {
129
- .btn-#{$state} {
130
- @include button-variant($variant);
148
+ @if $enable-dark-mode {
149
+ @include color-mode(dark) {
150
+ @each $color, $value in $theme-colors-dark {
151
+ .btn-#{$color} {
152
+ @include button-variant(
153
+ $value,
154
+ $value,
155
+ $hover-background: tint-color($value, $btn-hover-bg-tint-amount),
156
+ $hover-border: tint-color($value, $btn-hover-border-tint-amount),
157
+ $active-background: tint-color($value, $btn-active-bg-tint-amount),
158
+ $active-border: tint-color($value, $btn-active-border-tint-amount)
159
+ );
160
+ }
161
+ }
131
162
  }
132
163
  }
133
164
 
134
- @each $state, $variant in $button-outline-ghost-variants {
135
- .btn-outline-#{$state} {
136
- @include button-outline-variant($variant);
165
+ @each $color, $value in $theme-colors {
166
+ .btn-outline-#{$color} {
167
+ @include button-outline-variant($value);
137
168
  }
138
169
  }
139
170
 
140
- @each $state, $variant in $button-outline-ghost-variants {
141
- .btn-ghost-#{$state} {
142
- @include button-ghost-variant($variant);
171
+ @if $enable-dark-mode {
172
+ @include color-mode(dark) {
173
+ @each $color, $value in $theme-colors-dark {
174
+ .btn-outline-#{$color} {
175
+ @include button-outline-variant($value);
176
+ }
177
+ }
143
178
  }
144
179
  }
145
- // scss-docs-end btn-variant-loops
146
180
 
181
+ @each $color, $value in $theme-colors {
182
+ .btn-ghost-#{$color} {
183
+ @include button-ghost-variant($value);
184
+ }
185
+ }
186
+
187
+ @if $enable-dark-mode {
188
+ @include color-mode(dark) {
189
+ @each $color, $value in $theme-colors-dark {
190
+ .btn-ghost-#{$color} {
191
+ @include button-ghost-variant($value);
192
+ }
193
+ }
194
+ }
195
+ }
196
+ // scss-docs-end btn-variant-loops
147
197
 
148
198
  //
149
199
  // Link buttons
@@ -157,6 +207,7 @@
157
207
  --#{$prefix}btn-border-color: transparent;
158
208
  --#{$prefix}btn-hover-color: #{$btn-link-hover-color};
159
209
  --#{$prefix}btn-hover-border-color: transparent;
210
+ --#{$prefix}btn-active-color: #{$btn-link-hover-color};
160
211
  --#{$prefix}btn-active-border-color: transparent;
161
212
  --#{$prefix}btn-disabled-color: #{$btn-link-disabled-color};
162
213
  --#{$prefix}btn-disabled-border-color: transparent;
@@ -177,6 +228,10 @@
177
228
  color: var(--#{$prefix}btn-color);
178
229
  }
179
230
 
231
+ &:hover {
232
+ color: var(--#{$prefix}btn-hover-color);
233
+ }
234
+
180
235
  // No need for an active state here
181
236
  }
182
237