Skip to content

Commit 6425ffe

Browse files
committed
Merge branch 'v4-next' of https://github.com/coreui/coreui into v4-next
# Conflicts: # CHANGELOG.md # LICENSE # config.yml # docs/assets/scss/_sidebar.scss # docs/content/components/alerts.md # docs/layouts/partials/header.html # js/index.esm.js # js/index.umd.js # js/src/alert.js # js/src/base-component.js # js/src/button.js # js/src/carousel.js # js/src/collapse.js # js/src/dom/data.js # js/src/dom/event-handler.js # js/src/dom/manipulator.js # js/src/dom/selector-engine.js # js/src/dropdown.js # js/src/modal.js # js/src/navigation.js # js/src/offcanvas.js # js/src/popover.js # js/src/scrollspy.js # js/src/sidebar.js # js/src/tab.js # js/src/toast.js # js/src/tooltip.js # js/src/util/index.js # js/src/util/sanitizer.js # package-lock.json # package.json # scss/_mixins.scss # scss/_utilities.scss # scss/_variables.scss # scss/coreui-grid.rtl.scss # scss/coreui-grid.scss # scss/coreui-reboot.rtl.scss # scss/coreui-reboot.scss # scss/coreui-utilities.rtl.scss # scss/coreui-utilities.scss # scss/coreui.rtl.scss # scss/coreui.scss # scss/forms/_form-select.scss # scss/mixins/_utilities.scss
2 parents 2530923 + ab30326 commit 6425ffe

File tree

255 files changed

+6924
-11545
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

255 files changed

+6924
-11545
lines changed

.eslintignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
**/vendor/
44
/_gh_pages/
55
/js/coverage/
6-
/js/tests/integration/
76
/docs/content/_index.html
87
/docs/static/sw.js
98
/docs/layouts/

.eslintrc.json

Lines changed: 152 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,35 @@
1414
"error",
1515
"never"
1616
],
17+
"import/extensions": [
18+
"error",
19+
"ignorePackages",
20+
{
21+
"js": "always"
22+
}
23+
],
24+
"import/first": "error",
25+
"import/newline-after-import": "error",
26+
"import/no-absolute-path": "error",
27+
"import/no-amd": "error",
28+
"import/no-cycle": [
29+
"error",
30+
{
31+
"ignoreExternal": true
32+
}
33+
],
34+
"import/no-duplicates": "error",
35+
"import/no-extraneous-dependencies": "error",
36+
"import/no-mutable-exports": "error",
37+
"import/no-named-as-default": "error",
38+
"import/no-named-as-default-member": "error",
39+
"import/no-named-default": "error",
40+
"import/no-self-import": "error",
41+
"import/no-unassigned-import": [
42+
"error"
43+
],
44+
"import/no-useless-path-segments": "error",
45+
"import/order": "error",
1746
"indent": [
1847
"error",
1948
2,
@@ -51,7 +80,9 @@
5180
"error",
5281
"never"
5382
],
83+
"strict": "error",
5484
"unicorn/explicit-length-check": "off",
85+
"unicorn/filename-case": "off",
5586
"unicorn/no-array-callback-reference": "off",
5687
"unicorn/no-array-method-this-argument": "off",
5788
"unicorn/no-null": "off",
@@ -63,5 +94,125 @@
6394
"unicorn/prefer-query-selector": "off",
6495
"unicorn/prefer-spread": "off",
6596
"unicorn/prevent-abbreviations": "off"
66-
}
97+
},
98+
"overrides": [
99+
{
100+
"files": [
101+
"build/**"
102+
],
103+
"env": {
104+
"browser": false,
105+
"node": true
106+
},
107+
"parserOptions": {
108+
"sourceType": "script"
109+
},
110+
"rules": {
111+
"no-console": "off",
112+
"unicorn/prefer-top-level-await": "off"
113+
}
114+
},
115+
{
116+
"files": [
117+
"js/**"
118+
],
119+
"parserOptions": {
120+
"sourceType": "module"
121+
}
122+
},
123+
{
124+
"files": [
125+
"js/tests/*.js",
126+
"js/tests/integration/rollup*.js"
127+
],
128+
"env": {
129+
"node": true
130+
},
131+
"parserOptions": {
132+
"sourceType": "script"
133+
}
134+
},
135+
{
136+
"files": [
137+
"js/tests/unit/**"
138+
],
139+
"env": {
140+
"jasmine": true
141+
},
142+
"rules": {
143+
"no-console": "off",
144+
"unicorn/consistent-function-scoping": "off",
145+
"unicorn/no-useless-undefined": "off",
146+
"unicorn/prefer-add-event-listener": "off"
147+
}
148+
},
149+
{
150+
"files": [
151+
"js/tests/visual/**"
152+
],
153+
"plugins": [
154+
"html"
155+
],
156+
"settings": {
157+
"html/html-extensions": [
158+
".html"
159+
]
160+
},
161+
"rules": {
162+
"no-console": "off",
163+
"no-new": "off",
164+
"unicorn/no-array-for-each": "off"
165+
}
166+
},
167+
{
168+
"files": [
169+
"scss/tests/**"
170+
],
171+
"env": {
172+
"node": true
173+
},
174+
"parserOptions": {
175+
"sourceType": "script"
176+
}
177+
},
178+
{
179+
"files": [
180+
"docs/**"
181+
],
182+
"env": {
183+
"browser": true,
184+
"node": false
185+
},
186+
"parserOptions": {
187+
"sourceType": "script",
188+
"ecmaVersion": 2019
189+
},
190+
"rules": {
191+
"no-new": "off",
192+
"unicorn/no-array-for-each": "off",
193+
"unicorn/numeric-separators-style": "off"
194+
}
195+
},
196+
{
197+
"files": [
198+
"**/*.md"
199+
],
200+
"plugins": [
201+
"markdown"
202+
],
203+
"processor": "markdown/markdown"
204+
},
205+
{
206+
"files": [
207+
"**/*.md/*.js"
208+
],
209+
"extends": "plugin:markdown/recommended",
210+
"parserOptions": {
211+
"sourceType": "module"
212+
},
213+
"rules": {
214+
"unicorn/prefer-node-protocol": "off"
215+
}
216+
}
217+
]
67218
}

