@coreui/coreui 4.0.5 → 4.1.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 (140) hide show
  1. package/README.md +4 -7
  2. package/dist/css/coreui-grid.css +254 -205
  3. package/dist/css/coreui-grid.css.map +1 -1
  4. package/dist/css/coreui-grid.min.css +2 -2
  5. package/dist/css/coreui-grid.min.css.map +1 -1
  6. package/dist/css/coreui-grid.rtl.css +255 -206
  7. package/dist/css/coreui-grid.rtl.css.map +1 -1
  8. package/dist/css/coreui-grid.rtl.min.css +3 -3
  9. package/dist/css/coreui-grid.rtl.min.css.map +1 -1
  10. package/dist/css/coreui-reboot.css +63 -8
  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 +64 -9
  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 +181 -81
  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 +182 -82
  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 +693 -327
  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 +676 -325
  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 +776 -702
  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 +659 -611
  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 +669 -623
  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 +81 -48
  47. package/js/dist/alert.js.map +1 -1
  48. package/js/dist/base-component.js +25 -17
  49. package/js/dist/base-component.js.map +1 -1
  50. package/js/dist/button.js +22 -12
  51. package/js/dist/button.js.map +1 -1
  52. package/js/dist/carousel.js +69 -44
  53. package/js/dist/carousel.js.map +1 -1
  54. package/js/dist/collapse.js +117 -131
  55. package/js/dist/collapse.js.map +1 -1
  56. package/js/dist/dom/data.js +5 -5
  57. package/js/dist/dom/data.js.map +1 -1
  58. package/js/dist/dom/event-handler.js +14 -5
  59. package/js/dist/dom/event-handler.js.map +1 -1
  60. package/js/dist/dom/manipulator.js +6 -6
  61. package/js/dist/dom/manipulator.js.map +1 -1
  62. package/js/dist/dom/selector-engine.js +53 -8
  63. package/js/dist/dom/selector-engine.js.map +1 -1
  64. package/js/dist/dropdown.js +99 -106
  65. package/js/dist/dropdown.js.map +1 -1
  66. package/js/dist/modal.js +244 -87
  67. package/js/dist/modal.js.map +1 -1
  68. package/js/dist/offcanvas.js +205 -56
  69. package/js/dist/offcanvas.js.map +1 -1
  70. package/js/dist/popover.js +28 -58
  71. package/js/dist/popover.js.map +1 -1
  72. package/js/dist/scrollspy.js +40 -30
  73. package/js/dist/scrollspy.js.map +1 -1
  74. package/js/dist/tab.js +44 -22
  75. package/js/dist/tab.js.map +1 -1
  76. package/js/dist/toast.js +127 -29
  77. package/js/dist/toast.js.map +1 -1
  78. package/js/dist/tooltip.js +122 -104
  79. package/js/dist/tooltip.js.map +1 -1
  80. package/js/src/alert.js +21 -47
  81. package/js/src/base-component.js +3 -3
  82. package/js/src/button.js +1 -1
  83. package/js/src/carousel.js +9 -4
  84. package/js/src/collapse.js +66 -119
  85. package/js/src/dom/data.js +1 -1
  86. package/js/src/dom/event-handler.js +1 -2
  87. package/js/src/dom/manipulator.js +3 -3
  88. package/js/src/dom/selector-engine.js +18 -1
  89. package/js/src/dropdown.js +53 -68
  90. package/js/src/modal.js +24 -35
  91. package/js/src/navigation.js +1 -1
  92. package/js/src/offcanvas.js +16 -18
  93. package/js/src/popover.js +7 -49
  94. package/js/src/scrollspy.js +1 -1
  95. package/js/src/sidebar.js +3 -3
  96. package/js/src/tab.js +1 -1
  97. package/js/src/toast.js +11 -11
  98. package/js/src/tooltip.js +66 -50
  99. package/js/src/util/backdrop.js +6 -5
  100. package/js/src/util/component-functions.js +34 -0
  101. package/js/src/util/focustrap.js +105 -0
  102. package/js/src/util/index.js +14 -5
  103. package/js/src/util/sanitizer.js +21 -22
  104. package/js/src/util/scrollbar.js +1 -1
  105. package/package.json +47 -44
  106. package/scss/_buttons.scss +1 -2
  107. package/scss/_card.scss +2 -1
  108. package/scss/_dropdown.scss +1 -1
  109. package/scss/_functions.scss +51 -12
  110. package/scss/_grid.scss +0 -23
  111. package/scss/_helpers.scss +2 -0
  112. package/scss/_mixins.scss +1 -0
  113. package/scss/_modal.scss +1 -11
  114. package/scss/_navbar.scss +30 -1
  115. package/scss/_offcanvas.scss +6 -2
  116. package/scss/_placeholders.scss +51 -0
  117. package/scss/_reboot.scss +12 -8
  118. package/scss/_root.scss +36 -7
  119. package/scss/_tables.scss +9 -5
  120. package/scss/_toasts.scss +2 -2
  121. package/scss/_transitions.scss +6 -0
  122. package/scss/_utilities.scss +31 -8
  123. package/scss/_variables.scss +184 -12
  124. package/scss/coreui-grid.rtl.scss +1 -1
  125. package/scss/coreui-grid.scss +3 -1
  126. package/scss/coreui-reboot.rtl.scss +1 -1
  127. package/scss/coreui-reboot.scss +2 -4
  128. package/scss/coreui-utilities.rtl.scss +1 -1
  129. package/scss/coreui-utilities.scss +1 -1
  130. package/scss/coreui.rtl.scss +1 -1
  131. package/scss/coreui.scss +2 -1
  132. package/scss/forms/_form-control.scss +1 -1
  133. package/scss/forms/_form-select.scss +2 -0
  134. package/scss/helpers/_stacks.scss +15 -0
  135. package/scss/helpers/_vr.scss +8 -0
  136. package/scss/mixins/_backdrop.scss +14 -0
  137. package/scss/mixins/_grid.scss +26 -7
  138. package/scss/mixins/_ltr-rtl.scss +21 -0
  139. package/scss/mixins/_utilities.scss +26 -26
  140. package/scss/mixins/_visually-hidden.scss +1 -1
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 maintain by the CoreUI Team",
4
- "version": "4.0.5",
4
+ "version": "4.1.0",
5
5
  "config": {
6
6
  "version_short": "4.0"
7
7
  },
