1
0
mirror of https://github.com/tabler/tabler.git synced 2025-12-24 10:48:14 +04:00

Release 1.0.0-beta12

This commit is contained in:
codecalm
2022-09-19 17:28:48 +02:00
parent e5f30bf831
commit c83214cc0c
235 changed files with 15889 additions and 11863 deletions

View File

@@ -1,6 +1,6 @@
/*!
* Tabler v1.0.0-beta11 (https://tabler.io)
* @version 1.0.0-beta11
* Tabler v1.0.0-beta12 (https://tabler.io)
* @version 1.0.0-beta12
* @link https://tabler.io
* Copyright 2018-2022 The Tabler Authors
* Copyright 2018-2022 codecalm.net Paweł Kuna
@@ -4658,7 +4658,7 @@
});
/*!
* Bootstrap v5.2.0 (https://getbootstrap.com/)
* Bootstrap v5.2.1 (https://getbootstrap.com/)
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
@@ -5189,7 +5189,7 @@
}
}
}
const VERSION = '5.2.0';
const VERSION = '5.2.1';
class BaseComponent extends Config {
constructor(element, config) {
super();
@@ -6033,7 +6033,7 @@
super(element, config);
this._popper = null;
this._parent = this._element.parentNode;
this._menu = SelectorEngine.findOne(SELECTOR_MENU, this._parent);
this._menu = SelectorEngine.next(this._element, SELECTOR_MENU)[0] || SelectorEngine.prev(this._element, SELECTOR_MENU)[0];
this._inNavbar = this._detectNavbar();
}
static get Default() {
@@ -6257,7 +6257,7 @@
return;
}
event.preventDefault();
const getToggleButton = SelectorEngine.findOne(SELECTOR_DATA_TOGGLE$3, event.delegateTarget.parentNode);
const getToggleButton = this.matches(SELECTOR_DATA_TOGGLE$3) ? this : SelectorEngine.prev(this, SELECTOR_DATA_TOGGLE$3)[0] || SelectorEngine.next(this, SELECTOR_DATA_TOGGLE$3)[0];
const instance = Dropdown.getOrCreateInstance(getToggleButton);
if (isUpOrDownEvent) {
event.stopPropagation();
@@ -6536,6 +6536,7 @@
const EVENT_SHOW$4 = `show${EVENT_KEY$4}`;
const EVENT_SHOWN$4 = `shown${EVENT_KEY$4}`;
const EVENT_RESIZE$1 = `resize${EVENT_KEY$4}`;
const EVENT_CLICK_DISMISS = `click.dismiss${EVENT_KEY$4}`;
const EVENT_MOUSEDOWN_DISMISS = `mousedown.dismiss${EVENT_KEY$4}`;
const EVENT_KEYDOWN_DISMISS$1 = `keydown.dismiss${EVENT_KEY$4}`;
const EVENT_CLICK_DATA_API$2 = `click${EVENT_KEY$4}${DATA_API_KEY$2}`;
@@ -6677,16 +6678,18 @@
}
});
EventHandler.on(this._element, EVENT_MOUSEDOWN_DISMISS, event => {
if (event.target !== event.currentTarget) {
return;
}
if (this._config.backdrop === 'static') {
this._triggerBackdropTransition();
return;
}
if (this._config.backdrop) {
this.hide();
}
EventHandler.one(this._element, EVENT_CLICK_DISMISS, event2 => {
if (this._dialog.contains(event.target) || this._dialog.contains(event2.target)) {
return;
}
if (this._config.backdrop === 'static') {
this._triggerBackdropTransition();
return;
}
if (this._config.backdrop) {
this.hide();
}
});
});
}
_hideModal() {
@@ -7228,7 +7231,7 @@
super(element, config);
this._isEnabled = true;
this._timeout = 0;
this._isHovered = false;
this._isHovered = null;
this._activeTrigger = {};
this._popper = null;
this._templateFactory = null;
@@ -7280,6 +7283,9 @@
if (this.tip) {
this.tip.remove();
}
if (this._config.originalTitle) {
this._element.setAttribute('title', this._config.originalTitle);
}
this._disposePopper();
super.dispose();
}
@@ -7321,12 +7327,11 @@
}
}
const complete = () => {
const previousHoverState = this._isHovered;
this._isHovered = false;
EventHandler.trigger(this._element, this.constructor.eventName(EVENT_SHOWN$2));
if (previousHoverState) {
if (this._isHovered === false) {
this._leave();
}
this._isHovered = false;
};
this._queueCallback(complete, this.tip, this._isAnimated());
}
@@ -7348,7 +7353,7 @@
this._activeTrigger[TRIGGER_CLICK] = false;
this._activeTrigger[TRIGGER_FOCUS] = false;
this._activeTrigger[TRIGGER_HOVER] = false;
this._isHovered = false;
this._isHovered = null;
const complete = () => {
if (this._isWithActiveTrigger()) {
return;
@@ -7688,13 +7693,15 @@
offset: null,
rootMargin: '0px 0px -25%',
smoothScroll: false,
target: null
target: null,
threshold: [0.1, 0.5, 1]
};
const DefaultType$1 = {
offset: '(number|null)',
rootMargin: 'string',
smoothScroll: 'boolean',
target: 'element'
target: 'element',
threshold: 'array'
};
class ScrollSpy extends BaseComponent {
constructor(element, config) {
@@ -7737,6 +7744,10 @@
}
_configAfterMerge(config) {
config.target = getElement(config.target) || document.body;
config.rootMargin = config.offset ? `${config.offset}px 0px -30%` : config.rootMargin;
if (typeof config.threshold === 'string') {
config.threshold = config.threshold.split(',').map(value => Number.parseFloat(value));
}
return config;
}
_maybeEnableSmoothScroll() {
@@ -7764,8 +7775,8 @@
_getNewObserver() {
const options = {
root: this._rootElement,
threshold: [0.1, 0.5, 1],
rootMargin: this._getRootMargin()
threshold: this._config.threshold,
rootMargin: this._config.rootMargin
};
return new IntersectionObserver(entries => this._observerCallback(entries), options);
}
@@ -7797,9 +7808,6 @@
}
}
}
_getRootMargin() {
return this._config.offset ? `${this._config.offset}px 0px -30%` : this._config.rootMargin;
}
_initializeTargetsAndObservables() {
this._targetLinks = new Map();
this._observableSections = new Map();
@@ -8298,7 +8306,7 @@
};
var getColor = function getColor(color) {
var opacity = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 1;
var c = getComputedStyle(document.documentElement).getPropertyValue("--".concat(prefix).concat(color)).trim();
var c = getComputedStyle(document.body).getPropertyValue("--".concat(prefix).concat(color)).trim();
if (opacity !== 1) {
return hexToRgba(c, opacity);
}