@haiilo/catalyst 10.10.0 → 10.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/catalyst/catalyst.css +1 -0
- package/dist/catalyst/catalyst.esm.js +1 -1
- package/dist/catalyst/catalyst.esm.js.map +1 -1
- package/dist/catalyst/{p-20919029.js → p-22f0435a.js} +3 -3
- package/dist/catalyst/p-22f0435a.js.map +1 -0
- package/dist/catalyst/p-7da486bb.entry.js +10 -0
- package/dist/catalyst/p-7da486bb.entry.js.map +1 -0
- package/dist/catalyst/scss/core/_notification.scss +1 -0
- package/dist/cjs/cat-alert_29.cjs.entry.js +1197 -1160
- package/dist/cjs/cat-alert_29.cjs.entry.js.map +1 -1
- package/dist/cjs/catalyst.cjs.js +2 -2
- package/dist/cjs/{index-13aff0b4.js → index-66a60071.js} +7 -2
- package/dist/cjs/index-66a60071.js.map +1 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/components/cat-avatar/cat-avatar.js +2 -4
- package/dist/collection/components/cat-avatar/cat-avatar.js.map +1 -1
- package/dist/collection/components/cat-button/cat-button.js +2 -4
- package/dist/collection/components/cat-button/cat-button.js.map +1 -1
- package/dist/collection/components/cat-checkbox/cat-checkbox.js +7 -7
- package/dist/collection/components/cat-checkbox/cat-checkbox.js.map +1 -1
- package/dist/collection/components/cat-date/cat-date.js +2 -2
- package/dist/collection/components/cat-date-inline/cat-date-inline.css +93 -1
- package/dist/collection/components/cat-date-inline/cat-date-inline.js +182 -11
- package/dist/collection/components/cat-date-inline/cat-date-inline.js.map +1 -1
- package/dist/collection/components/cat-datepicker/cat-datepicker.js +2 -2
- package/dist/collection/components/cat-datepicker-inline/cat-datepicker-inline.js +2 -2
- package/dist/collection/components/cat-dropdown/cat-dropdown.js +1 -1
- package/dist/collection/components/cat-form-group/cat-form-group.js +1 -1
- package/dist/collection/components/cat-icon/cat-icon.js +1 -1
- package/dist/collection/components/cat-input/cat-input.css +1 -0
- package/dist/collection/components/cat-input/cat-input.js +10 -10
- package/dist/collection/components/cat-input/cat-input.js.map +1 -1
- package/dist/collection/components/cat-pagination/cat-pagination.js +2 -2
- package/dist/collection/components/cat-radio/cat-radio.js +7 -7
- package/dist/collection/components/cat-radio/cat-radio.js.map +1 -1
- package/dist/collection/components/cat-radio-group/cat-radio-group.js +1 -1
- package/dist/collection/components/cat-scrollable/cat-scrollable.js +3 -3
- package/dist/collection/components/cat-select/cat-select.js +10 -10
- package/dist/collection/components/cat-select/cat-select.js.map +1 -1
- package/dist/collection/components/cat-select-demo/cat-select-demo.js +1 -1
- package/dist/collection/components/cat-skeleton/cat-skeleton.js +1 -1
- package/dist/collection/components/cat-spinner/cat-spinner.js +2 -2
- package/dist/collection/components/cat-tab/cat-tab.js +1 -1
- package/dist/collection/components/cat-tabs/cat-tabs.js +1 -1
- package/dist/collection/components/cat-textarea/cat-textarea.js +9 -9
- package/dist/collection/components/cat-textarea/cat-textarea.js.map +1 -1
- package/dist/collection/components/cat-time/cat-time.js +1 -1
- package/dist/collection/components/cat-toggle/cat-toggle.js +7 -7
- package/dist/collection/components/cat-toggle/cat-toggle.js.map +1 -1
- package/dist/collection/components/cat-tooltip/cat-tooltip.js +3 -3
- package/dist/collection/components/cat-tooltip/cat-tooltip.js.map +1 -1
- package/dist/collection/scss/core/_notification.scss +1 -0
- package/dist/collection/utils/assert.js +9 -0
- package/dist/collection/utils/assert.js.map +1 -0
- package/dist/components/assert.js +13 -0
- package/dist/components/assert.js.map +1 -0
- package/dist/components/cat-avatar2.js +2 -4
- package/dist/components/cat-avatar2.js.map +1 -1
- package/dist/components/cat-button2.js +2 -3
- package/dist/components/cat-button2.js.map +1 -1
- package/dist/components/cat-checkbox2.js +7 -7
- package/dist/components/cat-checkbox2.js.map +1 -1
- package/dist/components/cat-date-inline2.js +57 -13
- package/dist/components/cat-date-inline2.js.map +1 -1
- package/dist/components/cat-date.js +2 -2
- package/dist/components/cat-datepicker-inline.js +2 -2
- package/dist/components/cat-datepicker.js +2 -2
- package/dist/components/cat-dropdown2.js +2 -574
- package/dist/components/cat-dropdown2.js.map +1 -1
- package/dist/components/cat-form-group.js +1 -1
- package/dist/components/cat-icon2.js +1 -1
- package/dist/components/cat-input2.js +11 -11
- package/dist/components/cat-input2.js.map +1 -1
- package/dist/components/cat-pagination.js +2 -2
- package/dist/components/cat-radio-group.js +1 -1
- package/dist/components/cat-radio.js +7 -7
- package/dist/components/cat-radio.js.map +1 -1
- package/dist/components/cat-scrollable2.js +3 -3
- package/dist/components/cat-select-demo.js +1 -1
- package/dist/components/cat-select2.js +10 -10
- package/dist/components/cat-select2.js.map +1 -1
- package/dist/components/cat-skeleton2.js +1 -1
- package/dist/components/cat-spinner2.js +2 -2
- package/dist/components/cat-tab.js +1 -1
- package/dist/components/cat-tabs.js +1 -1
- package/dist/components/cat-textarea.js +9 -9
- package/dist/components/cat-textarea.js.map +1 -1
- package/dist/components/cat-time.js +1 -1
- package/dist/components/cat-toggle.js +7 -7
- package/dist/components/cat-toggle.js.map +1 -1
- package/dist/components/cat-tooltip.js +3 -3
- package/dist/components/cat-tooltip.js.map +1 -1
- package/dist/components/first-tabbable.js +576 -0
- package/dist/components/first-tabbable.js.map +1 -0
- package/dist/esm/cat-alert_29.entry.js +1197 -1160
- package/dist/esm/cat-alert_29.entry.js.map +1 -1
- package/dist/esm/catalyst.js +3 -3
- package/dist/esm/{index-ecb4a974.js → index-b7832dfc.js} +7 -2
- package/dist/esm/index-b7832dfc.js.map +1 -0
- package/dist/esm/loader.js +3 -3
- package/dist/types/components/cat-date-inline/cat-date-inline.d.ts +38 -0
- package/dist/types/components.d.ts +53 -0
- package/dist/types/utils/assert.d.ts +1 -0
- package/package.json +2 -2
- package/dist/catalyst/p-20919029.js.map +0 -1
- package/dist/catalyst/p-ff4075a2.entry.js +0 -10
- package/dist/catalyst/p-ff4075a2.entry.js.map +0 -1
- package/dist/cjs/index-13aff0b4.js.map +0 -1
- package/dist/esm/index-ecb4a974.js.map +0 -1
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-66a60071.js');
|
|
6
6
|
const of = require('./of-f2844da8.js');
|
|
7
7
|
|
|
8
8
|
const ObjectUnsubscribedError = of.createErrorClass((_super) => function ObjectUnsubscribedErrorImpl() {
|
|
@@ -829,6 +829,14 @@ const CatAlert = class {
|
|
|
829
829
|
};
|
|
830
830
|
CatAlert.style = CatAlertStyle0;
|
|
831
831
|
|
|
832
|
+
function delayedAssertWarn(component, assertion, message, timeout = 500) {
|
|
833
|
+
window.setTimeout(() => {
|
|
834
|
+
if (!assertion()) {
|
|
835
|
+
of.log.warn(message, component);
|
|
836
|
+
}
|
|
837
|
+
}, timeout);
|
|
838
|
+
}
|
|
839
|
+
|
|
832
840
|
/**
|
|
833
841
|
* Loads an image and wraps the result in a promise.
|
|
834
842
|
*
|
|
@@ -872,9 +880,7 @@ const CatAvatar = class {
|
|
|
872
880
|
this.onSrcChanged(this.src);
|
|
873
881
|
}
|
|
874
882
|
componentWillRender() {
|
|
875
|
-
|
|
876
|
-
of.log.warn('[A11y] Missing ARIA label on avatar', this);
|
|
877
|
-
}
|
|
883
|
+
delayedAssertWarn(this, () => !!this.label, '[A11y] Missing ARIA label on avatar');
|
|
878
884
|
}
|
|
879
885
|
render() {
|
|
880
886
|
if (this.url) {
|
|
@@ -1101,9 +1107,7 @@ const CatButton = class {
|
|
|
1101
1107
|
this.onIconOnlyChanged(this.iconOnly);
|
|
1102
1108
|
}
|
|
1103
1109
|
componentWillRender() {
|
|
1104
|
-
|
|
1105
|
-
of.log.warn('[A11y] Missing ARIA label on icon button', this);
|
|
1106
|
-
}
|
|
1110
|
+
delayedAssertWarn(this, () => !this.isIconButton || !!this.a11yLabel, '[A11y] Missing ARIA label on icon button');
|
|
1107
1111
|
}
|
|
1108
1112
|
haltDisabledEvents(event) {
|
|
1109
1113
|
if (this.disabled || this.loading) {
|
|
@@ -1274,14 +1278,14 @@ const CatFormHint = props => {
|
|
|
1274
1278
|
const catCheckboxCss = ".hint-wrapper{flex:0 1 auto;display:flex;gap:0.5rem}.hint-section{flex:1 1 auto;display:flex;flex-direction:column;gap:0.25rem;color:rgb(var(--cat-font-color-muted, 81, 92, 108));font-size:0.875rem;line-height:1.125rem}.hint-section .input-hint,.hint-section ::slotted([slot=hint]){margin:0 !important}:host{display:flex;flex-direction:column;gap:0.25rem}:host([hidden]){display:none}label{flex:0 1 auto;display:flex;gap:0.5rem;font-size:0.9375rem;line-height:1.25rem;font-weight:var(--cat-font-weight-body, 400);-webkit-user-select:none;-ms-user-select:none;user-select:none;cursor:pointer;position:relative}.label-left{flex-direction:row-reverse}.label-left input{right:1px;left:unset}input{position:absolute;width:1.25rem;height:1.25rem;margin:0;opacity:0;cursor:inherit;left:1px;top:0.5px}.box-placeholder{width:calc(1.25rem + 2px);flex-shrink:0}.box{flex:0 0 auto;display:flex;position:relative;height:1.25rem;width:1.25rem;background-color:white;border:1px solid rgb(var(--cat-border-color-dark, 215, 219, 224));border-radius:var(--cat-border-radius-s, 0.125rem);transition:background-color 125ms ease, border-color 125ms ease;pointer-events:none;box-sizing:border-box}.box svg{fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:16px;stroke-dashoffset:16px;transition:all 125ms ease;width:50%;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%) scale(0.99)}:checked+.box{background-color:rgb(var(--cat-primary-bg, 0, 129, 148));border-color:rgb(var(--cat-primary-bg, 0, 129, 148));stroke:rgb(var(--cat-primary-fill, 255, 255, 255))}:checked+.box .check{stroke-dashoffset:0}:indeterminate+.box{background-color:rgb(var(--cat-primary-bg, 0, 129, 148));border-color:rgb(var(--cat-primary-bg, 0, 129, 148));stroke:rgb(var(--cat-primary-fill, 255, 255, 255))}:indeterminate+.box .check{stroke-dashoffset:16px}:indeterminate+.box .dash{stroke-dashoffset:0}:focus-visible+.box{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:1px}.is-disabled .box{background-color:#f2f4f7;border-color:rgb(var(--cat-border-color-dark, 215, 219, 224));stroke:rgb(var(--cat-font-color-muted, 81, 92, 108))}:host(.cat-error) .box{border:1px solid rgb(var(--cat-danger-bg, 217, 52, 13))}:host(.cat-error) :checked+.box,:host(.cat-error) :indeterminate+.box{background-color:rgb(var(--cat-danger-bg, 217, 52, 13));border-color:rgb(var(--cat-danger-bg, 217, 52, 13));stroke:rgb(var(--cat-danger-fill, 255, 255, 255))}.label{flex:1 1 auto;min-width:0}.is-hidden .label{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.is-disabled{cursor:not-allowed;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}";
|
|
1275
1279
|
const CatCheckboxStyle0 = catCheckboxCss;
|
|
1276
1280
|
|
|
1277
|
-
let nextUniqueId$
|
|
1281
|
+
let nextUniqueId$9 = 0;
|
|
1278
1282
|
const CatCheckbox = class {
|
|
1279
1283
|
constructor(hostRef) {
|
|
1280
1284
|
index.registerInstance(this, hostRef);
|
|
1281
1285
|
this.catChange = index.createEvent(this, "catChange", 7);
|
|
1282
1286
|
this.catFocus = index.createEvent(this, "catFocus", 7);
|
|
1283
1287
|
this.catBlur = index.createEvent(this, "catBlur", 7);
|
|
1284
|
-
this._id = `cat-checkbox-${nextUniqueId$
|
|
1288
|
+
this._id = `cat-checkbox-${nextUniqueId$9++}`;
|
|
1285
1289
|
this.hasSlottedLabel = false;
|
|
1286
1290
|
this.hasSlottedHint = false;
|
|
1287
1291
|
this.checked = false;
|
|
@@ -1306,11 +1310,11 @@ const CatCheckbox = class {
|
|
|
1306
1310
|
this.updateResolved();
|
|
1307
1311
|
}
|
|
1308
1312
|
componentWillRender() {
|
|
1309
|
-
this
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
}
|
|
1313
|
+
delayedAssertWarn(this, () => {
|
|
1314
|
+
this.hasSlottedLabel = !!this.hostElement.querySelector('[slot="label"]');
|
|
1315
|
+
this.hasSlottedHint = !!this.hostElement.querySelector('[slot="hint"]');
|
|
1316
|
+
return !!this.label && !!this.hasSlottedLabel;
|
|
1317
|
+
}, '[A11y] Missing ARIA label on checkbox');
|
|
1314
1318
|
}
|
|
1315
1319
|
/**
|
|
1316
1320
|
* Programmatically move focus to the checkbox. Use this method instead of
|
|
@@ -1330,7 +1334,7 @@ const CatCheckbox = class {
|
|
|
1330
1334
|
this.input.blur();
|
|
1331
1335
|
}
|
|
1332
1336
|
render() {
|
|
1333
|
-
return (index.h(index.Host, { key: '
|
|
1337
|
+
return (index.h(index.Host, { key: '5efdf8a487237dfab88847b5f15a7de8e3404319' }, index.h("label", { key: '90407428ff977ece074488ccd983cb49fe6c4466', htmlFor: this.id, class: { 'is-hidden': this.labelHidden, 'is-disabled': this.disabled, 'label-left': this.labelLeft } }, index.h("input", { key: '80e567b42cb7a7ff5198eb65d5a85c314f86c0de', ...this.nativeAttributes, part: "input", ref: el => (this.input = el), id: this.id, type: "checkbox", name: this.name, value: this.value, checked: this.checked, required: this.required, disabled: this.disabled, indeterminate: this.indeterminate, onInput: this.onInput.bind(this), onFocus: this.onFocus.bind(this), onBlur: this.onBlur.bind(this), "aria-describedby": this.hasHint ? this.id + '-hint' : undefined }), index.h("span", { key: 'cab29bf428688d081e349a2bee31ed96675e3e20', class: "box", "aria-hidden": "true" }, index.h("svg", { key: '8fd0c4e8a2da90ebe65ce3bb367be1cf2e33580f', class: "check", viewBox: "0 0 12 10" }, index.h("polyline", { key: '5ecf20ab3a3db027c74943e281780b83bd7b2279', points: "1.5 6 4.5 9 10.5 1" })), index.h("svg", { key: '6b4d8857b893ae35578eceec9b1af5f9796e9b0c', class: "dash", viewBox: "0 0 12 10" }, index.h("polyline", { key: '3863523f8fb8ca58db3e2035082569730052d2cb', points: "1.5 5 10.5 5" }))), index.h("span", { key: 'cbecd65f620071056171dbea72a3dbc7ecf49c3c', class: "label", part: "label" }, (this.hasSlottedLabel && index.h("slot", { name: "label" })) || this.label)), this.hasHint && (index.h("div", { class: { 'hint-wrapper': true, 'label-left': this.labelLeft } }, index.h("div", { class: "box-placeholder" }), index.h(CatFormHint, { id: this.id, hint: this.hint, slottedHint: this.hasSlottedHint && index.h("slot", { name: "hint" }) })))));
|
|
1334
1338
|
}
|
|
1335
1339
|
get hasHint() {
|
|
1336
1340
|
return !!this.hint || !!this.hasSlottedHint;
|
|
@@ -1552,13 +1556,13 @@ const CatDate = class {
|
|
|
1552
1556
|
this.input?.clear();
|
|
1553
1557
|
}
|
|
1554
1558
|
render() {
|
|
1555
|
-
return (index.h(index.Host, { key: '
|
|
1559
|
+
return (index.h(index.Host, { key: 'f5a95ae7b8d801b09751585a749b563ac3b467d9' }, index.h("cat-input", { key: '8692325d46263e98e2042cc9c942c03fe454d437', class: "cat-date-input", ref: el => (this.input = el), requiredMarker: this.requiredMarker, horizontal: this.horizontal, autoComplete: this.autoComplete, clearable: this.clearable, disabled: this.disabled, hint: this.hint, icon: this.icon, iconRight: this.iconRight, identifier: this.identifier, labelHidden: this.labelHidden, name: this.name, placeholder: this.placeholder, textPrefix: this.textPrefix, textSuffix: this.textSuffix, readonly: this.readonly, required: this.required, errors: this.errors, errorUpdate: this.errorUpdate, nativeAttributes: this.nativeAttributes, value: this.inputValue, onCatFocus: e => {
|
|
1556
1560
|
e.stopPropagation();
|
|
1557
1561
|
this.catFocus.emit(e.detail);
|
|
1558
1562
|
}, onCatBlur: e => {
|
|
1559
1563
|
e.stopPropagation();
|
|
1560
1564
|
this.onInputBlur(e.detail);
|
|
1561
|
-
} }, index.h("span", { key: '
|
|
1565
|
+
} }, index.h("span", { key: '61ea426899cddf6a1bd0ea2aade482fc95fcc904', slot: "label" }, this.label, index.h("span", { key: 'f6c85edf175d11eb6fcc0a710086cbe759250b9f', class: "label-aria" }, " (", this.locale.formatStr, ")")), index.h("cat-dropdown", { key: 'bd615d69e6965dcef9a9eb7decdd7967838a0e77', slot: "addon", placement: this.placement, arrowNavigation: "none", noResize: true, onCatOpen: () => this.dateInline?.resetView() }, index.h("cat-button", { key: '7cec0bd3dedf351dcdd6c149843c024869086738', slot: "trigger", icon: "$cat:datepicker-calendar", iconOnly: true, class: "cat-date-toggle", disabled: this.disabled, a11yLabel: this.getTriggerA11yLabel() }), index.h("div", { key: '969d9af17678a28e16367d486081a7b46584fad5', slot: "content" }, index.h("cat-date-inline", { key: 'f3f190a0bbfece0ba3b50e9f56d9c853528844a5', ref: el => (this.dateInline = el), min: this.min, max: this.max, value: this.value, hint: true, weeks: true, noClear: true, onCatChange: this.onDateChange.bind(this) }))))));
|
|
1562
1566
|
}
|
|
1563
1567
|
getTriggerA11yLabel() {
|
|
1564
1568
|
const date = this.locale.fromLocalISO(this.value);
|
|
@@ -1632,53 +1636,646 @@ const CatDate = class {
|
|
|
1632
1636
|
};
|
|
1633
1637
|
CatDate.style = CatDateStyle0;
|
|
1634
1638
|
|
|
1635
|
-
|
|
1636
|
-
|
|
1639
|
+
/*!
|
|
1640
|
+
* tabbable 6.2.0
|
|
1641
|
+
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
1642
|
+
*/
|
|
1643
|
+
// NOTE: separate `:not()` selectors has broader browser support than the newer
|
|
1644
|
+
// `:not([inert], [inert] *)` (Feb 2023)
|
|
1645
|
+
// CAREFUL: JSDom does not support `:not([inert] *)` as a selector; using it causes
|
|
1646
|
+
// the entire query to fail, resulting in no nodes found, which will break a lot
|
|
1647
|
+
// of things... so we have to rely on JS to identify nodes inside an inert container
|
|
1648
|
+
var candidateSelectors = ['input:not([inert])', 'select:not([inert])', 'textarea:not([inert])', 'a[href]:not([inert])', 'button:not([inert])', '[tabindex]:not(slot):not([inert])', 'audio[controls]:not([inert])', 'video[controls]:not([inert])', '[contenteditable]:not([contenteditable="false"]):not([inert])', 'details>summary:first-of-type:not([inert])', 'details:not([inert])'];
|
|
1649
|
+
var candidateSelector = /* #__PURE__ */candidateSelectors.join(',');
|
|
1650
|
+
var NoElement = typeof Element === 'undefined';
|
|
1651
|
+
var matches = NoElement ? function () {} : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;
|
|
1652
|
+
var getRootNode = !NoElement && Element.prototype.getRootNode ? function (element) {
|
|
1653
|
+
var _element$getRootNode;
|
|
1654
|
+
return element === null || element === void 0 ? void 0 : (_element$getRootNode = element.getRootNode) === null || _element$getRootNode === void 0 ? void 0 : _element$getRootNode.call(element);
|
|
1655
|
+
} : function (element) {
|
|
1656
|
+
return element === null || element === void 0 ? void 0 : element.ownerDocument;
|
|
1657
|
+
};
|
|
1637
1658
|
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1659
|
+
/**
|
|
1660
|
+
* Determines if a node is inert or in an inert ancestor.
|
|
1661
|
+
* @param {Element} [node]
|
|
1662
|
+
* @param {boolean} [lookUp] If true and `node` is not inert, looks up at ancestors to
|
|
1663
|
+
* see if any of them are inert. If false, only `node` itself is considered.
|
|
1664
|
+
* @returns {boolean} True if inert itself or by way of being in an inert ancestor.
|
|
1665
|
+
* False if `node` is falsy.
|
|
1666
|
+
*/
|
|
1667
|
+
var isInert = function isInert(node, lookUp) {
|
|
1668
|
+
var _node$getAttribute;
|
|
1669
|
+
if (lookUp === void 0) {
|
|
1670
|
+
lookUp = true;
|
|
1671
|
+
}
|
|
1672
|
+
// CAREFUL: JSDom does not support inert at all, so we can't use the `HTMLElement.inert`
|
|
1673
|
+
// JS API property; we have to check the attribute, which can either be empty or 'true';
|
|
1674
|
+
// if it's `null` (not specified) or 'false', it's an active element
|
|
1675
|
+
var inertAtt = node === null || node === void 0 ? void 0 : (_node$getAttribute = node.getAttribute) === null || _node$getAttribute === void 0 ? void 0 : _node$getAttribute.call(node, 'inert');
|
|
1676
|
+
var inert = inertAtt === '' || inertAtt === 'true';
|
|
1677
|
+
|
|
1678
|
+
// NOTE: this could also be handled with `node.matches('[inert], :is([inert] *)')`
|
|
1679
|
+
// if it weren't for `matches()` not being a function on shadow roots; the following
|
|
1680
|
+
// code works for any kind of node
|
|
1681
|
+
// CAREFUL: JSDom does not appear to support certain selectors like `:not([inert] *)`
|
|
1682
|
+
// so it likely would not support `:is([inert] *)` either...
|
|
1683
|
+
var result = inert || lookUp && node && isInert(node.parentNode); // recursive
|
|
1684
|
+
|
|
1685
|
+
return result;
|
|
1686
|
+
};
|
|
1687
|
+
|
|
1688
|
+
/**
|
|
1689
|
+
* Determines if a node's content is editable.
|
|
1690
|
+
* @param {Element} [node]
|
|
1691
|
+
* @returns True if it's content-editable; false if it's not or `node` is falsy.
|
|
1692
|
+
*/
|
|
1693
|
+
var isContentEditable = function isContentEditable(node) {
|
|
1694
|
+
var _node$getAttribute2;
|
|
1695
|
+
// CAREFUL: JSDom does not support the `HTMLElement.isContentEditable` API so we have
|
|
1696
|
+
// to use the attribute directly to check for this, which can either be empty or 'true';
|
|
1697
|
+
// if it's `null` (not specified) or 'false', it's a non-editable element
|
|
1698
|
+
var attValue = node === null || node === void 0 ? void 0 : (_node$getAttribute2 = node.getAttribute) === null || _node$getAttribute2 === void 0 ? void 0 : _node$getAttribute2.call(node, 'contenteditable');
|
|
1699
|
+
return attValue === '' || attValue === 'true';
|
|
1700
|
+
};
|
|
1701
|
+
|
|
1702
|
+
/**
|
|
1703
|
+
* @param {Element} el container to check in
|
|
1704
|
+
* @param {boolean} includeContainer add container to check
|
|
1705
|
+
* @param {(node: Element) => boolean} filter filter candidates
|
|
1706
|
+
* @returns {Element[]}
|
|
1707
|
+
*/
|
|
1708
|
+
var getCandidates = function getCandidates(el, includeContainer, filter) {
|
|
1709
|
+
// even if `includeContainer=false`, we still have to check it for inertness because
|
|
1710
|
+
// if it's inert, all its children are inert
|
|
1711
|
+
if (isInert(el)) {
|
|
1712
|
+
return [];
|
|
1713
|
+
}
|
|
1714
|
+
var candidates = Array.prototype.slice.apply(el.querySelectorAll(candidateSelector));
|
|
1715
|
+
if (includeContainer && matches.call(el, candidateSelector)) {
|
|
1716
|
+
candidates.unshift(el);
|
|
1717
|
+
}
|
|
1718
|
+
candidates = candidates.filter(filter);
|
|
1719
|
+
return candidates;
|
|
1720
|
+
};
|
|
1721
|
+
|
|
1722
|
+
/**
|
|
1723
|
+
* @callback GetShadowRoot
|
|
1724
|
+
* @param {Element} element to check for shadow root
|
|
1725
|
+
* @returns {ShadowRoot|boolean} ShadowRoot if available or boolean indicating if a shadowRoot is attached but not available.
|
|
1726
|
+
*/
|
|
1727
|
+
|
|
1728
|
+
/**
|
|
1729
|
+
* @callback ShadowRootFilter
|
|
1730
|
+
* @param {Element} shadowHostNode the element which contains shadow content
|
|
1731
|
+
* @returns {boolean} true if a shadow root could potentially contain valid candidates.
|
|
1732
|
+
*/
|
|
1733
|
+
|
|
1734
|
+
/**
|
|
1735
|
+
* @typedef {Object} CandidateScope
|
|
1736
|
+
* @property {Element} scopeParent contains inner candidates
|
|
1737
|
+
* @property {Element[]} candidates list of candidates found in the scope parent
|
|
1738
|
+
*/
|
|
1739
|
+
|
|
1740
|
+
/**
|
|
1741
|
+
* @typedef {Object} IterativeOptions
|
|
1742
|
+
* @property {GetShadowRoot|boolean} getShadowRoot true if shadow support is enabled; falsy if not;
|
|
1743
|
+
* if a function, implies shadow support is enabled and either returns the shadow root of an element
|
|
1744
|
+
* or a boolean stating if it has an undisclosed shadow root
|
|
1745
|
+
* @property {(node: Element) => boolean} filter filter candidates
|
|
1746
|
+
* @property {boolean} flatten if true then result will flatten any CandidateScope into the returned list
|
|
1747
|
+
* @property {ShadowRootFilter} shadowRootFilter filter shadow roots;
|
|
1748
|
+
*/
|
|
1749
|
+
|
|
1750
|
+
/**
|
|
1751
|
+
* @param {Element[]} elements list of element containers to match candidates from
|
|
1752
|
+
* @param {boolean} includeContainer add container list to check
|
|
1753
|
+
* @param {IterativeOptions} options
|
|
1754
|
+
* @returns {Array.<Element|CandidateScope>}
|
|
1755
|
+
*/
|
|
1756
|
+
var getCandidatesIteratively = function getCandidatesIteratively(elements, includeContainer, options) {
|
|
1757
|
+
var candidates = [];
|
|
1758
|
+
var elementsToCheck = Array.from(elements);
|
|
1759
|
+
while (elementsToCheck.length) {
|
|
1760
|
+
var element = elementsToCheck.shift();
|
|
1761
|
+
if (isInert(element, false)) {
|
|
1762
|
+
// no need to look up since we're drilling down
|
|
1763
|
+
// anything inside this container will also be inert
|
|
1764
|
+
continue;
|
|
1661
1765
|
}
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1766
|
+
if (element.tagName === 'SLOT') {
|
|
1767
|
+
// add shadow dom slot scope (slot itself cannot be focusable)
|
|
1768
|
+
var assigned = element.assignedElements();
|
|
1769
|
+
var content = assigned.length ? assigned : element.children;
|
|
1770
|
+
var nestedCandidates = getCandidatesIteratively(content, true, options);
|
|
1771
|
+
if (options.flatten) {
|
|
1772
|
+
candidates.push.apply(candidates, nestedCandidates);
|
|
1773
|
+
} else {
|
|
1774
|
+
candidates.push({
|
|
1775
|
+
scopeParent: element,
|
|
1776
|
+
candidates: nestedCandidates
|
|
1777
|
+
});
|
|
1778
|
+
}
|
|
1779
|
+
} else {
|
|
1780
|
+
// check candidate element
|
|
1781
|
+
var validCandidate = matches.call(element, candidateSelector);
|
|
1782
|
+
if (validCandidate && options.filter(element) && (includeContainer || !elements.includes(element))) {
|
|
1783
|
+
candidates.push(element);
|
|
1784
|
+
}
|
|
1785
|
+
|
|
1786
|
+
// iterate over shadow content if possible
|
|
1787
|
+
var shadowRoot = element.shadowRoot ||
|
|
1788
|
+
// check for an undisclosed shadow
|
|
1789
|
+
typeof options.getShadowRoot === 'function' && options.getShadowRoot(element);
|
|
1790
|
+
|
|
1791
|
+
// no inert look up because we're already drilling down and checking for inertness
|
|
1792
|
+
// on the way down, so all containers to this root node should have already been
|
|
1793
|
+
// vetted as non-inert
|
|
1794
|
+
var validShadowRoot = !isInert(shadowRoot, false) && (!options.shadowRootFilter || options.shadowRootFilter(element));
|
|
1795
|
+
if (shadowRoot && validShadowRoot) {
|
|
1796
|
+
// add shadow dom scope IIF a shadow root node was given; otherwise, an undisclosed
|
|
1797
|
+
// shadow exists, so look at light dom children as fallback BUT create a scope for any
|
|
1798
|
+
// child candidates found because they're likely slotted elements (elements that are
|
|
1799
|
+
// children of the web component element (which has the shadow), in the light dom, but
|
|
1800
|
+
// slotted somewhere _inside_ the undisclosed shadow) -- the scope is created below,
|
|
1801
|
+
// _after_ we return from this recursive call
|
|
1802
|
+
var _nestedCandidates = getCandidatesIteratively(shadowRoot === true ? element.children : shadowRoot.children, true, options);
|
|
1803
|
+
if (options.flatten) {
|
|
1804
|
+
candidates.push.apply(candidates, _nestedCandidates);
|
|
1805
|
+
} else {
|
|
1806
|
+
candidates.push({
|
|
1807
|
+
scopeParent: element,
|
|
1808
|
+
candidates: _nestedCandidates
|
|
1809
|
+
});
|
|
1669
1810
|
}
|
|
1811
|
+
} else {
|
|
1812
|
+
// there's not shadow so just dig into the element's (light dom) children
|
|
1813
|
+
// __without__ giving the element special scope treatment
|
|
1814
|
+
elementsToCheck.unshift.apply(elementsToCheck, element.children);
|
|
1815
|
+
}
|
|
1670
1816
|
}
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1817
|
+
}
|
|
1818
|
+
return candidates;
|
|
1819
|
+
};
|
|
1820
|
+
|
|
1821
|
+
/**
|
|
1822
|
+
* @private
|
|
1823
|
+
* Determines if the node has an explicitly specified `tabindex` attribute.
|
|
1824
|
+
* @param {HTMLElement} node
|
|
1825
|
+
* @returns {boolean} True if so; false if not.
|
|
1826
|
+
*/
|
|
1827
|
+
var hasTabIndex = function hasTabIndex(node) {
|
|
1828
|
+
return !isNaN(parseInt(node.getAttribute('tabindex'), 10));
|
|
1829
|
+
};
|
|
1830
|
+
|
|
1831
|
+
/**
|
|
1832
|
+
* Determine the tab index of a given node.
|
|
1833
|
+
* @param {HTMLElement} node
|
|
1834
|
+
* @returns {number} Tab order (negative, 0, or positive number).
|
|
1835
|
+
* @throws {Error} If `node` is falsy.
|
|
1836
|
+
*/
|
|
1837
|
+
var getTabIndex = function getTabIndex(node) {
|
|
1838
|
+
if (!node) {
|
|
1839
|
+
throw new Error('No node provided');
|
|
1840
|
+
}
|
|
1841
|
+
if (node.tabIndex < 0) {
|
|
1842
|
+
// in Chrome, <details/>, <audio controls/> and <video controls/> elements get a default
|
|
1843
|
+
// `tabIndex` of -1 when the 'tabindex' attribute isn't specified in the DOM,
|
|
1844
|
+
// yet they are still part of the regular tab order; in FF, they get a default
|
|
1845
|
+
// `tabIndex` of 0; since Chrome still puts those elements in the regular tab
|
|
1846
|
+
// order, consider their tab index to be 0.
|
|
1847
|
+
// Also browsers do not return `tabIndex` correctly for contentEditable nodes;
|
|
1848
|
+
// so if they don't have a tabindex attribute specifically set, assume it's 0.
|
|
1849
|
+
if ((/^(AUDIO|VIDEO|DETAILS)$/.test(node.tagName) || isContentEditable(node)) && !hasTabIndex(node)) {
|
|
1850
|
+
return 0;
|
|
1679
1851
|
}
|
|
1680
|
-
|
|
1681
|
-
|
|
1852
|
+
}
|
|
1853
|
+
return node.tabIndex;
|
|
1854
|
+
};
|
|
1855
|
+
|
|
1856
|
+
/**
|
|
1857
|
+
* Determine the tab index of a given node __for sort order purposes__.
|
|
1858
|
+
* @param {HTMLElement} node
|
|
1859
|
+
* @param {boolean} [isScope] True for a custom element with shadow root or slot that, by default,
|
|
1860
|
+
* has tabIndex -1, but needs to be sorted by document order in order for its content to be
|
|
1861
|
+
* inserted into the correct sort position.
|
|
1862
|
+
* @returns {number} Tab order (negative, 0, or positive number).
|
|
1863
|
+
*/
|
|
1864
|
+
var getSortOrderTabIndex = function getSortOrderTabIndex(node, isScope) {
|
|
1865
|
+
var tabIndex = getTabIndex(node);
|
|
1866
|
+
if (tabIndex < 0 && isScope && !hasTabIndex(node)) {
|
|
1867
|
+
return 0;
|
|
1868
|
+
}
|
|
1869
|
+
return tabIndex;
|
|
1870
|
+
};
|
|
1871
|
+
var sortOrderedTabbables = function sortOrderedTabbables(a, b) {
|
|
1872
|
+
return a.tabIndex === b.tabIndex ? a.documentOrder - b.documentOrder : a.tabIndex - b.tabIndex;
|
|
1873
|
+
};
|
|
1874
|
+
var isInput = function isInput(node) {
|
|
1875
|
+
return node.tagName === 'INPUT';
|
|
1876
|
+
};
|
|
1877
|
+
var isHiddenInput = function isHiddenInput(node) {
|
|
1878
|
+
return isInput(node) && node.type === 'hidden';
|
|
1879
|
+
};
|
|
1880
|
+
var isDetailsWithSummary = function isDetailsWithSummary(node) {
|
|
1881
|
+
var r = node.tagName === 'DETAILS' && Array.prototype.slice.apply(node.children).some(function (child) {
|
|
1882
|
+
return child.tagName === 'SUMMARY';
|
|
1883
|
+
});
|
|
1884
|
+
return r;
|
|
1885
|
+
};
|
|
1886
|
+
var getCheckedRadio = function getCheckedRadio(nodes, form) {
|
|
1887
|
+
for (var i = 0; i < nodes.length; i++) {
|
|
1888
|
+
if (nodes[i].checked && nodes[i].form === form) {
|
|
1889
|
+
return nodes[i];
|
|
1890
|
+
}
|
|
1891
|
+
}
|
|
1892
|
+
};
|
|
1893
|
+
var isTabbableRadio = function isTabbableRadio(node) {
|
|
1894
|
+
if (!node.name) {
|
|
1895
|
+
return true;
|
|
1896
|
+
}
|
|
1897
|
+
var radioScope = node.form || getRootNode(node);
|
|
1898
|
+
var queryRadios = function queryRadios(name) {
|
|
1899
|
+
return radioScope.querySelectorAll('input[type="radio"][name="' + name + '"]');
|
|
1900
|
+
};
|
|
1901
|
+
var radioSet;
|
|
1902
|
+
if (typeof window !== 'undefined' && typeof window.CSS !== 'undefined' && typeof window.CSS.escape === 'function') {
|
|
1903
|
+
radioSet = queryRadios(window.CSS.escape(node.name));
|
|
1904
|
+
} else {
|
|
1905
|
+
try {
|
|
1906
|
+
radioSet = queryRadios(node.name);
|
|
1907
|
+
} catch (err) {
|
|
1908
|
+
// eslint-disable-next-line no-console
|
|
1909
|
+
console.error('Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s', err.message);
|
|
1910
|
+
return false;
|
|
1911
|
+
}
|
|
1912
|
+
}
|
|
1913
|
+
var checked = getCheckedRadio(radioSet, node.form);
|
|
1914
|
+
return !checked || checked === node;
|
|
1915
|
+
};
|
|
1916
|
+
var isRadio = function isRadio(node) {
|
|
1917
|
+
return isInput(node) && node.type === 'radio';
|
|
1918
|
+
};
|
|
1919
|
+
var isNonTabbableRadio = function isNonTabbableRadio(node) {
|
|
1920
|
+
return isRadio(node) && !isTabbableRadio(node);
|
|
1921
|
+
};
|
|
1922
|
+
|
|
1923
|
+
// determines if a node is ultimately attached to the window's document
|
|
1924
|
+
var isNodeAttached = function isNodeAttached(node) {
|
|
1925
|
+
var _nodeRoot;
|
|
1926
|
+
// The root node is the shadow root if the node is in a shadow DOM; some document otherwise
|
|
1927
|
+
// (but NOT _the_ document; see second 'If' comment below for more).
|
|
1928
|
+
// If rootNode is shadow root, it'll have a host, which is the element to which the shadow
|
|
1929
|
+
// is attached, and the one we need to check if it's in the document or not (because the
|
|
1930
|
+
// shadow, and all nodes it contains, is never considered in the document since shadows
|
|
1931
|
+
// behave like self-contained DOMs; but if the shadow's HOST, which is part of the document,
|
|
1932
|
+
// is hidden, or is not in the document itself but is detached, it will affect the shadow's
|
|
1933
|
+
// visibility, including all the nodes it contains). The host could be any normal node,
|
|
1934
|
+
// or a custom element (i.e. web component). Either way, that's the one that is considered
|
|
1935
|
+
// part of the document, not the shadow root, nor any of its children (i.e. the node being
|
|
1936
|
+
// tested).
|
|
1937
|
+
// To further complicate things, we have to look all the way up until we find a shadow HOST
|
|
1938
|
+
// that is attached (or find none) because the node might be in nested shadows...
|
|
1939
|
+
// If rootNode is not a shadow root, it won't have a host, and so rootNode should be the
|
|
1940
|
+
// document (per the docs) and while it's a Document-type object, that document does not
|
|
1941
|
+
// appear to be the same as the node's `ownerDocument` for some reason, so it's safer
|
|
1942
|
+
// to ignore the rootNode at this point, and use `node.ownerDocument`. Otherwise,
|
|
1943
|
+
// using `rootNode.contains(node)` will _always_ be true we'll get false-positives when
|
|
1944
|
+
// node is actually detached.
|
|
1945
|
+
// NOTE: If `nodeRootHost` or `node` happens to be the `document` itself (which is possible
|
|
1946
|
+
// if a tabbable/focusable node was quickly added to the DOM, focused, and then removed
|
|
1947
|
+
// from the DOM as in https://github.com/focus-trap/focus-trap-react/issues/905), then
|
|
1948
|
+
// `ownerDocument` will be `null`, hence the optional chaining on it.
|
|
1949
|
+
var nodeRoot = node && getRootNode(node);
|
|
1950
|
+
var nodeRootHost = (_nodeRoot = nodeRoot) === null || _nodeRoot === void 0 ? void 0 : _nodeRoot.host;
|
|
1951
|
+
|
|
1952
|
+
// in some cases, a detached node will return itself as the root instead of a document or
|
|
1953
|
+
// shadow root object, in which case, we shouldn't try to look further up the host chain
|
|
1954
|
+
var attached = false;
|
|
1955
|
+
if (nodeRoot && nodeRoot !== node) {
|
|
1956
|
+
var _nodeRootHost, _nodeRootHost$ownerDo, _node$ownerDocument;
|
|
1957
|
+
attached = !!((_nodeRootHost = nodeRootHost) !== null && _nodeRootHost !== void 0 && (_nodeRootHost$ownerDo = _nodeRootHost.ownerDocument) !== null && _nodeRootHost$ownerDo !== void 0 && _nodeRootHost$ownerDo.contains(nodeRootHost) || node !== null && node !== void 0 && (_node$ownerDocument = node.ownerDocument) !== null && _node$ownerDocument !== void 0 && _node$ownerDocument.contains(node));
|
|
1958
|
+
while (!attached && nodeRootHost) {
|
|
1959
|
+
var _nodeRoot2, _nodeRootHost2, _nodeRootHost2$ownerD;
|
|
1960
|
+
// since it's not attached and we have a root host, the node MUST be in a nested shadow DOM,
|
|
1961
|
+
// which means we need to get the host's host and check if that parent host is contained
|
|
1962
|
+
// in (i.e. attached to) the document
|
|
1963
|
+
nodeRoot = getRootNode(nodeRootHost);
|
|
1964
|
+
nodeRootHost = (_nodeRoot2 = nodeRoot) === null || _nodeRoot2 === void 0 ? void 0 : _nodeRoot2.host;
|
|
1965
|
+
attached = !!((_nodeRootHost2 = nodeRootHost) !== null && _nodeRootHost2 !== void 0 && (_nodeRootHost2$ownerD = _nodeRootHost2.ownerDocument) !== null && _nodeRootHost2$ownerD !== void 0 && _nodeRootHost2$ownerD.contains(nodeRootHost));
|
|
1966
|
+
}
|
|
1967
|
+
}
|
|
1968
|
+
return attached;
|
|
1969
|
+
};
|
|
1970
|
+
var isZeroArea = function isZeroArea(node) {
|
|
1971
|
+
var _node$getBoundingClie = node.getBoundingClientRect(),
|
|
1972
|
+
width = _node$getBoundingClie.width,
|
|
1973
|
+
height = _node$getBoundingClie.height;
|
|
1974
|
+
return width === 0 && height === 0;
|
|
1975
|
+
};
|
|
1976
|
+
var isHidden = function isHidden(node, _ref) {
|
|
1977
|
+
var displayCheck = _ref.displayCheck,
|
|
1978
|
+
getShadowRoot = _ref.getShadowRoot;
|
|
1979
|
+
// NOTE: visibility will be `undefined` if node is detached from the document
|
|
1980
|
+
// (see notes about this further down), which means we will consider it visible
|
|
1981
|
+
// (this is legacy behavior from a very long way back)
|
|
1982
|
+
// NOTE: we check this regardless of `displayCheck="none"` because this is a
|
|
1983
|
+
// _visibility_ check, not a _display_ check
|
|
1984
|
+
if (getComputedStyle(node).visibility === 'hidden') {
|
|
1985
|
+
return true;
|
|
1986
|
+
}
|
|
1987
|
+
var isDirectSummary = matches.call(node, 'details>summary:first-of-type');
|
|
1988
|
+
var nodeUnderDetails = isDirectSummary ? node.parentElement : node;
|
|
1989
|
+
if (matches.call(nodeUnderDetails, 'details:not([open]) *')) {
|
|
1990
|
+
return true;
|
|
1991
|
+
}
|
|
1992
|
+
if (!displayCheck || displayCheck === 'full' || displayCheck === 'legacy-full') {
|
|
1993
|
+
if (typeof getShadowRoot === 'function') {
|
|
1994
|
+
// figure out if we should consider the node to be in an undisclosed shadow and use the
|
|
1995
|
+
// 'non-zero-area' fallback
|
|
1996
|
+
var originalNode = node;
|
|
1997
|
+
while (node) {
|
|
1998
|
+
var parentElement = node.parentElement;
|
|
1999
|
+
var rootNode = getRootNode(node);
|
|
2000
|
+
if (parentElement && !parentElement.shadowRoot && getShadowRoot(parentElement) === true // check if there's an undisclosed shadow
|
|
2001
|
+
) {
|
|
2002
|
+
// node has an undisclosed shadow which means we can only treat it as a black box, so we
|
|
2003
|
+
// fall back to a non-zero-area test
|
|
2004
|
+
return isZeroArea(node);
|
|
2005
|
+
} else if (node.assignedSlot) {
|
|
2006
|
+
// iterate up slot
|
|
2007
|
+
node = node.assignedSlot;
|
|
2008
|
+
} else if (!parentElement && rootNode !== node.ownerDocument) {
|
|
2009
|
+
// cross shadow boundary
|
|
2010
|
+
node = rootNode.host;
|
|
2011
|
+
} else {
|
|
2012
|
+
// iterate up normal dom
|
|
2013
|
+
node = parentElement;
|
|
2014
|
+
}
|
|
2015
|
+
}
|
|
2016
|
+
node = originalNode;
|
|
2017
|
+
}
|
|
2018
|
+
// else, `getShadowRoot` might be true, but all that does is enable shadow DOM support
|
|
2019
|
+
// (i.e. it does not also presume that all nodes might have undisclosed shadows); or
|
|
2020
|
+
// it might be a falsy value, which means shadow DOM support is disabled
|
|
2021
|
+
|
|
2022
|
+
// Since we didn't find it sitting in an undisclosed shadow (or shadows are disabled)
|
|
2023
|
+
// now we can just test to see if it would normally be visible or not, provided it's
|
|
2024
|
+
// attached to the main document.
|
|
2025
|
+
// NOTE: We must consider case where node is inside a shadow DOM and given directly to
|
|
2026
|
+
// `isTabbable()` or `isFocusable()` -- regardless of `getShadowRoot` option setting.
|
|
2027
|
+
|
|
2028
|
+
if (isNodeAttached(node)) {
|
|
2029
|
+
// this works wherever the node is: if there's at least one client rect, it's
|
|
2030
|
+
// somehow displayed; it also covers the CSS 'display: contents' case where the
|
|
2031
|
+
// node itself is hidden in place of its contents; and there's no need to search
|
|
2032
|
+
// up the hierarchy either
|
|
2033
|
+
return !node.getClientRects().length;
|
|
2034
|
+
}
|
|
2035
|
+
|
|
2036
|
+
// Else, the node isn't attached to the document, which means the `getClientRects()`
|
|
2037
|
+
// API will __always__ return zero rects (this can happen, for example, if React
|
|
2038
|
+
// is used to render nodes onto a detached tree, as confirmed in this thread:
|
|
2039
|
+
// https://github.com/facebook/react/issues/9117#issuecomment-284228870)
|
|
2040
|
+
//
|
|
2041
|
+
// It also means that even window.getComputedStyle(node).display will return `undefined`
|
|
2042
|
+
// because styles are only computed for nodes that are in the document.
|
|
2043
|
+
//
|
|
2044
|
+
// NOTE: THIS HAS BEEN THE CASE FOR YEARS. It is not new, nor is it caused by tabbable
|
|
2045
|
+
// somehow. Though it was never stated officially, anyone who has ever used tabbable
|
|
2046
|
+
// APIs on nodes in detached containers has actually implicitly used tabbable in what
|
|
2047
|
+
// was later (as of v5.2.0 on Apr 9, 2021) called `displayCheck="none"` mode -- essentially
|
|
2048
|
+
// considering __everything__ to be visible because of the innability to determine styles.
|
|
2049
|
+
//
|
|
2050
|
+
// v6.0.0: As of this major release, the default 'full' option __no longer treats detached
|
|
2051
|
+
// nodes as visible with the 'none' fallback.__
|
|
2052
|
+
if (displayCheck !== 'legacy-full') {
|
|
2053
|
+
return true; // hidden
|
|
2054
|
+
}
|
|
2055
|
+
// else, fallback to 'none' mode and consider the node visible
|
|
2056
|
+
} else if (displayCheck === 'non-zero-area') {
|
|
2057
|
+
// NOTE: Even though this tests that the node's client rect is non-zero to determine
|
|
2058
|
+
// whether it's displayed, and that a detached node will __always__ have a zero-area
|
|
2059
|
+
// client rect, we don't special-case for whether the node is attached or not. In
|
|
2060
|
+
// this mode, we do want to consider nodes that have a zero area to be hidden at all
|
|
2061
|
+
// times, and that includes attached or not.
|
|
2062
|
+
return isZeroArea(node);
|
|
2063
|
+
}
|
|
2064
|
+
|
|
2065
|
+
// visible, as far as we can tell, or per current `displayCheck=none` mode, we assume
|
|
2066
|
+
// it's visible
|
|
2067
|
+
return false;
|
|
2068
|
+
};
|
|
2069
|
+
|
|
2070
|
+
// form fields (nested) inside a disabled fieldset are not focusable/tabbable
|
|
2071
|
+
// unless they are in the _first_ <legend> element of the top-most disabled
|
|
2072
|
+
// fieldset
|
|
2073
|
+
var isDisabledFromFieldset = function isDisabledFromFieldset(node) {
|
|
2074
|
+
if (/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(node.tagName)) {
|
|
2075
|
+
var parentNode = node.parentElement;
|
|
2076
|
+
// check if `node` is contained in a disabled <fieldset>
|
|
2077
|
+
while (parentNode) {
|
|
2078
|
+
if (parentNode.tagName === 'FIELDSET' && parentNode.disabled) {
|
|
2079
|
+
// look for the first <legend> among the children of the disabled <fieldset>
|
|
2080
|
+
for (var i = 0; i < parentNode.children.length; i++) {
|
|
2081
|
+
var child = parentNode.children.item(i);
|
|
2082
|
+
// when the first <legend> (in document order) is found
|
|
2083
|
+
if (child.tagName === 'LEGEND') {
|
|
2084
|
+
// if its parent <fieldset> is not nested in another disabled <fieldset>,
|
|
2085
|
+
// return whether `node` is a descendant of its first <legend>
|
|
2086
|
+
return matches.call(parentNode, 'fieldset[disabled] *') ? true : !child.contains(node);
|
|
2087
|
+
}
|
|
2088
|
+
}
|
|
2089
|
+
// the disabled <fieldset> containing `node` has no <legend>
|
|
2090
|
+
return true;
|
|
2091
|
+
}
|
|
2092
|
+
parentNode = parentNode.parentElement;
|
|
2093
|
+
}
|
|
2094
|
+
}
|
|
2095
|
+
|
|
2096
|
+
// else, node's tabbable/focusable state should not be affected by a fieldset's
|
|
2097
|
+
// enabled/disabled state
|
|
2098
|
+
return false;
|
|
2099
|
+
};
|
|
2100
|
+
var isNodeMatchingSelectorFocusable = function isNodeMatchingSelectorFocusable(options, node) {
|
|
2101
|
+
if (node.disabled ||
|
|
2102
|
+
// we must do an inert look up to filter out any elements inside an inert ancestor
|
|
2103
|
+
// because we're limited in the type of selectors we can use in JSDom (see related
|
|
2104
|
+
// note related to `candidateSelectors`)
|
|
2105
|
+
isInert(node) || isHiddenInput(node) || isHidden(node, options) ||
|
|
2106
|
+
// For a details element with a summary, the summary element gets the focus
|
|
2107
|
+
isDetailsWithSummary(node) || isDisabledFromFieldset(node)) {
|
|
2108
|
+
return false;
|
|
2109
|
+
}
|
|
2110
|
+
return true;
|
|
2111
|
+
};
|
|
2112
|
+
var isNodeMatchingSelectorTabbable = function isNodeMatchingSelectorTabbable(options, node) {
|
|
2113
|
+
if (isNonTabbableRadio(node) || getTabIndex(node) < 0 || !isNodeMatchingSelectorFocusable(options, node)) {
|
|
2114
|
+
return false;
|
|
2115
|
+
}
|
|
2116
|
+
return true;
|
|
2117
|
+
};
|
|
2118
|
+
var isValidShadowRootTabbable = function isValidShadowRootTabbable(shadowHostNode) {
|
|
2119
|
+
var tabIndex = parseInt(shadowHostNode.getAttribute('tabindex'), 10);
|
|
2120
|
+
if (isNaN(tabIndex) || tabIndex >= 0) {
|
|
2121
|
+
return true;
|
|
2122
|
+
}
|
|
2123
|
+
// If a custom element has an explicit negative tabindex,
|
|
2124
|
+
// browsers will not allow tab targeting said element's children.
|
|
2125
|
+
return false;
|
|
2126
|
+
};
|
|
2127
|
+
|
|
2128
|
+
/**
|
|
2129
|
+
* @param {Array.<Element|CandidateScope>} candidates
|
|
2130
|
+
* @returns Element[]
|
|
2131
|
+
*/
|
|
2132
|
+
var sortByOrder = function sortByOrder(candidates) {
|
|
2133
|
+
var regularTabbables = [];
|
|
2134
|
+
var orderedTabbables = [];
|
|
2135
|
+
candidates.forEach(function (item, i) {
|
|
2136
|
+
var isScope = !!item.scopeParent;
|
|
2137
|
+
var element = isScope ? item.scopeParent : item;
|
|
2138
|
+
var candidateTabindex = getSortOrderTabIndex(element, isScope);
|
|
2139
|
+
var elements = isScope ? sortByOrder(item.candidates) : element;
|
|
2140
|
+
if (candidateTabindex === 0) {
|
|
2141
|
+
isScope ? regularTabbables.push.apply(regularTabbables, elements) : regularTabbables.push(element);
|
|
2142
|
+
} else {
|
|
2143
|
+
orderedTabbables.push({
|
|
2144
|
+
documentOrder: i,
|
|
2145
|
+
tabIndex: candidateTabindex,
|
|
2146
|
+
item: item,
|
|
2147
|
+
isScope: isScope,
|
|
2148
|
+
content: elements
|
|
2149
|
+
});
|
|
2150
|
+
}
|
|
2151
|
+
});
|
|
2152
|
+
return orderedTabbables.sort(sortOrderedTabbables).reduce(function (acc, sortable) {
|
|
2153
|
+
sortable.isScope ? acc.push.apply(acc, sortable.content) : acc.push(sortable.content);
|
|
2154
|
+
return acc;
|
|
2155
|
+
}, []).concat(regularTabbables);
|
|
2156
|
+
};
|
|
2157
|
+
var tabbable = function tabbable(container, options) {
|
|
2158
|
+
options = options || {};
|
|
2159
|
+
var candidates;
|
|
2160
|
+
if (options.getShadowRoot) {
|
|
2161
|
+
candidates = getCandidatesIteratively([container], options.includeContainer, {
|
|
2162
|
+
filter: isNodeMatchingSelectorTabbable.bind(null, options),
|
|
2163
|
+
flatten: false,
|
|
2164
|
+
getShadowRoot: options.getShadowRoot,
|
|
2165
|
+
shadowRootFilter: isValidShadowRootTabbable
|
|
2166
|
+
});
|
|
2167
|
+
} else {
|
|
2168
|
+
candidates = getCandidates(container, options.includeContainer, isNodeMatchingSelectorTabbable.bind(null, options));
|
|
2169
|
+
}
|
|
2170
|
+
return sortByOrder(candidates);
|
|
2171
|
+
};
|
|
2172
|
+
var focusable = function focusable(container, options) {
|
|
2173
|
+
options = options || {};
|
|
2174
|
+
var candidates;
|
|
2175
|
+
if (options.getShadowRoot) {
|
|
2176
|
+
candidates = getCandidatesIteratively([container], options.includeContainer, {
|
|
2177
|
+
filter: isNodeMatchingSelectorFocusable.bind(null, options),
|
|
2178
|
+
flatten: true,
|
|
2179
|
+
getShadowRoot: options.getShadowRoot
|
|
2180
|
+
});
|
|
2181
|
+
} else {
|
|
2182
|
+
candidates = getCandidates(container, options.includeContainer, isNodeMatchingSelectorFocusable.bind(null, options));
|
|
2183
|
+
}
|
|
2184
|
+
return candidates;
|
|
2185
|
+
};
|
|
2186
|
+
var isTabbable = function isTabbable(node, options) {
|
|
2187
|
+
options = options || {};
|
|
2188
|
+
if (!node) {
|
|
2189
|
+
throw new Error('No node provided');
|
|
2190
|
+
}
|
|
2191
|
+
if (matches.call(node, candidateSelector) === false) {
|
|
2192
|
+
return false;
|
|
2193
|
+
}
|
|
2194
|
+
return isNodeMatchingSelectorTabbable(options, node);
|
|
2195
|
+
};
|
|
2196
|
+
var focusableCandidateSelector = /* #__PURE__ */candidateSelectors.concat('iframe').join(',');
|
|
2197
|
+
var isFocusable = function isFocusable(node, options) {
|
|
2198
|
+
options = options || {};
|
|
2199
|
+
if (!node) {
|
|
2200
|
+
throw new Error('No node provided');
|
|
2201
|
+
}
|
|
2202
|
+
if (matches.call(node, focusableCandidateSelector) === false) {
|
|
2203
|
+
return false;
|
|
2204
|
+
}
|
|
2205
|
+
return isNodeMatchingSelectorFocusable(options, node);
|
|
2206
|
+
};
|
|
2207
|
+
|
|
2208
|
+
const firstTabbable = (container) => {
|
|
2209
|
+
return (container ? tabbable(container, { includeContainer: true, getShadowRoot: true }) : []).shift();
|
|
2210
|
+
};
|
|
2211
|
+
|
|
2212
|
+
const catDateInlineCss = "/**\n * Auto-generated file. Do not edit directly.\n */\n/* stylelint-disable value-keyword-case */\n/* stylelint-enable value-keyword-case */\n.label {\n overflow: hidden;\n word-wrap: break-word;\n word-break: break-word;\n}\n\n.input-field:not(.input-horizontal) .label-container.hidden,\n.textarea-field:not(.textarea-horizontal) .label-container.hidden,\n.select-field:not(.select-horizontal) .label-container.hidden {\n position: absolute !important;\n width: 1px !important;\n height: 1px !important;\n padding: 0 !important;\n margin: -1px !important;\n overflow: hidden !important;\n clip: rect(0, 0, 0, 0) !important;\n white-space: nowrap !important;\n border: 0 !important;\n}\n\n.label-container {\n flex-basis: var(--label-size, 33.33%);\n}\n.label-container .label-wrapper {\n display: flex;\n gap: 0.25rem;\n}\n\n.label-metadata {\n display: flex;\n flex-shrink: 0;\n flex-grow: 1;\n justify-content: space-between;\n gap: 0.25rem;\n color: rgb(var(--cat-font-color-muted, 81, 92, 108));\n}\n\n.label-optional,\n.label-character-count {\n display: inline-flex;\n align-items: center;\n max-height: 1.25rem;\n font-size: 0.75rem;\n line-height: 1rem;\n}\n\n.label-character-count {\n margin-left: auto;\n}\n\n.input-horizontal .label-container.hidden label,\n.textarea-horizontal .label-container.hidden label,\n.select-horizontal .label-container.hidden label {\n position: absolute !important;\n width: 1px !important;\n height: 1px !important;\n padding: 0 !important;\n margin: -1px !important;\n overflow: hidden !important;\n clip: rect(0, 0, 0, 0) !important;\n white-space: nowrap !important;\n border: 0 !important;\n}\n.input-horizontal .label-wrapper,\n.textarea-horizontal .label-wrapper,\n.select-horizontal .label-wrapper {\n flex-direction: column;\n}\n.input-horizontal label,\n.textarea-horizontal label,\n.select-horizontal label {\n min-height: 2.5rem;\n display: inline-flex;\n align-items: center;\n}\n.input-horizontal .label-metadata,\n.textarea-horizontal .label-metadata,\n.select-horizontal .label-metadata {\n justify-content: flex-start;\n}\n.input-horizontal .label-metadata .label-character-count,\n.textarea-horizontal .label-metadata .label-character-count,\n.select-horizontal .label-metadata .label-character-count {\n margin-left: 0;\n}\n\n:host {\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n}\n\n:host([hidden]) {\n display: none;\n}\n\n.label-container:empty {\n display: none;\n}\n\n.picker {\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n}\n\n.picker-head {\n display: flex;\n align-items: center;\n container-type: inline-size;\n}\n.picker-head > :not(:last-child) {\n margin-right: 0.25rem;\n}\n.picker-head h3 {\n font-size: 0.9375rem;\n line-height: 1.25rem;\n font-weight: var(--cat-font-weight-head, 600);\n font-feature-settings: \"pnum\";\n flex: 1;\n text-align: center;\n margin-block: 0;\n}\n@container (min-width: 20rem) {\n .picker-head h3 {\n font-size: 1.125rem;\n line-height: 1.5rem;\n font-weight: var(--cat-font-weight-head, 600);\n font-feature-settings: \"pnum\";\n }\n .picker-head > :not(:last-child) {\n margin-right: 0.5rem;\n }\n}\n\n.picker-grid {\n display: grid;\n /* stylelint-disable declaration-block-no-redundant-longhand-properties */\n grid-template-rows: 2rem repeat(6, 1fr);\n grid-template-columns: repeat(7, 1fr);\n grid-template-areas: \"h h h h h h h\" \"d d d d d d d\" \"d d d d d d d\" \"d d d d d d d\" \"d d d d d d d\" \"d d d d d d d\" \"d d d d d d d\";\n /* stylelint-enable declaration-block-no-redundant-longhand-properties */\n}\n.picker-weeks .picker-grid {\n /* stylelint-disable declaration-block-no-redundant-longhand-properties */\n grid-template-columns: 2rem repeat(7, 1fr);\n grid-template-areas: \". h h h h h h h\" \"w d d d d d d d\" \"w d d d d d d d\" \"w d d d d d d d\" \"w d d d d d d d\" \"w d d d d d d d\" \"w d d d d d d d\";\n /* stylelint-enable declaration-block-no-redundant-longhand-properties */\n}\n\n.picker-grid-head {\n grid-area: h;\n display: grid;\n grid-template-columns: repeat(7, 1fr);\n place-items: end center;\n padding-bottom: 0.5rem;\n}\n\n.picker-grid-weeks {\n grid-area: w;\n display: grid;\n grid-template-rows: repeat(6, 1fr);\n place-items: center right;\n padding-right: 0.5rem;\n}\n\n.picker-grid-days {\n grid-area: d;\n display: grid;\n grid-template-rows: repeat(6, 1fr);\n grid-template-columns: repeat(7, 1fr);\n}\n\n.picker-grid-head > *,\n.picker-grid-weeks > * {\n font-size: 0.75rem;\n line-height: 1rem;\n font-weight: 600;\n color: rgb(var(--cat-font-color-muted, 81, 92, 108)) !important;\n text-decoration: none;\n}\n\n.date-other {\n opacity: 0.5;\n}\n\n.date-disabled {\n opacity: 0.25;\n}\n\n.picker-foot {\n display: flex;\n align-items: center;\n width: min-content;\n min-width: 100%;\n justify-content: space-between;\n container-type: inline-size;\n}\n.picker-foot > :not(:last-child) {\n margin-right: 0.25rem;\n}\n@container (min-width: 20rem) {\n .picker-foot > :not(:last-child) {\n margin-right: 0.5rem;\n }\n .picker-foot .cursor-help {\n font-size: 0.875rem;\n line-height: 1.125rem;\n font-weight: var(--cat-font-weight-body, 400);\n }\n}\n\n.cursor-help {\n margin-block: 0;\n font-size: 0.75rem;\n line-height: 1rem;\n font-weight: var(--cat-font-weight-body, 400);\n color: rgb(var(--cat-font-color-muted, 81, 92, 108)) !important;\n text-align: center;\n flex: 1;\n}\n.cursor-help:first-child {\n text-align: left;\n}\n.cursor-help:last-child {\n text-align: right;\n}\n.cursor-help:only-child {\n text-align: center;\n}\n\n.cursor-aria {\n position: absolute !important;\n width: 1px !important;\n height: 1px !important;\n padding: 0 !important;\n margin: -1px !important;\n overflow: hidden !important;\n clip: rect(0, 0, 0, 0) !important;\n white-space: nowrap !important;\n border: 0 !important;\n}\n\n.date-range {\n --cat-border-radius-m: 0;\n}";
|
|
2213
|
+
const CatDateInlineStyle0 = catDateInlineCss;
|
|
2214
|
+
|
|
2215
|
+
let nextUniqueId$8 = 0;
|
|
2216
|
+
const CatDateInline = class {
|
|
2217
|
+
constructor(hostRef) {
|
|
2218
|
+
index.registerInstance(this, hostRef);
|
|
2219
|
+
this.catChange = index.createEvent(this, "catChange", 7);
|
|
2220
|
+
this._id = `cat-date-inline-${nextUniqueId$8++}`;
|
|
2221
|
+
this.language = of.catI18nRegistry.getLocale();
|
|
2222
|
+
this.locale = getLocale$2(this.language);
|
|
2223
|
+
// additonally store the focus date to ensure correct focus after potential re-render
|
|
2224
|
+
this.focusDate = null;
|
|
2225
|
+
this.hasSlottedLabel = false;
|
|
2226
|
+
this.hasSlottedHint = false;
|
|
2227
|
+
this.viewDate = this.locale.now();
|
|
2228
|
+
this.noClear = false;
|
|
2229
|
+
this.identifier = undefined;
|
|
2230
|
+
this.hint = false;
|
|
2231
|
+
this.noToday = false;
|
|
2232
|
+
this.weeks = false;
|
|
2233
|
+
this.label = '';
|
|
2234
|
+
this.labelHidden = false;
|
|
2235
|
+
this.min = undefined;
|
|
2236
|
+
this.max = undefined;
|
|
2237
|
+
this.range = false;
|
|
2238
|
+
this.required = false;
|
|
2239
|
+
this.a11yLabel = undefined;
|
|
2240
|
+
this.requiredMarker = 'optional';
|
|
2241
|
+
this.value = undefined;
|
|
2242
|
+
}
|
|
2243
|
+
get id() {
|
|
2244
|
+
return this.identifier || this._id;
|
|
2245
|
+
}
|
|
2246
|
+
get focusedDate() {
|
|
2247
|
+
const [all, year, month, day] = this.hostElement.shadowRoot
|
|
2248
|
+
?.querySelector(`[data-date]:focus`)
|
|
2249
|
+
?.dataset.date?.match(/^(\d{4})-(\d{2})-(\d{2})/) ?? [];
|
|
2250
|
+
return all ? new Date(Number(year), Number(month) - 1, Number(day)) : null;
|
|
2251
|
+
}
|
|
2252
|
+
componentWillLoad() {
|
|
2253
|
+
const [startDate, endDate] = this.getValue();
|
|
2254
|
+
if (endDate) {
|
|
2255
|
+
this.focus(endDate, false);
|
|
2256
|
+
}
|
|
2257
|
+
else if (startDate) {
|
|
2258
|
+
this.focus(startDate, false);
|
|
2259
|
+
}
|
|
2260
|
+
}
|
|
2261
|
+
componentWillRender() {
|
|
2262
|
+
delayedAssertWarn(this, () => {
|
|
2263
|
+
this.hasSlottedLabel = !!this.hostElement.querySelector('[slot="label"]');
|
|
2264
|
+
this.hasSlottedHint = !!this.hostElement.querySelector('[slot="hint"]');
|
|
2265
|
+
return !!this.label && !!this.hasSlottedLabel;
|
|
2266
|
+
}, '[A11y] Missing ARIA label on input');
|
|
2267
|
+
}
|
|
2268
|
+
componentDidRender() {
|
|
2269
|
+
if (this.focusDate) {
|
|
2270
|
+
// re-focus the previously focused date after re-render
|
|
2271
|
+
this.hostElement.shadowRoot
|
|
2272
|
+
?.querySelector(`[data-date="${this.locale.toLocalISO(this.focusDate)}"]`)
|
|
2273
|
+
?.doFocus();
|
|
2274
|
+
this.focusDate = null;
|
|
2275
|
+
}
|
|
2276
|
+
}
|
|
2277
|
+
onKeyDown(e) {
|
|
2278
|
+
if (!['ArrowLeft', 'ArrowRight', 'ArrowUp', 'ArrowDown'].includes(e.key)) {
|
|
1682
2279
|
return;
|
|
1683
2280
|
}
|
|
1684
2281
|
const focusedDate = this.focusedDate;
|
|
@@ -1751,16 +2348,26 @@ const CatDateInline = class {
|
|
|
1751
2348
|
const [dateStart] = this.getValue();
|
|
1752
2349
|
this.viewDate = dateStart ?? clampDate(minDate, this.locale.now(), maxDate);
|
|
1753
2350
|
}
|
|
2351
|
+
/**
|
|
2352
|
+
* Programmatically move focus to the inline datepicker, i,e, the first
|
|
2353
|
+
* focusable date.
|
|
2354
|
+
*
|
|
2355
|
+
* @param options An optional object providing options to control aspects of
|
|
2356
|
+
* the focusing process.
|
|
2357
|
+
*/
|
|
2358
|
+
async doFocus(options) {
|
|
2359
|
+
firstTabbable(this.hostElement.shadowRoot?.querySelector('.picker-grid-days'))?.focus(options);
|
|
2360
|
+
}
|
|
1754
2361
|
render() {
|
|
1755
2362
|
const [minDate, maxDate] = this.getMinMaxDate();
|
|
1756
2363
|
const dateGrid = this.dateGrid(this.viewDate.getFullYear(), this.viewDate.getMonth());
|
|
1757
2364
|
const [dateStart, dateEnd] = this.getValue();
|
|
1758
|
-
return (index.h(index.Host, { key: '
|
|
2365
|
+
return (index.h(index.Host, { key: '087574f20cb3f66431d9b9e15fff9ec3511af03a', "aria-label": this.a11yLabel, FocusIn: () => this.a11yLabel && this.setAriaLive(this.a11yLabel) }, index.h("div", { key: '6d05699421089187e2f50cadda0168aeab5a3cb5', class: { 'label-container': true, hidden: this.labelHidden } }, (this.hasSlottedLabel || this.label) && (index.h("label", { id: `${this.id}-label`, htmlFor: this.id, part: "label", onClick: () => this.doFocus() }, index.h("span", { class: "label-wrapper" }, (this.hasSlottedLabel && index.h("slot", { name: "label" })) || this.label, index.h("div", { class: "label-metadata" }, !this.required && (this.requiredMarker ?? 'optional').startsWith('optional') && (index.h("span", { class: "label-optional", "aria-hidden": "true" }, "(", of.catI18nRegistry.t('input.optional'), ")")), this.required && this.requiredMarker?.startsWith('required') && (index.h("span", { class: "label-optional", "aria-hidden": "true" }, "(", of.catI18nRegistry.t('input.required'), ")"))))))), index.h("div", { key: 'f8b3989fa5eaa01d391fac8c91a754269f68b14b', class: { picker: true, 'picker-weeks': this.weeks }, id: this.id, "aria-describedby": `${this.id}-label` }, index.h("div", { key: 'edb8fb991ad5c02b1e7ab9c5a6698b861a571b91', class: "picker-head" }, index.h("cat-button", { key: '98811832e82d16af9709f12d812d6212334d9e71', icon: "$cat:datepicker-year-prev", iconOnly: true, size: "xs", variant: "text", "a11y-label": this.locale.prevYear, disabled: isSameYear(this.viewDate, minDate), onClick: () => this.navigate('prev', 'year'), "data-dropdown-no-close": true }), index.h("cat-button", { key: '1377a0a359840b800b4a20770e143e83640e5e81', icon: "$cat:datepicker-month-prev", iconOnly: true, size: "xs", variant: "text", "a11y-label": this.locale.prevMonth, disabled: isSameMonth(this.viewDate, minDate), onClick: () => this.navigate('prev', 'month'), "data-dropdown-no-close": true }), index.h("h3", { key: '1bca84d109c3e7b11ec68f26e977fc7237db5178' }, this.getHeadline()), index.h("cat-button", { key: '566a777ba0465792e565e1bd431a6e525f139f60', icon: "$cat:datepicker-month-next", iconOnly: true, size: "xs", variant: "text", "a11y-label": this.locale.nextMonth, disabled: isSameMonth(this.viewDate, maxDate), onClick: () => this.navigate('next', 'month'), "data-dropdown-no-close": true }), index.h("cat-button", { key: 'f4f628d49b9fd624c46b22e80ba3b2814efedcea', icon: "$cat:datepicker-year-next", iconOnly: true, size: "xs", variant: "text", "a11y-label": this.locale.nextYear, disabled: isSameYear(this.viewDate, maxDate), onClick: () => this.navigate('next', 'year'), "data-dropdown-no-close": true })), index.h("div", { key: 'd57fc43da2f20ecdc13bc74c58f7ae2f90552339', class: "picker-grid", onFocusin: () => this.setAriaLive(this.locale.arrowKeys) }, index.h("div", { key: '6174d5c05998423899ef832df61795d07a42b547', class: "picker-grid-head" }, Array.from(Array(7), (_, i) => {
|
|
1759
2366
|
const day = (i + this.locale.weekInfo.firstDay) % 7;
|
|
1760
2367
|
return index.h("abbr", { title: this.locale.days.long[day] }, this.locale.days.short[day]);
|
|
1761
2368
|
})), this.weeks && (index.h("div", { class: "picker-grid-weeks" }, dateGrid
|
|
1762
2369
|
.filter((_, i) => i % 7 === 0)
|
|
1763
|
-
.map(day => (index.h("div", null, this.getWeekNumber(day)))))), index.h("div", { key: '
|
|
2370
|
+
.map(day => (index.h("div", null, this.getWeekNumber(day)))))), index.h("div", { key: 'c1597e2c24747069cb443e0aa3df04d079201191', class: "picker-grid-days" }, dateGrid.map(day => {
|
|
1764
2371
|
const isStartDate = isSameDay(dateStart, day);
|
|
1765
2372
|
const isEndDate = isSameDay(dateEnd, day);
|
|
1766
2373
|
const isRange = !!dateStart && !!dateEnd && day > dateStart && day < dateEnd;
|
|
@@ -1777,15 +2384,18 @@ const CatDateInline = class {
|
|
|
1777
2384
|
'date-focusable': this.canFocus(day),
|
|
1778
2385
|
'date-disabled': !this.canClick(day)
|
|
1779
2386
|
}, nativeAttributes: !this.canFocus(day) ? { tabindex: '-1' } : {}, variant: isStartDate || isEndDate ? 'filled' : isToday ? 'outlined' : 'text', a11yLabel: this.locale.toLocalStr(day), active: isStartDate || isEndDate || isRange, color: isStartDate || isEndDate || isToday ? 'primary' : 'secondary', disabled: !this.canClick(day), onClick: () => this.select(day), "data-date": this.locale.toLocalISO(day) }, day.getDate()));
|
|
1780
|
-
}))), index.h("div", { key: '
|
|
2387
|
+
}))), index.h("div", { key: '6bb938a9c508735d2ed3a88c8315abe91def29ac', class: "picker-foot" }, !this.noToday && this.canClick(this.locale.now()) && (index.h("cat-button", { size: "s", "data-dropdown-no-close": true, onClick: () => this.select(this.locale.now()) }, this.locale.today)), this.hint && index.h("p", { class: "cursor-help" }, this.locale.arrowKeys), !this.noClear && (index.h("cat-button", { size: "s", disabled: !this.value, "data-dropdown-no-close": true, onClick: () => this.clear() }, this.locale.clear)))), index.h("p", { key: '66c8c9c200d58f96be3df9a02ce31ebe4970055f', class: "cursor-aria", "aria-live": "polite" })));
|
|
1781
2388
|
}
|
|
1782
|
-
focus(date) {
|
|
2389
|
+
focus(date, focus = true) {
|
|
1783
2390
|
const [minDate, maxDate] = this.getMinMaxDate();
|
|
1784
|
-
|
|
1785
|
-
this.viewDate = new Date(
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
2391
|
+
const focusDate = clampDate(minDate, date, maxDate);
|
|
2392
|
+
this.viewDate = new Date(focusDate.getFullYear(), focusDate.getMonth());
|
|
2393
|
+
if (focus) {
|
|
2394
|
+
this.focusDate = focusDate;
|
|
2395
|
+
this.hostElement.shadowRoot
|
|
2396
|
+
?.querySelector(`[data-date="${this.locale.toLocalISO(focusDate)}"]`)
|
|
2397
|
+
?.doFocus();
|
|
2398
|
+
}
|
|
1789
2399
|
}
|
|
1790
2400
|
navigate(direction, period) {
|
|
1791
2401
|
this.viewDate = new Date(direction === 'prev'
|
|
@@ -5874,1091 +6484,522 @@ function getRectRelativeToOffsetParent(element, offsetParent, strategy) {
|
|
|
5874
6484
|
const x = rect.left + scroll.scrollLeft - offsets.x;
|
|
5875
6485
|
const y = rect.top + scroll.scrollTop - offsets.y;
|
|
5876
6486
|
return {
|
|
5877
|
-
x,
|
|
5878
|
-
y,
|
|
5879
|
-
width: rect.width,
|
|
5880
|
-
height: rect.height
|
|
5881
|
-
};
|
|
5882
|
-
}
|
|
5883
|
-
|
|
5884
|
-
function getTrueOffsetParent(element, polyfill) {
|
|
5885
|
-
if (!isHTMLElement(element) || getComputedStyle$1(element).position === 'fixed') {
|
|
5886
|
-
return null;
|
|
5887
|
-
}
|
|
5888
|
-
if (polyfill) {
|
|
5889
|
-
return polyfill(element);
|
|
5890
|
-
}
|
|
5891
|
-
return element.offsetParent;
|
|
5892
|
-
}
|
|
5893
|
-
|
|
5894
|
-
// Gets the closest ancestor positioned element. Handles some edge cases,
|
|
5895
|
-
// such as table ancestors and cross browser bugs.
|
|
5896
|
-
function getOffsetParent(element, polyfill) {
|
|
5897
|
-
const window = getWindow(element);
|
|
5898
|
-
if (!isHTMLElement(element) || isTopLayer(element)) {
|
|
5899
|
-
return window;
|
|
5900
|
-
}
|
|
5901
|
-
let offsetParent = getTrueOffsetParent(element, polyfill);
|
|
5902
|
-
while (offsetParent && isTableElement(offsetParent) && getComputedStyle$1(offsetParent).position === 'static') {
|
|
5903
|
-
offsetParent = getTrueOffsetParent(offsetParent, polyfill);
|
|
5904
|
-
}
|
|
5905
|
-
if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle$1(offsetParent).position === 'static' && !isContainingBlock(offsetParent))) {
|
|
5906
|
-
return window;
|
|
5907
|
-
}
|
|
5908
|
-
return offsetParent || getContainingBlock(element) || window;
|
|
5909
|
-
}
|
|
5910
|
-
|
|
5911
|
-
const getElementRects = async function (data) {
|
|
5912
|
-
const getOffsetParentFn = this.getOffsetParent || getOffsetParent;
|
|
5913
|
-
const getDimensionsFn = this.getDimensions;
|
|
5914
|
-
return {
|
|
5915
|
-
reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy),
|
|
5916
|
-
floating: {
|
|
5917
|
-
x: 0,
|
|
5918
|
-
y: 0,
|
|
5919
|
-
...(await getDimensionsFn(data.floating))
|
|
5920
|
-
}
|
|
5921
|
-
};
|
|
5922
|
-
};
|
|
5923
|
-
|
|
5924
|
-
function isRTL(element) {
|
|
5925
|
-
return getComputedStyle$1(element).direction === 'rtl';
|
|
5926
|
-
}
|
|
5927
|
-
|
|
5928
|
-
const platform = {
|
|
5929
|
-
convertOffsetParentRelativeRectToViewportRelativeRect,
|
|
5930
|
-
getDocumentElement,
|
|
5931
|
-
getClippingRect,
|
|
5932
|
-
getOffsetParent,
|
|
5933
|
-
getElementRects,
|
|
5934
|
-
getClientRects,
|
|
5935
|
-
getDimensions,
|
|
5936
|
-
getScale,
|
|
5937
|
-
isElement,
|
|
5938
|
-
isRTL
|
|
5939
|
-
};
|
|
5940
|
-
|
|
5941
|
-
// https://samthor.au/2021/observing-dom/
|
|
5942
|
-
function observeMove(element, onMove) {
|
|
5943
|
-
let io = null;
|
|
5944
|
-
let timeoutId;
|
|
5945
|
-
const root = getDocumentElement(element);
|
|
5946
|
-
function cleanup() {
|
|
5947
|
-
var _io;
|
|
5948
|
-
clearTimeout(timeoutId);
|
|
5949
|
-
(_io = io) == null || _io.disconnect();
|
|
5950
|
-
io = null;
|
|
5951
|
-
}
|
|
5952
|
-
function refresh(skip, threshold) {
|
|
5953
|
-
if (skip === void 0) {
|
|
5954
|
-
skip = false;
|
|
5955
|
-
}
|
|
5956
|
-
if (threshold === void 0) {
|
|
5957
|
-
threshold = 1;
|
|
5958
|
-
}
|
|
5959
|
-
cleanup();
|
|
5960
|
-
const {
|
|
5961
|
-
left,
|
|
5962
|
-
top,
|
|
5963
|
-
width,
|
|
5964
|
-
height
|
|
5965
|
-
} = element.getBoundingClientRect();
|
|
5966
|
-
if (!skip) {
|
|
5967
|
-
onMove();
|
|
5968
|
-
}
|
|
5969
|
-
if (!width || !height) {
|
|
5970
|
-
return;
|
|
5971
|
-
}
|
|
5972
|
-
const insetTop = floor(top);
|
|
5973
|
-
const insetRight = floor(root.clientWidth - (left + width));
|
|
5974
|
-
const insetBottom = floor(root.clientHeight - (top + height));
|
|
5975
|
-
const insetLeft = floor(left);
|
|
5976
|
-
const rootMargin = -insetTop + "px " + -insetRight + "px " + -insetBottom + "px " + -insetLeft + "px";
|
|
5977
|
-
const options = {
|
|
5978
|
-
rootMargin,
|
|
5979
|
-
threshold: max(0, min(1, threshold)) || 1
|
|
5980
|
-
};
|
|
5981
|
-
let isFirstUpdate = true;
|
|
5982
|
-
function handleObserve(entries) {
|
|
5983
|
-
const ratio = entries[0].intersectionRatio;
|
|
5984
|
-
if (ratio !== threshold) {
|
|
5985
|
-
if (!isFirstUpdate) {
|
|
5986
|
-
return refresh();
|
|
5987
|
-
}
|
|
5988
|
-
if (!ratio) {
|
|
5989
|
-
timeoutId = setTimeout(() => {
|
|
5990
|
-
refresh(false, 1e-7);
|
|
5991
|
-
}, 100);
|
|
5992
|
-
} else {
|
|
5993
|
-
refresh(false, ratio);
|
|
5994
|
-
}
|
|
5995
|
-
}
|
|
5996
|
-
isFirstUpdate = false;
|
|
5997
|
-
}
|
|
5998
|
-
|
|
5999
|
-
// Older browsers don't support a `document` as the root and will throw an
|
|
6000
|
-
// error.
|
|
6001
|
-
try {
|
|
6002
|
-
io = new IntersectionObserver(handleObserve, {
|
|
6003
|
-
...options,
|
|
6004
|
-
// Handle <iframe>s
|
|
6005
|
-
root: root.ownerDocument
|
|
6006
|
-
});
|
|
6007
|
-
} catch (e) {
|
|
6008
|
-
io = new IntersectionObserver(handleObserve, options);
|
|
6009
|
-
}
|
|
6010
|
-
io.observe(element);
|
|
6011
|
-
}
|
|
6012
|
-
refresh(true);
|
|
6013
|
-
return cleanup;
|
|
6014
|
-
}
|
|
6015
|
-
|
|
6016
|
-
/**
|
|
6017
|
-
* Automatically updates the position of the floating element when necessary.
|
|
6018
|
-
* Should only be called when the floating element is mounted on the DOM or
|
|
6019
|
-
* visible on the screen.
|
|
6020
|
-
* @returns cleanup function that should be invoked when the floating element is
|
|
6021
|
-
* removed from the DOM or hidden from the screen.
|
|
6022
|
-
* @see https://floating-ui.com/docs/autoUpdate
|
|
6023
|
-
*/
|
|
6024
|
-
function autoUpdate(reference, floating, update, options) {
|
|
6025
|
-
if (options === void 0) {
|
|
6026
|
-
options = {};
|
|
6027
|
-
}
|
|
6028
|
-
const {
|
|
6029
|
-
ancestorScroll = true,
|
|
6030
|
-
ancestorResize = true,
|
|
6031
|
-
elementResize = typeof ResizeObserver === 'function',
|
|
6032
|
-
layoutShift = typeof IntersectionObserver === 'function',
|
|
6033
|
-
animationFrame = false
|
|
6034
|
-
} = options;
|
|
6035
|
-
const referenceEl = unwrapElement(reference);
|
|
6036
|
-
const ancestors = ancestorScroll || ancestorResize ? [...(referenceEl ? getOverflowAncestors(referenceEl) : []), ...getOverflowAncestors(floating)] : [];
|
|
6037
|
-
ancestors.forEach(ancestor => {
|
|
6038
|
-
ancestorScroll && ancestor.addEventListener('scroll', update, {
|
|
6039
|
-
passive: true
|
|
6040
|
-
});
|
|
6041
|
-
ancestorResize && ancestor.addEventListener('resize', update);
|
|
6042
|
-
});
|
|
6043
|
-
const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update) : null;
|
|
6044
|
-
let reobserveFrame = -1;
|
|
6045
|
-
let resizeObserver = null;
|
|
6046
|
-
if (elementResize) {
|
|
6047
|
-
resizeObserver = new ResizeObserver(_ref => {
|
|
6048
|
-
let [firstEntry] = _ref;
|
|
6049
|
-
if (firstEntry && firstEntry.target === referenceEl && resizeObserver) {
|
|
6050
|
-
// Prevent update loops when using the `size` middleware.
|
|
6051
|
-
// https://github.com/floating-ui/floating-ui/issues/1740
|
|
6052
|
-
resizeObserver.unobserve(floating);
|
|
6053
|
-
cancelAnimationFrame(reobserveFrame);
|
|
6054
|
-
reobserveFrame = requestAnimationFrame(() => {
|
|
6055
|
-
var _resizeObserver;
|
|
6056
|
-
(_resizeObserver = resizeObserver) == null || _resizeObserver.observe(floating);
|
|
6057
|
-
});
|
|
6058
|
-
}
|
|
6059
|
-
update();
|
|
6060
|
-
});
|
|
6061
|
-
if (referenceEl && !animationFrame) {
|
|
6062
|
-
resizeObserver.observe(referenceEl);
|
|
6063
|
-
}
|
|
6064
|
-
resizeObserver.observe(floating);
|
|
6065
|
-
}
|
|
6066
|
-
let frameId;
|
|
6067
|
-
let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;
|
|
6068
|
-
if (animationFrame) {
|
|
6069
|
-
frameLoop();
|
|
6070
|
-
}
|
|
6071
|
-
function frameLoop() {
|
|
6072
|
-
const nextRefRect = getBoundingClientRect(reference);
|
|
6073
|
-
if (prevRefRect && (nextRefRect.x !== prevRefRect.x || nextRefRect.y !== prevRefRect.y || nextRefRect.width !== prevRefRect.width || nextRefRect.height !== prevRefRect.height)) {
|
|
6074
|
-
update();
|
|
6075
|
-
}
|
|
6076
|
-
prevRefRect = nextRefRect;
|
|
6077
|
-
frameId = requestAnimationFrame(frameLoop);
|
|
6078
|
-
}
|
|
6079
|
-
update();
|
|
6080
|
-
return () => {
|
|
6081
|
-
var _resizeObserver2;
|
|
6082
|
-
ancestors.forEach(ancestor => {
|
|
6083
|
-
ancestorScroll && ancestor.removeEventListener('scroll', update);
|
|
6084
|
-
ancestorResize && ancestor.removeEventListener('resize', update);
|
|
6085
|
-
});
|
|
6086
|
-
cleanupIo == null || cleanupIo();
|
|
6087
|
-
(_resizeObserver2 = resizeObserver) == null || _resizeObserver2.disconnect();
|
|
6088
|
-
resizeObserver = null;
|
|
6089
|
-
if (animationFrame) {
|
|
6090
|
-
cancelAnimationFrame(frameId);
|
|
6091
|
-
}
|
|
6092
|
-
};
|
|
6093
|
-
}
|
|
6094
|
-
|
|
6095
|
-
/**
|
|
6096
|
-
* Optimizes the visibility of the floating element by shifting it in order to
|
|
6097
|
-
* keep it in view when it will overflow the clipping boundary.
|
|
6098
|
-
* @see https://floating-ui.com/docs/shift
|
|
6099
|
-
*/
|
|
6100
|
-
const shift = shift$1;
|
|
6487
|
+
x,
|
|
6488
|
+
y,
|
|
6489
|
+
width: rect.width,
|
|
6490
|
+
height: rect.height
|
|
6491
|
+
};
|
|
6492
|
+
}
|
|
6101
6493
|
|
|
6102
|
-
|
|
6103
|
-
|
|
6104
|
-
|
|
6105
|
-
|
|
6106
|
-
|
|
6107
|
-
|
|
6108
|
-
|
|
6494
|
+
function getTrueOffsetParent(element, polyfill) {
|
|
6495
|
+
if (!isHTMLElement(element) || getComputedStyle$1(element).position === 'fixed') {
|
|
6496
|
+
return null;
|
|
6497
|
+
}
|
|
6498
|
+
if (polyfill) {
|
|
6499
|
+
return polyfill(element);
|
|
6500
|
+
}
|
|
6501
|
+
return element.offsetParent;
|
|
6502
|
+
}
|
|
6109
6503
|
|
|
6110
|
-
|
|
6111
|
-
|
|
6112
|
-
|
|
6113
|
-
|
|
6114
|
-
|
|
6115
|
-
|
|
6116
|
-
|
|
6504
|
+
// Gets the closest ancestor positioned element. Handles some edge cases,
|
|
6505
|
+
// such as table ancestors and cross browser bugs.
|
|
6506
|
+
function getOffsetParent(element, polyfill) {
|
|
6507
|
+
const window = getWindow(element);
|
|
6508
|
+
if (!isHTMLElement(element) || isTopLayer(element)) {
|
|
6509
|
+
return window;
|
|
6510
|
+
}
|
|
6511
|
+
let offsetParent = getTrueOffsetParent(element, polyfill);
|
|
6512
|
+
while (offsetParent && isTableElement(offsetParent) && getComputedStyle$1(offsetParent).position === 'static') {
|
|
6513
|
+
offsetParent = getTrueOffsetParent(offsetParent, polyfill);
|
|
6514
|
+
}
|
|
6515
|
+
if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle$1(offsetParent).position === 'static' && !isContainingBlock(offsetParent))) {
|
|
6516
|
+
return window;
|
|
6517
|
+
}
|
|
6518
|
+
return offsetParent || getContainingBlock(element) || window;
|
|
6519
|
+
}
|
|
6117
6520
|
|
|
6118
|
-
|
|
6119
|
-
|
|
6120
|
-
|
|
6121
|
-
|
|
6122
|
-
|
|
6123
|
-
|
|
6124
|
-
|
|
6125
|
-
|
|
6126
|
-
|
|
6127
|
-
|
|
6128
|
-
platform,
|
|
6129
|
-
...options
|
|
6130
|
-
};
|
|
6131
|
-
const platformWithCache = {
|
|
6132
|
-
...mergedOptions.platform,
|
|
6133
|
-
_c: cache
|
|
6521
|
+
const getElementRects = async function (data) {
|
|
6522
|
+
const getOffsetParentFn = this.getOffsetParent || getOffsetParent;
|
|
6523
|
+
const getDimensionsFn = this.getDimensions;
|
|
6524
|
+
return {
|
|
6525
|
+
reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy),
|
|
6526
|
+
floating: {
|
|
6527
|
+
x: 0,
|
|
6528
|
+
y: 0,
|
|
6529
|
+
...(await getDimensionsFn(data.floating))
|
|
6530
|
+
}
|
|
6134
6531
|
};
|
|
6135
|
-
return computePosition$1(reference, floating, {
|
|
6136
|
-
...mergedOptions,
|
|
6137
|
-
platform: platformWithCache
|
|
6138
|
-
});
|
|
6139
6532
|
};
|
|
6140
6533
|
|
|
6141
|
-
const catDatepickerCss = "@charset \"UTF-8\";.flatpickr-calendar{background:transparent;opacity:0;display:none;text-align:center;visibility:hidden;padding:0;-webkit-animation:none;animation:none;direction:ltr;border:0;font-size:14px;line-height:24px;border-radius:5px;position:absolute;width:307.875px;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-touch-action:manipulation;touch-action:manipulation;background:#fff;-webkit-box-shadow:1px 0 0 #e6e6e6, -1px 0 0 #e6e6e6, 0 1px 0 #e6e6e6, 0 -1px 0 #e6e6e6, 0 3px 13px rgba(0,0,0,0.08);box-shadow:1px 0 0 #e6e6e6, -1px 0 0 #e6e6e6, 0 1px 0 #e6e6e6, 0 -1px 0 #e6e6e6, 0 3px 13px rgba(0,0,0,0.08)}.flatpickr-calendar.open,.flatpickr-calendar.inline{opacity:1;max-height:640px;visibility:visible}.flatpickr-calendar.open{display:inline-block;z-index:99999}.flatpickr-calendar.animate.open{-webkit-animation:fpFadeInDown 300ms cubic-bezier(0.23, 1, 0.32, 1);animation:fpFadeInDown 300ms cubic-bezier(0.23, 1, 0.32, 1)}.flatpickr-calendar.inline{display:block;position:relative;top:2px}.flatpickr-calendar.static{position:absolute;top:calc(100% + 2px)}.flatpickr-calendar.static.open{z-index:999;display:block}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+1) .flatpickr-day.inRange:nth-child(7n+7){-webkit-box-shadow:none !important;box-shadow:none !important}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+2) .flatpickr-day.inRange:nth-child(7n+1){-webkit-box-shadow:-2px 0 0 #e6e6e6, 5px 0 0 #e6e6e6;box-shadow:-2px 0 0 #e6e6e6, 5px 0 0 #e6e6e6}.flatpickr-calendar .hasWeeks .dayContainer,.flatpickr-calendar .hasTime .dayContainer{border-bottom:0;border-bottom-right-radius:0;border-bottom-left-radius:0}.flatpickr-calendar .hasWeeks .dayContainer{border-left:0}.flatpickr-calendar.hasTime .flatpickr-time{height:40px;border-top:1px solid #e6e6e6}.flatpickr-calendar.noCalendar.hasTime .flatpickr-time{height:auto}.flatpickr-calendar:before,.flatpickr-calendar:after{position:absolute;display:block;pointer-events:none;border:solid transparent;content:'';height:0;width:0;left:22px}.flatpickr-calendar.rightMost:before,.flatpickr-calendar.arrowRight:before,.flatpickr-calendar.rightMost:after,.flatpickr-calendar.arrowRight:after{left:auto;right:22px}.flatpickr-calendar.arrowCenter:before,.flatpickr-calendar.arrowCenter:after{left:50%;right:50%}.flatpickr-calendar:before{border-width:5px;margin:0 -5px}.flatpickr-calendar:after{border-width:4px;margin:0 -4px}.flatpickr-calendar.arrowTop:before,.flatpickr-calendar.arrowTop:after{bottom:100%}.flatpickr-calendar.arrowTop:before{border-bottom-color:#e6e6e6}.flatpickr-calendar.arrowTop:after{border-bottom-color:#fff}.flatpickr-calendar.arrowBottom:before,.flatpickr-calendar.arrowBottom:after{top:100%}.flatpickr-calendar.arrowBottom:before{border-top-color:#e6e6e6}.flatpickr-calendar.arrowBottom:after{border-top-color:#fff}.flatpickr-calendar:focus{outline:0}.flatpickr-wrapper{position:relative;display:inline-block}.flatpickr-months{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-months .flatpickr-month{background:transparent;color:rgba(0,0,0,0.9);fill:rgba(0,0,0,0.9);height:34px;line-height:1;text-align:center;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;overflow:hidden;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}.flatpickr-months .flatpickr-prev-month,.flatpickr-months .flatpickr-next-month{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;text-decoration:none;cursor:pointer;position:absolute;top:0;height:34px;padding:10px;z-index:3;color:rgba(0,0,0,0.9);fill:rgba(0,0,0,0.9)}.flatpickr-months .flatpickr-prev-month.flatpickr-disabled,.flatpickr-months .flatpickr-next-month.flatpickr-disabled{display:none}.flatpickr-months .flatpickr-prev-month i,.flatpickr-months .flatpickr-next-month i{position:relative}.flatpickr-months .flatpickr-prev-month.flatpickr-prev-month,.flatpickr-months .flatpickr-next-month.flatpickr-prev-month{left:0;}.flatpickr-months .flatpickr-prev-month.flatpickr-next-month,.flatpickr-months .flatpickr-next-month.flatpickr-next-month{right:0;}.flatpickr-months .flatpickr-prev-month:hover,.flatpickr-months .flatpickr-next-month:hover{color:#959ea9}.flatpickr-months .flatpickr-prev-month:hover svg,.flatpickr-months .flatpickr-next-month:hover svg{fill:#f64747}.flatpickr-months .flatpickr-prev-month svg,.flatpickr-months .flatpickr-next-month svg{width:14px;height:14px}.flatpickr-months .flatpickr-prev-month svg path,.flatpickr-months .flatpickr-next-month svg path{-webkit-transition:fill 0.1s;transition:fill 0.1s;fill:inherit}.numInputWrapper{position:relative;height:auto}.numInputWrapper input,.numInputWrapper span{display:inline-block}.numInputWrapper input{width:100%}.numInputWrapper input::-ms-clear{display:none}.numInputWrapper input::-webkit-outer-spin-button,.numInputWrapper input::-webkit-inner-spin-button{margin:0;-webkit-appearance:none}.numInputWrapper span{position:absolute;right:0;width:14px;padding:0 4px 0 2px;height:50%;line-height:50%;opacity:0;cursor:pointer;border:1px solid rgba(57,57,57,0.15);-webkit-box-sizing:border-box;box-sizing:border-box}.numInputWrapper span:hover{background:rgba(0,0,0,0.1)}.numInputWrapper span:active{background:rgba(0,0,0,0.2)}.numInputWrapper span:after{display:block;content:\"\";position:absolute}.numInputWrapper span.arrowUp{top:0;border-bottom:0}.numInputWrapper span.arrowUp:after{border-left:4px solid transparent;border-right:4px solid transparent;border-bottom:4px solid rgba(57,57,57,0.6);top:26%}.numInputWrapper span.arrowDown{top:50%}.numInputWrapper span.arrowDown:after{border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid rgba(57,57,57,0.6);top:40%}.numInputWrapper span svg{width:inherit;height:auto}.numInputWrapper span svg path{fill:rgba(0,0,0,0.5)}.numInputWrapper:hover{background:rgba(0,0,0,0.05)}.numInputWrapper:hover span{opacity:1}.flatpickr-current-month{font-size:135%;line-height:inherit;font-weight:300;color:inherit;position:absolute;width:75%;left:12.5%;padding:7.48px 0 0 0;line-height:1;height:34px;display:inline-block;text-align:center;-webkit-transform:translate3d(0px, 0px, 0px);transform:translate3d(0px, 0px, 0px)}.flatpickr-current-month span.cur-month{font-family:inherit;font-weight:700;color:inherit;display:inline-block;margin-left:0.5ch;padding:0}.flatpickr-current-month span.cur-month:hover{background:rgba(0,0,0,0.05)}.flatpickr-current-month .numInputWrapper{width:6ch;width:7ch\\0;display:inline-block}.flatpickr-current-month .numInputWrapper span.arrowUp:after{border-bottom-color:rgba(0,0,0,0.9)}.flatpickr-current-month .numInputWrapper span.arrowDown:after{border-top-color:rgba(0,0,0,0.9)}.flatpickr-current-month input.cur-year{background:transparent;-webkit-box-sizing:border-box;box-sizing:border-box;color:inherit;cursor:text;padding:0 0 0 0.5ch;margin:0;display:inline-block;font-size:inherit;font-family:inherit;font-weight:300;line-height:inherit;height:auto;border:0;border-radius:0;vertical-align:initial;-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}.flatpickr-current-month input.cur-year:focus{outline:0}.flatpickr-current-month input.cur-year[disabled],.flatpickr-current-month input.cur-year[disabled]:hover{font-size:100%;color:rgba(0,0,0,0.5);background:transparent;pointer-events:none}.flatpickr-current-month .flatpickr-monthDropdown-months{appearance:menulist;background:transparent;border:none;border-radius:0;box-sizing:border-box;color:inherit;cursor:pointer;font-size:inherit;font-family:inherit;font-weight:300;height:auto;line-height:inherit;margin:-1px 0 0 0;outline:none;padding:0 0 0 0.5ch;position:relative;vertical-align:initial;-webkit-box-sizing:border-box;-webkit-appearance:menulist;-moz-appearance:menulist;width:auto}.flatpickr-current-month .flatpickr-monthDropdown-months:focus,.flatpickr-current-month .flatpickr-monthDropdown-months:active{outline:none}.flatpickr-current-month .flatpickr-monthDropdown-months:hover{background:rgba(0,0,0,0.05)}.flatpickr-current-month .flatpickr-monthDropdown-months .flatpickr-monthDropdown-month{background-color:transparent;outline:none;padding:0}.flatpickr-weekdays{background:transparent;text-align:center;overflow:hidden;width:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;height:28px}.flatpickr-weekdays .flatpickr-weekdaycontainer{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}span.flatpickr-weekday{cursor:default;font-size:90%;background:transparent;color:rgba(0,0,0,0.54);line-height:1;margin:0;text-align:center;display:block;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;font-weight:bolder}.dayContainer,.flatpickr-weeks{padding:1px 0 0 0}.flatpickr-days{position:relative;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:start;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start;width:307.875px}.flatpickr-days:focus{outline:0}.dayContainer{padding:0;outline:0;text-align:left;width:307.875px;min-width:307.875px;max-width:307.875px;-webkit-box-sizing:border-box;box-sizing:border-box;display:inline-block;display:-ms-flexbox;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-wrap:wrap;-ms-flex-pack:justify;-webkit-justify-content:space-around;justify-content:space-around;-webkit-transform:translate3d(0px, 0px, 0px);transform:translate3d(0px, 0px, 0px);opacity:1}.dayContainer+.dayContainer{-webkit-box-shadow:-1px 0 0 #e6e6e6;box-shadow:-1px 0 0 #e6e6e6}.flatpickr-day{background:none;border:1px solid transparent;border-radius:150px;-webkit-box-sizing:border-box;box-sizing:border-box;color:#393939;cursor:pointer;font-weight:400;width:14.2857143%;-webkit-flex-basis:14.2857143%;-ms-flex-preferred-size:14.2857143%;flex-basis:14.2857143%;max-width:39px;height:39px;line-height:39px;margin:0;display:inline-block;position:relative;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;text-align:center}.flatpickr-day.inRange,.flatpickr-day.prevMonthDay.inRange,.flatpickr-day.nextMonthDay.inRange,.flatpickr-day.today.inRange,.flatpickr-day.prevMonthDay.today.inRange,.flatpickr-day.nextMonthDay.today.inRange,.flatpickr-day:hover,.flatpickr-day.prevMonthDay:hover,.flatpickr-day.nextMonthDay:hover,.flatpickr-day:focus,.flatpickr-day.prevMonthDay:focus,.flatpickr-day.nextMonthDay:focus{cursor:pointer;outline:0;background:#e6e6e6;border-color:#e6e6e6}.flatpickr-day.today{border-color:#959ea9}.flatpickr-day.today:hover,.flatpickr-day.today:focus{border-color:#959ea9;background:#959ea9;color:#fff}.flatpickr-day.selected,.flatpickr-day.startRange,.flatpickr-day.endRange,.flatpickr-day.selected.inRange,.flatpickr-day.startRange.inRange,.flatpickr-day.endRange.inRange,.flatpickr-day.selected:focus,.flatpickr-day.startRange:focus,.flatpickr-day.endRange:focus,.flatpickr-day.selected:hover,.flatpickr-day.startRange:hover,.flatpickr-day.endRange:hover,.flatpickr-day.selected.prevMonthDay,.flatpickr-day.startRange.prevMonthDay,.flatpickr-day.endRange.prevMonthDay,.flatpickr-day.selected.nextMonthDay,.flatpickr-day.startRange.nextMonthDay,.flatpickr-day.endRange.nextMonthDay{background:#569ff7;-webkit-box-shadow:none;box-shadow:none;color:#fff;border-color:#569ff7}.flatpickr-day.selected.startRange,.flatpickr-day.startRange.startRange,.flatpickr-day.endRange.startRange{border-radius:50px 0 0 50px}.flatpickr-day.selected.endRange,.flatpickr-day.startRange.endRange,.flatpickr-day.endRange.endRange{border-radius:0 50px 50px 0}.flatpickr-day.selected.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.startRange.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.endRange.startRange+.endRange:not(:nth-child(7n+1)){-webkit-box-shadow:-10px 0 0 #569ff7;box-shadow:-10px 0 0 #569ff7}.flatpickr-day.selected.startRange.endRange,.flatpickr-day.startRange.startRange.endRange,.flatpickr-day.endRange.startRange.endRange{border-radius:50px}.flatpickr-day.inRange{border-radius:0;-webkit-box-shadow:-5px 0 0 #e6e6e6, 5px 0 0 #e6e6e6;box-shadow:-5px 0 0 #e6e6e6, 5px 0 0 #e6e6e6}.flatpickr-day.flatpickr-disabled,.flatpickr-day.flatpickr-disabled:hover,.flatpickr-day.prevMonthDay,.flatpickr-day.nextMonthDay,.flatpickr-day.notAllowed,.flatpickr-day.notAllowed.prevMonthDay,.flatpickr-day.notAllowed.nextMonthDay{color:rgba(57,57,57,0.3);background:transparent;border-color:transparent;cursor:default}.flatpickr-day.flatpickr-disabled,.flatpickr-day.flatpickr-disabled:hover{cursor:not-allowed;color:rgba(57,57,57,0.1)}.flatpickr-day.week.selected{border-radius:0;-webkit-box-shadow:-5px 0 0 #569ff7, 5px 0 0 #569ff7;box-shadow:-5px 0 0 #569ff7, 5px 0 0 #569ff7}.flatpickr-day.hidden{visibility:hidden}.rangeMode .flatpickr-day{margin-top:1px}.flatpickr-weekwrapper{float:left}.flatpickr-weekwrapper .flatpickr-weeks{padding:0 12px;-webkit-box-shadow:1px 0 0 #e6e6e6;box-shadow:1px 0 0 #e6e6e6}.flatpickr-weekwrapper .flatpickr-weekday{float:none;width:100%;line-height:28px}.flatpickr-weekwrapper span.flatpickr-day,.flatpickr-weekwrapper span.flatpickr-day:hover{display:block;width:100%;max-width:none;color:rgba(57,57,57,0.3);background:transparent;cursor:default;border:none}.flatpickr-innerContainer{display:block;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden}.flatpickr-rContainer{display:inline-block;padding:0;-webkit-box-sizing:border-box;box-sizing:border-box}.flatpickr-time{text-align:center;outline:0;display:block;height:0;line-height:40px;max-height:40px;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-time:after{content:\"\";display:table;clear:both}.flatpickr-time .numInputWrapper{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;width:40%;height:40px;float:left}.flatpickr-time .numInputWrapper span.arrowUp:after{border-bottom-color:#393939}.flatpickr-time .numInputWrapper span.arrowDown:after{border-top-color:#393939}.flatpickr-time.hasSeconds .numInputWrapper{width:26%}.flatpickr-time.time24hr .numInputWrapper{width:49%}.flatpickr-time input{background:transparent;-webkit-box-shadow:none;box-shadow:none;border:0;border-radius:0;text-align:center;margin:0;padding:0;height:inherit;line-height:inherit;color:#393939;font-size:14px;position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}.flatpickr-time input.flatpickr-hour{font-weight:bold}.flatpickr-time input.flatpickr-minute,.flatpickr-time input.flatpickr-second{font-weight:400}.flatpickr-time input:focus{outline:0;border:0}.flatpickr-time .flatpickr-time-separator,.flatpickr-time .flatpickr-am-pm{height:inherit;float:left;line-height:inherit;color:#393939;font-weight:bold;width:2%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-align-self:center;-ms-flex-item-align:center;align-self:center}.flatpickr-time .flatpickr-am-pm{outline:0;width:18%;cursor:pointer;text-align:center;font-weight:400}.flatpickr-time input:hover,.flatpickr-time .flatpickr-am-pm:hover,.flatpickr-time input:focus,.flatpickr-time .flatpickr-am-pm:focus{background:#eee}.flatpickr-input[readonly]{cursor:pointer}@-webkit-keyframes fpFadeInDown{from{opacity:0;-webkit-transform:translate3d(0, -20px, 0);transform:translate3d(0, -20px, 0)}to{opacity:1;-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0)}}@keyframes fpFadeInDown{from{opacity:0;-webkit-transform:translate3d(0, -20px, 0);transform:translate3d(0, -20px, 0)}to{opacity:1;-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0)}}.flatpickr-calendar{font-size:0.875rem;line-height:1.125rem;font-weight:var(--cat-font-weight-body, 400);box-shadow:0 4px 6px -2px rgba(27, 31, 38, 0.03), 0 12px 16px -4px rgba(27, 31, 38, 0.08);border-radius:var(--cat-border-radius-m, 0.25rem);border:1px solid rgb(var(--cat-border-color, 235, 236, 240));background:white;padding:1rem}.flatpickr-calendar:not(.inline).animate{transform:translateY(-1rem);opacity:0;transition:transform 125ms cubic-bezier(0.3, 0, 0.8, 0.15), opacity 125ms cubic-bezier(0.3, 0, 0.8, 0.15)}.flatpickr-calendar::before,.flatpickr-calendar::after{display:none}.flatpickr-calendar.inline,.flatpickr-calendar.open{display:flex;flex-direction:column;gap:1rem;width:auto !important}.flatpickr-calendar.inline{border:unset;padding:0}.flatpickr-calendar.open{z-index:calc(var(--cat-z-index, 1000) + 100);margin-top:0.75rem;margin-left:-0.75rem}.flatpickr-calendar.open.animate{opacity:1;transform:translateY(0);transition:transform 500ms cubic-bezier(0.05, 0.7, 0.1, 1), opacity 500ms cubic-bezier(0.05, 0.7, 0.1, 1)}.flatpickr-months{gap:0.25rem}.flatpickr-months .flatpickr-month{height:auto}.flatpickr-current-month{font-size:1.125rem;line-height:1.5rem;font-weight:var(--cat-font-weight-head, 600);font-feature-settings:\"pnum\";height:100%;padding:0;display:flex;position:static;width:auto;gap:0.25rem}.flatpickr-current-month .flatpickr-monthDropdown-months{padding:0 0.25rem;flex:1;margin:unset;font-weight:inherit;border-radius:var(--cat-border-radius-m, 0.25rem)}.flatpickr-current-month .flatpickr-monthDropdown-months:hover,.flatpickr-current-month .flatpickr-monthDropdown-months:focus-within{background-color:rgba(var(--cat-primary-bg, 0, 129, 148), 0.05)}.flatpickr-current-month input.cur-year{padding:0;font-weight:inherit;line-height:2.25rem}.flatpickr-current-month .numInputWrapper{width:7ch}.flatpickr-months .flatpickr-prev-month,.flatpickr-months .flatpickr-next-month{position:static;width:2.25rem;height:2.25rem;padding:0;align-items:center;display:flex;justify-content:center;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.flatpickr-months .flatpickr-prev-month:hover,.flatpickr-months .flatpickr-next-month:hover{color:rgb(var(--cat-font-color-base, 0, 0, 0))}.flatpickr-weekdays{height:2rem}.flatpickr-weekdays .flatpickr-weekday{color:rgb(var(--cat-font-color-muted, 81, 92, 108));font-size:0.75rem;line-height:1rem;font-weight:700}.flatpickr-weekwrapper .flatpickr-weekday{height:2rem}.flatpickr-weekwrapper .flatpickr-weeks{box-shadow:none;width:2rem;padding:0;margin-right:0.5rem;background:#f2f4f7;border-radius:var(--cat-border-radius-m, 0.25rem)}.flatpickr-weekwrapper span.flatpickr-day,.flatpickr-weekwrapper span.flatpickr-day:hover{font-size:0.75rem;line-height:1rem;font-weight:700;color:rgb(var(--cat-font-color-muted, 81, 92, 108));text-align:center;line-height:2.25rem}.flatpickr-days{width:15.75rem !important}.dayContainer{width:15.75rem;min-width:15.75rem;max-width:15.75rem}.flatpickr-day{color:rgb(var(--cat-font-color-base, 0, 0, 0));height:2.25rem;line-height:2.25rem;border:0;border-radius:var(--cat-border-radius-m, 0.25rem)}.flatpickr-day:hover{background-color:#f2f4f7;font-weight:700}.flatpickr-day.flatpickr-disabled,.flatpickr-day.flatpickr-disabled:hover{color:rgb(var(--cat-font-color-muted, 81, 92, 108));font-weight:inherit;background-color:inherit !important}.flatpickr-day.today{color:rgb(var(--cat-primary-text, 0, 129, 148));box-shadow:inset 0 0 0 2px rgb(var(--cat-primary-text, 0, 129, 148))}.flatpickr-day.today:hover,.flatpickr-day.today:focus{background-color:#f2f4f7;color:rgb(var(--cat-primary-text, 0, 129, 148))}.flatpickr-day.flatpickr-disabled,.flatpickr-day.flatpickr-disabled:hover,.flatpickr-day.prevMonthDay,.flatpickr-day.nextMonthDay,.flatpickr-day.notAllowed,.flatpickr-day.notAllowed.prevMonthDay,.flatpickr-day.notAllowed.nextMonthDay{color:rgba(var(--cat-font-color-muted, 81, 92, 108), 0.5)}.flatpickr-day.selected,.flatpickr-day.selected:hover,.flatpickr-day.selected:focus,.flatpickr-day.selected.inRange,.flatpickr-day.selected.nextMonthDay,.flatpickr-day.selected.prevMonthDay,.flatpickr-day.startRange,.flatpickr-day.startRange:hover,.flatpickr-day.startRange:focus,.flatpickr-day.startRange.inRange,.flatpickr-day.startRange.nextMonthDay,.flatpickr-day.startRange.prevMonthDay,.flatpickr-day.endRange,.flatpickr-day.endRange:hover,.flatpickr-day.endRange:focus,.flatpickr-day.endRange.inRange,.flatpickr-day.endRange.nextMonthDay,.flatpickr-day.endRange.prevMonthDay{font-weight:700;background-color:rgb(var(--cat-primary-bg, 0, 129, 148)) !important;color:rgb(var(--cat-primary-fill, 255, 255, 255)) !important}.flatpickr-day.inRange,.flatpickr-day.prevMonthDay.inRange,.flatpickr-day.nextMonthDay.inRange,.flatpickr-day.today.inRange,.flatpickr-day.prevMonthDay.today.inRange,.flatpickr-day.nextMonthDay.today.inRange,.flatpickr-day:hover,.flatpickr-day.prevMonthDay:hover,.flatpickr-day.nextMonthDay:hover,.flatpickr-day:focus,.flatpickr-day.prevMonthDay:focus,.flatpickr-day.nextMonthDay:focus{background-color:rgba(var(--cat-primary-bg, 0, 129, 148), 0.1)}.flatpickr-day.selected.startRange,.flatpickr-day.startRange.startRange,.flatpickr-day.endRange.startRange{border-top-left-radius:var(--cat-border-radius-m, 0.25rem);border-bottom-left-radius:var(--cat-border-radius-m, 0.25rem)}.flatpickr-day.selected.endRange,.flatpickr-day.startRange.endRange,.flatpickr-day.endRange.endRange{border-top-right-radius:var(--cat-border-radius-m, 0.25rem);border-bottom-right-radius:var(--cat-border-radius-m, 0.25rem)}.numInputWrapper{padding:0 1rem 0 0.5rem;border-radius:var(--cat-border-radius-m, 0.25rem)}.numInputWrapper:hover,.numInputWrapper:focus-within{background-color:rgba(var(--cat-primary-bg, 0, 129, 148), 0.05)}.numInputWrapper span{border:none;background:transparent;width:1rem;padding:0;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.numInputWrapper span.arrowUp::after{content:\"↑\";align-items:flex-end}.numInputWrapper span.arrowDown::after{content:\"↓\";align-items:flex-start}.numInputWrapper span::after{font-size:0.75rem;line-height:1rem;font-weight:700;position:static;border:0 !important;font-size:10px;display:flex;height:100%;justify-content:center}.numInputWrapper span:hover{color:rgb(var(--cat-font-color-base, 0, 0, 0));background:transparent}.flatpickr-calendar.hasTime .flatpickr-time{border:1px solid rgb(var(--cat-border-color, 235, 236, 240));border-radius:var(--cat-border-radius-m, 0.25rem);min-width:12rem;height:auto}.flatpickr-calendar.hasTime .flatpickr-time .numInputWrapper{height:2rem;padding:0;margin:0.25rem;display:flex}.flatpickr-calendar.hasTime.noCalendar{padding:0}.flatpickr-calendar.hasTime.noCalendar .flatpickr-time{border:none}.flatpickr-time .flatpickr-time-separator,.flatpickr-time .flatpickr-am-pm{margin:0 0.25rem;font-size:1.125rem;line-height:1.5rem;font-weight:400;font-feature-settings:\"pnum\";color:rgb(var(--cat-font-color-base, 0, 0, 0));line-height:2.25rem}.flatpickr-time .flatpickr-am-pm{width:25%;padding:0 0.5rem}.flatpickr-time .flatpickr-am-pm:hover,.flatpickr-time .flatpickr-am-pm:focus{border-radius:var(--cat-border-radius-m, 0.25rem);background-color:rgba(var(--cat-primary-bg, 0, 129, 148), 0.05)}.flatpickr-time{max-height:unset}.flatpickr-time input{background:transparent !important;color:rgb(var(--cat-font-color-base, 0, 0, 0));font-size:0.9375rem;line-height:2.25rem;font-family:inherit}.flatpickr-time input.flatpickr-hour{font-weight:inherit}.flatpickr-day.inRange:not(.today),.flatpickr-day.week.selected{box-shadow:none}.flatpickr-day.inRange:nth-child(7n+1),.flatpickr-day.week.selected:nth-child(7n+1){border-top-left-radius:var(--cat-border-radius-m, 0.25rem);border-bottom-left-radius:var(--cat-border-radius-m, 0.25rem)}.flatpickr-day.inRange:nth-child(7n+7),.flatpickr-day.week.selected:nth-child(7n+7){border-top-right-radius:var(--cat-border-radius-m, 0.25rem);border-bottom-right-radius:var(--cat-border-radius-m, 0.25rem)}.flatpickr-day.selected.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.startRange.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.endRange.startRange+.endRange:not(:nth-child(7n+1)){box-shadow:none}.flatpickr-day.selected.startRange.endRange,.flatpickr-day.startRange.startRange.endRange,.flatpickr-day.endRange.startRange.endRange{border-radius:var(--cat-border-radius-m, 0.25rem)}:host{display:flex}:host([hidden]){display:none}cat-input{flex:1 1 auto;margin:0}";
|
|
6142
|
-
|
|
6534
|
+
function isRTL(element) {
|
|
6535
|
+
return getComputedStyle$1(element).direction === 'rtl';
|
|
6536
|
+
}
|
|
6143
6537
|
|
|
6144
|
-
const
|
|
6145
|
-
|
|
6146
|
-
|
|
6147
|
-
|
|
6148
|
-
|
|
6149
|
-
|
|
6150
|
-
|
|
6151
|
-
|
|
6152
|
-
|
|
6153
|
-
|
|
6154
|
-
|
|
6155
|
-
this.clearable = false;
|
|
6156
|
-
this.disabled = false;
|
|
6157
|
-
this.hint = undefined;
|
|
6158
|
-
this.icon = undefined;
|
|
6159
|
-
this.iconRight = false;
|
|
6160
|
-
this.identifier = undefined;
|
|
6161
|
-
this.label = '';
|
|
6162
|
-
this.labelHidden = false;
|
|
6163
|
-
this.max = undefined;
|
|
6164
|
-
this.min = undefined;
|
|
6165
|
-
this.mode = 'date';
|
|
6166
|
-
this.name = undefined;
|
|
6167
|
-
this.placeholder = undefined;
|
|
6168
|
-
this.textPrefix = undefined;
|
|
6169
|
-
this.textSuffix = undefined;
|
|
6170
|
-
this.readonly = false;
|
|
6171
|
-
this.required = false;
|
|
6172
|
-
this.step = 5;
|
|
6173
|
-
this.attachToElement = false;
|
|
6174
|
-
this.position = undefined;
|
|
6175
|
-
this.value = undefined;
|
|
6176
|
-
this.errors = undefined;
|
|
6177
|
-
this.errorUpdate = 0;
|
|
6178
|
-
this.nativeAttributes = undefined;
|
|
6179
|
-
this.nativePickerAttributes = undefined;
|
|
6180
|
-
}
|
|
6181
|
-
get input() {
|
|
6182
|
-
return this._input?.shadowRoot?.querySelector('input') ?? undefined;
|
|
6183
|
-
}
|
|
6184
|
-
onValueChanged(value) {
|
|
6185
|
-
if (value) {
|
|
6186
|
-
this.pickr?.setDate(value, false);
|
|
6187
|
-
if (this.mode !== 'daterange' || value.includes(' - ')) {
|
|
6188
|
-
this.catChange.emit(value);
|
|
6189
|
-
}
|
|
6190
|
-
}
|
|
6191
|
-
else {
|
|
6192
|
-
this.pickr?.clear(false);
|
|
6193
|
-
this.catChange.emit(undefined);
|
|
6194
|
-
}
|
|
6195
|
-
}
|
|
6196
|
-
onDisabledChanged() {
|
|
6197
|
-
// Dynamically changing config value is not working due to a bug in the
|
|
6198
|
-
// library. We thus need to fully recreate the date picker after the value
|
|
6199
|
-
// has been updated.
|
|
6200
|
-
this.pickr?.destroy();
|
|
6201
|
-
this.pickr = undefined;
|
|
6202
|
-
setTimeout(() => {
|
|
6203
|
-
this.input ? (this.input.disabled = this.disabled) : null;
|
|
6204
|
-
this.pickr = this.initDatepicker(this.input);
|
|
6205
|
-
});
|
|
6206
|
-
}
|
|
6207
|
-
componentDidLoad() {
|
|
6208
|
-
this.pickr = this.initDatepicker(this.input);
|
|
6209
|
-
}
|
|
6210
|
-
componentWillRender() {
|
|
6211
|
-
this.hasSlottedLabel = !!this.hostElement.querySelector('[slot="label"]');
|
|
6212
|
-
this.hasSlottedHint = !!this.hostElement.querySelector('[slot="hint"]');
|
|
6213
|
-
}
|
|
6214
|
-
onMinChanged() {
|
|
6215
|
-
this.pickr?.set('minDate', this.min);
|
|
6216
|
-
this.pickr?.set('maxDate', this.max);
|
|
6217
|
-
if (this.value && !this.pickr?.selectedDates?.length) {
|
|
6218
|
-
// Dynamically changing 'minDate' or 'maxDate' does not emit a change if
|
|
6219
|
-
// the value is cleared due to an invalid date.
|
|
6220
|
-
this.pickr?.clear();
|
|
6221
|
-
}
|
|
6222
|
-
}
|
|
6223
|
-
/**
|
|
6224
|
-
* Programmatically move focus to the datepicker. Use this method instead of
|
|
6225
|
-
* `input.focus()`.
|
|
6226
|
-
*
|
|
6227
|
-
* @param options An optional object providing options to control aspects of
|
|
6228
|
-
* the focusing process.
|
|
6229
|
-
*/
|
|
6230
|
-
async doFocus(options) {
|
|
6231
|
-
this._input?.doFocus(options);
|
|
6232
|
-
}
|
|
6233
|
-
/**
|
|
6234
|
-
* Programmatically remove focus from the datepicker. Use this method instead of
|
|
6235
|
-
* `input.blur()`.
|
|
6236
|
-
*/
|
|
6237
|
-
async doBlur() {
|
|
6238
|
-
this._input?.doBlur();
|
|
6239
|
-
}
|
|
6240
|
-
render() {
|
|
6241
|
-
return [
|
|
6242
|
-
index.h("cat-input", { key: 'bb983974c17139ee60d88877e398b1c46d672d37', ref: el => (this._input = el), requiredMarker: this.requiredMarker, horizontal: this.horizontal, autoComplete: this.autoComplete, clearable: this.clearable, disabled: this.disabled, hint: this.hint, icon: this.icon, iconRight: this.iconRight, identifier: this.identifier, label: this.label, labelHidden: this.labelHidden, name: this.name, placeholder: this.placeholder, textPrefix: this.textPrefix, textSuffix: this.textSuffix, readonly: this.readonly, required: this.required, value: this.value, errors: this.errors, errorUpdate: this.errorUpdate, nativeAttributes: this.nativeAttributes, onCatChange: e => {
|
|
6243
|
-
e.stopPropagation();
|
|
6244
|
-
this.value = e.detail || undefined;
|
|
6245
|
-
}, onCatFocus: e => {
|
|
6246
|
-
e.stopPropagation();
|
|
6247
|
-
this.catFocus.emit(e.detail);
|
|
6248
|
-
}, onCatBlur: e => {
|
|
6249
|
-
e.stopPropagation();
|
|
6250
|
-
this.catBlur.emit(e.detail);
|
|
6251
|
-
} }, this.hasSlottedLabel && (index.h("span", { slot: "label" }, index.h("slot", { name: "label" }))), this.hasSlottedHint && (index.h("span", { slot: "hint" }, index.h("slot", { name: "hint" })))),
|
|
6252
|
-
index.h("div", { key: 'c8112214544e0582a1196350a846ddeb063067a3', ref: el => (this._calendarWrapper = el), class: "datepicker-wrapper" })
|
|
6253
|
-
];
|
|
6254
|
-
}
|
|
6255
|
-
initDatepicker(input) {
|
|
6256
|
-
if (!input) {
|
|
6257
|
-
return;
|
|
6258
|
-
}
|
|
6259
|
-
// avoid dropdown closing if datepicker is part of a dropdown
|
|
6260
|
-
const withinDropdown = !!findClosest('cat-dropdown', input);
|
|
6261
|
-
const nativePickerAttributes = withinDropdown ? { 'data-dropdown-no-close': '' } : {};
|
|
6262
|
-
return flatpickr(input, getConfig({
|
|
6263
|
-
locale: getLocale$1(of.catI18nRegistry.getLocale()),
|
|
6264
|
-
format: getFormat(of.catI18nRegistry.getLocale(), this.mode),
|
|
6265
|
-
mode: this.mode,
|
|
6266
|
-
min: this.min,
|
|
6267
|
-
max: this.max,
|
|
6268
|
-
step: this.step,
|
|
6269
|
-
disabled: this.disabled,
|
|
6270
|
-
readonly: this.readonly,
|
|
6271
|
-
appendTo: this.attachToElement ? this._calendarWrapper : undefined,
|
|
6272
|
-
nativePickerAttributes: { ...nativePickerAttributes, ...this.nativePickerAttributes },
|
|
6273
|
-
// flatpickr has open bug about incorrect positioning when appendTo is used,
|
|
6274
|
-
// we have to use custom logic to calculate position
|
|
6275
|
-
// https://github.com/flatpickr/flatpickr/issues/1619
|
|
6276
|
-
position: this.attachToElement
|
|
6277
|
-
? (flatpickr, positionElement) => {
|
|
6278
|
-
this.updatePosition(flatpickr, positionElement);
|
|
6279
|
-
}
|
|
6280
|
-
: this.position || undefined,
|
|
6281
|
-
onReady: (_dates, _dateStr, flatpickr) => {
|
|
6282
|
-
autoUpdate(input, flatpickr.calendarContainer, () => this.updatePosition(flatpickr, flatpickr._input));
|
|
6283
|
-
},
|
|
6284
|
-
applyChange: value => (this.value = value)
|
|
6285
|
-
}));
|
|
6286
|
-
}
|
|
6287
|
-
updatePosition(flatpickr, positionElement) {
|
|
6288
|
-
if (positionElement) {
|
|
6289
|
-
computePosition(positionElement, flatpickr.calendarContainer, {
|
|
6290
|
-
strategy: 'fixed',
|
|
6291
|
-
placement: this.position || 'bottom-start',
|
|
6292
|
-
middleware: [flip()]
|
|
6293
|
-
}).then(({ x, y, placement }) => {
|
|
6294
|
-
if (flatpickr.calendarContainer) {
|
|
6295
|
-
flatpickr.calendarContainer.dataset.placement = placement;
|
|
6296
|
-
Object.assign(flatpickr.calendarContainer.style, {
|
|
6297
|
-
left: `${x}px`,
|
|
6298
|
-
top: `${y}px`,
|
|
6299
|
-
position: 'fixed'
|
|
6300
|
-
});
|
|
6301
|
-
}
|
|
6302
|
-
});
|
|
6303
|
-
}
|
|
6304
|
-
}
|
|
6305
|
-
get hostElement() { return index.getElement(this); }
|
|
6306
|
-
static get watchers() { return {
|
|
6307
|
-
"value": ["onValueChanged"],
|
|
6308
|
-
"disabled": ["onDisabledChanged"],
|
|
6309
|
-
"readonly": ["onDisabledChanged"],
|
|
6310
|
-
"mode": ["onDisabledChanged"],
|
|
6311
|
-
"min": ["onMinChanged"],
|
|
6312
|
-
"max": ["onMinChanged"]
|
|
6313
|
-
}; }
|
|
6538
|
+
const platform = {
|
|
6539
|
+
convertOffsetParentRelativeRectToViewportRelativeRect,
|
|
6540
|
+
getDocumentElement,
|
|
6541
|
+
getClippingRect,
|
|
6542
|
+
getOffsetParent,
|
|
6543
|
+
getElementRects,
|
|
6544
|
+
getClientRects,
|
|
6545
|
+
getDimensions,
|
|
6546
|
+
getScale,
|
|
6547
|
+
isElement,
|
|
6548
|
+
isRTL
|
|
6314
6549
|
};
|
|
6315
|
-
CatDatepickerFlat.style = CatDatepickerStyle0;
|
|
6316
6550
|
|
|
6317
|
-
const catDatepickerInlineCss = "@charset \"UTF-8\";.flatpickr-calendar{background:transparent;opacity:0;display:none;text-align:center;visibility:hidden;padding:0;-webkit-animation:none;animation:none;direction:ltr;border:0;font-size:14px;line-height:24px;border-radius:5px;position:absolute;width:307.875px;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-touch-action:manipulation;touch-action:manipulation;background:#fff;-webkit-box-shadow:1px 0 0 #e6e6e6, -1px 0 0 #e6e6e6, 0 1px 0 #e6e6e6, 0 -1px 0 #e6e6e6, 0 3px 13px rgba(0,0,0,0.08);box-shadow:1px 0 0 #e6e6e6, -1px 0 0 #e6e6e6, 0 1px 0 #e6e6e6, 0 -1px 0 #e6e6e6, 0 3px 13px rgba(0,0,0,0.08)}.flatpickr-calendar.open,.flatpickr-calendar.inline{opacity:1;max-height:640px;visibility:visible}.flatpickr-calendar.open{display:inline-block;z-index:99999}.flatpickr-calendar.animate.open{-webkit-animation:fpFadeInDown 300ms cubic-bezier(0.23, 1, 0.32, 1);animation:fpFadeInDown 300ms cubic-bezier(0.23, 1, 0.32, 1)}.flatpickr-calendar.inline{display:block;position:relative;top:2px}.flatpickr-calendar.static{position:absolute;top:calc(100% + 2px)}.flatpickr-calendar.static.open{z-index:999;display:block}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+1) .flatpickr-day.inRange:nth-child(7n+7){-webkit-box-shadow:none !important;box-shadow:none !important}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+2) .flatpickr-day.inRange:nth-child(7n+1){-webkit-box-shadow:-2px 0 0 #e6e6e6, 5px 0 0 #e6e6e6;box-shadow:-2px 0 0 #e6e6e6, 5px 0 0 #e6e6e6}.flatpickr-calendar .hasWeeks .dayContainer,.flatpickr-calendar .hasTime .dayContainer{border-bottom:0;border-bottom-right-radius:0;border-bottom-left-radius:0}.flatpickr-calendar .hasWeeks .dayContainer{border-left:0}.flatpickr-calendar.hasTime .flatpickr-time{height:40px;border-top:1px solid #e6e6e6}.flatpickr-calendar.noCalendar.hasTime .flatpickr-time{height:auto}.flatpickr-calendar:before,.flatpickr-calendar:after{position:absolute;display:block;pointer-events:none;border:solid transparent;content:'';height:0;width:0;left:22px}.flatpickr-calendar.rightMost:before,.flatpickr-calendar.arrowRight:before,.flatpickr-calendar.rightMost:after,.flatpickr-calendar.arrowRight:after{left:auto;right:22px}.flatpickr-calendar.arrowCenter:before,.flatpickr-calendar.arrowCenter:after{left:50%;right:50%}.flatpickr-calendar:before{border-width:5px;margin:0 -5px}.flatpickr-calendar:after{border-width:4px;margin:0 -4px}.flatpickr-calendar.arrowTop:before,.flatpickr-calendar.arrowTop:after{bottom:100%}.flatpickr-calendar.arrowTop:before{border-bottom-color:#e6e6e6}.flatpickr-calendar.arrowTop:after{border-bottom-color:#fff}.flatpickr-calendar.arrowBottom:before,.flatpickr-calendar.arrowBottom:after{top:100%}.flatpickr-calendar.arrowBottom:before{border-top-color:#e6e6e6}.flatpickr-calendar.arrowBottom:after{border-top-color:#fff}.flatpickr-calendar:focus{outline:0}.flatpickr-wrapper{position:relative;display:inline-block}.flatpickr-months{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-months .flatpickr-month{background:transparent;color:rgba(0,0,0,0.9);fill:rgba(0,0,0,0.9);height:34px;line-height:1;text-align:center;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;overflow:hidden;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}.flatpickr-months .flatpickr-prev-month,.flatpickr-months .flatpickr-next-month{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;text-decoration:none;cursor:pointer;position:absolute;top:0;height:34px;padding:10px;z-index:3;color:rgba(0,0,0,0.9);fill:rgba(0,0,0,0.9)}.flatpickr-months .flatpickr-prev-month.flatpickr-disabled,.flatpickr-months .flatpickr-next-month.flatpickr-disabled{display:none}.flatpickr-months .flatpickr-prev-month i,.flatpickr-months .flatpickr-next-month i{position:relative}.flatpickr-months .flatpickr-prev-month.flatpickr-prev-month,.flatpickr-months .flatpickr-next-month.flatpickr-prev-month{left:0;}.flatpickr-months .flatpickr-prev-month.flatpickr-next-month,.flatpickr-months .flatpickr-next-month.flatpickr-next-month{right:0;}.flatpickr-months .flatpickr-prev-month:hover,.flatpickr-months .flatpickr-next-month:hover{color:#959ea9}.flatpickr-months .flatpickr-prev-month:hover svg,.flatpickr-months .flatpickr-next-month:hover svg{fill:#f64747}.flatpickr-months .flatpickr-prev-month svg,.flatpickr-months .flatpickr-next-month svg{width:14px;height:14px}.flatpickr-months .flatpickr-prev-month svg path,.flatpickr-months .flatpickr-next-month svg path{-webkit-transition:fill 0.1s;transition:fill 0.1s;fill:inherit}.numInputWrapper{position:relative;height:auto}.numInputWrapper input,.numInputWrapper span{display:inline-block}.numInputWrapper input{width:100%}.numInputWrapper input::-ms-clear{display:none}.numInputWrapper input::-webkit-outer-spin-button,.numInputWrapper input::-webkit-inner-spin-button{margin:0;-webkit-appearance:none}.numInputWrapper span{position:absolute;right:0;width:14px;padding:0 4px 0 2px;height:50%;line-height:50%;opacity:0;cursor:pointer;border:1px solid rgba(57,57,57,0.15);-webkit-box-sizing:border-box;box-sizing:border-box}.numInputWrapper span:hover{background:rgba(0,0,0,0.1)}.numInputWrapper span:active{background:rgba(0,0,0,0.2)}.numInputWrapper span:after{display:block;content:\"\";position:absolute}.numInputWrapper span.arrowUp{top:0;border-bottom:0}.numInputWrapper span.arrowUp:after{border-left:4px solid transparent;border-right:4px solid transparent;border-bottom:4px solid rgba(57,57,57,0.6);top:26%}.numInputWrapper span.arrowDown{top:50%}.numInputWrapper span.arrowDown:after{border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid rgba(57,57,57,0.6);top:40%}.numInputWrapper span svg{width:inherit;height:auto}.numInputWrapper span svg path{fill:rgba(0,0,0,0.5)}.numInputWrapper:hover{background:rgba(0,0,0,0.05)}.numInputWrapper:hover span{opacity:1}.flatpickr-current-month{font-size:135%;line-height:inherit;font-weight:300;color:inherit;position:absolute;width:75%;left:12.5%;padding:7.48px 0 0 0;line-height:1;height:34px;display:inline-block;text-align:center;-webkit-transform:translate3d(0px, 0px, 0px);transform:translate3d(0px, 0px, 0px)}.flatpickr-current-month span.cur-month{font-family:inherit;font-weight:700;color:inherit;display:inline-block;margin-left:0.5ch;padding:0}.flatpickr-current-month span.cur-month:hover{background:rgba(0,0,0,0.05)}.flatpickr-current-month .numInputWrapper{width:6ch;width:7ch\\0;display:inline-block}.flatpickr-current-month .numInputWrapper span.arrowUp:after{border-bottom-color:rgba(0,0,0,0.9)}.flatpickr-current-month .numInputWrapper span.arrowDown:after{border-top-color:rgba(0,0,0,0.9)}.flatpickr-current-month input.cur-year{background:transparent;-webkit-box-sizing:border-box;box-sizing:border-box;color:inherit;cursor:text;padding:0 0 0 0.5ch;margin:0;display:inline-block;font-size:inherit;font-family:inherit;font-weight:300;line-height:inherit;height:auto;border:0;border-radius:0;vertical-align:initial;-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}.flatpickr-current-month input.cur-year:focus{outline:0}.flatpickr-current-month input.cur-year[disabled],.flatpickr-current-month input.cur-year[disabled]:hover{font-size:100%;color:rgba(0,0,0,0.5);background:transparent;pointer-events:none}.flatpickr-current-month .flatpickr-monthDropdown-months{appearance:menulist;background:transparent;border:none;border-radius:0;box-sizing:border-box;color:inherit;cursor:pointer;font-size:inherit;font-family:inherit;font-weight:300;height:auto;line-height:inherit;margin:-1px 0 0 0;outline:none;padding:0 0 0 0.5ch;position:relative;vertical-align:initial;-webkit-box-sizing:border-box;-webkit-appearance:menulist;-moz-appearance:menulist;width:auto}.flatpickr-current-month .flatpickr-monthDropdown-months:focus,.flatpickr-current-month .flatpickr-monthDropdown-months:active{outline:none}.flatpickr-current-month .flatpickr-monthDropdown-months:hover{background:rgba(0,0,0,0.05)}.flatpickr-current-month .flatpickr-monthDropdown-months .flatpickr-monthDropdown-month{background-color:transparent;outline:none;padding:0}.flatpickr-weekdays{background:transparent;text-align:center;overflow:hidden;width:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;height:28px}.flatpickr-weekdays .flatpickr-weekdaycontainer{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}span.flatpickr-weekday{cursor:default;font-size:90%;background:transparent;color:rgba(0,0,0,0.54);line-height:1;margin:0;text-align:center;display:block;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;font-weight:bolder}.dayContainer,.flatpickr-weeks{padding:1px 0 0 0}.flatpickr-days{position:relative;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:start;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start;width:307.875px}.flatpickr-days:focus{outline:0}.dayContainer{padding:0;outline:0;text-align:left;width:307.875px;min-width:307.875px;max-width:307.875px;-webkit-box-sizing:border-box;box-sizing:border-box;display:inline-block;display:-ms-flexbox;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-wrap:wrap;-ms-flex-pack:justify;-webkit-justify-content:space-around;justify-content:space-around;-webkit-transform:translate3d(0px, 0px, 0px);transform:translate3d(0px, 0px, 0px);opacity:1}.dayContainer+.dayContainer{-webkit-box-shadow:-1px 0 0 #e6e6e6;box-shadow:-1px 0 0 #e6e6e6}.flatpickr-day{background:none;border:1px solid transparent;border-radius:150px;-webkit-box-sizing:border-box;box-sizing:border-box;color:#393939;cursor:pointer;font-weight:400;width:14.2857143%;-webkit-flex-basis:14.2857143%;-ms-flex-preferred-size:14.2857143%;flex-basis:14.2857143%;max-width:39px;height:39px;line-height:39px;margin:0;display:inline-block;position:relative;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;text-align:center}.flatpickr-day.inRange,.flatpickr-day.prevMonthDay.inRange,.flatpickr-day.nextMonthDay.inRange,.flatpickr-day.today.inRange,.flatpickr-day.prevMonthDay.today.inRange,.flatpickr-day.nextMonthDay.today.inRange,.flatpickr-day:hover,.flatpickr-day.prevMonthDay:hover,.flatpickr-day.nextMonthDay:hover,.flatpickr-day:focus,.flatpickr-day.prevMonthDay:focus,.flatpickr-day.nextMonthDay:focus{cursor:pointer;outline:0;background:#e6e6e6;border-color:#e6e6e6}.flatpickr-day.today{border-color:#959ea9}.flatpickr-day.today:hover,.flatpickr-day.today:focus{border-color:#959ea9;background:#959ea9;color:#fff}.flatpickr-day.selected,.flatpickr-day.startRange,.flatpickr-day.endRange,.flatpickr-day.selected.inRange,.flatpickr-day.startRange.inRange,.flatpickr-day.endRange.inRange,.flatpickr-day.selected:focus,.flatpickr-day.startRange:focus,.flatpickr-day.endRange:focus,.flatpickr-day.selected:hover,.flatpickr-day.startRange:hover,.flatpickr-day.endRange:hover,.flatpickr-day.selected.prevMonthDay,.flatpickr-day.startRange.prevMonthDay,.flatpickr-day.endRange.prevMonthDay,.flatpickr-day.selected.nextMonthDay,.flatpickr-day.startRange.nextMonthDay,.flatpickr-day.endRange.nextMonthDay{background:#569ff7;-webkit-box-shadow:none;box-shadow:none;color:#fff;border-color:#569ff7}.flatpickr-day.selected.startRange,.flatpickr-day.startRange.startRange,.flatpickr-day.endRange.startRange{border-radius:50px 0 0 50px}.flatpickr-day.selected.endRange,.flatpickr-day.startRange.endRange,.flatpickr-day.endRange.endRange{border-radius:0 50px 50px 0}.flatpickr-day.selected.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.startRange.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.endRange.startRange+.endRange:not(:nth-child(7n+1)){-webkit-box-shadow:-10px 0 0 #569ff7;box-shadow:-10px 0 0 #569ff7}.flatpickr-day.selected.startRange.endRange,.flatpickr-day.startRange.startRange.endRange,.flatpickr-day.endRange.startRange.endRange{border-radius:50px}.flatpickr-day.inRange{border-radius:0;-webkit-box-shadow:-5px 0 0 #e6e6e6, 5px 0 0 #e6e6e6;box-shadow:-5px 0 0 #e6e6e6, 5px 0 0 #e6e6e6}.flatpickr-day.flatpickr-disabled,.flatpickr-day.flatpickr-disabled:hover,.flatpickr-day.prevMonthDay,.flatpickr-day.nextMonthDay,.flatpickr-day.notAllowed,.flatpickr-day.notAllowed.prevMonthDay,.flatpickr-day.notAllowed.nextMonthDay{color:rgba(57,57,57,0.3);background:transparent;border-color:transparent;cursor:default}.flatpickr-day.flatpickr-disabled,.flatpickr-day.flatpickr-disabled:hover{cursor:not-allowed;color:rgba(57,57,57,0.1)}.flatpickr-day.week.selected{border-radius:0;-webkit-box-shadow:-5px 0 0 #569ff7, 5px 0 0 #569ff7;box-shadow:-5px 0 0 #569ff7, 5px 0 0 #569ff7}.flatpickr-day.hidden{visibility:hidden}.rangeMode .flatpickr-day{margin-top:1px}.flatpickr-weekwrapper{float:left}.flatpickr-weekwrapper .flatpickr-weeks{padding:0 12px;-webkit-box-shadow:1px 0 0 #e6e6e6;box-shadow:1px 0 0 #e6e6e6}.flatpickr-weekwrapper .flatpickr-weekday{float:none;width:100%;line-height:28px}.flatpickr-weekwrapper span.flatpickr-day,.flatpickr-weekwrapper span.flatpickr-day:hover{display:block;width:100%;max-width:none;color:rgba(57,57,57,0.3);background:transparent;cursor:default;border:none}.flatpickr-innerContainer{display:block;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden}.flatpickr-rContainer{display:inline-block;padding:0;-webkit-box-sizing:border-box;box-sizing:border-box}.flatpickr-time{text-align:center;outline:0;display:block;height:0;line-height:40px;max-height:40px;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-time:after{content:\"\";display:table;clear:both}.flatpickr-time .numInputWrapper{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;width:40%;height:40px;float:left}.flatpickr-time .numInputWrapper span.arrowUp:after{border-bottom-color:#393939}.flatpickr-time .numInputWrapper span.arrowDown:after{border-top-color:#393939}.flatpickr-time.hasSeconds .numInputWrapper{width:26%}.flatpickr-time.time24hr .numInputWrapper{width:49%}.flatpickr-time input{background:transparent;-webkit-box-shadow:none;box-shadow:none;border:0;border-radius:0;text-align:center;margin:0;padding:0;height:inherit;line-height:inherit;color:#393939;font-size:14px;position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}.flatpickr-time input.flatpickr-hour{font-weight:bold}.flatpickr-time input.flatpickr-minute,.flatpickr-time input.flatpickr-second{font-weight:400}.flatpickr-time input:focus{outline:0;border:0}.flatpickr-time .flatpickr-time-separator,.flatpickr-time .flatpickr-am-pm{height:inherit;float:left;line-height:inherit;color:#393939;font-weight:bold;width:2%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-align-self:center;-ms-flex-item-align:center;align-self:center}.flatpickr-time .flatpickr-am-pm{outline:0;width:18%;cursor:pointer;text-align:center;font-weight:400}.flatpickr-time input:hover,.flatpickr-time .flatpickr-am-pm:hover,.flatpickr-time input:focus,.flatpickr-time .flatpickr-am-pm:focus{background:#eee}.flatpickr-input[readonly]{cursor:pointer}@-webkit-keyframes fpFadeInDown{from{opacity:0;-webkit-transform:translate3d(0, -20px, 0);transform:translate3d(0, -20px, 0)}to{opacity:1;-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0)}}@keyframes fpFadeInDown{from{opacity:0;-webkit-transform:translate3d(0, -20px, 0);transform:translate3d(0, -20px, 0)}to{opacity:1;-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0)}}.flatpickr-calendar{font-size:0.875rem;line-height:1.125rem;font-weight:var(--cat-font-weight-body, 400);box-shadow:0 4px 6px -2px rgba(27, 31, 38, 0.03), 0 12px 16px -4px rgba(27, 31, 38, 0.08);border-radius:var(--cat-border-radius-m, 0.25rem);border:1px solid rgb(var(--cat-border-color, 235, 236, 240));background:white;padding:1rem}.flatpickr-calendar:not(.inline).animate{transform:translateY(-1rem);opacity:0;transition:transform 125ms cubic-bezier(0.3, 0, 0.8, 0.15), opacity 125ms cubic-bezier(0.3, 0, 0.8, 0.15)}.flatpickr-calendar::before,.flatpickr-calendar::after{display:none}.flatpickr-calendar.inline,.flatpickr-calendar.open{display:flex;flex-direction:column;gap:1rem;width:auto !important}.flatpickr-calendar.inline{border:unset;padding:0}.flatpickr-calendar.open{z-index:calc(var(--cat-z-index, 1000) + 100);margin-top:0.75rem;margin-left:-0.75rem}.flatpickr-calendar.open.animate{opacity:1;transform:translateY(0);transition:transform 500ms cubic-bezier(0.05, 0.7, 0.1, 1), opacity 500ms cubic-bezier(0.05, 0.7, 0.1, 1)}.flatpickr-months{gap:0.25rem}.flatpickr-months .flatpickr-month{height:auto}.flatpickr-current-month{font-size:1.125rem;line-height:1.5rem;font-weight:var(--cat-font-weight-head, 600);font-feature-settings:\"pnum\";height:100%;padding:0;display:flex;position:static;width:auto;gap:0.25rem}.flatpickr-current-month .flatpickr-monthDropdown-months{padding:0 0.25rem;flex:1;margin:unset;font-weight:inherit;border-radius:var(--cat-border-radius-m, 0.25rem)}.flatpickr-current-month .flatpickr-monthDropdown-months:hover,.flatpickr-current-month .flatpickr-monthDropdown-months:focus-within{background-color:rgba(var(--cat-primary-bg, 0, 129, 148), 0.05)}.flatpickr-current-month input.cur-year{padding:0;font-weight:inherit;line-height:2.25rem}.flatpickr-current-month .numInputWrapper{width:7ch}.flatpickr-months .flatpickr-prev-month,.flatpickr-months .flatpickr-next-month{position:static;width:2.25rem;height:2.25rem;padding:0;align-items:center;display:flex;justify-content:center;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.flatpickr-months .flatpickr-prev-month:hover,.flatpickr-months .flatpickr-next-month:hover{color:rgb(var(--cat-font-color-base, 0, 0, 0))}.flatpickr-weekdays{height:2rem}.flatpickr-weekdays .flatpickr-weekday{color:rgb(var(--cat-font-color-muted, 81, 92, 108));font-size:0.75rem;line-height:1rem;font-weight:700}.flatpickr-weekwrapper .flatpickr-weekday{height:2rem}.flatpickr-weekwrapper .flatpickr-weeks{box-shadow:none;width:2rem;padding:0;margin-right:0.5rem;background:#f2f4f7;border-radius:var(--cat-border-radius-m, 0.25rem)}.flatpickr-weekwrapper span.flatpickr-day,.flatpickr-weekwrapper span.flatpickr-day:hover{font-size:0.75rem;line-height:1rem;font-weight:700;color:rgb(var(--cat-font-color-muted, 81, 92, 108));text-align:center;line-height:2.25rem}.flatpickr-days{width:15.75rem !important}.dayContainer{width:15.75rem;min-width:15.75rem;max-width:15.75rem}.flatpickr-day{color:rgb(var(--cat-font-color-base, 0, 0, 0));height:2.25rem;line-height:2.25rem;border:0;border-radius:var(--cat-border-radius-m, 0.25rem)}.flatpickr-day:hover{background-color:#f2f4f7;font-weight:700}.flatpickr-day.flatpickr-disabled,.flatpickr-day.flatpickr-disabled:hover{color:rgb(var(--cat-font-color-muted, 81, 92, 108));font-weight:inherit;background-color:inherit !important}.flatpickr-day.today{color:rgb(var(--cat-primary-text, 0, 129, 148));box-shadow:inset 0 0 0 2px rgb(var(--cat-primary-text, 0, 129, 148))}.flatpickr-day.today:hover,.flatpickr-day.today:focus{background-color:#f2f4f7;color:rgb(var(--cat-primary-text, 0, 129, 148))}.flatpickr-day.flatpickr-disabled,.flatpickr-day.flatpickr-disabled:hover,.flatpickr-day.prevMonthDay,.flatpickr-day.nextMonthDay,.flatpickr-day.notAllowed,.flatpickr-day.notAllowed.prevMonthDay,.flatpickr-day.notAllowed.nextMonthDay{color:rgba(var(--cat-font-color-muted, 81, 92, 108), 0.5)}.flatpickr-day.selected,.flatpickr-day.selected:hover,.flatpickr-day.selected:focus,.flatpickr-day.selected.inRange,.flatpickr-day.selected.nextMonthDay,.flatpickr-day.selected.prevMonthDay,.flatpickr-day.startRange,.flatpickr-day.startRange:hover,.flatpickr-day.startRange:focus,.flatpickr-day.startRange.inRange,.flatpickr-day.startRange.nextMonthDay,.flatpickr-day.startRange.prevMonthDay,.flatpickr-day.endRange,.flatpickr-day.endRange:hover,.flatpickr-day.endRange:focus,.flatpickr-day.endRange.inRange,.flatpickr-day.endRange.nextMonthDay,.flatpickr-day.endRange.prevMonthDay{font-weight:700;background-color:rgb(var(--cat-primary-bg, 0, 129, 148)) !important;color:rgb(var(--cat-primary-fill, 255, 255, 255)) !important}.flatpickr-day.inRange,.flatpickr-day.prevMonthDay.inRange,.flatpickr-day.nextMonthDay.inRange,.flatpickr-day.today.inRange,.flatpickr-day.prevMonthDay.today.inRange,.flatpickr-day.nextMonthDay.today.inRange,.flatpickr-day:hover,.flatpickr-day.prevMonthDay:hover,.flatpickr-day.nextMonthDay:hover,.flatpickr-day:focus,.flatpickr-day.prevMonthDay:focus,.flatpickr-day.nextMonthDay:focus{background-color:rgba(var(--cat-primary-bg, 0, 129, 148), 0.1)}.flatpickr-day.selected.startRange,.flatpickr-day.startRange.startRange,.flatpickr-day.endRange.startRange{border-top-left-radius:var(--cat-border-radius-m, 0.25rem);border-bottom-left-radius:var(--cat-border-radius-m, 0.25rem)}.flatpickr-day.selected.endRange,.flatpickr-day.startRange.endRange,.flatpickr-day.endRange.endRange{border-top-right-radius:var(--cat-border-radius-m, 0.25rem);border-bottom-right-radius:var(--cat-border-radius-m, 0.25rem)}.numInputWrapper{padding:0 1rem 0 0.5rem;border-radius:var(--cat-border-radius-m, 0.25rem)}.numInputWrapper:hover,.numInputWrapper:focus-within{background-color:rgba(var(--cat-primary-bg, 0, 129, 148), 0.05)}.numInputWrapper span{border:none;background:transparent;width:1rem;padding:0;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.numInputWrapper span.arrowUp::after{content:\"↑\";align-items:flex-end}.numInputWrapper span.arrowDown::after{content:\"↓\";align-items:flex-start}.numInputWrapper span::after{font-size:0.75rem;line-height:1rem;font-weight:700;position:static;border:0 !important;font-size:10px;display:flex;height:100%;justify-content:center}.numInputWrapper span:hover{color:rgb(var(--cat-font-color-base, 0, 0, 0));background:transparent}.flatpickr-calendar.hasTime .flatpickr-time{border:1px solid rgb(var(--cat-border-color, 235, 236, 240));border-radius:var(--cat-border-radius-m, 0.25rem);min-width:12rem;height:auto}.flatpickr-calendar.hasTime .flatpickr-time .numInputWrapper{height:2rem;padding:0;margin:0.25rem;display:flex}.flatpickr-calendar.hasTime.noCalendar{padding:0}.flatpickr-calendar.hasTime.noCalendar .flatpickr-time{border:none}.flatpickr-time .flatpickr-time-separator,.flatpickr-time .flatpickr-am-pm{margin:0 0.25rem;font-size:1.125rem;line-height:1.5rem;font-weight:400;font-feature-settings:\"pnum\";color:rgb(var(--cat-font-color-base, 0, 0, 0));line-height:2.25rem}.flatpickr-time .flatpickr-am-pm{width:25%;padding:0 0.5rem}.flatpickr-time .flatpickr-am-pm:hover,.flatpickr-time .flatpickr-am-pm:focus{border-radius:var(--cat-border-radius-m, 0.25rem);background-color:rgba(var(--cat-primary-bg, 0, 129, 148), 0.05)}.flatpickr-time{max-height:unset}.flatpickr-time input{background:transparent !important;color:rgb(var(--cat-font-color-base, 0, 0, 0));font-size:0.9375rem;line-height:2.25rem;font-family:inherit}.flatpickr-time input.flatpickr-hour{font-weight:inherit}.flatpickr-day.inRange:not(.today),.flatpickr-day.week.selected{box-shadow:none}.flatpickr-day.inRange:nth-child(7n+1),.flatpickr-day.week.selected:nth-child(7n+1){border-top-left-radius:var(--cat-border-radius-m, 0.25rem);border-bottom-left-radius:var(--cat-border-radius-m, 0.25rem)}.flatpickr-day.inRange:nth-child(7n+7),.flatpickr-day.week.selected:nth-child(7n+7){border-top-right-radius:var(--cat-border-radius-m, 0.25rem);border-bottom-right-radius:var(--cat-border-radius-m, 0.25rem)}.flatpickr-day.selected.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.startRange.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.endRange.startRange+.endRange:not(:nth-child(7n+1)){box-shadow:none}.flatpickr-day.selected.startRange.endRange,.flatpickr-day.startRange.startRange.endRange,.flatpickr-day.endRange.startRange.endRange{border-radius:var(--cat-border-radius-m, 0.25rem)}:host{display:inline-flex}:host>div{display:flex}:host([hidden]){display:none}.datepicker-disabled .flatpickr-days,.datepicker-disabled .flatpickr-time,.datepicker-readonly .flatpickr-days,.datepicker-readonly .flatpickr-time{pointer-events:none}.datepicker-disabled .flatpickr-days{opacity:0.75}.datepicker-disabled .flatpickr-time input,.datepicker-disabled .flatpickr-time .flatpickr-time-separator,.datepicker-disabled .flatpickr-time .flatpickr-am-pm{color:rgb(var(--cat-font-color-muted, 81, 92, 108));opacity:0.75}input{display:none}.flatpickr-calendar{box-shadow:unset;background:unset}";
|
|
6318
|
-
|
|
6319
|
-
|
|
6320
|
-
|
|
6321
|
-
|
|
6322
|
-
|
|
6323
|
-
|
|
6324
|
-
|
|
6325
|
-
|
|
6326
|
-
|
|
6327
|
-
|
|
6328
|
-
|
|
6329
|
-
|
|
6330
|
-
|
|
6331
|
-
this.nativePickerAttributes = undefined;
|
|
6332
|
-
}
|
|
6333
|
-
onValueChanged(value) {
|
|
6334
|
-
if (value) {
|
|
6335
|
-
this.pickr?.setDate(value, false);
|
|
6336
|
-
this.catChange.emit(value);
|
|
6337
|
-
}
|
|
6338
|
-
else {
|
|
6339
|
-
this.pickr?.clear(false);
|
|
6340
|
-
this.catChange.emit(undefined);
|
|
6341
|
-
}
|
|
6551
|
+
// https://samthor.au/2021/observing-dom/
|
|
6552
|
+
function observeMove(element, onMove) {
|
|
6553
|
+
let io = null;
|
|
6554
|
+
let timeoutId;
|
|
6555
|
+
const root = getDocumentElement(element);
|
|
6556
|
+
function cleanup() {
|
|
6557
|
+
var _io;
|
|
6558
|
+
clearTimeout(timeoutId);
|
|
6559
|
+
(_io = io) == null || _io.disconnect();
|
|
6560
|
+
io = null;
|
|
6561
|
+
}
|
|
6562
|
+
function refresh(skip, threshold) {
|
|
6563
|
+
if (skip === void 0) {
|
|
6564
|
+
skip = false;
|
|
6342
6565
|
}
|
|
6343
|
-
|
|
6344
|
-
|
|
6345
|
-
// a bug in the library. We thus need to fully recreate the date picker
|
|
6346
|
-
// after the value has been updated.
|
|
6347
|
-
this.pickr?.destroy();
|
|
6348
|
-
this.pickr = undefined;
|
|
6349
|
-
setTimeout(() => (this.pickr = this.initDatepicker(this.input)));
|
|
6566
|
+
if (threshold === void 0) {
|
|
6567
|
+
threshold = 1;
|
|
6350
6568
|
}
|
|
6351
|
-
|
|
6352
|
-
|
|
6569
|
+
cleanup();
|
|
6570
|
+
const {
|
|
6571
|
+
left,
|
|
6572
|
+
top,
|
|
6573
|
+
width,
|
|
6574
|
+
height
|
|
6575
|
+
} = element.getBoundingClientRect();
|
|
6576
|
+
if (!skip) {
|
|
6577
|
+
onMove();
|
|
6353
6578
|
}
|
|
6354
|
-
|
|
6355
|
-
|
|
6356
|
-
'datepicker-wrapper': true,
|
|
6357
|
-
'datepicker-disabled': this.disabled,
|
|
6358
|
-
'datepicker-readonly': this.readonly
|
|
6359
|
-
} }, index.h("input", { key: '6885c1c919af468401dddda38045ab9a8dc26aaf', ref: el => (this.input = el), value: this.value, disabled: this.disabled, readonly: this.readonly }))));
|
|
6579
|
+
if (!width || !height) {
|
|
6580
|
+
return;
|
|
6360
6581
|
}
|
|
6361
|
-
|
|
6362
|
-
|
|
6363
|
-
|
|
6582
|
+
const insetTop = floor(top);
|
|
6583
|
+
const insetRight = floor(root.clientWidth - (left + width));
|
|
6584
|
+
const insetBottom = floor(root.clientHeight - (top + height));
|
|
6585
|
+
const insetLeft = floor(left);
|
|
6586
|
+
const rootMargin = -insetTop + "px " + -insetRight + "px " + -insetBottom + "px " + -insetLeft + "px";
|
|
6587
|
+
const options = {
|
|
6588
|
+
rootMargin,
|
|
6589
|
+
threshold: max(0, min(1, threshold)) || 1
|
|
6590
|
+
};
|
|
6591
|
+
let isFirstUpdate = true;
|
|
6592
|
+
function handleObserve(entries) {
|
|
6593
|
+
const ratio = entries[0].intersectionRatio;
|
|
6594
|
+
if (ratio !== threshold) {
|
|
6595
|
+
if (!isFirstUpdate) {
|
|
6596
|
+
return refresh();
|
|
6364
6597
|
}
|
|
6365
|
-
|
|
6366
|
-
|
|
6367
|
-
|
|
6368
|
-
|
|
6369
|
-
|
|
6370
|
-
|
|
6371
|
-
|
|
6372
|
-
|
|
6373
|
-
|
|
6374
|
-
nativePickerAttributes: this.nativePickerAttributes ?? {},
|
|
6375
|
-
applyChange: value => (this.value = value)
|
|
6376
|
-
}, {
|
|
6377
|
-
...(this.disabled ? { enable: [] } : {}),
|
|
6378
|
-
inline: true
|
|
6379
|
-
}));
|
|
6598
|
+
if (!ratio) {
|
|
6599
|
+
timeoutId = setTimeout(() => {
|
|
6600
|
+
refresh(false, 1e-7);
|
|
6601
|
+
}, 100);
|
|
6602
|
+
} else {
|
|
6603
|
+
refresh(false, ratio);
|
|
6604
|
+
}
|
|
6605
|
+
}
|
|
6606
|
+
isFirstUpdate = false;
|
|
6380
6607
|
}
|
|
6381
|
-
static get watchers() { return {
|
|
6382
|
-
"value": ["onValueChanged"],
|
|
6383
|
-
"disabled": ["onDisabledChanged"],
|
|
6384
|
-
"readonly": ["onDisabledChanged"]
|
|
6385
|
-
}; }
|
|
6386
|
-
};
|
|
6387
|
-
CatDatepickerInline.style = CatDatepickerInlineStyle0;
|
|
6388
|
-
|
|
6389
|
-
/**
|
|
6390
|
-
* Auto-generated file. Do not edit directly.
|
|
6391
|
-
*/
|
|
6392
|
-
const timeTransitionS = 125;
|
|
6393
|
-
|
|
6394
|
-
/*!
|
|
6395
|
-
* tabbable 6.2.0
|
|
6396
|
-
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
6397
|
-
*/
|
|
6398
|
-
// NOTE: separate `:not()` selectors has broader browser support than the newer
|
|
6399
|
-
// `:not([inert], [inert] *)` (Feb 2023)
|
|
6400
|
-
// CAREFUL: JSDom does not support `:not([inert] *)` as a selector; using it causes
|
|
6401
|
-
// the entire query to fail, resulting in no nodes found, which will break a lot
|
|
6402
|
-
// of things... so we have to rely on JS to identify nodes inside an inert container
|
|
6403
|
-
var candidateSelectors = ['input:not([inert])', 'select:not([inert])', 'textarea:not([inert])', 'a[href]:not([inert])', 'button:not([inert])', '[tabindex]:not(slot):not([inert])', 'audio[controls]:not([inert])', 'video[controls]:not([inert])', '[contenteditable]:not([contenteditable="false"]):not([inert])', 'details>summary:first-of-type:not([inert])', 'details:not([inert])'];
|
|
6404
|
-
var candidateSelector = /* #__PURE__ */candidateSelectors.join(',');
|
|
6405
|
-
var NoElement = typeof Element === 'undefined';
|
|
6406
|
-
var matches = NoElement ? function () {} : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;
|
|
6407
|
-
var getRootNode = !NoElement && Element.prototype.getRootNode ? function (element) {
|
|
6408
|
-
var _element$getRootNode;
|
|
6409
|
-
return element === null || element === void 0 ? void 0 : (_element$getRootNode = element.getRootNode) === null || _element$getRootNode === void 0 ? void 0 : _element$getRootNode.call(element);
|
|
6410
|
-
} : function (element) {
|
|
6411
|
-
return element === null || element === void 0 ? void 0 : element.ownerDocument;
|
|
6412
|
-
};
|
|
6413
6608
|
|
|
6414
|
-
|
|
6415
|
-
|
|
6416
|
-
|
|
6417
|
-
|
|
6418
|
-
|
|
6419
|
-
|
|
6420
|
-
|
|
6421
|
-
|
|
6422
|
-
|
|
6423
|
-
|
|
6424
|
-
|
|
6425
|
-
|
|
6609
|
+
// Older browsers don't support a `document` as the root and will throw an
|
|
6610
|
+
// error.
|
|
6611
|
+
try {
|
|
6612
|
+
io = new IntersectionObserver(handleObserve, {
|
|
6613
|
+
...options,
|
|
6614
|
+
// Handle <iframe>s
|
|
6615
|
+
root: root.ownerDocument
|
|
6616
|
+
});
|
|
6617
|
+
} catch (e) {
|
|
6618
|
+
io = new IntersectionObserver(handleObserve, options);
|
|
6619
|
+
}
|
|
6620
|
+
io.observe(element);
|
|
6426
6621
|
}
|
|
6427
|
-
|
|
6428
|
-
|
|
6429
|
-
|
|
6430
|
-
var inertAtt = node === null || node === void 0 ? void 0 : (_node$getAttribute = node.getAttribute) === null || _node$getAttribute === void 0 ? void 0 : _node$getAttribute.call(node, 'inert');
|
|
6431
|
-
var inert = inertAtt === '' || inertAtt === 'true';
|
|
6432
|
-
|
|
6433
|
-
// NOTE: this could also be handled with `node.matches('[inert], :is([inert] *)')`
|
|
6434
|
-
// if it weren't for `matches()` not being a function on shadow roots; the following
|
|
6435
|
-
// code works for any kind of node
|
|
6436
|
-
// CAREFUL: JSDom does not appear to support certain selectors like `:not([inert] *)`
|
|
6437
|
-
// so it likely would not support `:is([inert] *)` either...
|
|
6438
|
-
var result = inert || lookUp && node && isInert(node.parentNode); // recursive
|
|
6439
|
-
|
|
6440
|
-
return result;
|
|
6441
|
-
};
|
|
6442
|
-
|
|
6443
|
-
/**
|
|
6444
|
-
* Determines if a node's content is editable.
|
|
6445
|
-
* @param {Element} [node]
|
|
6446
|
-
* @returns True if it's content-editable; false if it's not or `node` is falsy.
|
|
6447
|
-
*/
|
|
6448
|
-
var isContentEditable = function isContentEditable(node) {
|
|
6449
|
-
var _node$getAttribute2;
|
|
6450
|
-
// CAREFUL: JSDom does not support the `HTMLElement.isContentEditable` API so we have
|
|
6451
|
-
// to use the attribute directly to check for this, which can either be empty or 'true';
|
|
6452
|
-
// if it's `null` (not specified) or 'false', it's a non-editable element
|
|
6453
|
-
var attValue = node === null || node === void 0 ? void 0 : (_node$getAttribute2 = node.getAttribute) === null || _node$getAttribute2 === void 0 ? void 0 : _node$getAttribute2.call(node, 'contenteditable');
|
|
6454
|
-
return attValue === '' || attValue === 'true';
|
|
6455
|
-
};
|
|
6622
|
+
refresh(true);
|
|
6623
|
+
return cleanup;
|
|
6624
|
+
}
|
|
6456
6625
|
|
|
6457
6626
|
/**
|
|
6458
|
-
*
|
|
6459
|
-
*
|
|
6460
|
-
*
|
|
6461
|
-
* @returns
|
|
6627
|
+
* Automatically updates the position of the floating element when necessary.
|
|
6628
|
+
* Should only be called when the floating element is mounted on the DOM or
|
|
6629
|
+
* visible on the screen.
|
|
6630
|
+
* @returns cleanup function that should be invoked when the floating element is
|
|
6631
|
+
* removed from the DOM or hidden from the screen.
|
|
6632
|
+
* @see https://floating-ui.com/docs/autoUpdate
|
|
6462
6633
|
*/
|
|
6463
|
-
|
|
6464
|
-
|
|
6465
|
-
|
|
6466
|
-
|
|
6467
|
-
|
|
6634
|
+
function autoUpdate(reference, floating, update, options) {
|
|
6635
|
+
if (options === void 0) {
|
|
6636
|
+
options = {};
|
|
6637
|
+
}
|
|
6638
|
+
const {
|
|
6639
|
+
ancestorScroll = true,
|
|
6640
|
+
ancestorResize = true,
|
|
6641
|
+
elementResize = typeof ResizeObserver === 'function',
|
|
6642
|
+
layoutShift = typeof IntersectionObserver === 'function',
|
|
6643
|
+
animationFrame = false
|
|
6644
|
+
} = options;
|
|
6645
|
+
const referenceEl = unwrapElement(reference);
|
|
6646
|
+
const ancestors = ancestorScroll || ancestorResize ? [...(referenceEl ? getOverflowAncestors(referenceEl) : []), ...getOverflowAncestors(floating)] : [];
|
|
6647
|
+
ancestors.forEach(ancestor => {
|
|
6648
|
+
ancestorScroll && ancestor.addEventListener('scroll', update, {
|
|
6649
|
+
passive: true
|
|
6650
|
+
});
|
|
6651
|
+
ancestorResize && ancestor.addEventListener('resize', update);
|
|
6652
|
+
});
|
|
6653
|
+
const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update) : null;
|
|
6654
|
+
let reobserveFrame = -1;
|
|
6655
|
+
let resizeObserver = null;
|
|
6656
|
+
if (elementResize) {
|
|
6657
|
+
resizeObserver = new ResizeObserver(_ref => {
|
|
6658
|
+
let [firstEntry] = _ref;
|
|
6659
|
+
if (firstEntry && firstEntry.target === referenceEl && resizeObserver) {
|
|
6660
|
+
// Prevent update loops when using the `size` middleware.
|
|
6661
|
+
// https://github.com/floating-ui/floating-ui/issues/1740
|
|
6662
|
+
resizeObserver.unobserve(floating);
|
|
6663
|
+
cancelAnimationFrame(reobserveFrame);
|
|
6664
|
+
reobserveFrame = requestAnimationFrame(() => {
|
|
6665
|
+
var _resizeObserver;
|
|
6666
|
+
(_resizeObserver = resizeObserver) == null || _resizeObserver.observe(floating);
|
|
6667
|
+
});
|
|
6668
|
+
}
|
|
6669
|
+
update();
|
|
6670
|
+
});
|
|
6671
|
+
if (referenceEl && !animationFrame) {
|
|
6672
|
+
resizeObserver.observe(referenceEl);
|
|
6673
|
+
}
|
|
6674
|
+
resizeObserver.observe(floating);
|
|
6675
|
+
}
|
|
6676
|
+
let frameId;
|
|
6677
|
+
let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;
|
|
6678
|
+
if (animationFrame) {
|
|
6679
|
+
frameLoop();
|
|
6468
6680
|
}
|
|
6469
|
-
|
|
6470
|
-
|
|
6471
|
-
|
|
6681
|
+
function frameLoop() {
|
|
6682
|
+
const nextRefRect = getBoundingClientRect(reference);
|
|
6683
|
+
if (prevRefRect && (nextRefRect.x !== prevRefRect.x || nextRefRect.y !== prevRefRect.y || nextRefRect.width !== prevRefRect.width || nextRefRect.height !== prevRefRect.height)) {
|
|
6684
|
+
update();
|
|
6685
|
+
}
|
|
6686
|
+
prevRefRect = nextRefRect;
|
|
6687
|
+
frameId = requestAnimationFrame(frameLoop);
|
|
6472
6688
|
}
|
|
6473
|
-
|
|
6474
|
-
return
|
|
6475
|
-
|
|
6476
|
-
|
|
6477
|
-
|
|
6478
|
-
|
|
6479
|
-
|
|
6480
|
-
|
|
6481
|
-
|
|
6689
|
+
update();
|
|
6690
|
+
return () => {
|
|
6691
|
+
var _resizeObserver2;
|
|
6692
|
+
ancestors.forEach(ancestor => {
|
|
6693
|
+
ancestorScroll && ancestor.removeEventListener('scroll', update);
|
|
6694
|
+
ancestorResize && ancestor.removeEventListener('resize', update);
|
|
6695
|
+
});
|
|
6696
|
+
cleanupIo == null || cleanupIo();
|
|
6697
|
+
(_resizeObserver2 = resizeObserver) == null || _resizeObserver2.disconnect();
|
|
6698
|
+
resizeObserver = null;
|
|
6699
|
+
if (animationFrame) {
|
|
6700
|
+
cancelAnimationFrame(frameId);
|
|
6701
|
+
}
|
|
6702
|
+
};
|
|
6703
|
+
}
|
|
6482
6704
|
|
|
6483
6705
|
/**
|
|
6484
|
-
*
|
|
6485
|
-
*
|
|
6486
|
-
* @
|
|
6706
|
+
* Optimizes the visibility of the floating element by shifting it in order to
|
|
6707
|
+
* keep it in view when it will overflow the clipping boundary.
|
|
6708
|
+
* @see https://floating-ui.com/docs/shift
|
|
6487
6709
|
*/
|
|
6710
|
+
const shift = shift$1;
|
|
6488
6711
|
|
|
6489
6712
|
/**
|
|
6490
|
-
*
|
|
6491
|
-
*
|
|
6492
|
-
*
|
|
6713
|
+
* Optimizes the visibility of the floating element by flipping the `placement`
|
|
6714
|
+
* in order to keep it in view when the preferred placement(s) will overflow the
|
|
6715
|
+
* clipping boundary. Alternative to `autoPlacement`.
|
|
6716
|
+
* @see https://floating-ui.com/docs/flip
|
|
6493
6717
|
*/
|
|
6718
|
+
const flip = flip$1;
|
|
6494
6719
|
|
|
6495
6720
|
/**
|
|
6496
|
-
*
|
|
6497
|
-
*
|
|
6498
|
-
*
|
|
6499
|
-
*
|
|
6500
|
-
* @property {(node: Element) => boolean} filter filter candidates
|
|
6501
|
-
* @property {boolean} flatten if true then result will flatten any CandidateScope into the returned list
|
|
6502
|
-
* @property {ShadowRootFilter} shadowRootFilter filter shadow roots;
|
|
6721
|
+
* Provides data that allows you to change the size of the floating element —
|
|
6722
|
+
* for instance, prevent it from overflowing the clipping boundary or match the
|
|
6723
|
+
* width of the reference element.
|
|
6724
|
+
* @see https://floating-ui.com/docs/size
|
|
6503
6725
|
*/
|
|
6726
|
+
const size = size$1;
|
|
6504
6727
|
|
|
6505
6728
|
/**
|
|
6506
|
-
*
|
|
6507
|
-
*
|
|
6508
|
-
* @param {IterativeOptions} options
|
|
6509
|
-
* @returns {Array.<Element|CandidateScope>}
|
|
6729
|
+
* Computes the `x` and `y` coordinates that will place the floating element
|
|
6730
|
+
* next to a given reference element.
|
|
6510
6731
|
*/
|
|
6511
|
-
|
|
6512
|
-
|
|
6513
|
-
|
|
6514
|
-
|
|
6515
|
-
|
|
6516
|
-
|
|
6517
|
-
|
|
6518
|
-
|
|
6519
|
-
|
|
6520
|
-
|
|
6521
|
-
|
|
6522
|
-
|
|
6523
|
-
|
|
6524
|
-
|
|
6525
|
-
|
|
6526
|
-
|
|
6527
|
-
|
|
6528
|
-
|
|
6529
|
-
candidates.push({
|
|
6530
|
-
scopeParent: element,
|
|
6531
|
-
candidates: nestedCandidates
|
|
6532
|
-
});
|
|
6533
|
-
}
|
|
6534
|
-
} else {
|
|
6535
|
-
// check candidate element
|
|
6536
|
-
var validCandidate = matches.call(element, candidateSelector);
|
|
6537
|
-
if (validCandidate && options.filter(element) && (includeContainer || !elements.includes(element))) {
|
|
6538
|
-
candidates.push(element);
|
|
6539
|
-
}
|
|
6732
|
+
const computePosition = (reference, floating, options) => {
|
|
6733
|
+
// This caches the expensive `getClippingElementAncestors` function so that
|
|
6734
|
+
// multiple lifecycle resets re-use the same result. It only lives for a
|
|
6735
|
+
// single call. If other functions become expensive, we can add them as well.
|
|
6736
|
+
const cache = new Map();
|
|
6737
|
+
const mergedOptions = {
|
|
6738
|
+
platform,
|
|
6739
|
+
...options
|
|
6740
|
+
};
|
|
6741
|
+
const platformWithCache = {
|
|
6742
|
+
...mergedOptions.platform,
|
|
6743
|
+
_c: cache
|
|
6744
|
+
};
|
|
6745
|
+
return computePosition$1(reference, floating, {
|
|
6746
|
+
...mergedOptions,
|
|
6747
|
+
platform: platformWithCache
|
|
6748
|
+
});
|
|
6749
|
+
};
|
|
6540
6750
|
|
|
6541
|
-
// iterate over shadow content if possible
|
|
6542
|
-
|
|
6543
|
-
// check for an undisclosed shadow
|
|
6544
|
-
typeof options.getShadowRoot === 'function' && options.getShadowRoot(element);
|
|
6751
|
+
const catDatepickerCss = "@charset \"UTF-8\";.flatpickr-calendar{background:transparent;opacity:0;display:none;text-align:center;visibility:hidden;padding:0;-webkit-animation:none;animation:none;direction:ltr;border:0;font-size:14px;line-height:24px;border-radius:5px;position:absolute;width:307.875px;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-touch-action:manipulation;touch-action:manipulation;background:#fff;-webkit-box-shadow:1px 0 0 #e6e6e6, -1px 0 0 #e6e6e6, 0 1px 0 #e6e6e6, 0 -1px 0 #e6e6e6, 0 3px 13px rgba(0,0,0,0.08);box-shadow:1px 0 0 #e6e6e6, -1px 0 0 #e6e6e6, 0 1px 0 #e6e6e6, 0 -1px 0 #e6e6e6, 0 3px 13px rgba(0,0,0,0.08)}.flatpickr-calendar.open,.flatpickr-calendar.inline{opacity:1;max-height:640px;visibility:visible}.flatpickr-calendar.open{display:inline-block;z-index:99999}.flatpickr-calendar.animate.open{-webkit-animation:fpFadeInDown 300ms cubic-bezier(0.23, 1, 0.32, 1);animation:fpFadeInDown 300ms cubic-bezier(0.23, 1, 0.32, 1)}.flatpickr-calendar.inline{display:block;position:relative;top:2px}.flatpickr-calendar.static{position:absolute;top:calc(100% + 2px)}.flatpickr-calendar.static.open{z-index:999;display:block}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+1) .flatpickr-day.inRange:nth-child(7n+7){-webkit-box-shadow:none !important;box-shadow:none !important}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+2) .flatpickr-day.inRange:nth-child(7n+1){-webkit-box-shadow:-2px 0 0 #e6e6e6, 5px 0 0 #e6e6e6;box-shadow:-2px 0 0 #e6e6e6, 5px 0 0 #e6e6e6}.flatpickr-calendar .hasWeeks .dayContainer,.flatpickr-calendar .hasTime .dayContainer{border-bottom:0;border-bottom-right-radius:0;border-bottom-left-radius:0}.flatpickr-calendar .hasWeeks .dayContainer{border-left:0}.flatpickr-calendar.hasTime .flatpickr-time{height:40px;border-top:1px solid #e6e6e6}.flatpickr-calendar.noCalendar.hasTime .flatpickr-time{height:auto}.flatpickr-calendar:before,.flatpickr-calendar:after{position:absolute;display:block;pointer-events:none;border:solid transparent;content:'';height:0;width:0;left:22px}.flatpickr-calendar.rightMost:before,.flatpickr-calendar.arrowRight:before,.flatpickr-calendar.rightMost:after,.flatpickr-calendar.arrowRight:after{left:auto;right:22px}.flatpickr-calendar.arrowCenter:before,.flatpickr-calendar.arrowCenter:after{left:50%;right:50%}.flatpickr-calendar:before{border-width:5px;margin:0 -5px}.flatpickr-calendar:after{border-width:4px;margin:0 -4px}.flatpickr-calendar.arrowTop:before,.flatpickr-calendar.arrowTop:after{bottom:100%}.flatpickr-calendar.arrowTop:before{border-bottom-color:#e6e6e6}.flatpickr-calendar.arrowTop:after{border-bottom-color:#fff}.flatpickr-calendar.arrowBottom:before,.flatpickr-calendar.arrowBottom:after{top:100%}.flatpickr-calendar.arrowBottom:before{border-top-color:#e6e6e6}.flatpickr-calendar.arrowBottom:after{border-top-color:#fff}.flatpickr-calendar:focus{outline:0}.flatpickr-wrapper{position:relative;display:inline-block}.flatpickr-months{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-months .flatpickr-month{background:transparent;color:rgba(0,0,0,0.9);fill:rgba(0,0,0,0.9);height:34px;line-height:1;text-align:center;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;overflow:hidden;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}.flatpickr-months .flatpickr-prev-month,.flatpickr-months .flatpickr-next-month{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;text-decoration:none;cursor:pointer;position:absolute;top:0;height:34px;padding:10px;z-index:3;color:rgba(0,0,0,0.9);fill:rgba(0,0,0,0.9)}.flatpickr-months .flatpickr-prev-month.flatpickr-disabled,.flatpickr-months .flatpickr-next-month.flatpickr-disabled{display:none}.flatpickr-months .flatpickr-prev-month i,.flatpickr-months .flatpickr-next-month i{position:relative}.flatpickr-months .flatpickr-prev-month.flatpickr-prev-month,.flatpickr-months .flatpickr-next-month.flatpickr-prev-month{left:0;}.flatpickr-months .flatpickr-prev-month.flatpickr-next-month,.flatpickr-months .flatpickr-next-month.flatpickr-next-month{right:0;}.flatpickr-months .flatpickr-prev-month:hover,.flatpickr-months .flatpickr-next-month:hover{color:#959ea9}.flatpickr-months .flatpickr-prev-month:hover svg,.flatpickr-months .flatpickr-next-month:hover svg{fill:#f64747}.flatpickr-months .flatpickr-prev-month svg,.flatpickr-months .flatpickr-next-month svg{width:14px;height:14px}.flatpickr-months .flatpickr-prev-month svg path,.flatpickr-months .flatpickr-next-month svg path{-webkit-transition:fill 0.1s;transition:fill 0.1s;fill:inherit}.numInputWrapper{position:relative;height:auto}.numInputWrapper input,.numInputWrapper span{display:inline-block}.numInputWrapper input{width:100%}.numInputWrapper input::-ms-clear{display:none}.numInputWrapper input::-webkit-outer-spin-button,.numInputWrapper input::-webkit-inner-spin-button{margin:0;-webkit-appearance:none}.numInputWrapper span{position:absolute;right:0;width:14px;padding:0 4px 0 2px;height:50%;line-height:50%;opacity:0;cursor:pointer;border:1px solid rgba(57,57,57,0.15);-webkit-box-sizing:border-box;box-sizing:border-box}.numInputWrapper span:hover{background:rgba(0,0,0,0.1)}.numInputWrapper span:active{background:rgba(0,0,0,0.2)}.numInputWrapper span:after{display:block;content:\"\";position:absolute}.numInputWrapper span.arrowUp{top:0;border-bottom:0}.numInputWrapper span.arrowUp:after{border-left:4px solid transparent;border-right:4px solid transparent;border-bottom:4px solid rgba(57,57,57,0.6);top:26%}.numInputWrapper span.arrowDown{top:50%}.numInputWrapper span.arrowDown:after{border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid rgba(57,57,57,0.6);top:40%}.numInputWrapper span svg{width:inherit;height:auto}.numInputWrapper span svg path{fill:rgba(0,0,0,0.5)}.numInputWrapper:hover{background:rgba(0,0,0,0.05)}.numInputWrapper:hover span{opacity:1}.flatpickr-current-month{font-size:135%;line-height:inherit;font-weight:300;color:inherit;position:absolute;width:75%;left:12.5%;padding:7.48px 0 0 0;line-height:1;height:34px;display:inline-block;text-align:center;-webkit-transform:translate3d(0px, 0px, 0px);transform:translate3d(0px, 0px, 0px)}.flatpickr-current-month span.cur-month{font-family:inherit;font-weight:700;color:inherit;display:inline-block;margin-left:0.5ch;padding:0}.flatpickr-current-month span.cur-month:hover{background:rgba(0,0,0,0.05)}.flatpickr-current-month .numInputWrapper{width:6ch;width:7ch\\0;display:inline-block}.flatpickr-current-month .numInputWrapper span.arrowUp:after{border-bottom-color:rgba(0,0,0,0.9)}.flatpickr-current-month .numInputWrapper span.arrowDown:after{border-top-color:rgba(0,0,0,0.9)}.flatpickr-current-month input.cur-year{background:transparent;-webkit-box-sizing:border-box;box-sizing:border-box;color:inherit;cursor:text;padding:0 0 0 0.5ch;margin:0;display:inline-block;font-size:inherit;font-family:inherit;font-weight:300;line-height:inherit;height:auto;border:0;border-radius:0;vertical-align:initial;-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}.flatpickr-current-month input.cur-year:focus{outline:0}.flatpickr-current-month input.cur-year[disabled],.flatpickr-current-month input.cur-year[disabled]:hover{font-size:100%;color:rgba(0,0,0,0.5);background:transparent;pointer-events:none}.flatpickr-current-month .flatpickr-monthDropdown-months{appearance:menulist;background:transparent;border:none;border-radius:0;box-sizing:border-box;color:inherit;cursor:pointer;font-size:inherit;font-family:inherit;font-weight:300;height:auto;line-height:inherit;margin:-1px 0 0 0;outline:none;padding:0 0 0 0.5ch;position:relative;vertical-align:initial;-webkit-box-sizing:border-box;-webkit-appearance:menulist;-moz-appearance:menulist;width:auto}.flatpickr-current-month .flatpickr-monthDropdown-months:focus,.flatpickr-current-month .flatpickr-monthDropdown-months:active{outline:none}.flatpickr-current-month .flatpickr-monthDropdown-months:hover{background:rgba(0,0,0,0.05)}.flatpickr-current-month .flatpickr-monthDropdown-months .flatpickr-monthDropdown-month{background-color:transparent;outline:none;padding:0}.flatpickr-weekdays{background:transparent;text-align:center;overflow:hidden;width:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;height:28px}.flatpickr-weekdays .flatpickr-weekdaycontainer{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}span.flatpickr-weekday{cursor:default;font-size:90%;background:transparent;color:rgba(0,0,0,0.54);line-height:1;margin:0;text-align:center;display:block;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;font-weight:bolder}.dayContainer,.flatpickr-weeks{padding:1px 0 0 0}.flatpickr-days{position:relative;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:start;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start;width:307.875px}.flatpickr-days:focus{outline:0}.dayContainer{padding:0;outline:0;text-align:left;width:307.875px;min-width:307.875px;max-width:307.875px;-webkit-box-sizing:border-box;box-sizing:border-box;display:inline-block;display:-ms-flexbox;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-wrap:wrap;-ms-flex-pack:justify;-webkit-justify-content:space-around;justify-content:space-around;-webkit-transform:translate3d(0px, 0px, 0px);transform:translate3d(0px, 0px, 0px);opacity:1}.dayContainer+.dayContainer{-webkit-box-shadow:-1px 0 0 #e6e6e6;box-shadow:-1px 0 0 #e6e6e6}.flatpickr-day{background:none;border:1px solid transparent;border-radius:150px;-webkit-box-sizing:border-box;box-sizing:border-box;color:#393939;cursor:pointer;font-weight:400;width:14.2857143%;-webkit-flex-basis:14.2857143%;-ms-flex-preferred-size:14.2857143%;flex-basis:14.2857143%;max-width:39px;height:39px;line-height:39px;margin:0;display:inline-block;position:relative;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;text-align:center}.flatpickr-day.inRange,.flatpickr-day.prevMonthDay.inRange,.flatpickr-day.nextMonthDay.inRange,.flatpickr-day.today.inRange,.flatpickr-day.prevMonthDay.today.inRange,.flatpickr-day.nextMonthDay.today.inRange,.flatpickr-day:hover,.flatpickr-day.prevMonthDay:hover,.flatpickr-day.nextMonthDay:hover,.flatpickr-day:focus,.flatpickr-day.prevMonthDay:focus,.flatpickr-day.nextMonthDay:focus{cursor:pointer;outline:0;background:#e6e6e6;border-color:#e6e6e6}.flatpickr-day.today{border-color:#959ea9}.flatpickr-day.today:hover,.flatpickr-day.today:focus{border-color:#959ea9;background:#959ea9;color:#fff}.flatpickr-day.selected,.flatpickr-day.startRange,.flatpickr-day.endRange,.flatpickr-day.selected.inRange,.flatpickr-day.startRange.inRange,.flatpickr-day.endRange.inRange,.flatpickr-day.selected:focus,.flatpickr-day.startRange:focus,.flatpickr-day.endRange:focus,.flatpickr-day.selected:hover,.flatpickr-day.startRange:hover,.flatpickr-day.endRange:hover,.flatpickr-day.selected.prevMonthDay,.flatpickr-day.startRange.prevMonthDay,.flatpickr-day.endRange.prevMonthDay,.flatpickr-day.selected.nextMonthDay,.flatpickr-day.startRange.nextMonthDay,.flatpickr-day.endRange.nextMonthDay{background:#569ff7;-webkit-box-shadow:none;box-shadow:none;color:#fff;border-color:#569ff7}.flatpickr-day.selected.startRange,.flatpickr-day.startRange.startRange,.flatpickr-day.endRange.startRange{border-radius:50px 0 0 50px}.flatpickr-day.selected.endRange,.flatpickr-day.startRange.endRange,.flatpickr-day.endRange.endRange{border-radius:0 50px 50px 0}.flatpickr-day.selected.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.startRange.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.endRange.startRange+.endRange:not(:nth-child(7n+1)){-webkit-box-shadow:-10px 0 0 #569ff7;box-shadow:-10px 0 0 #569ff7}.flatpickr-day.selected.startRange.endRange,.flatpickr-day.startRange.startRange.endRange,.flatpickr-day.endRange.startRange.endRange{border-radius:50px}.flatpickr-day.inRange{border-radius:0;-webkit-box-shadow:-5px 0 0 #e6e6e6, 5px 0 0 #e6e6e6;box-shadow:-5px 0 0 #e6e6e6, 5px 0 0 #e6e6e6}.flatpickr-day.flatpickr-disabled,.flatpickr-day.flatpickr-disabled:hover,.flatpickr-day.prevMonthDay,.flatpickr-day.nextMonthDay,.flatpickr-day.notAllowed,.flatpickr-day.notAllowed.prevMonthDay,.flatpickr-day.notAllowed.nextMonthDay{color:rgba(57,57,57,0.3);background:transparent;border-color:transparent;cursor:default}.flatpickr-day.flatpickr-disabled,.flatpickr-day.flatpickr-disabled:hover{cursor:not-allowed;color:rgba(57,57,57,0.1)}.flatpickr-day.week.selected{border-radius:0;-webkit-box-shadow:-5px 0 0 #569ff7, 5px 0 0 #569ff7;box-shadow:-5px 0 0 #569ff7, 5px 0 0 #569ff7}.flatpickr-day.hidden{visibility:hidden}.rangeMode .flatpickr-day{margin-top:1px}.flatpickr-weekwrapper{float:left}.flatpickr-weekwrapper .flatpickr-weeks{padding:0 12px;-webkit-box-shadow:1px 0 0 #e6e6e6;box-shadow:1px 0 0 #e6e6e6}.flatpickr-weekwrapper .flatpickr-weekday{float:none;width:100%;line-height:28px}.flatpickr-weekwrapper span.flatpickr-day,.flatpickr-weekwrapper span.flatpickr-day:hover{display:block;width:100%;max-width:none;color:rgba(57,57,57,0.3);background:transparent;cursor:default;border:none}.flatpickr-innerContainer{display:block;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden}.flatpickr-rContainer{display:inline-block;padding:0;-webkit-box-sizing:border-box;box-sizing:border-box}.flatpickr-time{text-align:center;outline:0;display:block;height:0;line-height:40px;max-height:40px;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-time:after{content:\"\";display:table;clear:both}.flatpickr-time .numInputWrapper{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;width:40%;height:40px;float:left}.flatpickr-time .numInputWrapper span.arrowUp:after{border-bottom-color:#393939}.flatpickr-time .numInputWrapper span.arrowDown:after{border-top-color:#393939}.flatpickr-time.hasSeconds .numInputWrapper{width:26%}.flatpickr-time.time24hr .numInputWrapper{width:49%}.flatpickr-time input{background:transparent;-webkit-box-shadow:none;box-shadow:none;border:0;border-radius:0;text-align:center;margin:0;padding:0;height:inherit;line-height:inherit;color:#393939;font-size:14px;position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}.flatpickr-time input.flatpickr-hour{font-weight:bold}.flatpickr-time input.flatpickr-minute,.flatpickr-time input.flatpickr-second{font-weight:400}.flatpickr-time input:focus{outline:0;border:0}.flatpickr-time .flatpickr-time-separator,.flatpickr-time .flatpickr-am-pm{height:inherit;float:left;line-height:inherit;color:#393939;font-weight:bold;width:2%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-align-self:center;-ms-flex-item-align:center;align-self:center}.flatpickr-time .flatpickr-am-pm{outline:0;width:18%;cursor:pointer;text-align:center;font-weight:400}.flatpickr-time input:hover,.flatpickr-time .flatpickr-am-pm:hover,.flatpickr-time input:focus,.flatpickr-time .flatpickr-am-pm:focus{background:#eee}.flatpickr-input[readonly]{cursor:pointer}@-webkit-keyframes fpFadeInDown{from{opacity:0;-webkit-transform:translate3d(0, -20px, 0);transform:translate3d(0, -20px, 0)}to{opacity:1;-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0)}}@keyframes fpFadeInDown{from{opacity:0;-webkit-transform:translate3d(0, -20px, 0);transform:translate3d(0, -20px, 0)}to{opacity:1;-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0)}}.flatpickr-calendar{font-size:0.875rem;line-height:1.125rem;font-weight:var(--cat-font-weight-body, 400);box-shadow:0 4px 6px -2px rgba(27, 31, 38, 0.03), 0 12px 16px -4px rgba(27, 31, 38, 0.08);border-radius:var(--cat-border-radius-m, 0.25rem);border:1px solid rgb(var(--cat-border-color, 235, 236, 240));background:white;padding:1rem}.flatpickr-calendar:not(.inline).animate{transform:translateY(-1rem);opacity:0;transition:transform 125ms cubic-bezier(0.3, 0, 0.8, 0.15), opacity 125ms cubic-bezier(0.3, 0, 0.8, 0.15)}.flatpickr-calendar::before,.flatpickr-calendar::after{display:none}.flatpickr-calendar.inline,.flatpickr-calendar.open{display:flex;flex-direction:column;gap:1rem;width:auto !important}.flatpickr-calendar.inline{border:unset;padding:0}.flatpickr-calendar.open{z-index:calc(var(--cat-z-index, 1000) + 100);margin-top:0.75rem;margin-left:-0.75rem}.flatpickr-calendar.open.animate{opacity:1;transform:translateY(0);transition:transform 500ms cubic-bezier(0.05, 0.7, 0.1, 1), opacity 500ms cubic-bezier(0.05, 0.7, 0.1, 1)}.flatpickr-months{gap:0.25rem}.flatpickr-months .flatpickr-month{height:auto}.flatpickr-current-month{font-size:1.125rem;line-height:1.5rem;font-weight:var(--cat-font-weight-head, 600);font-feature-settings:\"pnum\";height:100%;padding:0;display:flex;position:static;width:auto;gap:0.25rem}.flatpickr-current-month .flatpickr-monthDropdown-months{padding:0 0.25rem;flex:1;margin:unset;font-weight:inherit;border-radius:var(--cat-border-radius-m, 0.25rem)}.flatpickr-current-month .flatpickr-monthDropdown-months:hover,.flatpickr-current-month .flatpickr-monthDropdown-months:focus-within{background-color:rgba(var(--cat-primary-bg, 0, 129, 148), 0.05)}.flatpickr-current-month input.cur-year{padding:0;font-weight:inherit;line-height:2.25rem}.flatpickr-current-month .numInputWrapper{width:7ch}.flatpickr-months .flatpickr-prev-month,.flatpickr-months .flatpickr-next-month{position:static;width:2.25rem;height:2.25rem;padding:0;align-items:center;display:flex;justify-content:center;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.flatpickr-months .flatpickr-prev-month:hover,.flatpickr-months .flatpickr-next-month:hover{color:rgb(var(--cat-font-color-base, 0, 0, 0))}.flatpickr-weekdays{height:2rem}.flatpickr-weekdays .flatpickr-weekday{color:rgb(var(--cat-font-color-muted, 81, 92, 108));font-size:0.75rem;line-height:1rem;font-weight:700}.flatpickr-weekwrapper .flatpickr-weekday{height:2rem}.flatpickr-weekwrapper .flatpickr-weeks{box-shadow:none;width:2rem;padding:0;margin-right:0.5rem;background:#f2f4f7;border-radius:var(--cat-border-radius-m, 0.25rem)}.flatpickr-weekwrapper span.flatpickr-day,.flatpickr-weekwrapper span.flatpickr-day:hover{font-size:0.75rem;line-height:1rem;font-weight:700;color:rgb(var(--cat-font-color-muted, 81, 92, 108));text-align:center;line-height:2.25rem}.flatpickr-days{width:15.75rem !important}.dayContainer{width:15.75rem;min-width:15.75rem;max-width:15.75rem}.flatpickr-day{color:rgb(var(--cat-font-color-base, 0, 0, 0));height:2.25rem;line-height:2.25rem;border:0;border-radius:var(--cat-border-radius-m, 0.25rem)}.flatpickr-day:hover{background-color:#f2f4f7;font-weight:700}.flatpickr-day.flatpickr-disabled,.flatpickr-day.flatpickr-disabled:hover{color:rgb(var(--cat-font-color-muted, 81, 92, 108));font-weight:inherit;background-color:inherit !important}.flatpickr-day.today{color:rgb(var(--cat-primary-text, 0, 129, 148));box-shadow:inset 0 0 0 2px rgb(var(--cat-primary-text, 0, 129, 148))}.flatpickr-day.today:hover,.flatpickr-day.today:focus{background-color:#f2f4f7;color:rgb(var(--cat-primary-text, 0, 129, 148))}.flatpickr-day.flatpickr-disabled,.flatpickr-day.flatpickr-disabled:hover,.flatpickr-day.prevMonthDay,.flatpickr-day.nextMonthDay,.flatpickr-day.notAllowed,.flatpickr-day.notAllowed.prevMonthDay,.flatpickr-day.notAllowed.nextMonthDay{color:rgba(var(--cat-font-color-muted, 81, 92, 108), 0.5)}.flatpickr-day.selected,.flatpickr-day.selected:hover,.flatpickr-day.selected:focus,.flatpickr-day.selected.inRange,.flatpickr-day.selected.nextMonthDay,.flatpickr-day.selected.prevMonthDay,.flatpickr-day.startRange,.flatpickr-day.startRange:hover,.flatpickr-day.startRange:focus,.flatpickr-day.startRange.inRange,.flatpickr-day.startRange.nextMonthDay,.flatpickr-day.startRange.prevMonthDay,.flatpickr-day.endRange,.flatpickr-day.endRange:hover,.flatpickr-day.endRange:focus,.flatpickr-day.endRange.inRange,.flatpickr-day.endRange.nextMonthDay,.flatpickr-day.endRange.prevMonthDay{font-weight:700;background-color:rgb(var(--cat-primary-bg, 0, 129, 148)) !important;color:rgb(var(--cat-primary-fill, 255, 255, 255)) !important}.flatpickr-day.inRange,.flatpickr-day.prevMonthDay.inRange,.flatpickr-day.nextMonthDay.inRange,.flatpickr-day.today.inRange,.flatpickr-day.prevMonthDay.today.inRange,.flatpickr-day.nextMonthDay.today.inRange,.flatpickr-day:hover,.flatpickr-day.prevMonthDay:hover,.flatpickr-day.nextMonthDay:hover,.flatpickr-day:focus,.flatpickr-day.prevMonthDay:focus,.flatpickr-day.nextMonthDay:focus{background-color:rgba(var(--cat-primary-bg, 0, 129, 148), 0.1)}.flatpickr-day.selected.startRange,.flatpickr-day.startRange.startRange,.flatpickr-day.endRange.startRange{border-top-left-radius:var(--cat-border-radius-m, 0.25rem);border-bottom-left-radius:var(--cat-border-radius-m, 0.25rem)}.flatpickr-day.selected.endRange,.flatpickr-day.startRange.endRange,.flatpickr-day.endRange.endRange{border-top-right-radius:var(--cat-border-radius-m, 0.25rem);border-bottom-right-radius:var(--cat-border-radius-m, 0.25rem)}.numInputWrapper{padding:0 1rem 0 0.5rem;border-radius:var(--cat-border-radius-m, 0.25rem)}.numInputWrapper:hover,.numInputWrapper:focus-within{background-color:rgba(var(--cat-primary-bg, 0, 129, 148), 0.05)}.numInputWrapper span{border:none;background:transparent;width:1rem;padding:0;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.numInputWrapper span.arrowUp::after{content:\"↑\";align-items:flex-end}.numInputWrapper span.arrowDown::after{content:\"↓\";align-items:flex-start}.numInputWrapper span::after{font-size:0.75rem;line-height:1rem;font-weight:700;position:static;border:0 !important;font-size:10px;display:flex;height:100%;justify-content:center}.numInputWrapper span:hover{color:rgb(var(--cat-font-color-base, 0, 0, 0));background:transparent}.flatpickr-calendar.hasTime .flatpickr-time{border:1px solid rgb(var(--cat-border-color, 235, 236, 240));border-radius:var(--cat-border-radius-m, 0.25rem);min-width:12rem;height:auto}.flatpickr-calendar.hasTime .flatpickr-time .numInputWrapper{height:2rem;padding:0;margin:0.25rem;display:flex}.flatpickr-calendar.hasTime.noCalendar{padding:0}.flatpickr-calendar.hasTime.noCalendar .flatpickr-time{border:none}.flatpickr-time .flatpickr-time-separator,.flatpickr-time .flatpickr-am-pm{margin:0 0.25rem;font-size:1.125rem;line-height:1.5rem;font-weight:400;font-feature-settings:\"pnum\";color:rgb(var(--cat-font-color-base, 0, 0, 0));line-height:2.25rem}.flatpickr-time .flatpickr-am-pm{width:25%;padding:0 0.5rem}.flatpickr-time .flatpickr-am-pm:hover,.flatpickr-time .flatpickr-am-pm:focus{border-radius:var(--cat-border-radius-m, 0.25rem);background-color:rgba(var(--cat-primary-bg, 0, 129, 148), 0.05)}.flatpickr-time{max-height:unset}.flatpickr-time input{background:transparent !important;color:rgb(var(--cat-font-color-base, 0, 0, 0));font-size:0.9375rem;line-height:2.25rem;font-family:inherit}.flatpickr-time input.flatpickr-hour{font-weight:inherit}.flatpickr-day.inRange:not(.today),.flatpickr-day.week.selected{box-shadow:none}.flatpickr-day.inRange:nth-child(7n+1),.flatpickr-day.week.selected:nth-child(7n+1){border-top-left-radius:var(--cat-border-radius-m, 0.25rem);border-bottom-left-radius:var(--cat-border-radius-m, 0.25rem)}.flatpickr-day.inRange:nth-child(7n+7),.flatpickr-day.week.selected:nth-child(7n+7){border-top-right-radius:var(--cat-border-radius-m, 0.25rem);border-bottom-right-radius:var(--cat-border-radius-m, 0.25rem)}.flatpickr-day.selected.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.startRange.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.endRange.startRange+.endRange:not(:nth-child(7n+1)){box-shadow:none}.flatpickr-day.selected.startRange.endRange,.flatpickr-day.startRange.startRange.endRange,.flatpickr-day.endRange.startRange.endRange{border-radius:var(--cat-border-radius-m, 0.25rem)}:host{display:flex}:host([hidden]){display:none}cat-input{flex:1 1 auto;margin:0}";
|
|
6752
|
+
const CatDatepickerStyle0 = catDatepickerCss;
|
|
6545
6753
|
|
|
6546
|
-
|
|
6547
|
-
|
|
6548
|
-
|
|
6549
|
-
|
|
6550
|
-
|
|
6551
|
-
|
|
6552
|
-
|
|
6553
|
-
|
|
6554
|
-
|
|
6555
|
-
|
|
6556
|
-
|
|
6557
|
-
|
|
6558
|
-
|
|
6559
|
-
|
|
6560
|
-
|
|
6561
|
-
|
|
6562
|
-
|
|
6563
|
-
|
|
6564
|
-
|
|
6754
|
+
const CatDatepickerFlat = class {
|
|
6755
|
+
constructor(hostRef) {
|
|
6756
|
+
index.registerInstance(this, hostRef);
|
|
6757
|
+
this.catChange = index.createEvent(this, "catChange", 7);
|
|
6758
|
+
this.catFocus = index.createEvent(this, "catFocus", 7);
|
|
6759
|
+
this.catBlur = index.createEvent(this, "catBlur", 7);
|
|
6760
|
+
this.hasSlottedLabel = false;
|
|
6761
|
+
this.hasSlottedHint = false;
|
|
6762
|
+
this.requiredMarker = 'optional';
|
|
6763
|
+
this.horizontal = false;
|
|
6764
|
+
this.autoComplete = undefined;
|
|
6765
|
+
this.clearable = false;
|
|
6766
|
+
this.disabled = false;
|
|
6767
|
+
this.hint = undefined;
|
|
6768
|
+
this.icon = undefined;
|
|
6769
|
+
this.iconRight = false;
|
|
6770
|
+
this.identifier = undefined;
|
|
6771
|
+
this.label = '';
|
|
6772
|
+
this.labelHidden = false;
|
|
6773
|
+
this.max = undefined;
|
|
6774
|
+
this.min = undefined;
|
|
6775
|
+
this.mode = 'date';
|
|
6776
|
+
this.name = undefined;
|
|
6777
|
+
this.placeholder = undefined;
|
|
6778
|
+
this.textPrefix = undefined;
|
|
6779
|
+
this.textSuffix = undefined;
|
|
6780
|
+
this.readonly = false;
|
|
6781
|
+
this.required = false;
|
|
6782
|
+
this.step = 5;
|
|
6783
|
+
this.attachToElement = false;
|
|
6784
|
+
this.position = undefined;
|
|
6785
|
+
this.value = undefined;
|
|
6786
|
+
this.errors = undefined;
|
|
6787
|
+
this.errorUpdate = 0;
|
|
6788
|
+
this.nativeAttributes = undefined;
|
|
6789
|
+
this.nativePickerAttributes = undefined;
|
|
6790
|
+
}
|
|
6791
|
+
get input() {
|
|
6792
|
+
return this._input?.shadowRoot?.querySelector('input') ?? undefined;
|
|
6793
|
+
}
|
|
6794
|
+
onValueChanged(value) {
|
|
6795
|
+
if (value) {
|
|
6796
|
+
this.pickr?.setDate(value, false);
|
|
6797
|
+
if (this.mode !== 'daterange' || value.includes(' - ')) {
|
|
6798
|
+
this.catChange.emit(value);
|
|
6799
|
+
}
|
|
6800
|
+
}
|
|
6801
|
+
else {
|
|
6802
|
+
this.pickr?.clear(false);
|
|
6803
|
+
this.catChange.emit(undefined);
|
|
6565
6804
|
}
|
|
6566
|
-
} else {
|
|
6567
|
-
// there's not shadow so just dig into the element's (light dom) children
|
|
6568
|
-
// __without__ giving the element special scope treatment
|
|
6569
|
-
elementsToCheck.unshift.apply(elementsToCheck, element.children);
|
|
6570
|
-
}
|
|
6571
6805
|
}
|
|
6572
|
-
|
|
6573
|
-
|
|
6574
|
-
|
|
6575
|
-
|
|
6576
|
-
|
|
6577
|
-
|
|
6578
|
-
|
|
6579
|
-
|
|
6580
|
-
|
|
6581
|
-
|
|
6582
|
-
|
|
6583
|
-
|
|
6584
|
-
|
|
6585
|
-
|
|
6586
|
-
|
|
6587
|
-
|
|
6588
|
-
|
|
6589
|
-
|
|
6590
|
-
|
|
6591
|
-
|
|
6592
|
-
|
|
6593
|
-
|
|
6594
|
-
|
|
6595
|
-
|
|
6596
|
-
|
|
6597
|
-
|
|
6598
|
-
// `tabIndex` of -1 when the 'tabindex' attribute isn't specified in the DOM,
|
|
6599
|
-
// yet they are still part of the regular tab order; in FF, they get a default
|
|
6600
|
-
// `tabIndex` of 0; since Chrome still puts those elements in the regular tab
|
|
6601
|
-
// order, consider their tab index to be 0.
|
|
6602
|
-
// Also browsers do not return `tabIndex` correctly for contentEditable nodes;
|
|
6603
|
-
// so if they don't have a tabindex attribute specifically set, assume it's 0.
|
|
6604
|
-
if ((/^(AUDIO|VIDEO|DETAILS)$/.test(node.tagName) || isContentEditable(node)) && !hasTabIndex(node)) {
|
|
6605
|
-
return 0;
|
|
6806
|
+
onDisabledChanged() {
|
|
6807
|
+
// Dynamically changing config value is not working due to a bug in the
|
|
6808
|
+
// library. We thus need to fully recreate the date picker after the value
|
|
6809
|
+
// has been updated.
|
|
6810
|
+
this.pickr?.destroy();
|
|
6811
|
+
this.pickr = undefined;
|
|
6812
|
+
setTimeout(() => {
|
|
6813
|
+
this.input ? (this.input.disabled = this.disabled) : null;
|
|
6814
|
+
this.pickr = this.initDatepicker(this.input);
|
|
6815
|
+
});
|
|
6816
|
+
}
|
|
6817
|
+
componentDidLoad() {
|
|
6818
|
+
this.pickr = this.initDatepicker(this.input);
|
|
6819
|
+
}
|
|
6820
|
+
componentWillRender() {
|
|
6821
|
+
this.hasSlottedLabel = !!this.hostElement.querySelector('[slot="label"]');
|
|
6822
|
+
this.hasSlottedHint = !!this.hostElement.querySelector('[slot="hint"]');
|
|
6823
|
+
}
|
|
6824
|
+
onMinChanged() {
|
|
6825
|
+
this.pickr?.set('minDate', this.min);
|
|
6826
|
+
this.pickr?.set('maxDate', this.max);
|
|
6827
|
+
if (this.value && !this.pickr?.selectedDates?.length) {
|
|
6828
|
+
// Dynamically changing 'minDate' or 'maxDate' does not emit a change if
|
|
6829
|
+
// the value is cleared due to an invalid date.
|
|
6830
|
+
this.pickr?.clear();
|
|
6831
|
+
}
|
|
6606
6832
|
}
|
|
6607
|
-
|
|
6608
|
-
|
|
6609
|
-
|
|
6610
|
-
|
|
6611
|
-
|
|
6612
|
-
|
|
6613
|
-
|
|
6614
|
-
|
|
6615
|
-
|
|
6616
|
-
* inserted into the correct sort position.
|
|
6617
|
-
* @returns {number} Tab order (negative, 0, or positive number).
|
|
6618
|
-
*/
|
|
6619
|
-
var getSortOrderTabIndex = function getSortOrderTabIndex(node, isScope) {
|
|
6620
|
-
var tabIndex = getTabIndex(node);
|
|
6621
|
-
if (tabIndex < 0 && isScope && !hasTabIndex(node)) {
|
|
6622
|
-
return 0;
|
|
6623
|
-
}
|
|
6624
|
-
return tabIndex;
|
|
6625
|
-
};
|
|
6626
|
-
var sortOrderedTabbables = function sortOrderedTabbables(a, b) {
|
|
6627
|
-
return a.tabIndex === b.tabIndex ? a.documentOrder - b.documentOrder : a.tabIndex - b.tabIndex;
|
|
6628
|
-
};
|
|
6629
|
-
var isInput = function isInput(node) {
|
|
6630
|
-
return node.tagName === 'INPUT';
|
|
6631
|
-
};
|
|
6632
|
-
var isHiddenInput = function isHiddenInput(node) {
|
|
6633
|
-
return isInput(node) && node.type === 'hidden';
|
|
6634
|
-
};
|
|
6635
|
-
var isDetailsWithSummary = function isDetailsWithSummary(node) {
|
|
6636
|
-
var r = node.tagName === 'DETAILS' && Array.prototype.slice.apply(node.children).some(function (child) {
|
|
6637
|
-
return child.tagName === 'SUMMARY';
|
|
6638
|
-
});
|
|
6639
|
-
return r;
|
|
6640
|
-
};
|
|
6641
|
-
var getCheckedRadio = function getCheckedRadio(nodes, form) {
|
|
6642
|
-
for (var i = 0; i < nodes.length; i++) {
|
|
6643
|
-
if (nodes[i].checked && nodes[i].form === form) {
|
|
6644
|
-
return nodes[i];
|
|
6833
|
+
/**
|
|
6834
|
+
* Programmatically move focus to the datepicker. Use this method instead of
|
|
6835
|
+
* `input.focus()`.
|
|
6836
|
+
*
|
|
6837
|
+
* @param options An optional object providing options to control aspects of
|
|
6838
|
+
* the focusing process.
|
|
6839
|
+
*/
|
|
6840
|
+
async doFocus(options) {
|
|
6841
|
+
this._input?.doFocus(options);
|
|
6645
6842
|
}
|
|
6646
|
-
|
|
6647
|
-
|
|
6648
|
-
|
|
6649
|
-
|
|
6650
|
-
|
|
6651
|
-
|
|
6652
|
-
var radioScope = node.form || getRootNode(node);
|
|
6653
|
-
var queryRadios = function queryRadios(name) {
|
|
6654
|
-
return radioScope.querySelectorAll('input[type="radio"][name="' + name + '"]');
|
|
6655
|
-
};
|
|
6656
|
-
var radioSet;
|
|
6657
|
-
if (typeof window !== 'undefined' && typeof window.CSS !== 'undefined' && typeof window.CSS.escape === 'function') {
|
|
6658
|
-
radioSet = queryRadios(window.CSS.escape(node.name));
|
|
6659
|
-
} else {
|
|
6660
|
-
try {
|
|
6661
|
-
radioSet = queryRadios(node.name);
|
|
6662
|
-
} catch (err) {
|
|
6663
|
-
// eslint-disable-next-line no-console
|
|
6664
|
-
console.error('Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s', err.message);
|
|
6665
|
-
return false;
|
|
6843
|
+
/**
|
|
6844
|
+
* Programmatically remove focus from the datepicker. Use this method instead of
|
|
6845
|
+
* `input.blur()`.
|
|
6846
|
+
*/
|
|
6847
|
+
async doBlur() {
|
|
6848
|
+
this._input?.doBlur();
|
|
6666
6849
|
}
|
|
6667
|
-
|
|
6668
|
-
|
|
6669
|
-
|
|
6670
|
-
|
|
6671
|
-
|
|
6672
|
-
|
|
6673
|
-
|
|
6674
|
-
|
|
6675
|
-
|
|
6850
|
+
render() {
|
|
6851
|
+
return [
|
|
6852
|
+
index.h("cat-input", { key: '2bf7691fd001b340000dd8b3091d8adea6692c39', ref: el => (this._input = el), requiredMarker: this.requiredMarker, horizontal: this.horizontal, autoComplete: this.autoComplete, clearable: this.clearable, disabled: this.disabled, hint: this.hint, icon: this.icon, iconRight: this.iconRight, identifier: this.identifier, label: this.label, labelHidden: this.labelHidden, name: this.name, placeholder: this.placeholder, textPrefix: this.textPrefix, textSuffix: this.textSuffix, readonly: this.readonly, required: this.required, value: this.value, errors: this.errors, errorUpdate: this.errorUpdate, nativeAttributes: this.nativeAttributes, onCatChange: e => {
|
|
6853
|
+
e.stopPropagation();
|
|
6854
|
+
this.value = e.detail || undefined;
|
|
6855
|
+
}, onCatFocus: e => {
|
|
6856
|
+
e.stopPropagation();
|
|
6857
|
+
this.catFocus.emit(e.detail);
|
|
6858
|
+
}, onCatBlur: e => {
|
|
6859
|
+
e.stopPropagation();
|
|
6860
|
+
this.catBlur.emit(e.detail);
|
|
6861
|
+
} }, this.hasSlottedLabel && (index.h("span", { slot: "label" }, index.h("slot", { name: "label" }))), this.hasSlottedHint && (index.h("span", { slot: "hint" }, index.h("slot", { name: "hint" })))),
|
|
6862
|
+
index.h("div", { key: '3356a8ea5e0bd5be9a105055afc5f1663250e448', ref: el => (this._calendarWrapper = el), class: "datepicker-wrapper" })
|
|
6863
|
+
];
|
|
6864
|
+
}
|
|
6865
|
+
initDatepicker(input) {
|
|
6866
|
+
if (!input) {
|
|
6867
|
+
return;
|
|
6868
|
+
}
|
|
6869
|
+
// avoid dropdown closing if datepicker is part of a dropdown
|
|
6870
|
+
const withinDropdown = !!findClosest('cat-dropdown', input);
|
|
6871
|
+
const nativePickerAttributes = withinDropdown ? { 'data-dropdown-no-close': '' } : {};
|
|
6872
|
+
return flatpickr(input, getConfig({
|
|
6873
|
+
locale: getLocale$1(of.catI18nRegistry.getLocale()),
|
|
6874
|
+
format: getFormat(of.catI18nRegistry.getLocale(), this.mode),
|
|
6875
|
+
mode: this.mode,
|
|
6876
|
+
min: this.min,
|
|
6877
|
+
max: this.max,
|
|
6878
|
+
step: this.step,
|
|
6879
|
+
disabled: this.disabled,
|
|
6880
|
+
readonly: this.readonly,
|
|
6881
|
+
appendTo: this.attachToElement ? this._calendarWrapper : undefined,
|
|
6882
|
+
nativePickerAttributes: { ...nativePickerAttributes, ...this.nativePickerAttributes },
|
|
6883
|
+
// flatpickr has open bug about incorrect positioning when appendTo is used,
|
|
6884
|
+
// we have to use custom logic to calculate position
|
|
6885
|
+
// https://github.com/flatpickr/flatpickr/issues/1619
|
|
6886
|
+
position: this.attachToElement
|
|
6887
|
+
? (flatpickr, positionElement) => {
|
|
6888
|
+
this.updatePosition(flatpickr, positionElement);
|
|
6889
|
+
}
|
|
6890
|
+
: this.position || undefined,
|
|
6891
|
+
onReady: (_dates, _dateStr, flatpickr) => {
|
|
6892
|
+
autoUpdate(input, flatpickr.calendarContainer, () => this.updatePosition(flatpickr, flatpickr._input));
|
|
6893
|
+
},
|
|
6894
|
+
applyChange: value => (this.value = value)
|
|
6895
|
+
}));
|
|
6896
|
+
}
|
|
6897
|
+
updatePosition(flatpickr, positionElement) {
|
|
6898
|
+
if (positionElement) {
|
|
6899
|
+
computePosition(positionElement, flatpickr.calendarContainer, {
|
|
6900
|
+
strategy: 'fixed',
|
|
6901
|
+
placement: this.position || 'bottom-start',
|
|
6902
|
+
middleware: [flip()]
|
|
6903
|
+
}).then(({ x, y, placement }) => {
|
|
6904
|
+
if (flatpickr.calendarContainer) {
|
|
6905
|
+
flatpickr.calendarContainer.dataset.placement = placement;
|
|
6906
|
+
Object.assign(flatpickr.calendarContainer.style, {
|
|
6907
|
+
left: `${x}px`,
|
|
6908
|
+
top: `${y}px`,
|
|
6909
|
+
position: 'fixed'
|
|
6910
|
+
});
|
|
6911
|
+
}
|
|
6912
|
+
});
|
|
6913
|
+
}
|
|
6914
|
+
}
|
|
6915
|
+
get hostElement() { return index.getElement(this); }
|
|
6916
|
+
static get watchers() { return {
|
|
6917
|
+
"value": ["onValueChanged"],
|
|
6918
|
+
"disabled": ["onDisabledChanged"],
|
|
6919
|
+
"readonly": ["onDisabledChanged"],
|
|
6920
|
+
"mode": ["onDisabledChanged"],
|
|
6921
|
+
"min": ["onMinChanged"],
|
|
6922
|
+
"max": ["onMinChanged"]
|
|
6923
|
+
}; }
|
|
6676
6924
|
};
|
|
6925
|
+
CatDatepickerFlat.style = CatDatepickerStyle0;
|
|
6677
6926
|
|
|
6678
|
-
// determines if a node is ultimately attached to the window's document
|
|
6679
|
-
|
|
6680
|
-
var _nodeRoot;
|
|
6681
|
-
// The root node is the shadow root if the node is in a shadow DOM; some document otherwise
|
|
6682
|
-
// (but NOT _the_ document; see second 'If' comment below for more).
|
|
6683
|
-
// If rootNode is shadow root, it'll have a host, which is the element to which the shadow
|
|
6684
|
-
// is attached, and the one we need to check if it's in the document or not (because the
|
|
6685
|
-
// shadow, and all nodes it contains, is never considered in the document since shadows
|
|
6686
|
-
// behave like self-contained DOMs; but if the shadow's HOST, which is part of the document,
|
|
6687
|
-
// is hidden, or is not in the document itself but is detached, it will affect the shadow's
|
|
6688
|
-
// visibility, including all the nodes it contains). The host could be any normal node,
|
|
6689
|
-
// or a custom element (i.e. web component). Either way, that's the one that is considered
|
|
6690
|
-
// part of the document, not the shadow root, nor any of its children (i.e. the node being
|
|
6691
|
-
// tested).
|
|
6692
|
-
// To further complicate things, we have to look all the way up until we find a shadow HOST
|
|
6693
|
-
// that is attached (or find none) because the node might be in nested shadows...
|
|
6694
|
-
// If rootNode is not a shadow root, it won't have a host, and so rootNode should be the
|
|
6695
|
-
// document (per the docs) and while it's a Document-type object, that document does not
|
|
6696
|
-
// appear to be the same as the node's `ownerDocument` for some reason, so it's safer
|
|
6697
|
-
// to ignore the rootNode at this point, and use `node.ownerDocument`. Otherwise,
|
|
6698
|
-
// using `rootNode.contains(node)` will _always_ be true we'll get false-positives when
|
|
6699
|
-
// node is actually detached.
|
|
6700
|
-
// NOTE: If `nodeRootHost` or `node` happens to be the `document` itself (which is possible
|
|
6701
|
-
// if a tabbable/focusable node was quickly added to the DOM, focused, and then removed
|
|
6702
|
-
// from the DOM as in https://github.com/focus-trap/focus-trap-react/issues/905), then
|
|
6703
|
-
// `ownerDocument` will be `null`, hence the optional chaining on it.
|
|
6704
|
-
var nodeRoot = node && getRootNode(node);
|
|
6705
|
-
var nodeRootHost = (_nodeRoot = nodeRoot) === null || _nodeRoot === void 0 ? void 0 : _nodeRoot.host;
|
|
6927
|
+
const catDatepickerInlineCss = "@charset \"UTF-8\";.flatpickr-calendar{background:transparent;opacity:0;display:none;text-align:center;visibility:hidden;padding:0;-webkit-animation:none;animation:none;direction:ltr;border:0;font-size:14px;line-height:24px;border-radius:5px;position:absolute;width:307.875px;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-touch-action:manipulation;touch-action:manipulation;background:#fff;-webkit-box-shadow:1px 0 0 #e6e6e6, -1px 0 0 #e6e6e6, 0 1px 0 #e6e6e6, 0 -1px 0 #e6e6e6, 0 3px 13px rgba(0,0,0,0.08);box-shadow:1px 0 0 #e6e6e6, -1px 0 0 #e6e6e6, 0 1px 0 #e6e6e6, 0 -1px 0 #e6e6e6, 0 3px 13px rgba(0,0,0,0.08)}.flatpickr-calendar.open,.flatpickr-calendar.inline{opacity:1;max-height:640px;visibility:visible}.flatpickr-calendar.open{display:inline-block;z-index:99999}.flatpickr-calendar.animate.open{-webkit-animation:fpFadeInDown 300ms cubic-bezier(0.23, 1, 0.32, 1);animation:fpFadeInDown 300ms cubic-bezier(0.23, 1, 0.32, 1)}.flatpickr-calendar.inline{display:block;position:relative;top:2px}.flatpickr-calendar.static{position:absolute;top:calc(100% + 2px)}.flatpickr-calendar.static.open{z-index:999;display:block}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+1) .flatpickr-day.inRange:nth-child(7n+7){-webkit-box-shadow:none !important;box-shadow:none !important}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+2) .flatpickr-day.inRange:nth-child(7n+1){-webkit-box-shadow:-2px 0 0 #e6e6e6, 5px 0 0 #e6e6e6;box-shadow:-2px 0 0 #e6e6e6, 5px 0 0 #e6e6e6}.flatpickr-calendar .hasWeeks .dayContainer,.flatpickr-calendar .hasTime .dayContainer{border-bottom:0;border-bottom-right-radius:0;border-bottom-left-radius:0}.flatpickr-calendar .hasWeeks .dayContainer{border-left:0}.flatpickr-calendar.hasTime .flatpickr-time{height:40px;border-top:1px solid #e6e6e6}.flatpickr-calendar.noCalendar.hasTime .flatpickr-time{height:auto}.flatpickr-calendar:before,.flatpickr-calendar:after{position:absolute;display:block;pointer-events:none;border:solid transparent;content:'';height:0;width:0;left:22px}.flatpickr-calendar.rightMost:before,.flatpickr-calendar.arrowRight:before,.flatpickr-calendar.rightMost:after,.flatpickr-calendar.arrowRight:after{left:auto;right:22px}.flatpickr-calendar.arrowCenter:before,.flatpickr-calendar.arrowCenter:after{left:50%;right:50%}.flatpickr-calendar:before{border-width:5px;margin:0 -5px}.flatpickr-calendar:after{border-width:4px;margin:0 -4px}.flatpickr-calendar.arrowTop:before,.flatpickr-calendar.arrowTop:after{bottom:100%}.flatpickr-calendar.arrowTop:before{border-bottom-color:#e6e6e6}.flatpickr-calendar.arrowTop:after{border-bottom-color:#fff}.flatpickr-calendar.arrowBottom:before,.flatpickr-calendar.arrowBottom:after{top:100%}.flatpickr-calendar.arrowBottom:before{border-top-color:#e6e6e6}.flatpickr-calendar.arrowBottom:after{border-top-color:#fff}.flatpickr-calendar:focus{outline:0}.flatpickr-wrapper{position:relative;display:inline-block}.flatpickr-months{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-months .flatpickr-month{background:transparent;color:rgba(0,0,0,0.9);fill:rgba(0,0,0,0.9);height:34px;line-height:1;text-align:center;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;overflow:hidden;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}.flatpickr-months .flatpickr-prev-month,.flatpickr-months .flatpickr-next-month{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;text-decoration:none;cursor:pointer;position:absolute;top:0;height:34px;padding:10px;z-index:3;color:rgba(0,0,0,0.9);fill:rgba(0,0,0,0.9)}.flatpickr-months .flatpickr-prev-month.flatpickr-disabled,.flatpickr-months .flatpickr-next-month.flatpickr-disabled{display:none}.flatpickr-months .flatpickr-prev-month i,.flatpickr-months .flatpickr-next-month i{position:relative}.flatpickr-months .flatpickr-prev-month.flatpickr-prev-month,.flatpickr-months .flatpickr-next-month.flatpickr-prev-month{left:0;}.flatpickr-months .flatpickr-prev-month.flatpickr-next-month,.flatpickr-months .flatpickr-next-month.flatpickr-next-month{right:0;}.flatpickr-months .flatpickr-prev-month:hover,.flatpickr-months .flatpickr-next-month:hover{color:#959ea9}.flatpickr-months .flatpickr-prev-month:hover svg,.flatpickr-months .flatpickr-next-month:hover svg{fill:#f64747}.flatpickr-months .flatpickr-prev-month svg,.flatpickr-months .flatpickr-next-month svg{width:14px;height:14px}.flatpickr-months .flatpickr-prev-month svg path,.flatpickr-months .flatpickr-next-month svg path{-webkit-transition:fill 0.1s;transition:fill 0.1s;fill:inherit}.numInputWrapper{position:relative;height:auto}.numInputWrapper input,.numInputWrapper span{display:inline-block}.numInputWrapper input{width:100%}.numInputWrapper input::-ms-clear{display:none}.numInputWrapper input::-webkit-outer-spin-button,.numInputWrapper input::-webkit-inner-spin-button{margin:0;-webkit-appearance:none}.numInputWrapper span{position:absolute;right:0;width:14px;padding:0 4px 0 2px;height:50%;line-height:50%;opacity:0;cursor:pointer;border:1px solid rgba(57,57,57,0.15);-webkit-box-sizing:border-box;box-sizing:border-box}.numInputWrapper span:hover{background:rgba(0,0,0,0.1)}.numInputWrapper span:active{background:rgba(0,0,0,0.2)}.numInputWrapper span:after{display:block;content:\"\";position:absolute}.numInputWrapper span.arrowUp{top:0;border-bottom:0}.numInputWrapper span.arrowUp:after{border-left:4px solid transparent;border-right:4px solid transparent;border-bottom:4px solid rgba(57,57,57,0.6);top:26%}.numInputWrapper span.arrowDown{top:50%}.numInputWrapper span.arrowDown:after{border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid rgba(57,57,57,0.6);top:40%}.numInputWrapper span svg{width:inherit;height:auto}.numInputWrapper span svg path{fill:rgba(0,0,0,0.5)}.numInputWrapper:hover{background:rgba(0,0,0,0.05)}.numInputWrapper:hover span{opacity:1}.flatpickr-current-month{font-size:135%;line-height:inherit;font-weight:300;color:inherit;position:absolute;width:75%;left:12.5%;padding:7.48px 0 0 0;line-height:1;height:34px;display:inline-block;text-align:center;-webkit-transform:translate3d(0px, 0px, 0px);transform:translate3d(0px, 0px, 0px)}.flatpickr-current-month span.cur-month{font-family:inherit;font-weight:700;color:inherit;display:inline-block;margin-left:0.5ch;padding:0}.flatpickr-current-month span.cur-month:hover{background:rgba(0,0,0,0.05)}.flatpickr-current-month .numInputWrapper{width:6ch;width:7ch\\0;display:inline-block}.flatpickr-current-month .numInputWrapper span.arrowUp:after{border-bottom-color:rgba(0,0,0,0.9)}.flatpickr-current-month .numInputWrapper span.arrowDown:after{border-top-color:rgba(0,0,0,0.9)}.flatpickr-current-month input.cur-year{background:transparent;-webkit-box-sizing:border-box;box-sizing:border-box;color:inherit;cursor:text;padding:0 0 0 0.5ch;margin:0;display:inline-block;font-size:inherit;font-family:inherit;font-weight:300;line-height:inherit;height:auto;border:0;border-radius:0;vertical-align:initial;-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}.flatpickr-current-month input.cur-year:focus{outline:0}.flatpickr-current-month input.cur-year[disabled],.flatpickr-current-month input.cur-year[disabled]:hover{font-size:100%;color:rgba(0,0,0,0.5);background:transparent;pointer-events:none}.flatpickr-current-month .flatpickr-monthDropdown-months{appearance:menulist;background:transparent;border:none;border-radius:0;box-sizing:border-box;color:inherit;cursor:pointer;font-size:inherit;font-family:inherit;font-weight:300;height:auto;line-height:inherit;margin:-1px 0 0 0;outline:none;padding:0 0 0 0.5ch;position:relative;vertical-align:initial;-webkit-box-sizing:border-box;-webkit-appearance:menulist;-moz-appearance:menulist;width:auto}.flatpickr-current-month .flatpickr-monthDropdown-months:focus,.flatpickr-current-month .flatpickr-monthDropdown-months:active{outline:none}.flatpickr-current-month .flatpickr-monthDropdown-months:hover{background:rgba(0,0,0,0.05)}.flatpickr-current-month .flatpickr-monthDropdown-months .flatpickr-monthDropdown-month{background-color:transparent;outline:none;padding:0}.flatpickr-weekdays{background:transparent;text-align:center;overflow:hidden;width:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;height:28px}.flatpickr-weekdays .flatpickr-weekdaycontainer{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}span.flatpickr-weekday{cursor:default;font-size:90%;background:transparent;color:rgba(0,0,0,0.54);line-height:1;margin:0;text-align:center;display:block;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;font-weight:bolder}.dayContainer,.flatpickr-weeks{padding:1px 0 0 0}.flatpickr-days{position:relative;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:start;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start;width:307.875px}.flatpickr-days:focus{outline:0}.dayContainer{padding:0;outline:0;text-align:left;width:307.875px;min-width:307.875px;max-width:307.875px;-webkit-box-sizing:border-box;box-sizing:border-box;display:inline-block;display:-ms-flexbox;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-wrap:wrap;-ms-flex-pack:justify;-webkit-justify-content:space-around;justify-content:space-around;-webkit-transform:translate3d(0px, 0px, 0px);transform:translate3d(0px, 0px, 0px);opacity:1}.dayContainer+.dayContainer{-webkit-box-shadow:-1px 0 0 #e6e6e6;box-shadow:-1px 0 0 #e6e6e6}.flatpickr-day{background:none;border:1px solid transparent;border-radius:150px;-webkit-box-sizing:border-box;box-sizing:border-box;color:#393939;cursor:pointer;font-weight:400;width:14.2857143%;-webkit-flex-basis:14.2857143%;-ms-flex-preferred-size:14.2857143%;flex-basis:14.2857143%;max-width:39px;height:39px;line-height:39px;margin:0;display:inline-block;position:relative;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;text-align:center}.flatpickr-day.inRange,.flatpickr-day.prevMonthDay.inRange,.flatpickr-day.nextMonthDay.inRange,.flatpickr-day.today.inRange,.flatpickr-day.prevMonthDay.today.inRange,.flatpickr-day.nextMonthDay.today.inRange,.flatpickr-day:hover,.flatpickr-day.prevMonthDay:hover,.flatpickr-day.nextMonthDay:hover,.flatpickr-day:focus,.flatpickr-day.prevMonthDay:focus,.flatpickr-day.nextMonthDay:focus{cursor:pointer;outline:0;background:#e6e6e6;border-color:#e6e6e6}.flatpickr-day.today{border-color:#959ea9}.flatpickr-day.today:hover,.flatpickr-day.today:focus{border-color:#959ea9;background:#959ea9;color:#fff}.flatpickr-day.selected,.flatpickr-day.startRange,.flatpickr-day.endRange,.flatpickr-day.selected.inRange,.flatpickr-day.startRange.inRange,.flatpickr-day.endRange.inRange,.flatpickr-day.selected:focus,.flatpickr-day.startRange:focus,.flatpickr-day.endRange:focus,.flatpickr-day.selected:hover,.flatpickr-day.startRange:hover,.flatpickr-day.endRange:hover,.flatpickr-day.selected.prevMonthDay,.flatpickr-day.startRange.prevMonthDay,.flatpickr-day.endRange.prevMonthDay,.flatpickr-day.selected.nextMonthDay,.flatpickr-day.startRange.nextMonthDay,.flatpickr-day.endRange.nextMonthDay{background:#569ff7;-webkit-box-shadow:none;box-shadow:none;color:#fff;border-color:#569ff7}.flatpickr-day.selected.startRange,.flatpickr-day.startRange.startRange,.flatpickr-day.endRange.startRange{border-radius:50px 0 0 50px}.flatpickr-day.selected.endRange,.flatpickr-day.startRange.endRange,.flatpickr-day.endRange.endRange{border-radius:0 50px 50px 0}.flatpickr-day.selected.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.startRange.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.endRange.startRange+.endRange:not(:nth-child(7n+1)){-webkit-box-shadow:-10px 0 0 #569ff7;box-shadow:-10px 0 0 #569ff7}.flatpickr-day.selected.startRange.endRange,.flatpickr-day.startRange.startRange.endRange,.flatpickr-day.endRange.startRange.endRange{border-radius:50px}.flatpickr-day.inRange{border-radius:0;-webkit-box-shadow:-5px 0 0 #e6e6e6, 5px 0 0 #e6e6e6;box-shadow:-5px 0 0 #e6e6e6, 5px 0 0 #e6e6e6}.flatpickr-day.flatpickr-disabled,.flatpickr-day.flatpickr-disabled:hover,.flatpickr-day.prevMonthDay,.flatpickr-day.nextMonthDay,.flatpickr-day.notAllowed,.flatpickr-day.notAllowed.prevMonthDay,.flatpickr-day.notAllowed.nextMonthDay{color:rgba(57,57,57,0.3);background:transparent;border-color:transparent;cursor:default}.flatpickr-day.flatpickr-disabled,.flatpickr-day.flatpickr-disabled:hover{cursor:not-allowed;color:rgba(57,57,57,0.1)}.flatpickr-day.week.selected{border-radius:0;-webkit-box-shadow:-5px 0 0 #569ff7, 5px 0 0 #569ff7;box-shadow:-5px 0 0 #569ff7, 5px 0 0 #569ff7}.flatpickr-day.hidden{visibility:hidden}.rangeMode .flatpickr-day{margin-top:1px}.flatpickr-weekwrapper{float:left}.flatpickr-weekwrapper .flatpickr-weeks{padding:0 12px;-webkit-box-shadow:1px 0 0 #e6e6e6;box-shadow:1px 0 0 #e6e6e6}.flatpickr-weekwrapper .flatpickr-weekday{float:none;width:100%;line-height:28px}.flatpickr-weekwrapper span.flatpickr-day,.flatpickr-weekwrapper span.flatpickr-day:hover{display:block;width:100%;max-width:none;color:rgba(57,57,57,0.3);background:transparent;cursor:default;border:none}.flatpickr-innerContainer{display:block;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden}.flatpickr-rContainer{display:inline-block;padding:0;-webkit-box-sizing:border-box;box-sizing:border-box}.flatpickr-time{text-align:center;outline:0;display:block;height:0;line-height:40px;max-height:40px;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-time:after{content:\"\";display:table;clear:both}.flatpickr-time .numInputWrapper{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;width:40%;height:40px;float:left}.flatpickr-time .numInputWrapper span.arrowUp:after{border-bottom-color:#393939}.flatpickr-time .numInputWrapper span.arrowDown:after{border-top-color:#393939}.flatpickr-time.hasSeconds .numInputWrapper{width:26%}.flatpickr-time.time24hr .numInputWrapper{width:49%}.flatpickr-time input{background:transparent;-webkit-box-shadow:none;box-shadow:none;border:0;border-radius:0;text-align:center;margin:0;padding:0;height:inherit;line-height:inherit;color:#393939;font-size:14px;position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}.flatpickr-time input.flatpickr-hour{font-weight:bold}.flatpickr-time input.flatpickr-minute,.flatpickr-time input.flatpickr-second{font-weight:400}.flatpickr-time input:focus{outline:0;border:0}.flatpickr-time .flatpickr-time-separator,.flatpickr-time .flatpickr-am-pm{height:inherit;float:left;line-height:inherit;color:#393939;font-weight:bold;width:2%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-align-self:center;-ms-flex-item-align:center;align-self:center}.flatpickr-time .flatpickr-am-pm{outline:0;width:18%;cursor:pointer;text-align:center;font-weight:400}.flatpickr-time input:hover,.flatpickr-time .flatpickr-am-pm:hover,.flatpickr-time input:focus,.flatpickr-time .flatpickr-am-pm:focus{background:#eee}.flatpickr-input[readonly]{cursor:pointer}@-webkit-keyframes fpFadeInDown{from{opacity:0;-webkit-transform:translate3d(0, -20px, 0);transform:translate3d(0, -20px, 0)}to{opacity:1;-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0)}}@keyframes fpFadeInDown{from{opacity:0;-webkit-transform:translate3d(0, -20px, 0);transform:translate3d(0, -20px, 0)}to{opacity:1;-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0)}}.flatpickr-calendar{font-size:0.875rem;line-height:1.125rem;font-weight:var(--cat-font-weight-body, 400);box-shadow:0 4px 6px -2px rgba(27, 31, 38, 0.03), 0 12px 16px -4px rgba(27, 31, 38, 0.08);border-radius:var(--cat-border-radius-m, 0.25rem);border:1px solid rgb(var(--cat-border-color, 235, 236, 240));background:white;padding:1rem}.flatpickr-calendar:not(.inline).animate{transform:translateY(-1rem);opacity:0;transition:transform 125ms cubic-bezier(0.3, 0, 0.8, 0.15), opacity 125ms cubic-bezier(0.3, 0, 0.8, 0.15)}.flatpickr-calendar::before,.flatpickr-calendar::after{display:none}.flatpickr-calendar.inline,.flatpickr-calendar.open{display:flex;flex-direction:column;gap:1rem;width:auto !important}.flatpickr-calendar.inline{border:unset;padding:0}.flatpickr-calendar.open{z-index:calc(var(--cat-z-index, 1000) + 100);margin-top:0.75rem;margin-left:-0.75rem}.flatpickr-calendar.open.animate{opacity:1;transform:translateY(0);transition:transform 500ms cubic-bezier(0.05, 0.7, 0.1, 1), opacity 500ms cubic-bezier(0.05, 0.7, 0.1, 1)}.flatpickr-months{gap:0.25rem}.flatpickr-months .flatpickr-month{height:auto}.flatpickr-current-month{font-size:1.125rem;line-height:1.5rem;font-weight:var(--cat-font-weight-head, 600);font-feature-settings:\"pnum\";height:100%;padding:0;display:flex;position:static;width:auto;gap:0.25rem}.flatpickr-current-month .flatpickr-monthDropdown-months{padding:0 0.25rem;flex:1;margin:unset;font-weight:inherit;border-radius:var(--cat-border-radius-m, 0.25rem)}.flatpickr-current-month .flatpickr-monthDropdown-months:hover,.flatpickr-current-month .flatpickr-monthDropdown-months:focus-within{background-color:rgba(var(--cat-primary-bg, 0, 129, 148), 0.05)}.flatpickr-current-month input.cur-year{padding:0;font-weight:inherit;line-height:2.25rem}.flatpickr-current-month .numInputWrapper{width:7ch}.flatpickr-months .flatpickr-prev-month,.flatpickr-months .flatpickr-next-month{position:static;width:2.25rem;height:2.25rem;padding:0;align-items:center;display:flex;justify-content:center;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.flatpickr-months .flatpickr-prev-month:hover,.flatpickr-months .flatpickr-next-month:hover{color:rgb(var(--cat-font-color-base, 0, 0, 0))}.flatpickr-weekdays{height:2rem}.flatpickr-weekdays .flatpickr-weekday{color:rgb(var(--cat-font-color-muted, 81, 92, 108));font-size:0.75rem;line-height:1rem;font-weight:700}.flatpickr-weekwrapper .flatpickr-weekday{height:2rem}.flatpickr-weekwrapper .flatpickr-weeks{box-shadow:none;width:2rem;padding:0;margin-right:0.5rem;background:#f2f4f7;border-radius:var(--cat-border-radius-m, 0.25rem)}.flatpickr-weekwrapper span.flatpickr-day,.flatpickr-weekwrapper span.flatpickr-day:hover{font-size:0.75rem;line-height:1rem;font-weight:700;color:rgb(var(--cat-font-color-muted, 81, 92, 108));text-align:center;line-height:2.25rem}.flatpickr-days{width:15.75rem !important}.dayContainer{width:15.75rem;min-width:15.75rem;max-width:15.75rem}.flatpickr-day{color:rgb(var(--cat-font-color-base, 0, 0, 0));height:2.25rem;line-height:2.25rem;border:0;border-radius:var(--cat-border-radius-m, 0.25rem)}.flatpickr-day:hover{background-color:#f2f4f7;font-weight:700}.flatpickr-day.flatpickr-disabled,.flatpickr-day.flatpickr-disabled:hover{color:rgb(var(--cat-font-color-muted, 81, 92, 108));font-weight:inherit;background-color:inherit !important}.flatpickr-day.today{color:rgb(var(--cat-primary-text, 0, 129, 148));box-shadow:inset 0 0 0 2px rgb(var(--cat-primary-text, 0, 129, 148))}.flatpickr-day.today:hover,.flatpickr-day.today:focus{background-color:#f2f4f7;color:rgb(var(--cat-primary-text, 0, 129, 148))}.flatpickr-day.flatpickr-disabled,.flatpickr-day.flatpickr-disabled:hover,.flatpickr-day.prevMonthDay,.flatpickr-day.nextMonthDay,.flatpickr-day.notAllowed,.flatpickr-day.notAllowed.prevMonthDay,.flatpickr-day.notAllowed.nextMonthDay{color:rgba(var(--cat-font-color-muted, 81, 92, 108), 0.5)}.flatpickr-day.selected,.flatpickr-day.selected:hover,.flatpickr-day.selected:focus,.flatpickr-day.selected.inRange,.flatpickr-day.selected.nextMonthDay,.flatpickr-day.selected.prevMonthDay,.flatpickr-day.startRange,.flatpickr-day.startRange:hover,.flatpickr-day.startRange:focus,.flatpickr-day.startRange.inRange,.flatpickr-day.startRange.nextMonthDay,.flatpickr-day.startRange.prevMonthDay,.flatpickr-day.endRange,.flatpickr-day.endRange:hover,.flatpickr-day.endRange:focus,.flatpickr-day.endRange.inRange,.flatpickr-day.endRange.nextMonthDay,.flatpickr-day.endRange.prevMonthDay{font-weight:700;background-color:rgb(var(--cat-primary-bg, 0, 129, 148)) !important;color:rgb(var(--cat-primary-fill, 255, 255, 255)) !important}.flatpickr-day.inRange,.flatpickr-day.prevMonthDay.inRange,.flatpickr-day.nextMonthDay.inRange,.flatpickr-day.today.inRange,.flatpickr-day.prevMonthDay.today.inRange,.flatpickr-day.nextMonthDay.today.inRange,.flatpickr-day:hover,.flatpickr-day.prevMonthDay:hover,.flatpickr-day.nextMonthDay:hover,.flatpickr-day:focus,.flatpickr-day.prevMonthDay:focus,.flatpickr-day.nextMonthDay:focus{background-color:rgba(var(--cat-primary-bg, 0, 129, 148), 0.1)}.flatpickr-day.selected.startRange,.flatpickr-day.startRange.startRange,.flatpickr-day.endRange.startRange{border-top-left-radius:var(--cat-border-radius-m, 0.25rem);border-bottom-left-radius:var(--cat-border-radius-m, 0.25rem)}.flatpickr-day.selected.endRange,.flatpickr-day.startRange.endRange,.flatpickr-day.endRange.endRange{border-top-right-radius:var(--cat-border-radius-m, 0.25rem);border-bottom-right-radius:var(--cat-border-radius-m, 0.25rem)}.numInputWrapper{padding:0 1rem 0 0.5rem;border-radius:var(--cat-border-radius-m, 0.25rem)}.numInputWrapper:hover,.numInputWrapper:focus-within{background-color:rgba(var(--cat-primary-bg, 0, 129, 148), 0.05)}.numInputWrapper span{border:none;background:transparent;width:1rem;padding:0;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.numInputWrapper span.arrowUp::after{content:\"↑\";align-items:flex-end}.numInputWrapper span.arrowDown::after{content:\"↓\";align-items:flex-start}.numInputWrapper span::after{font-size:0.75rem;line-height:1rem;font-weight:700;position:static;border:0 !important;font-size:10px;display:flex;height:100%;justify-content:center}.numInputWrapper span:hover{color:rgb(var(--cat-font-color-base, 0, 0, 0));background:transparent}.flatpickr-calendar.hasTime .flatpickr-time{border:1px solid rgb(var(--cat-border-color, 235, 236, 240));border-radius:var(--cat-border-radius-m, 0.25rem);min-width:12rem;height:auto}.flatpickr-calendar.hasTime .flatpickr-time .numInputWrapper{height:2rem;padding:0;margin:0.25rem;display:flex}.flatpickr-calendar.hasTime.noCalendar{padding:0}.flatpickr-calendar.hasTime.noCalendar .flatpickr-time{border:none}.flatpickr-time .flatpickr-time-separator,.flatpickr-time .flatpickr-am-pm{margin:0 0.25rem;font-size:1.125rem;line-height:1.5rem;font-weight:400;font-feature-settings:\"pnum\";color:rgb(var(--cat-font-color-base, 0, 0, 0));line-height:2.25rem}.flatpickr-time .flatpickr-am-pm{width:25%;padding:0 0.5rem}.flatpickr-time .flatpickr-am-pm:hover,.flatpickr-time .flatpickr-am-pm:focus{border-radius:var(--cat-border-radius-m, 0.25rem);background-color:rgba(var(--cat-primary-bg, 0, 129, 148), 0.05)}.flatpickr-time{max-height:unset}.flatpickr-time input{background:transparent !important;color:rgb(var(--cat-font-color-base, 0, 0, 0));font-size:0.9375rem;line-height:2.25rem;font-family:inherit}.flatpickr-time input.flatpickr-hour{font-weight:inherit}.flatpickr-day.inRange:not(.today),.flatpickr-day.week.selected{box-shadow:none}.flatpickr-day.inRange:nth-child(7n+1),.flatpickr-day.week.selected:nth-child(7n+1){border-top-left-radius:var(--cat-border-radius-m, 0.25rem);border-bottom-left-radius:var(--cat-border-radius-m, 0.25rem)}.flatpickr-day.inRange:nth-child(7n+7),.flatpickr-day.week.selected:nth-child(7n+7){border-top-right-radius:var(--cat-border-radius-m, 0.25rem);border-bottom-right-radius:var(--cat-border-radius-m, 0.25rem)}.flatpickr-day.selected.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.startRange.startRange+.endRange:not(:nth-child(7n+1)),.flatpickr-day.endRange.startRange+.endRange:not(:nth-child(7n+1)){box-shadow:none}.flatpickr-day.selected.startRange.endRange,.flatpickr-day.startRange.startRange.endRange,.flatpickr-day.endRange.startRange.endRange{border-radius:var(--cat-border-radius-m, 0.25rem)}:host{display:inline-flex}:host>div{display:flex}:host([hidden]){display:none}.datepicker-disabled .flatpickr-days,.datepicker-disabled .flatpickr-time,.datepicker-readonly .flatpickr-days,.datepicker-readonly .flatpickr-time{pointer-events:none}.datepicker-disabled .flatpickr-days{opacity:0.75}.datepicker-disabled .flatpickr-time input,.datepicker-disabled .flatpickr-time .flatpickr-time-separator,.datepicker-disabled .flatpickr-time .flatpickr-am-pm{color:rgb(var(--cat-font-color-muted, 81, 92, 108));opacity:0.75}input{display:none}.flatpickr-calendar{box-shadow:unset;background:unset}";
|
|
6928
|
+
const CatDatepickerInlineStyle0 = catDatepickerInlineCss;
|
|
6706
6929
|
|
|
6707
|
-
|
|
6708
|
-
|
|
6709
|
-
|
|
6710
|
-
|
|
6711
|
-
|
|
6712
|
-
|
|
6713
|
-
|
|
6714
|
-
|
|
6715
|
-
|
|
6716
|
-
|
|
6717
|
-
|
|
6718
|
-
|
|
6719
|
-
|
|
6720
|
-
|
|
6721
|
-
|
|
6722
|
-
|
|
6723
|
-
|
|
6724
|
-
}
|
|
6725
|
-
|
|
6726
|
-
|
|
6727
|
-
|
|
6728
|
-
height = _node$getBoundingClie.height;
|
|
6729
|
-
return width === 0 && height === 0;
|
|
6730
|
-
};
|
|
6731
|
-
var isHidden = function isHidden(node, _ref) {
|
|
6732
|
-
var displayCheck = _ref.displayCheck,
|
|
6733
|
-
getShadowRoot = _ref.getShadowRoot;
|
|
6734
|
-
// NOTE: visibility will be `undefined` if node is detached from the document
|
|
6735
|
-
// (see notes about this further down), which means we will consider it visible
|
|
6736
|
-
// (this is legacy behavior from a very long way back)
|
|
6737
|
-
// NOTE: we check this regardless of `displayCheck="none"` because this is a
|
|
6738
|
-
// _visibility_ check, not a _display_ check
|
|
6739
|
-
if (getComputedStyle(node).visibility === 'hidden') {
|
|
6740
|
-
return true;
|
|
6741
|
-
}
|
|
6742
|
-
var isDirectSummary = matches.call(node, 'details>summary:first-of-type');
|
|
6743
|
-
var nodeUnderDetails = isDirectSummary ? node.parentElement : node;
|
|
6744
|
-
if (matches.call(nodeUnderDetails, 'details:not([open]) *')) {
|
|
6745
|
-
return true;
|
|
6746
|
-
}
|
|
6747
|
-
if (!displayCheck || displayCheck === 'full' || displayCheck === 'legacy-full') {
|
|
6748
|
-
if (typeof getShadowRoot === 'function') {
|
|
6749
|
-
// figure out if we should consider the node to be in an undisclosed shadow and use the
|
|
6750
|
-
// 'non-zero-area' fallback
|
|
6751
|
-
var originalNode = node;
|
|
6752
|
-
while (node) {
|
|
6753
|
-
var parentElement = node.parentElement;
|
|
6754
|
-
var rootNode = getRootNode(node);
|
|
6755
|
-
if (parentElement && !parentElement.shadowRoot && getShadowRoot(parentElement) === true // check if there's an undisclosed shadow
|
|
6756
|
-
) {
|
|
6757
|
-
// node has an undisclosed shadow which means we can only treat it as a black box, so we
|
|
6758
|
-
// fall back to a non-zero-area test
|
|
6759
|
-
return isZeroArea(node);
|
|
6760
|
-
} else if (node.assignedSlot) {
|
|
6761
|
-
// iterate up slot
|
|
6762
|
-
node = node.assignedSlot;
|
|
6763
|
-
} else if (!parentElement && rootNode !== node.ownerDocument) {
|
|
6764
|
-
// cross shadow boundary
|
|
6765
|
-
node = rootNode.host;
|
|
6766
|
-
} else {
|
|
6767
|
-
// iterate up normal dom
|
|
6768
|
-
node = parentElement;
|
|
6930
|
+
const CatDatepickerInline = class {
|
|
6931
|
+
constructor(hostRef) {
|
|
6932
|
+
index.registerInstance(this, hostRef);
|
|
6933
|
+
this.catChange = index.createEvent(this, "catChange", 7);
|
|
6934
|
+
this.disabled = false;
|
|
6935
|
+
this.max = undefined;
|
|
6936
|
+
this.min = undefined;
|
|
6937
|
+
this.mode = 'date';
|
|
6938
|
+
this.readonly = false;
|
|
6939
|
+
this.step = 5;
|
|
6940
|
+
this.value = undefined;
|
|
6941
|
+
this.nativePickerAttributes = undefined;
|
|
6942
|
+
}
|
|
6943
|
+
onValueChanged(value) {
|
|
6944
|
+
if (value) {
|
|
6945
|
+
this.pickr?.setDate(value, false);
|
|
6946
|
+
this.catChange.emit(value);
|
|
6947
|
+
}
|
|
6948
|
+
else {
|
|
6949
|
+
this.pickr?.clear(false);
|
|
6950
|
+
this.catChange.emit(undefined);
|
|
6769
6951
|
}
|
|
6770
|
-
}
|
|
6771
|
-
node = originalNode;
|
|
6772
6952
|
}
|
|
6773
|
-
|
|
6774
|
-
|
|
6775
|
-
|
|
6776
|
-
|
|
6777
|
-
|
|
6778
|
-
|
|
6779
|
-
|
|
6780
|
-
// NOTE: We must consider case where node is inside a shadow DOM and given directly to
|
|
6781
|
-
// `isTabbable()` or `isFocusable()` -- regardless of `getShadowRoot` option setting.
|
|
6782
|
-
|
|
6783
|
-
if (isNodeAttached(node)) {
|
|
6784
|
-
// this works wherever the node is: if there's at least one client rect, it's
|
|
6785
|
-
// somehow displayed; it also covers the CSS 'display: contents' case where the
|
|
6786
|
-
// node itself is hidden in place of its contents; and there's no need to search
|
|
6787
|
-
// up the hierarchy either
|
|
6788
|
-
return !node.getClientRects().length;
|
|
6953
|
+
onDisabledChanged() {
|
|
6954
|
+
// Dynamically unsetting 'enabled' value to undefined is not working due to
|
|
6955
|
+
// a bug in the library. We thus need to fully recreate the date picker
|
|
6956
|
+
// after the value has been updated.
|
|
6957
|
+
this.pickr?.destroy();
|
|
6958
|
+
this.pickr = undefined;
|
|
6959
|
+
setTimeout(() => (this.pickr = this.initDatepicker(this.input)));
|
|
6789
6960
|
}
|
|
6790
|
-
|
|
6791
|
-
|
|
6792
|
-
// API will __always__ return zero rects (this can happen, for example, if React
|
|
6793
|
-
// is used to render nodes onto a detached tree, as confirmed in this thread:
|
|
6794
|
-
// https://github.com/facebook/react/issues/9117#issuecomment-284228870)
|
|
6795
|
-
//
|
|
6796
|
-
// It also means that even window.getComputedStyle(node).display will return `undefined`
|
|
6797
|
-
// because styles are only computed for nodes that are in the document.
|
|
6798
|
-
//
|
|
6799
|
-
// NOTE: THIS HAS BEEN THE CASE FOR YEARS. It is not new, nor is it caused by tabbable
|
|
6800
|
-
// somehow. Though it was never stated officially, anyone who has ever used tabbable
|
|
6801
|
-
// APIs on nodes in detached containers has actually implicitly used tabbable in what
|
|
6802
|
-
// was later (as of v5.2.0 on Apr 9, 2021) called `displayCheck="none"` mode -- essentially
|
|
6803
|
-
// considering __everything__ to be visible because of the innability to determine styles.
|
|
6804
|
-
//
|
|
6805
|
-
// v6.0.0: As of this major release, the default 'full' option __no longer treats detached
|
|
6806
|
-
// nodes as visible with the 'none' fallback.__
|
|
6807
|
-
if (displayCheck !== 'legacy-full') {
|
|
6808
|
-
return true; // hidden
|
|
6961
|
+
componentDidLoad() {
|
|
6962
|
+
this.pickr = this.initDatepicker(this.input);
|
|
6809
6963
|
}
|
|
6810
|
-
|
|
6811
|
-
|
|
6812
|
-
|
|
6813
|
-
|
|
6814
|
-
|
|
6815
|
-
|
|
6816
|
-
|
|
6817
|
-
|
|
6818
|
-
|
|
6819
|
-
|
|
6820
|
-
// visible, as far as we can tell, or per current `displayCheck=none` mode, we assume
|
|
6821
|
-
// it's visible
|
|
6822
|
-
return false;
|
|
6823
|
-
};
|
|
6824
|
-
|
|
6825
|
-
// form fields (nested) inside a disabled fieldset are not focusable/tabbable
|
|
6826
|
-
// unless they are in the _first_ <legend> element of the top-most disabled
|
|
6827
|
-
// fieldset
|
|
6828
|
-
var isDisabledFromFieldset = function isDisabledFromFieldset(node) {
|
|
6829
|
-
if (/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(node.tagName)) {
|
|
6830
|
-
var parentNode = node.parentElement;
|
|
6831
|
-
// check if `node` is contained in a disabled <fieldset>
|
|
6832
|
-
while (parentNode) {
|
|
6833
|
-
if (parentNode.tagName === 'FIELDSET' && parentNode.disabled) {
|
|
6834
|
-
// look for the first <legend> among the children of the disabled <fieldset>
|
|
6835
|
-
for (var i = 0; i < parentNode.children.length; i++) {
|
|
6836
|
-
var child = parentNode.children.item(i);
|
|
6837
|
-
// when the first <legend> (in document order) is found
|
|
6838
|
-
if (child.tagName === 'LEGEND') {
|
|
6839
|
-
// if its parent <fieldset> is not nested in another disabled <fieldset>,
|
|
6840
|
-
// return whether `node` is a descendant of its first <legend>
|
|
6841
|
-
return matches.call(parentNode, 'fieldset[disabled] *') ? true : !child.contains(node);
|
|
6842
|
-
}
|
|
6964
|
+
render() {
|
|
6965
|
+
return (index.h(index.Host, { key: '251f0ff69d58d3833fbad2d503dae683d52fdc8b' }, index.h("div", { key: 'b4052b91932cf6a6431431dc5f443d2949362c69', tabIndex: this.disabled || this.readonly ? -1 : undefined, class: {
|
|
6966
|
+
'datepicker-wrapper': true,
|
|
6967
|
+
'datepicker-disabled': this.disabled,
|
|
6968
|
+
'datepicker-readonly': this.readonly
|
|
6969
|
+
} }, index.h("input", { key: 'cbe5f0252ba6835bf0503c6a4ecb27d6e0ebc4d9', ref: el => (this.input = el), value: this.value, disabled: this.disabled, readonly: this.readonly }))));
|
|
6970
|
+
}
|
|
6971
|
+
initDatepicker(input) {
|
|
6972
|
+
if (!input) {
|
|
6973
|
+
return;
|
|
6843
6974
|
}
|
|
6844
|
-
|
|
6845
|
-
|
|
6846
|
-
|
|
6847
|
-
|
|
6975
|
+
return flatpickr(input, getConfig({
|
|
6976
|
+
locale: getLocale$1(of.catI18nRegistry.getLocale()),
|
|
6977
|
+
format: getFormat(of.catI18nRegistry.getLocale(), this.mode),
|
|
6978
|
+
mode: this.mode,
|
|
6979
|
+
min: this.min,
|
|
6980
|
+
max: this.max,
|
|
6981
|
+
step: this.step,
|
|
6982
|
+
disabled: this.disabled,
|
|
6983
|
+
readonly: this.readonly,
|
|
6984
|
+
nativePickerAttributes: this.nativePickerAttributes ?? {},
|
|
6985
|
+
applyChange: value => (this.value = value)
|
|
6986
|
+
}, {
|
|
6987
|
+
...(this.disabled ? { enable: [] } : {}),
|
|
6988
|
+
inline: true
|
|
6989
|
+
}));
|
|
6848
6990
|
}
|
|
6849
|
-
|
|
6850
|
-
|
|
6851
|
-
|
|
6852
|
-
|
|
6853
|
-
|
|
6854
|
-
};
|
|
6855
|
-
var isNodeMatchingSelectorFocusable = function isNodeMatchingSelectorFocusable(options, node) {
|
|
6856
|
-
if (node.disabled ||
|
|
6857
|
-
// we must do an inert look up to filter out any elements inside an inert ancestor
|
|
6858
|
-
// because we're limited in the type of selectors we can use in JSDom (see related
|
|
6859
|
-
// note related to `candidateSelectors`)
|
|
6860
|
-
isInert(node) || isHiddenInput(node) || isHidden(node, options) ||
|
|
6861
|
-
// For a details element with a summary, the summary element gets the focus
|
|
6862
|
-
isDetailsWithSummary(node) || isDisabledFromFieldset(node)) {
|
|
6863
|
-
return false;
|
|
6864
|
-
}
|
|
6865
|
-
return true;
|
|
6866
|
-
};
|
|
6867
|
-
var isNodeMatchingSelectorTabbable = function isNodeMatchingSelectorTabbable(options, node) {
|
|
6868
|
-
if (isNonTabbableRadio(node) || getTabIndex(node) < 0 || !isNodeMatchingSelectorFocusable(options, node)) {
|
|
6869
|
-
return false;
|
|
6870
|
-
}
|
|
6871
|
-
return true;
|
|
6872
|
-
};
|
|
6873
|
-
var isValidShadowRootTabbable = function isValidShadowRootTabbable(shadowHostNode) {
|
|
6874
|
-
var tabIndex = parseInt(shadowHostNode.getAttribute('tabindex'), 10);
|
|
6875
|
-
if (isNaN(tabIndex) || tabIndex >= 0) {
|
|
6876
|
-
return true;
|
|
6877
|
-
}
|
|
6878
|
-
// If a custom element has an explicit negative tabindex,
|
|
6879
|
-
// browsers will not allow tab targeting said element's children.
|
|
6880
|
-
return false;
|
|
6991
|
+
static get watchers() { return {
|
|
6992
|
+
"value": ["onValueChanged"],
|
|
6993
|
+
"disabled": ["onDisabledChanged"],
|
|
6994
|
+
"readonly": ["onDisabledChanged"]
|
|
6995
|
+
}; }
|
|
6881
6996
|
};
|
|
6997
|
+
CatDatepickerInline.style = CatDatepickerInlineStyle0;
|
|
6882
6998
|
|
|
6883
6999
|
/**
|
|
6884
|
-
*
|
|
6885
|
-
* @returns Element[]
|
|
7000
|
+
* Auto-generated file. Do not edit directly.
|
|
6886
7001
|
*/
|
|
6887
|
-
|
|
6888
|
-
var regularTabbables = [];
|
|
6889
|
-
var orderedTabbables = [];
|
|
6890
|
-
candidates.forEach(function (item, i) {
|
|
6891
|
-
var isScope = !!item.scopeParent;
|
|
6892
|
-
var element = isScope ? item.scopeParent : item;
|
|
6893
|
-
var candidateTabindex = getSortOrderTabIndex(element, isScope);
|
|
6894
|
-
var elements = isScope ? sortByOrder(item.candidates) : element;
|
|
6895
|
-
if (candidateTabindex === 0) {
|
|
6896
|
-
isScope ? regularTabbables.push.apply(regularTabbables, elements) : regularTabbables.push(element);
|
|
6897
|
-
} else {
|
|
6898
|
-
orderedTabbables.push({
|
|
6899
|
-
documentOrder: i,
|
|
6900
|
-
tabIndex: candidateTabindex,
|
|
6901
|
-
item: item,
|
|
6902
|
-
isScope: isScope,
|
|
6903
|
-
content: elements
|
|
6904
|
-
});
|
|
6905
|
-
}
|
|
6906
|
-
});
|
|
6907
|
-
return orderedTabbables.sort(sortOrderedTabbables).reduce(function (acc, sortable) {
|
|
6908
|
-
sortable.isScope ? acc.push.apply(acc, sortable.content) : acc.push(sortable.content);
|
|
6909
|
-
return acc;
|
|
6910
|
-
}, []).concat(regularTabbables);
|
|
6911
|
-
};
|
|
6912
|
-
var tabbable = function tabbable(container, options) {
|
|
6913
|
-
options = options || {};
|
|
6914
|
-
var candidates;
|
|
6915
|
-
if (options.getShadowRoot) {
|
|
6916
|
-
candidates = getCandidatesIteratively([container], options.includeContainer, {
|
|
6917
|
-
filter: isNodeMatchingSelectorTabbable.bind(null, options),
|
|
6918
|
-
flatten: false,
|
|
6919
|
-
getShadowRoot: options.getShadowRoot,
|
|
6920
|
-
shadowRootFilter: isValidShadowRootTabbable
|
|
6921
|
-
});
|
|
6922
|
-
} else {
|
|
6923
|
-
candidates = getCandidates(container, options.includeContainer, isNodeMatchingSelectorTabbable.bind(null, options));
|
|
6924
|
-
}
|
|
6925
|
-
return sortByOrder(candidates);
|
|
6926
|
-
};
|
|
6927
|
-
var focusable = function focusable(container, options) {
|
|
6928
|
-
options = options || {};
|
|
6929
|
-
var candidates;
|
|
6930
|
-
if (options.getShadowRoot) {
|
|
6931
|
-
candidates = getCandidatesIteratively([container], options.includeContainer, {
|
|
6932
|
-
filter: isNodeMatchingSelectorFocusable.bind(null, options),
|
|
6933
|
-
flatten: true,
|
|
6934
|
-
getShadowRoot: options.getShadowRoot
|
|
6935
|
-
});
|
|
6936
|
-
} else {
|
|
6937
|
-
candidates = getCandidates(container, options.includeContainer, isNodeMatchingSelectorFocusable.bind(null, options));
|
|
6938
|
-
}
|
|
6939
|
-
return candidates;
|
|
6940
|
-
};
|
|
6941
|
-
var isTabbable = function isTabbable(node, options) {
|
|
6942
|
-
options = options || {};
|
|
6943
|
-
if (!node) {
|
|
6944
|
-
throw new Error('No node provided');
|
|
6945
|
-
}
|
|
6946
|
-
if (matches.call(node, candidateSelector) === false) {
|
|
6947
|
-
return false;
|
|
6948
|
-
}
|
|
6949
|
-
return isNodeMatchingSelectorTabbable(options, node);
|
|
6950
|
-
};
|
|
6951
|
-
var focusableCandidateSelector = /* #__PURE__ */candidateSelectors.concat('iframe').join(',');
|
|
6952
|
-
var isFocusable = function isFocusable(node, options) {
|
|
6953
|
-
options = options || {};
|
|
6954
|
-
if (!node) {
|
|
6955
|
-
throw new Error('No node provided');
|
|
6956
|
-
}
|
|
6957
|
-
if (matches.call(node, focusableCandidateSelector) === false) {
|
|
6958
|
-
return false;
|
|
6959
|
-
}
|
|
6960
|
-
return isNodeMatchingSelectorFocusable(options, node);
|
|
6961
|
-
};
|
|
7002
|
+
const timeTransitionS = 125;
|
|
6962
7003
|
|
|
6963
7004
|
/*!
|
|
6964
7005
|
* focus-trap 7.5.4
|
|
@@ -7895,10 +7936,6 @@ var createFocusTrap = function createFocusTrap(elements, userOptions) {
|
|
|
7895
7936
|
return trap;
|
|
7896
7937
|
};
|
|
7897
7938
|
|
|
7898
|
-
const firstTabbable = (container) => {
|
|
7899
|
-
return (container ? tabbable(container, { includeContainer: true, getShadowRoot: true }) : []).shift();
|
|
7900
|
-
};
|
|
7901
|
-
|
|
7902
7939
|
const catDropdownCss = ":host{display:contents}:host([hidden]){display:none}::slotted(nav){padding:0.25rem;min-width:8rem;max-width:16rem}.content{position:fixed;background:white;-webkit-overflow-scrolling:touch;min-height:2rem;max-height:calc(100vh - 48px);box-shadow:0 4px 6px -2px rgba(27, 31, 38, 0.03), 0 12px 16px -4px rgba(27, 31, 38, 0.08);border-radius:var(--cat-border-radius-m, 0.25rem);border:1px solid rgb(var(--cat-border-color, 235, 236, 240));z-index:calc(var(--cat-z-index, 1000) + 100);display:none;opacity:0;transform:scale(0.9);transition:transform 125ms cubic-bezier(0.3, 0, 0.8, 0.15), opacity 125ms cubic-bezier(0.3, 0, 0.8, 0.15)}.content[data-placement^=top]{transform-origin:bottom}.content[data-placement^=top-start]{transform-origin:bottom left}.content[data-placement^=top-end]{transform-origin:bottom right}.content[data-placement^=left]{transform-origin:right}.content[data-placement^=left-start]{transform-origin:right top}.content[data-placement^=left-end]{transform-origin:right bottom}.content[data-placement^=right]{transform-origin:left}.content[data-placement^=right-start]{transform-origin:left top}.content[data-placement^=right-end]{transform-origin:left bottom}.content[data-placement^=bottom]{transform-origin:top}.content[data-placement^=bottom-start]{transform-origin:top left}.content[data-placement^=bottom-end]{transform-origin:top right}.content.show{opacity:1;transform:scale(1);transition:transform 250ms cubic-bezier(0.05, 0.7, 0.1, 1), opacity 250ms cubic-bezier(0.05, 0.7, 0.1, 1)}.content.overflow-auto{overflow:auto}";
|
|
7903
7940
|
const CatDropdownStyle0 = catDropdownCss;
|
|
7904
7941
|
|
|
@@ -8016,7 +8053,7 @@ const CatDropdown = class {
|
|
|
8016
8053
|
}, timeTransitionS);
|
|
8017
8054
|
}
|
|
8018
8055
|
render() {
|
|
8019
|
-
return (index.h(index.Host, { key: '
|
|
8056
|
+
return (index.h(index.Host, { key: 'd22c561b36b7beac2e0daec86f48e898375298ec' }, index.h("slot", { key: '5244cb2c2243f534615ea8f63e6c041650015b9d', name: "trigger", ref: el => (this.triggerSlot = el) }), index.h("div", { key: '74178de3565eed589167446ab7c13db9be8e62b2', id: this.contentId, class: { content: true, 'overflow-auto': !this.overflow }, ref: el => (this.content = el) }, index.h("slot", { key: 'f6d723898d2bd06e9404cc3467999c8f0e611cc3', name: "content" }))));
|
|
8020
8057
|
}
|
|
8021
8058
|
get contentId() {
|
|
8022
8059
|
return `cat-dropdown-${this.id}`;
|
|
@@ -8102,7 +8139,7 @@ const CatFormGroup = class {
|
|
|
8102
8139
|
});
|
|
8103
8140
|
}
|
|
8104
8141
|
render() {
|
|
8105
|
-
return (index.h(index.Host, { key: '
|
|
8142
|
+
return (index.h(index.Host, { key: 'd09b529818df935bbd52a20f554ce518f2516f1a', style: { '--label-size': this.labelSize } }, index.h("slot", { key: '816908550a4e3510a24dbe4ec519d217b07ea374', onSlotchange: this.onSlotChange.bind(this) })));
|
|
8106
8143
|
}
|
|
8107
8144
|
onSlotChange() {
|
|
8108
8145
|
this.formElements = Array.from(this.hostElement.querySelectorAll('cat-input, cat-textarea, cat-select, cat-datepicker'));
|
|
@@ -8134,7 +8171,7 @@ const CatIcon = class {
|
|
|
8134
8171
|
this.a11yLabel = undefined;
|
|
8135
8172
|
}
|
|
8136
8173
|
render() {
|
|
8137
|
-
return (index.h("span", { key: '
|
|
8174
|
+
return (index.h("span", { key: 'c7d1fa22eb4854a8782b0afec24ad0cb57fff4fd', innerHTML: this.iconSrc || (this.icon ? of.catIconRegistry.getIcon(this.icon) : ''), "aria-label": this.a11yLabel, "aria-hidden": this.a11yLabel ? null : 'true', part: "icon", class: {
|
|
8138
8175
|
icon: true,
|
|
8139
8176
|
[`icon-${this.size}`]: this.size !== 'inline'
|
|
8140
8177
|
} }));
|
|
@@ -9710,7 +9747,7 @@ function isNumberValue(value) {
|
|
|
9710
9747
|
return !isNaN(parseFloat(value)) && !isNaN(Number(value));
|
|
9711
9748
|
}
|
|
9712
9749
|
|
|
9713
|
-
const catInputCss = ".hint-wrapper{flex:0 1 auto;display:flex;gap:0.5rem}.hint-section{flex:1 1 auto;display:flex;flex-direction:column;gap:0.25rem;color:rgb(var(--cat-font-color-muted, 81, 92, 108));font-size:0.875rem;line-height:1.125rem}.hint-section .input-hint,.hint-section ::slotted([slot=hint]){margin:0 !important}.cat-bg-primary{background-color:rgb(var(--cat-primary-bg, 0, 129, 148)) !important;color:rgb(var(--cat-primary-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-primary-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-primary-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-primary-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-primary-hover{transition:background-color 125ms, color 125ms}.cat-bg-primary-hover:hover{background-color:rgb(var(--cat-primary-bg-hover, 1, 115, 132)) !important;color:rgb(var(--cat-primary-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-primary-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-primary-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-primary-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-primary,.cat-link-primary{color:rgb(var(--cat-primary-text, 0, 129, 148)) !important}.cat-link-primary,.cat-text-primary-hover{transition:color 125ms}.cat-link-primary:hover,.cat-text-primary-hover:hover{color:rgb(var(--cat-primary-text-hover, 1, 115, 132)) !important}.cat-link-primary:active,.cat-text-primary-hover:active{color:rgb(var(--cat-primary-text-active, 2, 99, 113)) !important}.cat-bg-primaryInverted{background-color:#93b4f2 !important;color:black !important;--cat-primary-text:0, 0, 0;--cat-primary-text-hover:0, 0, 0;--cat-primary-text-active:0, 0, 0;--cat-link-decoration:underline}.cat-bg-primaryInverted-hover{transition:background-color 125ms, color 125ms}.cat-bg-primaryInverted-hover:hover{background-color:#93b4f2 !important;color:black !important;--cat-primary-text:0, 0, 0;--cat-primary-text-hover:0, 0, 0;--cat-primary-text-active:0, 0, 0;--cat-link-decoration:underline}.cat-text-primaryInverted,.cat-link-primaryInverted{color:#93b4f2 !important}.cat-link-primaryInverted,.cat-text-primaryInverted-hover{transition:color 125ms}.cat-link-primaryInverted:hover,.cat-text-primaryInverted-hover:hover{color:#93b4f2 !important}.cat-link-primaryInverted:active,.cat-text-primaryInverted-hover:active{color:#93b4f2 !important}.cat-bg-secondary{background-color:rgb(var(--cat-secondary-bg, 105, 118, 135)) !important;color:rgb(var(--cat-secondary-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-secondary-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-secondary-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-secondary-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-secondary-hover{transition:background-color 125ms, color 125ms}.cat-bg-secondary-hover:hover{background-color:rgb(var(--cat-secondary-bg-hover, 105, 118, 135)) !important;color:rgb(var(--cat-secondary-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-secondary-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-secondary-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-secondary-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-secondary,.cat-link-secondary{color:rgb(var(--cat-secondary-text, 0, 0, 0)) !important}.cat-link-secondary,.cat-text-secondary-hover{transition:color 125ms}.cat-link-secondary:hover,.cat-text-secondary-hover:hover{color:rgb(var(--cat-secondary-text-hover, 0, 0, 0)) !important}.cat-link-secondary:active,.cat-text-secondary-hover:active{color:rgb(var(--cat-secondary-text-active, 0, 0, 0)) !important}.cat-bg-secondaryInverted{background-color:#697687 !important;color:black !important;--cat-primary-text:0, 0, 0;--cat-primary-text-hover:0, 0, 0;--cat-primary-text-active:0, 0, 0;--cat-link-decoration:underline}.cat-bg-secondaryInverted-hover{transition:background-color 125ms, color 125ms}.cat-bg-secondaryInverted-hover:hover{background-color:#697687 !important;color:black !important;--cat-primary-text:0, 0, 0;--cat-primary-text-hover:0, 0, 0;--cat-primary-text-active:0, 0, 0;--cat-link-decoration:underline}.cat-text-secondaryInverted,.cat-link-secondaryInverted{color:white !important}.cat-link-secondaryInverted,.cat-text-secondaryInverted-hover{transition:color 125ms}.cat-link-secondaryInverted:hover,.cat-text-secondaryInverted-hover:hover{color:white !important}.cat-link-secondaryInverted:active,.cat-text-secondaryInverted-hover:active{color:white !important}.cat-bg-info{background-color:rgb(var(--cat-info-bg, 0, 115, 230)) !important;color:rgb(var(--cat-info-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-info-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-info-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-info-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-info-hover{transition:background-color 125ms, color 125ms}.cat-bg-info-hover:hover{background-color:rgb(var(--cat-info-bg-hover, 0, 107, 227)) !important;color:rgb(var(--cat-info-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-info-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-info-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-info-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-info,.cat-link-info{color:rgb(var(--cat-info-text, 0, 115, 230)) !important}.cat-link-info,.cat-text-info-hover{transition:color 125ms}.cat-link-info:hover,.cat-text-info-hover:hover{color:rgb(var(--cat-info-text-hover, 0, 107, 227)) !important}.cat-link-info:active,.cat-text-info-hover:active{color:rgb(var(--cat-info-text-active, 0, 96, 223)) !important}.cat-bg-success{background-color:rgb(var(--cat-success-bg, 0, 132, 88)) !important;color:rgb(var(--cat-success-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-success-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-success-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-success-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-success-hover{transition:background-color 125ms, color 125ms}.cat-bg-success-hover:hover{background-color:rgb(var(--cat-success-bg-hover, 0, 117, 78)) !important;color:rgb(var(--cat-success-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-success-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-success-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-success-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-success,.cat-link-success{color:rgb(var(--cat-success-text, 0, 132, 88)) !important}.cat-link-success,.cat-text-success-hover{transition:color 125ms}.cat-link-success:hover,.cat-text-success-hover:hover{color:rgb(var(--cat-success-text-hover, 0, 117, 78)) !important}.cat-link-success:active,.cat-text-success-hover:active{color:rgb(var(--cat-success-text-active, 0, 105, 70)) !important}.cat-bg-warning{background-color:rgb(var(--cat-warning-bg, 255, 206, 128)) !important;color:rgb(var(--cat-warning-fill, 0, 0, 0)) !important;--cat-primary-text:var(--cat-warning-fill, 0, 0, 0);--cat-primary-text-hover:var(--cat-warning-fill-hover, 0, 0, 0);--cat-primary-text-active:var(--cat-warning-fill-active, 0, 0, 0);--cat-link-decoration:underline}.cat-bg-warning-hover{transition:background-color 125ms, color 125ms}.cat-bg-warning-hover:hover{background-color:rgb(var(--cat-warning-bg-hover, 255, 214, 148)) !important;color:rgb(var(--cat-warning-fill-hover, 0, 0, 0)) !important;--cat-primary-text:var(--cat-warning-fill, 0, 0, 0);--cat-primary-text-hover:var(--cat-warning-fill-hover, 0, 0, 0);--cat-primary-text-active:var(--cat-warning-fill-active, 0, 0, 0);--cat-link-decoration:underline}.cat-text-warning,.cat-link-warning{color:rgb(var(--cat-warning-text, 159, 97, 0)) !important}.cat-link-warning,.cat-text-warning-hover{transition:color 125ms}.cat-link-warning:hover,.cat-text-warning-hover:hover{color:rgb(var(--cat-warning-text-hover, 159, 97, 0)) !important}.cat-link-warning:active,.cat-text-warning-hover:active{color:rgb(var(--cat-warning-text-active, 159, 97, 0)) !important}.cat-bg-danger{background-color:rgb(var(--cat-danger-bg, 217, 52, 13)) !important;color:rgb(var(--cat-danger-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-danger-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-danger-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-danger-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-danger-hover{transition:background-color 125ms, color 125ms}.cat-bg-danger-hover:hover{background-color:rgb(var(--cat-danger-bg-hover, 194, 46, 11)) !important;color:rgb(var(--cat-danger-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-danger-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-danger-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-danger-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-danger,.cat-link-danger{color:rgb(var(--cat-danger-text, 217, 52, 13)) !important}.cat-link-danger,.cat-text-danger-hover{transition:color 125ms}.cat-link-danger:hover,.cat-text-danger-hover:hover{color:rgb(var(--cat-danger-text-hover, 194, 46, 11)) !important}.cat-link-danger:active,.cat-text-danger-hover:active{color:rgb(var(--cat-danger-text-active, 174, 42, 10)) !important}.cat-active{color:rgb(var(--cat-primary-text, 0, 129, 148)) !important}.cat-text-active{color:rgb(var(--cat-primary-text, 0, 129, 148)) !important}.cat-muted{color:rgb(var(--cat-font-color-muted, 81, 92, 108)) !important}.cat-text-muted{color:rgb(var(--cat-font-color-muted, 81, 92, 108)) !important}.cat-bg-muted{background-color:#f2f4f7 !important}.cat-text-reset{color:inherit !important}.cat-link-reset{color:inherit !important;text-decoration:inherit !important}.label{overflow:hidden;word-wrap:break-word;word-break:break-word}.input-field:not(.input-horizontal) .label-container.hidden,.textarea-field:not(.textarea-horizontal) .label-container.hidden,.select-field:not(.select-horizontal) .label-container.hidden{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.label-container{flex-basis:var(--label-size, 33.33%)}.label-container .label-wrapper{display:flex;gap:0.25rem}.label-metadata{display:flex;flex-shrink:0;flex-grow:1;justify-content:space-between;gap:0.25rem;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.label-optional,.label-character-count{display:inline-flex;align-items:center;max-height:1.25rem;font-size:0.75rem;line-height:1rem}.label-character-count{margin-left:auto}.input-horizontal .label-container.hidden label,.textarea-horizontal .label-container.hidden label,.select-horizontal .label-container.hidden label{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.input-horizontal .label-wrapper,.textarea-horizontal .label-wrapper,.select-horizontal .label-wrapper{flex-direction:column}.input-horizontal label,.textarea-horizontal label,.select-horizontal label{min-height:2.5rem;display:inline-flex;align-items:center}.input-horizontal .label-metadata,.textarea-horizontal .label-metadata,.select-horizontal .label-metadata{justify-content:flex-start}.input-horizontal .label-metadata .label-character-count,.textarea-horizontal .label-metadata .label-character-count,.select-horizontal .label-metadata .label-character-count{margin-left:0}:host{display:flex;font-size:0.9375rem;line-height:1.25rem}:host([hidden]){display:none}.input-field,.input-container{display:flex;flex-direction:column;gap:0.5rem;flex:1 1 auto}.input-field.input-horizontal{flex-direction:row;gap:1rem}.input-wrapper{flex:1 1 auto;display:flex;align-items:stretch;gap:0.75rem;padding:0 0.75rem;height:2.5rem;overflow:hidden;background:white;border-radius:var(--cat-border-radius-m, 0.25rem);box-shadow:inset 0 0 0 1px rgb(var(--border-color));transition:box-shadow 125ms linear;--border-color:var(--cat-border-color-dark, 215, 219, 224);}.input-wrapper.input-round{border-radius:10rem}.input-wrapper.input-readonly{pointer-events:none}.input-wrapper.input-disabled{background:#f2f4f7;cursor:not-allowed;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.input-wrapper:not(.input-disabled):hover{box-shadow:inset 0 0 0 1px rgb(var(--border-color)), 0 0 0 1px rgb(var(--border-color))}.input-wrapper:focus-within{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:-1px}.input-wrapper:focus-within:has(.clearable:focus){outline:none}.input-wrapper.input-invalid{--border-color:var(--cat-danger-bg, 217, 52, 13), 0.2}.input-wrapper:has(input:-webkit-autofill),.input-wrapper:has(input:-webkit-autofill):hover,.input-wrapper:has(input:-webkit-autofill):focus{background-color:#e8f0fe}.text-prefix,.text-suffix{display:inline-flex;align-items:center;-webkit-user-select:none;-ms-user-select:none;user-select:none;}.text-prefix{border-right:1px solid rgb(var(--cat-border-color-dark, 215, 219, 224));padding-right:0.75rem}.text-suffix{border-left:1px solid rgb(var(--cat-border-color-dark, 215, 219, 224));padding-left:0.75rem}.icon-prefix,.icon-suffix{align-self:center}.input-outer-wrapper{display:flex}.input-inner-wrapper{display:flex;align-items:center;position:relative;flex:1 1 auto}input{font:inherit;margin:0;padding:0;width:100%;min-width:0;border:none;outline:none;background:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.input-disabled input{cursor:not-allowed;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}input.has-clearable,input.has-toggle-password{padding-right:1.5rem}input.has-clearable.has-toggle-password{padding-right:3.5rem}input::placeholder{color:rgb(var(--cat-font-color-muted, 81, 92, 108))}input:-webkit-autofill,input:-webkit-autofill:hover,input:-webkit-autofill:focus{-webkit-box-shadow:0 0 0 9999px #e8f0fe inset}.clearable{position:absolute;top:calc(50% - 1rem);right:-0.5rem}.toggle-password{position:absolute;top:calc(50% - 1rem);right:-0.5rem}.has-clearable~.toggle-password{right:1.5rem}:host(.cat-date-input) .input-wrapper,:host(.cat-time-input) .input-wrapper{z-index:1;border-top-right-radius:0;border-bottom-right-radius:0}";
|
|
9750
|
+
const catInputCss = ".hint-wrapper{flex:0 1 auto;display:flex;gap:0.5rem}.hint-section{flex:1 1 auto;display:flex;flex-direction:column;gap:0.25rem;color:rgb(var(--cat-font-color-muted, 81, 92, 108));font-size:0.875rem;line-height:1.125rem}.hint-section .input-hint,.hint-section ::slotted([slot=hint]){margin:0 !important}.cat-bg-primary{background-color:rgb(var(--cat-primary-bg, 0, 129, 148)) !important;color:rgb(var(--cat-primary-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-primary-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-primary-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-primary-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-primary-hover{transition:background-color 125ms, color 125ms}.cat-bg-primary-hover:hover{background-color:rgb(var(--cat-primary-bg-hover, 1, 115, 132)) !important;color:rgb(var(--cat-primary-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-primary-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-primary-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-primary-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-primary,.cat-link-primary{color:rgb(var(--cat-primary-text, 0, 129, 148)) !important}.cat-link-primary,.cat-text-primary-hover{transition:color 125ms}.cat-link-primary:hover,.cat-text-primary-hover:hover{color:rgb(var(--cat-primary-text-hover, 1, 115, 132)) !important}.cat-link-primary:active,.cat-text-primary-hover:active{color:rgb(var(--cat-primary-text-active, 2, 99, 113)) !important}.cat-bg-primaryInverted{background-color:#93b4f2 !important;color:black !important;--cat-primary-text:0, 0, 0;--cat-primary-text-hover:0, 0, 0;--cat-primary-text-active:0, 0, 0;--cat-link-decoration:underline}.cat-bg-primaryInverted-hover{transition:background-color 125ms, color 125ms}.cat-bg-primaryInverted-hover:hover{background-color:#93b4f2 !important;color:black !important;--cat-primary-text:0, 0, 0;--cat-primary-text-hover:0, 0, 0;--cat-primary-text-active:0, 0, 0;--cat-link-decoration:underline}.cat-text-primaryInverted,.cat-link-primaryInverted{color:#93b4f2 !important}.cat-link-primaryInverted,.cat-text-primaryInverted-hover{transition:color 125ms}.cat-link-primaryInverted:hover,.cat-text-primaryInverted-hover:hover{color:#93b4f2 !important}.cat-link-primaryInverted:active,.cat-text-primaryInverted-hover:active{color:#93b4f2 !important}.cat-bg-secondary{background-color:rgb(var(--cat-secondary-bg, 105, 118, 135)) !important;color:rgb(var(--cat-secondary-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-secondary-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-secondary-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-secondary-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-secondary-hover{transition:background-color 125ms, color 125ms}.cat-bg-secondary-hover:hover{background-color:rgb(var(--cat-secondary-bg-hover, 105, 118, 135)) !important;color:rgb(var(--cat-secondary-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-secondary-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-secondary-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-secondary-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-secondary,.cat-link-secondary{color:rgb(var(--cat-secondary-text, 0, 0, 0)) !important}.cat-link-secondary,.cat-text-secondary-hover{transition:color 125ms}.cat-link-secondary:hover,.cat-text-secondary-hover:hover{color:rgb(var(--cat-secondary-text-hover, 0, 0, 0)) !important}.cat-link-secondary:active,.cat-text-secondary-hover:active{color:rgb(var(--cat-secondary-text-active, 0, 0, 0)) !important}.cat-bg-secondaryInverted{background-color:#697687 !important;color:black !important;--cat-primary-text:0, 0, 0;--cat-primary-text-hover:0, 0, 0;--cat-primary-text-active:0, 0, 0;--cat-link-decoration:underline}.cat-bg-secondaryInverted-hover{transition:background-color 125ms, color 125ms}.cat-bg-secondaryInverted-hover:hover{background-color:#697687 !important;color:black !important;--cat-primary-text:0, 0, 0;--cat-primary-text-hover:0, 0, 0;--cat-primary-text-active:0, 0, 0;--cat-link-decoration:underline}.cat-text-secondaryInverted,.cat-link-secondaryInverted{color:white !important}.cat-link-secondaryInverted,.cat-text-secondaryInverted-hover{transition:color 125ms}.cat-link-secondaryInverted:hover,.cat-text-secondaryInverted-hover:hover{color:white !important}.cat-link-secondaryInverted:active,.cat-text-secondaryInverted-hover:active{color:white !important}.cat-bg-info{background-color:rgb(var(--cat-info-bg, 0, 115, 230)) !important;color:rgb(var(--cat-info-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-info-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-info-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-info-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-info-hover{transition:background-color 125ms, color 125ms}.cat-bg-info-hover:hover{background-color:rgb(var(--cat-info-bg-hover, 0, 107, 227)) !important;color:rgb(var(--cat-info-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-info-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-info-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-info-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-info,.cat-link-info{color:rgb(var(--cat-info-text, 0, 115, 230)) !important}.cat-link-info,.cat-text-info-hover{transition:color 125ms}.cat-link-info:hover,.cat-text-info-hover:hover{color:rgb(var(--cat-info-text-hover, 0, 107, 227)) !important}.cat-link-info:active,.cat-text-info-hover:active{color:rgb(var(--cat-info-text-active, 0, 96, 223)) !important}.cat-bg-success{background-color:rgb(var(--cat-success-bg, 0, 132, 88)) !important;color:rgb(var(--cat-success-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-success-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-success-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-success-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-success-hover{transition:background-color 125ms, color 125ms}.cat-bg-success-hover:hover{background-color:rgb(var(--cat-success-bg-hover, 0, 117, 78)) !important;color:rgb(var(--cat-success-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-success-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-success-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-success-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-success,.cat-link-success{color:rgb(var(--cat-success-text, 0, 132, 88)) !important}.cat-link-success,.cat-text-success-hover{transition:color 125ms}.cat-link-success:hover,.cat-text-success-hover:hover{color:rgb(var(--cat-success-text-hover, 0, 117, 78)) !important}.cat-link-success:active,.cat-text-success-hover:active{color:rgb(var(--cat-success-text-active, 0, 105, 70)) !important}.cat-bg-warning{background-color:rgb(var(--cat-warning-bg, 255, 206, 128)) !important;color:rgb(var(--cat-warning-fill, 0, 0, 0)) !important;--cat-primary-text:var(--cat-warning-fill, 0, 0, 0);--cat-primary-text-hover:var(--cat-warning-fill-hover, 0, 0, 0);--cat-primary-text-active:var(--cat-warning-fill-active, 0, 0, 0);--cat-link-decoration:underline}.cat-bg-warning-hover{transition:background-color 125ms, color 125ms}.cat-bg-warning-hover:hover{background-color:rgb(var(--cat-warning-bg-hover, 255, 214, 148)) !important;color:rgb(var(--cat-warning-fill-hover, 0, 0, 0)) !important;--cat-primary-text:var(--cat-warning-fill, 0, 0, 0);--cat-primary-text-hover:var(--cat-warning-fill-hover, 0, 0, 0);--cat-primary-text-active:var(--cat-warning-fill-active, 0, 0, 0);--cat-link-decoration:underline}.cat-text-warning,.cat-link-warning{color:rgb(var(--cat-warning-text, 159, 97, 0)) !important}.cat-link-warning,.cat-text-warning-hover{transition:color 125ms}.cat-link-warning:hover,.cat-text-warning-hover:hover{color:rgb(var(--cat-warning-text-hover, 159, 97, 0)) !important}.cat-link-warning:active,.cat-text-warning-hover:active{color:rgb(var(--cat-warning-text-active, 159, 97, 0)) !important}.cat-bg-danger{background-color:rgb(var(--cat-danger-bg, 217, 52, 13)) !important;color:rgb(var(--cat-danger-fill, 255, 255, 255)) !important;--cat-primary-text:var(--cat-danger-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-danger-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-danger-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-bg-danger-hover{transition:background-color 125ms, color 125ms}.cat-bg-danger-hover:hover{background-color:rgb(var(--cat-danger-bg-hover, 194, 46, 11)) !important;color:rgb(var(--cat-danger-fill-hover, 255, 255, 255)) !important;--cat-primary-text:var(--cat-danger-fill, 255, 255, 255);--cat-primary-text-hover:var(--cat-danger-fill-hover, 255, 255, 255);--cat-primary-text-active:var(--cat-danger-fill-active, 255, 255, 255);--cat-link-decoration:underline}.cat-text-danger,.cat-link-danger{color:rgb(var(--cat-danger-text, 217, 52, 13)) !important}.cat-link-danger,.cat-text-danger-hover{transition:color 125ms}.cat-link-danger:hover,.cat-text-danger-hover:hover{color:rgb(var(--cat-danger-text-hover, 194, 46, 11)) !important}.cat-link-danger:active,.cat-text-danger-hover:active{color:rgb(var(--cat-danger-text-active, 174, 42, 10)) !important}.cat-active{color:rgb(var(--cat-primary-text, 0, 129, 148)) !important}.cat-text-active{color:rgb(var(--cat-primary-text, 0, 129, 148)) !important}.cat-muted{color:rgb(var(--cat-font-color-muted, 81, 92, 108)) !important}.cat-text-muted{color:rgb(var(--cat-font-color-muted, 81, 92, 108)) !important}.cat-bg-muted{background-color:#f2f4f7 !important}.cat-text-reset{color:inherit !important}.cat-link-reset{color:inherit !important;text-decoration:inherit !important}.label{overflow:hidden;word-wrap:break-word;word-break:break-word}.input-field:not(.input-horizontal) .label-container.hidden,.textarea-field:not(.textarea-horizontal) .label-container.hidden,.select-field:not(.select-horizontal) .label-container.hidden{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.label-container{flex-basis:var(--label-size, 33.33%)}.label-container .label-wrapper{display:flex;gap:0.25rem}.label-metadata{display:flex;flex-shrink:0;flex-grow:1;justify-content:space-between;gap:0.25rem;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.label-optional,.label-character-count{display:inline-flex;align-items:center;max-height:1.25rem;font-size:0.75rem;line-height:1rem}.label-character-count{margin-left:auto}.input-horizontal .label-container.hidden label,.textarea-horizontal .label-container.hidden label,.select-horizontal .label-container.hidden label{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border:0 !important}.input-horizontal .label-wrapper,.textarea-horizontal .label-wrapper,.select-horizontal .label-wrapper{flex-direction:column}.input-horizontal label,.textarea-horizontal label,.select-horizontal label{min-height:2.5rem;display:inline-flex;align-items:center}.input-horizontal .label-metadata,.textarea-horizontal .label-metadata,.select-horizontal .label-metadata{justify-content:flex-start}.input-horizontal .label-metadata .label-character-count,.textarea-horizontal .label-metadata .label-character-count,.select-horizontal .label-metadata .label-character-count{margin-left:0}:host{display:flex;font-size:0.9375rem;line-height:1.25rem}:host([hidden]){display:none}.input-field,.input-container{display:flex;flex-direction:column;gap:0.5rem;flex:1 1 auto}.input-field.input-horizontal{flex-direction:row;gap:1rem}.input-wrapper{flex:1 1 auto;display:flex;align-items:stretch;gap:0.75rem;padding:0 0.75rem;height:2.5rem;overflow:hidden;background:white;border-radius:var(--cat-border-radius-m, 0.25rem);box-shadow:inset 0 0 0 1px rgb(var(--border-color));transition:box-shadow 125ms linear;--border-color:var(--cat-border-color-dark, 215, 219, 224);}.input-wrapper.input-round{border-radius:10rem}.input-wrapper.input-readonly{pointer-events:none}.input-wrapper.input-disabled{background:#f2f4f7;cursor:not-allowed;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.input-wrapper:not(.input-disabled):hover{box-shadow:inset 0 0 0 1px rgb(var(--border-color)), 0 0 0 1px rgb(var(--border-color))}.input-wrapper:focus-within{outline:2px solid rgb(var(--cat-border-color-focus, 0, 113, 255));outline-offset:-1px}.input-wrapper:focus-within:has(.clearable:focus){outline:none}.input-wrapper.input-invalid{--border-color:var(--cat-danger-bg, 217, 52, 13), 0.2}.input-wrapper:has(input:-webkit-autofill),.input-wrapper:has(input:-webkit-autofill):hover,.input-wrapper:has(input:-webkit-autofill):focus{background-color:#e8f0fe}.text-prefix,.text-suffix{display:inline-flex;align-items:center;-webkit-user-select:none;-ms-user-select:none;user-select:none;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}.text-prefix{border-right:1px solid rgb(var(--cat-border-color-dark, 215, 219, 224));padding-right:0.75rem}.text-suffix{border-left:1px solid rgb(var(--cat-border-color-dark, 215, 219, 224));padding-left:0.75rem}.icon-prefix,.icon-suffix{align-self:center}.input-outer-wrapper{display:flex}.input-inner-wrapper{display:flex;align-items:center;position:relative;flex:1 1 auto}input{font:inherit;margin:0;padding:0;width:100%;min-width:0;border:none;outline:none;background:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.input-disabled input{cursor:not-allowed;color:rgb(var(--cat-font-color-muted, 81, 92, 108))}input.has-clearable,input.has-toggle-password{padding-right:1.5rem}input.has-clearable.has-toggle-password{padding-right:3.5rem}input::placeholder{color:rgb(var(--cat-font-color-muted, 81, 92, 108))}input:-webkit-autofill,input:-webkit-autofill:hover,input:-webkit-autofill:focus{-webkit-box-shadow:0 0 0 9999px #e8f0fe inset}.clearable{position:absolute;top:calc(50% - 1rem);right:-0.5rem}.toggle-password{position:absolute;top:calc(50% - 1rem);right:-0.5rem}.has-clearable~.toggle-password{right:1.5rem}:host(.cat-date-input) .input-wrapper,:host(.cat-time-input) .input-wrapper{z-index:1;border-top-right-radius:0;border-bottom-right-radius:0}";
|
|
9714
9751
|
const CatInputStyle0 = catInputCss;
|
|
9715
9752
|
|
|
9716
9753
|
let nextUniqueId$6 = 0;
|
|
@@ -9759,11 +9796,11 @@ const CatInput = class {
|
|
|
9759
9796
|
}
|
|
9760
9797
|
componentWillRender() {
|
|
9761
9798
|
this.onErrorsChanged(this.errors);
|
|
9762
|
-
this
|
|
9763
|
-
|
|
9764
|
-
|
|
9765
|
-
|
|
9766
|
-
}
|
|
9799
|
+
delayedAssertWarn(this, () => {
|
|
9800
|
+
this.hasSlottedLabel = !!this.hostElement.querySelector('[slot="label"]');
|
|
9801
|
+
this.hasSlottedHint = !!this.hostElement.querySelector('[slot="hint"]');
|
|
9802
|
+
return !!this.label && !!this.hasSlottedLabel;
|
|
9803
|
+
}, '[A11y] Missing ARIA label on input');
|
|
9767
9804
|
}
|
|
9768
9805
|
/**
|
|
9769
9806
|
* Programmatically move focus to the input. Use this method instead of
|
|
@@ -9815,19 +9852,19 @@ const CatInput = class {
|
|
|
9815
9852
|
}
|
|
9816
9853
|
}
|
|
9817
9854
|
render() {
|
|
9818
|
-
return (index.h("div", { key: '
|
|
9855
|
+
return (index.h("div", { key: 'bf148b681958c66189b6b27349bf1c52afc06d51', class: {
|
|
9819
9856
|
'input-field': true,
|
|
9820
9857
|
'input-horizontal': this.horizontal
|
|
9821
|
-
} }, index.h("div", { key: '
|
|
9858
|
+
} }, index.h("div", { key: '4c180a2e3ab780bb0283896e2229efb04a7e91fd', class: { 'label-container': true, hidden: this.labelHidden } }, (this.hasSlottedLabel || this.label) && (index.h("label", { htmlFor: this.id, part: "label" }, index.h("span", { class: "label-wrapper" }, (this.hasSlottedLabel && index.h("slot", { name: "label" })) || this.label, index.h("div", { class: "label-metadata" }, !this.required && (this.requiredMarker ?? 'optional').startsWith('optional') && (index.h("span", { class: "label-optional", "aria-hidden": "true" }, "(", of.catI18nRegistry.t('input.optional'), ")")), this.required && this.requiredMarker?.startsWith('required') && (index.h("span", { class: "label-optional", "aria-hidden": "true" }, "(", of.catI18nRegistry.t('input.required'), ")")), this.maxLength && (index.h("div", { class: "label-character-count", "aria-hidden": "true" }, this.value?.toString().length ?? 0, "/", this.maxLength))))))), index.h("div", { key: 'fef647ca2318937d25fa6ef45eb616a98e7b7400', class: "input-container" }, index.h("div", { key: '167a5c5ef453d565feccf2ffd3d4c2be7b1bbc6b', class: "input-outer-wrapper" }, index.h("div", { key: '7c127b6a6b7f47f1fc503f19b64b60f8b8abe1b0', class: {
|
|
9822
9859
|
'input-wrapper': true,
|
|
9823
9860
|
'input-round': this.round,
|
|
9824
9861
|
'input-readonly': this.readonly,
|
|
9825
9862
|
'input-disabled': this.disabled,
|
|
9826
9863
|
'input-invalid': this.invalid
|
|
9827
|
-
}, onClick: () => this.input.focus() }, this.textPrefix && (index.h("span", { class: "text-prefix", part: "prefix" }, this.textPrefix)), this.icon && !this.iconRight && (index.h("cat-icon", { icon: this.icon, class: "icon-prefix", size: "l", onClick: () => this.doFocus() })), index.h("div", { key: '
|
|
9864
|
+
}, onClick: () => this.input.focus() }, this.textPrefix && (index.h("span", { class: "text-prefix", part: "prefix" }, this.textPrefix)), this.icon && !this.iconRight && (index.h("cat-icon", { icon: this.icon, class: "icon-prefix", size: "l", onClick: () => this.doFocus() })), index.h("div", { key: '3a04efd1ecbaab9010e9e201354112d47edf12ab', class: "input-inner-wrapper" }, index.h("input", { key: '6f1b7e95344c3e2524e0e322cd263580d4751f2e', ...this.nativeAttributes, part: "input", ref: el => (this.input = el), id: this.id, class: {
|
|
9828
9865
|
'has-clearable': this.clearable && !this.disabled && !this.readonly && !!this.value,
|
|
9829
9866
|
'has-toggle-password': this.togglePassword && !this.disabled && !this.readonly && !!this.value
|
|
9830
|
-
}, autocomplete: this.autoComplete, disabled: this.disabled, max: this.max, maxlength: this.maxLength, min: this.min, minlength: this.minLength, name: this.name, placeholder: this.placeholder, readonly: this.readonly, required: this.required, type: this.isPasswordShown ? 'text' : this.type, value: this.value, onInput: this.onInput.bind(this), onFocus: this.onFocus.bind(this), onBlur: this.onBlur.bind(this), "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.hasHint ? this.id + '-hint' : undefined }), this.clearable && !this.disabled && !this.readonly && this.value && (index.h("cat-button", { class: "clearable", icon: "$cat:input-close", "icon-only": "true", size: "s", variant: "text", "a11y-label": of.catI18nRegistry.t('input.clear'), onClick: this.clear.bind(this), "data-dropdown-no-close": true })), this.togglePassword && !this.disabled && !this.readonly && this.value && (index.h("cat-button", { class: "toggle-password", icon: this.isPasswordShown ? '$cat:input-password-hide' : '$cat:input-password-show', "icon-only": "true", size: "s", variant: "text", "a11y-label": of.catI18nRegistry.t(this.isPasswordShown ? 'input.hidePassword' : 'input.showPassword'), onClick: this.doTogglePassword.bind(this) }))), !this.invalid && this.icon && this.iconRight && (index.h("cat-icon", { icon: this.icon, class: "icon-suffix", size: "l", onClick: () => this.doFocus() })), this.invalid && (index.h("cat-icon", { icon: "$cat:input-error", class: "icon-suffix cat-text-danger", size: "l" })), this.textSuffix && (index.h("span", { class: "text-suffix", part: "suffix" }, this.textSuffix))), index.h("slot", { key: '
|
|
9867
|
+
}, autocomplete: this.autoComplete, disabled: this.disabled, max: this.max, maxlength: this.maxLength, min: this.min, minlength: this.minLength, name: this.name, placeholder: this.placeholder, readonly: this.readonly, required: this.required, type: this.isPasswordShown ? 'text' : this.type, value: this.value, onInput: this.onInput.bind(this), onFocus: this.onFocus.bind(this), onBlur: this.onBlur.bind(this), "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.hasHint ? this.id + '-hint' : undefined }), this.clearable && !this.disabled && !this.readonly && this.value && (index.h("cat-button", { class: "clearable", icon: "$cat:input-close", "icon-only": "true", size: "s", variant: "text", "a11y-label": of.catI18nRegistry.t('input.clear'), onClick: this.clear.bind(this), "data-dropdown-no-close": true })), this.togglePassword && !this.disabled && !this.readonly && this.value && (index.h("cat-button", { class: "toggle-password", icon: this.isPasswordShown ? '$cat:input-password-hide' : '$cat:input-password-show', "icon-only": "true", size: "s", variant: "text", "a11y-label": of.catI18nRegistry.t(this.isPasswordShown ? 'input.hidePassword' : 'input.showPassword'), onClick: this.doTogglePassword.bind(this) }))), !this.invalid && this.icon && this.iconRight && (index.h("cat-icon", { icon: this.icon, class: "icon-suffix", size: "l", onClick: () => this.doFocus() })), this.invalid && (index.h("cat-icon", { icon: "$cat:input-error", class: "icon-suffix cat-text-danger", size: "l" })), this.textSuffix && (index.h("span", { class: "text-suffix", part: "suffix" }, this.textSuffix))), index.h("slot", { key: 'ded12cd59eba7a7c2c9ddb5058599c456305b9ec', name: "addon" })), this.hasHint && (index.h(CatFormHint, { id: this.id, hint: this.hint, slottedHint: this.hasSlottedHint && index.h("slot", { name: "hint" }), errorMap: this.errorMap })))));
|
|
9831
9868
|
}
|
|
9832
9869
|
get hasHint() {
|
|
9833
9870
|
return !!this.hint || !!this.hasSlottedHint || this.invalid;
|
|
@@ -9905,9 +9942,9 @@ const CatPagination = class {
|
|
|
9905
9942
|
this.iconNext = '$cat:pagination-right';
|
|
9906
9943
|
}
|
|
9907
9944
|
render() {
|
|
9908
|
-
return (index.h("nav", { key: '
|
|
9945
|
+
return (index.h("nav", { key: 'eb37b23f9aa777218dc49611d7caa0d96f6a33e9', role: "navigation" }, index.h("ol", { key: '2ad69648c3611ffd9b0e6d5fe9d0849242c301ec', class: {
|
|
9909
9946
|
[`cat-pagination-${this.size}`]: Boolean(this.size)
|
|
9910
|
-
} }, index.h("li", { key: '
|
|
9947
|
+
} }, index.h("li", { key: '4712af901e5dfca84035b494289404534728e02d' }, index.h("cat-button", { key: '2fb342cccece59890486f68bfb90d30dadada3df', variant: this.variant, size: this.size, round: this.round, disabled: this.isFirst, a11yLabel: of.catI18nRegistry.t('pagination.prev'), icon: this.iconPrev, iconOnly: true, onClick: () => this.setPage(this.page - 1) })), this.content, index.h("li", { key: 'fb301d419816ce20200a342e7b965f213a841b4f' }, index.h("cat-button", { key: 'de83ad6cc01a3c04979868daa30d3fe2b30691f7', variant: this.variant, size: this.size, round: this.round, disabled: this.isLast, a11yLabel: of.catI18nRegistry.t('pagination.next'), icon: this.iconNext, iconOnly: true, onClick: () => this.setPage(this.page + 1) })))));
|
|
9911
9948
|
}
|
|
9912
9949
|
get isFirst() {
|
|
9913
9950
|
return this.page === 0;
|
|
@@ -9988,11 +10025,11 @@ const CatRadio = class {
|
|
|
9988
10025
|
return this.identifier || this._id;
|
|
9989
10026
|
}
|
|
9990
10027
|
componentWillRender() {
|
|
9991
|
-
this
|
|
9992
|
-
|
|
9993
|
-
|
|
9994
|
-
|
|
9995
|
-
}
|
|
10028
|
+
delayedAssertWarn(this, () => {
|
|
10029
|
+
this.hasSlottedLabel = !!this.hostElement.querySelector('[slot="label"]');
|
|
10030
|
+
this.hasSlottedHint = !!this.hostElement.querySelector('[slot="hint"]');
|
|
10031
|
+
return !!this.label && !!this.hasSlottedLabel;
|
|
10032
|
+
}, '[A11y] Missing ARIA label on radio');
|
|
9996
10033
|
}
|
|
9997
10034
|
/**
|
|
9998
10035
|
* Programmatically move focus to the radio button. Use this method instead of
|
|
@@ -10012,7 +10049,7 @@ const CatRadio = class {
|
|
|
10012
10049
|
this.input.blur();
|
|
10013
10050
|
}
|
|
10014
10051
|
render() {
|
|
10015
|
-
return (index.h(index.Host, { key: '
|
|
10052
|
+
return (index.h(index.Host, { key: '45e4e40bbfc7e7eff811abd9c38c15cdcc3bc343' }, index.h("label", { key: '0f7bd3d6fd7d3934d4522ef193867f3a42bea6a3', htmlFor: this.id, class: { 'is-hidden': this.labelHidden, 'is-disabled': this.disabled, 'label-left': this.labelLeft }, role: "radio", "aria-checked": this.checked ? 'true' : 'false' }, index.h("span", { key: 'ea7ae02afc5933a4afd6da7802edd912a0cb2f27', class: "radio" }, index.h("input", { key: '45c7d74302e3bba1c60f5cca1452ae4ef80cf433', ...this.nativeAttributes, part: "input", ref: el => (this.input = el), id: this.identifier || this.id, type: "radio", name: this.name, value: this.value, checked: this.checked, required: this.required, disabled: this.disabled, onInput: this.onInput.bind(this), onFocus: this.onFocus.bind(this), onBlur: this.onBlur.bind(this), "aria-describedby": this.hasHint ? this.id + '-hint' : undefined }), index.h("span", { key: '4a3cef57d849b2fc2cbae889662f834f20e6ff23', class: "circle" })), index.h("span", { key: '0c0a10a67967bbc42cc791677724145f5f28e259', class: "label", part: "label" }, (this.hasSlottedLabel && index.h("slot", { name: "label" })) || this.label)), this.hasHint && (index.h("div", { class: { 'hint-wrapper': true, 'label-left': this.labelLeft } }, index.h("div", { class: "circle-placeholder" }), index.h(CatFormHint, { id: this.id, hint: this.hint, slottedHint: this.hasSlottedHint && index.h("slot", { name: "hint" }) })))));
|
|
10016
10053
|
}
|
|
10017
10054
|
get hasHint() {
|
|
10018
10055
|
return !!this.hint || !!this.hasSlottedHint;
|
|
@@ -10103,7 +10140,7 @@ const CatRadioGroup = class {
|
|
|
10103
10140
|
}
|
|
10104
10141
|
}
|
|
10105
10142
|
render() {
|
|
10106
|
-
return (index.h("div", { key: '
|
|
10143
|
+
return (index.h("div", { key: 'e102897a96e3d8bf899e72d3d6affcd8c2749d1c', role: "radiogroup", "aria-label": this.a11yLabel }, index.h("slot", { key: '99dfc01256f4df37bca96985a0214e3bc4ed4a5c' })));
|
|
10107
10144
|
}
|
|
10108
10145
|
init() {
|
|
10109
10146
|
this.catRadioGroup = Array.from(this.hostElement.querySelectorAll(`cat-radio`));
|
|
@@ -10192,13 +10229,13 @@ const CatScrollable = class {
|
|
|
10192
10229
|
}
|
|
10193
10230
|
render() {
|
|
10194
10231
|
return [
|
|
10195
|
-
index.h("div", { key: '
|
|
10196
|
-
index.h("div", { key: '
|
|
10232
|
+
index.h("div", { key: 'e2c7d4c0bb56961b4e1a0499918de4051639cc3f', class: "scrollable-wrapper", ref: el => (this.scrollWrapperElement = el) }, !this.noShadowY && index.h("div", { class: "shadow-top" }), !this.noShadowX && index.h("div", { class: "shadow-left" }), !this.noShadowX && index.h("div", { class: "shadow-right" }), !this.noShadowY && index.h("div", { class: "shadow-bottom" })),
|
|
10233
|
+
index.h("div", { key: '11c286f71658edb4b9a1b6540043c38aee98d480', ref: el => (this.scrollElement = el), class: {
|
|
10197
10234
|
'scrollable-content': true,
|
|
10198
10235
|
'scroll-x': !this.noOverflowX,
|
|
10199
10236
|
'scroll-y': !this.noOverflowY,
|
|
10200
10237
|
'no-overscroll': this.noOverscroll
|
|
10201
|
-
} }, index.h("slot", { key: '
|
|
10238
|
+
} }, index.h("slot", { key: '53628fde1cbdd4ddc54cd6d1e373d9037339065a' }))
|
|
10202
10239
|
];
|
|
10203
10240
|
}
|
|
10204
10241
|
attachEmitter(from, emitter) {
|
|
@@ -10451,11 +10488,11 @@ const CatSelect = class {
|
|
|
10451
10488
|
}
|
|
10452
10489
|
componentWillRender() {
|
|
10453
10490
|
this.onErrorsChanged(this.errors);
|
|
10454
|
-
this
|
|
10455
|
-
|
|
10456
|
-
|
|
10457
|
-
|
|
10458
|
-
}
|
|
10491
|
+
delayedAssertWarn(this, () => {
|
|
10492
|
+
this.hasSlottedLabel = !!this.hostElement.querySelector('[slot="label"]');
|
|
10493
|
+
this.hasSlottedHint = !!this.hostElement.querySelector('[slot="hint"]');
|
|
10494
|
+
return !!this.label && !!this.hasSlottedLabel;
|
|
10495
|
+
}, '[A11y] Missing ARIA label on select');
|
|
10459
10496
|
}
|
|
10460
10497
|
onBlur(event) {
|
|
10461
10498
|
if (!this.multiple && this.state.activeOptionIndex >= 0) {
|
|
@@ -10638,18 +10675,18 @@ const CatSelect = class {
|
|
|
10638
10675
|
});
|
|
10639
10676
|
}
|
|
10640
10677
|
render() {
|
|
10641
|
-
return (index.h(index.Host, { key: '
|
|
10678
|
+
return (index.h(index.Host, { key: '8a8f824eb117b03a77bba6ccfa85ff9fc98d5383' }, index.h("div", { key: '51e878d20952cc8a1339fac80dac177f50db6e2b', class: {
|
|
10642
10679
|
'select-field': true,
|
|
10643
10680
|
'select-horizontal': this.horizontal,
|
|
10644
10681
|
'select-multiple': this.multiple
|
|
10645
|
-
} }, index.h("div", { key: '
|
|
10682
|
+
} }, index.h("div", { key: 'df913810e1370eed34c9de768d88f904442c99c2', class: { 'label-container': true, hidden: this.labelHidden } }, (this.hasSlottedLabel || this.label) && (index.h("label", { htmlFor: `select-${this.id}-input`, part: "label" }, index.h("span", { class: "label-wrapper" }, (this.hasSlottedLabel && index.h("slot", { name: "label" })) || this.label, index.h("div", { class: "label-metadata" }, !this.required && (this.requiredMarker ?? 'optional').startsWith('optional') && (index.h("span", { class: "label-optional", "aria-hidden": "true" }, "(", of.catI18nRegistry.t('input.optional'), ")")), this.required && this.requiredMarker?.startsWith('required') && (index.h("span", { class: "label-optional", "aria-hidden": "true" }, "(", of.catI18nRegistry.t('input.required'), ")"))))))), index.h("div", { key: '0fa16f2272927b57982c33a4fc6c971c82258da0', class: "select-container" }, index.h("div", { key: '2912828382354566de382e289a9fc76f922965c6', class: { 'select-wrapper': true, 'select-disabled': this.disabled, 'select-invalid': this.invalid }, ref: el => (this.trigger = el), id: this.id, role: "combobox", "aria-expanded": this.state.isOpen || this.isPillboxActive(), "aria-controls": this.isPillboxActive() ? `select-pillbox-${this.id}` : `select-listbox-${this.id}`, "aria-required": this.required ? 'true' : false, "aria-activedescendant": this.activeDescendant, onClick: e => this.onClick(e) }, index.h("div", { key: '85c7ccc868f0cf94d5283e37c61d119d31613b1f', class: "select-wrapper-inner" }, this.multiple && this.state.selection.length ? (index.h("div", { id: `select-pillbox-${this.id}`, role: "listbox", "aria-orientation": "horizontal", class: "select-pills" }, this.state.selection.map((item, i) => (index.h("span", { class: {
|
|
10646
10683
|
pill: true,
|
|
10647
10684
|
'select-no-open': true,
|
|
10648
10685
|
'select-option-active': this.state.activeSelectionIndex === i
|
|
10649
|
-
}, role: "option", "aria-selected": "true", id: `select-${this.id}-selection-${i}` }, item.render.avatar ? (index.h("cat-avatar", { label: item.render.label, round: item.render.avatar.round, src: item.render.avatar.src, icon: item.render.avatar.icon, initials: item.render.avatar.initials ?? '' })) : null, index.h("span", null, item.render.label), !this.disabled && (index.h("cat-button", { size: "xs", variant: "text", icon: "$cat:select-clear", iconOnly: true, a11yLabel: of.catI18nRegistry.t('select.deselect'), onClick: () => this.deselect(item.item.id), tabIndex: -1, "data-dropdown-no-close": true }))))))) : this.state.selection.length && this.state.selection[0].render.avatar ? (index.h("cat-avatar", { label: this.state.selection[0].render.label, round: this.state.selection[0].render.avatar.round, src: this.state.selection[0].render.avatar.src, icon: this.state.selection[0].render.avatar.icon, initials: this.state.selection[0].render.avatar.initials ?? '' })) : null, index.h("input", { key: '
|
|
10686
|
+
}, role: "option", "aria-selected": "true", id: `select-${this.id}-selection-${i}` }, item.render.avatar ? (index.h("cat-avatar", { label: item.render.label, round: item.render.avatar.round, src: item.render.avatar.src, icon: item.render.avatar.icon, initials: item.render.avatar.initials ?? '' })) : null, index.h("span", null, item.render.label), !this.disabled && (index.h("cat-button", { size: "xs", variant: "text", icon: "$cat:select-clear", iconOnly: true, a11yLabel: of.catI18nRegistry.t('select.deselect'), onClick: () => this.deselect(item.item.id), tabIndex: -1, "data-dropdown-no-close": true }))))))) : this.state.selection.length && this.state.selection[0].render.avatar ? (index.h("cat-avatar", { label: this.state.selection[0].render.label, round: this.state.selection[0].render.avatar.round, src: this.state.selection[0].render.avatar.src, icon: this.state.selection[0].render.avatar.icon, initials: this.state.selection[0].render.avatar.initials ?? '' })) : null, index.h("input", { key: '6e9511c6945b78f543d3ee49553573f267c33dbc', ...this.nativeAttributes, part: "input", id: `select-${this.id}-input`, class: "select-input", role: "combobox", ref: el => (this.input = el), "aria-controls": this.isPillboxActive() ? `select-pillbox-${this.id}` : `select-listbox-${this.id}`, "aria-activedescendant": this.activeDescendant, "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.hasHint ? this.id + '-hint' : undefined, "aria-autocomplete": "list", onInput: this.onInput.bind(this), value: !this.multiple ? this.state.term : undefined, placeholder: this.placeholder, disabled: this.disabled || this.state.isResolving })), this.state.isResolving && index.h("cat-spinner", null), this.invalid && (index.h("cat-icon", { icon: "$cat:input-error", class: "icon-suffix cat-text-danger", size: "l" })), (this.state.selection.length || this.state.term.length) &&
|
|
10650
10687
|
!this.disabled &&
|
|
10651
10688
|
!this.state.isResolving &&
|
|
10652
|
-
this.clearable ? (index.h("cat-button", { id: `select-clear-btn-${this.id}`, iconOnly: true, icon: "$cat:input-close", variant: "text", size: "s", a11yLabel: of.catI18nRegistry.t('input.clear'), onCatClick: () => this.clearInput(), "data-dropdown-no-close": true })) : null, !this.state.isResolving && (index.h("cat-button", { iconOnly: true, icon: "$cat:select-open", class: { 'select-btn': true, 'select-btn-open': this.state.isOpen }, variant: "text", size: "s", a11yLabel: this.state.isOpen ? of.catI18nRegistry.t('select.close') : of.catI18nRegistry.t('select.open'), "aria-controls": `select-listbox-${this.id}`, "aria-expanded": this.state.isOpen, tabIndex: -1, disabled: this.disabled || this.state.isResolving, "data-dropdown-no-close": true }))), this.hasHint && (index.h(CatFormHint, { id: this.id, hint: this.hint, slottedHint: this.hasSlottedHint && index.h("slot", { name: "hint" }), errorMap: this.errorMap })))), index.h("div", { key: '
|
|
10689
|
+
this.clearable ? (index.h("cat-button", { id: `select-clear-btn-${this.id}`, iconOnly: true, icon: "$cat:input-close", variant: "text", size: "s", a11yLabel: of.catI18nRegistry.t('input.clear'), onCatClick: () => this.clearInput(), "data-dropdown-no-close": true })) : null, !this.state.isResolving && (index.h("cat-button", { iconOnly: true, icon: "$cat:select-open", class: { 'select-btn': true, 'select-btn-open': this.state.isOpen }, variant: "text", size: "s", a11yLabel: this.state.isOpen ? of.catI18nRegistry.t('select.close') : of.catI18nRegistry.t('select.open'), "aria-controls": `select-listbox-${this.id}`, "aria-expanded": this.state.isOpen, tabIndex: -1, disabled: this.disabled || this.state.isResolving, "data-dropdown-no-close": true }))), this.hasHint && (index.h(CatFormHint, { id: this.id, hint: this.hint, slottedHint: this.hasSlottedHint && index.h("slot", { name: "hint" }), errorMap: this.errorMap })))), index.h("div", { key: 'f9e6a8ad7dfba891de5beac0851b90d0d2f44ecd', class: "select-dropdown", ref: el => (this.dropdown = el), style: { display: this.state.isOpen ? 'block' : undefined } }, this.state.isOpen && (index.h("cat-scrollable", { class: "select-options-wrapper", scrolledBuffer: 56, noOverflowX: true, noOverscroll: true, noScrolledInit: true, onScrolledBottom: () => this.more$.next() }, index.h("ul", { class: "select-options", role: "listbox", "aria-multiselectable": this.multiple, "aria-setsize": this.state.totalElements, id: `select-listbox-${this.id}` }, this.optionsList, this.state.isLoading
|
|
10653
10690
|
? Array.from(Array(CatSelect.SKELETON_COUNT)).map(() => (index.h("li", { class: "select-option-loading" }, index.h("cat-skeleton", { variant: "body", lines: 1 }), index.h("cat-skeleton", { variant: "body", lines: 1 }))))
|
|
10654
10691
|
: !this.state.options.length &&
|
|
10655
10692
|
!this.tags && (index.h("li", { class: "select-option-empty" }, this.noItems ? this.noItems : of.catI18nRegistry.t('select.empty')))))))));
|
|
@@ -11142,7 +11179,7 @@ const CatSelectTest = class {
|
|
|
11142
11179
|
setTimeout(() => this.multipleSelect && (this.multipleSelect.value = []), 5000);
|
|
11143
11180
|
}
|
|
11144
11181
|
render() {
|
|
11145
|
-
return (index.h(index.Host, { key: '
|
|
11182
|
+
return (index.h(index.Host, { key: '4ac6644bf509a0059e4e9cc1fcb17e74e82301f6', style: { display: 'flex', flexDirection: 'column' }, class: "cat-form" }, index.h("cat-select", { key: '225b226c069a27a0e2e18e4df3a4b0ba1874e8ae', label: "Multiple Select", hint: "This is a hint!", ref: el => (this.multipleSelect = el), value: ['1'], placeholder: "Hello World", onCatChange: () => console.log('Multiple change', this.multipleSelect?.value), onCatBlur: e => console.log('Multiple blur', e), multiple: true, noItems: "No results", clearable: true, errorUpdate: false }, index.h("span", { key: '51f2e4a05e26003f8a92cd2f9c8e5c5f3adaaf06', slot: "hint" }, "Searching for \"no\" -", '>', " no options are returned!")), index.h("cat-select", { key: 'edfca580ff1b5cd64f5d5fc7e144d68aea8c3edc', label: "Multiple with img", ref: el => (this.multipleSelectAvatar = el), value: ['1'], placeholder: "Hello World", multiple: true, clearable: true, errorUpdate: false }), index.h("cat-select", { key: 'd7db6494e844eba34226c3ace855cc2d1adf2b03', label: "Multiple with initials", ref: el => (this.multipleSelectAvatarInitials = el), value: ['1'], placeholder: "Hello World", multiple: true, clearable: true, errorUpdate: false }), index.h("cat-select", { key: '962360e45fd2072708f838d08d133e124df181b6', label: "Multiple with tagging support", hint: "This is a hint!", ref: el => (this.multipleSelectTagging = el), value: { ids: ['1'], tags: ['Test', 'Albania', 'Algeria'] }, placeholder: "Select country", onCatChange: () => console.log('Multiple tagging change', this.multipleSelectTagging?.value), multiple: true, tags: true, clearable: true, errorUpdate: false }), index.h("cat-select", { key: 'ce9b178cf975ec67b3b4791d50636177825c5a12', label: "Single Select", hint: "This is a hint!", ref: el => (this.singleSelect = el), placeholder: "Search for a country or capital", onCatBlur: e => console.log('Single blur', e), clearable: true, errorUpdate: false }), index.h("cat-select", { key: '95024f1410acfefc7e29d624467c30c9bffc97f5', label: "Single with img", ref: el => (this.singleSelectAvatar = el), value: '1', placeholder: "Search for a country or capital", clearable: true, errorUpdate: false }), index.h("cat-select", { key: '9976d3572c2241779b282c135d8f6c8f12614fc5', label: "Single with initials", ref: el => (this.singleSelectAvatarInitials = el), placeholder: "Hello World", clearable: true, errorUpdate: false }), index.h("cat-dropdown", { key: '0d029a862f56bf864044d24d8b28699fe3210505', overflow: true }, index.h("cat-button", { key: '27f13d7ea67d5a356e96f9d6a363f4a3595163ae', slot: "trigger", style: { width: '50%' } }, "Open select"), index.h("div", { key: '410dded1ee2792ff39bd1f178caa6db99a48b4ef', slot: "content", style: { width: '400px' } }, index.h("cat-select", { key: 'b890e14e697636fc346b323d34b652733368c062', label: "Single with tagging support", ref: el => (this.singleSelectTagging = el), value: { id: '', tag: 'Albania' }, placeholder: "Search for a country or capital", onCatChange: () => console.log('Single change', this.singleSelectTagging?.value), tagHint: "new country", tags: true, clearable: true, errorUpdate: false, style: { width: '90%' } })))));
|
|
11146
11183
|
}
|
|
11147
11184
|
get countryConnector() {
|
|
11148
11185
|
return {
|
|
@@ -12398,7 +12435,7 @@ const CatSkeleton = class {
|
|
|
12398
12435
|
this.lines = undefined;
|
|
12399
12436
|
}
|
|
12400
12437
|
render() {
|
|
12401
|
-
return (index.h(index.Host, { key: '
|
|
12438
|
+
return (index.h(index.Host, { key: 'ff25fcfbbb841b47dcbb78743fb64b9c420b4075' }, Array.from(Array(this.count)).map(() => (index.h("div", { style: this.style, class: {
|
|
12402
12439
|
skeleton: true,
|
|
12403
12440
|
[`skeleton-${this.effect}`]: Boolean(this.effect),
|
|
12404
12441
|
[`skeleton-${this.variant}`]: Boolean(this.variant),
|
|
@@ -12438,9 +12475,9 @@ const CatSpinner = class {
|
|
|
12438
12475
|
this.a11yLabel = undefined;
|
|
12439
12476
|
}
|
|
12440
12477
|
render() {
|
|
12441
|
-
return (index.h("span", { key: '
|
|
12478
|
+
return (index.h("span", { key: '380177992db2e5442e4c6face7da60c8da6a4e86', "aria-label": this.a11yLabel, "aria-hidden": this.a11yLabel ? null : 'true', class: {
|
|
12442
12479
|
[`spinner-${this.size}`]: this.size !== 'inline'
|
|
12443
|
-
} }, index.h("svg", { key: '
|
|
12480
|
+
} }, index.h("svg", { key: '54f5e3abee80b6f2c3f0b229f17af3695eff4181', xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 48 48" }, index.h("circle", { key: '9b048824cd5ef71c03dc2f520d0ae4b5444237d7', cx: "24", cy: "24", r: "21.5" }))));
|
|
12444
12481
|
}
|
|
12445
12482
|
};
|
|
12446
12483
|
CatSpinner.style = CatSpinnerStyle0;
|
|
@@ -12472,7 +12509,7 @@ const CatTab = class {
|
|
|
12472
12509
|
this.catClick.emit(event);
|
|
12473
12510
|
}
|
|
12474
12511
|
render() {
|
|
12475
|
-
return index.h(index.Host, { key: '
|
|
12512
|
+
return index.h(index.Host, { key: '73e68355492ab56794ab4e79c59690be498f290a' });
|
|
12476
12513
|
}
|
|
12477
12514
|
get hostElement() { return index.getElement(this); }
|
|
12478
12515
|
};
|
|
@@ -12536,7 +12573,7 @@ const CatTabs = class {
|
|
|
12536
12573
|
this.activate(this.tabs[index]);
|
|
12537
12574
|
}
|
|
12538
12575
|
render() {
|
|
12539
|
-
return (index.h(index.Host, { key: '
|
|
12576
|
+
return (index.h(index.Host, { key: '744025a8e7a0baebf243384bd2a7e1bc9d68c464' }, this.tabs.map((tab) => {
|
|
12540
12577
|
return (index.h("cat-button", { buttonId: tab.id, role: "tab", part: "tab", class: {
|
|
12541
12578
|
'cat-tab': true,
|
|
12542
12579
|
'cat-tab-active': tab.id === this.activeTab,
|
|
@@ -12609,11 +12646,11 @@ const CatTextarea = class {
|
|
|
12609
12646
|
}
|
|
12610
12647
|
componentWillRender() {
|
|
12611
12648
|
this.onErrorsChanged(this.errors);
|
|
12612
|
-
this
|
|
12613
|
-
|
|
12614
|
-
|
|
12615
|
-
|
|
12616
|
-
}
|
|
12649
|
+
delayedAssertWarn(this, () => {
|
|
12650
|
+
this.hasSlottedLabel = !!this.hostElement.querySelector('[slot="label"]');
|
|
12651
|
+
this.hasSlottedHint = !!this.hostElement.querySelector('[slot="hint"]');
|
|
12652
|
+
return !!this.label && !!this.hasSlottedLabel;
|
|
12653
|
+
}, '[A11y] Missing ARIA label on textarea');
|
|
12617
12654
|
}
|
|
12618
12655
|
componentDidLoad() {
|
|
12619
12656
|
n(this.textarea);
|
|
@@ -12656,15 +12693,15 @@ const CatTextarea = class {
|
|
|
12656
12693
|
}
|
|
12657
12694
|
}
|
|
12658
12695
|
render() {
|
|
12659
|
-
return (index.h(index.Host, { key: '
|
|
12696
|
+
return (index.h(index.Host, { key: 'f5e7a577f009789caf57b4200e04db7562146413' }, index.h("div", { key: 'e29810b64785b02e955ea2a65033a081fce5e511', class: {
|
|
12660
12697
|
'textarea-field': true,
|
|
12661
12698
|
'textarea-horizontal': this.horizontal
|
|
12662
|
-
} }, index.h("div", { key: '
|
|
12699
|
+
} }, index.h("div", { key: 'a133d216a4546fdfa3beadb9a66a65d486b99731', class: { 'label-container': true, hidden: this.labelHidden } }, (this.hasSlottedLabel || this.label) && (index.h("label", { htmlFor: this.id, part: "label" }, index.h("span", { class: "label-wrapper" }, (this.hasSlottedLabel && index.h("slot", { name: "label" })) || this.label, index.h("div", { class: "label-metadata" }, !this.required && (this.requiredMarker ?? 'optional').startsWith('optional') && (index.h("span", { class: "label-optional", "aria-hidden": "true" }, "(", of.catI18nRegistry.t('input.optional'), ")")), this.required && this.requiredMarker?.startsWith('required') && (index.h("span", { class: "label-optional", "aria-hidden": "true" }, "(", of.catI18nRegistry.t('input.required'), ")")), this.maxLength && (index.h("div", { class: "label-character-count", "aria-hidden": "true" }, this.value?.length ?? 0, "/", this.maxLength))))))), index.h("div", { key: '38b24a0996bbd37df333dc4da089a6a1b183b029', class: "textarea-container" }, index.h("div", { key: '6a38048f4173e52c2d86ab8180d98ea4b859d92c', class: {
|
|
12663
12700
|
'textarea-wrapper': true,
|
|
12664
12701
|
'textarea-readonly': this.readonly,
|
|
12665
12702
|
'textarea-disabled': this.disabled,
|
|
12666
12703
|
'textarea-invalid': this.invalid
|
|
12667
|
-
} }, index.h("textarea", { key: '
|
|
12704
|
+
} }, index.h("textarea", { key: 'd7067c0ed5ea246ee9510a1f01d1b18353a22b7f', ...this.nativeAttributes, part: "textarea", ref: el => (this.textarea = el), id: this.id, disabled: this.disabled, maxlength: this.maxLength, minlength: this.minLength, name: this.name, placeholder: this.placeholder, readonly: this.readonly, required: this.required, rows: this.rows, value: this.value, onInput: this.onInput.bind(this), onFocus: this.onFocus.bind(this), onBlur: this.onBlur.bind(this), "aria-invalid": this.invalid ? 'true' : undefined, "aria-describedby": this.hasHint ? this.id + '-hint' : undefined }), this.invalid && (index.h("cat-icon", { icon: "$cat:input-error", class: "icon-suffix cat-text-danger", size: "l", onClick: () => this.textarea.focus() }))), this.hasHint && (index.h(CatFormHint, { id: this.id, hint: this.hint, slottedHint: this.hasSlottedHint && index.h("slot", { name: "hint" }), errorMap: this.errorMap }))))));
|
|
12668
12705
|
}
|
|
12669
12706
|
get hasHint() {
|
|
12670
12707
|
return !!this.hint || !!this.hasSlottedHint || this.invalid;
|
|
@@ -12882,7 +12919,7 @@ const CatTime = class {
|
|
|
12882
12919
|
this.input?.clear();
|
|
12883
12920
|
}
|
|
12884
12921
|
render() {
|
|
12885
|
-
return (index.h(index.Host, { key: '
|
|
12922
|
+
return (index.h(index.Host, { key: 'ae2aa4007b887c27fe70148609cefb035c91e701' }, index.h("cat-input", { key: '9949554f49896959c5f72ea77a05b70bfe83b9e6', class: "cat-time-input", ref: el => (this.input = el), requiredMarker: this.requiredMarker, horizontal: this.horizontal, autoComplete: this.autoComplete, clearable: this.clearable, disabled: this.disabled, hint: this.hint, icon: this.icon, iconRight: this.iconRight, identifier: this.identifier, label: this.label, labelHidden: this.labelHidden, name: this.name, placeholder: this.placeholder, textPrefix: this.textPrefix, textSuffix: this.textSuffix, readonly: this.readonly, required: this.required, value: this.format(this.selectionTime, false), errors: this.errors, errorUpdate: this.errorUpdate, nativeAttributes: this.nativeAttributes, onCatFocus: e => this.catFocus.emit(e.detail), onCatBlur: e => this.onInputBlur(e.detail) }, index.h("span", { key: '04fb1a1882d6306a99b8035edc6f50471b713721', slot: "label" }, this.hasSlottedLabel && index.h("slot", { name: "label" }), !this.hasSlottedLabel && this.label, index.h("span", { key: 'a31169411677e1ad602750b3d8c822ad1b22fe05', class: "label-aria" }, " (HH:mm)")), index.h("div", { key: 'deb1ece0b6ee711db953c92e67f5be3caa5d61d5', slot: "addon", class: "cat-time-addon" }, this.locale.timeFormat === '12' && (index.h("cat-button", { class: "cat-time-format", disabled: this.disabled || this.readonly, onCatClick: () => this.toggleAm() }, this.isAm ? 'AM' : 'PM')), index.h("cat-dropdown", { key: 'dc2b7c0530668e8bfbb8ab3b9627d93db656e01a', slot: "addon", placement: this.placement }, index.h("cat-button", { key: '379cbfadcac7e923120e77d81f5d082e5e9512a7', slot: "trigger", class: "cat-time-toggle", disabled: this.disabled || this.readonly, icon: "$cat:timepicker-clock", iconOnly: true, a11yLabel: this.selectionTime ? `${this.locale.change}, ${this.format(this.selectionTime)}` : this.locale.choose }), index.h("nav", { key: 'f83bf3344e890060dce431cf12d449dd204e76e5', slot: "content", class: "cat-nav" }, index.h("ul", { key: 'da065da4b29c9349f82c5db3d2fa2954c97e04fc' }, this.timeArray().map(time => {
|
|
12886
12923
|
const isoTime = formatIso(time);
|
|
12887
12924
|
const disabled = isBefore(time, this.min ?? null) || isAfter(time, this.max ?? null);
|
|
12888
12925
|
return (index.h("li", null, index.h("cat-button", { class: {
|
|
@@ -12986,11 +13023,11 @@ const CatToggle = class {
|
|
|
12986
13023
|
this.updateResolved();
|
|
12987
13024
|
}
|
|
12988
13025
|
componentWillRender() {
|
|
12989
|
-
this
|
|
12990
|
-
|
|
12991
|
-
|
|
12992
|
-
|
|
12993
|
-
}
|
|
13026
|
+
delayedAssertWarn(this, () => {
|
|
13027
|
+
this.hasSlottedLabel = !!this.hostElement.querySelector('[slot="label"]');
|
|
13028
|
+
this.hasSlottedHint = !!this.hostElement.querySelector('[slot="hint"]');
|
|
13029
|
+
return !!this.label && !!this.hasSlottedLabel;
|
|
13030
|
+
}, '[A11y] Missing ARIA label on toggle');
|
|
12994
13031
|
}
|
|
12995
13032
|
/**
|
|
12996
13033
|
* Programmatically move focus to the toggle. Use this method instead of
|
|
@@ -13010,7 +13047,7 @@ const CatToggle = class {
|
|
|
13010
13047
|
this.input.blur();
|
|
13011
13048
|
}
|
|
13012
13049
|
render() {
|
|
13013
|
-
return (index.h(index.Host, { key: '
|
|
13050
|
+
return (index.h(index.Host, { key: '0752c4661a4cefa76dcaa7663f858d67996a144b' }, index.h("label", { key: 'e93edabd89c6f02dc9236e61648d5cbedf77b048', htmlFor: this.id, class: { 'is-hidden': this.labelHidden, 'is-disabled': this.disabled, 'label-left': this.labelLeft } }, index.h("input", { key: 'f24672e2e6f584c4a4bd039bb0451ded35a51485', ...this.nativeAttributes, part: "input", ref: el => (this.input = el), id: this.id, type: "checkbox", name: this.name, value: this.value, checked: this.checked, required: this.required, disabled: this.disabled, class: "form-check-input", role: "switch", onInput: this.onInput.bind(this), onFocus: this.onFocus.bind(this), onBlur: this.onBlur.bind(this), "aria-describedby": this.hasHint ? this.id + '-hint' : undefined }), index.h("span", { key: 'd43d2b9f961c7d21585e6840c0c25826c4204b84', class: "toggle" }), index.h("span", { key: '717458cb7a434f9c94a8b12d0fba7b4ae8e0454e', class: "label", part: "label" }, (this.hasSlottedLabel && index.h("slot", { name: "label" })) || this.label)), this.hasHint && (index.h("div", { class: { 'hint-wrapper': true, 'label-left': this.labelLeft } }, index.h("div", { class: "toggle-placeholder" }), index.h(CatFormHint, { id: this.id, hint: this.hint, slottedHint: this.hasSlottedHint && index.h("slot", { name: "hint" }) })))));
|
|
13014
13051
|
}
|
|
13015
13052
|
get hasHint() {
|
|
13016
13053
|
return !!this.hint || !!this.hasSlottedHint;
|
|
@@ -13097,12 +13134,12 @@ const CatTooltip = class {
|
|
|
13097
13134
|
}
|
|
13098
13135
|
}
|
|
13099
13136
|
render() {
|
|
13100
|
-
return (index.h(index.Host, { key: '
|
|
13137
|
+
return (index.h(index.Host, { key: '8f4bb0d2fff9d1ce325a32399ccb7fadb012aed9' }, index.h("slot", { key: '70f2bad00f8aa036679f52be62dc15b8afc8dfab' }), index.h("div", { key: '81023efbf2624dc29745697773f62b743e3c66cf', ref: el => (this.tooltip = el), id: this.id, role: "tooltip", "aria-hidden": !this.open, "aria-live": this.open ? 'polite' : 'off', class: {
|
|
13101
13138
|
tooltip: true,
|
|
13102
13139
|
'tooltip-hidden': this.inactive,
|
|
13103
13140
|
'tooltip-round': this.round,
|
|
13104
13141
|
[`tooltip-${this.size}`]: Boolean(this.size)
|
|
13105
|
-
} }, index.h("slot", { key: '
|
|
13142
|
+
} }, index.h("slot", { key: '5b6a22f9453c6b6a6da82a1124675516661eed1f', name: "content" }, index.h("p", { key: '552940aad421576156e9adc5266456d6c74660d9' }, this.content)))));
|
|
13106
13143
|
}
|
|
13107
13144
|
async update() {
|
|
13108
13145
|
if (this.trigger && this.tooltip) {
|