@@ -19,51 +19,52 @@
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.0.5",
22
+ "changelog": "auto-changelog --template build/changelog-template.hbs --commit-limit false --package --backfill-limit 0 --starting-version v4.1.0",
23
23
  "css": "npm-run-all css-compile css-prefix css-minify",
24
24
  "css-compile": "sass --style expanded --source-map --embed-sources --no-error-css scss/:dist/css/",
25
- "css-lint": "npm-run-all --continue-on-error --parallel css-lint-*",
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/",
28
- "css-minify": "npm-run-all --parallel css-minify-*",
28
+ "css-minify": "npm-run-all --aggregate-output --parallel css-minify-*",
29
29
  "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\"",
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
- "css-prefix": "npm-run-all --parallel css-prefix-*",
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
33
  "js": "npm-run-all js-compile js-minify",
34
- "js-compile": "npm-run-all --parallel js-compile-*",
34
+ "js-compile": "npm-run-all --aggregate-output --parallel js-compile-*",
35
35
  "js-compile-standalone": "rollup --environment BUNDLE:false --config build/rollup.config.js --sourcemap",
36
36
  "js-compile-standalone-esm": "rollup --environment ESM:true,BUNDLE:false --config build/rollup.config.js --sourcemap",
37
37
  "js-compile-bundle": "rollup --environment BUNDLE:true --config build/rollup.config.js --sourcemap",
38
38
  "js-compile-plugins": "node build/build-plugins.js",
39
39
  "js-lint": "eslint --cache --cache-location .cache/.eslintcache --report-unused-disable-directives .",
40
- "js-minify": "npm-run-all --parallel js-minify-*",
41
- "js-minify-standalone": "terser --compress --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
- "js-minify-standalone-esm": "terser --compress --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",
43
- "js-minify-bundle": "terser --compress --mangle --comments \"/^!/\" --source-map \"content=dist/js/coreui.bundle.js.map,includeSources,url=coreui.bundle.min.js.map\" --output dist/js/coreui.bundle.min.js dist/js/coreui.bundle.js",
44
- "js-test": "npm-run-all --parallel js-test-karma js-test-jquery js-test-integration-*",
40
+ "js-minify": "npm-run-all --aggregate-output --parallel js-minify-*",
41
+ "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
+ "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",
43
+ "js-minify-bundle": "terser --compress passes=2 --mangle --comments \"/^!/\" --source-map \"content=dist/js/coreui.bundle.js.map,includeSources,url=coreui.bundle.min.js.map\" --output dist/js/coreui.bundle.min.js dist/js/coreui.bundle.js",
44
+ "js-test": "npm-run-all --aggregate-output --parallel js-test-karma js-test-jquery js-test-integration-*",
45
45
  "js-debug": "cross-env DEBUG=true npm run js-test-karma",
46
46
  "js-test-karma": "karma start js/tests/karma.conf.js",