.stylelintrc

Lines changed: 47 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -2,39 +2,59 @@
22
"extends": [
33
"stylelint-config-twbs-bootstrap"
44
],
5-
"rules": {
6-
"declaration-property-value-disallowed-list": {
7-
"border": "none",
8-
"outline": "none"
9-
},
10-
"function-disallowed-list": [
11-
"calc",
12-
"lighten",
13-
"darken"
14-
],
15-
"property-disallowed-list": [
16-
"border-radius",
17-
"border-top-left-radius",
18-
"border-top-right-radius",
19-
"border-bottom-right-radius",
20-
"border-bottom-left-radius",
21-
"transition"
22-
],
23-
"scss/dollar-variable-default": [
24-
true,
25-
{
26-
"ignore": "local"
27-
}
28-
],
29-
"scss/selector-no-union-class-name": true
30-
},
5+
"reportInvalidScopeDisables": true,
6+
"reportNeedlessDisables": true,
317
"overrides": [
8+
{
9+
"files": "**/*.scss",
10+
"rules": {
11+
"declaration-property-value-disallowed-list": {
12+
"border": "none",
13+
"outline": "none"
14+
},
15+
"function-disallowed-list": [
16+
"calc",
17+
"lighten",
18+
"darken"
19+
],
20+
"property-disallowed-list": [
21+
"border-radius",
22+
"border-top-left-radius",
23+
"border-top-right-radius",
24+
"border-bottom-right-radius",
25+
"border-bottom-left-radius",
26+
"transition"
27+
],
28+
"scss/dollar-variable-default": [
29+
true,
30+
{
31+
"ignore": "local"
32+
}
33+
],
34+
"scss/selector-no-union-class-name": true
35+
}
36+
},
3237
{
3338
"files": "scss/**/*.{test,spec}.scss",
3439
"rules": {
3540
"scss/dollar-variable-default": null,
3641
"declaration-no-important": null
3742
}
43+
},
44+
{
45+
"files": "site/**/*.scss",
46+
"rules": {
47+
"scss/dollar-variable-default": null
48+
}
49+
},
50+
{
51+
"files": "site/**/examples/**/*.css",
52+
"rules": {
53+
"comment-empty-line-before": null,
54+
"property-no-vendor-prefix": null,
55+
"selector-no-qualifying-type": null,
56+
"value-no-vendor-prefix": null
57+
}
3858
}
3959
]
40-
}
60+
}

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
Copyright (c) 2022 creativeLabs Łukasz Holeczek
1+
Copyright (c) 2023 creativeLabs Łukasz Holeczek
22

33
This is commercial software. To use it, you have to own a commercial license.
File renamed without changes.

