More modifications

This commit is contained in:
Julien Déramond 2024-07-31 08:34:35 +02:00
parent d7fb9a4b0a
commit 035f143a48
No known key found for this signature in database
GPG Key ID: DCD226672FC08F31
115 changed files with 8124 additions and 1916 deletions

View File

@ -1,185 +0,0 @@
/*!
* Bootstrap v5.3.3 (https://getbootstrap.com/)
* Copyright 2011-2024 The Bootstrap Authors
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
:root,
[data-bs-theme=light] {
--bs-blue: #0d6efd;
--bs-indigo: #6610f2;
--bs-purple: #6f42c1;
--bs-pink: #d63384;
--bs-red: #dc3545;
--bs-orange: #fd7e14;
--bs-yellow: #ffc107;
--bs-green: #198754;
--bs-teal: #20c997;
--bs-cyan: #0dcaf0;
--bs-black: #000;
--bs-white: #fff;
--bs-gray: #6c757d;
--bs-gray-dark: #343a40;
--bs-gray-100: #f8f9fa;
--bs-gray-200: #e9ecef;
--bs-gray-300: #dee2e6;
--bs-gray-400: #ced4da;
--bs-gray-500: #adb5bd;
--bs-gray-600: #6c757d;
--bs-gray-700: #495057;
--bs-gray-800: #343a40;
--bs-gray-900: #212529;
--bs-primary: #0d6efd;
--bs-secondary: #6c757d;
--bs-success: #198754;
--bs-info: #0dcaf0;
--bs-warning: #ffc107;
--bs-danger: #dc3545;
--bs-light: #f8f9fa;
--bs-dark: #212529;
--bs-primary-rgb: 13, 110, 253;
--bs-secondary-rgb: 108, 117, 125;
--bs-success-rgb: 25, 135, 84;
--bs-info-rgb: 13, 202, 240;
--bs-warning-rgb: 255, 193, 7;
--bs-danger-rgb: 220, 53, 69;
--bs-light-rgb: 248, 249, 250;
--bs-dark-rgb: 33, 37, 41;
--bs-primary-text-emphasis: shade-color(#0d6efd, 60%);
--bs-secondary-text-emphasis: shade-color(#6c757d, 60%);
--bs-success-text-emphasis: shade-color(#198754, 60%);
--bs-info-text-emphasis: shade-color(#0dcaf0, 60%);
--bs-warning-text-emphasis: shade-color(#ffc107, 60%);
--bs-danger-text-emphasis: shade-color(#dc3545, 60%);
--bs-light-text-emphasis: #495057;
--bs-dark-text-emphasis: #495057;
--bs-primary-bg-subtle: tint-color(#0d6efd, 80%);
--bs-secondary-bg-subtle: tint-color(#6c757d, 80%);
--bs-success-bg-subtle: tint-color(#198754, 80%);
--bs-info-bg-subtle: tint-color(#0dcaf0, 80%);
--bs-warning-bg-subtle: tint-color(#ffc107, 80%);
--bs-danger-bg-subtle: tint-color(#dc3545, 80%);
--bs-light-bg-subtle: #fcfcfd;
--bs-dark-bg-subtle: #ced4da;
--bs-primary-border-subtle: tint-color(#0d6efd, 60%);
--bs-secondary-border-subtle: tint-color(#6c757d, 60%);
--bs-success-border-subtle: tint-color(#198754, 60%);
--bs-info-border-subtle: tint-color(#0dcaf0, 60%);
--bs-warning-border-subtle: tint-color(#ffc107, 60%);
--bs-danger-border-subtle: tint-color(#dc3545, 60%);
--bs-light-border-subtle: #e9ecef;
--bs-dark-border-subtle: #adb5bd;
--bs-white-rgb: 255, 255, 255;
--bs-black-rgb: 0, 0, 0;
--bs-font-sans-serif: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
--bs-font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
--bs-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0));
--bs-body-font-family: var(--bs-font-sans-serif);
--bs-body-font-size: 1rem;
--bs-body-font-weight: 400;
--bs-body-line-height: 1.5;
--bs-body-color: #212529;
--bs-body-color-rgb: 33, 37, 41;
--bs-body-bg: #fff;
--bs-body-bg-rgb: 255, 255, 255;
--bs-emphasis-color: #000;
--bs-emphasis-color-rgb: 0, 0, 0;
--bs-secondary-color: rgba(33, 37, 41, 0.75);
--bs-secondary-color-rgb: 33, 37, 41;
--bs-secondary-bg: #e9ecef;
--bs-secondary-bg-rgb: 233, 236, 239;
--bs-tertiary-color: rgba(33, 37, 41, 0.5);
--bs-tertiary-color-rgb: 33, 37, 41;
--bs-tertiary-bg: #f8f9fa;
--bs-tertiary-bg-rgb: 248, 249, 250;
--bs-heading-color: inherit;
--bs-link-color: #0d6efd;
--bs-link-color-rgb: 13, 110, 253;
--bs-link-decoration: underline;
--bs-link-hover-color: #72abfe;
--bs-link-hover-color-rgb: 114, 171, 254;
--bs-code-color: #d63384;
--bs-highlight-color: #212529;
--bs-highlight-bg: tint-color(#ffc107, 80%);
--bs-border-width: 1px;
--bs-border-style: solid;
--bs-border-color: #dee2e6;
--bs-border-color-translucent: rgba(0, 0, 0, 0.175);
--bs-border-radius: 0.375rem;
--bs-border-radius-sm: 0.25rem;
--bs-border-radius-lg: 0.5rem;
--bs-border-radius-xl: 1rem;
--bs-border-radius-xxl: 2rem;
--bs-border-radius-2xl: var(--bs-border-radius-xxl);
--bs-border-radius-pill: 50rem;
--bs-box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
--bs-box-shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
--bs-box-shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
--bs-box-shadow-inset: inset 0 1px 2px rgba(0, 0, 0, 0.075);
--bs-focus-ring-width: 0.25rem;
--bs-focus-ring-opacity: 0.25;
--bs-focus-ring-color: rgba(13, 110, 253, 0.25);
--bs-form-valid-color: #198754;
--bs-form-valid-border-color: #198754;
--bs-form-invalid-color: #dc3545;
--bs-form-invalid-border-color: #dc3545;
}
@media (prefers-color-scheme: dark) {
:root {
color-scheme: dark;
--bs-body-color: #dee2e6;
--bs-body-color-rgb: 222, 226, 230;
--bs-body-bg: #212529;
--bs-body-bg-rgb: 33, 37, 41;
--bs-emphasis-color: #fff;
--bs-emphasis-color-rgb: 255, 255, 255;
--bs-secondary-color: rgba(222, 226, 230, 0.75);
--bs-secondary-color-rgb: 222, 226, 230;
--bs-secondary-bg: #343a40;
--bs-secondary-bg-rgb: 52, 58, 64;
--bs-tertiary-color: rgba(222, 226, 230, 0.5);
--bs-tertiary-color-rgb: 222, 226, 230;
--bs-tertiary-bg: #2b3035;
--bs-tertiary-bg-rgb: 43, 48, 53;
--bs-primary-text-emphasis: tint-color(#0d6efd, 40%);
--bs-secondary-text-emphasis: tint-color(#6c757d, 40%);
--bs-success-text-emphasis: tint-color(#198754, 40%);
--bs-info-text-emphasis: tint-color(#0dcaf0, 40%);
--bs-warning-text-emphasis: tint-color(#ffc107, 40%);
--bs-danger-text-emphasis: tint-color(#dc3545, 40%);
--bs-light-text-emphasis: #f8f9fa;
--bs-dark-text-emphasis: #dee2e6;
--bs-primary-bg-subtle: shade-color(#0d6efd, 80%);
--bs-secondary-bg-subtle: shade-color(#6c757d, 80%);
--bs-success-bg-subtle: shade-color(#198754, 80%);
--bs-info-bg-subtle: shade-color(#0dcaf0, 80%);
--bs-warning-bg-subtle: shade-color(#ffc107, 80%);
--bs-danger-bg-subtle: shade-color(#dc3545, 80%);
--bs-light-bg-subtle: #343a40;
--bs-dark-bg-subtle: #1a1d20;
--bs-primary-border-subtle: shade-color(#0d6efd, 40%);
--bs-secondary-border-subtle: shade-color(#6c757d, 40%);
--bs-success-border-subtle: shade-color(#198754, 40%);
--bs-info-border-subtle: shade-color(#0dcaf0, 40%);
--bs-warning-border-subtle: shade-color(#ffc107, 40%);
--bs-danger-border-subtle: shade-color(#dc3545, 40%);
--bs-light-border-subtle: #495057;
--bs-dark-border-subtle: #343a40;
--bs-heading-color: inherit;
--bs-link-color: #0d4597;
--bs-link-hover-color: #0d3064;
--bs-link-color-rgb: 13, 69, 151;
--bs-link-hover-color-rgb: 13, 48, 100;
--bs-code-color: #d699b7;
--bs-highlight-color: #dee2e6;
--bs-highlight-bg: shade-color(#ffc107, 60%);
--bs-border-color: #495057;
--bs-border-color-translucent: rgba(255, 255, 255, 0.15);
--bs-form-valid-color: tint-color(#198754, 40%);
--bs-form-valid-border-color: tint-color(#198754, 40%);
--bs-form-invalid-color: tint-color(#dc3545, 40%);
--bs-form-invalid-border-color: tint-color(#dc3545, 40%);
}
}
/*# sourceMappingURL=bootstrap.css.map */

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -205,7 +205,7 @@
* @param {HTMLElement} element
* @return void
*
* @see https://www.charistheo.io/blog/2021/02/restart-a-css-animation-with-javascript/#restarting-a-css-animation
* @see https://www.harrytheo.com/blog/2021/02/restart-a-css-animation-with-javascript/#restarting-a-css-animation
*/
const reflow = element => {
element.offsetHeight; // eslint-disable-line no-unused-expressions
@ -250,7 +250,7 @@
});
};
const execute = (possibleCallback, args = [], defaultValue = possibleCallback) => {
return typeof possibleCallback === 'function' ? possibleCallback(...args) : defaultValue;
return typeof possibleCallback === 'function' ? possibleCallback.call(...args) : defaultValue;
};
const executeAfterTransition = (callback, transitionElement, waitForTransition = true) => {
if (!waitForTransition) {
@ -3701,7 +3701,7 @@
}
_createPopper() {
if (typeof Popper === 'undefined') {
throw new TypeError('Bootstrap\'s dropdowns require Popper (https://popper.js.org)');
throw new TypeError('Bootstrap\'s dropdowns require Popper (https://popper.js.org/docs/v2/)');
}
let referenceElement = this._element;
if (this._config.reference === 'parent') {
@ -3780,7 +3780,7 @@
}
return {
...defaultBsPopperConfig,
...execute(this._config.popperConfig, [defaultBsPopperConfig])
...execute(this._config.popperConfig, [undefined, defaultBsPopperConfig])
};
}
_selectMenuItem({
@ -4967,7 +4967,7 @@
return this._config.sanitize ? sanitizeHtml(arg, this._config.allowList, this._config.sanitizeFn) : arg;
}
_resolvePossibleFunction(arg) {
return execute(arg, [this]);
return execute(arg, [undefined, this]);
}
_putElementInTemplate(element, templateElement) {
if (this._config.html) {
@ -5066,7 +5066,7 @@
class Tooltip extends BaseComponent {
constructor(element, config) {
if (typeof Popper === 'undefined') {
throw new TypeError('Bootstrap\'s tooltips require Popper (https://popper.js.org)');
throw new TypeError('Bootstrap\'s tooltips require Popper (https://popper.js.org/docs/v2/)');
}
super(element, config);
@ -5300,7 +5300,7 @@
return offset;
}
_resolvePossibleFunction(arg) {
return execute(arg, [this._element]);
return execute(arg, [this._element, this._element]);
}
_getPopperConfig(attachment) {
const defaultBsPopperConfig = {
@ -5338,7 +5338,7 @@
};
return {
...defaultBsPopperConfig,
...execute(this._config.popperConfig, [defaultBsPopperConfig])
...execute(this._config.popperConfig, [undefined, defaultBsPopperConfig])
};
}
_setListeners() {

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -201,7 +201,7 @@ const noop = () => {};
* @param {HTMLElement} element
* @return void
*
* @see https://www.charistheo.io/blog/2021/02/restart-a-css-animation-with-javascript/#restarting-a-css-animation
* @see https://www.harrytheo.com/blog/2021/02/restart-a-css-animation-with-javascript/#restarting-a-css-animation
*/
const reflow = element => {
element.offsetHeight; // eslint-disable-line no-unused-expressions
@ -246,7 +246,7 @@ const defineJQueryPlugin = plugin => {
});
};
const execute = (possibleCallback, args = [], defaultValue = possibleCallback) => {
return typeof possibleCallback === 'function' ? possibleCallback(...args) : defaultValue;
return typeof possibleCallback === 'function' ? possibleCallback.call(...args) : defaultValue;
};
const executeAfterTransition = (callback, transitionElement, waitForTransition = true) => {
if (!waitForTransition) {
@ -1858,7 +1858,7 @@ class Dropdown extends BaseComponent {
}
_createPopper() {
if (typeof Popper === 'undefined') {
throw new TypeError('Bootstrap\'s dropdowns require Popper (https://popper.js.org)');
throw new TypeError('Bootstrap\'s dropdowns require Popper (https://popper.js.org/docs/v2/)');
}
let referenceElement = this._element;
if (this._config.reference === 'parent') {
@ -1937,7 +1937,7 @@ class Dropdown extends BaseComponent {
}
return {
...defaultBsPopperConfig,
...execute(this._config.popperConfig, [defaultBsPopperConfig])
...execute(this._config.popperConfig, [undefined, defaultBsPopperConfig])
};
}
_selectMenuItem({
@ -3124,7 +3124,7 @@ class TemplateFactory extends Config {
return this._config.sanitize ? sanitizeHtml(arg, this._config.allowList, this._config.sanitizeFn) : arg;
}
_resolvePossibleFunction(arg) {
return execute(arg, [this]);
return execute(arg, [undefined, this]);
}
_putElementInTemplate(element, templateElement) {
if (this._config.html) {
@ -3223,7 +3223,7 @@ const DefaultType$3 = {
class Tooltip extends BaseComponent {
constructor(element, config) {
if (typeof Popper === 'undefined') {
throw new TypeError('Bootstrap\'s tooltips require Popper (https://popper.js.org)');
throw new TypeError('Bootstrap\'s tooltips require Popper (https://popper.js.org/docs/v2/)');
}
super(element, config);
@ -3457,7 +3457,7 @@ class Tooltip extends BaseComponent {
return offset;
}
_resolvePossibleFunction(arg) {
return execute(arg, [this._element]);
return execute(arg, [this._element, this._element]);
}
_getPopperConfig(attachment) {
const defaultBsPopperConfig = {
@ -3495,7 +3495,7 @@ class Tooltip extends BaseComponent {
};
return {
...defaultBsPopperConfig,
...execute(this._config.popperConfig, [defaultBsPopperConfig])
...execute(this._config.popperConfig, [undefined, defaultBsPopperConfig])
};
}
_setListeners() {

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -224,7 +224,7 @@
* @param {HTMLElement} element
* @return void
*
* @see https://www.charistheo.io/blog/2021/02/restart-a-css-animation-with-javascript/#restarting-a-css-animation
* @see https://www.harrytheo.com/blog/2021/02/restart-a-css-animation-with-javascript/#restarting-a-css-animation
*/
const reflow = element => {
element.offsetHeight; // eslint-disable-line no-unused-expressions
@ -269,7 +269,7 @@
});
};
const execute = (possibleCallback, args = [], defaultValue = possibleCallback) => {
return typeof possibleCallback === 'function' ? possibleCallback(...args) : defaultValue;
return typeof possibleCallback === 'function' ? possibleCallback.call(...args) : defaultValue;
};
const executeAfterTransition = (callback, transitionElement, waitForTransition = true) => {
if (!waitForTransition) {
@ -1881,7 +1881,7 @@
}
_createPopper() {
if (typeof Popper__namespace === 'undefined') {
throw new TypeError('Bootstrap\'s dropdowns require Popper (https://popper.js.org)');
throw new TypeError('Bootstrap\'s dropdowns require Popper (https://popper.js.org/docs/v2/)');
}
let referenceElement = this._element;
if (this._config.reference === 'parent') {
@ -1960,7 +1960,7 @@
}
return {
...defaultBsPopperConfig,
...execute(this._config.popperConfig, [defaultBsPopperConfig])
...execute(this._config.popperConfig, [undefined, defaultBsPopperConfig])
};
}
_selectMenuItem({
@ -3147,7 +3147,7 @@
return this._config.sanitize ? sanitizeHtml(arg, this._config.allowList, this._config.sanitizeFn) : arg;
}
_resolvePossibleFunction(arg) {
return execute(arg, [this]);
return execute(arg, [undefined, this]);
}
_putElementInTemplate(element, templateElement) {
if (this._config.html) {
@ -3246,7 +3246,7 @@
class Tooltip extends BaseComponent {
constructor(element, config) {
if (typeof Popper__namespace === 'undefined') {
throw new TypeError('Bootstrap\'s tooltips require Popper (https://popper.js.org)');
throw new TypeError('Bootstrap\'s tooltips require Popper (https://popper.js.org/docs/v2/)');
}
super(element, config);
@ -3480,7 +3480,7 @@
return offset;
}
_resolvePossibleFunction(arg) {
return execute(arg, [this._element]);
return execute(arg, [this._element, this._element]);
}
_getPopperConfig(attachment) {
const defaultBsPopperConfig = {
@ -3518,7 +3518,7 @@
};
return {
...defaultBsPopperConfig,
...execute(this._config.popperConfig, [defaultBsPopperConfig])
...execute(this._config.popperConfig, [undefined, defaultBsPopperConfig])
};
}
_setListeners() {

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
{"version":3,"file":"alert.js","sources":["../src/alert.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap alert.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport BaseComponent from './base-component.js'\nimport EventHandler from './dom/event-handler.js'\nimport { enableDismissTrigger } from './util/component-functions.js'\nimport { defineJQueryPlugin } from './util/index.js'\n\n/**\n * Constants\n */\n\nconst NAME = 'alert'\nconst DATA_KEY = 'bs.alert'\nconst EVENT_KEY = `.${DATA_KEY}`\n\nconst EVENT_CLOSE = `close${EVENT_KEY}`\nconst EVENT_CLOSED = `closed${EVENT_KEY}`\nconst CLASS_NAME_FADE = 'fade'\nconst CLASS_NAME_SHOW = 'show'\n\n/**\n * Class definition\n */\n\nclass Alert extends BaseComponent {\n // Getters\n static get NAME() {\n return NAME\n }\n\n // Public\n close() {\n const closeEvent = EventHandler.trigger(this._element, EVENT_CLOSE)\n\n if (closeEvent.defaultPrevented) {\n return\n }\n\n this._element.classList.remove(CLASS_NAME_SHOW)\n\n const isAnimated = this._element.classList.contains(CLASS_NAME_FADE)\n this._queueCallback(() => this._destroyElement(), this._element, isAnimated)\n }\n\n // Private\n _destroyElement() {\n this._element.remove()\n EventHandler.trigger(this._element, EVENT_CLOSED)\n this.dispose()\n }\n\n // Static\n static jQueryInterface(config) {\n return this.each(function () {\n const data = Alert.getOrCreateInstance(this)\n\n if (typeof config !== 'string') {\n return\n }\n\n if (data[config] === undefined || config.startsWith('_') || config === 'constructor') {\n throw new TypeError(`No method named \"${config}\"`)\n }\n\n data[config](this)\n })\n }\n}\n\n/**\n * Data API implementation\n */\n\nenableDismissTrigger(Alert, 'close')\n\n/**\n * jQuery\n */\n\ndefineJQueryPlugin(Alert)\n\nexport default Alert\n"],"names":["NAME","DATA_KEY","EVENT_KEY","EVENT_CLOSE","EVENT_CLOSED","CLASS_NAME_FADE","CLASS_NAME_SHOW","Alert","BaseComponent","close","closeEvent","EventHandler","trigger","_element","defaultPrevented","classList","remove","isAnimated","contains","_queueCallback","_destroyElement","dispose","jQueryInterface","config","each","data","getOrCreateInstance","undefined","startsWith","TypeError","enableDismissTrigger","defineJQueryPlugin"],"mappings":";;;;;;;;;;;EAAA;EACA;EACA;EACA;EACA;EACA;;;EAOA;EACA;EACA;;EAEA,MAAMA,IAAI,GAAG,OAAO,CAAA;EACpB,MAAMC,QAAQ,GAAG,UAAU,CAAA;EAC3B,MAAMC,SAAS,GAAI,CAAGD,CAAAA,EAAAA,QAAS,CAAC,CAAA,CAAA;EAEhC,MAAME,WAAW,GAAI,CAAOD,KAAAA,EAAAA,SAAU,CAAC,CAAA,CAAA;EACvC,MAAME,YAAY,GAAI,CAAQF,MAAAA,EAAAA,SAAU,CAAC,CAAA,CAAA;EACzC,MAAMG,eAAe,GAAG,MAAM,CAAA;EAC9B,MAAMC,eAAe,GAAG,MAAM,CAAA;;EAE9B;EACA;EACA;;EAEA,MAAMC,KAAK,SAASC,aAAa,CAAC;EAChC;IACA,WAAWR,IAAIA,GAAG;EAChB,IAAA,OAAOA,IAAI,CAAA;EACb,GAAA;;EAEA;EACAS,EAAAA,KAAKA,GAAG;MACN,MAAMC,UAAU,GAAGC,YAAY,CAACC,OAAO,CAAC,IAAI,CAACC,QAAQ,EAAEV,WAAW,CAAC,CAAA;MAEnE,IAAIO,UAAU,CAACI,gBAAgB,EAAE;EAC/B,MAAA,OAAA;EACF,KAAA;MAEA,IAAI,CAACD,QAAQ,CAACE,SAAS,CAACC,MAAM,CAACV,eAAe,CAAC,CAAA;MAE/C,MAAMW,UAAU,GAAG,IAAI,CAACJ,QAAQ,CAACE,SAAS,CAACG,QAAQ,CAACb,eAAe,CAAC,CAAA;EACpE,IAAA,IAAI,CAACc,cAAc,CAAC,MAAM,IAAI,CAACC,eAAe,EAAE,EAAE,IAAI,CAACP,QAAQ,EAAEI,UAAU,CAAC,CAAA;EAC9E,GAAA;;EAEA;EACAG,EAAAA,eAAeA,GAAG;EAChB,IAAA,IAAI,CAACP,QAAQ,CAACG,MAAM,EAAE,CAAA;MACtBL,YAAY,CAACC,OAAO,CAAC,IAAI,CAACC,QAAQ,EAAET,YAAY,CAAC,CAAA;MACjD,IAAI,CAACiB,OAAO,EAAE,CAAA;EAChB,GAAA;;EAEA;IACA,OAAOC,eAAeA,CAACC,MAAM,EAAE;EAC7B,IAAA,OAAO,IAAI,CAACC,IAAI,CAAC,YAAY;EAC3B,MAAA,MAAMC,IAAI,GAAGlB,KAAK,CAACmB,mBAAmB,CAAC,IAAI,CAAC,CAAA;EAE5C,MAAA,IAAI,OAAOH,MAAM,KAAK,QAAQ,EAAE;EAC9B,QAAA,OAAA;EACF,OAAA;EAEA,MAAA,IAAIE,IAAI,CAACF,MAAM,CAAC,KAAKI,SAAS,IAAIJ,MAAM,CAACK,UAAU,CAAC,GAAG,CAAC,IAAIL,MAAM,KAAK,aAAa,EAAE;EACpF,QAAA,MAAM,IAAIM,SAAS,CAAE,CAAmBN,iBAAAA,EAAAA,MAAO,GAAE,CAAC,CAAA;EACpD,OAAA;EAEAE,MAAAA,IAAI,CAACF,MAAM,CAAC,CAAC,IAAI,CAAC,CAAA;EACpB,KAAC,CAAC,CAAA;EACJ,GAAA;EACF,CAAA;;EAEA;EACA;EACA;;AAEAO,4CAAoB,CAACvB,KAAK,EAAE,OAAO,CAAC,CAAA;;EAEpC;EACA;EACA;;AAEAwB,6BAAkB,CAACxB,KAAK,CAAC;;;;;;;;"}
{"version":3,"file":"alert.js","sources":["../src/alert.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap alert.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport BaseComponent from './base-component.js'\nimport EventHandler from './dom/event-handler.js'\nimport { enableDismissTrigger } from './util/component-functions.js'\nimport { defineJQueryPlugin } from './util/index.js'\n\n/**\n * Constants\n */\n\nconst NAME = 'alert'\nconst DATA_KEY = 'bs.alert'\nconst EVENT_KEY = `.${DATA_KEY}`\n\nconst EVENT_CLOSE = `close${EVENT_KEY}`\nconst EVENT_CLOSED = `closed${EVENT_KEY}`\nconst CLASS_NAME_FADE = 'fade'\nconst CLASS_NAME_SHOW = 'show'\n\n/**\n * Class definition\n */\n\nclass Alert extends BaseComponent {\n // Getters\n static get NAME() {\n return NAME\n }\n\n // Public\n close() {\n const closeEvent = EventHandler.trigger(this._element, EVENT_CLOSE)\n\n if (closeEvent.defaultPrevented) {\n return\n }\n\n this._element.classList.remove(CLASS_NAME_SHOW)\n\n const isAnimated = this._element.classList.contains(CLASS_NAME_FADE)\n this._queueCallback(() => this._destroyElement(), this._element, isAnimated)\n }\n\n // Private\n _destroyElement() {\n this._element.remove()\n EventHandler.trigger(this._element, EVENT_CLOSED)\n this.dispose()\n }\n\n // Static\n static jQueryInterface(config) {\n return this.each(function () {\n const data = Alert.getOrCreateInstance(this)\n\n if (typeof config !== 'string') {\n return\n }\n\n if (data[config] === undefined || config.startsWith('_') || config === 'constructor') {\n throw new TypeError(`No method named \"${config}\"`)\n }\n\n data[config](this)\n })\n }\n}\n\n/**\n * Data API implementation\n */\n\nenableDismissTrigger(Alert, 'close')\n\n/**\n * jQuery\n */\n\ndefineJQueryPlugin(Alert)\n\nexport default Alert\n"],"names":["NAME","DATA_KEY","EVENT_KEY","EVENT_CLOSE","EVENT_CLOSED","CLASS_NAME_FADE","CLASS_NAME_SHOW","Alert","BaseComponent","close","closeEvent","EventHandler","trigger","_element","defaultPrevented","classList","remove","isAnimated","contains","_queueCallback","_destroyElement","dispose","jQueryInterface","config","each","data","getOrCreateInstance","undefined","startsWith","TypeError","enableDismissTrigger","defineJQueryPlugin"],"mappings":";;;;;;;;;;;EAAA;EACA;EACA;EACA;EACA;EACA;;;EAOA;EACA;EACA;;EAEA,MAAMA,IAAI,GAAG,OAAO,CAAA;EACpB,MAAMC,QAAQ,GAAG,UAAU,CAAA;EAC3B,MAAMC,SAAS,GAAG,CAAID,CAAAA,EAAAA,QAAQ,CAAE,CAAA,CAAA;EAEhC,MAAME,WAAW,GAAG,CAAQD,KAAAA,EAAAA,SAAS,CAAE,CAAA,CAAA;EACvC,MAAME,YAAY,GAAG,CAASF,MAAAA,EAAAA,SAAS,CAAE,CAAA,CAAA;EACzC,MAAMG,eAAe,GAAG,MAAM,CAAA;EAC9B,MAAMC,eAAe,GAAG,MAAM,CAAA;;EAE9B;EACA;EACA;;EAEA,MAAMC,KAAK,SAASC,aAAa,CAAC;EAChC;IACA,WAAWR,IAAIA,GAAG;EAChB,IAAA,OAAOA,IAAI,CAAA;EACb,GAAA;;EAEA;EACAS,EAAAA,KAAKA,GAAG;MACN,MAAMC,UAAU,GAAGC,YAAY,CAACC,OAAO,CAAC,IAAI,CAACC,QAAQ,EAAEV,WAAW,CAAC,CAAA;MAEnE,IAAIO,UAAU,CAACI,gBAAgB,EAAE;EAC/B,MAAA,OAAA;EACF,KAAA;MAEA,IAAI,CAACD,QAAQ,CAACE,SAAS,CAACC,MAAM,CAACV,eAAe,CAAC,CAAA;MAE/C,MAAMW,UAAU,GAAG,IAAI,CAACJ,QAAQ,CAACE,SAAS,CAACG,QAAQ,CAACb,eAAe,CAAC,CAAA;EACpE,IAAA,IAAI,CAACc,cAAc,CAAC,MAAM,IAAI,CAACC,eAAe,EAAE,EAAE,IAAI,CAACP,QAAQ,EAAEI,UAAU,CAAC,CAAA;EAC9E,GAAA;;EAEA;EACAG,EAAAA,eAAeA,GAAG;EAChB,IAAA,IAAI,CAACP,QAAQ,CAACG,MAAM,EAAE,CAAA;MACtBL,YAAY,CAACC,OAAO,CAAC,IAAI,CAACC,QAAQ,EAAET,YAAY,CAAC,CAAA;MACjD,IAAI,CAACiB,OAAO,EAAE,CAAA;EAChB,GAAA;;EAEA;IACA,OAAOC,eAAeA,CAACC,MAAM,EAAE;EAC7B,IAAA,OAAO,IAAI,CAACC,IAAI,CAAC,YAAY;EAC3B,MAAA,MAAMC,IAAI,GAAGlB,KAAK,CAACmB,mBAAmB,CAAC,IAAI,CAAC,CAAA;EAE5C,MAAA,IAAI,OAAOH,MAAM,KAAK,QAAQ,EAAE;EAC9B,QAAA,OAAA;EACF,OAAA;EAEA,MAAA,IAAIE,IAAI,CAACF,MAAM,CAAC,KAAKI,SAAS,IAAIJ,MAAM,CAACK,UAAU,CAAC,GAAG,CAAC,IAAIL,MAAM,KAAK,aAAa,EAAE;EACpF,QAAA,MAAM,IAAIM,SAAS,CAAC,CAAoBN,iBAAAA,EAAAA,MAAM,GAAG,CAAC,CAAA;EACpD,OAAA;EAEAE,MAAAA,IAAI,CAACF,MAAM,CAAC,CAAC,IAAI,CAAC,CAAA;EACpB,KAAC,CAAC,CAAA;EACJ,GAAA;EACF,CAAA;;EAEA;EACA;EACA;;AAEAO,4CAAoB,CAACvB,KAAK,EAAE,OAAO,CAAC,CAAA;;EAEpC;EACA;EACA;;AAEAwB,6BAAkB,CAACxB,KAAK,CAAC;;;;;;;;"}

View File

@ -1 +1 @@
{"version":3,"file":"base-component.js","sources":["../src/base-component.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap base-component.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport Data from './dom/data.js'\nimport EventHandler from './dom/event-handler.js'\nimport Config from './util/config.js'\nimport { executeAfterTransition, getElement } from './util/index.js'\n\n/**\n * Constants\n */\n\nconst VERSION = '5.3.3'\n\n/**\n * Class definition\n */\n\nclass BaseComponent extends Config {\n constructor(element, config) {\n super()\n\n element = getElement(element)\n if (!element) {\n return\n }\n\n this._element = element\n this._config = this._getConfig(config)\n\n Data.set(this._element, this.constructor.DATA_KEY, this)\n }\n\n // Public\n dispose() {\n Data.remove(this._element, this.constructor.DATA_KEY)\n EventHandler.off(this._element, this.constructor.EVENT_KEY)\n\n for (const propertyName of Object.getOwnPropertyNames(this)) {\n this[propertyName] = null\n }\n }\n\n _queueCallback(callback, element, isAnimated = true) {\n executeAfterTransition(callback, element, isAnimated)\n }\n\n _getConfig(config) {\n config = this._mergeConfigObj(config, this._element)\n config = this._configAfterMerge(config)\n this._typeCheckConfig(config)\n return config\n }\n\n // Static\n static getInstance(element) {\n return Data.get(getElement(element), this.DATA_KEY)\n }\n\n static getOrCreateInstance(element, config = {}) {\n return this.getInstance(element) || new this(element, typeof config === 'object' ? config : null)\n }\n\n static get VERSION() {\n return VERSION\n }\n\n static get DATA_KEY() {\n return `bs.${this.NAME}`\n }\n\n static get EVENT_KEY() {\n return `.${this.DATA_KEY}`\n }\n\n static eventName(name) {\n return `${name}${this.EVENT_KEY}`\n }\n}\n\nexport default BaseComponent\n"],"names":["VERSION","BaseComponent","Config","constructor","element","config","getElement","_element","_config","_getConfig","Data","set","DATA_KEY","dispose","remove","EventHandler","off","EVENT_KEY","propertyName","Object","getOwnPropertyNames","_queueCallback","callback","isAnimated","executeAfterTransition","_mergeConfigObj","_configAfterMerge","_typeCheckConfig","getInstance","get","getOrCreateInstance","NAME","eventName","name"],"mappings":";;;;;;;;;;;EAAA;EACA;EACA;EACA;EACA;EACA;;;EAOA;EACA;EACA;;EAEA,MAAMA,OAAO,GAAG,OAAO,CAAA;;EAEvB;EACA;EACA;;EAEA,MAAMC,aAAa,SAASC,MAAM,CAAC;EACjCC,EAAAA,WAAWA,CAACC,OAAO,EAAEC,MAAM,EAAE;EAC3B,IAAA,KAAK,EAAE,CAAA;EAEPD,IAAAA,OAAO,GAAGE,mBAAU,CAACF,OAAO,CAAC,CAAA;MAC7B,IAAI,CAACA,OAAO,EAAE;EACZ,MAAA,OAAA;EACF,KAAA;MAEA,IAAI,CAACG,QAAQ,GAAGH,OAAO,CAAA;MACvB,IAAI,CAACI,OAAO,GAAG,IAAI,CAACC,UAAU,CAACJ,MAAM,CAAC,CAAA;EAEtCK,IAAAA,IAAI,CAACC,GAAG,CAAC,IAAI,CAACJ,QAAQ,EAAE,IAAI,CAACJ,WAAW,CAACS,QAAQ,EAAE,IAAI,CAAC,CAAA;EAC1D,GAAA;;EAEA;EACAC,EAAAA,OAAOA,GAAG;EACRH,IAAAA,IAAI,CAACI,MAAM,CAAC,IAAI,CAACP,QAAQ,EAAE,IAAI,CAACJ,WAAW,CAACS,QAAQ,CAAC,CAAA;EACrDG,IAAAA,YAAY,CAACC,GAAG,CAAC,IAAI,CAACT,QAAQ,EAAE,IAAI,CAACJ,WAAW,CAACc,SAAS,CAAC,CAAA;MAE3D,KAAK,MAAMC,YAAY,IAAIC,MAAM,CAACC,mBAAmB,CAAC,IAAI,CAAC,EAAE;EAC3D,MAAA,IAAI,CAACF,YAAY,CAAC,GAAG,IAAI,CAAA;EAC3B,KAAA;EACF,GAAA;IAEAG,cAAcA,CAACC,QAAQ,EAAElB,OAAO,EAAEmB,UAAU,GAAG,IAAI,EAAE;EACnDC,IAAAA,+BAAsB,CAACF,QAAQ,EAAElB,OAAO,EAAEmB,UAAU,CAAC,CAAA;EACvD,GAAA;IAEAd,UAAUA,CAACJ,MAAM,EAAE;MACjBA,MAAM,GAAG,IAAI,CAACoB,eAAe,CAACpB,MAAM,EAAE,IAAI,CAACE,QAAQ,CAAC,CAAA;EACpDF,IAAAA,MAAM,GAAG,IAAI,CAACqB,iBAAiB,CAACrB,MAAM,CAAC,CAAA;EACvC,IAAA,IAAI,CAACsB,gBAAgB,CAACtB,MAAM,CAAC,CAAA;EAC7B,IAAA,OAAOA,MAAM,CAAA;EACf,GAAA;;EAEA;IACA,OAAOuB,WAAWA,CAACxB,OAAO,EAAE;EAC1B,IAAA,OAAOM,IAAI,CAACmB,GAAG,CAACvB,mBAAU,CAACF,OAAO,CAAC,EAAE,IAAI,CAACQ,QAAQ,CAAC,CAAA;EACrD,GAAA;IAEA,OAAOkB,mBAAmBA,CAAC1B,OAAO,EAAEC,MAAM,GAAG,EAAE,EAAE;MAC/C,OAAO,IAAI,CAACuB,WAAW,CAACxB,OAAO,CAAC,IAAI,IAAI,IAAI,CAACA,OAAO,EAAE,OAAOC,MAAM,KAAK,QAAQ,GAAGA,MAAM,GAAG,IAAI,CAAC,CAAA;EACnG,GAAA;IAEA,WAAWL,OAAOA,GAAG;EACnB,IAAA,OAAOA,OAAO,CAAA;EAChB,GAAA;IAEA,WAAWY,QAAQA,GAAG;EACpB,IAAA,OAAQ,CAAK,GAAA,EAAA,IAAI,CAACmB,IAAK,CAAC,CAAA,CAAA;EAC1B,GAAA;IAEA,WAAWd,SAASA,GAAG;EACrB,IAAA,OAAQ,CAAG,CAAA,EAAA,IAAI,CAACL,QAAS,CAAC,CAAA,CAAA;EAC5B,GAAA;IAEA,OAAOoB,SAASA,CAACC,IAAI,EAAE;EACrB,IAAA,OAAQ,GAAEA,IAAK,CAAA,EAAE,IAAI,CAAChB,SAAU,CAAC,CAAA,CAAA;EACnC,GAAA;EACF;;;;;;;;"}
{"version":3,"file":"base-component.js","sources":["../src/base-component.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap base-component.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport Data from './dom/data.js'\nimport EventHandler from './dom/event-handler.js'\nimport Config from './util/config.js'\nimport { executeAfterTransition, getElement } from './util/index.js'\n\n/**\n * Constants\n */\n\nconst VERSION = '5.3.3'\n\n/**\n * Class definition\n */\n\nclass BaseComponent extends Config {\n constructor(element, config) {\n super()\n\n element = getElement(element)\n if (!element) {\n return\n }\n\n this._element = element\n this._config = this._getConfig(config)\n\n Data.set(this._element, this.constructor.DATA_KEY, this)\n }\n\n // Public\n dispose() {\n Data.remove(this._element, this.constructor.DATA_KEY)\n EventHandler.off(this._element, this.constructor.EVENT_KEY)\n\n for (const propertyName of Object.getOwnPropertyNames(this)) {\n this[propertyName] = null\n }\n }\n\n _queueCallback(callback, element, isAnimated = true) {\n executeAfterTransition(callback, element, isAnimated)\n }\n\n _getConfig(config) {\n config = this._mergeConfigObj(config, this._element)\n config = this._configAfterMerge(config)\n this._typeCheckConfig(config)\n return config\n }\n\n // Static\n static getInstance(element) {\n return Data.get(getElement(element), this.DATA_KEY)\n }\n\n static getOrCreateInstance(element, config = {}) {\n return this.getInstance(element) || new this(element, typeof config === 'object' ? config : null)\n }\n\n static get VERSION() {\n return VERSION\n }\n\n static get DATA_KEY() {\n return `bs.${this.NAME}`\n }\n\n static get EVENT_KEY() {\n return `.${this.DATA_KEY}`\n }\n\n static eventName(name) {\n return `${name}${this.EVENT_KEY}`\n }\n}\n\nexport default BaseComponent\n"],"names":["VERSION","BaseComponent","Config","constructor","element","config","getElement","_element","_config","_getConfig","Data","set","DATA_KEY","dispose","remove","EventHandler","off","EVENT_KEY","propertyName","Object","getOwnPropertyNames","_queueCallback","callback","isAnimated","executeAfterTransition","_mergeConfigObj","_configAfterMerge","_typeCheckConfig","getInstance","get","getOrCreateInstance","NAME","eventName","name"],"mappings":";;;;;;;;;;;EAAA;EACA;EACA;EACA;EACA;EACA;;;EAOA;EACA;EACA;;EAEA,MAAMA,OAAO,GAAG,OAAO,CAAA;;EAEvB;EACA;EACA;;EAEA,MAAMC,aAAa,SAASC,MAAM,CAAC;EACjCC,EAAAA,WAAWA,CAACC,OAAO,EAAEC,MAAM,EAAE;EAC3B,IAAA,KAAK,EAAE,CAAA;EAEPD,IAAAA,OAAO,GAAGE,mBAAU,CAACF,OAAO,CAAC,CAAA;MAC7B,IAAI,CAACA,OAAO,EAAE;EACZ,MAAA,OAAA;EACF,KAAA;MAEA,IAAI,CAACG,QAAQ,GAAGH,OAAO,CAAA;MACvB,IAAI,CAACI,OAAO,GAAG,IAAI,CAACC,UAAU,CAACJ,MAAM,CAAC,CAAA;EAEtCK,IAAAA,IAAI,CAACC,GAAG,CAAC,IAAI,CAACJ,QAAQ,EAAE,IAAI,CAACJ,WAAW,CAACS,QAAQ,EAAE,IAAI,CAAC,CAAA;EAC1D,GAAA;;EAEA;EACAC,EAAAA,OAAOA,GAAG;EACRH,IAAAA,IAAI,CAACI,MAAM,CAAC,IAAI,CAACP,QAAQ,EAAE,IAAI,CAACJ,WAAW,CAACS,QAAQ,CAAC,CAAA;EACrDG,IAAAA,YAAY,CAACC,GAAG,CAAC,IAAI,CAACT,QAAQ,EAAE,IAAI,CAACJ,WAAW,CAACc,SAAS,CAAC,CAAA;MAE3D,KAAK,MAAMC,YAAY,IAAIC,MAAM,CAACC,mBAAmB,CAAC,IAAI,CAAC,EAAE;EAC3D,MAAA,IAAI,CAACF,YAAY,CAAC,GAAG,IAAI,CAAA;EAC3B,KAAA;EACF,GAAA;IAEAG,cAAcA,CAACC,QAAQ,EAAElB,OAAO,EAAEmB,UAAU,GAAG,IAAI,EAAE;EACnDC,IAAAA,+BAAsB,CAACF,QAAQ,EAAElB,OAAO,EAAEmB,UAAU,CAAC,CAAA;EACvD,GAAA;IAEAd,UAAUA,CAACJ,MAAM,EAAE;MACjBA,MAAM,GAAG,IAAI,CAACoB,eAAe,CAACpB,MAAM,EAAE,IAAI,CAACE,QAAQ,CAAC,CAAA;EACpDF,IAAAA,MAAM,GAAG,IAAI,CAACqB,iBAAiB,CAACrB,MAAM,CAAC,CAAA;EACvC,IAAA,IAAI,CAACsB,gBAAgB,CAACtB,MAAM,CAAC,CAAA;EAC7B,IAAA,OAAOA,MAAM,CAAA;EACf,GAAA;;EAEA;IACA,OAAOuB,WAAWA,CAACxB,OAAO,EAAE;EAC1B,IAAA,OAAOM,IAAI,CAACmB,GAAG,CAACvB,mBAAU,CAACF,OAAO,CAAC,EAAE,IAAI,CAACQ,QAAQ,CAAC,CAAA;EACrD,GAAA;IAEA,OAAOkB,mBAAmBA,CAAC1B,OAAO,EAAEC,MAAM,GAAG,EAAE,EAAE;MAC/C,OAAO,IAAI,CAACuB,WAAW,CAACxB,OAAO,CAAC,IAAI,IAAI,IAAI,CAACA,OAAO,EAAE,OAAOC,MAAM,KAAK,QAAQ,GAAGA,MAAM,GAAG,IAAI,CAAC,CAAA;EACnG,GAAA;IAEA,WAAWL,OAAOA,GAAG;EACnB,IAAA,OAAOA,OAAO,CAAA;EAChB,GAAA;IAEA,WAAWY,QAAQA,GAAG;EACpB,IAAA,OAAO,CAAM,GAAA,EAAA,IAAI,CAACmB,IAAI,CAAE,CAAA,CAAA;EAC1B,GAAA;IAEA,WAAWd,SAASA,GAAG;EACrB,IAAA,OAAO,CAAI,CAAA,EAAA,IAAI,CAACL,QAAQ,CAAE,CAAA,CAAA;EAC5B,GAAA;IAEA,OAAOoB,SAASA,CAACC,IAAI,EAAE;EACrB,IAAA,OAAO,GAAGA,IAAI,CAAA,EAAG,IAAI,CAAChB,SAAS,CAAE,CAAA,CAAA;EACnC,GAAA;EACF;;;;;;;;"}

View File

@ -1 +1 @@
{"version":3,"file":"button.js","sources":["../src/button.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap button.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport BaseComponent from './base-component.js'\nimport EventHandler from './dom/event-handler.js'\nimport { defineJQueryPlugin } from './util/index.js'\n\n/**\n * Constants\n */\n\nconst NAME = 'button'\nconst DATA_KEY = 'bs.button'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst DATA_API_KEY = '.data-api'\n\nconst CLASS_NAME_ACTIVE = 'active'\nconst SELECTOR_DATA_TOGGLE = '[data-bs-toggle=\"button\"]'\nconst EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`\n\n/**\n * Class definition\n */\n\nclass Button extends BaseComponent {\n // Getters\n static get NAME() {\n return NAME\n }\n\n // Public\n toggle() {\n // Toggle class and sync the `aria-pressed` attribute with the return value of the `.toggle()` method\n this._element.setAttribute('aria-pressed', this._element.classList.toggle(CLASS_NAME_ACTIVE))\n }\n\n // Static\n static jQueryInterface(config) {\n return this.each(function () {\n const data = Button.getOrCreateInstance(this)\n\n if (config === 'toggle') {\n data[config]()\n }\n })\n }\n}\n\n/**\n * Data API implementation\n */\n\nEventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, event => {\n event.preventDefault()\n\n const button = event.target.closest(SELECTOR_DATA_TOGGLE)\n const data = Button.getOrCreateInstance(button)\n\n data.toggle()\n})\n\n/**\n * jQuery\n */\n\ndefineJQueryPlugin(Button)\n\nexport default Button\n"],"names":["NAME","DATA_KEY","EVENT_KEY","DATA_API_KEY","CLASS_NAME_ACTIVE","SELECTOR_DATA_TOGGLE","EVENT_CLICK_DATA_API","Button","BaseComponent","toggle","_element","setAttribute","classList","jQueryInterface","config","each","data","getOrCreateInstance","EventHandler","on","document","event","preventDefault","button","target","closest","defineJQueryPlugin"],"mappings":";;;;;;;;;;;EAAA;EACA;EACA;EACA;EACA;EACA;;;EAMA;EACA;EACA;;EAEA,MAAMA,IAAI,GAAG,QAAQ,CAAA;EACrB,MAAMC,QAAQ,GAAG,WAAW,CAAA;EAC5B,MAAMC,SAAS,GAAI,CAAGD,CAAAA,EAAAA,QAAS,CAAC,CAAA,CAAA;EAChC,MAAME,YAAY,GAAG,WAAW,CAAA;EAEhC,MAAMC,iBAAiB,GAAG,QAAQ,CAAA;EAClC,MAAMC,oBAAoB,GAAG,2BAA2B,CAAA;EACxD,MAAMC,oBAAoB,GAAI,CAAA,KAAA,EAAOJ,SAAU,CAAA,EAAEC,YAAa,CAAC,CAAA,CAAA;;EAE/D;EACA;EACA;;EAEA,MAAMI,MAAM,SAASC,aAAa,CAAC;EACjC;IACA,WAAWR,IAAIA,GAAG;EAChB,IAAA,OAAOA,IAAI,CAAA;EACb,GAAA;;EAEA;EACAS,EAAAA,MAAMA,GAAG;EACP;EACA,IAAA,IAAI,CAACC,QAAQ,CAACC,YAAY,CAAC,cAAc,EAAE,IAAI,CAACD,QAAQ,CAACE,SAAS,CAACH,MAAM,CAACL,iBAAiB,CAAC,CAAC,CAAA;EAC/F,GAAA;;EAEA;IACA,OAAOS,eAAeA,CAACC,MAAM,EAAE;EAC7B,IAAA,OAAO,IAAI,CAACC,IAAI,CAAC,YAAY;EAC3B,MAAA,MAAMC,IAAI,GAAGT,MAAM,CAACU,mBAAmB,CAAC,IAAI,CAAC,CAAA;QAE7C,IAAIH,MAAM,KAAK,QAAQ,EAAE;EACvBE,QAAAA,IAAI,CAACF,MAAM,CAAC,EAAE,CAAA;EAChB,OAAA;EACF,KAAC,CAAC,CAAA;EACJ,GAAA;EACF,CAAA;;EAEA;EACA;EACA;;EAEAI,YAAY,CAACC,EAAE,CAACC,QAAQ,EAAEd,oBAAoB,EAAED,oBAAoB,EAAEgB,KAAK,IAAI;IAC7EA,KAAK,CAACC,cAAc,EAAE,CAAA;IAEtB,MAAMC,MAAM,GAAGF,KAAK,CAACG,MAAM,CAACC,OAAO,CAACpB,oBAAoB,CAAC,CAAA;EACzD,EAAA,MAAMW,IAAI,GAAGT,MAAM,CAACU,mBAAmB,CAACM,MAAM,CAAC,CAAA;IAE/CP,IAAI,CAACP,MAAM,EAAE,CAAA;EACf,CAAC,CAAC,CAAA;;EAEF;EACA;EACA;;AAEAiB,6BAAkB,CAACnB,MAAM,CAAC;;;;;;;;"}
{"version":3,"file":"button.js","sources":["../src/button.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap button.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport BaseComponent from './base-component.js'\nimport EventHandler from './dom/event-handler.js'\nimport { defineJQueryPlugin } from './util/index.js'\n\n/**\n * Constants\n */\n\nconst NAME = 'button'\nconst DATA_KEY = 'bs.button'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst DATA_API_KEY = '.data-api'\n\nconst CLASS_NAME_ACTIVE = 'active'\nconst SELECTOR_DATA_TOGGLE = '[data-bs-toggle=\"button\"]'\nconst EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`\n\n/**\n * Class definition\n */\n\nclass Button extends BaseComponent {\n // Getters\n static get NAME() {\n return NAME\n }\n\n // Public\n toggle() {\n // Toggle class and sync the `aria-pressed` attribute with the return value of the `.toggle()` method\n this._element.setAttribute('aria-pressed', this._element.classList.toggle(CLASS_NAME_ACTIVE))\n }\n\n // Static\n static jQueryInterface(config) {\n return this.each(function () {\n const data = Button.getOrCreateInstance(this)\n\n if (config === 'toggle') {\n data[config]()\n }\n })\n }\n}\n\n/**\n * Data API implementation\n */\n\nEventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, event => {\n event.preventDefault()\n\n const button = event.target.closest(SELECTOR_DATA_TOGGLE)\n const data = Button.getOrCreateInstance(button)\n\n data.toggle()\n})\n\n/**\n * jQuery\n */\n\ndefineJQueryPlugin(Button)\n\nexport default Button\n"],"names":["NAME","DATA_KEY","EVENT_KEY","DATA_API_KEY","CLASS_NAME_ACTIVE","SELECTOR_DATA_TOGGLE","EVENT_CLICK_DATA_API","Button","BaseComponent","toggle","_element","setAttribute","classList","jQueryInterface","config","each","data","getOrCreateInstance","EventHandler","on","document","event","preventDefault","button","target","closest","defineJQueryPlugin"],"mappings":";;;;;;;;;;;EAAA;EACA;EACA;EACA;EACA;EACA;;;EAMA;EACA;EACA;;EAEA,MAAMA,IAAI,GAAG,QAAQ,CAAA;EACrB,MAAMC,QAAQ,GAAG,WAAW,CAAA;EAC5B,MAAMC,SAAS,GAAG,CAAID,CAAAA,EAAAA,QAAQ,CAAE,CAAA,CAAA;EAChC,MAAME,YAAY,GAAG,WAAW,CAAA;EAEhC,MAAMC,iBAAiB,GAAG,QAAQ,CAAA;EAClC,MAAMC,oBAAoB,GAAG,2BAA2B,CAAA;EACxD,MAAMC,oBAAoB,GAAG,CAAA,KAAA,EAAQJ,SAAS,CAAA,EAAGC,YAAY,CAAE,CAAA,CAAA;;EAE/D;EACA;EACA;;EAEA,MAAMI,MAAM,SAASC,aAAa,CAAC;EACjC;IACA,WAAWR,IAAIA,GAAG;EAChB,IAAA,OAAOA,IAAI,CAAA;EACb,GAAA;;EAEA;EACAS,EAAAA,MAAMA,GAAG;EACP;EACA,IAAA,IAAI,CAACC,QAAQ,CAACC,YAAY,CAAC,cAAc,EAAE,IAAI,CAACD,QAAQ,CAACE,SAAS,CAACH,MAAM,CAACL,iBAAiB,CAAC,CAAC,CAAA;EAC/F,GAAA;;EAEA;IACA,OAAOS,eAAeA,CAACC,MAAM,EAAE;EAC7B,IAAA,OAAO,IAAI,CAACC,IAAI,CAAC,YAAY;EAC3B,MAAA,MAAMC,IAAI,GAAGT,MAAM,CAACU,mBAAmB,CAAC,IAAI,CAAC,CAAA;QAE7C,IAAIH,MAAM,KAAK,QAAQ,EAAE;EACvBE,QAAAA,IAAI,CAACF,MAAM,CAAC,EAAE,CAAA;EAChB,OAAA;EACF,KAAC,CAAC,CAAA;EACJ,GAAA;EACF,CAAA;;EAEA;EACA;EACA;;EAEAI,YAAY,CAACC,EAAE,CAACC,QAAQ,EAAEd,oBAAoB,EAAED,oBAAoB,EAAEgB,KAAK,IAAI;IAC7EA,KAAK,CAACC,cAAc,EAAE,CAAA;IAEtB,MAAMC,MAAM,GAAGF,KAAK,CAACG,MAAM,CAACC,OAAO,CAACpB,oBAAoB,CAAC,CAAA;EACzD,EAAA,MAAMW,IAAI,GAAGT,MAAM,CAACU,mBAAmB,CAACM,MAAM,CAAC,CAAA;IAE/CP,IAAI,CAACP,MAAM,EAAE,CAAA;EACf,CAAC,CAAC,CAAA;;EAEF;EACA;EACA;;AAEAiB,6BAAkB,CAACnB,MAAM,CAAC;;;;;;;;"}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
{"version":3,"file":"data.js","sources":["../../src/dom/data.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap dom/data.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\n/**\n * Constants\n */\n\nconst elementMap = new Map()\n\nexport default {\n set(element, key, instance) {\n if (!elementMap.has(element)) {\n elementMap.set(element, new Map())\n }\n\n const instanceMap = elementMap.get(element)\n\n // make it clear we only want one instance per element\n // can be removed later when multiple key/instances are fine to be used\n if (!instanceMap.has(key) && instanceMap.size !== 0) {\n // eslint-disable-next-line no-console\n console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(instanceMap.keys())[0]}.`)\n return\n }\n\n instanceMap.set(key, instance)\n },\n\n get(element, key) {\n if (elementMap.has(element)) {\n return elementMap.get(element).get(key) || null\n }\n\n return null\n },\n\n remove(element, key) {\n if (!elementMap.has(element)) {\n return\n }\n\n const instanceMap = elementMap.get(element)\n\n instanceMap.delete(key)\n\n // free up element references if there are no instances left for an element\n if (instanceMap.size === 0) {\n elementMap.delete(element)\n }\n }\n}\n"],"names":["elementMap","Map","set","element","key","instance","has","instanceMap","get","size","console","error","Array","from","keys","remove","delete"],"mappings":";;;;;;;;;;;EAAA;EACA;EACA;EACA;EACA;EACA;;EAEA;EACA;EACA;;EAEA,MAAMA,UAAU,GAAG,IAAIC,GAAG,EAAE,CAAA;AAE5B,eAAe;EACbC,EAAAA,GAAGA,CAACC,OAAO,EAAEC,GAAG,EAAEC,QAAQ,EAAE;EAC1B,IAAA,IAAI,CAACL,UAAU,CAACM,GAAG,CAACH,OAAO,CAAC,EAAE;QAC5BH,UAAU,CAACE,GAAG,CAACC,OAAO,EAAE,IAAIF,GAAG,EAAE,CAAC,CAAA;EACpC,KAAA;EAEA,IAAA,MAAMM,WAAW,GAAGP,UAAU,CAACQ,GAAG,CAACL,OAAO,CAAC,CAAA;;EAE3C;EACA;EACA,IAAA,IAAI,CAACI,WAAW,CAACD,GAAG,CAACF,GAAG,CAAC,IAAIG,WAAW,CAACE,IAAI,KAAK,CAAC,EAAE;EACnD;EACAC,MAAAA,OAAO,CAACC,KAAK,CAAE,+EAA8EC,KAAK,CAACC,IAAI,CAACN,WAAW,CAACO,IAAI,EAAE,CAAC,CAAC,CAAC,CAAE,GAAE,CAAC,CAAA;EAClI,MAAA,OAAA;EACF,KAAA;EAEAP,IAAAA,WAAW,CAACL,GAAG,CAACE,GAAG,EAAEC,QAAQ,CAAC,CAAA;KAC/B;EAEDG,EAAAA,GAAGA,CAACL,OAAO,EAAEC,GAAG,EAAE;EAChB,IAAA,IAAIJ,UAAU,CAACM,GAAG,CAACH,OAAO,CAAC,EAAE;EAC3B,MAAA,OAAOH,UAAU,CAACQ,GAAG,CAACL,OAAO,CAAC,CAACK,GAAG,CAACJ,GAAG,CAAC,IAAI,IAAI,CAAA;EACjD,KAAA;EAEA,IAAA,OAAO,IAAI,CAAA;KACZ;EAEDW,EAAAA,MAAMA,CAACZ,OAAO,EAAEC,GAAG,EAAE;EACnB,IAAA,IAAI,CAACJ,UAAU,CAACM,GAAG,CAACH,OAAO,CAAC,EAAE;EAC5B,MAAA,OAAA;EACF,KAAA;EAEA,IAAA,MAAMI,WAAW,GAAGP,UAAU,CAACQ,GAAG,CAACL,OAAO,CAAC,CAAA;EAE3CI,IAAAA,WAAW,CAACS,MAAM,CAACZ,GAAG,CAAC,CAAA;;EAEvB;EACA,IAAA,IAAIG,WAAW,CAACE,IAAI,KAAK,CAAC,EAAE;EAC1BT,MAAAA,UAAU,CAACgB,MAAM,CAACb,OAAO,CAAC,CAAA;EAC5B,KAAA;EACF,GAAA;EACF,CAAC;;;;;;;;"}
{"version":3,"file":"data.js","sources":["../../src/dom/data.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap dom/data.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\n/**\n * Constants\n */\n\nconst elementMap = new Map()\n\nexport default {\n set(element, key, instance) {\n if (!elementMap.has(element)) {\n elementMap.set(element, new Map())\n }\n\n const instanceMap = elementMap.get(element)\n\n // make it clear we only want one instance per element\n // can be removed later when multiple key/instances are fine to be used\n if (!instanceMap.has(key) && instanceMap.size !== 0) {\n // eslint-disable-next-line no-console\n console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(instanceMap.keys())[0]}.`)\n return\n }\n\n instanceMap.set(key, instance)\n },\n\n get(element, key) {\n if (elementMap.has(element)) {\n return elementMap.get(element).get(key) || null\n }\n\n return null\n },\n\n remove(element, key) {\n if (!elementMap.has(element)) {\n return\n }\n\n const instanceMap = elementMap.get(element)\n\n instanceMap.delete(key)\n\n // free up element references if there are no instances left for an element\n if (instanceMap.size === 0) {\n elementMap.delete(element)\n }\n }\n}\n"],"names":["elementMap","Map","set","element","key","instance","has","instanceMap","get","size","console","error","Array","from","keys","remove","delete"],"mappings":";;;;;;;;;;;EAAA;EACA;EACA;EACA;EACA;EACA;;EAEA;EACA;EACA;;EAEA,MAAMA,UAAU,GAAG,IAAIC,GAAG,EAAE,CAAA;AAE5B,eAAe;EACbC,EAAAA,GAAGA,CAACC,OAAO,EAAEC,GAAG,EAAEC,QAAQ,EAAE;EAC1B,IAAA,IAAI,CAACL,UAAU,CAACM,GAAG,CAACH,OAAO,CAAC,EAAE;QAC5BH,UAAU,CAACE,GAAG,CAACC,OAAO,EAAE,IAAIF,GAAG,EAAE,CAAC,CAAA;EACpC,KAAA;EAEA,IAAA,MAAMM,WAAW,GAAGP,UAAU,CAACQ,GAAG,CAACL,OAAO,CAAC,CAAA;;EAE3C;EACA;EACA,IAAA,IAAI,CAACI,WAAW,CAACD,GAAG,CAACF,GAAG,CAAC,IAAIG,WAAW,CAACE,IAAI,KAAK,CAAC,EAAE;EACnD;EACAC,MAAAA,OAAO,CAACC,KAAK,CAAC,+EAA+EC,KAAK,CAACC,IAAI,CAACN,WAAW,CAACO,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAA;EAClI,MAAA,OAAA;EACF,KAAA;EAEAP,IAAAA,WAAW,CAACL,GAAG,CAACE,GAAG,EAAEC,QAAQ,CAAC,CAAA;KAC/B;EAEDG,EAAAA,GAAGA,CAACL,OAAO,EAAEC,GAAG,EAAE;EAChB,IAAA,IAAIJ,UAAU,CAACM,GAAG,CAACH,OAAO,CAAC,EAAE;EAC3B,MAAA,OAAOH,UAAU,CAACQ,GAAG,CAACL,OAAO,CAAC,CAACK,GAAG,CAACJ,GAAG,CAAC,IAAI,IAAI,CAAA;EACjD,KAAA;EAEA,IAAA,OAAO,IAAI,CAAA;KACZ;EAEDW,EAAAA,MAAMA,CAACZ,OAAO,EAAEC,GAAG,EAAE;EACnB,IAAA,IAAI,CAACJ,UAAU,CAACM,GAAG,CAACH,OAAO,CAAC,EAAE;EAC5B,MAAA,OAAA;EACF,KAAA;EAEA,IAAA,MAAMI,WAAW,GAAGP,UAAU,CAACQ,GAAG,CAACL,OAAO,CAAC,CAAA;EAE3CI,IAAAA,WAAW,CAACS,MAAM,CAACZ,GAAG,CAAC,CAAA;;EAEvB;EACA,IAAA,IAAIG,WAAW,CAACE,IAAI,KAAK,CAAC,EAAE;EAC1BT,MAAAA,UAAU,CAACgB,MAAM,CAACb,OAAO,CAAC,CAAA;EAC5B,KAAA;EACF,GAAA;EACF,CAAC;;;;;;;;"}

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
{"version":3,"file":"manipulator.js","sources":["../../src/dom/manipulator.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap dom/manipulator.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nfunction normalizeData(value) {\n if (value === 'true') {\n return true\n }\n\n if (value === 'false') {\n return false\n }\n\n if (value === Number(value).toString()) {\n return Number(value)\n }\n\n if (value === '' || value === 'null') {\n return null\n }\n\n if (typeof value !== 'string') {\n return value\n }\n\n try {\n return JSON.parse(decodeURIComponent(value))\n } catch {\n return value\n }\n}\n\nfunction normalizeDataKey(key) {\n return key.replace(/[A-Z]/g, chr => `-${chr.toLowerCase()}`)\n}\n\nconst Manipulator = {\n setDataAttribute(element, key, value) {\n element.setAttribute(`data-bs-${normalizeDataKey(key)}`, value)\n },\n\n removeDataAttribute(element, key) {\n element.removeAttribute(`data-bs-${normalizeDataKey(key)}`)\n },\n\n getDataAttributes(element) {\n if (!element) {\n return {}\n }\n\n const attributes = {}\n const bsKeys = Object.keys(element.dataset).filter(key => key.startsWith('bs') && !key.startsWith('bsConfig'))\n\n for (const key of bsKeys) {\n let pureKey = key.replace(/^bs/, '')\n pureKey = pureKey.charAt(0).toLowerCase() + pureKey.slice(1, pureKey.length)\n attributes[pureKey] = normalizeData(element.dataset[key])\n }\n\n return attributes\n },\n\n getDataAttribute(element, key) {\n return normalizeData(element.getAttribute(`data-bs-${normalizeDataKey(key)}`))\n }\n}\n\nexport default Manipulator\n"],"names":["normalizeData","value","Number","toString","JSON","parse","decodeURIComponent","_unused","normalizeDataKey","key","replace","chr","toLowerCase","Manipulator","setDataAttribute","element","setAttribute","removeDataAttribute","removeAttribute","getDataAttributes","attributes","bsKeys","Object","keys","dataset","filter","startsWith","pureKey","charAt","slice","length","getDataAttribute","getAttribute"],"mappings":";;;;;;;;;;;EAAA;EACA;EACA;EACA;EACA;EACA;;EAEA,SAASA,aAAaA,CAACC,KAAK,EAAE;IAC5B,IAAIA,KAAK,KAAK,MAAM,EAAE;EACpB,IAAA,OAAO,IAAI,CAAA;EACb,GAAA;IAEA,IAAIA,KAAK,KAAK,OAAO,EAAE;EACrB,IAAA,OAAO,KAAK,CAAA;EACd,GAAA;IAEA,IAAIA,KAAK,KAAKC,MAAM,CAACD,KAAK,CAAC,CAACE,QAAQ,EAAE,EAAE;MACtC,OAAOD,MAAM,CAACD,KAAK,CAAC,CAAA;EACtB,GAAA;EAEA,EAAA,IAAIA,KAAK,KAAK,EAAE,IAAIA,KAAK,KAAK,MAAM,EAAE;EACpC,IAAA,OAAO,IAAI,CAAA;EACb,GAAA;EAEA,EAAA,IAAI,OAAOA,KAAK,KAAK,QAAQ,EAAE;EAC7B,IAAA,OAAOA,KAAK,CAAA;EACd,GAAA;IAEA,IAAI;MACF,OAAOG,IAAI,CAACC,KAAK,CAACC,kBAAkB,CAACL,KAAK,CAAC,CAAC,CAAA;KAC7C,CAAC,OAAAM,OAAA,EAAM;EACN,IAAA,OAAON,KAAK,CAAA;EACd,GAAA;EACF,CAAA;EAEA,SAASO,gBAAgBA,CAACC,GAAG,EAAE;EAC7B,EAAA,OAAOA,GAAG,CAACC,OAAO,CAAC,QAAQ,EAAEC,GAAG,IAAK,CAAA,CAAA,EAAGA,GAAG,CAACC,WAAW,EAAG,EAAC,CAAC,CAAA;EAC9D,CAAA;AAEA,QAAMC,WAAW,GAAG;EAClBC,EAAAA,gBAAgBA,CAACC,OAAO,EAAEN,GAAG,EAAER,KAAK,EAAE;MACpCc,OAAO,CAACC,YAAY,CAAE,CAAUR,QAAAA,EAAAA,gBAAgB,CAACC,GAAG,CAAE,CAAA,CAAC,EAAER,KAAK,CAAC,CAAA;KAChE;EAEDgB,EAAAA,mBAAmBA,CAACF,OAAO,EAAEN,GAAG,EAAE;MAChCM,OAAO,CAACG,eAAe,CAAE,CAAA,QAAA,EAAUV,gBAAgB,CAACC,GAAG,CAAE,CAAA,CAAC,CAAC,CAAA;KAC5D;IAEDU,iBAAiBA,CAACJ,OAAO,EAAE;MACzB,IAAI,CAACA,OAAO,EAAE;EACZ,MAAA,OAAO,EAAE,CAAA;EACX,KAAA;MAEA,MAAMK,UAAU,GAAG,EAAE,CAAA;EACrB,IAAA,MAAMC,MAAM,GAAGC,MAAM,CAACC,IAAI,CAACR,OAAO,CAACS,OAAO,CAAC,CAACC,MAAM,CAAChB,GAAG,IAAIA,GAAG,CAACiB,UAAU,CAAC,IAAI,CAAC,IAAI,CAACjB,GAAG,CAACiB,UAAU,CAAC,UAAU,CAAC,CAAC,CAAA;EAE9G,IAAA,KAAK,MAAMjB,GAAG,IAAIY,MAAM,EAAE;QACxB,IAAIM,OAAO,GAAGlB,GAAG,CAACC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAA;QACpCiB,OAAO,GAAGA,OAAO,CAACC,MAAM,CAAC,CAAC,CAAC,CAAChB,WAAW,EAAE,GAAGe,OAAO,CAACE,KAAK,CAAC,CAAC,EAAEF,OAAO,CAACG,MAAM,CAAC,CAAA;EAC5EV,MAAAA,UAAU,CAACO,OAAO,CAAC,GAAG3B,aAAa,CAACe,OAAO,CAACS,OAAO,CAACf,GAAG,CAAC,CAAC,CAAA;EAC3D,KAAA;EAEA,IAAA,OAAOW,UAAU,CAAA;KAClB;EAEDW,EAAAA,gBAAgBA,CAAChB,OAAO,EAAEN,GAAG,EAAE;EAC7B,IAAA,OAAOT,aAAa,CAACe,OAAO,CAACiB,YAAY,CAAE,CAAUxB,QAAAA,EAAAA,gBAAgB,CAACC,GAAG,CAAE,CAAA,CAAC,CAAC,CAAC,CAAA;EAChF,GAAA;EACF;;;;;;;;"}
{"version":3,"file":"manipulator.js","sources":["../../src/dom/manipulator.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap dom/manipulator.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nfunction normalizeData(value) {\n if (value === 'true') {\n return true\n }\n\n if (value === 'false') {\n return false\n }\n\n if (value === Number(value).toString()) {\n return Number(value)\n }\n\n if (value === '' || value === 'null') {\n return null\n }\n\n if (typeof value !== 'string') {\n return value\n }\n\n try {\n return JSON.parse(decodeURIComponent(value))\n } catch {\n return value\n }\n}\n\nfunction normalizeDataKey(key) {\n return key.replace(/[A-Z]/g, chr => `-${chr.toLowerCase()}`)\n}\n\nconst Manipulator = {\n setDataAttribute(element, key, value) {\n element.setAttribute(`data-bs-${normalizeDataKey(key)}`, value)\n },\n\n removeDataAttribute(element, key) {\n element.removeAttribute(`data-bs-${normalizeDataKey(key)}`)\n },\n\n getDataAttributes(element) {\n if (!element) {\n return {}\n }\n\n const attributes = {}\n const bsKeys = Object.keys(element.dataset).filter(key => key.startsWith('bs') && !key.startsWith('bsConfig'))\n\n for (const key of bsKeys) {\n let pureKey = key.replace(/^bs/, '')\n pureKey = pureKey.charAt(0).toLowerCase() + pureKey.slice(1, pureKey.length)\n attributes[pureKey] = normalizeData(element.dataset[key])\n }\n\n return attributes\n },\n\n getDataAttribute(element, key) {\n return normalizeData(element.getAttribute(`data-bs-${normalizeDataKey(key)}`))\n }\n}\n\nexport default Manipulator\n"],"names":["normalizeData","value","Number","toString","JSON","parse","decodeURIComponent","_unused","normalizeDataKey","key","replace","chr","toLowerCase","Manipulator","setDataAttribute","element","setAttribute","removeDataAttribute","removeAttribute","getDataAttributes","attributes","bsKeys","Object","keys","dataset","filter","startsWith","pureKey","charAt","slice","length","getDataAttribute","getAttribute"],"mappings":";;;;;;;;;;;EAAA;EACA;EACA;EACA;EACA;EACA;;EAEA,SAASA,aAAaA,CAACC,KAAK,EAAE;IAC5B,IAAIA,KAAK,KAAK,MAAM,EAAE;EACpB,IAAA,OAAO,IAAI,CAAA;EACb,GAAA;IAEA,IAAIA,KAAK,KAAK,OAAO,EAAE;EACrB,IAAA,OAAO,KAAK,CAAA;EACd,GAAA;IAEA,IAAIA,KAAK,KAAKC,MAAM,CAACD,KAAK,CAAC,CAACE,QAAQ,EAAE,EAAE;MACtC,OAAOD,MAAM,CAACD,KAAK,CAAC,CAAA;EACtB,GAAA;EAEA,EAAA,IAAIA,KAAK,KAAK,EAAE,IAAIA,KAAK,KAAK,MAAM,EAAE;EACpC,IAAA,OAAO,IAAI,CAAA;EACb,GAAA;EAEA,EAAA,IAAI,OAAOA,KAAK,KAAK,QAAQ,EAAE;EAC7B,IAAA,OAAOA,KAAK,CAAA;EACd,GAAA;IAEA,IAAI;MACF,OAAOG,IAAI,CAACC,KAAK,CAACC,kBAAkB,CAACL,KAAK,CAAC,CAAC,CAAA;KAC7C,CAAC,OAAAM,OAAA,EAAM;EACN,IAAA,OAAON,KAAK,CAAA;EACd,GAAA;EACF,CAAA;EAEA,SAASO,gBAAgBA,CAACC,GAAG,EAAE;EAC7B,EAAA,OAAOA,GAAG,CAACC,OAAO,CAAC,QAAQ,EAAEC,GAAG,IAAI,CAAA,CAAA,EAAIA,GAAG,CAACC,WAAW,EAAE,EAAE,CAAC,CAAA;EAC9D,CAAA;AAEA,QAAMC,WAAW,GAAG;EAClBC,EAAAA,gBAAgBA,CAACC,OAAO,EAAEN,GAAG,EAAER,KAAK,EAAE;MACpCc,OAAO,CAACC,YAAY,CAAC,CAAWR,QAAAA,EAAAA,gBAAgB,CAACC,GAAG,CAAC,CAAA,CAAE,EAAER,KAAK,CAAC,CAAA;KAChE;EAEDgB,EAAAA,mBAAmBA,CAACF,OAAO,EAAEN,GAAG,EAAE;MAChCM,OAAO,CAACG,eAAe,CAAC,CAAA,QAAA,EAAWV,gBAAgB,CAACC,GAAG,CAAC,CAAA,CAAE,CAAC,CAAA;KAC5D;IAEDU,iBAAiBA,CAACJ,OAAO,EAAE;MACzB,IAAI,CAACA,OAAO,EAAE;EACZ,MAAA,OAAO,EAAE,CAAA;EACX,KAAA;MAEA,MAAMK,UAAU,GAAG,EAAE,CAAA;EACrB,IAAA,MAAMC,MAAM,GAAGC,MAAM,CAACC,IAAI,CAACR,OAAO,CAACS,OAAO,CAAC,CAACC,MAAM,CAAChB,GAAG,IAAIA,GAAG,CAACiB,UAAU,CAAC,IAAI,CAAC,IAAI,CAACjB,GAAG,CAACiB,UAAU,CAAC,UAAU,CAAC,CAAC,CAAA;EAE9G,IAAA,KAAK,MAAMjB,GAAG,IAAIY,MAAM,EAAE;QACxB,IAAIM,OAAO,GAAGlB,GAAG,CAACC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAA;QACpCiB,OAAO,GAAGA,OAAO,CAACC,MAAM,CAAC,CAAC,CAAC,CAAChB,WAAW,EAAE,GAAGe,OAAO,CAACE,KAAK,CAAC,CAAC,EAAEF,OAAO,CAACG,MAAM,CAAC,CAAA;EAC5EV,MAAAA,UAAU,CAACO,OAAO,CAAC,GAAG3B,aAAa,CAACe,OAAO,CAACS,OAAO,CAACf,GAAG,CAAC,CAAC,CAAA;EAC3D,KAAA;EAEA,IAAA,OAAOW,UAAU,CAAA;KAClB;EAEDW,EAAAA,gBAAgBA,CAAChB,OAAO,EAAEN,GAAG,EAAE;EAC7B,IAAA,OAAOT,aAAa,CAACe,OAAO,CAACiB,YAAY,CAAC,CAAWxB,QAAAA,EAAAA,gBAAgB,CAACC,GAAG,CAAC,CAAA,CAAE,CAAC,CAAC,CAAA;EAChF,GAAA;EACF;;;;;;;;"}

File diff suppressed because one or more lines are too long

4
js/dist/dropdown.js vendored
View File

@ -206,7 +206,7 @@
}
_createPopper() {
if (typeof Popper__namespace === 'undefined') {
throw new TypeError('Bootstrap\'s dropdowns require Popper (https://popper.js.org)');
throw new TypeError('Bootstrap\'s dropdowns require Popper (https://popper.js.org/docs/v2/)');
}
let referenceElement = this._element;
if (this._config.reference === 'parent') {
@ -285,7 +285,7 @@
}
return {
...defaultBsPopperConfig,
...index_js.execute(this._config.popperConfig, [defaultBsPopperConfig])
...index_js.execute(this._config.popperConfig, [undefined, defaultBsPopperConfig])
};
}
_selectMenuItem({

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
{"version":3,"file":"popover.js","sources":["../src/popover.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap popover.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport Tooltip from './tooltip.js'\nimport { defineJQueryPlugin } from './util/index.js'\n\n/**\n * Constants\n */\n\nconst NAME = 'popover'\n\nconst SELECTOR_TITLE = '.popover-header'\nconst SELECTOR_CONTENT = '.popover-body'\n\nconst Default = {\n ...Tooltip.Default,\n content: '',\n offset: [0, 8],\n placement: 'right',\n template: '<div class=\"popover\" role=\"tooltip\">' +\n '<div class=\"popover-arrow\"></div>' +\n '<h3 class=\"popover-header\"></h3>' +\n '<div class=\"popover-body\"></div>' +\n '</div>',\n trigger: 'click'\n}\n\nconst DefaultType = {\n ...Tooltip.DefaultType,\n content: '(null|string|element|function)'\n}\n\n/**\n * Class definition\n */\n\nclass Popover extends Tooltip {\n // Getters\n static get Default() {\n return Default\n }\n\n static get DefaultType() {\n return DefaultType\n }\n\n static get NAME() {\n return NAME\n }\n\n // Overrides\n _isWithContent() {\n return this._getTitle() || this._getContent()\n }\n\n // Private\n _getContentForTemplate() {\n return {\n [SELECTOR_TITLE]: this._getTitle(),\n [SELECTOR_CONTENT]: this._getContent()\n }\n }\n\n _getContent() {\n return this._resolvePossibleFunction(this._config.content)\n }\n\n // Static\n static jQueryInterface(config) {\n return this.each(function () {\n const data = Popover.getOrCreateInstance(this, config)\n\n if (typeof config !== 'string') {\n return\n }\n\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`)\n }\n\n data[config]()\n })\n }\n}\n\n/**\n * jQuery\n */\n\ndefineJQueryPlugin(Popover)\n\nexport default Popover\n"],"names":["NAME","SELECTOR_TITLE","SELECTOR_CONTENT","Default","Tooltip","content","offset","placement","template","trigger","DefaultType","Popover","_isWithContent","_getTitle","_getContent","_getContentForTemplate","_resolvePossibleFunction","_config","jQueryInterface","config","each","data","getOrCreateInstance","TypeError","defineJQueryPlugin"],"mappings":";;;;;;;;;;;EAAA;EACA;EACA;EACA;EACA;EACA;;;EAKA;EACA;EACA;;EAEA,MAAMA,IAAI,GAAG,SAAS,CAAA;EAEtB,MAAMC,cAAc,GAAG,iBAAiB,CAAA;EACxC,MAAMC,gBAAgB,GAAG,eAAe,CAAA;EAExC,MAAMC,OAAO,GAAG;IACd,GAAGC,OAAO,CAACD,OAAO;EAClBE,EAAAA,OAAO,EAAE,EAAE;EACXC,EAAAA,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;EACdC,EAAAA,SAAS,EAAE,OAAO;IAClBC,QAAQ,EAAE,sCAAsC,GAC9C,mCAAmC,GACnC,kCAAkC,GAClC,kCAAkC,GAClC,QAAQ;EACVC,EAAAA,OAAO,EAAE,OAAA;EACX,CAAC,CAAA;EAED,MAAMC,WAAW,GAAG;IAClB,GAAGN,OAAO,CAACM,WAAW;EACtBL,EAAAA,OAAO,EAAE,gCAAA;EACX,CAAC,CAAA;;EAED;EACA;EACA;;EAEA,MAAMM,OAAO,SAASP,OAAO,CAAC;EAC5B;IACA,WAAWD,OAAOA,GAAG;EACnB,IAAA,OAAOA,OAAO,CAAA;EAChB,GAAA;IAEA,WAAWO,WAAWA,GAAG;EACvB,IAAA,OAAOA,WAAW,CAAA;EACpB,GAAA;IAEA,WAAWV,IAAIA,GAAG;EAChB,IAAA,OAAOA,IAAI,CAAA;EACb,GAAA;;EAEA;EACAY,EAAAA,cAAcA,GAAG;MACf,OAAO,IAAI,CAACC,SAAS,EAAE,IAAI,IAAI,CAACC,WAAW,EAAE,CAAA;EAC/C,GAAA;;EAEA;EACAC,EAAAA,sBAAsBA,GAAG;MACvB,OAAO;EACL,MAAA,CAACd,cAAc,GAAG,IAAI,CAACY,SAAS,EAAE;EAClC,MAAA,CAACX,gBAAgB,GAAG,IAAI,CAACY,WAAW,EAAC;OACtC,CAAA;EACH,GAAA;EAEAA,EAAAA,WAAWA,GAAG;MACZ,OAAO,IAAI,CAACE,wBAAwB,CAAC,IAAI,CAACC,OAAO,CAACZ,OAAO,CAAC,CAAA;EAC5D,GAAA;;EAEA;IACA,OAAOa,eAAeA,CAACC,MAAM,EAAE;EAC7B,IAAA,OAAO,IAAI,CAACC,IAAI,CAAC,YAAY;QAC3B,MAAMC,IAAI,GAAGV,OAAO,CAACW,mBAAmB,CAAC,IAAI,EAAEH,MAAM,CAAC,CAAA;EAEtD,MAAA,IAAI,OAAOA,MAAM,KAAK,QAAQ,EAAE;EAC9B,QAAA,OAAA;EACF,OAAA;EAEA,MAAA,IAAI,OAAOE,IAAI,CAACF,MAAM,CAAC,KAAK,WAAW,EAAE;EACvC,QAAA,MAAM,IAAII,SAAS,CAAE,CAAmBJ,iBAAAA,EAAAA,MAAO,GAAE,CAAC,CAAA;EACpD,OAAA;EAEAE,MAAAA,IAAI,CAACF,MAAM,CAAC,EAAE,CAAA;EAChB,KAAC,CAAC,CAAA;EACJ,GAAA;EACF,CAAA;;EAEA;EACA;EACA;;AAEAK,6BAAkB,CAACb,OAAO,CAAC;;;;;;;;"}
{"version":3,"file":"popover.js","sources":["../src/popover.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap popover.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport Tooltip from './tooltip.js'\nimport { defineJQueryPlugin } from './util/index.js'\n\n/**\n * Constants\n */\n\nconst NAME = 'popover'\n\nconst SELECTOR_TITLE = '.popover-header'\nconst SELECTOR_CONTENT = '.popover-body'\n\nconst Default = {\n ...Tooltip.Default,\n content: '',\n offset: [0, 8],\n placement: 'right',\n template: '<div class=\"popover\" role=\"tooltip\">' +\n '<div class=\"popover-arrow\"></div>' +\n '<h3 class=\"popover-header\"></h3>' +\n '<div class=\"popover-body\"></div>' +\n '</div>',\n trigger: 'click'\n}\n\nconst DefaultType = {\n ...Tooltip.DefaultType,\n content: '(null|string|element|function)'\n}\n\n/**\n * Class definition\n */\n\nclass Popover extends Tooltip {\n // Getters\n static get Default() {\n return Default\n }\n\n static get DefaultType() {\n return DefaultType\n }\n\n static get NAME() {\n return NAME\n }\n\n // Overrides\n _isWithContent() {\n return this._getTitle() || this._getContent()\n }\n\n // Private\n _getContentForTemplate() {\n return {\n [SELECTOR_TITLE]: this._getTitle(),\n [SELECTOR_CONTENT]: this._getContent()\n }\n }\n\n _getContent() {\n return this._resolvePossibleFunction(this._config.content)\n }\n\n // Static\n static jQueryInterface(config) {\n return this.each(function () {\n const data = Popover.getOrCreateInstance(this, config)\n\n if (typeof config !== 'string') {\n return\n }\n\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`)\n }\n\n data[config]()\n })\n }\n}\n\n/**\n * jQuery\n */\n\ndefineJQueryPlugin(Popover)\n\nexport default Popover\n"],"names":["NAME","SELECTOR_TITLE","SELECTOR_CONTENT","Default","Tooltip","content","offset","placement","template","trigger","DefaultType","Popover","_isWithContent","_getTitle","_getContent","_getContentForTemplate","_resolvePossibleFunction","_config","jQueryInterface","config","each","data","getOrCreateInstance","TypeError","defineJQueryPlugin"],"mappings":";;;;;;;;;;;EAAA;EACA;EACA;EACA;EACA;EACA;;;EAKA;EACA;EACA;;EAEA,MAAMA,IAAI,GAAG,SAAS,CAAA;EAEtB,MAAMC,cAAc,GAAG,iBAAiB,CAAA;EACxC,MAAMC,gBAAgB,GAAG,eAAe,CAAA;EAExC,MAAMC,OAAO,GAAG;IACd,GAAGC,OAAO,CAACD,OAAO;EAClBE,EAAAA,OAAO,EAAE,EAAE;EACXC,EAAAA,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;EACdC,EAAAA,SAAS,EAAE,OAAO;IAClBC,QAAQ,EAAE,sCAAsC,GAC9C,mCAAmC,GACnC,kCAAkC,GAClC,kCAAkC,GAClC,QAAQ;EACVC,EAAAA,OAAO,EAAE,OAAA;EACX,CAAC,CAAA;EAED,MAAMC,WAAW,GAAG;IAClB,GAAGN,OAAO,CAACM,WAAW;EACtBL,EAAAA,OAAO,EAAE,gCAAA;EACX,CAAC,CAAA;;EAED;EACA;EACA;;EAEA,MAAMM,OAAO,SAASP,OAAO,CAAC;EAC5B;IACA,WAAWD,OAAOA,GAAG;EACnB,IAAA,OAAOA,OAAO,CAAA;EAChB,GAAA;IAEA,WAAWO,WAAWA,GAAG;EACvB,IAAA,OAAOA,WAAW,CAAA;EACpB,GAAA;IAEA,WAAWV,IAAIA,GAAG;EAChB,IAAA,OAAOA,IAAI,CAAA;EACb,GAAA;;EAEA;EACAY,EAAAA,cAAcA,GAAG;MACf,OAAO,IAAI,CAACC,SAAS,EAAE,IAAI,IAAI,CAACC,WAAW,EAAE,CAAA;EAC/C,GAAA;;EAEA;EACAC,EAAAA,sBAAsBA,GAAG;MACvB,OAAO;EACL,MAAA,CAACd,cAAc,GAAG,IAAI,CAACY,SAAS,EAAE;EAClC,MAAA,CAACX,gBAAgB,GAAG,IAAI,CAACY,WAAW,EAAC;OACtC,CAAA;EACH,GAAA;EAEAA,EAAAA,WAAWA,GAAG;MACZ,OAAO,IAAI,CAACE,wBAAwB,CAAC,IAAI,CAACC,OAAO,CAACZ,OAAO,CAAC,CAAA;EAC5D,GAAA;;EAEA;IACA,OAAOa,eAAeA,CAACC,MAAM,EAAE;EAC7B,IAAA,OAAO,IAAI,CAACC,IAAI,CAAC,YAAY;QAC3B,MAAMC,IAAI,GAAGV,OAAO,CAACW,mBAAmB,CAAC,IAAI,EAAEH,MAAM,CAAC,CAAA;EAEtD,MAAA,IAAI,OAAOA,MAAM,KAAK,QAAQ,EAAE;EAC9B,QAAA,OAAA;EACF,OAAA;EAEA,MAAA,IAAI,OAAOE,IAAI,CAACF,MAAM,CAAC,KAAK,WAAW,EAAE;EACvC,QAAA,MAAM,IAAII,SAAS,CAAC,CAAoBJ,iBAAAA,EAAAA,MAAM,GAAG,CAAC,CAAA;EACpD,OAAA;EAEAE,MAAAA,IAAI,CAACF,MAAM,CAAC,EAAE,CAAA;EAChB,KAAC,CAAC,CAAA;EACJ,GAAA;EACF,CAAA;;EAEA;EACA;EACA;;AAEAK,6BAAkB,CAACb,OAAO,CAAC;;;;;;;;"}

File diff suppressed because one or more lines are too long

2
js/dist/tab.js.map vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

6
js/dist/tooltip.js vendored
View File

@ -115,7 +115,7 @@
class Tooltip extends BaseComponent {
constructor(element, config) {
if (typeof Popper__namespace === 'undefined') {
throw new TypeError('Bootstrap\'s tooltips require Popper (https://popper.js.org)');
throw new TypeError('Bootstrap\'s tooltips require Popper (https://popper.js.org/docs/v2/)');
}
super(element, config);
@ -349,7 +349,7 @@
return offset;
}
_resolvePossibleFunction(arg) {
return index_js.execute(arg, [this._element]);
return index_js.execute(arg, [this._element, this._element]);
}
_getPopperConfig(attachment) {
const defaultBsPopperConfig = {
@ -387,7 +387,7 @@
};
return {
...defaultBsPopperConfig,
...index_js.execute(this._config.popperConfig, [defaultBsPopperConfig])
...index_js.execute(this._config.popperConfig, [undefined, defaultBsPopperConfig])
};
}
_setListeners() {

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
{"version":3,"file":"component-functions.js","sources":["../../src/util/component-functions.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap util/component-functions.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport EventHandler from '../dom/event-handler.js'\nimport SelectorEngine from '../dom/selector-engine.js'\nimport { isDisabled } from './index.js'\n\nconst enableDismissTrigger = (component, method = 'hide') => {\n const clickEvent = `click.dismiss${component.EVENT_KEY}`\n const name = component.NAME\n\n EventHandler.on(document, clickEvent, `[data-bs-dismiss=\"${name}\"]`, function (event) {\n if (['A', 'AREA'].includes(this.tagName)) {\n event.preventDefault()\n }\n\n if (isDisabled(this)) {\n return\n }\n\n const target = SelectorEngine.getElementFromSelector(this) || this.closest(`.${name}`)\n const instance = component.getOrCreateInstance(target)\n\n // Method argument is left, for Alert and only, as it doesn't implement the 'hide' method\n instance[method]()\n })\n}\n\nexport {\n enableDismissTrigger\n}\n"],"names":["enableDismissTrigger","component","method","clickEvent","EVENT_KEY","name","NAME","EventHandler","on","document","event","includes","tagName","preventDefault","isDisabled","target","SelectorEngine","getElementFromSelector","closest","instance","getOrCreateInstance"],"mappings":";;;;;;;;;;;EAAA;EACA;EACA;EACA;EACA;EACA;;AAMMA,QAAAA,oBAAoB,GAAGA,CAACC,SAAS,EAAEC,MAAM,GAAG,MAAM,KAAK;EAC3D,EAAA,MAAMC,UAAU,GAAI,CAAA,aAAA,EAAeF,SAAS,CAACG,SAAU,CAAC,CAAA,CAAA;EACxD,EAAA,MAAMC,IAAI,GAAGJ,SAAS,CAACK,IAAI,CAAA;EAE3BC,EAAAA,YAAY,CAACC,EAAE,CAACC,QAAQ,EAAEN,UAAU,EAAG,CAAA,kBAAA,EAAoBE,IAAK,CAAA,EAAA,CAAG,EAAE,UAAUK,KAAK,EAAE;EACpF,IAAA,IAAI,CAAC,GAAG,EAAE,MAAM,CAAC,CAACC,QAAQ,CAAC,IAAI,CAACC,OAAO,CAAC,EAAE;QACxCF,KAAK,CAACG,cAAc,EAAE,CAAA;EACxB,KAAA;EAEA,IAAA,IAAIC,mBAAU,CAAC,IAAI,CAAC,EAAE;EACpB,MAAA,OAAA;EACF,KAAA;EAEA,IAAA,MAAMC,MAAM,GAAGC,cAAc,CAACC,sBAAsB,CAAC,IAAI,CAAC,IAAI,IAAI,CAACC,OAAO,CAAE,CAAGb,CAAAA,EAAAA,IAAK,EAAC,CAAC,CAAA;EACtF,IAAA,MAAMc,QAAQ,GAAGlB,SAAS,CAACmB,mBAAmB,CAACL,MAAM,CAAC,CAAA;;EAEtD;EACAI,IAAAA,QAAQ,CAACjB,MAAM,CAAC,EAAE,CAAA;EACpB,GAAC,CAAC,CAAA;EACJ;;;;;;;;;;"}
{"version":3,"file":"component-functions.js","sources":["../../src/util/component-functions.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap util/component-functions.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport EventHandler from '../dom/event-handler.js'\nimport SelectorEngine from '../dom/selector-engine.js'\nimport { isDisabled } from './index.js'\n\nconst enableDismissTrigger = (component, method = 'hide') => {\n const clickEvent = `click.dismiss${component.EVENT_KEY}`\n const name = component.NAME\n\n EventHandler.on(document, clickEvent, `[data-bs-dismiss=\"${name}\"]`, function (event) {\n if (['A', 'AREA'].includes(this.tagName)) {\n event.preventDefault()\n }\n\n if (isDisabled(this)) {\n return\n }\n\n const target = SelectorEngine.getElementFromSelector(this) || this.closest(`.${name}`)\n const instance = component.getOrCreateInstance(target)\n\n // Method argument is left, for Alert and only, as it doesn't implement the 'hide' method\n instance[method]()\n })\n}\n\nexport {\n enableDismissTrigger\n}\n"],"names":["enableDismissTrigger","component","method","clickEvent","EVENT_KEY","name","NAME","EventHandler","on","document","event","includes","tagName","preventDefault","isDisabled","target","SelectorEngine","getElementFromSelector","closest","instance","getOrCreateInstance"],"mappings":";;;;;;;;;;;EAAA;EACA;EACA;EACA;EACA;EACA;;AAMMA,QAAAA,oBAAoB,GAAGA,CAACC,SAAS,EAAEC,MAAM,GAAG,MAAM,KAAK;EAC3D,EAAA,MAAMC,UAAU,GAAG,CAAA,aAAA,EAAgBF,SAAS,CAACG,SAAS,CAAE,CAAA,CAAA;EACxD,EAAA,MAAMC,IAAI,GAAGJ,SAAS,CAACK,IAAI,CAAA;EAE3BC,EAAAA,YAAY,CAACC,EAAE,CAACC,QAAQ,EAAEN,UAAU,EAAE,CAAA,kBAAA,EAAqBE,IAAI,CAAA,EAAA,CAAI,EAAE,UAAUK,KAAK,EAAE;EACpF,IAAA,IAAI,CAAC,GAAG,EAAE,MAAM,CAAC,CAACC,QAAQ,CAAC,IAAI,CAACC,OAAO,CAAC,EAAE;QACxCF,KAAK,CAACG,cAAc,EAAE,CAAA;EACxB,KAAA;EAEA,IAAA,IAAIC,mBAAU,CAAC,IAAI,CAAC,EAAE;EACpB,MAAA,OAAA;EACF,KAAA;EAEA,IAAA,MAAMC,MAAM,GAAGC,cAAc,CAACC,sBAAsB,CAAC,IAAI,CAAC,IAAI,IAAI,CAACC,OAAO,CAAC,CAAIb,CAAAA,EAAAA,IAAI,EAAE,CAAC,CAAA;EACtF,IAAA,MAAMc,QAAQ,GAAGlB,SAAS,CAACmB,mBAAmB,CAACL,MAAM,CAAC,CAAA;;EAEtD;EACAI,IAAAA,QAAQ,CAACjB,MAAM,CAAC,EAAE,CAAA;EACpB,GAAC,CAAC,CAAA;EACJ;;;;;;;;;;"}

View File

@ -1 +1 @@
{"version":3,"file":"config.js","sources":["../../src/util/config.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap util/config.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport Manipulator from '../dom/manipulator.js'\nimport { isElement, toType } from './index.js'\n\n/**\n * Class definition\n */\n\nclass Config {\n // Getters\n static get Default() {\n return {}\n }\n\n static get DefaultType() {\n return {}\n }\n\n static get NAME() {\n throw new Error('You have to implement the static method \"NAME\", for each component!')\n }\n\n _getConfig(config) {\n config = this._mergeConfigObj(config)\n config = this._configAfterMerge(config)\n this._typeCheckConfig(config)\n return config\n }\n\n _configAfterMerge(config) {\n return config\n }\n\n _mergeConfigObj(config, element) {\n const jsonConfig = isElement(element) ? Manipulator.getDataAttribute(element, 'config') : {} // try to parse\n\n return {\n ...this.constructor.Default,\n ...(typeof jsonConfig === 'object' ? jsonConfig : {}),\n ...(isElement(element) ? Manipulator.getDataAttributes(element) : {}),\n ...(typeof config === 'object' ? config : {})\n }\n }\n\n _typeCheckConfig(config, configTypes = this.constructor.DefaultType) {\n for (const [property, expectedTypes] of Object.entries(configTypes)) {\n const value = config[property]\n const valueType = isElement(value) ? 'element' : toType(value)\n\n if (!new RegExp(expectedTypes).test(valueType)) {\n throw new TypeError(\n `${this.constructor.NAME.toUpperCase()}: Option \"${property}\" provided type \"${valueType}\" but expected type \"${expectedTypes}\".`\n )\n }\n }\n }\n}\n\nexport default Config\n"],"names":["Config","Default","DefaultType","NAME","Error","_getConfig","config","_mergeConfigObj","_configAfterMerge","_typeCheckConfig","element","jsonConfig","isElement","Manipulator","getDataAttribute","constructor","getDataAttributes","configTypes","property","expectedTypes","Object","entries","value","valueType","toType","RegExp","test","TypeError","toUpperCase"],"mappings":";;;;;;;;;;;EAAA;EACA;EACA;EACA;EACA;EACA;;;EAKA;EACA;EACA;;EAEA,MAAMA,MAAM,CAAC;EACX;IACA,WAAWC,OAAOA,GAAG;EACnB,IAAA,OAAO,EAAE,CAAA;EACX,GAAA;IAEA,WAAWC,WAAWA,GAAG;EACvB,IAAA,OAAO,EAAE,CAAA;EACX,GAAA;IAEA,WAAWC,IAAIA,GAAG;EAChB,IAAA,MAAM,IAAIC,KAAK,CAAC,qEAAqE,CAAC,CAAA;EACxF,GAAA;IAEAC,UAAUA,CAACC,MAAM,EAAE;EACjBA,IAAAA,MAAM,GAAG,IAAI,CAACC,eAAe,CAACD,MAAM,CAAC,CAAA;EACrCA,IAAAA,MAAM,GAAG,IAAI,CAACE,iBAAiB,CAACF,MAAM,CAAC,CAAA;EACvC,IAAA,IAAI,CAACG,gBAAgB,CAACH,MAAM,CAAC,CAAA;EAC7B,IAAA,OAAOA,MAAM,CAAA;EACf,GAAA;IAEAE,iBAAiBA,CAACF,MAAM,EAAE;EACxB,IAAA,OAAOA,MAAM,CAAA;EACf,GAAA;EAEAC,EAAAA,eAAeA,CAACD,MAAM,EAAEI,OAAO,EAAE;EAC/B,IAAA,MAAMC,UAAU,GAAGC,kBAAS,CAACF,OAAO,CAAC,GAAGG,WAAW,CAACC,gBAAgB,CAACJ,OAAO,EAAE,QAAQ,CAAC,GAAG,EAAE,CAAC;;MAE7F,OAAO;EACL,MAAA,GAAG,IAAI,CAACK,WAAW,CAACd,OAAO;QAC3B,IAAI,OAAOU,UAAU,KAAK,QAAQ,GAAGA,UAAU,GAAG,EAAE;EACpD,MAAA,IAAIC,kBAAS,CAACF,OAAO,CAAC,GAAGG,WAAW,CAACG,iBAAiB,CAACN,OAAO,CAAC,GAAG,EAAE;QACpE,IAAI,OAAOJ,MAAM,KAAK,QAAQ,GAAGA,MAAM,GAAG,EAAE;OAC7C,CAAA;EACH,GAAA;IAEAG,gBAAgBA,CAACH,MAAM,EAAEW,WAAW,GAAG,IAAI,CAACF,WAAW,CAACb,WAAW,EAAE;EACnE,IAAA,KAAK,MAAM,CAACgB,QAAQ,EAAEC,aAAa,CAAC,IAAIC,MAAM,CAACC,OAAO,CAACJ,WAAW,CAAC,EAAE;EACnE,MAAA,MAAMK,KAAK,GAAGhB,MAAM,CAACY,QAAQ,CAAC,CAAA;EAC9B,MAAA,MAAMK,SAAS,GAAGX,kBAAS,CAACU,KAAK,CAAC,GAAG,SAAS,GAAGE,eAAM,CAACF,KAAK,CAAC,CAAA;QAE9D,IAAI,CAAC,IAAIG,MAAM,CAACN,aAAa,CAAC,CAACO,IAAI,CAACH,SAAS,CAAC,EAAE;UAC9C,MAAM,IAAII,SAAS,CAChB,CAAA,EAAE,IAAI,CAACZ,WAAW,CAACZ,IAAI,CAACyB,WAAW,EAAG,aAAYV,QAAS,CAAA,iBAAA,EAAmBK,SAAU,CAAuBJ,qBAAAA,EAAAA,aAAc,IAChI,CAAC,CAAA;EACH,OAAA;EACF,KAAA;EACF,GAAA;EACF;;;;;;;;"}
{"version":3,"file":"config.js","sources":["../../src/util/config.js"],"sourcesContent":["/**\n * --------------------------------------------------------------------------\n * Bootstrap util/config.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport Manipulator from '../dom/manipulator.js'\nimport { isElement, toType } from './index.js'\n\n/**\n * Class definition\n */\n\nclass Config {\n // Getters\n static get Default() {\n return {}\n }\n\n static get DefaultType() {\n return {}\n }\n\n static get NAME() {\n throw new Error('You have to implement the static method \"NAME\", for each component!')\n }\n\n _getConfig(config) {\n config = this._mergeConfigObj(config)\n config = this._configAfterMerge(config)\n this._typeCheckConfig(config)\n return config\n }\n\n _configAfterMerge(config) {\n return config\n }\n\n _mergeConfigObj(config, element) {\n const jsonConfig = isElement(element) ? Manipulator.getDataAttribute(element, 'config') : {} // try to parse\n\n return {\n ...this.constructor.Default,\n ...(typeof jsonConfig === 'object' ? jsonConfig : {}),\n ...(isElement(element) ? Manipulator.getDataAttributes(element) : {}),\n ...(typeof config === 'object' ? config : {})\n }\n }\n\n _typeCheckConfig(config, configTypes = this.constructor.DefaultType) {\n for (const [property, expectedTypes] of Object.entries(configTypes)) {\n const value = config[property]\n const valueType = isElement(value) ? 'element' : toType(value)\n\n if (!new RegExp(expectedTypes).test(valueType)) {\n throw new TypeError(\n `${this.constructor.NAME.toUpperCase()}: Option \"${property}\" provided type \"${valueType}\" but expected type \"${expectedTypes}\".`\n )\n }\n }\n }\n}\n\nexport default Config\n"],"names":["Config","Default","DefaultType","NAME","Error","_getConfig","config","_mergeConfigObj","_configAfterMerge","_typeCheckConfig","element","jsonConfig","isElement","Manipulator","getDataAttribute","constructor","getDataAttributes","configTypes","property","expectedTypes","Object","entries","value","valueType","toType","RegExp","test","TypeError","toUpperCase"],"mappings":";;;;;;;;;;;EAAA;EACA;EACA;EACA;EACA;EACA;;;EAKA;EACA;EACA;;EAEA,MAAMA,MAAM,CAAC;EACX;IACA,WAAWC,OAAOA,GAAG;EACnB,IAAA,OAAO,EAAE,CAAA;EACX,GAAA;IAEA,WAAWC,WAAWA,GAAG;EACvB,IAAA,OAAO,EAAE,CAAA;EACX,GAAA;IAEA,WAAWC,IAAIA,GAAG;EAChB,IAAA,MAAM,IAAIC,KAAK,CAAC,qEAAqE,CAAC,CAAA;EACxF,GAAA;IAEAC,UAAUA,CAACC,MAAM,EAAE;EACjBA,IAAAA,MAAM,GAAG,IAAI,CAACC,eAAe,CAACD,MAAM,CAAC,CAAA;EACrCA,IAAAA,MAAM,GAAG,IAAI,CAACE,iBAAiB,CAACF,MAAM,CAAC,CAAA;EACvC,IAAA,IAAI,CAACG,gBAAgB,CAACH,MAAM,CAAC,CAAA;EAC7B,IAAA,OAAOA,MAAM,CAAA;EACf,GAAA;IAEAE,iBAAiBA,CAACF,MAAM,EAAE;EACxB,IAAA,OAAOA,MAAM,CAAA;EACf,GAAA;EAEAC,EAAAA,eAAeA,CAACD,MAAM,EAAEI,OAAO,EAAE;EAC/B,IAAA,MAAMC,UAAU,GAAGC,kBAAS,CAACF,OAAO,CAAC,GAAGG,WAAW,CAACC,gBAAgB,CAACJ,OAAO,EAAE,QAAQ,CAAC,GAAG,EAAE,CAAC;;MAE7F,OAAO;EACL,MAAA,GAAG,IAAI,CAACK,WAAW,CAACd,OAAO;QAC3B,IAAI,OAAOU,UAAU,KAAK,QAAQ,GAAGA,UAAU,GAAG,EAAE,CAAC;EACrD,MAAA,IAAIC,kBAAS,CAACF,OAAO,CAAC,GAAGG,WAAW,CAACG,iBAAiB,CAACN,OAAO,CAAC,GAAG,EAAE,CAAC;QACrE,IAAI,OAAOJ,MAAM,KAAK,QAAQ,GAAGA,MAAM,GAAG,EAAE,CAAA;OAC7C,CAAA;EACH,GAAA;IAEAG,gBAAgBA,CAACH,MAAM,EAAEW,WAAW,GAAG,IAAI,CAACF,WAAW,CAACb,WAAW,EAAE;EACnE,IAAA,KAAK,MAAM,CAACgB,QAAQ,EAAEC,aAAa,CAAC,IAAIC,MAAM,CAACC,OAAO,CAACJ,WAAW,CAAC,EAAE;EACnE,MAAA,MAAMK,KAAK,GAAGhB,MAAM,CAACY,QAAQ,CAAC,CAAA;EAC9B,MAAA,MAAMK,SAAS,GAAGX,kBAAS,CAACU,KAAK,CAAC,GAAG,SAAS,GAAGE,eAAM,CAACF,KAAK,CAAC,CAAA;QAE9D,IAAI,CAAC,IAAIG,MAAM,CAACN,aAAa,CAAC,CAACO,IAAI,CAACH,SAAS,CAAC,EAAE;UAC9C,MAAM,IAAII,SAAS,CACjB,CAAA,EAAG,IAAI,CAACZ,WAAW,CAACZ,IAAI,CAACyB,WAAW,EAAE,aAAaV,QAAQ,CAAA,iBAAA,EAAoBK,SAAS,CAAwBJ,qBAAAA,EAAAA,aAAa,IAC/H,CAAC,CAAA;EACH,OAAA;EACF,KAAA;EACF,GAAA;EACF;;;;;;;;"}

File diff suppressed because one or more lines are too long

View File

@ -157,7 +157,7 @@
* @param {HTMLElement} element
* @return void
*
* @see https://www.charistheo.io/blog/2021/02/restart-a-css-animation-with-javascript/#restarting-a-css-animation
* @see https://www.harrytheo.com/blog/2021/02/restart-a-css-animation-with-javascript/#restarting-a-css-animation
*/
const reflow = element => {
element.offsetHeight; // eslint-disable-line no-unused-expressions
@ -202,7 +202,7 @@
});
};
const execute = (possibleCallback, args = [], defaultValue = possibleCallback) => {
return typeof possibleCallback === 'function' ? possibleCallback(...args) : defaultValue;
return typeof possibleCallback === 'function' ? possibleCallback.call(...args) : defaultValue;
};
const executeAfterTransition = (callback, transitionElement, waitForTransition = true) => {
if (!waitForTransition) {

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -133,7 +133,7 @@
return this._config.sanitize ? sanitizer_js.sanitizeHtml(arg, this._config.allowList, this._config.sanitizeFn) : arg;
}
_resolvePossibleFunction(arg) {
return index_js.execute(arg, [this]);
return index_js.execute(arg, [undefined, this]);
}
_putElementInTemplate(element, templateElement) {
if (this._config.html) {

File diff suppressed because one or more lines are too long

View File

@ -1,9 +1,8 @@
@use "functions";
@use "mixins/border-radius";
@use "mixins/color-mode";
@use "mixins/transition";
@use "setup/variables";
@use "vendor/rfs";
@use "mixins/border-radius" as *;
@use "mixins/color-mode" as *;
@use "mixins/transition" as *;
@use "setup/variables" as *;
@use "vendor/rfs" as *;
//
// Base styles
@ -11,27 +10,27 @@
.accordion {
// scss-docs-start accordion-css-vars
--#{variables.$prefix}accordion-color: #{variables.$accordion-color};
--#{variables.$prefix}accordion-bg: #{variables.$accordion-bg};
--#{variables.$prefix}accordion-transition: #{variables.$accordion-transition};
--#{variables.$prefix}accordion-border-color: #{variables.$accordion-border-color};
--#{variables.$prefix}accordion-border-width: #{variables.$accordion-border-width};
--#{variables.$prefix}accordion-border-radius: #{variables.$accordion-border-radius};
--#{variables.$prefix}accordion-inner-border-radius: #{variables.$accordion-inner-border-radius};
--#{variables.$prefix}accordion-btn-padding-x: #{variables.$accordion-button-padding-x};
--#{variables.$prefix}accordion-btn-padding-y: #{variables.$accordion-button-padding-y};
--#{variables.$prefix}accordion-btn-color: #{variables.$accordion-button-color};
--#{variables.$prefix}accordion-btn-bg: #{variables.$accordion-button-bg};
--#{variables.$prefix}accordion-btn-icon: #{functions.escape-svg(variables.$accordion-button-icon)};
--#{variables.$prefix}accordion-btn-icon-width: #{variables.$accordion-icon-width};
--#{variables.$prefix}accordion-btn-icon-transform: #{variables.$accordion-icon-transform};
--#{variables.$prefix}accordion-btn-icon-transition: #{variables.$accordion-icon-transition};
--#{variables.$prefix}accordion-btn-active-icon: #{functions.escape-svg(variables.$accordion-button-active-icon)};
--#{variables.$prefix}accordion-btn-focus-box-shadow: #{variables.$accordion-button-focus-box-shadow};
--#{variables.$prefix}accordion-body-padding-x: #{variables.$accordion-body-padding-x};
--#{variables.$prefix}accordion-body-padding-y: #{variables.$accordion-body-padding-y};
--#{variables.$prefix}accordion-active-color: #{variables.$accordion-button-active-color};
--#{variables.$prefix}accordion-active-bg: #{variables.$accordion-button-active-bg};
--#{$prefix}accordion-color: #{$accordion-color};
--#{$prefix}accordion-bg: #{$accordion-bg};
--#{$prefix}accordion-transition: #{$accordion-transition};
--#{$prefix}accordion-border-color: #{$accordion-border-color};
--#{$prefix}accordion-border-width: #{$accordion-border-width};
--#{$prefix}accordion-border-radius: #{$accordion-border-radius};
--#{$prefix}accordion-inner-border-radius: #{$accordion-inner-border-radius};
--#{$prefix}accordion-btn-padding-x: #{$accordion-button-padding-x};
--#{$prefix}accordion-btn-padding-y: #{$accordion-button-padding-y};
--#{$prefix}accordion-btn-color: #{$accordion-button-color};
--#{$prefix}accordion-btn-bg: #{$accordion-button-bg};
--#{$prefix}accordion-btn-icon: #{escape-svg($accordion-button-icon)};
--#{$prefix}accordion-btn-icon-width: #{$accordion-icon-width};
--#{$prefix}accordion-btn-icon-transform: #{$accordion-icon-transform};
--#{$prefix}accordion-btn-icon-transition: #{$accordion-icon-transition};
--#{$prefix}accordion-btn-active-icon: #{escape-svg($accordion-button-active-icon)};
--#{$prefix}accordion-btn-focus-box-shadow: #{$accordion-button-focus-box-shadow};
--#{$prefix}accordion-body-padding-x: #{$accordion-body-padding-x};
--#{$prefix}accordion-body-padding-y: #{$accordion-body-padding-y};
--#{$prefix}accordion-active-color: #{$accordion-button-active-color};
--#{$prefix}accordion-active-bg: #{$accordion-button-active-bg};
// scss-docs-end accordion-css-vars
}
@ -40,38 +39,38 @@
display: flex;
align-items: center;
width: 100%;
padding: var(--#{variables.$prefix}accordion-btn-padding-y) var(--#{variables.$prefix}accordion-btn-padding-x);
@include rfs.font-size(variables.$font-size-base);
color: var(--#{variables.$prefix}accordion-btn-color);
padding: var(--#{$prefix}accordion-btn-padding-y) var(--#{$prefix}accordion-btn-padding-x);
@include font-size($font-size-base);
color: var(--#{$prefix}accordion-btn-color);
text-align: left; // Reset button style
background-color: var(--#{variables.$prefix}accordion-btn-bg);
background-color: var(--#{$prefix}accordion-btn-bg);
border: 0;
@include border-radius.border-radius(0);
@include border-radius(0);
overflow-anchor: none;
@include transition.transition(var(--#{variables.$prefix}accordion-transition));
@include transition(var(--#{$prefix}accordion-transition));
&:not(.collapsed) {
color: var(--#{variables.$prefix}accordion-active-color);
background-color: var(--#{variables.$prefix}accordion-active-bg);
box-shadow: inset 0 calc(-1 * var(--#{variables.$prefix}accordion-border-width)) 0 var(--#{variables.$prefix}accordion-border-color); // stylelint-disable-line function-disallowed-list
color: var(--#{$prefix}accordion-active-color);
background-color: var(--#{$prefix}accordion-active-bg);
box-shadow: inset 0 calc(-1 * var(--#{$prefix}accordion-border-width)) 0 var(--#{$prefix}accordion-border-color); // stylelint-disable-line function-disallowed-list
&::after {
background-image: var(--#{variables.$prefix}accordion-btn-active-icon);
transform: var(--#{variables.$prefix}accordion-btn-icon-transform);
background-image: var(--#{$prefix}accordion-btn-active-icon);
transform: var(--#{$prefix}accordion-btn-icon-transform);
}
}
// Accordion icon
&::after {
flex-shrink: 0;
width: var(--#{variables.$prefix}accordion-btn-icon-width);
height: var(--#{variables.$prefix}accordion-btn-icon-width);
width: var(--#{$prefix}accordion-btn-icon-width);
height: var(--#{$prefix}accordion-btn-icon-width);
margin-left: auto;
content: "";
background-image: var(--#{variables.$prefix}accordion-btn-icon);
background-image: var(--#{$prefix}accordion-btn-icon);
background-repeat: no-repeat;
background-size: var(--#{variables.$prefix}accordion-btn-icon-width);
@include transition.transition(var(--#{variables.$prefix}accordion-btn-icon-transition));
background-size: var(--#{$prefix}accordion-btn-icon-width);
@include transition(var(--#{$prefix}accordion-btn-icon-transition));
}
&:hover {
@ -81,7 +80,7 @@
&:focus {
z-index: 3;
outline: 0;
box-shadow: var(--#{variables.$prefix}accordion-btn-focus-box-shadow);
box-shadow: var(--#{$prefix}accordion-btn-focus-box-shadow);
}
}
@ -90,15 +89,15 @@
}
.accordion-item {
color: var(--#{variables.$prefix}accordion-color);
background-color: var(--#{variables.$prefix}accordion-bg);
border: var(--#{variables.$prefix}accordion-border-width) solid var(--#{variables.$prefix}accordion-border-color);
color: var(--#{$prefix}accordion-color);
background-color: var(--#{$prefix}accordion-bg);
border: var(--#{$prefix}accordion-border-width) solid var(--#{$prefix}accordion-border-color);
&:first-of-type {
@include border-radius.border-top-radius(var(--#{variables.$prefix}accordion-border-radius));
@include border-top-radius(var(--#{$prefix}accordion-border-radius));
> .accordion-header .accordion-button {
@include border-radius.border-top-radius(var(--#{variables.$prefix}accordion-inner-border-radius));
@include border-top-radius(var(--#{$prefix}accordion-inner-border-radius));
}
}
@ -108,22 +107,22 @@
// Only set a border-radius on the last item if the accordion is collapsed
&:last-of-type {
@include border-radius.border-bottom-radius(var(--#{variables.$prefix}accordion-border-radius));
@include border-bottom-radius(var(--#{$prefix}accordion-border-radius));
> .accordion-header .accordion-button {
&.collapsed {
@include border-radius.border-bottom-radius(var(--#{variables.$prefix}accordion-inner-border-radius));
@include border-bottom-radius(var(--#{$prefix}accordion-inner-border-radius));
}
}
> .accordion-collapse {
@include border-radius.border-bottom-radius(var(--#{variables.$prefix}accordion-border-radius));
@include border-bottom-radius(var(--#{$prefix}accordion-border-radius));
}
}
}
.accordion-body {
padding: var(--#{variables.$prefix}accordion-body-padding-y) var(--#{variables.$prefix}accordion-body-padding-x);
padding: var(--#{$prefix}accordion-body-padding-y) var(--#{$prefix}accordion-body-padding-x);
}
@ -135,7 +134,7 @@
> .accordion-item {
border-right: 0;
border-left: 0;
@include border-radius.border-radius(0);
@include border-radius(0);
&:first-child { border-top: 0; }
&:last-child { border-bottom: 0; }
@ -144,17 +143,17 @@
> .accordion-collapse,
> .accordion-header .accordion-button,
> .accordion-header .accordion-button.collapsed {
@include border-radius.border-radius(0);
@include border-radius(0);
}
// stylelint-enable selector-max-class
}
}
@if variables.$enable-dark-mode {
@include color-mode.color-mode(dark) {
@if $enable-dark-mode {
@include color-mode(dark) {
.accordion-button::after {
--#{variables.$prefix}accordion-btn-icon: #{functions.escape-svg($accordion-button-icon-dark)};
--#{variables.$prefix}accordion-btn-active-icon: #{functions.escape-svg($accordion-button-active-icon-dark)};
--#{$prefix}accordion-btn-icon: #{escape-svg($accordion-button-icon-dark)};
--#{$prefix}accordion-btn-active-icon: #{escape-svg($accordion-button-active-icon-dark)};
}
}
}

View File

@ -1,6 +1,6 @@
@use "sass:map";
@use "mixins/border-radius";
@use "setup/variables";
@use "mixins/border-radius" as *;
@use "setup/variables" as *;
//
// Base styles
@ -8,24 +8,24 @@
.alert {
// scss-docs-start alert-css-vars
--#{variables.$prefix}alert-bg: transparent;
--#{variables.$prefix}alert-padding-x: #{variables.$alert-padding-x};
--#{variables.$prefix}alert-padding-y: #{variables.$alert-padding-y};
--#{variables.$prefix}alert-margin-bottom: #{variables.$alert-margin-bottom};
--#{variables.$prefix}alert-color: inherit;
--#{variables.$prefix}alert-border-color: transparent;
--#{variables.$prefix}alert-border: #{variables.$alert-border-width} solid var(--#{variables.$prefix}alert-border-color);
--#{variables.$prefix}alert-border-radius: #{variables.$alert-border-radius};
--#{variables.$prefix}alert-link-color: inherit;
--#{$prefix}alert-bg: transparent;
--#{$prefix}alert-padding-x: #{$alert-padding-x};
--#{$prefix}alert-padding-y: #{$alert-padding-y};
--#{$prefix}alert-margin-bottom: #{$alert-margin-bottom};
--#{$prefix}alert-color: inherit;
--#{$prefix}alert-border-color: transparent;
--#{$prefix}alert-border: #{$alert-border-width} solid var(--#{$prefix}alert-border-color);
--#{$prefix}alert-border-radius: #{$alert-border-radius};
--#{$prefix}alert-link-color: inherit;
// scss-docs-end alert-css-vars
position: relative;
padding: var(--#{variables.$prefix}alert-padding-y) var(--#{variables.$prefix}alert-padding-x);
margin-bottom: var(--#{variables.$prefix}alert-margin-bottom);
color: var(--#{variables.$prefix}alert-color);
background-color: var(--#{variables.$prefix}alert-bg);
border: var(--#{variables.$prefix}alert-border);
@include border-radius.border-radius(var(--#{variables.$prefix}alert-border-radius));
padding: var(--#{$prefix}alert-padding-y) var(--#{$prefix}alert-padding-x);
margin-bottom: var(--#{$prefix}alert-margin-bottom);
color: var(--#{$prefix}alert-color);
background-color: var(--#{$prefix}alert-bg);
border: var(--#{$prefix}alert-border);
@include border-radius(var(--#{$prefix}alert-border-radius));
}
// Headings for larger alerts
@ -36,8 +36,8 @@
// Provide class for links that match alerts
.alert-link {
font-weight: variables.$alert-link-font-weight;
color: var(--#{variables.$prefix}alert-link-color);
font-weight: $alert-link-font-weight;
color: var(--#{$prefix}alert-link-color);
}
@ -46,27 +46,27 @@
// Expand the right padding and account for the close button's positioning.
.alert-dismissible {
padding-right: variables.$alert-dismissible-padding-r;
padding-right: $alert-dismissible-padding-r;
// Adjust close link position
.btn-close {
position: absolute;
top: 0;
right: 0;
z-index: variables.$stretched-link-z-index + 1;
padding: variables.$alert-padding-y * 1.25 variables.$alert-padding-x;
z-index: $stretched-link-z-index + 1;
padding: $alert-padding-y * 1.25 $alert-padding-x;
}
}
// scss-docs-start alert-modifiers
// Generate contextual modifier classes for colorizing the alert
@each $state in map.keys(variables.$theme-colors) {
@each $state in map.keys($theme-colors) {
.alert-#{$state} {
--#{variables.$prefix}alert-color: var(--#{variables.$prefix}#{$state}-text-emphasis);
--#{variables.$prefix}alert-bg: var(--#{variables.$prefix}#{$state}-bg-subtle);
--#{variables.$prefix}alert-border-color: var(--#{variables.$prefix}#{$state}-border-subtle);
--#{variables.$prefix}alert-link-color: var(--#{variables.$prefix}#{$state}-text-emphasis);
--#{$prefix}alert-color: var(--#{$prefix}#{$state}-text-emphasis);
--#{$prefix}alert-bg: var(--#{$prefix}#{$state}-bg-subtle);
--#{$prefix}alert-border-color: var(--#{$prefix}#{$state}-border-subtle);
--#{$prefix}alert-link-color: var(--#{$prefix}#{$state}-text-emphasis);
}
}
// scss-docs-end alert-modifiers

View File

@ -1,7 +1,7 @@
@use "mixins/border-radius";
@use "mixins/gradients";
@use "setup/variables";
@use "vendor/rfs";
@use "mixins/border-radius" as *;
@use "mixins/gradients" as *;
@use "setup/variables" as *;
@use "vendor/rfs" as *;
// Base class
//
@ -10,25 +10,25 @@
.badge {
// scss-docs-start badge-css-vars
--#{variables.$prefix}badge-padding-x: #{variables.$badge-padding-x};
--#{variables.$prefix}badge-padding-y: #{variables.$badge-padding-y};
@include rfs.rfs(variables.$badge-font-size, --#{variables.$prefix}badge-font-size);
--#{variables.$prefix}badge-font-weight: #{variables.$badge-font-weight};
--#{variables.$prefix}badge-color: #{variables.$badge-color};
--#{variables.$prefix}badge-border-radius: #{variables.$badge-border-radius};
--#{$prefix}badge-padding-x: #{$badge-padding-x};
--#{$prefix}badge-padding-y: #{$badge-padding-y};
@include rfs($badge-font-size, --#{$prefix}badge-font-size);
--#{$prefix}badge-font-weight: #{$badge-font-weight};
--#{$prefix}badge-color: #{$badge-color};
--#{$prefix}badge-border-radius: #{$badge-border-radius};
// scss-docs-end badge-css-vars
display: inline-block;
padding: var(--#{variables.$prefix}badge-padding-y) var(--#{variables.$prefix}badge-padding-x);
@include rfs.font-size(var(--#{variables.$prefix}badge-font-size));
font-weight: var(--#{variables.$prefix}badge-font-weight);
padding: var(--#{$prefix}badge-padding-y) var(--#{$prefix}badge-padding-x);
@include font-size(var(--#{$prefix}badge-font-size));
font-weight: var(--#{$prefix}badge-font-weight);
line-height: 1;
color: var(--#{variables.$prefix}badge-color);
color: var(--#{$prefix}badge-color);
text-align: center;
white-space: nowrap;
vertical-align: baseline;
@include border-radius.border-radius(var(--#{variables.$prefix}badge-border-radius));
@include gradients.gradient-bg();
@include border-radius(var(--#{$prefix}badge-border-radius));
@include gradient-bg();
// Empty badges collapse automatically
&:empty {

View File

@ -1,45 +1,45 @@
@use "functions";
@use "mixins/border-radius";
@use "setup/variables";
@use "vendor/rfs";
@use "mixins/border-radius" as *;
@use "setup/functions" as *;
@use "setup/variables" as *;
@use "vendor/rfs" as *;
.breadcrumb {
// scss-docs-start breadcrumb-css-vars
--#{variables.$prefix}breadcrumb-padding-x: #{variables.$breadcrumb-padding-x};
--#{variables.$prefix}breadcrumb-padding-y: #{variables.$breadcrumb-padding-y};
--#{variables.$prefix}breadcrumb-margin-bottom: #{variables.$breadcrumb-margin-bottom};
@include rfs.rfs(variables.$breadcrumb-font-size, --#{variables.$prefix}breadcrumb-font-size);
--#{variables.$prefix}breadcrumb-bg: #{variables.$breadcrumb-bg};
--#{variables.$prefix}breadcrumb-border-radius: #{variables.$breadcrumb-border-radius};
--#{variables.$prefix}breadcrumb-divider-color: #{variables.$breadcrumb-divider-color};
--#{variables.$prefix}breadcrumb-item-padding-x: #{variables.$breadcrumb-item-padding-x};
--#{variables.$prefix}breadcrumb-item-active-color: #{variables.$breadcrumb-active-color};
--#{$prefix}breadcrumb-padding-x: #{$breadcrumb-padding-x};
--#{$prefix}breadcrumb-padding-y: #{$breadcrumb-padding-y};
--#{$prefix}breadcrumb-margin-bottom: #{$breadcrumb-margin-bottom};
@include rfs($breadcrumb-font-size, --#{$prefix}breadcrumb-font-size);
--#{$prefix}breadcrumb-bg: #{$breadcrumb-bg};
--#{$prefix}breadcrumb-border-radius: #{$breadcrumb-border-radius};
--#{$prefix}breadcrumb-divider-color: #{$breadcrumb-divider-color};
--#{$prefix}breadcrumb-item-padding-x: #{$breadcrumb-item-padding-x};
--#{$prefix}breadcrumb-item-active-color: #{$breadcrumb-active-color};
// scss-docs-end breadcrumb-css-vars
display: flex;
flex-wrap: wrap;
padding: var(--#{variables.$prefix}breadcrumb-padding-y) var(--#{variables.$prefix}breadcrumb-padding-x);
margin-bottom: var(--#{variables.$prefix}breadcrumb-margin-bottom);
@include rfs.font-size(var(--#{variables.$prefix}breadcrumb-font-size));
padding: var(--#{$prefix}breadcrumb-padding-y) var(--#{$prefix}breadcrumb-padding-x);
margin-bottom: var(--#{$prefix}breadcrumb-margin-bottom);
@include font-size(var(--#{$prefix}breadcrumb-font-size));
list-style: none;
background-color: var(--#{variables.$prefix}breadcrumb-bg);
@include border-radius.border-radius(var(--#{variables.$prefix}breadcrumb-border-radius));
background-color: var(--#{$prefix}breadcrumb-bg);
@include border-radius(var(--#{$prefix}breadcrumb-border-radius));
}
.breadcrumb-item {
// The separator between breadcrumbs (by default, a forward-slash: "/")
+ .breadcrumb-item {
padding-left: var(--#{variables.$prefix}breadcrumb-item-padding-x);
padding-left: var(--#{$prefix}breadcrumb-item-padding-x);
&::before {
float: left; // Suppress inline spacings and underlining of the separator
padding-right: var(--#{variables.$prefix}breadcrumb-item-padding-x);
color: var(--#{variables.$prefix}breadcrumb-divider-color);
content: var(--#{variables.$prefix}breadcrumb-divider, functions.escape-svg(variables.$breadcrumb-divider)) #{"/* rtl:"} var(--#{variables.$prefix}breadcrumb-divider, functions.escape-svg(variables.$breadcrumb-divider-flipped)) #{"*/"};
padding-right: var(--#{$prefix}breadcrumb-item-padding-x);
color: var(--#{$prefix}breadcrumb-divider-color);
content: var(--#{$prefix}breadcrumb-divider, escape-svg($breadcrumb-divider)) #{"/* rtl:"} var(--#{$prefix}breadcrumb-divider, escape-svg($breadcrumb-divider-flipped)) #{"*/"};
}
}
&.active {
color: var(--#{variables.$prefix}breadcrumb-item-active-color);
color: var(--#{$prefix}breadcrumb-item-active-color);
}
}

View File

@ -1,6 +1,6 @@
@use "mixins/border-radius";
@use "mixins/box-shadow";
@use "setup/variables";
@use "mixins/border-radius" as *;
@use "mixins/box-shadow" as *;
@use "setup/variables" as *;
// Make the div behave like a button
.btn-group,
@ -38,19 +38,19 @@
}
.btn-group {
@include border-radius.border-radius(variables.$btn-border-radius);
@include border-radius($btn-border-radius);
// Prevent double borders when buttons are next to each other
> :not(.btn-check:first-child) + .btn,
> .btn-group:not(:first-child) {
margin-left: calc(#{variables.$btn-border-width} * -1); // stylelint-disable-line function-disallowed-list
margin-left: calc(#{$btn-border-width} * -1); // stylelint-disable-line function-disallowed-list
}
// Reset rounded corners
> .btn:not(:last-child):not(.dropdown-toggle),
> .btn.dropdown-toggle-split:first-child,
> .btn-group:not(:last-child) > .btn {
@include border-radius.border-end-radius(0);
@include border-end-radius(0);
}
// The left radius should be 0 if the button is:
@ -60,7 +60,7 @@
> .btn:nth-child(n + 3),
> :not(.btn-check) + .btn,
> .btn-group:not(:first-child) > .btn {
@include border-radius.border-start-radius(0);
@include border-start-radius(0);
}
}
@ -77,8 +77,8 @@
//
.dropdown-toggle-split {
padding-right: variables.$btn-padding-x * .75;
padding-left: variables.$btn-padding-x * .75;
padding-right: $btn-padding-x * .75;
padding-left: $btn-padding-x * .75;
&::after,
.dropup &::after,
@ -92,24 +92,24 @@
}
.btn-sm + .dropdown-toggle-split {
padding-right: variables.$btn-padding-x-sm * .75;
padding-left: variables.$btn-padding-x-sm * .75;
padding-right: $btn-padding-x-sm * .75;
padding-left: $btn-padding-x-sm * .75;
}
.btn-lg + .dropdown-toggle-split {
padding-right: variables.$btn-padding-x-lg * .75;
padding-left: variables.$btn-padding-x-lg * .75;
padding-right: $btn-padding-x-lg * .75;
padding-left: $btn-padding-x-lg * .75;
}
// The clickable button for toggling the menu
// Set the same inset shadow as the :active state
.btn-group.show .dropdown-toggle {
@include box-shadow.box-shadow(variables.$btn-active-box-shadow);
@include box-shadow($btn-active-box-shadow);
// Show no shadow for `.btn-link` since it has no other button styles.
&.btn-link {
@include box-shadow.box-shadow(none);
@include box-shadow(none);
}
}
@ -130,13 +130,13 @@
> .btn:not(:first-child),
> .btn-group:not(:first-child) {
margin-top: calc(#{variables.$btn-border-width} * -1); // stylelint-disable-line function-disallowed-list
margin-top: calc(#{$btn-border-width} * -1); // stylelint-disable-line function-disallowed-list
}
// Reset rounded corners
> .btn:not(:last-child):not(.dropdown-toggle),
> .btn-group:not(:last-child) > .btn {
@include border-radius.border-bottom-radius(0);
@include border-bottom-radius(0);
}
// The top radius should be 0 if the button is:
@ -146,6 +146,6 @@
> .btn:nth-child(n + 3),
> :not(.btn-check) + .btn,
> .btn-group:not(:first-child) > .btn {
@include border-radius.border-top-radius(0);
@include border-top-radius(0);
}
}

View File

@ -1,10 +1,11 @@
@use "mixins/border-radius";
@use "mixins/box-shadow";
@use "mixins/buttons";
@use "mixins/gradients";
@use "mixins/transition";
@use "setup" as *;
@use "vendor/rfs";
@use "mixins/border-radius" as *;
@use "mixins/box-shadow" as *;
@use "mixins/buttons" as *;
@use "mixins/gradients" as *;
@use "mixins/transition" as *;
@use "setup/functions" as *;
@use "setup/variables" as *;
@use "vendor/rfs" as *;
//
// Base styles
@ -15,7 +16,7 @@
--#{$prefix}btn-padding-x: #{$btn-padding-x};
--#{$prefix}btn-padding-y: #{$btn-padding-y};
--#{$prefix}btn-font-family: #{$btn-font-family};
@include rfs.rfs($btn-font-size, --#{$prefix}btn-font-size);
@include rfs($btn-font-size, --#{$prefix}btn-font-size);
--#{$prefix}btn-font-weight: #{$btn-font-weight};
--#{$prefix}btn-line-height: #{$btn-line-height};
--#{$prefix}btn-color: #{$btn-color};
@ -32,7 +33,7 @@
display: inline-block;
padding: var(--#{$prefix}btn-padding-y) var(--#{$prefix}btn-padding-x);
font-family: var(--#{$prefix}btn-font-family);
@include rfs.font-size(var(--#{$prefix}btn-font-size));
@include font-size(var(--#{$prefix}btn-font-size));
font-weight: var(--#{$prefix}btn-font-weight);
line-height: var(--#{$prefix}btn-line-height);
color: var(--#{$prefix}btn-color);
@ -43,10 +44,10 @@
cursor: if($enable-button-pointers, pointer, null);
user-select: none;
border: var(--#{$prefix}btn-border-width) solid var(--#{$prefix}btn-border-color);
@include border-radius.border-radius(var(--#{$prefix}btn-border-radius));
@include gradients.gradient-bg(var(--#{$prefix}btn-bg));
@include box-shadow.box-shadow(var(--#{$prefix}btn-box-shadow));
@include transition.transition($btn-transition);
@include border-radius(var(--#{$prefix}btn-border-radius));
@include gradient-bg(var(--#{$prefix}btn-bg));
@include box-shadow(var(--#{$prefix}btn-box-shadow));
@include transition($btn-transition);
&:hover {
color: var(--#{$prefix}btn-hover-color);
@ -64,7 +65,7 @@
&:focus-visible {
color: var(--#{$prefix}btn-hover-color);
@include gradients.gradient-bg(var(--#{$prefix}btn-hover-bg));
@include gradient-bg(var(--#{$prefix}btn-hover-bg));
border-color: var(--#{$prefix}btn-hover-border-color);
outline: 0;
// Avoid using mixin so we can pass custom focus shadow properly
@ -96,7 +97,7 @@
// Remove CSS gradients if they're enabled
background-image: if($enable-gradients, none, null);
border-color: var(--#{$prefix}btn-active-border-color);
@include box-shadow.box-shadow(var(--#{$prefix}btn-active-shadow));
@include box-shadow(var(--#{$prefix}btn-active-shadow));
&:focus-visible {
// Avoid using mixin so we can pass custom focus shadow properly
@ -126,7 +127,7 @@
background-image: if($enable-gradients, none, null);
border-color: var(--#{$prefix}btn-disabled-border-color);
opacity: var(--#{$prefix}btn-disabled-opacity);
@include box-shadow.box-shadow(none);
@include box-shadow(none);
}
}
@ -139,7 +140,7 @@
@each $color, $value in $theme-colors {
.btn-#{$color} {
@if $color == "light" {
@include buttons.button-variant(
@include button-variant(
$value,
$value,
$hover-background: shade-color($value, $btn-hover-bg-shade-amount),
@ -148,7 +149,7 @@
$active-border: shade-color($value, $btn-active-border-shade-amount)
);
} @else if $color == "dark" {
@include buttons.button-variant(
@include button-variant(
$value,
$value,
$hover-background: tint-color($value, $btn-hover-bg-tint-amount),
@ -157,14 +158,14 @@
$active-border: tint-color($value, $btn-active-border-tint-amount)
);
} @else {
@include buttons.button-variant($value, $value);
@include button-variant($value, $value);
}
}
}
@each $color, $value in $theme-colors {
.btn-outline-#{$color} {
@include buttons.button-outline-variant($value);
@include button-outline-variant($value);
}
}
// scss-docs-end btn-variant-loops
@ -216,9 +217,9 @@
//
.btn-lg {
@include buttons.button-size($btn-padding-y-lg, $btn-padding-x-lg, $btn-font-size-lg, $btn-border-radius-lg);
@include button-size($btn-padding-y-lg, $btn-padding-x-lg, $btn-font-size-lg, $btn-border-radius-lg);
}
.btn-sm {
@include buttons.button-size($btn-padding-y-sm, $btn-padding-x-sm, $btn-font-size-sm, $btn-border-radius-sm);
@include button-size($btn-padding-y-sm, $btn-padding-x-sm, $btn-font-size-sm, $btn-border-radius-sm);
}

View File

@ -1,7 +1,7 @@
@use "mixins/border-radius";
@use "mixins/box-shadow";
@use "mixins/breakpoints";
@use "setup/variables";
@use "mixins/border-radius" as *;
@use "mixins/box-shadow" as *;
@use "mixins/breakpoints" as *;
@use "setup/variables" as *;
//
// Base styles
@ -9,39 +9,39 @@
.card {
// scss-docs-start card-css-vars
--#{variables.$prefix}card-spacer-y: #{variables.$card-spacer-y};
--#{variables.$prefix}card-spacer-x: #{variables.$card-spacer-x};
--#{variables.$prefix}card-title-spacer-y: #{variables.$card-title-spacer-y};
--#{variables.$prefix}card-title-color: #{variables.$card-title-color};
--#{variables.$prefix}card-subtitle-color: #{variables.$card-subtitle-color};
--#{variables.$prefix}card-border-width: #{variables.$card-border-width};
--#{variables.$prefix}card-border-color: #{variables.$card-border-color};
--#{variables.$prefix}card-border-radius: #{variables.$card-border-radius};
--#{variables.$prefix}card-box-shadow: #{variables.$card-box-shadow};
--#{variables.$prefix}card-inner-border-radius: #{variables.$card-inner-border-radius};
--#{variables.$prefix}card-cap-padding-y: #{variables.$card-cap-padding-y};
--#{variables.$prefix}card-cap-padding-x: #{variables.$card-cap-padding-x};
--#{variables.$prefix}card-cap-bg: #{variables.$card-cap-bg};
--#{variables.$prefix}card-cap-color: #{variables.$card-cap-color};
--#{variables.$prefix}card-height: #{variables.$card-height};
--#{variables.$prefix}card-color: #{variables.$card-color};
--#{variables.$prefix}card-bg: #{variables.$card-bg};
--#{variables.$prefix}card-img-overlay-padding: #{variables.$card-img-overlay-padding};
--#{variables.$prefix}card-group-margin: #{variables.$card-group-margin};
--#{$prefix}card-spacer-y: #{$card-spacer-y};
--#{$prefix}card-spacer-x: #{$card-spacer-x};
--#{$prefix}card-title-spacer-y: #{$card-title-spacer-y};
--#{$prefix}card-title-color: #{$card-title-color};
--#{$prefix}card-subtitle-color: #{$card-subtitle-color};
--#{$prefix}card-border-width: #{$card-border-width};
--#{$prefix}card-border-color: #{$card-border-color};
--#{$prefix}card-border-radius: #{$card-border-radius};
--#{$prefix}card-box-shadow: #{$card-box-shadow};
--#{$prefix}card-inner-border-radius: #{$card-inner-border-radius};
--#{$prefix}card-cap-padding-y: #{$card-cap-padding-y};
--#{$prefix}card-cap-padding-x: #{$card-cap-padding-x};
--#{$prefix}card-cap-bg: #{$card-cap-bg};
--#{$prefix}card-cap-color: #{$card-cap-color};
--#{$prefix}card-height: #{$card-height};
--#{$prefix}card-color: #{$card-color};
--#{$prefix}card-bg: #{$card-bg};
--#{$prefix}card-img-overlay-padding: #{$card-img-overlay-padding};
--#{$prefix}card-group-margin: #{$card-group-margin};
// scss-docs-end card-css-vars
position: relative;
display: flex;
flex-direction: column;
min-width: 0; // See https://github.com/twbs/bootstrap/pull/22740#issuecomment-305868106
height: var(--#{variables.$prefix}card-height);
color: var(--#{variables.$prefix}body-color);
height: var(--#{$prefix}card-height);
color: var(--#{$prefix}body-color);
word-wrap: break-word;
background-color: var(--#{variables.$prefix}card-bg);
background-color: var(--#{$prefix}card-bg);
background-clip: border-box;
border: var(--#{variables.$prefix}card-border-width) solid var(--#{variables.$prefix}card-border-color);
@include border-radius.border-radius(var(--#{variables.$prefix}card-border-radius));
@include box-shadow.box-shadow(var(--#{variables.$prefix}card-box-shadow));
border: var(--#{$prefix}card-border-width) solid var(--#{$prefix}card-border-color);
@include border-radius(var(--#{$prefix}card-border-radius));
@include box-shadow(var(--#{$prefix}card-box-shadow));
> hr {
margin-right: 0;
@ -54,12 +54,12 @@
&:first-child {
border-top-width: 0;
@include border-radius.border-top-radius(var(--#{variables.$prefix}card-inner-border-radius));
@include border-top-radius(var(--#{$prefix}card-inner-border-radius));
}
&:last-child {
border-bottom-width: 0;
@include border-radius.border-bottom-radius(var(--#{variables.$prefix}card-inner-border-radius));
@include border-bottom-radius(var(--#{$prefix}card-inner-border-radius));
}
}
@ -75,19 +75,19 @@
// Enable `flex-grow: 1` for decks and groups so that card blocks take up
// as much space as possible, ensuring footers are aligned to the bottom.
flex: 1 1 auto;
padding: var(--#{variables.$prefix}card-spacer-y) var(--#{variables.$prefix}card-spacer-x);
color: var(--#{variables.$prefix}card-color);
padding: var(--#{$prefix}card-spacer-y) var(--#{$prefix}card-spacer-x);
color: var(--#{$prefix}card-color);
}
.card-title {
margin-bottom: var(--#{variables.$prefix}card-title-spacer-y);
color: var(--#{variables.$prefix}card-title-color);
margin-bottom: var(--#{$prefix}card-title-spacer-y);
color: var(--#{$prefix}card-title-color);
}
.card-subtitle {
margin-top: calc(-.5 * var(--#{variables.$prefix}card-title-spacer-y)); // stylelint-disable-line function-disallowed-list
margin-top: calc(-.5 * var(--#{$prefix}card-title-spacer-y)); // stylelint-disable-line function-disallowed-list
margin-bottom: 0;
color: var(--#{variables.$prefix}card-subtitle-color);
color: var(--#{$prefix}card-subtitle-color);
}
.card-text:last-child {
@ -96,11 +96,11 @@
.card-link {
&:hover {
text-decoration: if(variables.$link-hover-decoration == underline, none, null);
text-decoration: if($link-hover-decoration == underline, none, null);
}
+ .card-link {
margin-left: var(--#{variables.$prefix}card-spacer-x);
margin-left: var(--#{$prefix}card-spacer-x);
}
}
@ -109,25 +109,25 @@
//
.card-header {
padding: var(--#{variables.$prefix}card-cap-padding-y) var(--#{variables.$prefix}card-cap-padding-x);
padding: var(--#{$prefix}card-cap-padding-y) var(--#{$prefix}card-cap-padding-x);
margin-bottom: 0; // Removes the default margin-bottom of <hN>
color: var(--#{variables.$prefix}card-cap-color);
background-color: var(--#{variables.$prefix}card-cap-bg);
border-bottom: var(--#{variables.$prefix}card-border-width) solid var(--#{variables.$prefix}card-border-color);
color: var(--#{$prefix}card-cap-color);
background-color: var(--#{$prefix}card-cap-bg);
border-bottom: var(--#{$prefix}card-border-width) solid var(--#{$prefix}card-border-color);
&:first-child {
@include border-radius.border-radius(var(--#{variables.$prefix}card-inner-border-radius) var(--#{variables.$prefix}card-inner-border-radius) 0 0);
@include border-radius(var(--#{$prefix}card-inner-border-radius) var(--#{$prefix}card-inner-border-radius) 0 0);
}
}
.card-footer {
padding: var(--#{variables.$prefix}card-cap-padding-y) var(--#{variables.$prefix}card-cap-padding-x);
color: var(--#{variables.$prefix}card-cap-color);
background-color: var(--#{variables.$prefix}card-cap-bg);
border-top: var(--#{variables.$prefix}card-border-width) solid var(--#{variables.$prefix}card-border-color);
padding: var(--#{$prefix}card-cap-padding-y) var(--#{$prefix}card-cap-padding-x);
color: var(--#{$prefix}card-cap-color);
background-color: var(--#{$prefix}card-cap-bg);
border-top: var(--#{$prefix}card-border-width) solid var(--#{$prefix}card-border-color);
&:last-child {
@include border-radius.border-radius(0 0 var(--#{variables.$prefix}card-inner-border-radius) var(--#{variables.$prefix}card-inner-border-radius));
@include border-radius(0 0 var(--#{$prefix}card-inner-border-radius) var(--#{$prefix}card-inner-border-radius));
}
}
@ -137,20 +137,20 @@
//
.card-header-tabs {
margin-right: calc(-.5 * var(--#{variables.$prefix}card-cap-padding-x)); // stylelint-disable-line function-disallowed-list
margin-bottom: calc(-1 * var(--#{variables.$prefix}card-cap-padding-y)); // stylelint-disable-line function-disallowed-list
margin-left: calc(-.5 * var(--#{variables.$prefix}card-cap-padding-x)); // stylelint-disable-line function-disallowed-list
margin-right: calc(-.5 * var(--#{$prefix}card-cap-padding-x)); // stylelint-disable-line function-disallowed-list
margin-bottom: calc(-1 * var(--#{$prefix}card-cap-padding-y)); // stylelint-disable-line function-disallowed-list
margin-left: calc(-.5 * var(--#{$prefix}card-cap-padding-x)); // stylelint-disable-line function-disallowed-list
border-bottom: 0;
.nav-link.active {
background-color: var(--#{variables.$prefix}card-bg);
border-bottom-color: var(--#{variables.$prefix}card-bg);
background-color: var(--#{$prefix}card-bg);
border-bottom-color: var(--#{$prefix}card-bg);
}
}
.card-header-pills {
margin-right: calc(-.5 * var(--#{variables.$prefix}card-cap-padding-x)); // stylelint-disable-line function-disallowed-list
margin-left: calc(-.5 * var(--#{variables.$prefix}card-cap-padding-x)); // stylelint-disable-line function-disallowed-list
margin-right: calc(-.5 * var(--#{$prefix}card-cap-padding-x)); // stylelint-disable-line function-disallowed-list
margin-left: calc(-.5 * var(--#{$prefix}card-cap-padding-x)); // stylelint-disable-line function-disallowed-list
}
// Card image
@ -160,8 +160,8 @@
right: 0;
bottom: 0;
left: 0;
padding: var(--#{variables.$prefix}card-img-overlay-padding);
@include border-radius.border-radius(var(--#{variables.$prefix}card-inner-border-radius));
padding: var(--#{$prefix}card-img-overlay-padding);
@include border-radius(var(--#{$prefix}card-inner-border-radius));
}
.card-img,
@ -172,12 +172,12 @@
.card-img,
.card-img-top {
@include border-radius.border-top-radius(var(--#{variables.$prefix}card-inner-border-radius));
@include border-top-radius(var(--#{$prefix}card-inner-border-radius));
}
.card-img,
.card-img-bottom {
@include border-radius.border-bottom-radius(var(--#{variables.$prefix}card-inner-border-radius));
@include border-bottom-radius(var(--#{$prefix}card-inner-border-radius));
}
@ -189,10 +189,10 @@
// The child selector allows nested `.card` within `.card-group`
// to display properly.
> .card {
margin-bottom: var(--#{variables.$prefix}card-group-margin);
margin-bottom: var(--#{$prefix}card-group-margin);
}
@include breakpoints.media-breakpoint-up(sm) {
@include media-breakpoint-up(sm) {
display: flex;
flex-flow: row wrap;
// The child selector allows nested `.card` within `.card-group`
@ -208,9 +208,9 @@
}
// Handle rounded corners
@if variables.$enable-rounded {
@if $enable-rounded {
&:not(:last-child) {
@include border-radius.border-end-radius(0);
@include border-end-radius(0);
.card-img-top,
.card-header {
@ -225,7 +225,7 @@
}
&:not(:first-child) {
@include border-radius.border-start-radius(0);
@include border-start-radius(0);
.card-img-top,
.card-header {

View File

@ -1,8 +1,8 @@
@use "functions";
@use "mixins/clearfix";
@use "mixins/color-mode";
@use "mixins/transition";
@use "setup/variables";
@use "mixins/clearfix" as *;
@use "mixins/color-mode" as *;
@use "mixins/transition" as *;
@use "setup/functions" as *;
@use "setup/variables" as *;
// Notes on the classes:
//
@ -15,7 +15,7 @@
// 4. .active.carousel-item-start and .active.carousel-item-end is the current
// slide in its in-transition state. Only one of these occurs at a time.
// 5. .carousel-item-next.carousel-item-start and .carousel-item-prev.carousel-item-end
// is the upcoming slide in transition.
// is the upcoming slide in
.carousel {
position: relative;
@ -29,7 +29,7 @@
position: relative;
width: 100%;
overflow: hidden;
@include clearfix.clearfix();
@include clearfix();
}
.carousel-item {
@ -39,7 +39,7 @@
width: 100%;
margin-right: -100%;
backface-visibility: hidden;
@include transition.transition(variables.$carousel-transition);
@include transition($carousel-transition);
}
.carousel-item.active,
@ -81,7 +81,7 @@
.active.carousel-item-end {
z-index: 0;
opacity: 0;
@include transition.transition(opacity 0s variables.$carousel-transition-duration);
@include transition(opacity 0s $carousel-transition-duration);
}
}
@ -100,49 +100,49 @@
display: flex; // 1. allow flex styles
align-items: center; // 2. vertically center contents
justify-content: center; // 3. horizontally center contents
width: variables.$carousel-control-width;
width: $carousel-control-width;
padding: 0;
color: variables.$carousel-control-color;
color: $carousel-control-color;
text-align: center;
background: none;
border: 0;
opacity: variables.$carousel-control-opacity;
@include transition.transition(variables.$carousel-control-transition);
opacity: $carousel-control-opacity;
@include transition($carousel-control-transition);
// Hover/focus state
&:hover,
&:focus {
color: variables.$carousel-control-color;
color: $carousel-control-color;
text-decoration: none;
outline: 0;
opacity: variables.$carousel-control-hover-opacity;
opacity: $carousel-control-hover-opacity;
}
}
.carousel-control-prev {
left: 0;
background-image: if(variables.$enable-gradients, linear-gradient(90deg, rgba(variables.$black, .25), rgba(variables.$black, .001)), null);
background-image: if($enable-gradients, linear-gradient(90deg, rgba($black, .25), rgba($black, .001)), null);
}
.carousel-control-next {
right: 0;
background-image: if(variables.$enable-gradients, linear-gradient(270deg, rgba(variables.$black, .25), rgba(variables.$black, .001)), null);
background-image: if($enable-gradients, linear-gradient(270deg, rgba($black, .25), rgba($black, .001)), null);
}
// Icons for within
.carousel-control-prev-icon,
.carousel-control-next-icon {
display: inline-block;
width: variables.$carousel-control-icon-width;
height: variables.$carousel-control-icon-width;
width: $carousel-control-icon-width;
height: $carousel-control-icon-width;
background-repeat: no-repeat;
background-position: 50%;
background-size: 100% 100%;
}
.carousel-control-prev-icon {
background-image: functions.escape-svg(variables.$carousel-control-prev-icon-bg) #{"/*rtl:" + functions.escape-svg(variables.$carousel-control-next-icon-bg) + "*/"};
background-image: escape-svg($carousel-control-prev-icon-bg) #{"/*rtl:" + escape-svg($carousel-control-next-icon-bg) + "*/"};
}
.carousel-control-next-icon {
background-image: functions.escape-svg(variables.$carousel-control-next-icon-bg) #{"/*rtl:" + functions.escape-svg(variables.$carousel-control-prev-icon-bg) + "*/"};
background-image: escape-svg($carousel-control-next-icon-bg) #{"/*rtl:" + escape-svg($carousel-control-prev-icon-bg) + "*/"};
}
// Optional indicator pips/controls
@ -160,32 +160,32 @@
justify-content: center;
padding: 0;
// Use the .carousel-control's width as margin so we don't overlay those
margin-right: variables.$carousel-control-width;
margin-right: $carousel-control-width;
margin-bottom: 1rem;
margin-left: variables.$carousel-control-width;
margin-left: $carousel-control-width;
[data-bs-target] {
box-sizing: content-box;
flex: 0 1 auto;
width: variables.$carousel-indicator-width;
height: variables.$carousel-indicator-height;
width: $carousel-indicator-width;
height: $carousel-indicator-height;
padding: 0;
margin-right: variables.$carousel-indicator-spacer;
margin-left: variables.$carousel-indicator-spacer;
margin-right: $carousel-indicator-spacer;
margin-left: $carousel-indicator-spacer;
text-indent: -999px;
cursor: pointer;
background-color: variables.$carousel-indicator-active-bg;
background-color: $carousel-indicator-active-bg;
background-clip: padding-box;
border: 0;
// Use transparent borders to increase the hit area by 10px on top and bottom.
border-top: variables.$carousel-indicator-hit-area-height solid transparent;
border-bottom: variables.$carousel-indicator-hit-area-height solid transparent;
opacity: variables.$carousel-indicator-opacity;
@include transition.transition(variables.$carousel-indicator-transition);
border-top: $carousel-indicator-hit-area-height solid transparent;
border-bottom: $carousel-indicator-hit-area-height solid transparent;
opacity: $carousel-indicator-opacity;
@include transition($carousel-indicator-transition);
}
.active {
opacity: variables.$carousel-indicator-active-opacity;
opacity: $carousel-indicator-active-opacity;
}
}
@ -196,12 +196,12 @@
.carousel-caption {
position: absolute;
right: (100% - variables.$carousel-caption-width) * .5;
bottom: variables.$carousel-caption-spacer;
left: (100% - variables.$carousel-caption-width) * .5;
padding-top: variables.$carousel-caption-padding-y;
padding-bottom: variables.$carousel-caption-padding-y;
color: variables.$carousel-caption-color;
right: (100% - $carousel-caption-width) * .5;
bottom: $carousel-caption-spacer;
left: (100% - $carousel-caption-width) * .5;
padding-top: $carousel-caption-padding-y;
padding-bottom: $carousel-caption-padding-y;
color: $carousel-caption-color;
text-align: center;
}
@ -210,15 +210,15 @@
@mixin carousel-dark() {
.carousel-control-prev-icon,
.carousel-control-next-icon {
filter: variables.$carousel-dark-control-icon-filter;
filter: $carousel-dark-control-icon-filter;
}
.carousel-indicators [data-bs-target] {
background-color: variables.$carousel-dark-indicator-active-bg;
background-color: $carousel-dark-indicator-active-bg;
}
.carousel-caption {
color: variables.$carousel-dark-caption-color;
color: $carousel-dark-caption-color;
}
}
@ -226,9 +226,9 @@
@include carousel-dark();
}
@if variables.$enable-dark-mode {
@include color-mode.color-mode(dark) {
@if variables.$color-mode-type == "media-query" {
@if $enable-dark-mode {
@include color-mode(dark) {
@if $color-mode-type == "media-query" {
.carousel {
@include carousel-dark();
}

View File

@ -1,7 +1,7 @@
@use "functions";
@use "mixins/border-radius";
@use "mixins/color-mode";
@use "setup/variables";
@use "mixins/border-radius" as *;
@use "mixins/color-mode" as *;
@use "setup/functions" as *;
@use "setup/variables" as *;
// Transparent background and border properties included for button version.
// iOS requires the button element instead of an anchor tag.
@ -10,57 +10,57 @@
.btn-close {
// scss-docs-start close-css-vars
--#{variables.$prefix}btn-close-color: #{variables.$btn-close-color};
--#{variables.$prefix}btn-close-bg: #{ functions.escape-svg(variables.$btn-close-bg) };
--#{variables.$prefix}btn-close-opacity: #{variables.$btn-close-opacity};
--#{variables.$prefix}btn-close-hover-opacity: #{variables.$btn-close-hover-opacity};
--#{variables.$prefix}btn-close-focus-shadow: #{variables.$btn-close-focus-shadow};
--#{variables.$prefix}btn-close-focus-opacity: #{variables.$btn-close-focus-opacity};
--#{variables.$prefix}btn-close-disabled-opacity: #{variables.$btn-close-disabled-opacity};
--#{variables.$prefix}btn-close-white-filter: #{variables.$btn-close-white-filter};
--#{$prefix}btn-close-color: #{$btn-close-color};
--#{$prefix}btn-close-bg: #{ escape-svg($btn-close-bg) };
--#{$prefix}btn-close-opacity: #{$btn-close-opacity};
--#{$prefix}btn-close-hover-opacity: #{$btn-close-hover-opacity};
--#{$prefix}btn-close-focus-shadow: #{$btn-close-focus-shadow};
--#{$prefix}btn-close-focus-opacity: #{$btn-close-focus-opacity};
--#{$prefix}btn-close-disabled-opacity: #{$btn-close-disabled-opacity};
--#{$prefix}btn-close-white-filter: #{$btn-close-white-filter};
// scss-docs-end close-css-vars
box-sizing: content-box;
width: variables.$btn-close-width;
height: variables.$btn-close-height;
padding: variables.$btn-close-padding-y variables.$btn-close-padding-x;
color: var(--#{variables.$prefix}btn-close-color);
background: transparent var(--#{variables.$prefix}btn-close-bg) center / variables.$btn-close-width auto no-repeat; // include transparent for button elements
width: $btn-close-width;
height: $btn-close-height;
padding: $btn-close-padding-y $btn-close-padding-x;
color: var(--#{$prefix}btn-close-color);
background: transparent var(--#{$prefix}btn-close-bg) center / $btn-close-width auto no-repeat; // include transparent for button elements
border: 0; // for button elements
@include border-radius.border-radius();
opacity: var(--#{variables.$prefix}btn-close-opacity);
@include border-radius();
opacity: var(--#{$prefix}btn-close-opacity);
// Override <a>'s hover style
&:hover {
color: var(--#{variables.$prefix}btn-close-color);
color: var(--#{$prefix}btn-close-color);
text-decoration: none;
opacity: var(--#{variables.$prefix}btn-close-hover-opacity);
opacity: var(--#{$prefix}btn-close-hover-opacity);
}
&:focus {
outline: 0;
box-shadow: var(--#{variables.$prefix}btn-close-focus-shadow);
opacity: var(--#{variables.$prefix}btn-close-focus-opacity);
box-shadow: var(--#{$prefix}btn-close-focus-shadow);
opacity: var(--#{$prefix}btn-close-focus-opacity);
}
&:disabled,
&.disabled {
pointer-events: none;
user-select: none;
opacity: var(--#{variables.$prefix}btn-close-disabled-opacity);
opacity: var(--#{$prefix}btn-close-disabled-opacity);
}
}
@mixin btn-close-white() {
filter: var(--#{variables.$prefix}btn-close-white-filter);
filter: var(--#{$prefix}btn-close-white-filter);
}
.btn-close-white {
@include btn-close-white();
}
@if variables.$enable-dark-mode {
@include color-mode.color-mode(dark) {
@if $enable-dark-mode {
@include color-mode(dark) {
.btn-close {
@include btn-close-white();
}

View File

@ -1,26 +1,26 @@
@use "mixins/breakpoints";
@use "mixins/container";
@use "setup/variables";
@use "mixins/breakpoints" as *;
@use "mixins/container" as *;
@use "setup/variables" as *;
// Container widths
//
// Set the container width, and override it for fixed navbars in media queries.
@if variables.$enable-container-classes {
@if $enable-container-classes {
// Single container class with breakpoint max-widths
.container,
// 100% wide container at all breakpoints
.container-fluid {
@include container.make-container();
@include make-container();
}
// Responsive containers that are 100% wide until a breakpoint
@each $breakpoint, $container-max-width in variables.$container-max-widths {
@each $breakpoint, $container-max-width in $container-max-widths {
.container-#{$breakpoint} {
@extend .container-fluid;
}
@include breakpoints.media-breakpoint-up($breakpoint, variables.$grid-breakpoints) {
@include media-breakpoint-up($breakpoint, $grid-breakpoints) {
%responsive-container-#{$breakpoint} {
max-width: $container-max-width;
}
@ -28,9 +28,9 @@
// Extend each breakpoint which is smaller or equal to the current breakpoint
$extend-breakpoint: true;
@each $name, $width in variables.$grid-breakpoints {
@each $name, $width in $grid-breakpoints {
@if ($extend-breakpoint) {
.container#{breakpoints.breakpoint-infix($name, variables.$grid-breakpoints)} {
.container#{breakpoint-infix($name, $grid-breakpoints)} {
@extend %responsive-container-#{$breakpoint};
}

View File

@ -1,11 +1,11 @@
@use "sass:map";
@use "mixins/border-radius";
@use "mixins/box-shadow";
@use "mixins/breakpoints";
@use "mixins/caret";
@use "mixins/gradients";
@use "setup/variables";
@use "vendor/rfs";
@use "mixins/border-radius" as *;
@use "mixins/box-shadow" as *;
@use "mixins/breakpoints" as *;
@use "mixins/caret" as *;
@use "mixins/gradients" as *;
@use "setup/variables" as *;
@use "vendor/rfs" as *;
// The dropdown wrapper (`<div>`)
.dropup,
@ -21,70 +21,70 @@
white-space: nowrap;
// Generate the caret automatically
@include caret.caret();
@include caret();
}
// The dropdown menu
.dropdown-menu {
// scss-docs-start dropdown-css-vars
--#{variables.$prefix}dropdown-zindex: #{variables.$zindex-dropdown};
--#{variables.$prefix}dropdown-min-width: #{variables.$dropdown-min-width};
--#{variables.$prefix}dropdown-padding-x: #{variables.$dropdown-padding-x};
--#{variables.$prefix}dropdown-padding-y: #{variables.$dropdown-padding-y};
--#{variables.$prefix}dropdown-spacer: #{variables.$dropdown-spacer};
@include rfs.rfs(variables.$dropdown-font-size, --#{variables.$prefix}dropdown-font-size);
--#{variables.$prefix}dropdown-color: #{variables.$dropdown-color};
--#{variables.$prefix}dropdown-bg: #{variables.$dropdown-bg};
--#{variables.$prefix}dropdown-border-color: #{variables.$dropdown-border-color};
--#{variables.$prefix}dropdown-border-radius: #{variables.$dropdown-border-radius};
--#{variables.$prefix}dropdown-border-width: #{variables.$dropdown-border-width};
--#{variables.$prefix}dropdown-inner-border-radius: #{variables.$dropdown-inner-border-radius};
--#{variables.$prefix}dropdown-divider-bg: #{variables.$dropdown-divider-bg};
--#{variables.$prefix}dropdown-divider-margin-y: #{variables.$dropdown-divider-margin-y};
--#{variables.$prefix}dropdown-box-shadow: #{variables.$dropdown-box-shadow};
--#{variables.$prefix}dropdown-link-color: #{variables.$dropdown-link-color};
--#{variables.$prefix}dropdown-link-hover-color: #{variables.$dropdown-link-hover-color};
--#{variables.$prefix}dropdown-link-hover-bg: #{variables.$dropdown-link-hover-bg};
--#{variables.$prefix}dropdown-link-active-color: #{variables.$dropdown-link-active-color};
--#{variables.$prefix}dropdown-link-active-bg: #{variables.$dropdown-link-active-bg};
--#{variables.$prefix}dropdown-link-disabled-color: #{variables.$dropdown-link-disabled-color};
--#{variables.$prefix}dropdown-item-padding-x: #{variables.$dropdown-item-padding-x};
--#{variables.$prefix}dropdown-item-padding-y: #{variables.$dropdown-item-padding-y};
--#{variables.$prefix}dropdown-header-color: #{variables.$dropdown-header-color};
--#{variables.$prefix}dropdown-header-padding-x: #{variables.$dropdown-header-padding-x};
--#{variables.$prefix}dropdown-header-padding-y: #{variables.$dropdown-header-padding-y};
--#{$prefix}dropdown-zindex: #{$zindex-dropdown};
--#{$prefix}dropdown-min-width: #{$dropdown-min-width};
--#{$prefix}dropdown-padding-x: #{$dropdown-padding-x};
--#{$prefix}dropdown-padding-y: #{$dropdown-padding-y};
--#{$prefix}dropdown-spacer: #{$dropdown-spacer};
@include rfs($dropdown-font-size, --#{$prefix}dropdown-font-size);
--#{$prefix}dropdown-color: #{$dropdown-color};
--#{$prefix}dropdown-bg: #{$dropdown-bg};
--#{$prefix}dropdown-border-color: #{$dropdown-border-color};
--#{$prefix}dropdown-border-radius: #{$dropdown-border-radius};
--#{$prefix}dropdown-border-width: #{$dropdown-border-width};
--#{$prefix}dropdown-inner-border-radius: #{$dropdown-inner-border-radius};
--#{$prefix}dropdown-divider-bg: #{$dropdown-divider-bg};
--#{$prefix}dropdown-divider-margin-y: #{$dropdown-divider-margin-y};
--#{$prefix}dropdown-box-shadow: #{$dropdown-box-shadow};
--#{$prefix}dropdown-link-color: #{$dropdown-link-color};
--#{$prefix}dropdown-link-hover-color: #{$dropdown-link-hover-color};
--#{$prefix}dropdown-link-hover-bg: #{$dropdown-link-hover-bg};
--#{$prefix}dropdown-link-active-color: #{$dropdown-link-active-color};
--#{$prefix}dropdown-link-active-bg: #{$dropdown-link-active-bg};
--#{$prefix}dropdown-link-disabled-color: #{$dropdown-link-disabled-color};
--#{$prefix}dropdown-item-padding-x: #{$dropdown-item-padding-x};
--#{$prefix}dropdown-item-padding-y: #{$dropdown-item-padding-y};
--#{$prefix}dropdown-header-color: #{$dropdown-header-color};
--#{$prefix}dropdown-header-padding-x: #{$dropdown-header-padding-x};
--#{$prefix}dropdown-header-padding-y: #{$dropdown-header-padding-y};
// scss-docs-end dropdown-css-vars
position: absolute;
z-index: var(--#{variables.$prefix}dropdown-zindex);
z-index: var(--#{$prefix}dropdown-zindex);
display: none; // none by default, but block on "open" of the menu
min-width: var(--#{variables.$prefix}dropdown-min-width);
padding: var(--#{variables.$prefix}dropdown-padding-y) var(--#{variables.$prefix}dropdown-padding-x);
min-width: var(--#{$prefix}dropdown-min-width);
padding: var(--#{$prefix}dropdown-padding-y) var(--#{$prefix}dropdown-padding-x);
margin: 0; // Override default margin of ul
@include rfs.font-size(var(--#{variables.$prefix}dropdown-font-size));
color: var(--#{variables.$prefix}dropdown-color);
@include font-size(var(--#{$prefix}dropdown-font-size));
color: var(--#{$prefix}dropdown-color);
text-align: left; // Ensures proper alignment if parent has it changed (e.g., modal footer)
list-style: none;
background-color: var(--#{variables.$prefix}dropdown-bg);
background-color: var(--#{$prefix}dropdown-bg);
background-clip: padding-box;
border: var(--#{variables.$prefix}dropdown-border-width) solid var(--#{variables.$prefix}dropdown-border-color);
@include border-radius.border-radius(var(--#{variables.$prefix}dropdown-border-radius));
@include box-shadow.box-shadow(var(--#{variables.$prefix}dropdown-box-shadow));
border: var(--#{$prefix}dropdown-border-width) solid var(--#{$prefix}dropdown-border-color);
@include border-radius(var(--#{$prefix}dropdown-border-radius));
@include box-shadow(var(--#{$prefix}dropdown-box-shadow));
&[data-bs-popper] {
top: 100%;
left: 0;
margin-top: var(--#{variables.$prefix}dropdown-spacer);
margin-top: var(--#{$prefix}dropdown-spacer);
}
@if variables.$dropdown-padding-y == 0 {
@if $dropdown-padding-y == 0 {
> .dropdown-item:first-child,
> li:first-child .dropdown-item {
@include border-radius.border-top-radius(var(--#{variables.$prefix}dropdown-inner-border-radius));
@include border-top-radius(var(--#{$prefix}dropdown-inner-border-radius));
}
> .dropdown-item:last-child,
> li:last-child .dropdown-item {
@include border-radius.border-bottom-radius(var(--#{variables.$prefix}dropdown-inner-border-radius));
@include border-bottom-radius(var(--#{$prefix}dropdown-inner-border-radius));
}
}
@ -94,9 +94,9 @@
// We deliberately hardcode the `bs-` prefix because we check
// this custom property in JS to determine Popper's positioning
@each $breakpoint in map.keys(variables.$grid-breakpoints) {
@include breakpoints.media-breakpoint-up($breakpoint) {
$infix: breakpoints.breakpoint-infix($breakpoint, variables.$grid-breakpoints);
@each $breakpoint in map.keys($grid-breakpoints) {
@include media-breakpoint-up($breakpoint) {
$infix: breakpoint-infix($breakpoint, $grid-breakpoints);
.dropdown-menu#{$infix}-start {
--bs-position: start;
@ -126,11 +126,11 @@
top: auto;
bottom: 100%;
margin-top: 0;
margin-bottom: var(--#{variables.$prefix}dropdown-spacer);
margin-bottom: var(--#{$prefix}dropdown-spacer);
}
.dropdown-toggle {
@include caret.caret(up);
@include caret(up);
}
}
@ -140,11 +140,11 @@
right: auto;
left: 100%;
margin-top: 0;
margin-left: var(--#{variables.$prefix}dropdown-spacer);
margin-left: var(--#{$prefix}dropdown-spacer);
}
.dropdown-toggle {
@include caret.caret(end);
@include caret(end);
&::after {
vertical-align: 0;
}
@ -157,11 +157,11 @@
right: 100%;
left: auto;
margin-top: 0;
margin-right: var(--#{variables.$prefix}dropdown-spacer);
margin-right: var(--#{$prefix}dropdown-spacer);
}
.dropdown-toggle {
@include caret.caret(start);
@include caret(start);
&::before {
vertical-align: 0;
}
@ -172,9 +172,9 @@
// Dividers (basically an `<hr>`) within the dropdown
.dropdown-divider {
height: 0;
margin: var(--#{variables.$prefix}dropdown-divider-margin-y) 0;
margin: var(--#{$prefix}dropdown-divider-margin-y) 0;
overflow: hidden;
border-top: 1px solid var(--#{variables.$prefix}dropdown-divider-bg);
border-top: 1px solid var(--#{$prefix}dropdown-divider-bg);
opacity: 1; // Revisit in v6 to de-dupe styles that conflict with <hr> element
}
@ -184,38 +184,38 @@
.dropdown-item {
display: block;
width: 100%; // For `<button>`s
padding: var(--#{variables.$prefix}dropdown-item-padding-y) var(--#{variables.$prefix}dropdown-item-padding-x);
padding: var(--#{$prefix}dropdown-item-padding-y) var(--#{$prefix}dropdown-item-padding-x);
clear: both;
font-weight: variables.$font-weight-normal;
color: var(--#{variables.$prefix}dropdown-link-color);
font-weight: $font-weight-normal;
color: var(--#{$prefix}dropdown-link-color);
text-align: inherit; // For `<button>`s
text-decoration: if(variables.$link-decoration == none, null, none);
text-decoration: if($link-decoration == none, null, none);
white-space: nowrap; // prevent links from randomly breaking onto new lines
background-color: transparent; // For `<button>`s
border: 0; // For `<button>`s
@include border-radius.border-radius(var(--#{variables.$prefix}dropdown-item-border-radius, 0));
@include border-radius(var(--#{$prefix}dropdown-item-border-radius, 0));
&:hover,
&:focus {
color: var(--#{variables.$prefix}dropdown-link-hover-color);
text-decoration: if(variables.$link-hover-decoration == underline, none, null);
@include gradients.gradient-bg(var(--#{variables.$prefix}dropdown-link-hover-bg));
color: var(--#{$prefix}dropdown-link-hover-color);
text-decoration: if($link-hover-decoration == underline, none, null);
@include gradient-bg(var(--#{$prefix}dropdown-link-hover-bg));
}
&.active,
&:active {
color: var(--#{variables.$prefix}dropdown-link-active-color);
color: var(--#{$prefix}dropdown-link-active-color);
text-decoration: none;
@include gradients.gradient-bg(var(--#{variables.$prefix}dropdown-link-active-bg));
@include gradient-bg(var(--#{$prefix}dropdown-link-active-bg));
}
&.disabled,
&:disabled {
color: var(--#{variables.$prefix}dropdown-link-disabled-color);
color: var(--#{$prefix}dropdown-link-disabled-color);
pointer-events: none;
background-color: transparent;
// Remove CSS gradients if they're enabled
background-image: if(variables.$enable-gradients, none, null);
background-image: if($enable-gradients, none, null);
}
}
@ -226,34 +226,34 @@
// Dropdown section headers
.dropdown-header {
display: block;
padding: var(--#{variables.$prefix}dropdown-header-padding-y) var(--#{variables.$prefix}dropdown-header-padding-x);
padding: var(--#{$prefix}dropdown-header-padding-y) var(--#{$prefix}dropdown-header-padding-x);
margin-bottom: 0; // for use with heading elements
@include rfs.font-size(variables.$font-size-sm);
color: var(--#{variables.$prefix}dropdown-header-color);
@include font-size($font-size-sm);
color: var(--#{$prefix}dropdown-header-color);
white-space: nowrap; // as with > li > a
}
// Dropdown text
.dropdown-item-text {
display: block;
padding: var(--#{variables.$prefix}dropdown-item-padding-y) var(--#{variables.$prefix}dropdown-item-padding-x);
color: var(--#{variables.$prefix}dropdown-link-color);
padding: var(--#{$prefix}dropdown-item-padding-y) var(--#{$prefix}dropdown-item-padding-x);
color: var(--#{$prefix}dropdown-link-color);
}
// Dark dropdowns
.dropdown-menu-dark {
// scss-docs-start dropdown-dark-css-vars
--#{variables.$prefix}dropdown-color: #{variables.$dropdown-dark-color};
--#{variables.$prefix}dropdown-bg: #{variables.$dropdown-dark-bg};
--#{variables.$prefix}dropdown-border-color: #{variables.$dropdown-dark-border-color};
--#{variables.$prefix}dropdown-box-shadow: #{variables.$dropdown-dark-box-shadow};
--#{variables.$prefix}dropdown-link-color: #{variables.$dropdown-dark-link-color};
--#{variables.$prefix}dropdown-link-hover-color: #{variables.$dropdown-dark-link-hover-color};
--#{variables.$prefix}dropdown-divider-bg: #{variables.$dropdown-dark-divider-bg};
--#{variables.$prefix}dropdown-link-hover-bg: #{variables.$dropdown-dark-link-hover-bg};
--#{variables.$prefix}dropdown-link-active-color: #{variables.$dropdown-dark-link-active-color};
--#{variables.$prefix}dropdown-link-active-bg: #{variables.$dropdown-dark-link-active-bg};
--#{variables.$prefix}dropdown-link-disabled-color: #{variables.$dropdown-dark-link-disabled-color};
--#{variables.$prefix}dropdown-header-color: #{variables.$dropdown-dark-header-color};
--#{$prefix}dropdown-color: #{$dropdown-dark-color};
--#{$prefix}dropdown-bg: #{$dropdown-dark-bg};
--#{$prefix}dropdown-border-color: #{$dropdown-dark-border-color};
--#{$prefix}dropdown-box-shadow: #{$dropdown-dark-box-shadow};
--#{$prefix}dropdown-link-color: #{$dropdown-dark-link-color};
--#{$prefix}dropdown-link-hover-color: #{$dropdown-dark-link-hover-color};
--#{$prefix}dropdown-divider-bg: #{$dropdown-dark-divider-bg};
--#{$prefix}dropdown-link-hover-bg: #{$dropdown-dark-link-hover-bg};
--#{$prefix}dropdown-link-active-color: #{$dropdown-dark-link-active-color};
--#{$prefix}dropdown-link-active-bg: #{$dropdown-dark-link-active-bg};
--#{$prefix}dropdown-link-disabled-color: #{$dropdown-dark-link-disabled-color};
--#{$prefix}dropdown-header-color: #{$dropdown-dark-header-color};
// scss-docs-end dropdown-dark-css-vars
}

View File

@ -1,34 +1,34 @@
@use "mixins/grid";
@use "setup/variables";
@use "mixins/grid" as *;
@use "setup/variables" as *;
// Row
//
// Rows contain your columns.
:root {
@each $name, $value in variables.$grid-breakpoints {
--#{variables.$prefix}breakpoint-#{$name}: #{$value};
@each $name, $value in $grid-breakpoints {
--#{$prefix}breakpoint-#{$name}: #{$value};
}
}
@if variables.$enable-grid-classes {
@if $enable-grid-classes {
.row {
@include grid.make-row();
@include make-row();
> * {
@include grid.make-col-ready();
@include make-col-ready();
}
}
}
@if variables.$enable-cssgrid {
@if $enable-cssgrid {
.grid {
display: grid;
grid-template-rows: repeat(var(--#{variables.$prefix}rows, 1), 1fr);
grid-template-columns: repeat(var(--#{variables.$prefix}columns, #{variables.$grid-columns}), 1fr);
gap: var(--#{variables.$prefix}gap, #{variables.$grid-gutter-width});
grid-template-rows: repeat(var(--#{$prefix}rows, 1), 1fr);
grid-template-columns: repeat(var(--#{$prefix}columns, #{$grid-columns}), 1fr);
gap: var(--#{$prefix}gap, #{$grid-gutter-width});
@include grid.make-cssgrid();
@include make-cssgrid();
}
}
@ -37,6 +37,6 @@
//
// Common styles for small and large grid columns
@if variables.$enable-grid-classes {
@include grid.make-grid-columns();
@if $enable-grid-classes {
@include make-grid-columns();
}

View File

@ -1,8 +1,8 @@
@use "mixins/border-radius";
@use "mixins/box-shadow";
@use "mixins/image";
@use "setup/variables";
@use "vendor/rfs";
@use "mixins/border-radius" as *;
@use "mixins/box-shadow" as *;
@use "mixins/image" as *;
@use "setup/variables" as *;
@use "vendor/rfs" as *;
// Responsive images (ensure images don't scale beyond their parents)
//
@ -12,20 +12,20 @@
// which weren't expecting the images within themselves to be involuntarily resized.
// See also https://github.com/twbs/bootstrap/issues/18178
.img-fluid {
@include image.img-fluid();
@include img-fluid();
}
// Image thumbnails
.img-thumbnail {
padding: variables.$thumbnail-padding;
background-color: variables.$thumbnail-bg;
border: variables.$thumbnail-border-width solid variables.$thumbnail-border-color;
@include border-radius.border-radius(variables.$thumbnail-border-radius);
@include box-shadow.box-shadow(variables.$thumbnail-box-shadow);
padding: $thumbnail-padding;
background-color: $thumbnail-bg;
border: $thumbnail-border-width solid $thumbnail-border-color;
@include border-radius($thumbnail-border-radius);
@include box-shadow($thumbnail-box-shadow);
// Keep them at most 100% wide
@include image.img-fluid();
@include img-fluid();
}
//
@ -33,16 +33,16 @@
//
.figure {
// Ensures the caption's text aligns with the image.
// Ensures the caption's text aligns with the
display: inline-block;
}
.figure-img {
margin-bottom: variables.$spacer * .5;
margin-bottom: $spacer * .5;
line-height: 1;
}
.figure-caption {
@include rfs.font-size(variables.$figure-caption-font-size);
color: variables.$figure-caption-color;
@include font-size($figure-caption-font-size);
color: $figure-caption-color;
}

View File

@ -1,7 +1,7 @@
@use "sass:map";
@use "mixins/border-radius";
@use "mixins/breakpoints";
@use "setup/variables";
@use "mixins/border-radius" as *;
@use "mixins/breakpoints" as *;
@use "setup/variables" as *;
// Base class
//
@ -9,23 +9,23 @@
.list-group {
// scss-docs-start list-group-css-vars
--#{variables.$prefix}list-group-color: #{variables.$list-group-color};
--#{variables.$prefix}list-group-bg: #{variables.$list-group-bg};
--#{variables.$prefix}list-group-border-color: #{variables.$list-group-border-color};
--#{variables.$prefix}list-group-border-width: #{variables.$list-group-border-width};
--#{variables.$prefix}list-group-border-radius: #{variables.$list-group-border-radius};
--#{variables.$prefix}list-group-item-padding-x: #{variables.$list-group-item-padding-x};
--#{variables.$prefix}list-group-item-padding-y: #{variables.$list-group-item-padding-y};
--#{variables.$prefix}list-group-action-color: #{variables.$list-group-action-color};
--#{variables.$prefix}list-group-action-hover-color: #{variables.$list-group-action-hover-color};
--#{variables.$prefix}list-group-action-hover-bg: #{variables.$list-group-hover-bg};
--#{variables.$prefix}list-group-action-active-color: #{variables.$list-group-action-active-color};
--#{variables.$prefix}list-group-action-active-bg: #{variables.$list-group-action-active-bg};
--#{variables.$prefix}list-group-disabled-color: #{variables.$list-group-disabled-color};
--#{variables.$prefix}list-group-disabled-bg: #{variables.$list-group-disabled-bg};
--#{variables.$prefix}list-group-active-color: #{variables.$list-group-active-color};
--#{variables.$prefix}list-group-active-bg: #{variables.$list-group-active-bg};
--#{variables.$prefix}list-group-active-border-color: #{variables.$list-group-active-border-color};
--#{$prefix}list-group-color: #{$list-group-color};
--#{$prefix}list-group-bg: #{$list-group-bg};
--#{$prefix}list-group-border-color: #{$list-group-border-color};
--#{$prefix}list-group-border-width: #{$list-group-border-width};
--#{$prefix}list-group-border-radius: #{$list-group-border-radius};
--#{$prefix}list-group-item-padding-x: #{$list-group-item-padding-x};
--#{$prefix}list-group-item-padding-y: #{$list-group-item-padding-y};
--#{$prefix}list-group-action-color: #{$list-group-action-color};
--#{$prefix}list-group-action-hover-color: #{$list-group-action-hover-color};
--#{$prefix}list-group-action-hover-bg: #{$list-group-hover-bg};
--#{$prefix}list-group-action-active-color: #{$list-group-action-active-color};
--#{$prefix}list-group-action-active-bg: #{$list-group-action-active-bg};
--#{$prefix}list-group-disabled-color: #{$list-group-disabled-color};
--#{$prefix}list-group-disabled-bg: #{$list-group-disabled-bg};
--#{$prefix}list-group-active-color: #{$list-group-active-color};
--#{$prefix}list-group-active-bg: #{$list-group-active-bg};
--#{$prefix}list-group-active-border-color: #{$list-group-active-border-color};
// scss-docs-end list-group-css-vars
display: flex;
@ -34,7 +34,7 @@
// No need to set list-style: none; since .list-group-item is block level
padding-left: 0; // reset padding because ul and ol
margin-bottom: 0;
@include border-radius.border-radius(var(--#{variables.$prefix}list-group-border-radius));
@include border-radius(var(--#{$prefix}list-group-border-radius));
}
.list-group-numbered {
@ -55,21 +55,21 @@
.list-group-item-action {
width: 100%; // For `<button>`s (anchors become 100% by default though)
color: var(--#{variables.$prefix}list-group-action-color);
color: var(--#{$prefix}list-group-action-color);
text-align: inherit; // For `<button>`s (anchors inherit)
// Hover state
&:hover,
&:focus {
z-index: 1; // Place hover/focus items above their siblings for proper border styling
color: var(--#{variables.$prefix}list-group-action-hover-color);
color: var(--#{$prefix}list-group-action-hover-color);
text-decoration: none;
background-color: var(--#{variables.$prefix}list-group-action-hover-bg);
background-color: var(--#{$prefix}list-group-action-hover-bg);
}
&:active {
color: var(--#{variables.$prefix}list-group-action-active-color);
background-color: var(--#{variables.$prefix}list-group-action-active-bg);
color: var(--#{$prefix}list-group-action-active-color);
background-color: var(--#{$prefix}list-group-action-active-bg);
}
}
@ -80,33 +80,33 @@
.list-group-item {
position: relative;
display: block;
padding: var(--#{variables.$prefix}list-group-item-padding-y) var(--#{variables.$prefix}list-group-item-padding-x);
color: var(--#{variables.$prefix}list-group-color);
text-decoration: if(variables.$link-decoration == none, null, none);
background-color: var(--#{variables.$prefix}list-group-bg);
border: var(--#{variables.$prefix}list-group-border-width) solid var(--#{variables.$prefix}list-group-border-color);
padding: var(--#{$prefix}list-group-item-padding-y) var(--#{$prefix}list-group-item-padding-x);
color: var(--#{$prefix}list-group-color);
text-decoration: if($link-decoration == none, null, none);
background-color: var(--#{$prefix}list-group-bg);
border: var(--#{$prefix}list-group-border-width) solid var(--#{$prefix}list-group-border-color);
&:first-child {
@include border-radius.border-top-radius(inherit);
@include border-top-radius(inherit);
}
&:last-child {
@include border-radius.border-bottom-radius(inherit);
@include border-bottom-radius(inherit);
}
&.disabled,
&:disabled {
color: var(--#{variables.$prefix}list-group-disabled-color);
color: var(--#{$prefix}list-group-disabled-color);
pointer-events: none;
background-color: var(--#{variables.$prefix}list-group-disabled-bg);
background-color: var(--#{$prefix}list-group-disabled-bg);
}
// Include both here for `<a>`s and `<button>`s
&.active {
z-index: 2; // Place active items above their siblings for proper border styling
color: var(--#{variables.$prefix}list-group-active-color);
background-color: var(--#{variables.$prefix}list-group-active-bg);
border-color: var(--#{variables.$prefix}list-group-active-border-color);
color: var(--#{$prefix}list-group-active-color);
background-color: var(--#{$prefix}list-group-active-bg);
border-color: var(--#{$prefix}list-group-active-border-color);
}
// stylelint-disable-next-line scss/selector-no-redundant-nesting-selector
@ -114,8 +114,8 @@
border-top-width: 0;
&.active {
margin-top: calc(-1 * var(--#{variables.$prefix}list-group-border-width)); // stylelint-disable-line function-disallowed-list
border-top-width: var(--#{variables.$prefix}list-group-border-width);
margin-top: calc(-1 * var(--#{$prefix}list-group-border-width)); // stylelint-disable-line function-disallowed-list
border-top-width: var(--#{$prefix}list-group-border-width);
}
}
}
@ -124,22 +124,22 @@
//
// Change the layout of list group items from vertical (default) to horizontal.
@each $breakpoint in map.keys(variables.$grid-breakpoints) {
@include breakpoints.media-breakpoint-up($breakpoint) {
$infix: breakpoints.breakpoint-infix($breakpoint, variables.$grid-breakpoints);
@each $breakpoint in map.keys($grid-breakpoints) {
@include media-breakpoint-up($breakpoint) {
$infix: breakpoint-infix($breakpoint, $grid-breakpoints);
.list-group-horizontal#{$infix} {
flex-direction: row;
> .list-group-item {
&:first-child:not(:last-child) {
@include border-radius.border-bottom-start-radius(var(--#{variables.$prefix}list-group-border-radius));
@include border-radius.border-top-end-radius(0);
@include border-bottom-start-radius(var(--#{$prefix}list-group-border-radius));
@include border-top-end-radius(0);
}
&:last-child:not(:first-child) {
@include border-radius.border-top-end-radius(var(--#{variables.$prefix}list-group-border-radius));
@include border-radius.border-bottom-start-radius(0);
@include border-top-end-radius(var(--#{$prefix}list-group-border-radius));
@include border-bottom-start-radius(0);
}
&.active {
@ -147,12 +147,12 @@
}
+ .list-group-item {
border-top-width: var(--#{variables.$prefix}list-group-border-width);
border-top-width: var(--#{$prefix}list-group-border-width);
border-left-width: 0;
&.active {
margin-left: calc(-1 * var(--#{variables.$prefix}list-group-border-width)); // stylelint-disable-line function-disallowed-list
border-left-width: var(--#{variables.$prefix}list-group-border-width);
margin-left: calc(-1 * var(--#{$prefix}list-group-border-width)); // stylelint-disable-line function-disallowed-list
border-left-width: var(--#{$prefix}list-group-border-width);
}
}
}
@ -167,10 +167,10 @@
// useful within other components (e.g., cards).
.list-group-flush {
@include border-radius.border-radius(0);
@include border-radius(0);
> .list-group-item {
border-width: 0 0 var(--#{variables.$prefix}list-group-border-width);
border-width: 0 0 var(--#{$prefix}list-group-border-width);
&:last-child {
border-bottom-width: 0;
@ -185,18 +185,18 @@
// Add modifier classes to change text and background color on individual items.
// Organizationally, this must come after the `:hover` states.
@each $state in map.keys(variables.$theme-colors) {
@each $state in map.keys($theme-colors) {
.list-group-item-#{$state} {
--#{variables.$prefix}list-group-color: var(--#{variables.$prefix}#{$state}-text-emphasis);
--#{variables.$prefix}list-group-bg: var(--#{variables.$prefix}#{$state}-bg-subtle);
--#{variables.$prefix}list-group-border-color: var(--#{variables.$prefix}#{$state}-border-subtle);
--#{variables.$prefix}list-group-action-hover-color: var(--#{variables.$prefix}emphasis-color);
--#{variables.$prefix}list-group-action-hover-bg: var(--#{variables.$prefix}#{$state}-border-subtle);
--#{variables.$prefix}list-group-action-active-color: var(--#{variables.$prefix}emphasis-color);
--#{variables.$prefix}list-group-action-active-bg: var(--#{variables.$prefix}#{$state}-border-subtle);
--#{variables.$prefix}list-group-active-color: var(--#{variables.$prefix}#{$state}-bg-subtle);
--#{variables.$prefix}list-group-active-bg: var(--#{variables.$prefix}#{$state}-text-emphasis);
--#{variables.$prefix}list-group-active-border-color: var(--#{variables.$prefix}#{$state}-text-emphasis);
--#{$prefix}list-group-color: var(--#{$prefix}#{$state}-text-emphasis);
--#{$prefix}list-group-bg: var(--#{$prefix}#{$state}-bg-subtle);
--#{$prefix}list-group-border-color: var(--#{$prefix}#{$state}-border-subtle);
--#{$prefix}list-group-action-hover-color: var(--#{$prefix}emphasis-color);
--#{$prefix}list-group-action-hover-bg: var(--#{$prefix}#{$state}-border-subtle);
--#{$prefix}list-group-action-active-color: var(--#{$prefix}emphasis-color);
--#{$prefix}list-group-action-active-bg: var(--#{$prefix}#{$state}-border-subtle);
--#{$prefix}list-group-active-color: var(--#{$prefix}#{$state}-bg-subtle);
--#{$prefix}list-group-active-bg: var(--#{$prefix}#{$state}-text-emphasis);
--#{$prefix}list-group-active-border-color: var(--#{$prefix}#{$state}-text-emphasis);
}
}
// scss-docs-end list-group-modifiers

View File

@ -1,8 +1,6 @@
@use "sass:map";
@use "setup/variables" as *;
@use "setup/functions" as *;
// @use "functions";
// @use "setup/variables";
// Re-assigned maps
//

View File

@ -1,10 +1,10 @@
@use "sass:map";
@use "mixins/backdrop";
@use "mixins/border-radius";
@use "mixins/box-shadow";
@use "mixins/breakpoints";
@use "mixins/transition";
@use "setup/variables";
@use "mixins/backdrop" as *;
@use "mixins/border-radius" as *;
@use "mixins/box-shadow" as *;
@use "mixins/breakpoints" as *;
@use "mixins/transition" as *;
@use "setup/variables" as *;
// stylelint-disable function-disallowed-list
@ -17,33 +17,33 @@
// Container that the modal scrolls within
.modal {
// scss-docs-start modal-css-vars
--#{variables.$prefix}modal-zindex: #{variables.$zindex-modal};
--#{variables.$prefix}modal-width: #{variables.$modal-md};
--#{variables.$prefix}modal-padding: #{variables.$modal-inner-padding};
--#{variables.$prefix}modal-margin: #{variables.$modal-dialog-margin};
--#{variables.$prefix}modal-color: #{variables.$modal-content-color};
--#{variables.$prefix}modal-bg: #{variables.$modal-content-bg};
--#{variables.$prefix}modal-border-color: #{variables.$modal-content-border-color};
--#{variables.$prefix}modal-border-width: #{variables.$modal-content-border-width};
--#{variables.$prefix}modal-border-radius: #{variables.$modal-content-border-radius};
--#{variables.$prefix}modal-box-shadow: #{variables.$modal-content-box-shadow-xs};
--#{variables.$prefix}modal-inner-border-radius: #{variables.$modal-content-inner-border-radius};
--#{variables.$prefix}modal-header-padding-x: #{variables.$modal-header-padding-x};
--#{variables.$prefix}modal-header-padding-y: #{variables.$modal-header-padding-y};
--#{variables.$prefix}modal-header-padding: #{variables.$modal-header-padding}; // Todo in v6: Split this padding into x and y
--#{variables.$prefix}modal-header-border-color: #{variables.$modal-header-border-color};
--#{variables.$prefix}modal-header-border-width: #{variables.$modal-header-border-width};
--#{variables.$prefix}modal-title-line-height: #{variables.$modal-title-line-height};
--#{variables.$prefix}modal-footer-gap: #{variables.$modal-footer-margin-between};
--#{variables.$prefix}modal-footer-bg: #{variables.$modal-footer-bg};
--#{variables.$prefix}modal-footer-border-color: #{variables.$modal-footer-border-color};
--#{variables.$prefix}modal-footer-border-width: #{variables.$modal-footer-border-width};
--#{$prefix}modal-zindex: #{$zindex-modal};
--#{$prefix}modal-width: #{$modal-md};
--#{$prefix}modal-padding: #{$modal-inner-padding};
--#{$prefix}modal-margin: #{$modal-dialog-margin};
--#{$prefix}modal-color: #{$modal-content-color};
--#{$prefix}modal-bg: #{$modal-content-bg};
--#{$prefix}modal-border-color: #{$modal-content-border-color};
--#{$prefix}modal-border-width: #{$modal-content-border-width};
--#{$prefix}modal-border-radius: #{$modal-content-border-radius};
--#{$prefix}modal-box-shadow: #{$modal-content-box-shadow-xs};
--#{$prefix}modal-inner-border-radius: #{$modal-content-inner-border-radius};
--#{$prefix}modal-header-padding-x: #{$modal-header-padding-x};
--#{$prefix}modal-header-padding-y: #{$modal-header-padding-y};
--#{$prefix}modal-header-padding: #{$modal-header-padding}; // Todo in v6: Split this padding into x and y
--#{$prefix}modal-header-border-color: #{$modal-header-border-color};
--#{$prefix}modal-header-border-width: #{$modal-header-border-width};
--#{$prefix}modal-title-line-height: #{$modal-title-line-height};
--#{$prefix}modal-footer-gap: #{$modal-footer-margin-between};
--#{$prefix}modal-footer-bg: #{$modal-footer-bg};
--#{$prefix}modal-footer-border-color: #{$modal-footer-border-color};
--#{$prefix}modal-footer-border-width: #{$modal-footer-border-width};
// scss-docs-end modal-css-vars
position: fixed;
top: 0;
left: 0;
z-index: var(--#{variables.$prefix}modal-zindex);
z-index: var(--#{$prefix}modal-zindex);
display: none;
width: 100%;
height: 100%;
@ -61,27 +61,27 @@
.modal-dialog {
position: relative;
width: auto;
margin: var(--#{variables.$prefix}modal-margin);
margin: var(--#{$prefix}modal-margin);
// allow clicks to pass through for custom click handling to close modal
pointer-events: none;
// When fading in the modal, animate it to slide down
.modal.fade & {
transform: variables.$modal-fade-transform;
@include transition.transition(variables.$modal-transition);
transform: $modal-fade-transform;
@include transition($modal-transition);
}
.modal.show & {
transform: variables.$modal-show-transform;
transform: $modal-show-transform;
}
// When trying to close, animate focus to scale
.modal.modal-static & {
transform: variables.$modal-scale-transform;
transform: $modal-scale-transform;
}
}
.modal-dialog-scrollable {
height: calc(100% - var(--#{variables.$prefix}modal-margin) * 2);
height: calc(100% - var(--#{$prefix}modal-margin) * 2);
.modal-content {
max-height: 100%;
@ -96,7 +96,7 @@
.modal-dialog-centered {
display: flex;
align-items: center;
min-height: calc(100% - var(--#{variables.$prefix}modal-margin) * 2);
min-height: calc(100% - var(--#{$prefix}modal-margin) * 2);
}
// Actual modal
@ -106,13 +106,13 @@
flex-direction: column;
width: 100%; // Ensure `.modal-content` extends the full width of the parent `.modal-dialog`
// counteract the pointer-events: none; in the .modal-dialog
color: var(--#{variables.$prefix}modal-color);
color: var(--#{$prefix}modal-color);
pointer-events: auto;
background-color: var(--#{variables.$prefix}modal-bg);
background-color: var(--#{$prefix}modal-bg);
background-clip: padding-box;
border: var(--#{variables.$prefix}modal-border-width) solid var(--#{variables.$prefix}modal-border-color);
@include border-radius.border-radius(var(--#{variables.$prefix}modal-border-radius));
@include box-shadow.box-shadow(var(--#{variables.$prefix}modal-box-shadow));
border: var(--#{$prefix}modal-border-width) solid var(--#{$prefix}modal-border-color);
@include border-radius(var(--#{$prefix}modal-border-radius));
@include box-shadow(var(--#{$prefix}modal-box-shadow));
// Remove focus outline from opened modal
outline: 0;
}
@ -120,12 +120,12 @@
// Modal background
.modal-backdrop {
// scss-docs-start modal-backdrop-css-vars
--#{variables.$prefix}backdrop-zindex: #{variables.$zindex-modal-backdrop};
--#{variables.$prefix}backdrop-bg: #{variables.$modal-backdrop-bg};
--#{variables.$prefix}backdrop-opacity: #{variables.$modal-backdrop-opacity};
--#{$prefix}backdrop-zindex: #{$zindex-modal-backdrop};
--#{$prefix}backdrop-bg: #{$modal-backdrop-bg};
--#{$prefix}backdrop-opacity: #{$modal-backdrop-opacity};
// scss-docs-end modal-backdrop-css-vars
@include backdrop.overlay-backdrop(var(--#{variables.$prefix}backdrop-zindex), var(--#{variables.$prefix}backdrop-bg), var(--#{variables.$prefix}backdrop-opacity));
@include overlay-backdrop(var(--#{$prefix}backdrop-zindex), var(--#{$prefix}backdrop-bg), var(--#{$prefix}backdrop-opacity));
}
// Modal header
@ -134,20 +134,20 @@
display: flex;
flex-shrink: 0;
align-items: center;
padding: var(--#{variables.$prefix}modal-header-padding);
border-bottom: var(--#{variables.$prefix}modal-header-border-width) solid var(--#{variables.$prefix}modal-header-border-color);
@include border-radius.border-top-radius(var(--#{variables.$prefix}modal-inner-border-radius));
padding: var(--#{$prefix}modal-header-padding);
border-bottom: var(--#{$prefix}modal-header-border-width) solid var(--#{$prefix}modal-header-border-color);
@include border-top-radius(var(--#{$prefix}modal-inner-border-radius));
.btn-close {
padding: calc(var(--#{variables.$prefix}modal-header-padding-y) * .5) calc(var(--#{variables.$prefix}modal-header-padding-x) * .5);
margin: calc(-.5 * var(--#{variables.$prefix}modal-header-padding-y)) calc(-.5 * var(--#{variables.$prefix}modal-header-padding-x)) calc(-.5 * var(--#{variables.$prefix}modal-header-padding-y)) auto;
padding: calc(var(--#{$prefix}modal-header-padding-y) * .5) calc(var(--#{$prefix}modal-header-padding-x) * .5);
margin: calc(-.5 * var(--#{$prefix}modal-header-padding-y)) calc(-.5 * var(--#{$prefix}modal-header-padding-x)) calc(-.5 * var(--#{$prefix}modal-header-padding-y)) auto;
}
}
// Title text within header
.modal-title {
margin-bottom: 0;
line-height: var(--#{variables.$prefix}modal-title-line-height);
line-height: var(--#{$prefix}modal-title-line-height);
}
// Modal body
@ -157,7 +157,7 @@
// Enable `flex-grow: 1` so that the body take up as much space as possible
// when there should be a fixed height on `.modal-dialog`.
flex: 1 1 auto;
padding: var(--#{variables.$prefix}modal-padding);
padding: var(--#{$prefix}modal-padding);
}
// Footer (for actions)
@ -167,57 +167,57 @@
flex-wrap: wrap;
align-items: center; // vertically center
justify-content: flex-end; // Right align buttons with flex property because text-align doesn't work on flex items
padding: calc(var(--#{variables.$prefix}modal-padding) - var(--#{variables.$prefix}modal-footer-gap) * .5);
background-color: var(--#{variables.$prefix}modal-footer-bg);
border-top: var(--#{variables.$prefix}modal-footer-border-width) solid var(--#{variables.$prefix}modal-footer-border-color);
@include border-radius.border-bottom-radius(var(--#{variables.$prefix}modal-inner-border-radius));
padding: calc(var(--#{$prefix}modal-padding) - var(--#{$prefix}modal-footer-gap) * .5);
background-color: var(--#{$prefix}modal-footer-bg);
border-top: var(--#{$prefix}modal-footer-border-width) solid var(--#{$prefix}modal-footer-border-color);
@include border-bottom-radius(var(--#{$prefix}modal-inner-border-radius));
// Place margin between footer elements
// This solution is far from ideal because of the universal selector usage,
// but is needed to fix https://github.com/twbs/bootstrap/issues/24800
> * {
margin: calc(var(--#{variables.$prefix}modal-footer-gap) * .5); // Todo in v6: replace with gap on parent class
margin: calc(var(--#{$prefix}modal-footer-gap) * .5); // Todo in v6: replace with gap on parent class
}
}
// Scale up the modal
@include breakpoints.media-breakpoint-up(sm) {
@include media-breakpoint-up(sm) {
.modal {
--#{variables.$prefix}modal-margin: #{variables.$modal-dialog-margin-y-sm-up};
--#{variables.$prefix}modal-box-shadow: #{variables.$modal-content-box-shadow-sm-up};
--#{$prefix}modal-margin: #{$modal-dialog-margin-y-sm-up};
--#{$prefix}modal-box-shadow: #{$modal-content-box-shadow-sm-up};
}
// Automatically set modal's width for larger viewports
.modal-dialog {
max-width: var(--#{variables.$prefix}modal-width);
max-width: var(--#{$prefix}modal-width);
margin-right: auto;
margin-left: auto;
}
.modal-sm {
--#{variables.$prefix}modal-width: #{variables.$modal-sm};
--#{$prefix}modal-width: #{$modal-sm};
}
}
@include breakpoints.media-breakpoint-up(lg) {
@include media-breakpoint-up(lg) {
.modal-lg,
.modal-xl {
--#{variables.$prefix}modal-width: #{variables.$modal-lg};
--#{$prefix}modal-width: #{$modal-lg};
}
}
@include breakpoints.media-breakpoint-up(xl) {
@include media-breakpoint-up(xl) {
.modal-xl {
--#{variables.$prefix}modal-width: #{variables.$modal-xl};
--#{$prefix}modal-width: #{$modal-xl};
}
}
// scss-docs-start modal-fullscreen-loop
@each $breakpoint in map.keys(variables.$grid-breakpoints) {
$infix: breakpoints.breakpoint-infix($breakpoint, variables.$grid-breakpoints);
@each $breakpoint in map.keys($grid-breakpoints) {
$infix: breakpoint-infix($breakpoint, $grid-breakpoints);
$postfix: if($infix != "", $infix + "-down", "");
@include breakpoints.media-breakpoint-down($breakpoint) {
@include media-breakpoint-down($breakpoint) {
.modal-fullscreen#{$postfix} {
width: 100vw;
max-width: none;
@ -227,12 +227,12 @@
.modal-content {
height: 100%;
border: 0;
@include border-radius.border-radius(0);
@include border-radius(0);
}
.modal-header,
.modal-footer {
@include border-radius.border-radius(0);
@include border-radius(0);
}
.modal-body {

View File

@ -1,8 +1,8 @@
@use "mixins/border-radius";
@use "mixins/gradients";
@use "mixins/transition";
@use "setup/variables";
@use "vendor/rfs";
@use "mixins/border-radius" as *;
@use "mixins/gradients" as *;
@use "mixins/transition" as *;
@use "setup/variables" as *;
@use "vendor/rfs" as *;
// Base class
//
@ -11,13 +11,13 @@
.nav {
// scss-docs-start nav-css-vars
--#{variables.$prefix}nav-link-padding-x: #{variables.$nav-link-padding-x};
--#{variables.$prefix}nav-link-padding-y: #{variables.$nav-link-padding-y};
@include rfs.rfs(variables.$nav-link-font-size, --#{variables.$prefix}nav-link-font-size);
--#{variables.$prefix}nav-link-font-weight: #{variables.$nav-link-font-weight};
--#{variables.$prefix}nav-link-color: #{variables.$nav-link-color};
--#{variables.$prefix}nav-link-hover-color: #{variables.$nav-link-hover-color};
--#{variables.$prefix}nav-link-disabled-color: #{variables.$nav-link-disabled-color};
--#{$prefix}nav-link-padding-x: #{$nav-link-padding-x};
--#{$prefix}nav-link-padding-y: #{$nav-link-padding-y};
@include rfs($nav-link-font-size, --#{$prefix}nav-link-font-size);
--#{$prefix}nav-link-font-weight: #{$nav-link-font-weight};
--#{$prefix}nav-link-color: #{$nav-link-color};
--#{$prefix}nav-link-hover-color: #{$nav-link-hover-color};
--#{$prefix}nav-link-disabled-color: #{$nav-link-disabled-color};
// scss-docs-end nav-css-vars
display: flex;
@ -29,30 +29,30 @@
.nav-link {
display: block;
padding: var(--#{variables.$prefix}nav-link-padding-y) var(--#{variables.$prefix}nav-link-padding-x);
@include rfs.font-size(var(--#{variables.$prefix}nav-link-font-size));
font-weight: var(--#{variables.$prefix}nav-link-font-weight);
color: var(--#{variables.$prefix}nav-link-color);
text-decoration: if(variables.$link-decoration == none, null, none);
padding: var(--#{$prefix}nav-link-padding-y) var(--#{$prefix}nav-link-padding-x);
@include font-size(var(--#{$prefix}nav-link-font-size));
font-weight: var(--#{$prefix}nav-link-font-weight);
color: var(--#{$prefix}nav-link-color);
text-decoration: if($link-decoration == none, null, none);
background: none;
border: 0;
@include transition.transition(variables.$nav-link-transition);
@include transition($nav-link-transition);
&:hover,
&:focus {
color: var(--#{variables.$prefix}nav-link-hover-color);
text-decoration: if(variables.$link-hover-decoration == underline, none, null);
color: var(--#{$prefix}nav-link-hover-color);
text-decoration: if($link-hover-decoration == underline, none, null);
}
&:focus-visible {
outline: 0;
box-shadow: variables.$nav-link-focus-box-shadow;
box-shadow: $nav-link-focus-box-shadow;
}
// Disabled state lightens text
&.disabled,
&:disabled {
color: var(--#{variables.$prefix}nav-link-disabled-color);
color: var(--#{$prefix}nav-link-disabled-color);
pointer-events: none;
cursor: default;
}
@ -64,42 +64,42 @@
.nav-tabs {
// scss-docs-start nav-tabs-css-vars
--#{variables.$prefix}nav-tabs-border-width: #{variables.$nav-tabs-border-width};
--#{variables.$prefix}nav-tabs-border-color: #{variables.$nav-tabs-border-color};
--#{variables.$prefix}nav-tabs-border-radius: #{variables.$nav-tabs-border-radius};
--#{variables.$prefix}nav-tabs-link-hover-border-color: #{variables.$nav-tabs-link-hover-border-color};
--#{variables.$prefix}nav-tabs-link-active-color: #{variables.$nav-tabs-link-active-color};
--#{variables.$prefix}nav-tabs-link-active-bg: #{variables.$nav-tabs-link-active-bg};
--#{variables.$prefix}nav-tabs-link-active-border-color: #{variables.$nav-tabs-link-active-border-color};
--#{$prefix}nav-tabs-border-width: #{$nav-tabs-border-width};
--#{$prefix}nav-tabs-border-color: #{$nav-tabs-border-color};
--#{$prefix}nav-tabs-border-radius: #{$nav-tabs-border-radius};
--#{$prefix}nav-tabs-link-hover-border-color: #{$nav-tabs-link-hover-border-color};
--#{$prefix}nav-tabs-link-active-color: #{$nav-tabs-link-active-color};
--#{$prefix}nav-tabs-link-active-bg: #{$nav-tabs-link-active-bg};
--#{$prefix}nav-tabs-link-active-border-color: #{$nav-tabs-link-active-border-color};
// scss-docs-end nav-tabs-css-vars
border-bottom: var(--#{variables.$prefix}nav-tabs-border-width) solid var(--#{variables.$prefix}nav-tabs-border-color);
border-bottom: var(--#{$prefix}nav-tabs-border-width) solid var(--#{$prefix}nav-tabs-border-color);
.nav-link {
margin-bottom: calc(-1 * var(--#{variables.$prefix}nav-tabs-border-width)); // stylelint-disable-line function-disallowed-list
border: var(--#{variables.$prefix}nav-tabs-border-width) solid transparent;
@include border-radius.border-top-radius(var(--#{variables.$prefix}nav-tabs-border-radius));
margin-bottom: calc(-1 * var(--#{$prefix}nav-tabs-border-width)); // stylelint-disable-line function-disallowed-list
border: var(--#{$prefix}nav-tabs-border-width) solid transparent;
@include border-top-radius(var(--#{$prefix}nav-tabs-border-radius));
&:hover,
&:focus {
// Prevents active .nav-link tab overlapping focus outline of previous/next .nav-link
isolation: isolate;
border-color: var(--#{variables.$prefix}nav-tabs-link-hover-border-color);
border-color: var(--#{$prefix}nav-tabs-link-hover-border-color);
}
}
.nav-link.active,
.nav-item.show .nav-link {
color: var(--#{variables.$prefix}nav-tabs-link-active-color);
background-color: var(--#{variables.$prefix}nav-tabs-link-active-bg);
border-color: var(--#{variables.$prefix}nav-tabs-link-active-border-color);
color: var(--#{$prefix}nav-tabs-link-active-color);
background-color: var(--#{$prefix}nav-tabs-link-active-bg);
border-color: var(--#{$prefix}nav-tabs-link-active-border-color);
}
.dropdown-menu {
// Make dropdown border overlap tab border
margin-top: calc(-1 * var(--#{variables.$prefix}nav-tabs-border-width)); // stylelint-disable-line function-disallowed-list
margin-top: calc(-1 * var(--#{$prefix}nav-tabs-border-width)); // stylelint-disable-line function-disallowed-list
// Remove the top rounded corners here since there is a hard edge above the menu
@include border-radius.border-top-radius(0);
@include border-top-radius(0);
}
}
@ -110,19 +110,19 @@
.nav-pills {
// scss-docs-start nav-pills-css-vars
--#{variables.$prefix}nav-pills-border-radius: #{variables.$nav-pills-border-radius};
--#{variables.$prefix}nav-pills-link-active-color: #{variables.$nav-pills-link-active-color};
--#{variables.$prefix}nav-pills-link-active-bg: #{variables.$nav-pills-link-active-bg};
--#{$prefix}nav-pills-border-radius: #{$nav-pills-border-radius};
--#{$prefix}nav-pills-link-active-color: #{$nav-pills-link-active-color};
--#{$prefix}nav-pills-link-active-bg: #{$nav-pills-link-active-bg};
// scss-docs-end nav-pills-css-vars
.nav-link {
@include border-radius.border-radius(var(--#{variables.$prefix}nav-pills-border-radius));
@include border-radius(var(--#{$prefix}nav-pills-border-radius));
}
.nav-link.active,
.show > .nav-link {
color: var(--#{variables.$prefix}nav-pills-link-active-color);
@include gradients.gradient-bg(var(--#{variables.$prefix}nav-pills-link-active-bg));
color: var(--#{$prefix}nav-pills-link-active-color);
@include gradient-bg(var(--#{$prefix}nav-pills-link-active-bg));
}
}
@ -133,17 +133,17 @@
.nav-underline {
// scss-docs-start nav-underline-css-vars
--#{variables.$prefix}nav-underline-gap: #{variables.$nav-underline-gap};
--#{variables.$prefix}nav-underline-border-width: #{variables.$nav-underline-border-width};
--#{variables.$prefix}nav-underline-link-active-color: #{variables.$nav-underline-link-active-color};
--#{$prefix}nav-underline-gap: #{$nav-underline-gap};
--#{$prefix}nav-underline-border-width: #{$nav-underline-border-width};
--#{$prefix}nav-underline-link-active-color: #{$nav-underline-link-active-color};
// scss-docs-end nav-underline-css-vars
gap: var(--#{variables.$prefix}nav-underline-gap);
gap: var(--#{$prefix}nav-underline-gap);
.nav-link {
padding-right: 0;
padding-left: 0;
border-bottom: var(--#{variables.$prefix}nav-underline-border-width) solid transparent;
border-bottom: var(--#{$prefix}nav-underline-border-width) solid transparent;
&:hover,
&:focus {
@ -153,8 +153,8 @@
.nav-link.active,
.show > .nav-link {
font-weight: variables.$font-weight-bold;
color: var(--#{variables.$prefix}nav-underline-link-active-color);
font-weight: $font-weight-bold;
color: var(--#{$prefix}nav-underline-link-active-color);
border-bottom-color: currentcolor;
}
}

View File

@ -1,14 +1,13 @@
@use "sass:map";
@use "functions";
@use "mixins/border-radius";
@use "mixins/box-shadow";
@use "mixins/breakpoints";
@use "mixins/color-mode";
@use "mixins/deprecate";
@use "mixins/gradients";
@use "mixins/transition";
@use "setup/variables";
@use "vendor/rfs";
@use "mixins/border-radius" as *;
@use "mixins/box-shadow" as *;
@use "mixins/breakpoints" as *;
@use "mixins/color-mode" as *;
@use "mixins/deprecate" as *;
@use "mixins/gradients" as *;
@use "mixins/transition" as *;
@use "setup/variables" as *;
@use "vendor/rfs" as *;
// Navbar
//
@ -17,26 +16,26 @@
.navbar {
// scss-docs-start navbar-css-vars
--#{variables.$prefix}navbar-padding-x: #{if(variables.$navbar-padding-x == null, 0, variables.$navbar-padding-x)};
--#{variables.$prefix}navbar-padding-y: #{variables.$navbar-padding-y};
--#{variables.$prefix}navbar-color: #{variables.$navbar-light-color};
--#{variables.$prefix}navbar-hover-color: #{variables.$navbar-light-hover-color};
--#{variables.$prefix}navbar-disabled-color: #{variables.$navbar-light-disabled-color};
--#{variables.$prefix}navbar-active-color: #{variables.$navbar-light-active-color};
--#{variables.$prefix}navbar-brand-padding-y: #{variables.$navbar-brand-padding-y};
--#{variables.$prefix}navbar-brand-margin-end: #{variables.$navbar-brand-margin-end};
--#{variables.$prefix}navbar-brand-font-size: #{variables.$navbar-brand-font-size};
--#{variables.$prefix}navbar-brand-color: #{variables.$navbar-light-brand-color};
--#{variables.$prefix}navbar-brand-hover-color: #{variables.$navbar-light-brand-hover-color};
--#{variables.$prefix}navbar-nav-link-padding-x: #{variables.$navbar-nav-link-padding-x};
--#{variables.$prefix}navbar-toggler-padding-y: #{variables.$navbar-toggler-padding-y};
--#{variables.$prefix}navbar-toggler-padding-x: #{variables.$navbar-toggler-padding-x};
--#{variables.$prefix}navbar-toggler-font-size: #{variables.$navbar-toggler-font-size};
--#{variables.$prefix}navbar-toggler-icon-bg: #{functions.escape-svg(variables.$navbar-light-toggler-icon-bg)};
--#{variables.$prefix}navbar-toggler-border-color: #{variables.$navbar-light-toggler-border-color};
--#{variables.$prefix}navbar-toggler-border-radius: #{variables.$navbar-toggler-border-radius};
--#{variables.$prefix}navbar-toggler-focus-width: #{variables.$navbar-toggler-focus-width};
--#{variables.$prefix}navbar-toggler-transition: #{variables.$navbar-toggler-transition};
--#{$prefix}navbar-padding-x: #{if($navbar-padding-x == null, 0, $navbar-padding-x)};
--#{$prefix}navbar-padding-y: #{$navbar-padding-y};
--#{$prefix}navbar-color: #{$navbar-light-color};
--#{$prefix}navbar-hover-color: #{$navbar-light-hover-color};
--#{$prefix}navbar-disabled-color: #{$navbar-light-disabled-color};
--#{$prefix}navbar-active-color: #{$navbar-light-active-color};
--#{$prefix}navbar-brand-padding-y: #{$navbar-brand-padding-y};
--#{$prefix}navbar-brand-margin-end: #{$navbar-brand-margin-end};
--#{$prefix}navbar-brand-font-size: #{$navbar-brand-font-size};
--#{$prefix}navbar-brand-color: #{$navbar-light-brand-color};
--#{$prefix}navbar-brand-hover-color: #{$navbar-light-brand-hover-color};
--#{$prefix}navbar-nav-link-padding-x: #{$navbar-nav-link-padding-x};
--#{$prefix}navbar-toggler-padding-y: #{$navbar-toggler-padding-y};
--#{$prefix}navbar-toggler-padding-x: #{$navbar-toggler-padding-x};
--#{$prefix}navbar-toggler-font-size: #{$navbar-toggler-font-size};
--#{$prefix}navbar-toggler-icon-bg: #{escape-svg($navbar-light-toggler-icon-bg)};
--#{$prefix}navbar-toggler-border-color: #{$navbar-light-toggler-border-color};
--#{$prefix}navbar-toggler-border-radius: #{$navbar-toggler-border-radius};
--#{$prefix}navbar-toggler-focus-width: #{$navbar-toggler-focus-width};
--#{$prefix}navbar-toggler-transition: #{$navbar-toggler-transition};
// scss-docs-end navbar-css-vars
position: relative;
@ -44,8 +43,8 @@
flex-wrap: wrap; // allow us to do the line break for collapsing content
align-items: center;
justify-content: space-between; // space out brand from logo
padding: var(--#{variables.$prefix}navbar-padding-y) var(--#{variables.$prefix}navbar-padding-x);
@include gradients.gradient-bg();
padding: var(--#{$prefix}navbar-padding-y) var(--#{$prefix}navbar-padding-x);
@include gradient-bg();
// Because flex properties aren't inherited, we need to redeclare these first
// few properties so that content nested within behave properly.
@ -62,8 +61,8 @@
@extend %container-flex-properties;
}
@each $breakpoint, $container-max-width in variables.$container-max-widths {
> .container#{breakpoints.breakpoint-infix($breakpoint, variables.$container-max-widths)} {
@each $breakpoint, $container-max-width in $container-max-widths {
> .container#{breakpoint-infix($breakpoint, $container-max-widths)} {
@extend %container-flex-properties;
}
}
@ -75,18 +74,18 @@
// Used for brand, project, or site names.
.navbar-brand {
padding-top: var(--#{variables.$prefix}navbar-brand-padding-y);
padding-bottom: var(--#{variables.$prefix}navbar-brand-padding-y);
margin-right: var(--#{variables.$prefix}navbar-brand-margin-end);
@include rfs.font-size(var(--#{variables.$prefix}navbar-brand-font-size));
color: var(--#{variables.$prefix}navbar-brand-color);
text-decoration: if(variables.$link-decoration == none, null, none);
padding-top: var(--#{$prefix}navbar-brand-padding-y);
padding-bottom: var(--#{$prefix}navbar-brand-padding-y);
margin-right: var(--#{$prefix}navbar-brand-margin-end);
@include font-size(var(--#{$prefix}navbar-brand-font-size));
color: var(--#{$prefix}navbar-brand-color);
text-decoration: if($link-decoration == none, null, none);
white-space: nowrap;
&:hover,
&:focus {
color: var(--#{variables.$prefix}navbar-brand-hover-color);
text-decoration: if(variables.$link-hover-decoration == underline, none, null);
color: var(--#{$prefix}navbar-brand-hover-color);
text-decoration: if($link-hover-decoration == underline, none, null);
}
}
@ -97,13 +96,13 @@
.navbar-nav {
// scss-docs-start navbar-nav-css-vars
--#{variables.$prefix}nav-link-padding-x: 0;
--#{variables.$prefix}nav-link-padding-y: #{variables.$nav-link-padding-y};
@include rfs.rfs(variables.$nav-link-font-size, --#{variables.$prefix}nav-link-font-size);
--#{variables.$prefix}nav-link-font-weight: #{variables.$nav-link-font-weight};
--#{variables.$prefix}nav-link-color: var(--#{variables.$prefix}navbar-color);
--#{variables.$prefix}nav-link-hover-color: var(--#{variables.$prefix}navbar-hover-color);
--#{variables.$prefix}nav-link-disabled-color: var(--#{variables.$prefix}navbar-disabled-color);
--#{$prefix}nav-link-padding-x: 0;
--#{$prefix}nav-link-padding-y: #{$nav-link-padding-y};
@include rfs($nav-link-font-size, --#{$prefix}nav-link-font-size);
--#{$prefix}nav-link-font-weight: #{$nav-link-font-weight};
--#{$prefix}nav-link-color: var(--#{$prefix}navbar-color);
--#{$prefix}nav-link-hover-color: var(--#{$prefix}navbar-hover-color);
--#{$prefix}nav-link-disabled-color: var(--#{$prefix}navbar-disabled-color);
// scss-docs-end navbar-nav-css-vars
display: flex;
@ -115,7 +114,7 @@
.nav-link {
&.active,
&.show {
color: var(--#{variables.$prefix}navbar-active-color);
color: var(--#{$prefix}navbar-active-color);
}
}
@ -130,14 +129,14 @@
//
.navbar-text {
padding-top: variables.$nav-link-padding-y;
padding-bottom: variables.$nav-link-padding-y;
color: var(--#{variables.$prefix}navbar-color);
padding-top: $nav-link-padding-y;
padding-bottom: $nav-link-padding-y;
color: var(--#{$prefix}navbar-color);
a,
a:hover,
a:focus {
color: var(--#{variables.$prefix}navbar-active-color);
color: var(--#{$prefix}navbar-active-color);
}
}
@ -160,14 +159,14 @@
// Button for toggling the navbar when in its collapsed state
.navbar-toggler {
padding: var(--#{variables.$prefix}navbar-toggler-padding-y) var(--#{variables.$prefix}navbar-toggler-padding-x);
@include rfs.font-size(var(--#{variables.$prefix}navbar-toggler-font-size));
padding: var(--#{$prefix}navbar-toggler-padding-y) var(--#{$prefix}navbar-toggler-padding-x);
@include font-size(var(--#{$prefix}navbar-toggler-font-size));
line-height: 1;
color: var(--#{variables.$prefix}navbar-color);
color: var(--#{$prefix}navbar-color);
background-color: transparent; // remove default button style
border: var(--#{variables.$prefix}border-width) solid var(--#{variables.$prefix}navbar-toggler-border-color); // remove default button style
@include border-radius.border-radius(var(--#{variables.$prefix}navbar-toggler-border-radius));
@include transition.transition(var(--#{variables.$prefix}navbar-toggler-transition));
border: var(--#{$prefix}border-width) solid var(--#{$prefix}navbar-toggler-border-color); // remove default button style
@include border-radius(var(--#{$prefix}navbar-toggler-border-radius));
@include transition(var(--#{$prefix}navbar-toggler-transition));
&:hover {
text-decoration: none;
@ -176,7 +175,7 @@
&:focus {
text-decoration: none;
outline: 0;
box-shadow: 0 0 0 var(--#{variables.$prefix}navbar-toggler-focus-width);
box-shadow: 0 0 0 var(--#{$prefix}navbar-toggler-focus-width);
}
}
@ -187,14 +186,14 @@
width: 1.5em;
height: 1.5em;
vertical-align: middle;
background-image: var(--#{variables.$prefix}navbar-toggler-icon-bg);
background-image: var(--#{$prefix}navbar-toggler-icon-bg);
background-repeat: no-repeat;
background-position: center;
background-size: 100%;
}
.navbar-nav-scroll {
max-height: var(--#{variables.$prefix}scroll-height, 75vh);
max-height: var(--#{$prefix}scroll-height, 75vh);
overflow-y: auto;
}
@ -202,13 +201,13 @@
// Generate series of `.navbar-expand-*` responsive classes for configuring
// where your navbar collapses.
.navbar-expand {
@each $breakpoint in map.keys(variables.$grid-breakpoints) {
$next: breakpoints.breakpoint-next($breakpoint, variables.$grid-breakpoints);
$infix: breakpoints.breakpoint-infix($next, variables.$grid-breakpoints);
@each $breakpoint in map.keys($grid-breakpoints) {
$next: breakpoint-next($breakpoint, $grid-breakpoints);
$infix: breakpoint-infix($next, $grid-breakpoints);
// stylelint-disable-next-line scss/selector-no-union-class-name
&#{$infix} {
@include breakpoints.media-breakpoint-up($next) {
@include media-breakpoint-up($next) {
flex-wrap: nowrap;
justify-content: flex-start;
@ -220,8 +219,8 @@
}
.nav-link {
padding-right: var(--#{variables.$prefix}navbar-nav-link-padding-x);
padding-left: var(--#{variables.$prefix}navbar-nav-link-padding-x);
padding-right: var(--#{$prefix}navbar-nav-link-padding-x);
padding-left: var(--#{$prefix}navbar-nav-link-padding-x);
}
}
@ -249,8 +248,8 @@
background-color: transparent !important;
border: 0 !important;
transform: none !important;
@include box-shadow.box-shadow(none);
@include transition.transition(none);
@include box-shadow(none);
@include transition(none);
// stylelint-enable declaration-no-important
.offcanvas-header {
@ -275,27 +274,27 @@
// Styles for switching between navbars with light or dark background.
.navbar-light {
@include deprecate.deprecate("`.navbar-light`", "v5.2.0", "v6.0.0", true);
@include deprecate("`.navbar-light`", "v5.2.0", "v6.0.0", true);
}
.navbar-dark,
.navbar[data-bs-theme="dark"] {
// scss-docs-start navbar-dark-css-vars
--#{variables.$prefix}navbar-color: #{variables.$navbar-dark-color};
--#{variables.$prefix}navbar-hover-color: #{variables.$navbar-dark-hover-color};
--#{variables.$prefix}navbar-disabled-color: #{variables.$navbar-dark-disabled-color};
--#{variables.$prefix}navbar-active-color: #{variables.$navbar-dark-active-color};
--#{variables.$prefix}navbar-brand-color: #{variables.$navbar-dark-brand-color};
--#{variables.$prefix}navbar-brand-hover-color: #{variables.$navbar-dark-brand-hover-color};
--#{variables.$prefix}navbar-toggler-border-color: #{variables.$navbar-dark-toggler-border-color};
--#{variables.$prefix}navbar-toggler-icon-bg: #{functions.escape-svg(variables.$navbar-dark-toggler-icon-bg)};
--#{$prefix}navbar-color: #{$navbar-dark-color};
--#{$prefix}navbar-hover-color: #{$navbar-dark-hover-color};
--#{$prefix}navbar-disabled-color: #{$navbar-dark-disabled-color};
--#{$prefix}navbar-active-color: #{$navbar-dark-active-color};
--#{$prefix}navbar-brand-color: #{$navbar-dark-brand-color};
--#{$prefix}navbar-brand-hover-color: #{$navbar-dark-brand-hover-color};
--#{$prefix}navbar-toggler-border-color: #{$navbar-dark-toggler-border-color};
--#{$prefix}navbar-toggler-icon-bg: #{escape-svg($navbar-dark-toggler-icon-bg)};
// scss-docs-end navbar-dark-css-vars
}
@if variables.$enable-dark-mode {
@include color-mode.color-mode(dark) {
@if $enable-dark-mode {
@include color-mode(dark) {
.navbar-toggler-icon {
--#{variables.$prefix}navbar-toggler-icon-bg: #{functions.escape-svg(variables.$navbar-dark-toggler-icon-bg)};
--#{$prefix}navbar-toggler-icon-bg: #{escape-svg($navbar-dark-toggler-icon-bg)};
}
}
}

View File

@ -1,71 +1,71 @@
@use "sass:map";
@use "mixins/backdrop";
@use "mixins/box-shadow";
@use "mixins/breakpoints";
@use "mixins/transition";
@use "setup/variables";
@use "mixins/backdrop" as *;
@use "mixins/box-shadow" as *;
@use "mixins/breakpoints" as *;
@use "mixins/transition" as *;
@use "setup/variables" as *;
// stylelint-disable function-disallowed-list
%offcanvas-css-vars {
// scss-docs-start offcanvas-css-vars
--#{variables.$prefix}offcanvas-zindex: #{variables.$zindex-offcanvas};
--#{variables.$prefix}offcanvas-width: #{variables.$offcanvas-horizontal-width};
--#{variables.$prefix}offcanvas-height: #{variables.$offcanvas-vertical-height};
--#{variables.$prefix}offcanvas-padding-x: #{variables.$offcanvas-padding-x};
--#{variables.$prefix}offcanvas-padding-y: #{variables.$offcanvas-padding-y};
--#{variables.$prefix}offcanvas-color: #{variables.$offcanvas-color};
--#{variables.$prefix}offcanvas-bg: #{variables.$offcanvas-bg-color};
--#{variables.$prefix}offcanvas-border-width: #{variables.$offcanvas-border-width};
--#{variables.$prefix}offcanvas-border-color: #{variables.$offcanvas-border-color};
--#{variables.$prefix}offcanvas-box-shadow: #{variables.$offcanvas-box-shadow};
--#{variables.$prefix}offcanvas-transition: #{transform variables.$offcanvas-transition-duration ease-in-out};
--#{variables.$prefix}offcanvas-title-line-height: #{variables.$offcanvas-title-line-height};
--#{$prefix}offcanvas-zindex: #{$zindex-offcanvas};
--#{$prefix}offcanvas-width: #{$offcanvas-horizontal-width};
--#{$prefix}offcanvas-height: #{$offcanvas-vertical-height};
--#{$prefix}offcanvas-padding-x: #{$offcanvas-padding-x};
--#{$prefix}offcanvas-padding-y: #{$offcanvas-padding-y};
--#{$prefix}offcanvas-color: #{$offcanvas-color};
--#{$prefix}offcanvas-bg: #{$offcanvas-bg-color};
--#{$prefix}offcanvas-border-width: #{$offcanvas-border-width};
--#{$prefix}offcanvas-border-color: #{$offcanvas-border-color};
--#{$prefix}offcanvas-box-shadow: #{$offcanvas-box-shadow};
--#{$prefix}offcanvas-transition: #{transform $offcanvas-transition-duration ease-in-out};
--#{$prefix}offcanvas-title-line-height: #{$offcanvas-title-line-height};
// scss-docs-end offcanvas-css-vars
}
@each $breakpoint in map.keys(variables.$grid-breakpoints) {
$next: breakpoints.breakpoint-next($breakpoint, variables.$grid-breakpoints);
$infix: breakpoints.breakpoint-infix($next, variables.$grid-breakpoints);
@each $breakpoint in map.keys($grid-breakpoints) {
$next: breakpoint-next($breakpoint, $grid-breakpoints);
$infix: breakpoint-infix($next, $grid-breakpoints);
.offcanvas#{$infix} {
@extend %offcanvas-css-vars;
}
}
@each $breakpoint in map.keys(variables.$grid-breakpoints) {
$next: breakpoints.breakpoint-next($breakpoint, variables.$grid-breakpoints);
$infix: breakpoints.breakpoint-infix($next, variables.$grid-breakpoints);
@each $breakpoint in map.keys($grid-breakpoints) {
$next: breakpoint-next($breakpoint, $grid-breakpoints);
$infix: breakpoint-infix($next, $grid-breakpoints);
.offcanvas#{$infix} {
@include breakpoints.media-breakpoint-down($next) {
@include media-breakpoint-down($next) {
position: fixed;
bottom: 0;
z-index: var(--#{variables.$prefix}offcanvas-zindex);
z-index: var(--#{$prefix}offcanvas-zindex);
display: flex;
flex-direction: column;
max-width: 100%;
color: var(--#{variables.$prefix}offcanvas-color);
color: var(--#{$prefix}offcanvas-color);
visibility: hidden;
background-color: var(--#{variables.$prefix}offcanvas-bg);
background-color: var(--#{$prefix}offcanvas-bg);
background-clip: padding-box;
outline: 0;
@include box-shadow.box-shadow(var(--#{variables.$prefix}offcanvas-box-shadow));
@include transition.transition(var(--#{variables.$prefix}offcanvas-transition));
@include box-shadow(var(--#{$prefix}offcanvas-box-shadow));
@include transition(var(--#{$prefix}offcanvas-transition));
&.offcanvas-start {
top: 0;
left: 0;
width: var(--#{variables.$prefix}offcanvas-width);
border-right: var(--#{variables.$prefix}offcanvas-border-width) solid var(--#{variables.$prefix}offcanvas-border-color);
width: var(--#{$prefix}offcanvas-width);
border-right: var(--#{$prefix}offcanvas-border-width) solid var(--#{$prefix}offcanvas-border-color);
transform: translateX(-100%);
}
&.offcanvas-end {
top: 0;
right: 0;
width: var(--#{variables.$prefix}offcanvas-width);
border-left: var(--#{variables.$prefix}offcanvas-border-width) solid var(--#{variables.$prefix}offcanvas-border-color);
width: var(--#{$prefix}offcanvas-width);
border-left: var(--#{$prefix}offcanvas-border-width) solid var(--#{$prefix}offcanvas-border-color);
transform: translateX(100%);
}
@ -73,18 +73,18 @@
top: 0;
right: 0;
left: 0;
height: var(--#{variables.$prefix}offcanvas-height);
height: var(--#{$prefix}offcanvas-height);
max-height: 100%;
border-bottom: var(--#{variables.$prefix}offcanvas-border-width) solid var(--#{variables.$prefix}offcanvas-border-color);
border-bottom: var(--#{$prefix}offcanvas-border-width) solid var(--#{$prefix}offcanvas-border-color);
transform: translateY(-100%);
}
&.offcanvas-bottom {
right: 0;
left: 0;
height: var(--#{variables.$prefix}offcanvas-height);
height: var(--#{$prefix}offcanvas-height);
max-height: 100%;
border-top: var(--#{variables.$prefix}offcanvas-border-width) solid var(--#{variables.$prefix}offcanvas-border-color);
border-top: var(--#{$prefix}offcanvas-border-width) solid var(--#{$prefix}offcanvas-border-color);
transform: translateY(100%);
}
@ -101,9 +101,9 @@
}
@if not ($infix == "") {
@include breakpoints.media-breakpoint-up($next) {
--#{variables.$prefix}offcanvas-height: auto;
--#{variables.$prefix}offcanvas-border-width: 0;
@include media-breakpoint-up($next) {
--#{$prefix}offcanvas-height: auto;
--#{$prefix}offcanvas-border-width: 0;
background-color: transparent !important; // stylelint-disable-line declaration-no-important
.offcanvas-header {
@ -124,27 +124,27 @@
}
.offcanvas-backdrop {
@include backdrop.overlay-backdrop(variables.$zindex-offcanvas-backdrop, variables.$offcanvas-backdrop-bg, variables.$offcanvas-backdrop-opacity);
@include overlay-backdrop($zindex-offcanvas-backdrop, $offcanvas-backdrop-bg, $offcanvas-backdrop-opacity);
}
.offcanvas-header {
display: flex;
align-items: center;
padding: var(--#{variables.$prefix}offcanvas-padding-y) var(--#{variables.$prefix}offcanvas-padding-x);
padding: var(--#{$prefix}offcanvas-padding-y) var(--#{$prefix}offcanvas-padding-x);
.btn-close {
padding: calc(var(--#{variables.$prefix}offcanvas-padding-y) * .5) calc(var(--#{variables.$prefix}offcanvas-padding-x) * .5);
margin: calc(-.5 * var(--#{variables.$prefix}offcanvas-padding-y)) calc(-.5 * var(--#{variables.$prefix}offcanvas-padding-x)) calc(-.5 * var(--#{variables.$prefix}offcanvas-padding-y)) auto;
padding: calc(var(--#{$prefix}offcanvas-padding-y) * .5) calc(var(--#{$prefix}offcanvas-padding-x) * .5);
margin: calc(-.5 * var(--#{$prefix}offcanvas-padding-y)) calc(-.5 * var(--#{$prefix}offcanvas-padding-x)) calc(-.5 * var(--#{$prefix}offcanvas-padding-y)) auto;
}
}
.offcanvas-title {
margin-bottom: 0;
line-height: var(--#{variables.$prefix}offcanvas-title-line-height);
line-height: var(--#{$prefix}offcanvas-title-line-height);
}
.offcanvas-body {
flex-grow: 1;
padding: var(--#{variables.$prefix}offcanvas-padding-y) var(--#{variables.$prefix}offcanvas-padding-x);
padding: var(--#{$prefix}offcanvas-padding-y) var(--#{$prefix}offcanvas-padding-x);
overflow-y: auto;
}

View File

@ -1,104 +1,104 @@
@use "mixins/border-radius";
@use "mixins/gradients";
@use "mixins/lists";
@use "mixins/pagination";
@use "mixins/transition";
@use "setup/variables";
@use "vendor/rfs";
@use "mixins/border-radius" as *;
@use "mixins/gradients" as *;
@use "mixins/lists" as *;
@use "mixins/pagination" as *;
@use "mixins/transition" as *;
@use "setup/variables" as *;
@use "vendor/rfs" as *;
.pagination {
// scss-docs-start pagination-css-vars
--#{variables.$prefix}pagination-padding-x: #{variables.$pagination-padding-x};
--#{variables.$prefix}pagination-padding-y: #{variables.$pagination-padding-y};
@include rfs.rfs(variables.$pagination-font-size, --#{variables.$prefix}pagination-font-size);
--#{variables.$prefix}pagination-color: #{variables.$pagination-color};
--#{variables.$prefix}pagination-bg: #{variables.$pagination-bg};
--#{variables.$prefix}pagination-border-width: #{variables.$pagination-border-width};
--#{variables.$prefix}pagination-border-color: #{variables.$pagination-border-color};
--#{variables.$prefix}pagination-border-radius: #{variables.$pagination-border-radius};
--#{variables.$prefix}pagination-hover-color: #{variables.$pagination-hover-color};
--#{variables.$prefix}pagination-hover-bg: #{variables.$pagination-hover-bg};
--#{variables.$prefix}pagination-hover-border-color: #{variables.$pagination-hover-border-color};
--#{variables.$prefix}pagination-focus-color: #{variables.$pagination-focus-color};
--#{variables.$prefix}pagination-focus-bg: #{variables.$pagination-focus-bg};
--#{variables.$prefix}pagination-focus-box-shadow: #{variables.$pagination-focus-box-shadow};
--#{variables.$prefix}pagination-active-color: #{variables.$pagination-active-color};
--#{variables.$prefix}pagination-active-bg: #{variables.$pagination-active-bg};
--#{variables.$prefix}pagination-active-border-color: #{variables.$pagination-active-border-color};
--#{variables.$prefix}pagination-disabled-color: #{variables.$pagination-disabled-color};
--#{variables.$prefix}pagination-disabled-bg: #{variables.$pagination-disabled-bg};
--#{variables.$prefix}pagination-disabled-border-color: #{variables.$pagination-disabled-border-color};
--#{$prefix}pagination-padding-x: #{$pagination-padding-x};
--#{$prefix}pagination-padding-y: #{$pagination-padding-y};
@include rfs($pagination-font-size, --#{$prefix}pagination-font-size);
--#{$prefix}pagination-color: #{$pagination-color};
--#{$prefix}pagination-bg: #{$pagination-bg};
--#{$prefix}pagination-border-width: #{$pagination-border-width};
--#{$prefix}pagination-border-color: #{$pagination-border-color};
--#{$prefix}pagination-border-radius: #{$pagination-border-radius};
--#{$prefix}pagination-hover-color: #{$pagination-hover-color};
--#{$prefix}pagination-hover-bg: #{$pagination-hover-bg};
--#{$prefix}pagination-hover-border-color: #{$pagination-hover-border-color};
--#{$prefix}pagination-focus-color: #{$pagination-focus-color};
--#{$prefix}pagination-focus-bg: #{$pagination-focus-bg};
--#{$prefix}pagination-focus-box-shadow: #{$pagination-focus-box-shadow};
--#{$prefix}pagination-active-color: #{$pagination-active-color};
--#{$prefix}pagination-active-bg: #{$pagination-active-bg};
--#{$prefix}pagination-active-border-color: #{$pagination-active-border-color};
--#{$prefix}pagination-disabled-color: #{$pagination-disabled-color};
--#{$prefix}pagination-disabled-bg: #{$pagination-disabled-bg};
--#{$prefix}pagination-disabled-border-color: #{$pagination-disabled-border-color};
// scss-docs-end pagination-css-vars
display: flex;
@include lists.list-unstyled();
@include list-unstyled();
}
.page-link {
position: relative;
display: block;
padding: var(--#{variables.$prefix}pagination-padding-y) var(--#{variables.$prefix}pagination-padding-x);
@include rfs.font-size(var(--#{variables.$prefix}pagination-font-size));
color: var(--#{variables.$prefix}pagination-color);
text-decoration: if(variables.$link-decoration == none, null, none);
background-color: var(--#{variables.$prefix}pagination-bg);
border: var(--#{variables.$prefix}pagination-border-width) solid var(--#{variables.$prefix}pagination-border-color);
@include transition.transition(variables.$pagination-transition);
padding: var(--#{$prefix}pagination-padding-y) var(--#{$prefix}pagination-padding-x);
@include font-size(var(--#{$prefix}pagination-font-size));
color: var(--#{$prefix}pagination-color);
text-decoration: if($link-decoration == none, null, none);
background-color: var(--#{$prefix}pagination-bg);
border: var(--#{$prefix}pagination-border-width) solid var(--#{$prefix}pagination-border-color);
@include transition($pagination-transition);
&:hover {
z-index: 2;
color: var(--#{variables.$prefix}pagination-hover-color);
text-decoration: if(variables.$link-hover-decoration == underline, none, null);
background-color: var(--#{variables.$prefix}pagination-hover-bg);
border-color: var(--#{variables.$prefix}pagination-hover-border-color);
color: var(--#{$prefix}pagination-hover-color);
text-decoration: if($link-hover-decoration == underline, none, null);
background-color: var(--#{$prefix}pagination-hover-bg);
border-color: var(--#{$prefix}pagination-hover-border-color);
}
&:focus {
z-index: 3;
color: var(--#{variables.$prefix}pagination-focus-color);
background-color: var(--#{variables.$prefix}pagination-focus-bg);
outline: variables.$pagination-focus-outline;
box-shadow: var(--#{variables.$prefix}pagination-focus-box-shadow);
color: var(--#{$prefix}pagination-focus-color);
background-color: var(--#{$prefix}pagination-focus-bg);
outline: $pagination-focus-outline;
box-shadow: var(--#{$prefix}pagination-focus-box-shadow);
}
&.active,
.active > & {
z-index: 3;
color: var(--#{variables.$prefix}pagination-active-color);
@include gradients.gradient-bg(var(--#{variables.$prefix}pagination-active-bg));
border-color: var(--#{variables.$prefix}pagination-active-border-color);
color: var(--#{$prefix}pagination-active-color);
@include gradient-bg(var(--#{$prefix}pagination-active-bg));
border-color: var(--#{$prefix}pagination-active-border-color);
}
&.disabled,
.disabled > & {
color: var(--#{variables.$prefix}pagination-disabled-color);
color: var(--#{$prefix}pagination-disabled-color);
pointer-events: none;
background-color: var(--#{variables.$prefix}pagination-disabled-bg);
border-color: var(--#{variables.$prefix}pagination-disabled-border-color);
background-color: var(--#{$prefix}pagination-disabled-bg);
border-color: var(--#{$prefix}pagination-disabled-border-color);
}
}
.page-item {
&:not(:first-child) .page-link {
margin-left: variables.$pagination-margin-start;
margin-left: $pagination-margin-start;
}
@if variables.$pagination-margin-start == calc(#{variables.$pagination-border-width} * -1) {
@if $pagination-margin-start == calc(#{$pagination-border-width} * -1) {
&:first-child {
.page-link {
@include border-radius.border-start-radius(var(--#{variables.$prefix}pagination-border-radius));
@include border-start-radius(var(--#{$prefix}pagination-border-radius));
}
}
&:last-child {
.page-link {
@include border-radius.border-end-radius(var(--#{variables.$prefix}pagination-border-radius));
@include border-end-radius(var(--#{$prefix}pagination-border-radius));
}
}
} @else {
// Add border-radius to all pageLinks in case they have left margin
.page-link {
@include border-radius.border-radius(var(--#{variables.$prefix}pagination-border-radius));
@include border-radius(var(--#{$prefix}pagination-border-radius));
}
}
}
@ -109,9 +109,9 @@
//
.pagination-lg {
@include pagination.pagination-size(variables.$pagination-padding-y-lg, variables.$pagination-padding-x-lg, variables.$font-size-lg, variables.$pagination-border-radius-lg);
@include pagination-size($pagination-padding-y-lg, $pagination-padding-x-lg, $font-size-lg, $pagination-border-radius-lg);
}
.pagination-sm {
@include pagination.pagination-size(variables.$pagination-padding-y-sm, variables.$pagination-padding-x-sm, variables.$font-size-sm, variables.$pagination-border-radius-sm);
@include pagination-size($pagination-padding-y-sm, $pagination-padding-x-sm, $font-size-sm, $pagination-border-radius-sm);
}

View File

@ -1,4 +1,4 @@
@use "setup/variables";
@use "setup/variables" as *;
.placeholder {
display: inline-block;
@ -6,7 +6,7 @@
vertical-align: middle;
cursor: wait;
background-color: currentcolor;
opacity: variables.$placeholder-opacity-max;
opacity: $placeholder-opacity-max;
&.btn::before {
display: inline-block;
@ -36,12 +36,12 @@
@keyframes placeholder-glow {
50% {
opacity: variables.$placeholder-opacity-min;
opacity: $placeholder-opacity-min;
}
}
.placeholder-wave {
mask-image: linear-gradient(130deg, variables.$black 55%, rgba(0, 0, 0, (1 - variables.$placeholder-opacity-min)) 75%, variables.$black 95%);
mask-image: linear-gradient(130deg, $black 55%, rgba(0, 0, 0, (1 - $placeholder-opacity-min)) 75%, $black 95%);
mask-size: 200% 100%;
animation: placeholder-wave 2s linear infinite;
}

View File

@ -1,52 +1,52 @@
@use "mixins/border-radius";
@use "mixins/box-shadow";
@use "mixins/reset-text";
@use "setup/variables";
@use "vendor/rfs";
@use "mixins/border-radius" as *;
@use "mixins/box-shadow" as *;
@use "mixins/reset-text" as *;
@use "setup/variables" as *;
@use "vendor/rfs" as *;
.popover {
// scss-docs-start popover-css-vars
--#{variables.$prefix}popover-zindex: #{variables.$zindex-popover};
--#{variables.$prefix}popover-max-width: #{variables.$popover-max-width};
@include rfs.rfs(variables.$popover-font-size, --#{variables.$prefix}popover-font-size);
--#{variables.$prefix}popover-bg: #{variables.$popover-bg};
--#{variables.$prefix}popover-border-width: #{variables.$popover-border-width};
--#{variables.$prefix}popover-border-color: #{variables.$popover-border-color};
--#{variables.$prefix}popover-border-radius: #{variables.$popover-border-radius};
--#{variables.$prefix}popover-inner-border-radius: #{variables.$popover-inner-border-radius};
--#{variables.$prefix}popover-box-shadow: #{variables.$popover-box-shadow};
--#{variables.$prefix}popover-header-padding-x: #{variables.$popover-header-padding-x};
--#{variables.$prefix}popover-header-padding-y: #{variables.$popover-header-padding-y};
@include rfs.rfs(variables.$popover-header-font-size, --#{variables.$prefix}popover-header-font-size);
--#{variables.$prefix}popover-header-color: #{variables.$popover-header-color};
--#{variables.$prefix}popover-header-bg: #{variables.$popover-header-bg};
--#{variables.$prefix}popover-body-padding-x: #{variables.$popover-body-padding-x};
--#{variables.$prefix}popover-body-padding-y: #{variables.$popover-body-padding-y};
--#{variables.$prefix}popover-body-color: #{variables.$popover-body-color};
--#{variables.$prefix}popover-arrow-width: #{variables.$popover-arrow-width};
--#{variables.$prefix}popover-arrow-height: #{variables.$popover-arrow-height};
--#{variables.$prefix}popover-arrow-border: var(--#{variables.$prefix}popover-border-color);
--#{$prefix}popover-zindex: #{$zindex-popover};
--#{$prefix}popover-max-width: #{$popover-max-width};
@include rfs($popover-font-size, --#{$prefix}popover-font-size);
--#{$prefix}popover-bg: #{$popover-bg};
--#{$prefix}popover-border-width: #{$popover-border-width};
--#{$prefix}popover-border-color: #{$popover-border-color};
--#{$prefix}popover-border-radius: #{$popover-border-radius};
--#{$prefix}popover-inner-border-radius: #{$popover-inner-border-radius};
--#{$prefix}popover-box-shadow: #{$popover-box-shadow};
--#{$prefix}popover-header-padding-x: #{$popover-header-padding-x};
--#{$prefix}popover-header-padding-y: #{$popover-header-padding-y};
@include rfs($popover-header-font-size, --#{$prefix}popover-header-font-size);
--#{$prefix}popover-header-color: #{$popover-header-color};
--#{$prefix}popover-header-bg: #{$popover-header-bg};
--#{$prefix}popover-body-padding-x: #{$popover-body-padding-x};
--#{$prefix}popover-body-padding-y: #{$popover-body-padding-y};
--#{$prefix}popover-body-color: #{$popover-body-color};
--#{$prefix}popover-arrow-width: #{$popover-arrow-width};
--#{$prefix}popover-arrow-height: #{$popover-arrow-height};
--#{$prefix}popover-arrow-border: var(--#{$prefix}popover-border-color);
// scss-docs-end popover-css-vars
z-index: var(--#{variables.$prefix}popover-zindex);
z-index: var(--#{$prefix}popover-zindex);
display: block;
max-width: var(--#{variables.$prefix}popover-max-width);
max-width: var(--#{$prefix}popover-max-width);
// Our parent element can be arbitrary since tooltips are by default inserted as a sibling of their target element.
// So reset our font and text properties to avoid inheriting weird values.
@include reset-text.reset-text();
@include rfs.font-size(var(--#{variables.$prefix}popover-font-size));
@include reset-text();
@include font-size(var(--#{$prefix}popover-font-size));
// Allow breaking very long words so they don't overflow the popover's bounds
word-wrap: break-word;
background-color: var(--#{variables.$prefix}popover-bg);
background-color: var(--#{$prefix}popover-bg);
background-clip: padding-box;
border: var(--#{variables.$prefix}popover-border-width) solid var(--#{variables.$prefix}popover-border-color);
@include border-radius.border-radius(var(--#{variables.$prefix}popover-border-radius));
@include box-shadow.box-shadow(var(--#{variables.$prefix}popover-box-shadow));
border: var(--#{$prefix}popover-border-width) solid var(--#{$prefix}popover-border-color);
@include border-radius(var(--#{$prefix}popover-border-radius));
@include box-shadow(var(--#{$prefix}popover-box-shadow));
.popover-arrow {
display: block;
width: var(--#{variables.$prefix}popover-arrow-width);
height: var(--#{variables.$prefix}popover-arrow-height);
width: var(--#{$prefix}popover-arrow-width);
height: var(--#{$prefix}popover-arrow-height);
&::before,
&::after {
@ -62,21 +62,21 @@
.bs-popover-top {
> .popover-arrow {
bottom: calc(-1 * (var(--#{variables.$prefix}popover-arrow-height)) - var(--#{variables.$prefix}popover-border-width)); // stylelint-disable-line function-disallowed-list
bottom: calc(-1 * (var(--#{$prefix}popover-arrow-height)) - var(--#{$prefix}popover-border-width)); // stylelint-disable-line function-disallowed-list
&::before,
&::after {
border-width: var(--#{variables.$prefix}popover-arrow-height) calc(var(--#{variables.$prefix}popover-arrow-width) * .5) 0; // stylelint-disable-line function-disallowed-list
border-width: var(--#{$prefix}popover-arrow-height) calc(var(--#{$prefix}popover-arrow-width) * .5) 0; // stylelint-disable-line function-disallowed-list
}
&::before {
bottom: 0;
border-top-color: var(--#{variables.$prefix}popover-arrow-border);
border-top-color: var(--#{$prefix}popover-arrow-border);
}
&::after {
bottom: var(--#{variables.$prefix}popover-border-width);
border-top-color: var(--#{variables.$prefix}popover-bg);
bottom: var(--#{$prefix}popover-border-width);
border-top-color: var(--#{$prefix}popover-bg);
}
}
}
@ -84,23 +84,23 @@
/* rtl:begin:ignore */
.bs-popover-end {
> .popover-arrow {
left: calc(-1 * (var(--#{variables.$prefix}popover-arrow-height)) - var(--#{variables.$prefix}popover-border-width)); // stylelint-disable-line function-disallowed-list
width: var(--#{variables.$prefix}popover-arrow-height);
height: var(--#{variables.$prefix}popover-arrow-width);
left: calc(-1 * (var(--#{$prefix}popover-arrow-height)) - var(--#{$prefix}popover-border-width)); // stylelint-disable-line function-disallowed-list
width: var(--#{$prefix}popover-arrow-height);
height: var(--#{$prefix}popover-arrow-width);
&::before,
&::after {
border-width: calc(var(--#{variables.$prefix}popover-arrow-width) * .5) var(--#{variables.$prefix}popover-arrow-height) calc(var(--#{variables.$prefix}popover-arrow-width) * .5) 0; // stylelint-disable-line function-disallowed-list
border-width: calc(var(--#{$prefix}popover-arrow-width) * .5) var(--#{$prefix}popover-arrow-height) calc(var(--#{$prefix}popover-arrow-width) * .5) 0; // stylelint-disable-line function-disallowed-list
}
&::before {
left: 0;
border-right-color: var(--#{variables.$prefix}popover-arrow-border);
border-right-color: var(--#{$prefix}popover-arrow-border);
}
&::after {
left: var(--#{variables.$prefix}popover-border-width);
border-right-color: var(--#{variables.$prefix}popover-bg);
left: var(--#{$prefix}popover-border-width);
border-right-color: var(--#{$prefix}popover-bg);
}
}
}
@ -109,21 +109,21 @@
.bs-popover-bottom {
> .popover-arrow {
top: calc(-1 * (var(--#{variables.$prefix}popover-arrow-height)) - var(--#{variables.$prefix}popover-border-width)); // stylelint-disable-line function-disallowed-list
top: calc(-1 * (var(--#{$prefix}popover-arrow-height)) - var(--#{$prefix}popover-border-width)); // stylelint-disable-line function-disallowed-list
&::before,
&::after {
border-width: 0 calc(var(--#{variables.$prefix}popover-arrow-width) * .5) var(--#{variables.$prefix}popover-arrow-height); // stylelint-disable-line function-disallowed-list
border-width: 0 calc(var(--#{$prefix}popover-arrow-width) * .5) var(--#{$prefix}popover-arrow-height); // stylelint-disable-line function-disallowed-list
}
&::before {
top: 0;
border-bottom-color: var(--#{variables.$prefix}popover-arrow-border);
border-bottom-color: var(--#{$prefix}popover-arrow-border);
}
&::after {
top: var(--#{variables.$prefix}popover-border-width);
border-bottom-color: var(--#{variables.$prefix}popover-bg);
top: var(--#{$prefix}popover-border-width);
border-bottom-color: var(--#{$prefix}popover-bg);
}
}
@ -133,33 +133,33 @@
top: 0;
left: 50%;
display: block;
width: var(--#{variables.$prefix}popover-arrow-width);
margin-left: calc(-.5 * var(--#{variables.$prefix}popover-arrow-width)); // stylelint-disable-line function-disallowed-list
width: var(--#{$prefix}popover-arrow-width);
margin-left: calc(-.5 * var(--#{$prefix}popover-arrow-width)); // stylelint-disable-line function-disallowed-list
content: "";
border-bottom: var(--#{variables.$prefix}popover-border-width) solid var(--#{variables.$prefix}popover-header-bg);
border-bottom: var(--#{$prefix}popover-border-width) solid var(--#{$prefix}popover-header-bg);
}
}
/* rtl:begin:ignore */
.bs-popover-start {
> .popover-arrow {
right: calc(-1 * (var(--#{variables.$prefix}popover-arrow-height)) - var(--#{variables.$prefix}popover-border-width)); // stylelint-disable-line function-disallowed-list
width: var(--#{variables.$prefix}popover-arrow-height);
height: var(--#{variables.$prefix}popover-arrow-width);
right: calc(-1 * (var(--#{$prefix}popover-arrow-height)) - var(--#{$prefix}popover-border-width)); // stylelint-disable-line function-disallowed-list
width: var(--#{$prefix}popover-arrow-height);
height: var(--#{$prefix}popover-arrow-width);
&::before,
&::after {
border-width: calc(var(--#{variables.$prefix}popover-arrow-width) * .5) 0 calc(var(--#{variables.$prefix}popover-arrow-width) * .5) var(--#{variables.$prefix}popover-arrow-height); // stylelint-disable-line function-disallowed-list
border-width: calc(var(--#{$prefix}popover-arrow-width) * .5) 0 calc(var(--#{$prefix}popover-arrow-width) * .5) var(--#{$prefix}popover-arrow-height); // stylelint-disable-line function-disallowed-list
}
&::before {
right: 0;
border-left-color: var(--#{variables.$prefix}popover-arrow-border);
border-left-color: var(--#{$prefix}popover-arrow-border);
}
&::after {
right: var(--#{variables.$prefix}popover-border-width);
border-left-color: var(--#{variables.$prefix}popover-bg);
right: var(--#{$prefix}popover-border-width);
border-left-color: var(--#{$prefix}popover-bg);
}
}
}
@ -183,13 +183,13 @@
// Offset the popover to account for the popover arrow
.popover-header {
padding: var(--#{variables.$prefix}popover-header-padding-y) var(--#{variables.$prefix}popover-header-padding-x);
padding: var(--#{$prefix}popover-header-padding-y) var(--#{$prefix}popover-header-padding-x);
margin-bottom: 0; // Reset the default from Reboot
@include rfs.font-size(var(--#{variables.$prefix}popover-header-font-size));
color: var(--#{variables.$prefix}popover-header-color);
background-color: var(--#{variables.$prefix}popover-header-bg);
border-bottom: var(--#{variables.$prefix}popover-border-width) solid var(--#{variables.$prefix}popover-border-color);
@include border-radius.border-top-radius(var(--#{variables.$prefix}popover-inner-border-radius));
@include font-size(var(--#{$prefix}popover-header-font-size));
color: var(--#{$prefix}popover-header-color);
background-color: var(--#{$prefix}popover-header-bg);
border-bottom: var(--#{$prefix}popover-border-width) solid var(--#{$prefix}popover-border-color);
@include border-top-radius(var(--#{$prefix}popover-inner-border-radius));
&:empty {
display: none;
@ -197,6 +197,6 @@
}
.popover-body {
padding: var(--#{variables.$prefix}popover-body-padding-y) var(--#{variables.$prefix}popover-body-padding-x);
color: var(--#{variables.$prefix}popover-body-color);
padding: var(--#{$prefix}popover-body-padding-y) var(--#{$prefix}popover-body-padding-x);
color: var(--#{$prefix}popover-body-color);
}

View File

@ -1,16 +1,16 @@
@use "mixins/border-radius";
@use "mixins/box-shadow";
@use "mixins/gradients";
@use "mixins/transition";
@use "setup/variables";
@use "vendor/rfs";
@use "mixins/border-radius" as *;
@use "mixins/box-shadow" as *;
@use "mixins/gradients" as *;
@use "mixins/transition" as *;
@use "setup/variables" as *;
@use "vendor/rfs" as *;
// Disable animation if transitions are disabled
// scss-docs-start progress-keyframes
@if variables.$enable-transitions {
@if $enable-transitions {
@keyframes progress-bar-stripes {
0% { background-position-x: variables.$progress-height; }
0% { background-position-x: $progress-height; }
}
}
// scss-docs-end progress-keyframes
@ -18,23 +18,23 @@
.progress,
.progress-stacked {
// scss-docs-start progress-css-vars
--#{variables.$prefix}progress-height: #{variables.$progress-height};
@include rfs.rfs(variables.$progress-font-size, --#{variables.$prefix}progress-font-size);
--#{variables.$prefix}progress-bg: #{variables.$progress-bg};
--#{variables.$prefix}progress-border-radius: #{variables.$progress-border-radius};
--#{variables.$prefix}progress-box-shadow: #{variables.$progress-box-shadow};
--#{variables.$prefix}progress-bar-color: #{variables.$progress-bar-color};
--#{variables.$prefix}progress-bar-bg: #{variables.$progress-bar-bg};
--#{variables.$prefix}progress-bar-transition: #{variables.$progress-bar-transition};
--#{$prefix}progress-height: #{$progress-height};
@include rfs($progress-font-size, --#{$prefix}progress-font-size);
--#{$prefix}progress-bg: #{$progress-bg};
--#{$prefix}progress-border-radius: #{$progress-border-radius};
--#{$prefix}progress-box-shadow: #{$progress-box-shadow};
--#{$prefix}progress-bar-color: #{$progress-bar-color};
--#{$prefix}progress-bar-bg: #{$progress-bar-bg};
--#{$prefix}progress-bar-transition: #{$progress-bar-transition};
// scss-docs-end progress-css-vars
display: flex;
height: var(--#{variables.$prefix}progress-height);
height: var(--#{$prefix}progress-height);
overflow: hidden; // force rounded corners by cropping it
@include rfs.font-size(var(--#{variables.$prefix}progress-font-size));
background-color: var(--#{variables.$prefix}progress-bg);
@include border-radius.border-radius(var(--#{variables.$prefix}progress-border-radius));
@include box-shadow.box-shadow(var(--#{variables.$prefix}progress-box-shadow));
@include font-size(var(--#{$prefix}progress-font-size));
background-color: var(--#{$prefix}progress-bg);
@include border-radius(var(--#{$prefix}progress-border-radius));
@include box-shadow(var(--#{$prefix}progress-box-shadow));
}
.progress-bar {
@ -42,16 +42,16 @@
flex-direction: column;
justify-content: center;
overflow: hidden;
color: var(--#{variables.$prefix}progress-bar-color);
color: var(--#{$prefix}progress-bar-color);
text-align: center;
white-space: nowrap;
background-color: var(--#{variables.$prefix}progress-bar-bg);
@include transition.transition(var(--#{variables.$prefix}progress-bar-transition));
background-color: var(--#{$prefix}progress-bar-bg);
@include transition(var(--#{$prefix}progress-bar-transition));
}
.progress-bar-striped {
@include gradients.gradient-striped();
background-size: var(--#{variables.$prefix}progress-height) var(--#{variables.$prefix}progress-height);
@include gradient-striped();
background-size: var(--#{$prefix}progress-height) var(--#{$prefix}progress-height);
}
.progress-stacked > .progress {
@ -62,11 +62,11 @@
width: 100%;
}
@if variables.$enable-transitions {
@if $enable-transitions {
.progress-bar-animated {
animation: variables.$progress-bar-animation-timing progress-bar-stripes;
animation: $progress-bar-animation-timing progress-bar-stripes;
@if variables.$enable-reduced-motion {
@if $enable-reduced-motion {
@media (prefers-reduced-motion: reduce) {
animation: none;
}

View File

@ -1,6 +1,6 @@
@use "mixins/border-radius";
@use "setup/variables";
@use "vendor/rfs";
@use "mixins/border-radius" as *;
@use "setup/variables" as *;
@use "vendor/rfs" as *;
// stylelint-disable declaration-no-important, selector-no-qualifying-type, property-no-vendor-prefix
@ -30,11 +30,11 @@
// null by default, thus nothing is generated.
:root {
@if variables.$font-size-root != null {
@include rfs.font-size(var(--#{variables.$prefix}root-font-size));
@if $font-size-root != null {
@include font-size(var(--#{$prefix}root-font-size));
}
@if variables.$enable-smooth-scroll {
@if $enable-smooth-scroll {
@media (prefers-reduced-motion: no-preference) {
scroll-behavior: smooth;
}
@ -52,15 +52,15 @@
// scss-docs-start reboot-body-rules
body {
margin: 0; // 1
font-family: var(--#{variables.$prefix}body-font-family);
@include rfs.font-size(var(--#{variables.$prefix}body-font-size));
font-weight: var(--#{variables.$prefix}body-font-weight);
line-height: var(--#{variables.$prefix}body-line-height);
color: var(--#{variables.$prefix}body-color);
text-align: var(--#{variables.$prefix}body-text-align);
background-color: var(--#{variables.$prefix}body-bg); // 2
font-family: var(--#{$prefix}body-font-family);
@include font-size(var(--#{$prefix}body-font-size));
font-weight: var(--#{$prefix}body-font-weight);
line-height: var(--#{$prefix}body-line-height);
color: var(--#{$prefix}body-color);
text-align: var(--#{$prefix}body-text-align);
background-color: var(--#{$prefix}body-bg); // 2
-webkit-text-size-adjust: 100%; // 3
-webkit-tap-highlight-color: rgba(variables.$black, 0); // 4
-webkit-tap-highlight-color: rgba($black, 0); // 4
}
// scss-docs-end reboot-body-rules
@ -70,11 +70,11 @@ body {
// 1. Reset Firefox's gray color
hr {
margin: variables.$hr-margin-y 0;
color: variables.$hr-color; // 1
margin: $hr-margin-y 0;
color: $hr-color; // 1
border: 0;
border-top: variables.$hr-border-width solid variables.$hr-border-color;
opacity: variables.$hr-opacity;
border-top: $hr-border-width solid $hr-border-color;
opacity: $hr-opacity;
}
@ -86,42 +86,42 @@ hr {
%heading {
margin-top: 0; // 1
margin-bottom: variables.$headings-margin-bottom;
font-family: variables.$headings-font-family;
font-style: variables.$headings-font-style;
font-weight: variables.$headings-font-weight;
line-height: variables.$headings-line-height;
color: var(--#{variables.$prefix}heading-color);
margin-bottom: $headings-margin-bottom;
font-family: $headings-font-family;
font-style: $headings-font-style;
font-weight: $headings-font-weight;
line-height: $headings-line-height;
color: var(--#{$prefix}heading-color);
}
h1 {
@extend %heading;
@include rfs.font-size(variables.$h1-font-size);
@include font-size($h1-font-size);
}
h2 {
@extend %heading;
@include rfs.font-size(variables.$h2-font-size);
@include font-size($h2-font-size);
}
h3 {
@extend %heading;
@include rfs.font-size(variables.$h3-font-size);
@include font-size($h3-font-size);
}
h4 {
@extend %heading;
@include rfs.font-size(variables.$h4-font-size);
@include font-size($h4-font-size);
}
h5 {
@extend %heading;
@include rfs.font-size(variables.$h5-font-size);
@include font-size($h5-font-size);
}
h6 {
@extend %heading;
@include rfs.font-size(variables.$h6-font-size);
@include font-size($h6-font-size);
}
@ -132,7 +132,7 @@ h6 {
p {
margin-top: 0;
margin-bottom: variables.$paragraph-margin-bottom;
margin-bottom: $paragraph-margin-bottom;
}
@ -180,7 +180,7 @@ ul ol {
}
dt {
font-weight: variables.$dt-font-weight;
font-weight: $dt-font-weight;
}
// 1. Undo browser default
@ -204,7 +204,7 @@ blockquote {
b,
strong {
font-weight: variables.$font-weight-bolder;
font-weight: $font-weight-bolder;
}
@ -213,16 +213,16 @@ strong {
// Add the correct font size in all browsers
small {
@include rfs.font-size(variables.$small-font-size);
@include font-size($small-font-size);
}
// Mark
mark {
padding: variables.$mark-padding;
color: var(--#{variables.$prefix}highlight-color);
background-color: var(--#{variables.$prefix}highlight-bg);
padding: $mark-padding;
color: var(--#{$prefix}highlight-color);
background-color: var(--#{$prefix}highlight-bg);
}
@ -234,7 +234,7 @@ mark {
sub,
sup {
position: relative;
@include rfs.font-size(variables.$sub-sup-font-size);
@include font-size($sub-sup-font-size);
line-height: 0;
vertical-align: baseline;
}
@ -246,12 +246,12 @@ sup { top: -.5em; }
// Links
a {
color: rgba(var(--#{variables.$prefix}link-color-rgb), var(--#{variables.$prefix}link-opacity, 1));
text-decoration: variables.$link-decoration;
color: rgba(var(--#{$prefix}link-color-rgb), var(--#{$prefix}link-opacity, 1));
text-decoration: $link-decoration;
&:hover {
--#{variables.$prefix}link-color-rgb: var(--#{variables.$prefix}link-hover-color-rgb);
text-decoration: variables.$link-hover-decoration;
--#{$prefix}link-color-rgb: var(--#{$prefix}link-hover-color-rgb);
text-decoration: $link-hover-decoration;
}
}
@ -275,8 +275,8 @@ pre,
code,
kbd,
samp {
font-family: variables.$font-family-code;
@include rfs.font-size(1em); // Correct the odd `em` font sizing in all browsers.
font-family: $font-family-code;
@include font-size(1em); // Correct the odd `em` font sizing in all browsers.
}
// 1. Remove browser default top margin
@ -288,20 +288,20 @@ pre {
margin-top: 0; // 1
margin-bottom: 1rem; // 2
overflow: auto; // 3
@include rfs.font-size(variables.$code-font-size);
color: variables.$pre-color;
@include font-size($code-font-size);
color: $pre-color;
// Account for some code outputs that place code tags in pre tags
code {
@include rfs.font-size(inherit);
@include font-size(inherit);
color: inherit;
word-break: normal;
}
}
code {
@include rfs.font-size(variables.$code-font-size);
color: var(--#{variables.$prefix}code-color);
@include font-size($code-font-size);
color: var(--#{$prefix}code-color);
word-wrap: break-word;
// Streamline the style when inside anchors to avoid broken underline and more
@ -311,16 +311,16 @@ code {
}
kbd {
padding: variables.$kbd-padding-y variables.$kbd-padding-x;
@include rfs.font-size(variables.$kbd-font-size);
color: variables.$kbd-color;
background-color: variables.$kbd-bg;
@include border-radius.border-radius(variables.$border-radius-sm);
padding: $kbd-padding-y $kbd-padding-x;
@include font-size($kbd-font-size);
color: $kbd-color;
background-color: $kbd-bg;
@include border-radius($border-radius-sm);
kbd {
padding: 0;
@include rfs.font-size(1em);
font-weight: variables.$nested-kbd-font-weight;
@include font-size(1em);
font-weight: $nested-kbd-font-weight;
}
}
@ -352,9 +352,9 @@ table {
}
caption {
padding-top: variables.$table-cell-padding-y;
padding-bottom: variables.$table-cell-padding-y;
color: variables.$table-caption-color;
padding-top: $table-cell-padding-y;
padding-bottom: $table-cell-padding-y;
color: $table-caption-color;
text-align: left;
}
@ -363,7 +363,7 @@ caption {
// 3. Fix alignment for Safari
th {
font-weight: variables.$table-th-font-weight; // 1
font-weight: $table-th-font-weight; // 1
text-align: inherit; // 2
text-align: -webkit-match-parent; // 3
}
@ -414,7 +414,7 @@ optgroup,
textarea {
margin: 0; // 1
font-family: inherit;
@include rfs.font-size(inherit);
@include font-size(inherit);
line-height: inherit;
}
@ -459,7 +459,7 @@ button,
[type="submit"] {
-webkit-appearance: button; // 2
@if variables.$enable-button-pointers {
@if $enable-button-pointers {
&:not(:disabled) {
cursor: pointer; // 3
}
@ -502,10 +502,10 @@ legend {
float: left; // 1
width: 100%;
padding: 0;
margin-bottom: variables.$legend-margin-bottom;
font-weight: variables.$legend-font-weight;
margin-bottom: $legend-margin-bottom;
font-weight: $legend-font-weight;
line-height: inherit;
@include rfs.font-size(variables.$legend-font-size);
@include font-size($legend-font-size);
+ * {
clear: left; // 2

View File

@ -135,7 +135,9 @@
}
@if $enable-dark-mode {
@include color-mode(dark, true) {
@debug('--------------------------');
@include color-mode(dark, true, $color-mode-type) {
// @include color-mode(dark, true) {
color-scheme: dark;
// scss-docs-start root-dark-mode-vars

View File

@ -1,4 +1,4 @@
@use "setup/variables";
@use "setup/variables" as *;
//
// Rotating border
@ -7,12 +7,12 @@
.spinner-grow,
.spinner-border {
display: inline-block;
width: var(--#{variables.$prefix}spinner-width);
height: var(--#{variables.$prefix}spinner-height);
vertical-align: var(--#{variables.$prefix}spinner-vertical-align);
width: var(--#{$prefix}spinner-width);
height: var(--#{$prefix}spinner-height);
vertical-align: var(--#{$prefix}spinner-vertical-align);
// stylelint-disable-next-line property-disallowed-list
border-radius: 50%;
animation: var(--#{variables.$prefix}spinner-animation-speed) linear infinite var(--#{variables.$prefix}spinner-animation-name);
animation: var(--#{$prefix}spinner-animation-speed) linear infinite var(--#{$prefix}spinner-animation-name);
}
// scss-docs-start spinner-border-keyframes
@ -23,23 +23,23 @@
.spinner-border {
// scss-docs-start spinner-border-css-vars
--#{variables.$prefix}spinner-width: #{variables.$spinner-width};
--#{variables.$prefix}spinner-height: #{variables.$spinner-height};
--#{variables.$prefix}spinner-vertical-align: #{variables.$spinner-vertical-align};
--#{variables.$prefix}spinner-border-width: #{variables.$spinner-border-width};
--#{variables.$prefix}spinner-animation-speed: #{variables.$spinner-animation-speed};
--#{variables.$prefix}spinner-animation-name: spinner-border;
--#{$prefix}spinner-width: #{$spinner-width};
--#{$prefix}spinner-height: #{$spinner-height};
--#{$prefix}spinner-vertical-align: #{$spinner-vertical-align};
--#{$prefix}spinner-border-width: #{$spinner-border-width};
--#{$prefix}spinner-animation-speed: #{$spinner-animation-speed};
--#{$prefix}spinner-animation-name: spinner-border;
// scss-docs-end spinner-border-css-vars
border: var(--#{variables.$prefix}spinner-border-width) solid currentcolor;
border: var(--#{$prefix}spinner-border-width) solid currentcolor;
border-right-color: transparent;
}
.spinner-border-sm {
// scss-docs-start spinner-border-sm-css-vars
--#{variables.$prefix}spinner-width: #{variables.$spinner-width-sm};
--#{variables.$prefix}spinner-height: #{variables.$spinner-height-sm};
--#{variables.$prefix}spinner-border-width: #{variables.$spinner-border-width-sm};
--#{$prefix}spinner-width: #{$spinner-width-sm};
--#{$prefix}spinner-height: #{$spinner-height-sm};
--#{$prefix}spinner-border-width: #{$spinner-border-width-sm};
// scss-docs-end spinner-border-sm-css-vars
}
@ -61,11 +61,11 @@
.spinner-grow {
// scss-docs-start spinner-grow-css-vars
--#{variables.$prefix}spinner-width: #{variables.$spinner-width};
--#{variables.$prefix}spinner-height: #{variables.$spinner-height};
--#{variables.$prefix}spinner-vertical-align: #{variables.$spinner-vertical-align};
--#{variables.$prefix}spinner-animation-speed: #{variables.$spinner-animation-speed};
--#{variables.$prefix}spinner-animation-name: spinner-grow;
--#{$prefix}spinner-width: #{$spinner-width};
--#{$prefix}spinner-height: #{$spinner-height};
--#{$prefix}spinner-vertical-align: #{$spinner-vertical-align};
--#{$prefix}spinner-animation-speed: #{$spinner-animation-speed};
--#{$prefix}spinner-animation-name: spinner-grow;
// scss-docs-end spinner-grow-css-vars
background-color: currentcolor;
@ -73,15 +73,15 @@
}
.spinner-grow-sm {
--#{variables.$prefix}spinner-width: #{variables.$spinner-width-sm};
--#{variables.$prefix}spinner-height: #{variables.$spinner-height-sm};
--#{$prefix}spinner-width: #{$spinner-width-sm};
--#{$prefix}spinner-height: #{$spinner-height-sm};
}
@if variables.$enable-reduced-motion {
@if $enable-reduced-motion {
@media (prefers-reduced-motion: reduce) {
.spinner-border,
.spinner-grow {
--#{variables.$prefix}spinner-animation-speed: #{variables.$spinner-animation-speed * 2};
--#{$prefix}spinner-animation-speed: #{$spinner-animation-speed * 2};
}
}
}

View File

@ -1,7 +1,7 @@
@use "sass:map";
@use "mixins/breakpoints";
@use "mixins/table-variants";
@use "setup/variables";
@use "mixins/breakpoints" as *;
@use "mixins/table-variants" as *;
@use "setup/variables" as *;
//
// Basic Bootstrap table
@ -9,26 +9,26 @@
.table {
// Reset needed for nesting tables
--#{variables.$prefix}table-color-type: initial;
--#{variables.$prefix}table-bg-type: initial;
--#{variables.$prefix}table-color-state: initial;
--#{variables.$prefix}table-bg-state: initial;
--#{$prefix}table-color-type: initial;
--#{$prefix}table-bg-type: initial;
--#{$prefix}table-color-state: initial;
--#{$prefix}table-bg-state: initial;
// End of reset
--#{variables.$prefix}table-color: #{variables.$table-color};
--#{variables.$prefix}table-bg: #{variables.$table-bg};
--#{variables.$prefix}table-border-color: #{variables.$table-border-color};
--#{variables.$prefix}table-accent-bg: #{variables.$table-accent-bg};
--#{variables.$prefix}table-striped-color: #{variables.$table-striped-color};
--#{variables.$prefix}table-striped-bg: #{variables.$table-striped-bg};
--#{variables.$prefix}table-active-color: #{variables.$table-active-color};
--#{variables.$prefix}table-active-bg: #{variables.$table-active-bg};
--#{variables.$prefix}table-hover-color: #{variables.$table-hover-color};
--#{variables.$prefix}table-hover-bg: #{variables.$table-hover-bg};
--#{$prefix}table-color: #{$table-color};
--#{$prefix}table-bg: #{$table-bg};
--#{$prefix}table-border-color: #{$table-border-color};
--#{$prefix}table-accent-bg: #{$table-accent-bg};
--#{$prefix}table-striped-color: #{$table-striped-color};
--#{$prefix}table-striped-bg: #{$table-striped-bg};
--#{$prefix}table-active-color: #{$table-active-color};
--#{$prefix}table-active-bg: #{$table-active-bg};
--#{$prefix}table-hover-color: #{$table-hover-color};
--#{$prefix}table-hover-bg: #{$table-hover-bg};
width: 100%;
margin-bottom: variables.$spacer;
vertical-align: variables.$table-cell-vertical-align;
border-color: var(--#{variables.$prefix}table-border-color);
margin-bottom: $spacer;
vertical-align: $table-cell-vertical-align;
border-color: var(--#{$prefix}table-border-color);
// Target th & td
// We need the child combinator to prevent styles leaking to nested tables which doesn't have a `.table` class.
@ -36,12 +36,12 @@
// Another advantage is that this generates less code and makes the selector less specific making it easier to override.
// stylelint-disable-next-line selector-max-universal
> :not(caption) > * > * {
padding: variables.$table-cell-padding-y variables.$table-cell-padding-x;
padding: $table-cell-padding-y $table-cell-padding-x;
// Following the precept of cascades: https://codepen.io/miriamsuzanne/full/vYNgodb
color: var(--#{variables.$prefix}table-color-state, var(--#{variables.$prefix}table-color-type, var(--#{variables.$prefix}table-color)));
background-color: var(--#{variables.$prefix}table-bg);
border-bottom-width: variables.$table-border-width;
box-shadow: inset 0 0 0 9999px var(--#{variables.$prefix}table-bg-state, var(--#{variables.$prefix}table-bg-type, var(--#{variables.$prefix}table-accent-bg)));
color: var(--#{$prefix}table-color-state, var(--#{$prefix}table-color-type, var(--#{$prefix}table-color)));
background-color: var(--#{$prefix}table-bg);
border-bottom-width: $table-border-width;
box-shadow: inset 0 0 0 9999px var(--#{$prefix}table-bg-state, var(--#{$prefix}table-bg-type, var(--#{$prefix}table-accent-bg)));
}
> tbody {
@ -54,7 +54,7 @@
}
.table-group-divider {
border-top: calc(#{variables.$table-border-width} * 2) solid variables.$table-group-separator-color; // stylelint-disable-line function-disallowed-list
border-top: calc(#{$table-border-width} * 2) solid $table-group-separator-color; // stylelint-disable-line function-disallowed-list
}
//
@ -73,7 +73,7 @@
.table-sm {
// stylelint-disable-next-line selector-max-universal
> :not(caption) > * > * {
padding: variables.$table-cell-padding-y-sm variables.$table-cell-padding-x-sm;
padding: $table-cell-padding-y-sm $table-cell-padding-x-sm;
}
}
@ -89,11 +89,11 @@
.table-bordered {
> :not(caption) > * {
border-width: variables.$table-border-width 0;
border-width: $table-border-width 0;
// stylelint-disable-next-line selector-max-universal
> * {
border-width: 0 variables.$table-border-width;
border-width: 0 $table-border-width;
}
}
}
@ -115,17 +115,17 @@
// For rows
.table-striped {
> tbody > tr:nth-of-type(#{variables.$table-striped-order}) > * {
--#{variables.$prefix}table-color-type: var(--#{variables.$prefix}table-striped-color);
--#{variables.$prefix}table-bg-type: var(--#{variables.$prefix}table-striped-bg);
> tbody > tr:nth-of-type(#{$table-striped-order}) > * {
--#{$prefix}table-color-type: var(--#{$prefix}table-striped-color);
--#{$prefix}table-bg-type: var(--#{$prefix}table-striped-bg);
}
}
// For columns
.table-striped-columns {
> :not(caption) > tr > :nth-child(#{variables.$table-striped-columns-order}) {
--#{variables.$prefix}table-color-type: var(--#{variables.$prefix}table-striped-color);
--#{variables.$prefix}table-bg-type: var(--#{variables.$prefix}table-striped-bg);
> :not(caption) > tr > :nth-child(#{$table-striped-columns-order}) {
--#{$prefix}table-color-type: var(--#{$prefix}table-striped-color);
--#{$prefix}table-bg-type: var(--#{$prefix}table-striped-bg);
}
}
@ -134,8 +134,8 @@
// The `.table-active` class can be added to highlight rows or cells
.table-active {
--#{variables.$prefix}table-color-state: var(--#{variables.$prefix}table-active-color);
--#{variables.$prefix}table-bg-state: var(--#{variables.$prefix}table-active-bg);
--#{$prefix}table-color-state: var(--#{$prefix}table-active-color);
--#{$prefix}table-bg-state: var(--#{$prefix}table-active-bg);
}
// Hover effect
@ -144,8 +144,8 @@
.table-hover {
> tbody > tr:hover > * {
--#{variables.$prefix}table-color-state: var(--#{variables.$prefix}table-hover-color);
--#{variables.$prefix}table-bg-state: var(--#{variables.$prefix}table-hover-bg);
--#{$prefix}table-color-state: var(--#{$prefix}table-hover-color);
--#{$prefix}table-bg-state: var(--#{$prefix}table-hover-bg);
}
}
@ -155,8 +155,8 @@
// Table variants set the table cell backgrounds, border colors
// and the colors of the striped, hovered & active tables
@each $color, $value in variables.$table-variants {
@include table-variants.table-variant($color, $value);
@each $color, $value in $table-variants {
@include table-variant($color, $value);
}
// Responsive tables
@ -164,10 +164,10 @@
// Generate series of `.table-responsive-*` classes for configuring the screen
// size of where your table will overflow.
@each $breakpoint in map.keys(variables.$grid-breakpoints) {
$infix: breakpoints.breakpoint-infix($breakpoint, variables.$grid-breakpoints);
@each $breakpoint in map.keys($grid-breakpoints) {
$infix: breakpoint-infix($breakpoint, $grid-breakpoints);
@include breakpoints.media-breakpoint-down($breakpoint) {
@include media-breakpoint-down($breakpoint) {
.table-responsive#{$infix} {
overflow-x: auto;
-webkit-overflow-scrolling: touch;

View File

@ -1,36 +1,36 @@
@use "mixins/border-radius";
@use "setup/variables";
@use "vendor/rfs";
@use "mixins/border-radius" as *;
@use "setup/variables" as *;
@use "vendor/rfs" as *;
.toast {
// scss-docs-start toast-css-vars
--#{variables.$prefix}toast-zindex: #{variables.$zindex-toast};
--#{variables.$prefix}toast-padding-x: #{variables.$toast-padding-x};
--#{variables.$prefix}toast-padding-y: #{variables.$toast-padding-y};
--#{variables.$prefix}toast-spacing: #{variables.$toast-spacing};
--#{variables.$prefix}toast-max-width: #{variables.$toast-max-width};
@include rfs.rfs(variables.$toast-font-size, --#{variables.$prefix}toast-font-size);
--#{variables.$prefix}toast-color: #{variables.$toast-color};
--#{variables.$prefix}toast-bg: #{variables.$toast-background-color};
--#{variables.$prefix}toast-border-width: #{variables.$toast-border-width};
--#{variables.$prefix}toast-border-color: #{variables.$toast-border-color};
--#{variables.$prefix}toast-border-radius: #{variables.$toast-border-radius};
--#{variables.$prefix}toast-box-shadow: #{variables.$toast-box-shadow};
--#{variables.$prefix}toast-header-color: #{variables.$toast-header-color};
--#{variables.$prefix}toast-header-bg: #{variables.$toast-header-background-color};
--#{variables.$prefix}toast-header-border-color: #{variables.$toast-header-border-color};
--#{$prefix}toast-zindex: #{$zindex-toast};
--#{$prefix}toast-padding-x: #{$toast-padding-x};
--#{$prefix}toast-padding-y: #{$toast-padding-y};
--#{$prefix}toast-spacing: #{$toast-spacing};
--#{$prefix}toast-max-width: #{$toast-max-width};
@include rfs($toast-font-size, --#{$prefix}toast-font-size);
--#{$prefix}toast-color: #{$toast-color};
--#{$prefix}toast-bg: #{$toast-background-color};
--#{$prefix}toast-border-width: #{$toast-border-width};
--#{$prefix}toast-border-color: #{$toast-border-color};
--#{$prefix}toast-border-radius: #{$toast-border-radius};
--#{$prefix}toast-box-shadow: #{$toast-box-shadow};
--#{$prefix}toast-header-color: #{$toast-header-color};
--#{$prefix}toast-header-bg: #{$toast-header-background-color};
--#{$prefix}toast-header-border-color: #{$toast-header-border-color};
// scss-docs-end toast-css-vars
width: var(--#{variables.$prefix}toast-max-width);
width: var(--#{$prefix}toast-max-width);
max-width: 100%;
@include rfs.font-size(var(--#{variables.$prefix}toast-font-size));
color: var(--#{variables.$prefix}toast-color);
@include font-size(var(--#{$prefix}toast-font-size));
color: var(--#{$prefix}toast-color);
pointer-events: auto;
background-color: var(--#{variables.$prefix}toast-bg);
background-color: var(--#{$prefix}toast-bg);
background-clip: padding-box;
border: var(--#{variables.$prefix}toast-border-width) solid var(--#{variables.$prefix}toast-border-color);
box-shadow: var(--#{variables.$prefix}toast-box-shadow);
@include border-radius.border-radius(var(--#{variables.$prefix}toast-border-radius));
border: var(--#{$prefix}toast-border-width) solid var(--#{$prefix}toast-border-color);
box-shadow: var(--#{$prefix}toast-box-shadow);
@include border-radius(var(--#{$prefix}toast-border-radius));
&.showing {
opacity: 0;
@ -42,36 +42,36 @@
}
.toast-container {
--#{variables.$prefix}toast-zindex: #{variables.$zindex-toast};
--#{$prefix}toast-zindex: #{$zindex-toast};
position: absolute;
z-index: var(--#{variables.$prefix}toast-zindex);
z-index: var(--#{$prefix}toast-zindex);
width: max-content;
max-width: 100%;
pointer-events: none;
> :not(:last-child) {
margin-bottom: var(--#{variables.$prefix}toast-spacing);
margin-bottom: var(--#{$prefix}toast-spacing);
}
}
.toast-header {
display: flex;
align-items: center;
padding: var(--#{variables.$prefix}toast-padding-y) var(--#{variables.$prefix}toast-padding-x);
color: var(--#{variables.$prefix}toast-header-color);
background-color: var(--#{variables.$prefix}toast-header-bg);
padding: var(--#{$prefix}toast-padding-y) var(--#{$prefix}toast-padding-x);
color: var(--#{$prefix}toast-header-color);
background-color: var(--#{$prefix}toast-header-bg);
background-clip: padding-box;
border-bottom: var(--#{variables.$prefix}toast-border-width) solid var(--#{variables.$prefix}toast-header-border-color);
@include border-radius.border-top-radius(calc(var(--#{variables.$prefix}toast-border-radius) - var(--#{variables.$prefix}toast-border-width)));
border-bottom: var(--#{$prefix}toast-border-width) solid var(--#{$prefix}toast-header-border-color);
@include border-top-radius(calc(var(--#{$prefix}toast-border-radius) - var(--#{$prefix}toast-border-width)));
.btn-close {
margin-right: calc(-.5 * var(--#{variables.$prefix}toast-padding-x)); // stylelint-disable-line function-disallowed-list
margin-left: var(--#{variables.$prefix}toast-padding-x);
margin-right: calc(-.5 * var(--#{$prefix}toast-padding-x)); // stylelint-disable-line function-disallowed-list
margin-left: var(--#{$prefix}toast-padding-x);
}
}
.toast-body {
padding: var(--#{variables.$prefix}toast-padding-x);
padding: var(--#{$prefix}toast-padding-x);
word-wrap: break-word;
}

View File

@ -1,44 +1,44 @@
@use "mixins/border-radius";
@use "mixins/deprecate";
@use "mixins/reset-text";
@use "setup/variables";
@use "vendor/rfs";
@use "mixins/border-radius" as *;
@use "mixins/deprecate" as *;
@use "mixins/reset-text" as *;
@use "setup/variables" as *;
@use "vendor/rfs" as *;
// Base class
.tooltip {
// scss-docs-start tooltip-css-vars
--#{variables.$prefix}tooltip-zindex: #{variables.$zindex-tooltip};
--#{variables.$prefix}tooltip-max-width: #{variables.$tooltip-max-width};
--#{variables.$prefix}tooltip-padding-x: #{variables.$tooltip-padding-x};
--#{variables.$prefix}tooltip-padding-y: #{variables.$tooltip-padding-y};
--#{variables.$prefix}tooltip-margin: #{variables.$tooltip-margin};
@include rfs.rfs(variables.$tooltip-font-size, --#{variables.$prefix}tooltip-font-size);
--#{variables.$prefix}tooltip-color: #{variables.$tooltip-color};
--#{variables.$prefix}tooltip-bg: #{variables.$tooltip-bg};
--#{variables.$prefix}tooltip-border-radius: #{variables.$tooltip-border-radius};
--#{variables.$prefix}tooltip-opacity: #{variables.$tooltip-opacity};
--#{variables.$prefix}tooltip-arrow-width: #{variables.$tooltip-arrow-width};
--#{variables.$prefix}tooltip-arrow-height: #{variables.$tooltip-arrow-height};
--#{$prefix}tooltip-zindex: #{$zindex-tooltip};
--#{$prefix}tooltip-max-width: #{$tooltip-max-width};
--#{$prefix}tooltip-padding-x: #{$tooltip-padding-x};
--#{$prefix}tooltip-padding-y: #{$tooltip-padding-y};
--#{$prefix}tooltip-margin: #{$tooltip-margin};
@include rfs($tooltip-font-size, --#{$prefix}tooltip-font-size);
--#{$prefix}tooltip-color: #{$tooltip-color};
--#{$prefix}tooltip-bg: #{$tooltip-bg};
--#{$prefix}tooltip-border-radius: #{$tooltip-border-radius};
--#{$prefix}tooltip-opacity: #{$tooltip-opacity};
--#{$prefix}tooltip-arrow-width: #{$tooltip-arrow-width};
--#{$prefix}tooltip-arrow-height: #{$tooltip-arrow-height};
// scss-docs-end tooltip-css-vars
z-index: var(--#{variables.$prefix}tooltip-zindex);
z-index: var(--#{$prefix}tooltip-zindex);
display: block;
margin: var(--#{variables.$prefix}tooltip-margin);
@include deprecate.deprecate("`$tooltip-margin`", "v5", "v5.x", true);
margin: var(--#{$prefix}tooltip-margin);
@include deprecate("`$tooltip-margin`", "v5", "v5.x", true);
// Our parent element can be arbitrary since tooltips are by default inserted as a sibling of their target element.
// So reset our font and text properties to avoid inheriting weird values.
@include reset-text.reset-text();
@include rfs.font-size(var(--#{variables.$prefix}tooltip-font-size));
@include reset-text();
@include font-size(var(--#{$prefix}tooltip-font-size));
// Allow breaking very long words so they don't overflow the tooltip's bounds
word-wrap: break-word;
opacity: 0;
&.show { opacity: var(--#{variables.$prefix}tooltip-opacity); }
&.show { opacity: var(--#{$prefix}tooltip-opacity); }
.tooltip-arrow {
display: block;
width: var(--#{variables.$prefix}tooltip-arrow-width);
height: var(--#{variables.$prefix}tooltip-arrow-height);
width: var(--#{$prefix}tooltip-arrow-width);
height: var(--#{$prefix}tooltip-arrow-height);
&::before {
position: absolute;
@ -50,50 +50,50 @@
}
.bs-tooltip-top .tooltip-arrow {
bottom: calc(-1 * var(--#{variables.$prefix}tooltip-arrow-height)); // stylelint-disable-line function-disallowed-list
bottom: calc(-1 * var(--#{$prefix}tooltip-arrow-height)); // stylelint-disable-line function-disallowed-list
&::before {
top: -1px;
border-width: var(--#{variables.$prefix}tooltip-arrow-height) calc(var(--#{variables.$prefix}tooltip-arrow-width) * .5) 0; // stylelint-disable-line function-disallowed-list
border-top-color: var(--#{variables.$prefix}tooltip-bg);
border-width: var(--#{$prefix}tooltip-arrow-height) calc(var(--#{$prefix}tooltip-arrow-width) * .5) 0; // stylelint-disable-line function-disallowed-list
border-top-color: var(--#{$prefix}tooltip-bg);
}
}
/* rtl:begin:ignore */
.bs-tooltip-end .tooltip-arrow {
left: calc(-1 * var(--#{variables.$prefix}tooltip-arrow-height)); // stylelint-disable-line function-disallowed-list
width: var(--#{variables.$prefix}tooltip-arrow-height);
height: var(--#{variables.$prefix}tooltip-arrow-width);
left: calc(-1 * var(--#{$prefix}tooltip-arrow-height)); // stylelint-disable-line function-disallowed-list
width: var(--#{$prefix}tooltip-arrow-height);
height: var(--#{$prefix}tooltip-arrow-width);
&::before {
right: -1px;
border-width: calc(var(--#{variables.$prefix}tooltip-arrow-width) * .5) var(--#{variables.$prefix}tooltip-arrow-height) calc(var(--#{variables.$prefix}tooltip-arrow-width) * .5) 0; // stylelint-disable-line function-disallowed-list
border-right-color: var(--#{variables.$prefix}tooltip-bg);
border-width: calc(var(--#{$prefix}tooltip-arrow-width) * .5) var(--#{$prefix}tooltip-arrow-height) calc(var(--#{$prefix}tooltip-arrow-width) * .5) 0; // stylelint-disable-line function-disallowed-list
border-right-color: var(--#{$prefix}tooltip-bg);
}
}
/* rtl:end:ignore */
.bs-tooltip-bottom .tooltip-arrow {
top: calc(-1 * var(--#{variables.$prefix}tooltip-arrow-height)); // stylelint-disable-line function-disallowed-list
top: calc(-1 * var(--#{$prefix}tooltip-arrow-height)); // stylelint-disable-line function-disallowed-list
&::before {
bottom: -1px;
border-width: 0 calc(var(--#{variables.$prefix}tooltip-arrow-width) * .5) var(--#{variables.$prefix}tooltip-arrow-height); // stylelint-disable-line function-disallowed-list
border-bottom-color: var(--#{variables.$prefix}tooltip-bg);
border-width: 0 calc(var(--#{$prefix}tooltip-arrow-width) * .5) var(--#{$prefix}tooltip-arrow-height); // stylelint-disable-line function-disallowed-list
border-bottom-color: var(--#{$prefix}tooltip-bg);
}
}
/* rtl:begin:ignore */
.bs-tooltip-start .tooltip-arrow {
right: calc(-1 * var(--#{variables.$prefix}tooltip-arrow-height)); // stylelint-disable-line function-disallowed-list
width: var(--#{variables.$prefix}tooltip-arrow-height);
height: var(--#{variables.$prefix}tooltip-arrow-width);
right: calc(-1 * var(--#{$prefix}tooltip-arrow-height)); // stylelint-disable-line function-disallowed-list
width: var(--#{$prefix}tooltip-arrow-height);
height: var(--#{$prefix}tooltip-arrow-width);
&::before {
left: -1px;
border-width: calc(var(--#{variables.$prefix}tooltip-arrow-width) * .5) 0 calc(var(--#{variables.$prefix}tooltip-arrow-width) * .5) var(--#{variables.$prefix}tooltip-arrow-height); // stylelint-disable-line function-disallowed-list
border-left-color: var(--#{variables.$prefix}tooltip-bg);
border-width: calc(var(--#{$prefix}tooltip-arrow-width) * .5) 0 calc(var(--#{$prefix}tooltip-arrow-width) * .5) var(--#{$prefix}tooltip-arrow-height); // stylelint-disable-line function-disallowed-list
border-left-color: var(--#{$prefix}tooltip-bg);
}
}
@ -116,10 +116,10 @@
// Wrapper for the tooltip content
.tooltip-inner {
max-width: var(--#{variables.$prefix}tooltip-max-width);
padding: var(--#{variables.$prefix}tooltip-padding-y) var(--#{variables.$prefix}tooltip-padding-x);
color: var(--#{variables.$prefix}tooltip-color);
max-width: var(--#{$prefix}tooltip-max-width);
padding: var(--#{$prefix}tooltip-padding-y) var(--#{$prefix}tooltip-padding-x);
color: var(--#{$prefix}tooltip-color);
text-align: center;
background-color: var(--#{variables.$prefix}tooltip-bg);
@include border-radius.border-radius(var(--#{variables.$prefix}tooltip-border-radius));
background-color: var(--#{$prefix}tooltip-bg);
@include border-radius(var(--#{$prefix}tooltip-border-radius));
}

View File

@ -1,8 +1,8 @@
@use "mixins/transition";
@use "setup/variables";
@use "mixins/transition" as *;
@use "setup/variables" as *;
.fade {
@include transition.transition(variables.$transition-fade);
@include transition($transition-fade);
&:not(.show) {
opacity: 0;
@ -19,12 +19,12 @@
.collapsing {
height: 0;
overflow: hidden;
@include transition.transition(variables.$transition-collapse);
@include transition($transition-collapse);
&.collapse-horizontal {
width: 0;
height: auto;
@include transition.transition(variables.$transition-collapse-width);
@include transition($transition-collapse-width);
}
}
// scss-docs-end collapse-classes

View File

@ -1,6 +1,6 @@
@use "mixins/lists";
@use "setup/variables";
@use "vendor/rfs";
@use "mixins/lists" as *;
@use "setup/variables" as *;
@use "vendor/rfs" as *;
@use "reboot";
//
@ -32,18 +32,18 @@
.lead {
@include rfs.font-size(variables.$lead-font-size);
font-weight: variables.$lead-font-weight;
@include font-size($lead-font-size);
font-weight: $lead-font-weight;
}
// Type display classes
@each $display, $font-size in variables.$display-font-sizes {
@each $display, $font-size in $display-font-sizes {
.display-#{$display} {
font-family: variables.$display-font-family;
font-style: variables.$display-font-style;
font-weight: variables.$display-font-weight;
line-height: variables.$display-line-height;
@include rfs.font-size($font-size);
font-family: $display-font-family;
font-style: $display-font-style;
font-weight: $display-font-weight;
line-height: $display-line-height;
@include font-size($font-size);
}
}
@ -63,18 +63,18 @@
//
.list-unstyled {
@include lists.list-unstyled();
@include list-unstyled();
}
// Inline turns list items into inline-block
.list-inline {
@include lists.list-unstyled();
@include list-unstyled();
}
.list-inline-item {
display: inline-block;
&:not(:last-child) {
margin-right: variables.$list-inline-padding;
margin-right: $list-inline-padding;
}
}
@ -85,14 +85,14 @@
// Builds on `abbr`
.initialism {
@include rfs.font-size(variables.$initialism-font-size);
@include font-size($initialism-font-size);
text-transform: uppercase;
}
// Blockquotes
.blockquote {
margin-bottom: variables.$blockquote-margin-y;
@include rfs.font-size(variables.$blockquote-font-size);
margin-bottom: $blockquote-margin-y;
@include font-size($blockquote-font-size);
> :last-child {
margin-bottom: 0;
@ -100,10 +100,10 @@
}
.blockquote-footer {
margin-top: -(variables.$blockquote-margin-y);
margin-bottom: variables.$blockquote-margin-y;
@include rfs.font-size(variables.$blockquote-footer-font-size);
color: variables.$blockquote-footer-color;
margin-top: -($blockquote-margin-y);
margin-bottom: $blockquote-margin-y;
@include font-size($blockquote-footer-font-size);
color: $blockquote-footer-color;
&::before {
content: "\2014\00A0"; // em dash, nbsp

View File

@ -1,7 +1,7 @@
@use "sass:map";
@use "functions";
@use "maps";
@use "setup/variables";
@use "setup/functions" as *;
@use "setup/variables" as *;
// Utilities
@ -82,9 +82,9 @@ $utilities: map.merge(
property: box-shadow,
class: shadow,
values: (
null: var(--#{variables.$prefix}box-shadow),
sm: var(--#{variables.$prefix}box-shadow-sm),
lg: var(--#{variables.$prefix}box-shadow-lg),
null: var(--#{$prefix}box-shadow),
sm: var(--#{$prefix}box-shadow-sm),
lg: var(--#{$prefix}box-shadow-lg),
none: none,
)
),
@ -94,7 +94,7 @@ $utilities: map.merge(
css-var: true,
css-variable-name: focus-ring-color,
class: focus-ring,
values: functions.map-loop(maps.$theme-colors-rgb, rgba-css-var, "$key", "focus-ring")
values: map-loop(maps.$theme-colors-rgb, rgba-css-var, "$key", "focus-ring")
),
// scss-docs-end utils-focus-ring
// scss-docs-start utils-position
@ -104,21 +104,21 @@ $utilities: map.merge(
),
"top": (
property: top,
values: variables.$position-values
values: $position-values
),
"bottom": (
property: bottom,
values: variables.$position-values
values: $position-values
),
"start": (
property: left,
class: start,
values: variables.$position-values
values: $position-values
),
"end": (
property: right,
class: end,
values: variables.$position-values
values: $position-values
),
"translate-middle": (
property: transform,
@ -134,14 +134,14 @@ $utilities: map.merge(
"border": (
property: border,
values: (
null: var(--#{variables.$prefix}border-width) var(--#{variables.$prefix}border-style) var(--#{variables.$prefix}border-color),
null: var(--#{$prefix}border-width) var(--#{$prefix}border-style) var(--#{$prefix}border-color),
0: 0,
)
),
"border-top": (
property: border-top,
values: (
null: var(--#{variables.$prefix}border-width) var(--#{variables.$prefix}border-style) var(--#{variables.$prefix}border-color),
null: var(--#{$prefix}border-width) var(--#{$prefix}border-style) var(--#{$prefix}border-color),
0: 0,
)
),
@ -149,14 +149,14 @@ $utilities: map.merge(
property: border-right,
class: border-end,
values: (
null: var(--#{variables.$prefix}border-width) var(--#{variables.$prefix}border-style) var(--#{variables.$prefix}border-color),
null: var(--#{$prefix}border-width) var(--#{$prefix}border-style) var(--#{$prefix}border-color),
0: 0,
)
),
"border-bottom": (
property: border-bottom,
values: (
null: var(--#{variables.$prefix}border-width) var(--#{variables.$prefix}border-style) var(--#{variables.$prefix}border-color),
null: var(--#{$prefix}border-width) var(--#{$prefix}border-style) var(--#{$prefix}border-color),
0: 0,
)
),
@ -164,7 +164,7 @@ $utilities: map.merge(
property: border-left,
class: border-start,
values: (
null: var(--#{variables.$prefix}border-width) var(--#{variables.$prefix}border-style) var(--#{variables.$prefix}border-color),
null: var(--#{$prefix}border-width) var(--#{$prefix}border-style) var(--#{$prefix}border-color),
0: 0,
)
),
@ -184,7 +184,7 @@ $utilities: map.merge(
"border-width": (
property: border-width,
class: border,
values: variables.$border-widths
values: $border-widths
),
"border-opacity": (
css-var: true,
@ -358,43 +358,43 @@ $utilities: map.merge(
responsive: true,
property: margin,
class: m,
values: map.merge(variables.$spacers, (auto: auto))
values: map.merge($spacers, (auto: auto))
),
"margin-x": (
responsive: true,
property: margin-right margin-left,
class: mx,
values: map.merge(variables.$spacers, (auto: auto))
values: map.merge($spacers, (auto: auto))
),
"margin-y": (
responsive: true,
property: margin-top margin-bottom,
class: my,
values: map.merge(variables.$spacers, (auto: auto))
values: map.merge($spacers, (auto: auto))
),
"margin-top": (
responsive: true,
property: margin-top,
class: mt,
values: map.merge(variables.$spacers, (auto: auto))
values: map.merge($spacers, (auto: auto))
),
"margin-end": (
responsive: true,
property: margin-right,
class: me,
values: map.merge(variables.$spacers, (auto: auto))
values: map.merge($spacers, (auto: auto))
),
"margin-bottom": (
responsive: true,
property: margin-bottom,
class: mb,
values: map.merge(variables.$spacers, (auto: auto))
values: map.merge($spacers, (auto: auto))
),
"margin-start": (
responsive: true,
property: margin-left,
class: ms,
values: map.merge(variables.$spacers, (auto: auto))
values: map.merge($spacers, (auto: auto))
),
// Negative margin utilities
"negative-margin": (
@ -444,62 +444,62 @@ $utilities: map.merge(
responsive: true,
property: padding,
class: p,
values: variables.$spacers
values: $spacers
),
"padding-x": (
responsive: true,
property: padding-right padding-left,
class: px,
values: variables.$spacers
values: $spacers
),
"padding-y": (
responsive: true,
property: padding-top padding-bottom,
class: py,
values: variables.$spacers
values: $spacers
),
"padding-top": (
responsive: true,
property: padding-top,
class: pt,
values: variables.$spacers
values: $spacers
),
"padding-end": (
responsive: true,
property: padding-right,
class: pe,
values: variables.$spacers
values: $spacers
),
"padding-bottom": (
responsive: true,
property: padding-bottom,
class: pb,
values: variables.$spacers
values: $spacers
),
"padding-start": (
responsive: true,
property: padding-left,
class: ps,
values: variables.$spacers
values: $spacers
),
// Gap utility
"gap": (
responsive: true,
property: gap,
class: gap,
values: variables.$spacers
values: $spacers
),
"row-gap": (
responsive: true,
property: row-gap,
class: row-gap,
values: variables.$spacers
values: $spacers
),
"column-gap": (
responsive: true,
property: column-gap,
class: column-gap,
values: variables.$spacers
values: $spacers
),
// scss-docs-end utils-spacing
// Text
@ -507,13 +507,13 @@ $utilities: map.merge(
"font-family": (
property: font-family,
class: font,
values: (monospace: var(--#{variables.$prefix}font-monospace))
values: (monospace: var(--#{$prefix}font-monospace))
),
"font-size": (
rfs: true,
property: font-size,
class: fs,
values: variables.$font-sizes
values: $font-sizes
),
"font-style": (
property: font-style,
@ -524,13 +524,13 @@ $utilities: map.merge(
property: font-weight,
class: fw,
values: (
lighter: variables.$font-weight-lighter,
light: variables.$font-weight-light,
normal: variables.$font-weight-normal,
medium: variables.$font-weight-medium,
semibold: variables.$font-weight-semibold,
bold: variables.$font-weight-bold,
bolder: variables.$font-weight-bolder
lighter: $font-weight-lighter,
light: $font-weight-light,
normal: $font-weight-normal,
medium: $font-weight-medium,
semibold: $font-weight-semibold,
bold: $font-weight-bold,
bolder: $font-weight-bolder
)
),
"line-height": (
@ -538,9 +538,9 @@ $utilities: map.merge(
class: lh,
values: (
1: 1,
sm: variables.$line-height-sm,
base: variables.$line-height-base,
lg: variables.$line-height-lg,
sm: $line-height-sm,
base: $line-height-base,
lg: $line-height-lg,
)
),
"text-align": (
@ -587,12 +587,12 @@ $utilities: map.merge(
values: map.merge(
maps.$utilities-text-colors,
(
"muted": var(--#{variables.$prefix}secondary-color), // deprecated
"black-50": rgba(variables.$black, .5), // deprecated
"white-50": rgba(variables.$white, .5), // deprecated
"body-secondary": var(--#{variables.$prefix}secondary-color),
"body-tertiary": var(--#{variables.$prefix}tertiary-color),
"body-emphasis": var(--#{variables.$prefix}emphasis-color),
"muted": var(--#{$prefix}secondary-color), // deprecated
"black-50": rgba($black, .5), // deprecated
"white-50": rgba($white, .5), // deprecated
"body-secondary": var(--#{$prefix}secondary-color),
"body-tertiary": var(--#{$prefix}tertiary-color),
"body-emphasis": var(--#{$prefix}emphasis-color),
"reset": inherit,
)
)
@ -645,7 +645,7 @@ $utilities: map.merge(
values: map.merge(
maps.$utilities-links-underline,
(
null: rgba(var(--#{variables.$prefix}link-color-rgb), var(--#{variables.$prefix}link-underline-opacity, 1)),
null: rgba(var(--#{$prefix}link-color-rgb), var(--#{$prefix}link-underline-opacity, 1)),
)
)
),
@ -674,8 +674,8 @@ $utilities: map.merge(
maps.$utilities-bg-colors,
(
"transparent": transparent,
"body-secondary": rgba(var(--#{variables.$prefix}secondary-bg-rgb), var(--#{variables.$prefix}bg-opacity)),
"body-tertiary": rgba(var(--#{variables.$prefix}tertiary-bg-rgb), var(--#{variables.$prefix}bg-opacity)),
"body-secondary": rgba(var(--#{$prefix}secondary-bg-rgb), var(--#{$prefix}bg-opacity)),
"body-tertiary": rgba(var(--#{$prefix}tertiary-bg-rgb), var(--#{$prefix}bg-opacity)),
)
)
),
@ -699,7 +699,7 @@ $utilities: map.merge(
"gradient": (
property: background-image,
class: bg,
values: (gradient: var(--#{variables.$prefix}gradient))
values: (gradient: var(--#{$prefix}gradient))
),
// scss-docs-start utils-interaction
"user-select": (
@ -717,75 +717,75 @@ $utilities: map.merge(
property: border-radius,
class: rounded,
values: (
null: var(--#{variables.$prefix}border-radius),
null: var(--#{$prefix}border-radius),
0: 0,
1: var(--#{variables.$prefix}border-radius-sm),
2: var(--#{variables.$prefix}border-radius),
3: var(--#{variables.$prefix}border-radius-lg),
4: var(--#{variables.$prefix}border-radius-xl),
5: var(--#{variables.$prefix}border-radius-xxl),
1: var(--#{$prefix}border-radius-sm),
2: var(--#{$prefix}border-radius),
3: var(--#{$prefix}border-radius-lg),
4: var(--#{$prefix}border-radius-xl),
5: var(--#{$prefix}border-radius-xxl),
circle: 50%,
pill: var(--#{variables.$prefix}border-radius-pill)
pill: var(--#{$prefix}border-radius-pill)
)
),
"rounded-top": (
property: border-top-left-radius border-top-right-radius,
class: rounded-top,
values: (
null: var(--#{variables.$prefix}border-radius),
null: var(--#{$prefix}border-radius),
0: 0,
1: var(--#{variables.$prefix}border-radius-sm),
2: var(--#{variables.$prefix}border-radius),
3: var(--#{variables.$prefix}border-radius-lg),
4: var(--#{variables.$prefix}border-radius-xl),
5: var(--#{variables.$prefix}border-radius-xxl),
1: var(--#{$prefix}border-radius-sm),
2: var(--#{$prefix}border-radius),
3: var(--#{$prefix}border-radius-lg),
4: var(--#{$prefix}border-radius-xl),
5: var(--#{$prefix}border-radius-xxl),
circle: 50%,
pill: var(--#{variables.$prefix}border-radius-pill)
pill: var(--#{$prefix}border-radius-pill)
)
),
"rounded-end": (
property: border-top-right-radius border-bottom-right-radius,
class: rounded-end,
values: (
null: var(--#{variables.$prefix}border-radius),
null: var(--#{$prefix}border-radius),
0: 0,
1: var(--#{variables.$prefix}border-radius-sm),
2: var(--#{variables.$prefix}border-radius),
3: var(--#{variables.$prefix}border-radius-lg),
4: var(--#{variables.$prefix}border-radius-xl),
5: var(--#{variables.$prefix}border-radius-xxl),
1: var(--#{$prefix}border-radius-sm),
2: var(--#{$prefix}border-radius),
3: var(--#{$prefix}border-radius-lg),
4: var(--#{$prefix}border-radius-xl),
5: var(--#{$prefix}border-radius-xxl),
circle: 50%,
pill: var(--#{variables.$prefix}border-radius-pill)
pill: var(--#{$prefix}border-radius-pill)
)
),
"rounded-bottom": (
property: border-bottom-right-radius border-bottom-left-radius,
class: rounded-bottom,
values: (
null: var(--#{variables.$prefix}border-radius),
null: var(--#{$prefix}border-radius),
0: 0,
1: var(--#{variables.$prefix}border-radius-sm),
2: var(--#{variables.$prefix}border-radius),
3: var(--#{variables.$prefix}border-radius-lg),
4: var(--#{variables.$prefix}border-radius-xl),
5: var(--#{variables.$prefix}border-radius-xxl),
1: var(--#{$prefix}border-radius-sm),
2: var(--#{$prefix}border-radius),
3: var(--#{$prefix}border-radius-lg),
4: var(--#{$prefix}border-radius-xl),
5: var(--#{$prefix}border-radius-xxl),
circle: 50%,
pill: var(--#{variables.$prefix}border-radius-pill)
pill: var(--#{$prefix}border-radius-pill)
)
),
"rounded-start": (
property: border-bottom-left-radius border-top-left-radius,
class: rounded-start,
values: (
null: var(--#{variables.$prefix}border-radius),
null: var(--#{$prefix}border-radius),
0: 0,
1: var(--#{variables.$prefix}border-radius-sm),
2: var(--#{variables.$prefix}border-radius),
3: var(--#{variables.$prefix}border-radius-lg),
4: var(--#{variables.$prefix}border-radius-xl),
5: var(--#{variables.$prefix}border-radius-xxl),
1: var(--#{$prefix}border-radius-sm),
2: var(--#{$prefix}border-radius),
3: var(--#{$prefix}border-radius-lg),
4: var(--#{$prefix}border-radius-xl),
5: var(--#{$prefix}border-radius-xxl),
circle: 50%,
pill: var(--#{variables.$prefix}border-radius-pill)
pill: var(--#{$prefix}border-radius-pill)
)
),
// scss-docs-end utils-border-radius
@ -803,7 +803,7 @@ $utilities: map.merge(
"z-index": (
property: z-index,
class: z,
values: variables.$zindex-levels,
values: $zindex-levels,
)
// scss-docs-end utils-zindex
),

40
scss/bootstrap.scss vendored
View File

@ -24,28 +24,28 @@
@use "tables";
@use "forms";
@use "buttons";
// @use "transitions";
// @use "dropdown";
// @use "button-group";
// @use "nav";
// @use "navbar";
// @use "card";
// @use "accordion";
@use "transitions";
@use "dropdown";
@use "button-group";
@use "nav";
@use "navbar";
@use "card";
@use "accordion";
// @use "breadcrumb";
// @use "pagination";
// @use "badge";
// @use "alert";
// @use "progress";
// @use "list-group";
// @use "close";
// @use "toasts";
// @use "modal";
// @use "tooltip";
// @use "popover";
@use "pagination";
@use "badge";
@use "alert";
@use "progress";
@use "list-group";
@use "close";
@use "toasts";
@use "modal";
@use "tooltip";
@use "popover";
// @use "carousel";
// @use "spinners";
// @use "offcanvas";
// @use "placeholders";
@use "spinners";
@use "offcanvas";
@use "placeholders";
// // Helpers
// @use "helpers";

View File

@ -1,6 +1,6 @@
@use "../mixins/border-radius";
@use "../mixins/transition";
@use "../setup/variables";
@use "../mixins/transition" as *;
@use "../setup/variables" as *;
.form-floating {
position: relative;
@ -8,9 +8,9 @@
> .form-control,
> .form-control-plaintext,
> .form-select {
height: variables.$form-floating-height;
min-height: variables.$form-floating-height;
line-height: variables.$form-floating-line-height;
height: $form-floating-height;
min-height: $form-floating-height;
line-height: $form-floating-line-height;
}
> label {
@ -20,21 +20,21 @@
z-index: 2;
max-width: 100%;
height: 100%; // allow textareas
padding: variables.$form-floating-padding-y variables.$form-floating-padding-x;
padding: $form-floating-padding-y $form-floating-padding-x;
overflow: hidden;
color: rgba(var(--#{variables.$prefix}body-color-rgb), #{variables.$form-floating-label-opacity});
color: rgba(var(--#{$prefix}body-color-rgb), #{$form-floating-label-opacity});
text-align: start;
text-overflow: ellipsis;
white-space: nowrap;
pointer-events: none;
border: variables.$input-border-width solid transparent; // Required for aligning label's text with the input as it affects inner box model
border: $input-border-width solid transparent; // Required for aligning label's text with the input as it affects inner box model
transform-origin: 0 0;
@include transition.transition(variables.$form-floating-transition);
@include transition($form-floating-transition);
}
> .form-control,
> .form-control-plaintext {
padding: variables.$form-floating-padding-y variables.$form-floating-padding-x;
padding: $form-floating-padding-y $form-floating-padding-x;
&::placeholder {
color: transparent;
@ -42,19 +42,19 @@
&:focus,
&:not(:placeholder-shown) {
padding-top: variables.$form-floating-input-padding-t;
padding-bottom: variables.$form-floating-input-padding-b;
padding-top: $form-floating-input-padding-t;
padding-bottom: $form-floating-input-padding-b;
}
// Duplicated because `:-webkit-autofill` invalidates other selectors when grouped
&:-webkit-autofill {
padding-top: variables.$form-floating-input-padding-t;
padding-bottom: variables.$form-floating-input-padding-b;
padding-top: $form-floating-input-padding-t;
padding-bottom: $form-floating-input-padding-b;
}
}
> .form-select {
padding-top: variables.$form-floating-input-padding-t;
padding-bottom: variables.$form-floating-input-padding-b;
padding-top: $form-floating-input-padding-t;
padding-bottom: $form-floating-input-padding-b;
}
> .form-control:focus,
@ -62,39 +62,39 @@
> .form-control-plaintext,
> .form-select {
~ label {
transform: variables.$form-floating-label-transform;
transform: $form-floating-label-transform;
}
}
// Duplicated because `:-webkit-autofill` invalidates other selectors when grouped
> .form-control:-webkit-autofill {
~ label {
transform: variables.$form-floating-label-transform;
transform: $form-floating-label-transform;
}
}
> textarea:focus,
> textarea:not(:placeholder-shown) {
~ label::after {
position: absolute;
inset: variables.$form-floating-padding-y (variables.$form-floating-padding-x * .5);
inset: $form-floating-padding-y ($form-floating-padding-x * .5);
z-index: -1;
height: variables.$form-floating-label-height;
height: $form-floating-label-height;
content: "";
background-color: variables.$input-bg;
@include border-radius.border-radius(variables.$input-border-radius);
background-color: $input-bg;
@include border-radius.border-radius($input-border-radius);
}
}
> textarea:disabled ~ label::after {
background-color: variables.$input-disabled-bg;
background-color: $input-disabled-bg;
}
> .form-control-plaintext {
~ label {
border-width: variables.$input-border-width 0; // Required to properly position label text - as explained above
border-width: $input-border-width 0; // Required to properly position label text - as explained above
}
}
> :disabled ~ label,
> .form-control:disabled ~ label { // Required for `.form-control`s because of specificity
color: variables.$form-floating-label-disabled-color;
color: $form-floating-label-disabled-color;
}
}

View File

@ -1,6 +1,6 @@
@use "../mixins/border-radius";
@use "../mixins/color-mode";
@use "../mixins/transition";
@use "../mixins/transition" as *;
@use "../setup" as *;
//
@ -47,7 +47,7 @@
background-size: contain;
border: $form-check-input-border;
print-color-adjust: exact; // Keep themed appearance for print
@include transition.transition($form-check-transition);
@include transition($form-check-transition);
&[type="checkbox"] {
@include border-radius.border-radius($form-check-input-border-radius);
@ -137,7 +137,7 @@
background-image: var(--#{$prefix}form-switch-bg);
background-position: left center;
@include border-radius.border-radius($form-switch-border-radius, 0);
@include transition.transition($form-switch-transition);
@include transition($form-switch-transition);
&:focus {
--#{$prefix}form-switch-bg: #{escape-svg($form-switch-focus-bg-image)};

View File

@ -2,9 +2,9 @@
@use "../mixins/border-radius";
@use "../mixins/box-shadow";
@use "../mixins/gradients";
@use "../mixins/transition";
@use "../setup/variables";
@use "../vendor/rfs";
@use "../mixins/transition" as *;
@use "../setup/variables" as *;
@use "../vendor/rfs" as *;
//
// General form controls (plus a few specific high-level interventions)
@ -13,22 +13,22 @@
.form-control {
display: block;
width: 100%;
padding: variables.$input-padding-y variables.$input-padding-x;
font-family: variables.$input-font-family;
@include rfs.font-size(variables.$input-font-size);
font-weight: variables.$input-font-weight;
line-height: variables.$input-line-height;
color: variables.$input-color;
padding: $input-padding-y $input-padding-x;
font-family: $input-font-family;
@include font-size($input-font-size);
font-weight: $input-font-weight;
line-height: $input-line-height;
color: $input-color;
appearance: none; // Fix appearance for date inputs in Safari
background-color: variables.$input-bg;
background-color: $input-bg;
background-clip: padding-box;
border: variables.$input-border-width solid variables.$input-border-color;
border: $input-border-width solid $input-border-color;
// Note: This has no effect on <select>s in some browsers, due to the limited stylability of `<select>`s in CSS.
@include border-radius.border-radius(variables.$input-border-radius, 0);
@include border-radius.border-radius($input-border-radius, 0);
@include box-shadow.box-shadow(variables.$input-box-shadow);
@include transition.transition(variables.$input-transition);
@include box-shadow.box-shadow($input-box-shadow);
@include transition($input-transition);
&[type="file"] {
overflow: hidden; // prevent pseudo element button overlap
@ -40,15 +40,15 @@
// Customize the `:focus` state to imitate native WebKit styles.
&:focus {
color: variables.$input-focus-color;
background-color: variables.$input-focus-bg;
border-color: variables.$input-focus-border-color;
color: $input-focus-color;
background-color: $input-focus-bg;
border-color: $input-focus-border-color;
outline: 0;
@if variables.$enable-shadows {
@include box-shadow.box-shadow(variables.$input-box-shadow, variables.$input-focus-box-shadow);
@if $enable-shadows {
@include box-shadow.box-shadow($input-box-shadow, $input-focus-box-shadow);
} @else {
// Avoid using mixin so we can pass custom focus shadow properly
box-shadow: variables.$input-focus-box-shadow;
box-shadow: $input-focus-box-shadow;
}
}
@ -64,7 +64,7 @@
// https://github.com/twbs/bootstrap/issues/23307
// TODO: we can remove this workaround once https://bugs.webkit.org/show_bug.cgi?id=198959 is resolved
// Multiply line-height by 1em if it has no unit
height: if(math.unit(variables.$input-line-height) == "", variables.$input-line-height * 1em, variables.$input-line-height);
height: if(math.unit($input-line-height) == "", $input-line-height * 1em, $input-line-height);
// Android Chrome type="date" is taller than the other inputs
// because of "margin: 1px 24px 1px 4px" inside the shadow DOM
@ -81,7 +81,7 @@
// Placeholder
&::placeholder {
color: variables.$input-placeholder-color;
color: $input-placeholder-color;
// Override Firefox's unusual default opacity; see https://github.com/twbs/bootstrap/pull/11526.
opacity: 1;
}
@ -92,31 +92,31 @@
// disabled if the fieldset is disabled. Due to implementation difficulty, we
// don't honor that edge case; we style them as disabled anyway.
&:disabled {
color: variables.$input-disabled-color;
background-color: variables.$input-disabled-bg;
border-color: variables.$input-disabled-border-color;
color: $input-disabled-color;
background-color: $input-disabled-bg;
border-color: $input-disabled-border-color;
// iOS fix for unreadable disabled content; see https://github.com/twbs/bootstrap/issues/11655.
opacity: 1;
}
// File input buttons theming
&::file-selector-button {
padding: variables.$input-padding-y variables.$input-padding-x;
margin: (-(variables.$input-padding-y)) (-(variables.$input-padding-x));
margin-inline-end: variables.$input-padding-x;
color: variables.$form-file-button-color;
@include gradients.gradient-bg(variables.$form-file-button-bg);
padding: $input-padding-y $input-padding-x;
margin: (-($input-padding-y)) (-($input-padding-x));
margin-inline-end: $input-padding-x;
color: $form-file-button-color;
@include gradients.gradient-bg($form-file-button-bg);
pointer-events: none;
border-color: inherit;
border-style: solid;
border-width: 0;
border-inline-end-width: variables.$input-border-width;
border-inline-end-width: $input-border-width;
border-radius: 0; // stylelint-disable-line property-disallowed-list
@include transition.transition(variables.$btn-transition);
@include transition($btn-transition);
}
&:hover:not(:disabled):not([readonly])::file-selector-button {
background-color: variables.$form-file-button-hover-bg;
background-color: $form-file-button-hover-bg;
}
}
@ -128,13 +128,13 @@
.form-control-plaintext {
display: block;
width: 100%;
padding: variables.$input-padding-y 0;
padding: $input-padding-y 0;
margin-bottom: 0; // match inputs if this class comes on inputs with default margins
line-height: variables.$input-line-height;
color: variables.$input-plaintext-color;
line-height: $input-line-height;
color: $input-plaintext-color;
background-color: transparent;
border: solid transparent;
border-width: variables.$input-border-width 0;
border-width: $input-border-width 0;
&:focus {
outline: 0;
@ -155,28 +155,28 @@
// Repeated in `_input_group.scss` to avoid Sass extend issues.
.form-control-sm {
min-height: variables.$input-height-sm;
padding: variables.$input-padding-y-sm variables.$input-padding-x-sm;
@include rfs.font-size(variables.$input-font-size-sm);
@include border-radius.border-radius(variables.$input-border-radius-sm);
min-height: $input-height-sm;
padding: $input-padding-y-sm $input-padding-x-sm;
@include font-size($input-font-size-sm);
@include border-radius.border-radius($input-border-radius-sm);
&::file-selector-button {
padding: variables.$input-padding-y-sm variables.$input-padding-x-sm;
margin: (-(variables.$input-padding-y-sm)) (-(variables.$input-padding-x-sm));
margin-inline-end: variables.$input-padding-x-sm;
padding: $input-padding-y-sm $input-padding-x-sm;
margin: (-($input-padding-y-sm)) (-($input-padding-x-sm));
margin-inline-end: $input-padding-x-sm;
}
}
.form-control-lg {
min-height: variables.$input-height-lg;
padding: variables.$input-padding-y-lg variables.$input-padding-x-lg;
@include rfs.font-size(variables.$input-font-size-lg);
@include border-radius.border-radius(variables.$input-border-radius-lg);
min-height: $input-height-lg;
padding: $input-padding-y-lg $input-padding-x-lg;
@include font-size($input-font-size-lg);
@include border-radius.border-radius($input-border-radius-lg);
&::file-selector-button {
padding: variables.$input-padding-y-lg variables.$input-padding-x-lg;
margin: (-(variables.$input-padding-y-lg)) (-(variables.$input-padding-x-lg));
margin-inline-end: variables.$input-padding-x-lg;
padding: $input-padding-y-lg $input-padding-x-lg;
margin: (-($input-padding-y-lg)) (-($input-padding-x-lg));
margin-inline-end: $input-padding-x-lg;
}
}
@ -185,23 +185,23 @@
// stylelint-disable selector-no-qualifying-type
textarea {
&.form-control {
min-height: variables.$input-height;
min-height: $input-height;
}
&.form-control-sm {
min-height: variables.$input-height-sm;
min-height: $input-height-sm;
}
&.form-control-lg {
min-height: variables.$input-height-lg;
min-height: $input-height-lg;
}
}
// stylelint-enable selector-no-qualifying-type
.form-control-color {
width: variables.$form-color-width;
height: variables.$input-height;
padding: variables.$input-padding-y;
width: $form-color-width;
height: $input-height;
padding: $input-padding-y;
&:not(:disabled):not([readonly]) {
cursor: pointer;
@ -209,14 +209,14 @@ textarea {
&::-moz-color-swatch {
border: 0 !important; // stylelint-disable-line declaration-no-important
@include border-radius.border-radius(variables.$input-border-radius);
@include border-radius.border-radius($input-border-radius);
}
&::-webkit-color-swatch {
border: 0 !important; // stylelint-disable-line declaration-no-important
@include border-radius.border-radius(variables.$input-border-radius);
@include border-radius.border-radius($input-border-radius);
}
&.form-control-sm { height: variables.$input-height-sm; }
&.form-control-lg { height: variables.$input-height-lg; }
&.form-control-sm { height: $input-height-sm; }
&.form-control-lg { height: $input-height-lg; }
}

View File

@ -1,8 +1,8 @@
@use "../mixins/border-radius";
@use "../mixins/box-shadow";
@use "../mixins/gradients";
@use "../mixins/transition";
@use "../setup/variables";
@use "../mixins/transition" as *;
@use "../setup/variables" as *;
// Range
//
@ -12,7 +12,7 @@
.form-range {
width: 100%;
height: calc(#{variables.$form-range-thumb-height} + #{variables.$form-range-thumb-focus-box-shadow-width} * 2);
height: calc(#{$form-range-thumb-height} + #{$form-range-thumb-focus-box-shadow-width} * 2);
padding: 0; // Need to reset padding
appearance: none;
background-color: transparent;
@ -22,8 +22,8 @@
// Pseudo-elements must be split across multiple rulesets to have an effect.
// No box-shadow() mixin for focus accessibility.
&::-webkit-slider-thumb { box-shadow: variables.$form-range-thumb-focus-box-shadow; }
&::-moz-range-thumb { box-shadow: variables.$form-range-thumb-focus-box-shadow; }
&::-webkit-slider-thumb { box-shadow: $form-range-thumb-focus-box-shadow; }
&::-moz-range-thumb { box-shadow: $form-range-thumb-focus-box-shadow; }
}
&::-moz-focus-outer {
@ -31,67 +31,67 @@
}
&::-webkit-slider-thumb {
width: variables.$form-range-thumb-width;
height: variables.$form-range-thumb-height;
margin-top: (variables.$form-range-track-height - variables.$form-range-thumb-height) * .5; // Webkit specific
width: $form-range-thumb-width;
height: $form-range-thumb-height;
margin-top: ($form-range-track-height - $form-range-thumb-height) * .5; // Webkit specific
appearance: none;
@include gradients.gradient-bg(variables.$form-range-thumb-bg);
border: variables.$form-range-thumb-border;
@include border-radius.border-radius(variables.$form-range-thumb-border-radius);
@include box-shadow.box-shadow(variables.$form-range-thumb-box-shadow);
@include transition.transition(variables.$form-range-thumb-transition);
@include gradients.gradient-bg($form-range-thumb-bg);
border: $form-range-thumb-border;
@include border-radius.border-radius($form-range-thumb-border-radius);
@include box-shadow.box-shadow($form-range-thumb-box-shadow);
@include transition($form-range-thumb-transition);
&:active {
@include gradients.gradient-bg(variables.$form-range-thumb-active-bg);
@include gradients.gradient-bg($form-range-thumb-active-bg);
}
}
&::-webkit-slider-runnable-track {
width: variables.$form-range-track-width;
height: variables.$form-range-track-height;
width: $form-range-track-width;
height: $form-range-track-height;
color: transparent; // Why?
cursor: variables.$form-range-track-cursor;
background-color: variables.$form-range-track-bg;
cursor: $form-range-track-cursor;
background-color: $form-range-track-bg;
border-color: transparent;
@include border-radius.border-radius(variables.$form-range-track-border-radius);
@include box-shadow.box-shadow(variables.$form-range-track-box-shadow);
@include border-radius.border-radius($form-range-track-border-radius);
@include box-shadow.box-shadow($form-range-track-box-shadow);
}
&::-moz-range-thumb {
width: variables.$form-range-thumb-width;
height: variables.$form-range-thumb-height;
width: $form-range-thumb-width;
height: $form-range-thumb-height;
appearance: none;
@include gradients.gradient-bg(variables.$form-range-thumb-bg);
border: variables.$form-range-thumb-border;
@include border-radius.border-radius(variables.$form-range-thumb-border-radius);
@include box-shadow.box-shadow(variables.$form-range-thumb-box-shadow);
@include transition.transition(variables.$form-range-thumb-transition);
@include gradients.gradient-bg($form-range-thumb-bg);
border: $form-range-thumb-border;
@include border-radius.border-radius($form-range-thumb-border-radius);
@include box-shadow.box-shadow($form-range-thumb-box-shadow);
@include transition($form-range-thumb-transition);
&:active {
@include gradients.gradient-bg(variables.$form-range-thumb-active-bg);
@include gradients.gradient-bg($form-range-thumb-active-bg);
}
}
&::-moz-range-track {
width: variables.$form-range-track-width;
height: variables.$form-range-track-height;
width: $form-range-track-width;
height: $form-range-track-height;
color: transparent;
cursor: variables.$form-range-track-cursor;
background-color: variables.$form-range-track-bg;
cursor: $form-range-track-cursor;
background-color: $form-range-track-bg;
border-color: transparent; // Firefox specific?
@include border-radius.border-radius(variables.$form-range-track-border-radius);
@include box-shadow.box-shadow(variables.$form-range-track-box-shadow);
@include border-radius.border-radius($form-range-track-border-radius);
@include box-shadow.box-shadow($form-range-track-box-shadow);
}
&:disabled {
pointer-events: none;
&::-webkit-slider-thumb {
background-color: variables.$form-range-thumb-disabled-bg;
background-color: $form-range-thumb-disabled-bg;
}
&::-moz-range-thumb {
background-color: variables.$form-range-thumb-disabled-bg;
background-color: $form-range-thumb-disabled-bg;
}
}
}

View File

@ -1,9 +1,9 @@
@use "../mixins/border-radius";
@use "../mixins/box-shadow";
@use "../mixins/color-mode";
@use "../mixins/transition";
@use "../mixins/transition" as *;
@use "../setup" as *;
@use "../vendor/rfs";
@use "../vendor/rfs" as *;
// Select
//
@ -17,7 +17,7 @@
width: 100%;
padding: $form-select-padding-y $form-select-indicator-padding $form-select-padding-y $form-select-padding-x;
font-family: $form-select-font-family;
@include rfs.font-size($form-select-font-size);
@include font-size($form-select-font-size);
font-weight: $form-select-font-weight;
line-height: $form-select-line-height;
color: $form-select-color;
@ -30,7 +30,7 @@
border: $form-select-border-width solid $form-select-border-color;
@include border-radius.border-radius($form-select-border-radius, 0);
@include box-shadow.box-shadow($form-select-box-shadow);
@include transition.transition($form-select-transition);
@include transition($form-select-transition);
&:focus {
border-color: $form-select-focus-border-color;
@ -66,7 +66,7 @@
padding-top: $form-select-padding-y-sm;
padding-bottom: $form-select-padding-y-sm;
padding-left: $form-select-padding-x-sm;
@include rfs.font-size($form-select-font-size-sm);
@include font-size($form-select-font-size-sm);
@include border-radius.border-radius($form-select-border-radius-sm);
}
@ -74,7 +74,7 @@
padding-top: $form-select-padding-y-lg;
padding-bottom: $form-select-padding-y-lg;
padding-left: $form-select-padding-x-lg;
@include rfs.font-size($form-select-font-size-lg);
@include font-size($form-select-font-size-lg);
@include border-radius.border-radius($form-select-border-radius-lg);
}

View File

@ -1,14 +1,14 @@
@use "../setup/variables";
@use "../vendor/rfs";
@use "../setup/variables" as *;
@use "../vendor/rfs" as *;
//
// Form text
//
.form-text {
margin-top: variables.$form-text-margin-top;
@include rfs.font-size(variables.$form-text-font-size);
font-style: variables.$form-text-font-style;
font-weight: variables.$form-text-font-weight;
color: variables.$form-text-color;
margin-top: $form-text-margin-top;
@include font-size($form-text-font-size);
font-style: $form-text-font-style;
font-weight: $form-text-font-weight;
color: $form-text-color;
}

View File

@ -1,8 +1,8 @@
@use "sass:map";
@use "sass:string";
@use "../mixins/border-radius";
@use "../setup/variables";
@use "../vendor/rfs";
@use "../setup/variables" as *;
@use "../vendor/rfs" as *;
//
// Base styles
@ -53,16 +53,16 @@
.input-group-text {
display: flex;
align-items: center;
padding: variables.$input-group-addon-padding-y variables.$input-group-addon-padding-x;
@include rfs.font-size(variables.$input-font-size); // Match inputs
font-weight: variables.$input-group-addon-font-weight;
line-height: variables.$input-line-height;
color: variables.$input-group-addon-color;
padding: $input-group-addon-padding-y $input-group-addon-padding-x;
@include font-size($input-font-size); // Match inputs
font-weight: $input-group-addon-font-weight;
line-height: $input-line-height;
color: $input-group-addon-color;
text-align: center;
white-space: nowrap;
background-color: variables.$input-group-addon-bg;
border: variables.$input-border-width solid variables.$input-group-addon-border-color;
@include border-radius.border-radius(variables.$input-border-radius);
background-color: $input-group-addon-bg;
border: $input-border-width solid $input-group-addon-border-color;
@include border-radius.border-radius($input-border-radius);
}
@ -75,23 +75,23 @@
.input-group-lg > .form-select,
.input-group-lg > .input-group-text,
.input-group-lg > .btn {
padding: variables.$input-padding-y-lg variables.$input-padding-x-lg;
@include rfs.font-size(variables.$input-font-size-lg);
@include border-radius.border-radius(variables.$input-border-radius-lg);
padding: $input-padding-y-lg $input-padding-x-lg;
@include font-size($input-font-size-lg);
@include border-radius.border-radius($input-border-radius-lg);
}
.input-group-sm > .form-control,
.input-group-sm > .form-select,
.input-group-sm > .input-group-text,
.input-group-sm > .btn {
padding: variables.$input-padding-y-sm variables.$input-padding-x-sm;
@include rfs.font-size(variables.$input-font-size-sm);
@include border-radius.border-radius(variables.$input-border-radius-sm);
padding: $input-padding-y-sm $input-padding-x-sm;
@include font-size($input-font-size-sm);
@include border-radius.border-radius($input-border-radius-sm);
}
.input-group-lg > .form-select,
.input-group-sm > .form-select {
padding-right: variables.$form-select-padding-x + variables.$form-select-indicator-padding;
padding-right: $form-select-padding-x + $form-select-indicator-padding;
}
@ -122,12 +122,12 @@
}
$validation-messages: "";
@each $state in map.keys(variables.$form-validation-states) {
@each $state in map.keys($form-validation-states) {
$validation-messages: $validation-messages + ":not(." + string.unquote($state) + "-tooltip)" + ":not(." + string.unquote($state) + "-feedback)";
}
> :not(:first-child):not(.dropdown-menu)#{$validation-messages} {
margin-left: calc(#{variables.$input-border-width} * -1); // stylelint-disable-line function-disallowed-list
margin-left: calc(#{$input-border-width} * -1); // stylelint-disable-line function-disallowed-list
@include border-radius.border-start-radius(0);
}

View File

@ -1,39 +1,39 @@
@use "../setup/variables";
@use "../vendor/rfs";
@use "../setup/variables" as *;
@use "../vendor/rfs" as *;
//
// Labels
//
.form-label {
margin-bottom: variables.$form-label-margin-bottom;
@include rfs.font-size(variables.$form-label-font-size);
font-style: variables.$form-label-font-style;
font-weight: variables.$form-label-font-weight;
color: variables.$form-label-color;
margin-bottom: $form-label-margin-bottom;
@include font-size($form-label-font-size);
font-style: $form-label-font-style;
font-weight: $form-label-font-weight;
color: $form-label-color;
}
// For use with horizontal and inline forms, when you need the label (or legend)
// text to align with the form controls.
.col-form-label {
padding-top: calc(#{variables.$input-padding-y} + #{variables.$input-border-width});
padding-bottom: calc(#{variables.$input-padding-y} + #{variables.$input-border-width});
padding-top: calc(#{$input-padding-y} + #{$input-border-width});
padding-bottom: calc(#{$input-padding-y} + #{$input-border-width});
margin-bottom: 0; // Override the `<legend>` default
@include rfs.font-size(inherit); // Override the `<legend>` default
font-style: variables.$form-label-font-style;
font-weight: variables.$form-label-font-weight;
line-height: variables.$input-line-height;
color: variables.$form-label-color;
@include font-size(inherit); // Override the `<legend>` default
font-style: $form-label-font-style;
font-weight: $form-label-font-weight;
line-height: $input-line-height;
color: $form-label-color;
}
.col-form-label-lg {
padding-top: calc(#{variables.$input-padding-y-lg} + #{variables.$input-border-width});
padding-bottom: calc(#{variables.$input-padding-y-lg} + #{variables.$input-border-width});
@include rfs.font-size(variables.$input-font-size-lg);
padding-top: calc(#{$input-padding-y-lg} + #{$input-border-width});
padding-bottom: calc(#{$input-padding-y-lg} + #{$input-border-width});
@include font-size($input-font-size-lg);
}
.col-form-label-sm {
padding-top: calc(#{variables.$input-padding-y-sm} + #{variables.$input-border-width});
padding-bottom: calc(#{variables.$input-padding-y-sm} + #{variables.$input-border-width});
@include rfs.font-size(variables.$input-font-size-sm);
padding-top: calc(#{$input-padding-y-sm} + #{$input-border-width});
padding-bottom: calc(#{$input-padding-y-sm} + #{$input-border-width});
@include font-size($input-font-size-sm);
}

View File

@ -1,5 +1,5 @@
@use "../mixins/forms";
@use "../setup/variables";
@use "../mixins/forms" as *;
@use "../setup/variables" as *;
// Form validation
//
@ -9,7 +9,7 @@
// server-side validation.
// scss-docs-start form-validation-states-loop
@each $state, $data in variables.$form-validation-states {
@include forms.form-validation-state($state, $data...);
@each $state, $data in $form-validation-states {
@include form-validation-state($state, $data...);
}
// scss-docs-end form-validation-states-loop

View File

@ -1,10 +1,10 @@
@use "../functions";
@use "../setup/variables";
@use "../setup/functions" as *;
@use "../setup/variables" as *;
// All-caps `RGBA()` function used because of this Sass bug: https://github.com/sass/node-sass/issues/2251
@each $color, $value in variables.$theme-colors {
@each $color, $value in $theme-colors {
.text-bg-#{$color} {
color: functions.color-contrast($value) if(variables.$enable-important-utilities, !important, null);
background-color: RGBA(var(--#{variables.$prefix}#{$color}-rgb), var(--#{variables.$prefix}bg-opacity, 1)) if(variables.$enable-important-utilities, !important, null);
color: color-contrast($value) if($enable-important-utilities, !important, null);
background-color: RGBA(var(--#{$prefix}#{$color}-rgb), var(--#{$prefix}bg-opacity, 1)) if($enable-important-utilities, !important, null);
}
}

View File

@ -1,18 +1,18 @@
@use "../functions";
@use "../setup/variables";
@use "../setup" as *;
// All-caps `RGBA()` function used because of this Sass bug: https://github.com/sass/node-sass/issues/2251
@each $color, $value in variables.$theme-colors {
@each $color, $value in $theme-colors {
.link-#{$color} {
color: RGBA(var(--#{variables.$prefix}#{$color}-rgb), var(--#{variables.$prefix}link-opacity, 1)) if(variables.$enable-important-utilities, !important, null);
text-decoration-color: RGBA(var(--#{variables.$prefix}#{$color}-rgb), var(--#{variables.$prefix}link-underline-opacity, 1)) if(variables.$enable-important-utilities, !important, null);
color: RGBA(var(--#{$prefix}#{$color}-rgb), var(--#{$prefix}link-opacity, 1)) if($enable-important-utilities, !important, null);
text-decoration-color: RGBA(var(--#{$prefix}#{$color}-rgb), var(--#{$prefix}link-underline-opacity, 1)) if($enable-important-utilities, !important, null);
@if variables.$link-shade-percentage != 0 {
@if $link-shade-percentage != 0 {
&:hover,
&:focus {
$hover-color: if(functions.color-contrast($value) == variables.$color-contrast-light, functions.shade-color($value, variables.$link-shade-percentage), functions.tint-color($value, variables.$link-shade-percentage));
color: RGBA(#{functions.to-rgb($hover-color)}, var(--#{variables.$prefix}link-opacity, 1)) if(variables.$enable-important-utilities, !important, null);
text-decoration-color: RGBA(functions.to-rgb($hover-color), var(--#{variables.$prefix}link-underline-opacity, 1)) if(variables.$enable-important-utilities, !important, null);
$hover-color: if(color-contrast($value) == $color-contrast-light, shade-color($value, $link-shade-percentage), tint-color($value, $link-shade-percentage));
color: RGBA(#{to-rgb($hover-color)}, var(--#{$prefix}link-opacity, 1)) if($enable-important-utilities, !important, null);
text-decoration-color: RGBA(to-rgb($hover-color), var(--#{$prefix}link-underline-opacity, 1)) if($enable-important-utilities, !important, null);
}
}
}
@ -20,14 +20,14 @@
// One-off special link helper as a bridge until v6
.link-body-emphasis {
color: RGBA(var(--#{variables.$prefix}emphasis-color-rgb), var(--#{variables.$prefix}link-opacity, 1)) if(variables.$enable-important-utilities, !important, null);
text-decoration-color: RGBA(var(--#{variables.$prefix}emphasis-color-rgb), var(--#{variables.$prefix}link-underline-opacity, 1)) if(variables.$enable-important-utilities, !important, null);
color: RGBA(var(--#{$prefix}emphasis-color-rgb), var(--#{$prefix}link-opacity, 1)) if($enable-important-utilities, !important, null);
text-decoration-color: RGBA(var(--#{$prefix}emphasis-color-rgb), var(--#{$prefix}link-underline-opacity, 1)) if($enable-important-utilities, !important, null);
@if variables.$link-shade-percentage != 0 {
@if $link-shade-percentage != 0 {
&:hover,
&:focus {
color: RGBA(var(--#{variables.$prefix}emphasis-color-rgb), var(--#{variables.$prefix}link-opacity, .75)) if(variables.$enable-important-utilities, !important, null);
text-decoration-color: RGBA(var(--#{variables.$prefix}emphasis-color-rgb), var(--#{variables.$prefix}link-underline-opacity, .75)) if(variables.$enable-important-utilities, !important, null);
color: RGBA(var(--#{$prefix}emphasis-color-rgb), var(--#{$prefix}link-opacity, .75)) if($enable-important-utilities, !important, null);
text-decoration-color: RGBA(var(--#{$prefix}emphasis-color-rgb), var(--#{$prefix}link-underline-opacity, .75)) if($enable-important-utilities, !important, null);
}
}
}

View File

@ -1,7 +1,7 @@
@use "../setup/variables";
@use "../setup/variables" as *;
.focus-ring:focus {
outline: 0;
// By default, there is no `--bs-focus-ring-x`, `--bs-focus-ring-y`, or `--bs-focus-ring-blur`, but we provide CSS variables with fallbacks to initial `0` values
box-shadow: var(--#{variables.$prefix}focus-ring-x, 0) var(--#{variables.$prefix}focus-ring-y, 0) var(--#{variables.$prefix}focus-ring-blur, 0) var(--#{variables.$prefix}focus-ring-width) var(--#{variables.$prefix}focus-ring-color);
box-shadow: var(--#{$prefix}focus-ring-x, 0) var(--#{$prefix}focus-ring-y, 0) var(--#{$prefix}focus-ring-blur, 0) var(--#{$prefix}focus-ring-width) var(--#{$prefix}focus-ring-color);
}

View File

@ -1,20 +1,20 @@
@use "../mixins/transition";
@use "../setup/variables";
@use "../mixins/transition" as *;
@use "../setup/variables" as *;
.icon-link {
display: inline-flex;
gap: variables.$icon-link-gap;
gap: $icon-link-gap;
align-items: center;
text-decoration-color: rgba(var(--#{variables.$prefix}link-color-rgb), var(--#{variables.$prefix}link-opacity, .5));
text-underline-offset: variables.$icon-link-underline-offset;
text-decoration-color: rgba(var(--#{$prefix}link-color-rgb), var(--#{$prefix}link-opacity, .5));
text-underline-offset: $icon-link-underline-offset;
backface-visibility: hidden;
> .bi {
flex-shrink: 0;
width: variables.$icon-link-icon-size;
height: variables.$icon-link-icon-size;
width: $icon-link-icon-size;
height: $icon-link-icon-size;
fill: currentcolor;
@include transition.transition(variables.$icon-link-icon-transition);
@include transition($icon-link-icon-transition);
}
}
@ -22,7 +22,7 @@
&:hover,
&:focus-visible {
> .bi {
transform: var(--#{variables.$prefix}icon-link-transform, variables.$icon-link-icon-transform);
transform: var(--#{$prefix}icon-link-transform, $icon-link-icon-transform);
}
}
}

View File

@ -1,6 +1,6 @@
@use "sass:map";
@use "../mixins/breakpoints";
@use "../setup/variables";
@use "../mixins/breakpoints" as *;
@use "../setup/variables" as *;
// Shorthand
@ -9,7 +9,7 @@
top: 0;
right: 0;
left: 0;
z-index: variables.$zindex-fixed;
z-index: $zindex-fixed;
}
.fixed-bottom {
@ -17,24 +17,24 @@
right: 0;
bottom: 0;
left: 0;
z-index: variables.$zindex-fixed;
z-index: $zindex-fixed;
}
// Responsive sticky top and bottom
@each $breakpoint in map.keys(variables.$grid-breakpoints) {
@include breakpoints.media-breakpoint-up($breakpoint) {
$infix: breakpoints.breakpoint-infix($breakpoint, variables.$grid-breakpoints);
@each $breakpoint in map.keys($grid-breakpoints) {
@include media-breakpoint-up($breakpoint) {
$infix: breakpoint-infix($breakpoint, $grid-breakpoints);
.sticky#{$infix}-top {
position: sticky;
top: 0;
z-index: variables.$zindex-sticky;
z-index: $zindex-sticky;
}
.sticky#{$infix}-bottom {
position: sticky;
bottom: 0;
z-index: variables.$zindex-sticky;
z-index: $zindex-sticky;
}
}
}

View File

@ -1,4 +1,4 @@
@use "../setup/variables";
@use "../setup/variables" as *;
// Credit: Nicolas Gallagher and SUIT CSS.
@ -8,7 +8,7 @@
&::before {
display: block;
padding-top: var(--#{variables.$prefix}aspect-ratio);
padding-top: var(--#{$prefix}aspect-ratio);
content: "";
}
@ -21,8 +21,8 @@
}
}
@each $key, $ratio in variables.$aspect-ratios {
@each $key, $ratio in $aspect-ratios {
.ratio-#{$key} {
--#{variables.$prefix}aspect-ratio: #{$ratio};
--#{$prefix}aspect-ratio: #{$ratio};
}
}

View File

@ -1,17 +1,17 @@
@use "../setup/variables";
@use "../setup/variables" as *;
//
// Stretched link
//
.stretched-link {
&::#{variables.$stretched-link-pseudo-element} {
&::#{$stretched-link-pseudo-element} {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: variables.$stretched-link-z-index;
z-index: $stretched-link-z-index;
content: "";
}
}

View File

@ -1,10 +1,10 @@
@use "../setup/variables";
@use "../setup/variables" as *;
.vr {
display: inline-block;
align-self: stretch;
width: variables.$vr-border-width;
width: $vr-border-width;
min-height: 1em;
background-color: currentcolor;
opacity: variables.$hr-opacity;
opacity: $hr-opacity;
}

View File

@ -1,6 +1,6 @@
@use "sass:list";
@use "sass:meta";
@use "../setup/variables";
@use "../setup/variables" as *;
// stylelint-disable property-disallowed-list
// Single side border-radius
@ -19,8 +19,8 @@
}
// scss-docs-start border-radius-mixins
@mixin border-radius($radius: variables.$border-radius, $fallback-border-radius: false) {
@if variables.$enable-rounded {
@mixin border-radius($radius: $border-radius, $fallback-border-radius: false) {
@if $enable-rounded {
border-radius: valid-radius($radius);
}
@else if $fallback-border-radius != false {
@ -28,54 +28,54 @@
}
}
@mixin border-top-radius($radius: variables.$border-radius) {
@if variables.$enable-rounded {
@mixin border-top-radius($radius: $border-radius) {
@if $enable-rounded {
border-top-left-radius: valid-radius($radius);
border-top-right-radius: valid-radius($radius);
}
}
@mixin border-end-radius($radius: variables.$border-radius) {
@if variables.$enable-rounded {
@mixin border-end-radius($radius: $border-radius) {
@if $enable-rounded {
border-top-right-radius: valid-radius($radius);
border-bottom-right-radius: valid-radius($radius);
}
}
@mixin border-bottom-radius($radius: variables.$border-radius) {
@if variables.$enable-rounded {
@mixin border-bottom-radius($radius: $border-radius) {
@if $enable-rounded {
border-bottom-right-radius: valid-radius($radius);
border-bottom-left-radius: valid-radius($radius);
}
}
@mixin border-start-radius($radius: variables.$border-radius) {
@if variables.$enable-rounded {
@mixin border-start-radius($radius: $border-radius) {
@if $enable-rounded {
border-top-left-radius: valid-radius($radius);
border-bottom-left-radius: valid-radius($radius);
}
}
@mixin border-top-start-radius($radius: variables.$border-radius) {
@if variables.$enable-rounded {
@mixin border-top-start-radius($radius: $border-radius) {
@if $enable-rounded {
border-top-left-radius: valid-radius($radius);
}
}
@mixin border-top-end-radius($radius: variables.$border-radius) {
@if variables.$enable-rounded {
@mixin border-top-end-radius($radius: $border-radius) {
@if $enable-rounded {
border-top-right-radius: valid-radius($radius);
}
}
@mixin border-bottom-end-radius($radius: variables.$border-radius) {
@if variables.$enable-rounded {
@mixin border-bottom-end-radius($radius: $border-radius) {
@if $enable-rounded {
border-bottom-right-radius: valid-radius($radius);
}
}
@mixin border-bottom-start-radius($radius: variables.$border-radius) {
@if variables.$enable-rounded {
@mixin border-bottom-start-radius($radius: $border-radius) {
@if $enable-rounded {
border-bottom-left-radius: valid-radius($radius);
}
}

Some files were not shown because too many files have changed in this diff Show More