47
47
  "js-test-integration-bundle": "rollup --config js/tests/integration/rollup.bundle.js",
48
48
  "js-test-integration-modularity": "rollup --config js/tests/integration/rollup.bundle-modularity.js",
49
49
  "js-test-cloud": "cross-env BROWSERSTACK=true npm run js-test-karma",
50
50
  "js-test-jquery": "cross-env JQUERY=true npm run js-test-karma",
51
- "lint": "npm-run-all --parallel js-lint css-lint lockfile-lint",
51
+ "lint": "npm-run-all --aggregate-output --continue-on-error --parallel js-lint css-lint lockfile-lint",
52
52
  "docs": "npm-run-all docs-build docs-lint",
53
53
  "docs-build": "hugo --cleanDestinationDir --enableGitInfo",
54
54
  "docs-compile": "npm run docs-build",
55
- "docs-linkinator": "linkinator _gh_pages --recurse --skip \"^(?!http://localhost)\" --verbosity error",
55
+ "docs-linkinator": "linkinator _site --recurse --skip \"^(?!http://localhost)\" --verbosity error",
56
+ "docs-spellcheck": "cspell \"docs/**/*.md\" --no-progress",
56
57
  "docs-vnu": "node build/vnu-jar.js",
57
- "docs-lint": "npm-run-all --parallel docs-vnu docs-linkinator",
58
+ "docs-lint": "npm-run-all --aggregate-output --parallel docs-vnu docs-linkinator docs-spellcheck",
58
59
  "docs-serve": "hugo server --port 9001 --disableFastRender --enableGitInfo",
59
60
  "docs-serve-only": "npx sirv-cli _gh_pages --port 9001",
60
61
  "lockfile-lint": "lockfile-lint --allowed-hosts npm --allowed-schemes https: --empty-hostname false --type npm --path package-lock.json",
61
- "update-deps": "ncu -u -x karma-browserstack-launcher,terser && npm update && echo Manually update docs/assets/js/vendor",
62
+ "update-deps": "ncu -u -x globby,karma-browserstack-launcher && npm update && echo Manually update docs/assets/js/vendor",
62
63
  "release": "npm-run-all dist release-sri docs-build release-zip*",
63
64
  "release-sri": "node build/generate-sri.js",
64
65
  "release-version": "node build/change-version.js",
65
66
  "release-zip": "cross-env-shell \"rm -rf coreui-$npm_package_version-dist && cp -r dist/ coreui-$npm_package_version-dist && zip -r9 coreui-$npm_package_version-dist.zip coreui-$npm_package_version-dist && rm -rf coreui-$npm_package_version-dist\"",
66
- "dist": "npm-run-all --parallel css js",
67
+ "dist": "npm-run-all --aggregate-output --parallel css js",
67
68
  "test": "npm-run-all lint dist js-test docs-build docs-lint",
68
69
  "netlify": "cross-env-shell HUGO_BASEURL=$DEPLOY_PRIME_URL npm-run-all dist release-sri docs-build",
69
70
  "watch": "npm-run-all --parallel watch-*",
@@ -85,57 +86,59 @@
85
86
  },
86
87
  "license": "MIT",
87
88
  "peerDependencies": {
88
- "@popperjs/core": "^2.10.1"
89
+ "@popperjs/core": "^2.11.0"
89
90
  },
