@unlk/keymaster 1.0.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.
- package/fonts/fa-brands-400.ttf +0 -0
- package/fonts/fa-brands-400.woff2 +0 -0
- package/fonts/fa-duotone-900.ttf +0 -0
- package/fonts/fa-duotone-900.woff2 +0 -0
- package/fonts/fa-duotone-light-300.ttf +0 -0
- package/fonts/fa-duotone-light-300.woff2 +0 -0
- package/fonts/fa-duotone-regular-400.ttf +0 -0
- package/fonts/fa-duotone-regular-400.woff2 +0 -0
- package/fonts/fa-duotone-thin-100.ttf +0 -0
- package/fonts/fa-duotone-thin-100.woff2 +0 -0
- package/fonts/fa-light-300.ttf +0 -0
- package/fonts/fa-light-300.woff2 +0 -0
- package/fonts/fa-regular-400.ttf +0 -0
- package/fonts/fa-regular-400.woff2 +0 -0
- package/fonts/fa-sharp-duotone-light-300.ttf +0 -0
- package/fonts/fa-sharp-duotone-light-300.woff2 +0 -0
- package/fonts/fa-sharp-duotone-regular-400.ttf +0 -0
- package/fonts/fa-sharp-duotone-regular-400.woff2 +0 -0
- package/fonts/fa-sharp-duotone-solid-900.ttf +0 -0
- package/fonts/fa-sharp-duotone-solid-900.woff2 +0 -0
- package/fonts/fa-sharp-duotone-thin-100.ttf +0 -0
- package/fonts/fa-sharp-duotone-thin-100.woff2 +0 -0
- package/fonts/fa-sharp-light-300.ttf +0 -0
- package/fonts/fa-sharp-light-300.woff2 +0 -0
- package/fonts/fa-sharp-regular-400.ttf +0 -0
- package/fonts/fa-sharp-regular-400.woff2 +0 -0
- package/fonts/fa-sharp-solid-900.ttf +0 -0
- package/fonts/fa-sharp-solid-900.woff2 +0 -0
- package/fonts/fa-sharp-thin-100.ttf +0 -0
- package/fonts/fa-sharp-thin-100.woff2 +0 -0
- package/fonts/fa-solid-900.ttf +0 -0
- package/fonts/fa-solid-900.woff2 +0 -0
- package/fonts/fa-thin-100.ttf +0 -0
- package/fonts/fa-thin-100.woff2 +0 -0
- package/fonts/fa-v4compatibility.ttf +0 -0
- package/fonts/fa-v4compatibility.woff2 +0 -0
- package/js/bootstrap.js +13 -0
- package/js/datepicker.js +78 -0
- package/package.json +81 -0
- package/scss/assets/bootstrap5/_accordion.scss +158 -0
- package/scss/assets/bootstrap5/_alert.scss +68 -0
- package/scss/assets/bootstrap5/_badge.scss +38 -0
- package/scss/assets/bootstrap5/_breadcrumb.scss +40 -0
- package/scss/assets/bootstrap5/_button-group.scss +142 -0
- package/scss/assets/bootstrap5/_buttons.scss +216 -0
- package/scss/assets/bootstrap5/_card.scss +239 -0
- package/scss/assets/bootstrap5/_carousel.scss +236 -0
- package/scss/assets/bootstrap5/_close.scss +63 -0
- package/scss/assets/bootstrap5/_containers.scss +41 -0
- package/scss/assets/bootstrap5/_dropdown.scss +250 -0
- package/scss/assets/bootstrap5/_forms.scss +9 -0
- package/scss/assets/bootstrap5/_functions.scss +302 -0
- package/scss/assets/bootstrap5/_grid.scss +39 -0
- package/scss/assets/bootstrap5/_helpers.scss +12 -0
- package/scss/assets/bootstrap5/_images.scss +42 -0
- package/scss/assets/bootstrap5/_list-group.scss +197 -0
- package/scss/assets/bootstrap5/_maps.scss +174 -0
- package/scss/assets/bootstrap5/_mixins.scss +42 -0
- package/scss/assets/bootstrap5/_modal.scss +236 -0
- package/scss/assets/bootstrap5/_nav.scss +197 -0
- package/scss/assets/bootstrap5/_navbar.scss +289 -0
- package/scss/assets/bootstrap5/_offcanvas.scss +143 -0
- package/scss/assets/bootstrap5/_pagination.scss +109 -0
- package/scss/assets/bootstrap5/_placeholders.scss +51 -0
- package/scss/assets/bootstrap5/_popover.scss +196 -0
- package/scss/assets/bootstrap5/_progress.scss +68 -0
- package/scss/assets/bootstrap5/_reboot.scss +611 -0
- package/scss/assets/bootstrap5/_root.scss +187 -0
- package/scss/assets/bootstrap5/_spinners.scss +85 -0
- package/scss/assets/bootstrap5/_tables.scss +171 -0
- package/scss/assets/bootstrap5/_toasts.scss +73 -0
- package/scss/assets/bootstrap5/_tooltip.scss +119 -0
- package/scss/assets/bootstrap5/_transitions.scss +27 -0
- package/scss/assets/bootstrap5/_type.scss +106 -0
- package/scss/assets/bootstrap5/_utilities.scss +806 -0
- package/scss/assets/bootstrap5/_variables-dark.scss +87 -0
- package/scss/assets/bootstrap5/_variables.scss +1751 -0
- package/scss/assets/bootstrap5/bootstrap-grid.scss +62 -0
- package/scss/assets/bootstrap5/bootstrap-reboot.scss +10 -0
- package/scss/assets/bootstrap5/bootstrap-utilities.scss +19 -0
- package/scss/assets/bootstrap5/bootstrap.scss +52 -0
- package/scss/assets/bootstrap5/forms/_floating-labels.scss +95 -0
- package/scss/assets/bootstrap5/forms/_form-check.scss +189 -0
- package/scss/assets/bootstrap5/forms/_form-control.scss +214 -0
- package/scss/assets/bootstrap5/forms/_form-range.scss +91 -0
- package/scss/assets/bootstrap5/forms/_form-select.scss +80 -0
- package/scss/assets/bootstrap5/forms/_form-text.scss +11 -0
- package/scss/assets/bootstrap5/forms/_input-group.scss +132 -0
- package/scss/assets/bootstrap5/forms/_labels.scss +36 -0
- package/scss/assets/bootstrap5/forms/_validation.scss +12 -0
- package/scss/assets/bootstrap5/helpers/_clearfix.scss +3 -0
- package/scss/assets/bootstrap5/helpers/_color-bg.scss +7 -0
- package/scss/assets/bootstrap5/helpers/_colored-links.scss +30 -0
- package/scss/assets/bootstrap5/helpers/_focus-ring.scss +5 -0
- package/scss/assets/bootstrap5/helpers/_icon-link.scss +25 -0
- package/scss/assets/bootstrap5/helpers/_position.scss +36 -0
- package/scss/assets/bootstrap5/helpers/_ratio.scss +26 -0
- package/scss/assets/bootstrap5/helpers/_stacks.scss +15 -0
- package/scss/assets/bootstrap5/helpers/_stretched-link.scss +15 -0
- package/scss/assets/bootstrap5/helpers/_text-truncation.scss +7 -0
- package/scss/assets/bootstrap5/helpers/_visually-hidden.scss +8 -0
- package/scss/assets/bootstrap5/helpers/_vr.scss +8 -0
- package/scss/assets/bootstrap5/mixins/_alert.scss +18 -0
- package/scss/assets/bootstrap5/mixins/_backdrop.scss +14 -0
- package/scss/assets/bootstrap5/mixins/_banner.scss +7 -0
- package/scss/assets/bootstrap5/mixins/_border-radius.scss +78 -0
- package/scss/assets/bootstrap5/mixins/_box-shadow.scss +18 -0
- package/scss/assets/bootstrap5/mixins/_breakpoints.scss +127 -0
- package/scss/assets/bootstrap5/mixins/_buttons.scss +70 -0
- package/scss/assets/bootstrap5/mixins/_caret.scss +69 -0
- package/scss/assets/bootstrap5/mixins/_clearfix.scss +9 -0
- package/scss/assets/bootstrap5/mixins/_color-mode.scss +21 -0
- package/scss/assets/bootstrap5/mixins/_color-scheme.scss +7 -0
- package/scss/assets/bootstrap5/mixins/_container.scss +11 -0
- package/scss/assets/bootstrap5/mixins/_deprecate.scss +10 -0
- package/scss/assets/bootstrap5/mixins/_forms.scss +163 -0
- package/scss/assets/bootstrap5/mixins/_gradients.scss +47 -0
- package/scss/assets/bootstrap5/mixins/_grid.scss +151 -0
- package/scss/assets/bootstrap5/mixins/_image.scss +16 -0
- package/scss/assets/bootstrap5/mixins/_list-group.scss +26 -0
- package/scss/assets/bootstrap5/mixins/_lists.scss +7 -0
- package/scss/assets/bootstrap5/mixins/_pagination.scss +10 -0
- package/scss/assets/bootstrap5/mixins/_reset-text.scss +17 -0
- package/scss/assets/bootstrap5/mixins/_resize.scss +6 -0
- package/scss/assets/bootstrap5/mixins/_table-variants.scss +24 -0
- package/scss/assets/bootstrap5/mixins/_text-truncate.scss +8 -0
- package/scss/assets/bootstrap5/mixins/_transition.scss +26 -0
- package/scss/assets/bootstrap5/mixins/_utilities.scss +97 -0
- package/scss/assets/bootstrap5/mixins/_visually-hidden.scss +33 -0
- package/scss/assets/bootstrap5/utilities/_api.scss +47 -0
- package/scss/assets/bootstrap5/vendor/_rfs.scss +348 -0
- package/scss/assets/fontawesome/_animated.scss +152 -0
- package/scss/assets/fontawesome/_bordered-pulled.scss +20 -0
- package/scss/assets/fontawesome/_core.scss +150 -0
- package/scss/assets/fontawesome/_duotone-icons.scss +12 -0
- package/scss/assets/fontawesome/_fixed-width.scss +7 -0
- package/scss/assets/fontawesome/_functions.scss +57 -0
- package/scss/assets/fontawesome/_icons.scss +13 -0
- package/scss/assets/fontawesome/_list.scss +18 -0
- package/scss/assets/fontawesome/_mixins.scss +89 -0
- package/scss/assets/fontawesome/_rotated-flipped.scss +31 -0
- package/scss/assets/fontawesome/_screen-reader.scss +14 -0
- package/scss/assets/fontawesome/_shims.scss +1578 -0
- package/scss/assets/fontawesome/_sizing.scss +16 -0
- package/scss/assets/fontawesome/_stacked.scss +32 -0
- package/scss/assets/fontawesome/_variables.scss +9734 -0
- package/scss/assets/fontawesome/brands.scss +30 -0
- package/scss/assets/fontawesome/duotone-light.scss +69 -0
- package/scss/assets/fontawesome/duotone-regular.scss +69 -0
- package/scss/assets/fontawesome/duotone-thin.scss +69 -0
- package/scss/assets/fontawesome/duotone.scss +65 -0
- package/scss/assets/fontawesome/fontawesome.scss +21 -0
- package/scss/assets/fontawesome/light.scss +27 -0
- package/scss/assets/fontawesome/regular.scss +27 -0
- package/scss/assets/fontawesome/sharp-duotone-light.scss +69 -0
- package/scss/assets/fontawesome/sharp-duotone-regular.scss +69 -0
- package/scss/assets/fontawesome/sharp-duotone-solid.scss +77 -0
- package/scss/assets/fontawesome/sharp-duotone-thin.scss +69 -0
- package/scss/assets/fontawesome/sharp-light.scss +27 -0
- package/scss/assets/fontawesome/sharp-regular.scss +27 -0
- package/scss/assets/fontawesome/sharp-solid.scss +27 -0
- package/scss/assets/fontawesome/sharp-thin.scss +27 -0
- package/scss/assets/fontawesome/solid.scss +27 -0
- package/scss/assets/fontawesome/thin.scss +27 -0
- package/scss/assets/fontawesome/v4-shims.scss +11 -0
- package/scss/keymaster.scss +14 -0
- package/scss/theme/_overrides.scss +266 -0
- package/scss/theme/_utility-overrides.scss +7 -0
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
package/js/bootstrap.js
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
export { default as Alert } from 'bootstrap/js/dist/alert';
|
2
|
+
export { default as Carousel } from 'bootstrap/js/dist/carousel';
|
3
|
+
export { default as Button } from 'bootstrap/js/dist/button';
|
4
|
+
export { default as Dropdown } from 'bootstrap/js/dist/dropdown';
|
5
|
+
export { default as Collapse } from 'bootstrap/js/dist/collapse';
|
6
|
+
export { default as Offcanvas } from 'bootstrap/js/dist/offcanvas';
|
7
|
+
export { default as Modal } from 'bootstrap/js/dist/modal';
|
8
|
+
export { default as Scrollspy } from 'bootstrap/js/dist/scrollspy';
|
9
|
+
export { default as Popover } from 'bootstrap/js/dist/popover';
|
10
|
+
export { default as Toast } from 'bootstrap/js/dist/toast';
|
11
|
+
export { default as Tab } from 'bootstrap/js/dist/tab';
|
12
|
+
export { default as Tooltip } from 'bootstrap/js/dist/tooltip';
|
13
|
+
export { default as Datepicker } from './datepicker';
|
package/js/datepicker.js
ADDED
@@ -0,0 +1,78 @@
|
|
1
|
+
import BaseComponent from 'bootstrap/js/src/base-component.js';
|
2
|
+
import EventHandler from 'bootstrap/js/src/dom/event-handler.js';
|
3
|
+
import { defineJQueryPlugin } from 'bootstrap/js/src/util/index.js';
|
4
|
+
|
5
|
+
const NAME = 'datepicker';
|
6
|
+
const DATA_KEY = 'bs.datepicker';
|
7
|
+
const EVENT_KEY = `.${DATA_KEY}`;
|
8
|
+
const DATA_API_KEY = '.data-api';
|
9
|
+
|
10
|
+
const SELECTOR_INPUT = '[data-bs-toggle="datepicker"]';
|
11
|
+
const EVENT_FOCUS_DATA_API = `focus${EVENT_KEY}${DATA_API_KEY}`;
|
12
|
+
|
13
|
+
class Datepicker extends BaseComponent {
|
14
|
+
// Getters
|
15
|
+
static get NAME() {
|
16
|
+
return NAME;
|
17
|
+
}
|
18
|
+
|
19
|
+
// Static
|
20
|
+
static jQueryInterface(config) {
|
21
|
+
return this.each(function () {
|
22
|
+
const data = Datepicker.getOrCreateInstance(this);
|
23
|
+
|
24
|
+
if (config === 'toggle') {
|
25
|
+
data[config]();
|
26
|
+
}
|
27
|
+
});
|
28
|
+
}
|
29
|
+
}
|
30
|
+
|
31
|
+
/**
|
32
|
+
* Data API implementation
|
33
|
+
*/
|
34
|
+
EventHandler.on(document, EVENT_FOCUS_DATA_API, SELECTOR_INPUT, (event) => {
|
35
|
+
const input = event.target.closest(SELECTOR_INPUT);
|
36
|
+
|
37
|
+
if (isTouchDevice()) {
|
38
|
+
const datePicker = input.cloneNode(true);
|
39
|
+
|
40
|
+
datePicker.type = 'date';
|
41
|
+
datePicker.removeAttribute('data-bs-toggle');
|
42
|
+
|
43
|
+
input.parentNode.prepend(datePicker);
|
44
|
+
|
45
|
+
datePicker.focus();
|
46
|
+
datePicker.showPicker();
|
47
|
+
input.remove();
|
48
|
+
|
49
|
+
datePicker.addEventListener('blur', function blurHandler() {
|
50
|
+
if (!datePicker.value) {
|
51
|
+
datePicker.parentNode.prepend(input);
|
52
|
+
datePicker.remove();
|
53
|
+
datePicker.removeEventListener('blur', blurHandler);
|
54
|
+
}
|
55
|
+
});
|
56
|
+
} else {
|
57
|
+
input.type = 'date';
|
58
|
+
|
59
|
+
input.addEventListener('blur', function blurHandler() {
|
60
|
+
if (!input.value) {
|
61
|
+
input.type = 'text';
|
62
|
+
}
|
63
|
+
|
64
|
+
input.removeEventListener('blur', blurHandler);
|
65
|
+
});
|
66
|
+
}
|
67
|
+
});
|
68
|
+
|
69
|
+
function isTouchDevice() {
|
70
|
+
return 'ontouchstart' in window || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0;
|
71
|
+
}
|
72
|
+
|
73
|
+
/**
|
74
|
+
* jQuery
|
75
|
+
*/
|
76
|
+
defineJQueryPlugin(Datepicker);
|
77
|
+
|
78
|
+
export default Datepicker;
|
package/package.json
ADDED
@@ -0,0 +1,81 @@
|
|
1
|
+
{
|
2
|
+
"name": "@unlk/keymaster",
|
3
|
+
"version": "1.0.0",
|
4
|
+
"description": "Unlock Design System Packaged with Bootstrap",
|
5
|
+
"main": "index.js",
|
6
|
+
"scripts": {
|
7
|
+
"bs": "browser-sync start --config build/browser-sync.config.js",
|
8
|
+
"css": "npm-run-all css-compile css-postcss css-minify",
|
9
|
+
"css-compile": "sass --style expanded --source-map --embed-sources --no-error-css --quiet scss/keymaster.scss:dist/css/keymaster.css",
|
10
|
+
"css-lint": "stylelint \"**/*.{css,scss}\" --cache --cache-location .cache/.stylelintcache --rd",
|
11
|
+
"css-minify": "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\"",
|
12
|
+
"css-postcss": "postcss --config build/postcss.config.js --replace \"dist/css/*.css\" \"!dist/css/*.rtl*.css\" \"!dist/css/*.min.css\"",
|
13
|
+
"js": "npm-run-all js-compile js-minify",
|
14
|
+
"js-compile": "rollup --config build/rollup.config.js --sourcemap",
|
15
|
+
"js-lint": "eslint --cache --cache-location .cache/.eslintcache --report-unused-disable-directives --ext .html,.js .",
|
16
|
+
"js-minify": "terser --config-file build/terser.config.json --output dist/js/keymaster.min.js dist/js/keymaster.js",
|
17
|
+
"watch": "npm-run-all --parallel watch-run-*",
|
18
|
+
"watch-bs": "npm-run-all --parallel bs watch-run-*",
|
19
|
+
"watch-run-css": "nodemon --watch src/sass/ --ext scss --exec \"npm-run-all css\"",
|
20
|
+
"watch-run-js": "nodemon --watch src/js/ --ext js --exec \"npm-run-all js\"",
|
21
|
+
"copy-assets": "node build/copy-assets.js",
|
22
|
+
"dist": "npm-run-all --parallel css js",
|
23
|
+
"dist-build": "node build/dist-build.js",
|
24
|
+
"dist-clean": "node build/dist-clean.js",
|
25
|
+
"lint": "npm-run-all --aggregate-output --continue-on-error --parallel js-lint css-lint"
|
26
|
+
},
|
27
|
+
"files": [
|
28
|
+
"dist",
|
29
|
+
"scss",
|
30
|
+
"js",
|
31
|
+
"fonts",
|
32
|
+
"CHANGELOG.md"
|
33
|
+
],
|
34
|
+
"engines": {
|
35
|
+
"node": ">=14"
|
36
|
+
},
|
37
|
+
"keywords": [
|
38
|
+
"design-system",
|
39
|
+
"theme",
|
40
|
+
"framework",
|
41
|
+
"bootstrap",
|
42
|
+
"keymaster"
|
43
|
+
],
|
44
|
+
"author": "Unlk Developers",
|
45
|
+
"license": "UNLICENSED",
|
46
|
+
"homepage": "https://unlock-com.github.io/keymaster",
|
47
|
+
"peerDependencies": {
|
48
|
+
"@popperjs/core": "^2.11.0",
|
49
|
+
"bootstrap": "^5.3.0"
|
50
|
+
},
|
51
|
+
"devDependencies": {
|
52
|
+
"@babel/core": "^7.16.0",
|
53
|
+
"@babel/preset-env": "^7.16.4",
|
54
|
+
"@fortawesome/fontawesome-pro": "^6.1.1",
|
55
|
+
"@popperjs/core": "^2.11.0",
|
56
|
+
"@rollup/plugin-babel": "^5.3.0",
|
57
|
+
"@rollup/plugin-commonjs": "^21.0.0",
|
58
|
+
"@rollup/plugin-multi-entry": "^4.1.0",
|
59
|
+
"@rollup/plugin-node-resolve": "^13.0.6",
|
60
|
+
"@rollup/plugin-replace": "^3.0.0",
|
61
|
+
"autoprefixer": "^10.4.0",
|
62
|
+
"bootstrap": "^5.3.0",
|
63
|
+
"browser-sync": "^3.0.3",
|
64
|
+
"browserslist": "^4.18.1",
|
65
|
+
"caniuse-lite": "^1.0.30001283",
|
66
|
+
"clean-css-cli": "^5.4.2",
|
67
|
+
"del": "^6.0.0",
|
68
|
+
"nodemon": "^2.0.15",
|
69
|
+
"npm-run-all": "^4.1.5",
|
70
|
+
"postcss": "^8.4.4",
|
71
|
+
"postcss-cli": "^9.0.2",
|
72
|
+
"rollup": "^2.60.2",
|
73
|
+
"sass": "^1.44.0",
|
74
|
+
"terser": "^5.10.0"
|
75
|
+
},
|
76
|
+
"config": {
|
77
|
+
"commitizen": {
|
78
|
+
"path": "./node_modules/cz-conventional-changelog"
|
79
|
+
}
|
80
|
+
}
|
81
|
+
}
|
@@ -0,0 +1,158 @@
|
|
1
|
+
//
|
2
|
+
// Base styles
|
3
|
+
//
|
4
|
+
|
5
|
+
.accordion {
|
6
|
+
// scss-docs-start accordion-css-vars
|
7
|
+
--#{$prefix}accordion-color: #{$accordion-color};
|
8
|
+
--#{$prefix}accordion-bg: #{$accordion-bg};
|
9
|
+
--#{$prefix}accordion-transition: #{$accordion-transition};
|
10
|
+
--#{$prefix}accordion-border-color: #{$accordion-border-color};
|
11
|
+
--#{$prefix}accordion-border-width: #{$accordion-border-width};
|
12
|
+
--#{$prefix}accordion-border-radius: #{$accordion-border-radius};
|
13
|
+
--#{$prefix}accordion-inner-border-radius: #{$accordion-inner-border-radius};
|
14
|
+
--#{$prefix}accordion-btn-padding-x: #{$accordion-button-padding-x};
|
15
|
+
--#{$prefix}accordion-btn-padding-y: #{$accordion-button-padding-y};
|
16
|
+
--#{$prefix}accordion-btn-color: #{$accordion-button-color};
|
17
|
+
--#{$prefix}accordion-btn-bg: #{$accordion-button-bg};
|
18
|
+
--#{$prefix}accordion-btn-icon: #{escape-svg($accordion-button-icon)};
|
19
|
+
--#{$prefix}accordion-btn-icon-width: #{$accordion-icon-width};
|
20
|
+
--#{$prefix}accordion-btn-icon-transform: #{$accordion-icon-transform};
|
21
|
+
--#{$prefix}accordion-btn-icon-transition: #{$accordion-icon-transition};
|
22
|
+
--#{$prefix}accordion-btn-active-icon: #{escape-svg($accordion-button-active-icon)};
|
23
|
+
--#{$prefix}accordion-btn-focus-box-shadow: #{$accordion-button-focus-box-shadow};
|
24
|
+
--#{$prefix}accordion-body-padding-x: #{$accordion-body-padding-x};
|
25
|
+
--#{$prefix}accordion-body-padding-y: #{$accordion-body-padding-y};
|
26
|
+
--#{$prefix}accordion-active-color: #{$accordion-button-active-color};
|
27
|
+
--#{$prefix}accordion-active-bg: #{$accordion-button-active-bg};
|
28
|
+
// scss-docs-end accordion-css-vars
|
29
|
+
}
|
30
|
+
|
31
|
+
.accordion-button {
|
32
|
+
position: relative;
|
33
|
+
display: flex;
|
34
|
+
align-items: center;
|
35
|
+
width: 100%;
|
36
|
+
padding: var(--#{$prefix}accordion-btn-padding-y) var(--#{$prefix}accordion-btn-padding-x);
|
37
|
+
@include font-size($font-size-base);
|
38
|
+
color: var(--#{$prefix}accordion-btn-color);
|
39
|
+
text-align: left; // Reset button style
|
40
|
+
background-color: var(--#{$prefix}accordion-btn-bg);
|
41
|
+
border: 0;
|
42
|
+
@include border-radius(0);
|
43
|
+
overflow-anchor: none;
|
44
|
+
@include transition(var(--#{$prefix}accordion-transition));
|
45
|
+
|
46
|
+
&:not(.collapsed) {
|
47
|
+
color: var(--#{$prefix}accordion-active-color);
|
48
|
+
background-color: var(--#{$prefix}accordion-active-bg);
|
49
|
+
box-shadow: inset 0 calc(-1 * var(--#{$prefix}accordion-border-width)) 0 var(--#{$prefix}accordion-border-color); // stylelint-disable-line function-disallowed-list
|
50
|
+
|
51
|
+
&::after {
|
52
|
+
background-image: var(--#{$prefix}accordion-btn-active-icon);
|
53
|
+
transform: var(--#{$prefix}accordion-btn-icon-transform);
|
54
|
+
}
|
55
|
+
}
|
56
|
+
|
57
|
+
// Accordion icon
|
58
|
+
&::after {
|
59
|
+
flex-shrink: 0;
|
60
|
+
width: var(--#{$prefix}accordion-btn-icon-width);
|
61
|
+
height: var(--#{$prefix}accordion-btn-icon-width);
|
62
|
+
margin-left: auto;
|
63
|
+
content: "";
|
64
|
+
background-image: var(--#{$prefix}accordion-btn-icon);
|
65
|
+
background-repeat: no-repeat;
|
66
|
+
background-size: var(--#{$prefix}accordion-btn-icon-width);
|
67
|
+
@include transition(var(--#{$prefix}accordion-btn-icon-transition));
|
68
|
+
}
|
69
|
+
|
70
|
+
&:hover {
|
71
|
+
z-index: 2;
|
72
|
+
}
|
73
|
+
|
74
|
+
&:focus {
|
75
|
+
z-index: 3;
|
76
|
+
outline: 0;
|
77
|
+
box-shadow: var(--#{$prefix}accordion-btn-focus-box-shadow);
|
78
|
+
}
|
79
|
+
}
|
80
|
+
|
81
|
+
.accordion-header {
|
82
|
+
margin-bottom: 0;
|
83
|
+
}
|
84
|
+
|
85
|
+
.accordion-item {
|
86
|
+
color: var(--#{$prefix}accordion-color);
|
87
|
+
background-color: var(--#{$prefix}accordion-bg);
|
88
|
+
border: var(--#{$prefix}accordion-border-width) solid var(--#{$prefix}accordion-border-color);
|
89
|
+
|
90
|
+
&:first-of-type {
|
91
|
+
@include border-top-radius(var(--#{$prefix}accordion-border-radius));
|
92
|
+
|
93
|
+
> .accordion-header .accordion-button {
|
94
|
+
@include border-top-radius(var(--#{$prefix}accordion-inner-border-radius));
|
95
|
+
}
|
96
|
+
}
|
97
|
+
|
98
|
+
&:not(:first-of-type) {
|
99
|
+
border-top: 0;
|
100
|
+
}
|
101
|
+
|
102
|
+
// Only set a border-radius on the last item if the accordion is collapsed
|
103
|
+
&:last-of-type {
|
104
|
+
@include border-bottom-radius(var(--#{$prefix}accordion-border-radius));
|
105
|
+
|
106
|
+
> .accordion-header .accordion-button {
|
107
|
+
&.collapsed {
|
108
|
+
@include border-bottom-radius(var(--#{$prefix}accordion-inner-border-radius));
|
109
|
+
}
|
110
|
+
}
|
111
|
+
|
112
|
+
> .accordion-collapse {
|
113
|
+
@include border-bottom-radius(var(--#{$prefix}accordion-border-radius));
|
114
|
+
}
|
115
|
+
}
|
116
|
+
}
|
117
|
+
|
118
|
+
.accordion-body {
|
119
|
+
padding: var(--#{$prefix}accordion-body-padding-y) var(--#{$prefix}accordion-body-padding-x);
|
120
|
+
}
|
121
|
+
|
122
|
+
|
123
|
+
// Flush accordion items
|
124
|
+
//
|
125
|
+
// Remove borders and border-radius to keep accordion items edge-to-edge.
|
126
|
+
|
127
|
+
.accordion-flush {
|
128
|
+
> .accordion-item {
|
129
|
+
border-right: 0;
|
130
|
+
border-left: 0;
|
131
|
+
@include border-radius(0);
|
132
|
+
|
133
|
+
&:first-child { border-top: 0; }
|
134
|
+
&:last-child { border-bottom: 0; }
|
135
|
+
|
136
|
+
// stylelint-disable selector-max-class
|
137
|
+
> .accordion-header .accordion-button {
|
138
|
+
&,
|
139
|
+
&.collapsed {
|
140
|
+
@include border-radius(0);
|
141
|
+
}
|
142
|
+
}
|
143
|
+
// stylelint-enable selector-max-class
|
144
|
+
|
145
|
+
> .accordion-collapse {
|
146
|
+
@include border-radius(0);
|
147
|
+
}
|
148
|
+
}
|
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
|
+
}
|
@@ -0,0 +1,68 @@
|
|
1
|
+
//
|
2
|
+
// Base styles
|
3
|
+
//
|
4
|
+
|
5
|
+
.alert {
|
6
|
+
// scss-docs-start alert-css-vars
|
7
|
+
--#{$prefix}alert-bg: transparent;
|
8
|
+
--#{$prefix}alert-padding-x: #{$alert-padding-x};
|
9
|
+
--#{$prefix}alert-padding-y: #{$alert-padding-y};
|
10
|
+
--#{$prefix}alert-margin-bottom: #{$alert-margin-bottom};
|
11
|
+
--#{$prefix}alert-color: inherit;
|
12
|
+
--#{$prefix}alert-border-color: transparent;
|
13
|
+
--#{$prefix}alert-border: #{$alert-border-width} solid var(--#{$prefix}alert-border-color);
|
14
|
+
--#{$prefix}alert-border-radius: #{$alert-border-radius};
|
15
|
+
--#{$prefix}alert-link-color: inherit;
|
16
|
+
// scss-docs-end alert-css-vars
|
17
|
+
|
18
|
+
position: relative;
|
19
|
+
padding: var(--#{$prefix}alert-padding-y) var(--#{$prefix}alert-padding-x);
|
20
|
+
margin-bottom: var(--#{$prefix}alert-margin-bottom);
|
21
|
+
color: var(--#{$prefix}alert-color);
|
22
|
+
background-color: var(--#{$prefix}alert-bg);
|
23
|
+
border: var(--#{$prefix}alert-border);
|
24
|
+
@include border-radius(var(--#{$prefix}alert-border-radius));
|
25
|
+
}
|
26
|
+
|
27
|
+
// Headings for larger alerts
|
28
|
+
.alert-heading {
|
29
|
+
// Specified to prevent conflicts of changing $headings-color
|
30
|
+
color: inherit;
|
31
|
+
}
|
32
|
+
|
33
|
+
// Provide class for links that match alerts
|
34
|
+
.alert-link {
|
35
|
+
font-weight: $alert-link-font-weight;
|
36
|
+
color: var(--#{$prefix}alert-link-color);
|
37
|
+
}
|
38
|
+
|
39
|
+
|
40
|
+
// Dismissible alerts
|
41
|
+
//
|
42
|
+
// Expand the right padding and account for the close button's positioning.
|
43
|
+
|
44
|
+
.alert-dismissible {
|
45
|
+
padding-right: $alert-dismissible-padding-r;
|
46
|
+
|
47
|
+
// Adjust close link position
|
48
|
+
.btn-close {
|
49
|
+
position: absolute;
|
50
|
+
top: 0;
|
51
|
+
right: 0;
|
52
|
+
z-index: $stretched-link-z-index + 1;
|
53
|
+
padding: $alert-padding-y * 1.25 $alert-padding-x;
|
54
|
+
}
|
55
|
+
}
|
56
|
+
|
57
|
+
|
58
|
+
// scss-docs-start alert-modifiers
|
59
|
+
// Generate contextual modifier classes for colorizing the alert
|
60
|
+
@each $state in map-keys($theme-colors) {
|
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);
|
66
|
+
}
|
67
|
+
}
|
68
|
+
// scss-docs-end alert-modifiers
|
@@ -0,0 +1,38 @@
|
|
1
|
+
// Base class
|
2
|
+
//
|
3
|
+
// Requires one of the contextual, color modifier classes for `color` and
|
4
|
+
// `background-color`.
|
5
|
+
|
6
|
+
.badge {
|
7
|
+
// scss-docs-start badge-css-vars
|
8
|
+
--#{$prefix}badge-padding-x: #{$badge-padding-x};
|
9
|
+
--#{$prefix}badge-padding-y: #{$badge-padding-y};
|
10
|
+
@include rfs($badge-font-size, --#{$prefix}badge-font-size);
|
11
|
+
--#{$prefix}badge-font-weight: #{$badge-font-weight};
|
12
|
+
--#{$prefix}badge-color: #{$badge-color};
|
13
|
+
--#{$prefix}badge-border-radius: #{$badge-border-radius};
|
14
|
+
// scss-docs-end badge-css-vars
|
15
|
+
|
16
|
+
display: inline-block;
|
17
|
+
padding: var(--#{$prefix}badge-padding-y) var(--#{$prefix}badge-padding-x);
|
18
|
+
@include font-size(var(--#{$prefix}badge-font-size));
|
19
|
+
font-weight: var(--#{$prefix}badge-font-weight);
|
20
|
+
line-height: 1;
|
21
|
+
color: var(--#{$prefix}badge-color);
|
22
|
+
text-align: center;
|
23
|
+
white-space: nowrap;
|
24
|
+
vertical-align: baseline;
|
25
|
+
@include border-radius(var(--#{$prefix}badge-border-radius));
|
26
|
+
@include gradient-bg();
|
27
|
+
|
28
|
+
// Empty badges collapse automatically
|
29
|
+
&:empty {
|
30
|
+
display: none;
|
31
|
+
}
|
32
|
+
}
|
33
|
+
|
34
|
+
// Quick fix for badges in buttons
|
35
|
+
.btn .badge {
|
36
|
+
position: relative;
|
37
|
+
top: -1px;
|
38
|
+
}
|
@@ -0,0 +1,40 @@
|
|
1
|
+
.breadcrumb {
|
2
|
+
// scss-docs-start breadcrumb-css-vars
|
3
|
+
--#{$prefix}breadcrumb-padding-x: #{$breadcrumb-padding-x};
|
4
|
+
--#{$prefix}breadcrumb-padding-y: #{$breadcrumb-padding-y};
|
5
|
+
--#{$prefix}breadcrumb-margin-bottom: #{$breadcrumb-margin-bottom};
|
6
|
+
@include rfs($breadcrumb-font-size, --#{$prefix}breadcrumb-font-size);
|
7
|
+
--#{$prefix}breadcrumb-bg: #{$breadcrumb-bg};
|
8
|
+
--#{$prefix}breadcrumb-border-radius: #{$breadcrumb-border-radius};
|
9
|
+
--#{$prefix}breadcrumb-divider-color: #{$breadcrumb-divider-color};
|
10
|
+
--#{$prefix}breadcrumb-item-padding-x: #{$breadcrumb-item-padding-x};
|
11
|
+
--#{$prefix}breadcrumb-item-active-color: #{$breadcrumb-active-color};
|
12
|
+
// scss-docs-end breadcrumb-css-vars
|
13
|
+
|
14
|
+
display: flex;
|
15
|
+
flex-wrap: wrap;
|
16
|
+
padding: var(--#{$prefix}breadcrumb-padding-y) var(--#{$prefix}breadcrumb-padding-x);
|
17
|
+
margin-bottom: var(--#{$prefix}breadcrumb-margin-bottom);
|
18
|
+
@include font-size(var(--#{$prefix}breadcrumb-font-size));
|
19
|
+
list-style: none;
|
20
|
+
background-color: var(--#{$prefix}breadcrumb-bg);
|
21
|
+
@include border-radius(var(--#{$prefix}breadcrumb-border-radius));
|
22
|
+
}
|
23
|
+
|
24
|
+
.breadcrumb-item {
|
25
|
+
// The separator between breadcrumbs (by default, a forward-slash: "/")
|
26
|
+
+ .breadcrumb-item {
|
27
|
+
padding-left: var(--#{$prefix}breadcrumb-item-padding-x);
|
28
|
+
|
29
|
+
&::before {
|
30
|
+
float: left; // Suppress inline spacings and underlining of the separator
|
31
|
+
padding-right: var(--#{$prefix}breadcrumb-item-padding-x);
|
32
|
+
color: var(--#{$prefix}breadcrumb-divider-color);
|
33
|
+
content: var(--#{$prefix}breadcrumb-divider, escape-svg($breadcrumb-divider)) #{"/* rtl:"} var(--#{$prefix}breadcrumb-divider, escape-svg($breadcrumb-divider-flipped)) #{"*/"};
|
34
|
+
}
|
35
|
+
}
|
36
|
+
|
37
|
+
&.active {
|
38
|
+
color: var(--#{$prefix}breadcrumb-item-active-color);
|
39
|
+
}
|
40
|
+
}
|