scss/themes/dark/_root.scss renamed to _old/themes/dark/_root.scss

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
--#{$prefix}body-bg-rgb: #{to-rgb($body-bg-dt)};
1313

1414
// Gradients
15-
@each $color, $map in $theme-gradients-dt {
16-
--#{$prefix}#{$color}-start: #{map-get($map, "start")};
17-
--#{$prefix}#{$color}-stop: #{map-get($map, "stop")};
18-
}
15+
// @each $color, $map in $theme-gradients-dt {
16+
// --#{$prefix}#{$color}-start: #{map-get($map, "start")};
17+
// --#{$prefix}#{$color}-stop: #{map-get($map, "stop")};
18+
// }
1919
}
File renamed without changes.
File renamed without changes.

build/banner.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
'use strict'
22

33
const pkg = require('../package.json')
4+
45
const year = new Date().getFullYear()
56

67
function getBanner(pluginFilename) {

build/change-version.js

Lines changed: 32 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22

33
/*!
44
* Script to update version number references in the project.
5-
* Copyright 2017-2022 The Bootstrap Authors
6-
* Copyright 2017-2022 Twitter, Inc.
5+
* Copyright 2017-2023 The Bootstrap Authors
76
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
87
*/
98

@@ -24,9 +23,6 @@ const GLOBBY_OPTIONS = {
2423
cwd: path.join(__dirname, '..'),
2524
gitignore: true
2625
}
27-
const EXCLUDED_FILES = [
28-
'CHANGELOG.md'
29-
]
3026

3127
// Blame TC39... https://github.com/benjamingr/RegExp.escape/issues/37
3228
function regExpQuote(string) {
@@ -39,9 +35,17 @@ function regExpQuoteReplacement(string) {
3935

4036
async function replaceRecursively(file, oldVersion, newVersion) {
4137
const originalString = await fs.readFile(file, 'utf8')
42-
const newString = originalString.replace(
43-
new RegExp(regExpQuote(oldVersion), 'g'), regExpQuoteReplacement(newVersion)
44-
)
38+
const newString = originalString
39+
.replace(
40+
new RegExp(regExpQuote(oldVersion), 'g'),
41+
regExpQuoteReplacement(newVersion)
42+
)
43+
// Also replace the version used by the rubygem,
44+
// which is using periods (`.`) instead of hyphens (`-`)
45+
.replace(
46+
new RegExp(regExpQuote(oldVersion.replace(/-/g, '.')), 'g'),
47+
regExpQuoteReplacement(newVersion.replace(/-/g, '.'))
48+
)
4549

4650
// No need to move any further if the strings are identical
4751
if (originalString === newString) {
@@ -59,22 +63,35 @@ async function replaceRecursively(file, oldVersion, newVersion) {
5963
await fs.writeFile(file, newString, 'utf8')
6064
}
6165

66+
function showUsage(args) {
67+
console.error('USAGE: change-version old_version new_version [--verbose] [--dry[-run]]')
68+
console.error('Got arguments:', args)
69+
process.exit(1)
70+
}
71+
6272
async function main(args) {
6373
let [oldVersion, newVersion] = args
6474

6575
if (!oldVersion || !newVersion) {
66-
console.error('USAGE: change-version old_version new_version [--verbose] [--dry[-run]]')
67-
console.error('Got arguments:', args)
68-
process.exit(1)
76+
showUsage(args)
6977
}
7078

71-
// Strip any leading `v` from arguments because otherwise we will end up with duplicate `v`s
72-
[oldVersion, newVersion] = [oldVersion, newVersion].map(arg => arg.startsWith('v') ? arg.slice(1) : arg)
79+
// Strip any leading `v` from arguments because
80+
// otherwise we will end up with duplicate `v`s
81+
[oldVersion, newVersion] = [oldVersion, newVersion].map(arg => {
82+
return arg.startsWith('v') ? arg.slice(1) : arg
83+
})
84+
85+
if (oldVersion === newVersion) {
86+
showUsage(args)
87+
}
7388

7489
try {
75-
const files = await globby(GLOB, GLOBBY_OPTIONS, EXCLUDED_FILES)
90+
const files = await globby(GLOB, GLOBBY_OPTIONS)
7691

77-
await Promise.all(files.map(file => replaceRecursively(file, oldVersion, newVersion)))
92+
await Promise.all(
93+
files.map(file => replaceRecursively(file, oldVersion, newVersion))
94+
)
7895
} catch (error) {
7996
console.error(error)
8097
process.exit(1)

0 commit comments

Comments
 (0)