90
91
  "devDependencies": {
91
- "@babel/cli": "^7.15.4",
92
- "@babel/core": "^7.15.5",
93
- "@babel/preset-env": "^7.15.6",
94
- "@popperjs/core": "^2.10.1",
92
+ "@babel/cli": "^7.16.0",
93
+ "@babel/core": "^7.16.0",
94
+ "@babel/preset-env": "^7.16.4",
95
+ "@popperjs/core": "^2.11.0",
95
96
  "@rollup/plugin-babel": "^5.3.0",
96
- "@rollup/plugin-commonjs": "^20.0.0",
97
- "@rollup/plugin-node-resolve": "^13.0.4",
97
+ "@rollup/plugin-commonjs": "^21.0.1",
98
+ "@rollup/plugin-node-resolve": "^13.0.6",
98
99
  "@rollup/plugin-replace": "^3.0.0",
99
100
  "auto-changelog": "^2.3.0",
100
- "autoprefixer": "^10.3.4",
101
+ "autoprefixer": "^10.4.0",
101
102
  "bundlewatch": "^0.3.2",
102
- "clean-css-cli": "^5.3.3",
103
+ "clean-css-cli": "^5.4.2",
103
104
  "cross-env": "^7.0.3",
104
- "eslint": "^7.32.0",
105
- "eslint-config-xo": "^0.36.0",
106
- "eslint-plugin-import": "^2.24.2",
107
- "eslint-plugin-unicorn": "^31.0.0",
105
+ "cspell": "^5.13.1",
106
+ "eslint": "^8.3.0",
107
+ "eslint-config-xo": "^0.39.0",
108
+ "eslint-plugin-import": "^2.25.3",
109
+ "eslint-plugin-unicorn": "^39.0.0",
108
110
  "find-unused-sass-variables": "^3.1.0",
109
- "glob": "^7.1.7",
111
+ "glob": "^7.2.0",
110
112
  "globby": "^11.0.4",
111
113
  "hammer-simulator": "0.0.1",
112
- "hugo-bin": "^0.76.1",
114
+ "hugo-bin": "^0.77.4",
113
115
  "ip": "^1.1.5",
114
116
  "jquery": "^3.6.0",
115
- "karma": "^6.3.4",
117
+ "karma": "^6.3.9",
116
118
  "karma-browserstack-launcher": "1.6.0",
117
119
  "karma-chrome-launcher": "^3.1.0",
118
120
  "karma-coverage-istanbul-reporter": "^3.0.3",
119
121
  "karma-detect-browsers": "^2.3.3",
120
- "karma-firefox-launcher": "^2.1.1",
121
- "karma-jasmine": "^4.0.5",
122
+ "karma-firefox-launcher": "^2.1.2",
123
+ "karma-jasmine": "^4.0.1",
122
124
  "karma-jasmine-html-reporter": "^1.7.0",
123
125
  "karma-rollup-preprocessor": "^7.0.7",
124
- "linkinator": "^2.14.0",
126
+ "linkinator": "^2.16.2",
125
127
  "lockfile-lint": "^4.6.2",
126
- "nodemon": "^2.0.12",
128
+ "nodemon": "^2.0.15",
127
129
  "npm-run-all": "^4.1.5",
128
- "postcss": "^8.3.6",
129
- "postcss-cli": "^8.3.1",
130
+ "postcss": "^8.4.4",
131
+ "postcss-cli": "^9.0.2",
130
132
  "postcss-combine-duplicated-selectors": "^10.0.3",
131
- "rollup": "^2.56.3",
133
+ "rollup": "^2.60.1",
132
134
  "rollup-plugin-istanbul": "^3.0.0",
133
- "sass": "^1.39.2",
135
+ "rtlcss": "^3.5.0",
136
+ "sass": "^1.43.5",
134
137
  "shelljs": "^0.8.4",
135
138
  "stylelint": "^13.13.1",
136
- "stylelint-config-twbs-bootstrap": "^2.2.1",
137
- "terser": "5.8.0",
138
- "vnu-jar": "21.9.2"
139
+ "stylelint-config-twbs-bootstrap": "^2.2.4",
140
+ "terser": "^5.10.0",
141
+ "vnu-jar": "21.10.12"
139
142
  },
140
143
  "files": [
141
144
  "dist/{css,js}/*.{css,js,map}",
@@ -160,7 +163,7 @@
160
163
  },
161
164
  "dependencies": {},
162
165
  "peerDependencies": {
163
- "@popperjs/core": "^2.10.1"
166
+ "@popperjs/core": "^2.11.0"
164
167
  }
165
168
  }
166
169
  }
@@ -14,9 +14,8 @@
14
14
  vertical-align: middle;
15
15
  cursor: if($enable-button-pointers, pointer, null);
16
16
  user-select: none;
