@coreui/coreui 4.3.0-alpha.0 → 4.3.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 (127) hide show
  1. package/README.md +2 -2
  2. package/dist/css/coreui-grid.css +1 -1
  3. package/dist/css/coreui-grid.css.map +1 -1
  4. package/dist/css/coreui-grid.min.css +1 -1
  5. package/dist/css/coreui-grid.min.css.map +1 -1
  6. package/dist/css/coreui-grid.rtl.css +2 -2
  7. package/dist/css/coreui-grid.rtl.css.map +1 -1
  8. package/dist/css/coreui-grid.rtl.min.css +2 -2
  9. package/dist/css/coreui-grid.rtl.min.css.map +1 -1
  10. package/dist/css/coreui-reboot.css +44 -149
  11. package/dist/css/coreui-reboot.css.map +1 -1
  12. package/dist/css/coreui-reboot.min.css +2 -2
  13. package/dist/css/coreui-reboot.min.css.map +1 -1
  14. package/dist/css/coreui-reboot.rtl.css +45 -150
  15. package/dist/css/coreui-reboot.rtl.css.map +1 -1
  16. package/dist/css/coreui-reboot.rtl.min.css +3 -3
  17. package/dist/css/coreui-reboot.rtl.min.css.map +1 -1
  18. package/dist/css/coreui-utilities.css +81 -366
  19. package/dist/css/coreui-utilities.css.map +1 -1
  20. package/dist/css/coreui-utilities.min.css +2 -2
  21. package/dist/css/coreui-utilities.min.css.map +1 -1
  22. package/dist/css/coreui-utilities.rtl.css +78 -363
  23. package/dist/css/coreui-utilities.rtl.css.map +1 -1
  24. package/dist/css/coreui-utilities.rtl.min.css +3 -3
  25. package/dist/css/coreui-utilities.rtl.min.css.map +1 -1
  26. package/dist/css/coreui.css +523 -1112
  27. package/dist/css/coreui.css.map +1 -1
  28. package/dist/css/coreui.min.css +2 -2
  29. package/dist/css/coreui.min.css.map +1 -1
  30. package/dist/css/coreui.rtl.css +537 -1140
  31. package/dist/css/coreui.rtl.css.map +1 -1
  32. package/dist/css/coreui.rtl.min.css +3 -3
  33. package/dist/css/coreui.rtl.min.css.map +1 -1
  34. package/dist/js/coreui.bundle.js +43 -47
  35. package/dist/js/coreui.bundle.js.map +1 -1
  36. package/dist/js/coreui.bundle.min.js +2 -2
  37. package/dist/js/coreui.bundle.min.js.map +1 -1
  38. package/dist/js/coreui.esm.js +37 -35
  39. package/dist/js/coreui.esm.js.map +1 -1
  40. package/dist/js/coreui.esm.min.js +2 -2
  41. package/dist/js/coreui.esm.min.js.map +1 -1
  42. package/dist/js/coreui.js +37 -35
  43. package/dist/js/coreui.js.map +1 -1
  44. package/dist/js/coreui.min.js +2 -2
  45. package/dist/js/coreui.min.js.map +1 -1
  46. package/js/dist/alert.js +1 -1
  47. package/js/dist/base-component.js +2 -2
  48. package/js/dist/base-component.js.map +1 -1
  49. package/js/dist/button.js +1 -1
  50. package/js/dist/carousel.js +1 -1
  51. package/js/dist/collapse.js +1 -1
  52. package/js/dist/dom/data.js +1 -1
  53. package/js/dist/dom/event-handler.js +1 -1
  54. package/js/dist/dom/manipulator.js +1 -1
  55. package/js/dist/dom/selector-engine.js +1 -1
  56. package/js/dist/dropdown.js +1 -1
  57. package/js/dist/modal.js +1 -1
  58. package/js/dist/navigation.js +1 -1
  59. package/js/dist/offcanvas.js +1 -1
  60. package/js/dist/popover.js +1 -1
  61. package/js/dist/scrollspy.js +3 -3
  62. package/js/dist/scrollspy.js.map +1 -1
  63. package/js/dist/sidebar.js +1 -1
  64. package/js/dist/tab.js +12 -4
  65. package/js/dist/tab.js.map +1 -1
  66. package/js/dist/toast.js +1 -1
  67. package/js/dist/tooltip.js +1 -1
  68. package/js/dist/util/backdrop.js +1 -1
  69. package/js/dist/util/component-functions.js +1 -1
  70. package/js/dist/util/config.js +1 -1
  71. package/js/dist/util/focustrap.js +1 -1
  72. package/js/dist/util/index.js +1 -1
  73. package/js/dist/util/sanitizer.js +23 -29
  74. package/js/dist/util/sanitizer.js.map +1 -1
  75. package/js/dist/util/scrollbar.js +1 -1
  76. package/js/dist/util/swipe.js +1 -1
  77. package/js/dist/util/template-factory.js +1 -1
  78. package/js/src/base-component.js +1 -1
  79. package/js/src/scrollspy.js +2 -2
  80. package/js/src/tab.js +13 -3
  81. package/js/src/util/sanitizer.js +36 -41
  82. package/package.json +35 -47
  83. package/scss/_accordion.scss +0 -9
  84. package/scss/_alert.scss +5 -5
  85. package/scss/_button-group.scss +3 -3
  86. package/scss/_buttons.scss +0 -22
  87. package/scss/_card.scss +3 -3
  88. package/scss/_carousel.scss +8 -24
  89. package/scss/_close.scss +1 -13
  90. package/scss/_dropdown.scss +4 -4
  91. package/scss/_functions.scss +22 -6
  92. package/scss/_list-group.scss +2 -11
  93. package/scss/_maps.scss +0 -123
  94. package/scss/_mixins.scss +1 -1
  95. package/scss/_nav.scss +2 -17
  96. package/scss/_navbar.scss +1 -10
  97. package/scss/_reboot.scss +4 -4
  98. package/scss/_root.scss +11 -93
  99. package/scss/_tooltip.scss +1 -1
  100. package/scss/_type.scss +1 -1
  101. package/scss/_utilities.scss +0 -16
  102. package/scss/_variables.scss +162 -115
  103. package/scss/coreui-grid.rtl.scss +1 -1
  104. package/scss/coreui-grid.scss +0 -1
  105. package/scss/coreui-reboot.rtl.scss +1 -1
  106. package/scss/coreui-reboot.scss +0 -1
  107. package/scss/coreui-utilities.rtl.scss +1 -1
  108. package/scss/coreui-utilities.scss +0 -1
  109. package/scss/coreui.scss +0 -1
  110. package/scss/forms/_floating-labels.scss +3 -2
  111. package/scss/forms/_form-check.scss +12 -20
  112. package/scss/forms/_form-control.scss +14 -11
  113. package/scss/forms/_form-range.scss +11 -11
  114. package/scss/forms/_form-select.scss +9 -16
  115. package/scss/forms/_form-text.scss +1 -1
  116. package/scss/forms/_labels.scss +2 -2
  117. package/scss/helpers/_color-bg.scss +1 -14
  118. package/scss/helpers/_vr.scss +1 -1
  119. package/scss/mixins/_banner.scss +1 -1
  120. package/scss/mixins/_caret.scss +3 -3
  121. package/scss/mixins/_list-group.scss +0 -1
  122. package/scss/mixins/_utilities.scss +15 -35
  123. package/scss/sidebar/_sidebar.scss +2 -10
  124. package/js/index.esm.js +0 -21
  125. package/js/index.umd.js +0 -38
  126. package/scss/_variables-dark.scss +0 -169
  127. package/scss/mixins/_color-mode.scss +0 -21
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * CoreUI swipe.js v4.3.0-alpha.0 (https://coreui.io)
2
+ * CoreUI swipe.js v4.3.0 (https://coreui.io)
3
3
  * Copyright 2023 The CoreUI Team (https://github.com/orgs/coreui/people)
4
4
  * Licensed under MIT (https://github.com/coreui/coreui/blob/main/LICENSE)
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * CoreUI template-factory.js v4.3.0-alpha.0 (https://coreui.io)
2
+ * CoreUI template-factory.js v4.3.0 (https://coreui.io)
3
3
  * Copyright 2023 The CoreUI Team (https://github.com/orgs/coreui/people)
4
4
  * Licensed under MIT (https://github.com/coreui/coreui/blob/main/LICENSE)
5
5
  */
@@ -17,7 +17,7 @@ import { executeAfterTransition, getElement } from './util/index.js'
17
17
  * Constants
18
18
  */
19
19
 
20
- const VERSION = '4.3.0-alpha.0'
20
+ const VERSION = '4.3.0'
21
21
 
22
22
  /**
23
23
  * Class definition
@@ -211,11 +211,11 @@ class ScrollSpy extends BaseComponent {
211
211
  continue
212
212
  }
213
213
 
214
- const observableSection = SelectorEngine.findOne(anchor.hash, this._element)
214
+ const observableSection = SelectorEngine.findOne(decodeURI(anchor.hash), this._element)
215
215
 
216
216
  // ensure that the observableSection exists & is visible
217
217
  if (isVisible(observableSection)) {
218
- this._targetLinks.set(anchor.hash, anchor)
218
+ this._targetLinks.set(decodeURI(anchor.hash), anchor)
219
219
  this._observableSections.set(anchor.hash, observableSection)
220
220
  }
221
221
  }
package/js/src/tab.js CHANGED
@@ -33,6 +33,8 @@ const ARROW_LEFT_KEY = 'ArrowLeft'
33
33
  const ARROW_RIGHT_KEY = 'ArrowRight'
34
34
  const ARROW_UP_KEY = 'ArrowUp'
35
35
  const ARROW_DOWN_KEY = 'ArrowDown'
36
+ const HOME_KEY = 'Home'
37
+ const END_KEY = 'End'
36
38
 
37
39
  const CLASS_NAME_ACTIVE = 'active'
38
40
  const CLASS_NAME_FADE = 'fade'
@@ -154,14 +156,22 @@ class Tab extends BaseComponent {
154
156
  }
155
157
 
156
158
  _keydown(event) {
157
- if (!([ARROW_LEFT_KEY, ARROW_RIGHT_KEY, ARROW_UP_KEY, ARROW_DOWN_KEY].includes(event.key))) {
159
+ if (!([ARROW_LEFT_KEY, ARROW_RIGHT_KEY, ARROW_UP_KEY, ARROW_DOWN_KEY, HOME_KEY, END_KEY].includes(event.key))) {
158
160
  return
159
161
  }
160
162
 
161
163
  event.stopPropagation()// stopPropagation/preventDefault both added to support up/down keys without scrolling the page
162
164
  event.preventDefault()
163
- const isNext = [ARROW_RIGHT_KEY, ARROW_DOWN_KEY].includes(event.key)
164
- const nextActiveElement = getNextActiveElement(this._getChildren().filter(element => !isDisabled(element)), event.target, isNext, true)
165
+
166
+ const children = this._getChildren().filter(element => !isDisabled(element))
167
+ let nextActiveElement
168
+
169
+ if ([HOME_KEY, END_KEY].includes(event.key)) {
170
+ nextActiveElement = children[event.key === HOME_KEY ? 0 : children.length - 1]
171
+ } else {
172
+ const isNext = [ARROW_RIGHT_KEY, ARROW_DOWN_KEY].includes(event.key)
173
+ nextActiveElement = getNextActiveElement(children, event.target, isNext, true)
174
+ }
165
175
 
166
176
  if (nextActiveElement) {
167
177
  nextActiveElement.focus({ preventScroll: true })
@@ -8,47 +8,6 @@
8
8
  * --------------------------------------------------------------------------
9
9
  */
10
10
 
11
- const uriAttributes = new Set([
12
- 'background',
13
- 'cite',
14
- 'href',
15
- 'itemtype',
16
- 'longdesc',
17
- 'poster',
18
- 'src',
19
- 'xlink:href'
20
- ])
21
-
22
- /**
23
- * A pattern that recognizes a commonly useful subset of URLs that are safe.
24
- *
25
- * Shout-out to Angular https://github.com/angular/angular/blob/12.2.x/packages/core/src/sanitization/url_sanitizer.ts
26
- */
27
- const SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file|sms):|[^#&/:?]*(?:[#/?]|$))/i
28
-
29
- /**
30
- * A pattern that matches safe data URLs. Only matches image, video and audio types.
31
- *
32
- * Shout-out to Angular https://github.com/angular/angular/blob/12.2.x/packages/core/src/sanitization/url_sanitizer.ts
33
- */
34
- const DATA_URL_PATTERN = /^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i
35
-
36
- const allowedAttribute = (attribute, allowedAttributeList) => {
37
- const attributeName = attribute.nodeName.toLowerCase()
38
-
39
- if (allowedAttributeList.includes(attributeName)) {
40
- if (uriAttributes.has(attributeName)) {
41
- return Boolean(SAFE_URL_PATTERN.test(attribute.nodeValue) || DATA_URL_PATTERN.test(attribute.nodeValue))
42
- }
43
-
44
- return true
45
- }
46
-
47
- // Check if a regular expression validates the attribute.
48
- return allowedAttributeList.filter(attributeRegex => attributeRegex instanceof RegExp)
49
- .some(regex => regex.test(attributeName))
50
- }
51
-
52
11
  // js-docs-start allow-list
53
12
  const ARIA_ATTRIBUTE_PATTERN = /^aria-[\w-]*$/i
54
13
 
@@ -87,6 +46,42 @@ export const DefaultAllowlist = {
87
46
  }
88
47
  // js-docs-end allow-list
89
48
 
49
+ const uriAttributes = new Set([
50
+ 'background',
51
+ 'cite',
52
+ 'href',
53
+ 'itemtype',
54
+ 'longdesc',
55
+ 'poster',
56
+ 'src',
57
+ 'xlink:href'
58
+ ])
59
+
60
+ /**
61
+ * A pattern that recognizes URLs that are safe wrt. XSS in URL navigation
62
+ * contexts.
63
+ *
64
+ * Shout-out to Angular https://github.com/angular/angular/blob/15.2.8/packages/core/src/sanitization/url_sanitizer.ts#L38
65
+ */
66
+ // eslint-disable-next-line unicorn/better-regex
67
+ const SAFE_URL_PATTERN = /^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i
68
+
69
+ const allowedAttribute = (attribute, allowedAttributeList) => {
70
+ const attributeName = attribute.nodeName.toLowerCase()
71
+
72
+ if (allowedAttributeList.includes(attributeName)) {
73
+ if (uriAttributes.has(attributeName)) {
74
+ return Boolean(SAFE_URL_PATTERN.test(attribute.nodeValue))
75
+ }
76
+
77
+ return true
78
+ }
79
+
80
+ // Check if a regular expression validates the attribute.
81
+ return allowedAttributeList.filter(attributeRegex => attributeRegex instanceof RegExp)
82
+ .some(regex => regex.test(attributeName))
83
+ }
84
+
90
85
  export function sanitizeHtml(unsafeHtml, allowList, sanitizeFunction) {
91
86
  if (!unsafeHtml.length) {
92
87
  return unsafeHtml
package/package.json CHANGED
@@ -1,7 +1,7 @@
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.3.0-alpha.0",
4
+ "version": "4.3.0",
5
5
  "config": {
6
6
  "version_short": "4.3"
7
7
  },
@@ -17,26 +17,25 @@
17
17
  "homepage": "https://coreui.io",
18
18
  "author": "The CoreUI Team (https://github.com/orgs/coreui/people)",
19
19
  "scripts": {
20
- "start": "npm-run-all watch docs-serve",
20
+ "start": "npm-run-all --parallel watch docs-serve",
21
21
  "bundlewatch": "bundlewatch --config .bundlewatch.config.json",
22
22
  "css": "npm-run-all css-compile css-prefix css-minify",
23
23
  "css-compile": "sass --style expanded --source-map --embed-sources --no-error-css scss/:dist/css/",
24
24
  "css-lint": "npm-run-all --aggregate-output --continue-on-error --parallel css-lint-*",
25
- "css-lint-stylelint": "stylelint \"**/*.{css,scss}\" --cache --cache-location .cache/.stylelintcache",
25
+ "css-lint-stylelint": "stylelint \"**/*.{css,scss}\" --cache --cache-location .cache/.stylelintcache --rd",
26
26
  "css-lint-vars": "fusv scss/ docs/assets/scss/",
27
27
  "css-minify": "npm-run-all --aggregate-output --parallel css-minify-*",
28
28
  "css-minify-main": "cleancss -O1 --format breakWith=lf --with-rebase --source-map --source-map-inline-sources --output dist/css/ --batch --batch-suffix \".min\" \"dist/css/*.css\" \"!dist/css/*.min.css\" \"!dist/css/*rtl*.css\"",
29
29
  "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\"",
30
30
  "css-prefix": "npm-run-all --aggregate-output --parallel css-prefix-*",
31
31
  "css-prefix-main": "postcss --config build/postcss.config.js --replace \"dist/css/*.css\" \"!dist/css/*.rtl*.css\" \"!dist/css/*.min.css\"",
32
- "css-test": "jasmine --config=scss/tests/jasmine.js",
33
32
  "js": "npm-run-all js-compile js-minify",
34
33
  "js-compile": "npm-run-all --aggregate-output --parallel js-compile-*",
35
34
  "js-compile-standalone": "rollup --environment BUNDLE:false --config build/rollup.config.js --sourcemap",
36
35
  "js-compile-standalone-esm": "rollup --environment ESM:true,BUNDLE:false --config build/rollup.config.js --sourcemap",
37
36
  "js-compile-bundle": "rollup --environment BUNDLE:true --config build/rollup.config.js --sourcemap",
38
37
  "js-compile-plugins": "node build/build-plugins.js",
39
- "js-lint": "eslint --cache --cache-location .cache/.eslintcache --report-unused-disable-directives --ext .html,.js,.md .",
38
+ "js-lint": "eslint --cache --cache-location .cache/.eslintcache --report-unused-disable-directives --ext .html,.js .",
40
39
  "js-minify": "npm-run-all --aggregate-output --parallel js-minify-*",
41
40
  "js-minify-standalone": "terser --compress passes=2 --mangle --comments \"/^!/\" --source-map \"content=dist/js/coreui.js.map,includeSources,url=coreui.min.js.map\" --output dist/js/coreui.min.js dist/js/coreui.js",
42
41
  "js-minify-standalone-esm": "terser --compress passes=2 --mangle --comments \"/^!/\" --source-map \"content=dist/js/coreui.esm.js.map,includeSources,url=coreui.esm.min.js.map\" --output dist/js/coreui.esm.min.js dist/js/coreui.esm.js",
@@ -50,24 +49,22 @@
50
49
  "js-test-jquery": "cross-env JQUERY=true npm run js-test-karma",
51
50
  "lint": "npm-run-all --aggregate-output --continue-on-error --parallel js-lint css-lint lockfile-lint",
52
51
  "docs": "npm-run-all docs-build docs-lint",
53
- "docs-build": "hugo --cleanDestinationDir --printUnusedTemplates",
52
+ "docs-build": "hugo --cleanDestinationDir --enableGitInfo",
54
53
  "docs-compile": "npm run docs-build",
55
54
  "docs-vnu": "node build/vnu-jar.js",
56
55
  "docs-lint": "npm run docs-vnu",
57
- "docs-serve": "hugo server --port 9001 --disableFastRender --printUnusedTemplates",
56
+ "docs-serve": "hugo server --port 9001 --disableFastRender",
58
57
  "docs-serve-only": "npx sirv-cli _gh_pages --port 9001",
59
58
  "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,terser && echo Manually update docs/assets/js/vendor",
59
+ "update-deps": "ncu -u -x globby,karma-browserstack-launcher,karma-rollup-preprocessor && echo Manually update site/assets/js/vendor",
61
60
  "release": "npm-run-all dist release-sri docs-build release-zip*",
62
61
  "release-sri": "node build/generate-sri.js",
63
62
  "release-version": "node build/change-version.js",
64
- "release-zip": "cross-env-shell \"rm -rf coreui-$npm_package_version-dist coreui-$npm_package_version-dist.zip && cp -r dist/ coreui-$npm_package_version-dist && zip -qr9 coreui-$npm_package_version-dist.zip coreui-$npm_package_version-dist && rm -rf coreui-$npm_package_version-dist\"",
65
- "dist": "npm-run-all --aggregate-output --parallel css js",
63
+ "release-zip": "cross-env-shell \"rm -rf coreui-$npm_package_version-dist coreui-$npm_package_version-dist.zip && cp -r dist/ coreui-$npm_package_version-dist && zip -qr9 coreui-$npm_package_version-dist.zip coreui-$npm_package_version-dist && rm -rf coreui-$npm_package_version-dist\"", "dist": "npm-run-all --aggregate-output --parallel css js",
66
64
  "test": "npm-run-all lint dist js-test docs-build docs-lint",
67
65
  "watch": "npm-run-all --parallel watch-*",
68
66
  "watch-css-main": "nodemon --watch scss/ --ext scss --exec \"npm-run-all css-lint css-compile css-prefix\"",
69
67
  "watch-css-docs": "nodemon --watch docs/assets/scss/ --ext scss --exec \"npm run css-lint\"",
70
- "watch-css-test": "nodemon --watch scss/ --ext scss,js --exec \"npm run css-test\"",
71
68
  "watch-js-main": "nodemon --watch js/src/ --ext js --exec \"npm-run-all js-lint js-compile\"",
72
69
  "watch-js-docs": "nodemon --watch docs/assets/js/ --ext js --exec \"npm run js-lint\""
73
70
  },
@@ -82,42 +79,35 @@
82
79
  "bugs": {
83
80
  "url": "https://github.com/coreui/coreui/issues"
84
81
  },
85
- "funding": [
86
- {
87
- "type": "opencollective",
88
- "url": "https://opencollective.com/coreui"
89
- }
90
- ],
91
82
  "license": "MIT",
92
83
  "peerDependencies": {
93
- "@popperjs/core": "^2.11.7"
84
+ "@popperjs/core": "^2.11.6"
94
85
  },
95
86
  "devDependencies": {
96
- "@babel/cli": "^7.21.5",
97
- "@babel/core": "^7.21.8",
98
- "@babel/preset-env": "^7.21.5",
99
- "@popperjs/core": "^2.11.7",
87
+ "@babel/cli": "^7.22.9",
88
+ "@babel/core": "^7.22.9",
89
+ "@babel/preset-env": "^7.22.9",
90
+ "@popperjs/core": "^2.11.8",
100
91
  "@rollup/plugin-babel": "^6.0.3",
101
- "@rollup/plugin-commonjs": "^24.1.0",
102
- "@rollup/plugin-node-resolve": "^15.0.2",
92
+ "@rollup/plugin-commonjs": "^25.0.3",
93
+ "@rollup/plugin-node-resolve": "^15.1.0",
103
94
  "@rollup/plugin-replace": "^5.0.2",
104
95
  "autoprefixer": "^10.4.14",
105
96
  "bundlewatch": "^0.3.3",
106
97
  "clean-css-cli": "^5.6.2",
107
98
  "cross-env": "^7.0.3",
108
- "eslint": "^8.39.0",
99
+ "eslint": "^8.46.0",
109
100
  "eslint-config-xo": "^0.43.1",
110
101
  "eslint-plugin-html": "^7.1.0",
111
- "eslint-plugin-import": "^2.27.5",
112
- "eslint-plugin-markdown": "^3.0.0",
113
- "eslint-plugin-unicorn": "^46.0.0",
102
+ "eslint-plugin-import": "^2.28.0",
103
+ "eslint-plugin-markdown": "^3.0.1",
104
+ "eslint-plugin-unicorn": "^48.0.1",
114
105
  "find-unused-sass-variables": "^5.0.0",
115
106
  "globby": "^11.1.0",
116
107
  "hammer-simulator": "0.0.1",
117
- "hugo-bin": "^0.102.0",
108
+ "hugo-bin": "^0.111.4",
118
109
  "ip": "^2.0.0",
119
- "jasmine": "^4.6.0",
120
- "jquery": "^3.6.4",
110
+ "jquery": "^3.7.0",
121
111
  "karma": "^6.4.2",
122
112
  "karma-browserstack-launcher": "1.6.0",
123
113
  "karma-chrome-launcher": "^3.2.0",
@@ -125,32 +115,27 @@
125
115
  "karma-detect-browsers": "^2.3.3",
126
116
  "karma-firefox-launcher": "^2.1.2",
127
117
  "karma-jasmine": "^5.1.0",
128
- "karma-jasmine-html-reporter": "^2.0.0",
118
+ "karma-jasmine-html-reporter": "^2.1.0",
129
119
  "karma-rollup-preprocessor": "7.0.8",
130
- "lockfile-lint": "^4.10.1",
131
- "nodemon": "^2.0.22",
120
+ "lockfile-lint": "^4.10.6",
121
+ "nodemon": "^3.0.1",
132
122
  "npm-run-all": "^4.1.5",
133
- "postcss": "^8.4.23",
123
+ "postcss": "^8.4.27",
134
124
  "postcss-cli": "^10.1.0",
135
- "postcss-combine-duplicated-selectors": "^10.0.3",
136
- "postcss-drop-empty-css-vars": "^0.0.0",
137
- "rollup": "^3.21.5",
125
+ "rollup": "^3.27.0",
138
126
  "rollup-plugin-istanbul": "^4.0.0",
139
127
  "rtlcss": "^4.1.0",
140
- "sass": "^1.62.1",
141
- "sass-true": "^7.0.0",
128
+ "sass": "^1.64.1",
142
129
  "shelljs": "^0.8.5",
143
- "stylelint": "^15.6.1",
144
- "stylelint-config-twbs-bootstrap": "^10.0.0",
145
- "terser": "5.17.1",
130
+ "stylelint": "^15.10.2",
131
+ "stylelint-config-twbs-bootstrap": "^11.0.1",
132
+ "terser": "5.19.2",
146
133
  "vnu-jar": "23.4.11"
147
134
  },
148
135
  "files": [
149
136
  "dist/{css,js}/*.{css,js,map}",
150
137
  "js/{src,dist}/**/*.{js,map}",
151
- "js/index.{esm,umd}.js",
152
- "scss/**/*.scss",
153
- "!scss/tests/**"
138
+ "scss/**/*.scss"
154
139
  ],
155
140
  "hugo-bin": {
156
141
  "buildTags": "extended"
@@ -170,7 +155,10 @@
170
155
  },
171
156
  "dependencies": {},
172
157
  "peerDependencies": {
173
- "@popperjs/core": "^2.11.7"
158
+ "@popperjs/core": "^2.11.6"
174
159
  }
160
+ },
161
+ "dependencies": {
162
+ "postcss-combine-duplicated-selectors": "^10.0.3"
175
163
  }
176
164
  }
@@ -147,12 +147,3 @@
147
147
  }
148
148
  }
149
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
@@ -57,12 +57,12 @@
57
57
 
58
58
  // scss-docs-start alert-modifiers
59
59
  // Generate contextual modifier classes for colorizing the alert.
60
- @each $state in map-keys($theme-colors) {
60
+ @each $state, $value in $alert-variants {
61
61
  .alert-#{$state} {
62
- --#{$prefix}alert-color: var(--#{$prefix}#{$state}-text-emphasis);
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-emphasis);
62
+ --#{$prefix}alert-color: #{map-get($value, "alert-color")};
63
+ --#{$prefix}alert-bg: #{map-get($value, "alert-bg")};
64
+ --#{$prefix}alert-border-color: #{map-get($value, "alert-border")};
65
+ --#{$prefix}alert-link-color: #{shade-color(map-get($value, "alert-color"), 20%)};
66
66
  }
67
67
  }
68
68
  // scss-docs-end alert-modifiers
@@ -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
- margin-left: calc(#{$btn-border-width} * -1); // stylelint-disable-line function-disallowed-list
42
+ @include ltr-rtl("margin-left", calc(#{$btn-border-width} * -1));
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
- margin-left: 0;
82
+ @include ltr-rtl("margin-left", 0);
83
83
  }
84
84
 
85
85
  .dropstart &::before {
86
- margin-right: 0;
86
+ @include ltr-rtl("margin-right", 0);
87
87
  }
88
88
  }
89
89
 
@@ -192,25 +192,3 @@
192
192
  .btn-sm {
193
193
  @include button-size($btn-padding-y-sm, $btn-padding-x-sm, $btn-font-size-sm, $btn-border-radius-sm);
194
194
  }
195
-
196
- @if $enable-dark-mode {
197
- @include color-mode(dark) {
198
- @each $state, $variant in $button-variants-dark {
199
- .btn-#{$state} {
200
- @include button-variant($variant);
201
- }
202
- }
203
-
204
- @each $state, $variant in $button-outline-ghost-variants-dark {
205
- .btn-outline-#{$state} {
206
- @include button-outline-variant($variant);
207
- }
208
- }
209
-
210
- @each $state, $variant in $button-outline-ghost-variants-dark {
211
- .btn-ghost-#{$state} {
212
- @include button-ghost-variant($variant);
213
- }
214
- }
215
- }
216
- }
package/scss/_card.scss CHANGED
@@ -95,7 +95,7 @@
95
95
  }
96
96
 
97
97
  + .card-link {
98
- margin-left: var(--#{$prefix}card-spacer-x);
98
+ @include ltr-rtl("margin-left", var(--#{$prefix}card-spacer-x));
99
99
  }
100
100
  }
101
101
 
@@ -198,8 +198,8 @@
198
198
  margin-bottom: 0;
199
199
 
200
200
  + .card {
201
- margin-left: 0;
202
- border-left: 0;
201
+ @include ltr-rtl("margin-left", 0);
202
+ @include ltr-rtl("border-left", 0);
203
203
  }
204
204
 
205
205
  // Handle rounded corners
@@ -96,7 +96,7 @@
96
96
  justify-content: center; // 3. horizontally center contents
97
97
  width: $carousel-control-width;
98
98
  padding: 0;
99
- color: $carousel-control-color;
99
+ color: var(--#{$prefix}carousel-control-color, $carousel-control-color);
100
100
  text-align: center;
101
101
  background: none;
102
102
  border: 0;
@@ -106,7 +106,7 @@
106
106
  // Hover/focus state
107
107
  &:hover,
108
108
  &:focus {
109
- color: $carousel-control-color;
109
+ color: var(--#{$prefix}carousel-control-color, $carousel-control-color);
110
110
  text-decoration: none;
111
111
  outline: 0;
112
112
  opacity: $carousel-control-hover-opacity;
@@ -165,6 +165,7 @@
165
165
  margin-right: $carousel-control-width;
166
166
  margin-bottom: 1rem;
167
167
  margin-left: $carousel-control-width;
168
+ list-style: none;
168
169
 
169
170
  [data-coreui-target] {
170
171
  box-sizing: content-box;
@@ -176,7 +177,7 @@
176
177
  margin-left: $carousel-indicator-spacer;
177
178
  text-indent: -999px;
178
179
  cursor: pointer;
179
- background-color: $carousel-indicator-active-bg;
180
+ background-color: var(--#{$prefix}carousel-indicator-active-bg, $carousel-indicator-active-bg);
180
181
  background-clip: padding-box;
181
182
  border: 0;
182
183
  // Use transparent borders to increase the hit area by 10px on top and bottom.
@@ -203,13 +204,15 @@
203
204
  left: (100% - $carousel-caption-width) * .5;
204
205
  padding-top: $carousel-caption-padding-y;
205
206
  padding-bottom: $carousel-caption-padding-y;
206
- color: $carousel-caption-color;
207
+ color: var(--#{$prefix}carousel-caption-color, $carousel-caption-color);
207
208
  text-align: center;
208
209
  }
209
210
 
210
211
  // Dark mode carousel
211
212
 
212
- @mixin carousel-dark() {
213
+ .carousel-dark {
214
+ --#{$prefix}carousel-indicator-active-bg: #{$carousel-dark-indicator-active-bg};
215
+ --#{$prefix}carousel-caption-color: #{$carousel-dark-caption-color};
213
216
  .carousel-control-prev-icon,
214
217
  .carousel-control-next-icon {
215
218
  filter: $carousel-dark-control-icon-filter;
@@ -223,22 +226,3 @@
223
226
  color: $carousel-dark-caption-color;
224
227
  }
225
228
  }
226
-
227
- .carousel-dark {
228
- @include carousel-dark();
229
- }
230
-
231
- @if $enable-dark-mode {
232
- @include color-mode(dark) {
233
- @if $color-mode-type == "media-query" {
234
- .carousel {
235
- @include carousel-dark();
236
- }
237
- } @else {
238
- .carousel,
239
- &.carousel {
240
- @include carousel-dark();
241
- }
242
- }
243
- }
244
- }
package/scss/_close.scss CHANGED
@@ -46,18 +46,6 @@
46
46
  }
47
47
  }
48
48
 
49
- @mixin btn-close-white() {
50
- filter: var(--#{$prefix}btn-close-white-filter);
51
- }
52
-
53
49
  .btn-close-white {
54
- @include btn-close-white();
55
- }
56
-
57
- @if $enable-dark-mode {
58
- @include color-mode(dark) {
59
- .btn-close {
60
- @include btn-close-white();
61
- }
62
- }
50
+ filter: var(--#{$prefix}btn-close-white-filter);
63
51
  }
@@ -93,8 +93,8 @@
93
93
  --cui-position: start;
94
94
 
95
95
  &[data-coreui-popper] {
96
- right: auto;
97
- left: 0;
96
+ @include ltr-rtl("right", auto);
97
+ @include ltr-rtl("left", 0);
98
98
  }
99
99
  }
100
100
 
@@ -102,8 +102,8 @@
102
102
  --cui-position: end;
103
103
 
104
104
  &[data-coreui-popper] {
105
- right: 0;
106
- left: auto;
105
+ @include ltr-rtl("right", 0);
106
+ @include ltr-rtl("left", auto);
107
107
  }
108
108
  }
109
109
  }
@@ -188,7 +188,7 @@ $_luminance-list: .0008 .001 .0011 .0013 .0015 .0017 .002 .0022 .0025 .0027 .003
188
188
  );
189
189
 
190
190
  @each $name, $value in $rgb {
191
- $value: if(divide($value, 255) < .04045, divide(divide($value, 255), 12.92), nth($_luminance-list, $value + 1));
191
+ $value: if(divide($value, 255) < .03928, divide(divide($value, 255), 12.92), nth($_luminance-list, $value + 1));
192
192
  $rgb: map-merge($rgb, ($name: $value));
193
193
  }
194
194
 
@@ -218,6 +218,17 @@ $_luminance-list: .0008 .001 .0011 .0013 .0015 .0017 .002 .0022 .0025 .0027 .003
218
218
  }
219
219
  // scss-docs-end color-functions
220
220
 
221
+ // scss-docs-start alert-color-functions
222
+ @function alert-color-map($color) {
223
+ @return (
224
+ "alert-bg": shift-color($color, $alert-bg-scale),
225
+ "alert-border": shift-color($color, $alert-border-scale),
226
+ "alert-color": shift-color($color, $alert-color-scale),
227
+ "base-color": $color
228
+ );
229
+ }
230
+ // scss-docs-end alert-color-functions
231
+
221
232
  // scss-docs-start button-color-functions
222
233
  @function btn-color($color, $shade, $tint) {
223
234
  @return if(color-contrast($color) == $color-contrast-light, shade-color($color, $shade), tint-color($color, $tint));
@@ -256,6 +267,16 @@ $_luminance-list: .0008 .001 .0011 .0013 .0015 .0017 .002 .0022 .0025 .0027 .003
256
267
  }
257
268
  // scss-docs-end button-color-functions
258
269
 
270
+ // scss-docs-start list-group-color-functions
271
+ @function list-group-color-map($color) {
272
+ @return (
273
+ "bg": shift-color($color, $list-group-item-bg-scale),
274
+ "bg-hover": shade-color($color, 10%),
275
+ "color": shift-color($color, $list-group-item-color-scale)
276
+ );
277
+ }
278
+ // scss-docs-end list-group-color-functions
279
+
259
280
  // scss-docs-start table-color-functions
260
281
  @function table-color-map($background, $body-bg: $body-bg) {
261
282
  $color: color-contrast(opaque($body-bg, $background));
@@ -359,8 +380,3 @@ $_luminance-list: .0008 .001 .0011 .0013 .0015 .0017 .002 .0022 .0025 .0027 .003
359
380
  }
360
381
  @return $result;
361
382
  }
362
-
363
- // Generate selectors for theme variants
364
- @function theme-prefix($theme, $selector) {
365
- @return #{"[data-coreui-theme="$theme + "] ." + $theme + "\\:" + $selector + ", [data-coreui-theme="$theme + "] ." + $theme + "\\:" + $selector + ":not([class*='#{$theme}:'])"};
366
- }
@@ -180,18 +180,9 @@
180
180
  // Add modifier classes to change text and background color on individual items.
181
181
  // Organizationally, this must come after the `:hover` states.
182
182
 
183
- @each $state in map-keys($theme-colors) {
183
+ @each $state, $variant in $list-group-variants {
184
184
  .list-group-item-#{$state} {
185
- --#{$prefix}list-group-color: var(--#{$prefix}#{$state}-text-emphasis);
186
- --#{$prefix}list-group-bg: var(--#{$prefix}#{$state}-bg-subtle);
187
- --#{$prefix}list-group-border-color: var(--#{$prefix}#{$state}-border-subtle);
188
- --#{$prefix}list-group-action-hover-color: var(--#{$prefix}emphasis-color);
189
- --#{$prefix}list-group-action-hover-bg: var(--#{$prefix}#{$state}-border-subtle);
190
- --#{$prefix}list-group-action-active-color: var(--#{$prefix}emphasis-color);
191
- --#{$prefix}list-group-action-active-bg: var(--#{$prefix}#{$state}-border-subtle);
192
- --#{$prefix}list-group-active-color: var(--#{$prefix}#{$state}-bg-subtle);
193
- --#{$prefix}list-group-active-bg: var(--#{$prefix}#{$state}-text-emphasis);
194
- --#{$prefix}list-group-active-border-color: var(--#{$prefix}#{$state}-text-emphasis);
185
+ @include list-group-item-variant($state, $variant);
195
186
  }
196
187
  }
197
188
  // scss-docs-end list-group-modifiers