17
- @include gradient-bg(var(--#{$variable-prefix}btn-bg, transparent));
17
+ background-color: var(--#{$variable-prefix}btn-bg, transparent);
18
18
  border: $btn-border-width solid var(--#{$variable-prefix}btn-border-color, transparent);
19
- @include box-shadow(var(--#{$variable-prefix}btn-box-shadow, $btn-box-shadow));
20
19
  @include button-size($btn-padding-y, $btn-padding-x, $btn-font-size, $btn-border-radius);
21
20
  @include transition($btn-transition);
22
21
 
package/scss/_card.scss CHANGED
@@ -13,6 +13,7 @@
13
13
  background-clip: border-box;
14
14
  border: $card-border-width solid var(--#{$variable-prefix}card-border-color, $card-border-color);
15
15
  @include border-radius($card-border-radius);
16
+ @include box-shadow($card-box-shadow);
16
17
 
17
18
  > hr {
18
19
  margin-right: 0;
@@ -65,7 +66,7 @@
65
66
 
66
67
  .card-link {
67
68
  &:hover {
68
- text-decoration: none;
69
+ text-decoration: if($link-hover-decoration == underline, none, null);
69
70
  }
70
71
 
71
72
  + .card-link {
@@ -39,7 +39,7 @@
39
39
  }
40
40
 
41
41
  // scss-docs-start responsive-breakpoints
42
- // We deliberately hardcode the `bs-` prefix because we check
42
+ // We deliberately hardcode the `cui-` prefix because we check
43
43
  // this custom property in JS to determine Popper's positioning
44
44
 
45
45
  @each $breakpoint in map-keys($grid-breakpoints) {
@@ -32,6 +32,47 @@
32
32
  }
33
33
  }
34
34
 
35
+ // Colors
36
+ @function to-rgb($value) {
37
+ @return red($value), green($value), blue($value);
38
+ }
39
+
40
+ // stylelint-disable scss/dollar-variable-pattern
41
+ @function rgba-css-var($identifier, $target) {
42
+ @if $identifier == "body" and $target == "bg" {
43
+ @return rgba(var(--#{$variable-prefix}#{$identifier}-bg-rgb), var(--#{$variable-prefix}#{$target}-opacity));
44
+ } @if $identifier == "body" and $target == "text" {
45
+ @return rgba(var(--#{$variable-prefix}#{$identifier}-color-rgb), var(--#{$variable-prefix}#{$target}-opacity));
46
+ } @else {
47
+ @return rgba(var(--#{$variable-prefix}#{$identifier}-rgb), var(--#{$variable-prefix}#{$target}-opacity));
48
+ }
49
+ }
50
+
51
+ @function map-loop($map, $func, $args...) {
52
+ $_map: ();
53
+
54
+ @each $key, $value in $map {
55
+ // allow to pass the $key and $value of the map as an function argument
56
+ $_args: ();
57
+ @each $arg in $args {
58
+ $_args: append($_args, if($arg == "$key", $key, if($arg == "$value", $value, $arg)));
59
+ }
60
+
61
+ $_map: map-merge($_map, ($key: call(get-function($func), $_args...)));
62
+ }
63
+
64
+ @return $_map;
65
+ }
66
+ // stylelint-enable scss/dollar-variable-pattern
67
+
68
+ @function varify($list) {
69
+ $result: null;
70
+ @each $entry in $list {
71
+ $result: append($result, var(--#{$variable-prefix}#{$entry}), space);
72
+ }
73
+ @return $result;
74
+ }
75
+
35
76
  // Internal Bootstrap function to turn maps into its negative variant.
36
77
  // It prefixes the keys with `n` and makes the value negative.
37
78
  @function negativify-map($map) {
@@ -55,6 +96,16 @@
55
96
  @return $result;
56
97
  }
57
98
 
99
+ // Merge multiple maps
100
+ @function map-merge-multiple($maps...) {
101
+ $merged-maps: ();
102
+
103
+ @each $map in $maps {
104
+ $merged-maps: map-merge($merged-maps, $map);
105
+ }
106
+ @return $merged-maps;
107
+ }
108
+
58
109
  // Replace `$search` with `$replace` in `$string`
59
110
  // Used on our SVG icon backgrounds for custom forms.
60
111
  //
@@ -274,14 +325,6 @@ $_luminance-list: .0008 .001 .0011 .0013 .0015 .0017 .002 .0022 .0025 .0027 .003
274
325
  @return $value1 + $value2;
275
326
  }
276
327
 
277
- @if type-of($value1) != number {
278
- $value1: unquote("(") + $value1 + unquote(")");
279
- }
280
-
281
- @if type-of($value2) != number {
282
- $value2: unquote("(") + $value2 + unquote(")");
283
- }
284
-
285
328
  @return if($return-calc == true, calc(#{$value1} + #{$value2}), $value1 + unquote(" + ") + $value2);
286
329
  }
287
330
 
@@ -302,10 +345,6 @@ $_luminance-list: .0008 .001 .0011 .0013 .0015 .0017 .002 .0022 .0025 .0027 .003
302
345
  @return $value1 - $value2;
303
346
  }
304
347
 
305
- @if type-of($value1) != number {
306
- $value1: unquote("(") + $value1 + unquote(")");
307
- }
308
-
309
348
  @if type-of($value2) != number {
310
349
  $value2: unquote("(") + $value2 + unquote(")");
311
350
  }
package/scss/_grid.scss CHANGED
@@ -12,29 +12,6 @@
12
12
  }
13
13
  }
14
14
 
15
- @mixin make-cssgrid($columns: $grid-columns, $breakpoints: $grid-breakpoints) {
16
- @each $breakpoint in map-keys($breakpoints) {
17
- $infix: breakpoint-infix($breakpoint, $breakpoints);
18
-
19
- @include media-breakpoint-up($breakpoint, $breakpoints) {
20
- @if $columns > 0 {
21
- @for $i from 1 through $columns {
22
- .g-col#{$infix}-#{$i} {
23
- grid-column: auto / span $i;
24
- }
25
- }
26
-
27
- // `$columns - 1` because offsetting by the width of an entire row isn't possible
28
- @for $i from 0 through ($columns - 1) {
29
- .g-start#{$infix}-#{$i} {
30
- grid-column-start: $i;
31
- }
32
- }
33
- }
34
- }
35
- }
36
- }
37
-
38
15
  @if $enable-cssgrid {
39
16
  .grid {
40
17
  display: grid;
@@ -2,6 +2,8 @@
2
2
  @import "helpers/colored-links";
3
3
  @import "helpers/ratio";
4
4
  @import "helpers/position";
5
+ @import "helpers/stacks";
5
6
  @import "helpers/visually-hidden";
6
7
  @import "helpers/stretched-link";
7
8
  @import "helpers/text-truncation";
9
+ @import "helpers/vr";
package/scss/_mixins.scss CHANGED
@@ -26,6 +26,7 @@
26
26
  // Components
27
27
  @import "mixins/alert";
28
28
  @import "mixins/avatar";
29
+ @import "mixins/backdrop";
29
30
  @import "mixins/buttons";
30
31
  @import "mixins/caret";
31
32
  @import "mixins/pagination";
package/scss/_modal.scss CHANGED
@@ -85,17 +85,7 @@
85
85
 
86
86
  // Modal background
87
87
  .modal-backdrop {
88
- position: fixed;
89
- top: 0;
90
- @include ltr-rtl("left", 0);
91
- z-index: $zindex-modal-backdrop;
92
- width: 100vw;
93
- height: 100vh;
94
- background-color: var(--#{$variable-prefix}modal-backdrop-bg, $modal-backdrop-bg);
95
-
96
- // Fade for backdrop
97
- &.fade { opacity: 0; }
98
- &.show { opacity: $modal-backdrop-opacity; }
88
+ @include overlay-backdrop($zindex-modal-backdrop, var(--#{$variable-prefix}modal-backdrop-bg, $modal-backdrop-bg), $modal-backdrop-opacity);
99
89
  }
100
90
 
101
91
  // Modal header
package/scss/_navbar.scss CHANGED
@@ -218,13 +218,42 @@
218
218
  .navbar-toggler {
219
219
  display: none;
220
220
  }
221
+
222
+ .offcanvas-header {
223
+ display: none;
224
+ }
225
+
226
+ .offcanvas {
227
+ position: inherit;
228
+ bottom: 0;
229
+ z-index: 1000;
230
+ flex-grow: 1;
231
+ visibility: visible !important; // stylelint-disable-line declaration-no-important
232
+ background-color: transparent;
233
+ border-right: 0;
234
+ border-left: 0;
235
+ @include transition(none);
236
+ transform: none;
237
+ }
238
+ .offcanvas-top,
239
+ .offcanvas-bottom {
240
+ height: auto;
241
+ border-top: 0;
242
+ border-bottom: 0;
243
+ }
244
+
245
+ .offcanvas-body {
246
+ display: flex;
247
+ flex-grow: 0;
248
+ padding: 0;
249
+ overflow-y: visible;
250
+ }
221
251
  }
222
252
  }
223
253
  }
224
254
  }
225
255
  // scss-docs-end navbar-expand-loop
226
256
 
227
-
228
257
  // Navbar themes
229
258
  //
230
259
  // Styles for switching between navbars with light or dark background.
@@ -14,6 +14,10 @@
14
14
  @include transition(transform $offcanvas-transition-duration ease-in-out);
15
15
  }
16
16
 
17
+ .offcanvas-backdrop {
18
+ @include overlay-backdrop($zindex-offcanvas-backdrop, $offcanvas-backdrop-bg, $offcanvas-backdrop-opacity);
19
+ }
20
+
17
21
  .offcanvas-header {
18
22
  display: flex;
19
23
  align-items: center;
@@ -44,7 +48,7 @@
44
48
  @include ltr-rtl("left", 0);
45
49
  width: $offcanvas-horizontal-width;
46
50
  @include ltr-rtl("border-right", $offcanvas-border-width solid $offcanvas-border-color);
47
- transform: translateX(-100%);
51
+ @include ltr-rtl-value-only("transform", translateX(-100%), translateX(100%));
48
52
  }
49
53
 
50
54
  .offcanvas-end {
@@ -52,7 +56,7 @@
52
56
  @include ltr-rtl("right", 0);
53
57
  width: $offcanvas-horizontal-width;
54
58
  @include ltr-rtl("border-left", $offcanvas-border-width solid $offcanvas-border-color);
55
- transform: translateX(100%);
59
+ @include ltr-rtl-value-only("transform", translateX(100%), translateX(-100%));
56
60
  }
57
61
 
58
62
  .offcanvas-top {
@@ -0,0 +1,51 @@
1
+ .placeholder {
2
+ display: inline-block;
3
+ min-height: 1em;
4
+ vertical-align: middle;
5
+ cursor: wait;
6
+ background-color: currentColor;
7
+ opacity: $placeholder-opacity-max;
8
+
9
+ &.btn::before {
10
+ display: inline-block;
11
+ content: "";
12
+ }
13
+ }
14
+
15
+ // Sizing
16
+ .placeholder-xs {
17
+ min-height: .6em;
18
+ }
19
+
20
+ .placeholder-sm {
21
+ min-height: .8em;
22
+ }
23
+
24
+ .placeholder-lg {
25
+ min-height: 1.2em;
26
+ }
27
+
28
+ // Animation
29
+ .placeholder-glow {
30
+ .placeholder {
31
+ animation: placeholder-glow 2s ease-in-out infinite;
32
+ }
33
+ }
34
+
35
+ @keyframes placeholder-glow {
36
+ 50% {
37
+ opacity: $placeholder-opacity-min;
38
+ }
39
+ }
40
+
41
+ .placeholder-wave {
42
+ mask-image: linear-gradient(130deg, $black 55%, rgba(0, 0, 0, (1 - $placeholder-opacity-min)) 75%, $black 95%);
43
+ mask-size: 200% 100%;
44
+ animation: placeholder-wave 2s linear infinite;
45
+ }
46
+
47
+ @keyframes placeholder-wave {
48
+ 100% {
49
+ mask-position: -200% 0%;
50
+ }
51
+ }
package/scss/_reboot.scss CHANGED
@@ -26,7 +26,9 @@
26
26
  // null by default, thus nothing is generated.
27
27
 
28
28
  :root {
29
- font-size: $font-size-root;
29
+ @if $font-size-root != null {
30
+ font-size: var(--#{$variable-prefix}root-font-size);
31
+ }
30
32
 
31
33
  @if $enable-smooth-scroll {
32
34
  @media (prefers-reduced-motion: no-preference) {
@@ -43,18 +45,20 @@
43
45
  // 3. Prevent adjustments of font size after orientation changes in iOS.
44
46
  // 4. Change the default tap highlight to be completely transparent in iOS.
45
47
 
48
+ // scss-docs-start reboot-body-rules
46
49
  body {
47
50
  margin: 0; // 1
48
- font-family: $font-family-base;
49
- @include font-size(var(--#{$variable-prefix}font-size-base, $font-size-base));
50
- font-weight: $font-weight-base;
51
- line-height: $line-height-base;
52
- color: var(--#{$variable-prefix}body-color, $body-color);
53
- text-align: $body-text-align;
54
- background-color: var(--#{$variable-prefix}body-bg, $body-bg); // 2
51
+ font-family: var(--#{$variable-prefix}body-font-family);
52
+ @include font-size(var(--#{$variable-prefix}body-font-size));
53
+ font-weight: var(--#{$variable-prefix}body-font-weight);
54
+ line-height: var(--#{$variable-prefix}body-line-height);
55
+ color: var(--#{$variable-prefix}body-color);
56
+ text-align: var(--#{$variable-prefix}body-text-align);
57
+ background-color: var(--#{$variable-prefix}body-bg); // 2
55
58
  -webkit-text-size-adjust: 100%; // 3
56
59
  -webkit-tap-highlight-color: rgba($black, 0); // 4
57
60
  }
61
+ // scss-docs-end reboot-body-rules
58
62
 
59
63
 
60
64
  // Content grouping
package/scss/_root.scss CHANGED
@@ -1,25 +1,54 @@
1
1
  :root {
2
- // Custom variable values only support SassScript inside `#{}`.
2
+ // Note: Custom variable values only support SassScript inside `#{}`.
3
+
4
+ // Colors
5
+ //
6
+ // Generate palettes for full colors, grays, and theme colors.
7
+
3
8
  @each $color, $value in $colors {
4
9
  --#{$variable-prefix}#{$color}: #{$value};
5
10
  }
6
11
 
12
+ @each $color, $value in $grays {
13
+ --#{$variable-prefix}gray-#{$color}: #{$value};
14
+ }
15
+
7
16
  @each $color, $value in $theme-colors {
8
17
  --#{$variable-prefix}#{$color}: #{$value};
9
18
  }
10
19
 
11
- // breakpoints custom properties
12
- @each $bp, $value in $grid-breakpoints {
13
- --#{$variable-prefix}breakpoint-#{$bp}: #{$value};
20
+ @each $color, $value in $theme-colors-rgb {
21
+ --#{$variable-prefix}#{$color}-rgb: #{$value};
14
22
  }
15
23
 
16
- // mobile breakpoint custom property
17
- --#{$variable-prefix}mobile-breakpoint: #{$mobile-breakpoint};
24
+ --#{$variable-prefix}white-rgb: #{to-rgb($white)};
25
+ --#{$variable-prefix}black-rgb: #{to-rgb($black)};
26
+ --#{$variable-prefix}body-color-rgb: #{to-rgb($body-color)};
27
+ --#{$variable-prefix}body-bg-rgb: #{to-rgb($body-bg)};
18
28
 
19
- // Use `inspect` for lists so that quoted items keep the quotes.
29
+ // Fonts
30
+
31
+ // Note: Use `inspect` for lists so that quoted items keep the quotes.
20
32
  // See https://github.com/sass/sass/issues/2383#issuecomment-336349172
21
33
  --#{$variable-prefix}font-sans-serif: #{inspect($font-family-sans-serif)};
22
34
  --#{$variable-prefix}font-monospace: #{inspect($font-family-monospace)};
23
35
  --#{$variable-prefix}gradient: #{$gradient};
36
+
37
+ // Root and body
38
+ // stylelint-disable custom-property-empty-line-before
39
+ // scss-docs-start root-body-variables
40
+ @if $font-size-root != null {
41
+ --#{$variable-prefix}root-font-size: #{$font-size-root};
42
+ }
43
+ --#{$variable-prefix}body-font-family: #{$font-family-base};
44
+ --#{$variable-prefix}body-font-size: #{$font-size-base};
45
+ --#{$variable-prefix}body-font-weight: #{$font-weight-base};
46
+ --#{$variable-prefix}body-line-height: #{$line-height-base};
24
47
  --#{$variable-prefix}body-color: #{$body-color};
48
+ @if $body-text-align != null {
49
+ --#{$variable-prefix}body-text-align: #{$body-text-align};
50
+ }
51
+ --#{$variable-prefix}body-bg: #{$body-bg};
52
+ // scss-docs-end root-body-variables
53
+ // stylelint-enable custom-property-empty-line-before
25
54
  }
package/scss/_tables.scss CHANGED
@@ -43,9 +43,9 @@
43
43
  }
44
44
 
45
45
  // Highlight border color between thead, tbody and tfoot.
46
- > :not(:last-child) > :last-child > * {
47
- // border-bottom-color: $table-group-separator-color;
48
- }
46
+ // > :not(:first-child) {
47
+ // border-top: (2 * $table-border-width) solid $table-group-separator-color;
48
+ // }
49
49
  }
50
50
 
51
51
 
@@ -95,6 +95,10 @@
95
95
  > :not(caption) > * > * {
96
96
  border-bottom-width: 0;
97
97
  }
98
+
99
+ > :not(:first-child) {
100
+ border-top-width: 0;
101
+ }
98
102
  }
99
103
 
100
104
  // Zebra-striping
@@ -102,7 +106,7 @@
102
106
  // Default zebra-stripe styles (alternating gray and transparent backgrounds)
103
107
 
104
108
  .table-striped {
105
- > tbody > tr:nth-of-type(#{$table-striped-order}) {
109
+ > tbody > tr:nth-of-type(#{$table-striped-order}) > * {
106
110
  --#{$variable-prefix}table-accent-bg: var(--#{$variable-prefix}table-striped-bg);
107
111
  color: var(--#{$variable-prefix}table-striped-color);
108
112
  }
@@ -122,7 +126,7 @@
122
126
  // Placed here since it has to come after the potential zebra striping
123
127
 
124
128
  .table-hover {
125
- > tbody > tr:hover {
129
+ > tbody > tr:hover > * {
126
130
  --#{$variable-prefix}table-accent-bg: var(--#{$variable-prefix}table-hover-bg);
127
131
  color: var(--#{$variable-prefix}table-hover-color);
128
132
  }
package/scss/_toasts.scss CHANGED
@@ -10,11 +10,11 @@
10
10
  box-shadow: $toast-box-shadow;
11
11
  @include border-radius($toast-border-radius);
12
12
 
13
- &:not(.showing):not(.show) {
13
+ &.showing {
14
14
  opacity: 0;
15
15
  }
16
16
 
17
- &.hide {
17
+ &:not(.show) {
18
18
  display: none;
19
19
  }
20
20
  }