xv-webcomponents 0.1.39 → 0.1.41
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/cjs/{index-D41mMXvd.js → index-MLh9SbX2.js} +349 -8
- package/dist/cjs/index-MLh9SbX2.js.map +1 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{xv-accordion-v2_27.cjs.entry.js → xv-accordion-v2_33.cjs.entry.js} +2214 -87
- package/dist/cjs/xv-accordion-v2_33.cjs.entry.js.map +1 -0
- package/dist/cjs/xv-breadcrumbs-v2.cjs.entry.js +1 -1
- package/dist/cjs/xv-webcomponents.cjs.js +3 -3
- package/dist/cjs/xv-webcomponents.cjs.js.map +1 -1
- package/dist/collection/collection-manifest.json +7 -1
- package/dist/collection/components/xv-button/xv-button-v2.css +136 -118
- package/dist/collection/components/xv-button/xv-button.js +132 -67
- package/dist/collection/components/xv-button/xv-button.js.map +1 -1
- package/dist/collection/components/xv-card/xv-card.js +1 -1
- package/dist/collection/components/xv-checkbox/xv-checkbox.css +3 -0
- package/dist/collection/components/xv-checkbox/xv-checkbox.js +1 -1
- package/dist/collection/components/xv-data-table/xv-data-table-cell/xv-data-table-cell.css +30 -0
- package/dist/collection/components/xv-data-table/xv-data-table-cell/xv-data-table-cell.js +80 -0
- package/dist/collection/components/xv-data-table/xv-data-table-cell/xv-data-table-cell.js.map +1 -0
- package/dist/collection/components/xv-data-table/xv-data-table-row/xv-data-table-row.css +4 -0
- package/dist/collection/components/xv-data-table/xv-data-table-row/xv-data-table-row.js +42 -0
- package/dist/collection/components/xv-data-table/xv-data-table-row/xv-data-table-row.js.map +1 -0
- package/dist/collection/components/xv-data-table/xv-data-table.css +51 -0
- package/dist/collection/components/xv-data-table/xv-data-table.js +130 -0
- package/dist/collection/components/xv-data-table/xv-data-table.js.map +1 -0
- package/dist/collection/components/xv-dropdown/xv-dropdown-item/xv-dropdown-item.js +1 -1
- package/dist/collection/components/xv-dropdown/xv-dropdown.css +6 -1
- package/dist/collection/components/xv-dropdown/xv-dropdown.js +20 -1
- package/dist/collection/components/xv-dropdown/xv-dropdown.js.map +1 -1
- package/dist/collection/components/xv-file-uploader/_vars.js +6 -0
- package/dist/collection/components/xv-file-uploader/_vars.js.map +1 -0
- package/dist/collection/components/xv-file-uploader/xv-file-uploader.css +136 -0
- package/dist/collection/components/xv-file-uploader/xv-file-uploader.js +448 -0
- package/dist/collection/components/xv-file-uploader/xv-file-uploader.js.map +1 -0
- package/dist/collection/components/xv-footer/xv-footer.js +1 -1
- package/dist/collection/components/xv-header/xv-header.js +1 -1
- package/dist/collection/components/xv-link/xv-link.js +1 -1
- package/dist/collection/components/xv-modal/xv-modal.js +1 -1
- package/dist/collection/components/xv-notification/xv-notification.css +1 -0
- package/dist/collection/components/xv-notification/xv-notification.js +1 -1
- package/dist/collection/components/xv-number-input/xv-number-input.css +128 -0
- package/dist/collection/components/xv-number-input/xv-number-input.js +373 -0
- package/dist/collection/components/xv-number-input/xv-number-input.js.map +1 -0
- package/dist/collection/components/xv-overflow-menu/xv-overflow-menu-item/xv-overflow-menu-item.js +1 -1
- package/dist/collection/components/xv-overflow-menu/xv-overflow-menu.js +1 -1
- package/dist/collection/components/xv-progress-indicator/xv-progress-indicator-item/xv-progress-indicator-item.js +1 -1
- package/dist/collection/components/xv-progress-indicator/xv-progress-indicator.js +1 -1
- package/dist/collection/components/xv-table/xv-table-cell/xv-table-cell.js +1 -1
- package/dist/collection/components/xv-table/xv-table-expand/xv-table-expand.js +1 -1
- package/dist/collection/components/xv-table/xv-table-row/xv-table-row.js +1 -1
- package/dist/collection/components/xv-table/xv-table.js +1 -1
- package/dist/collection/components/xv-tabs/xv-tab/xv-tab.js +1 -1
- package/dist/collection/components/xv-tabs/xv-tabs.js +1 -2
- package/dist/collection/components/xv-tabs/xv-tabs.js.map +1 -1
- package/dist/collection/components/xv-tag/xv-tag.js +1 -1
- package/dist/collection/components/xv-text-input/xv-text-input.css +110 -89
- package/dist/collection/components/xv-text-input/xv-text-input.js +113 -80
- package/dist/collection/components/xv-text-input/xv-text-input.js.map +1 -1
- package/dist/collection/components/xv-toggle-tip/xv-toggle-tip.css +95 -0
- package/dist/collection/components/xv-toggle-tip/xv-toggle-tip.js +201 -0
- package/dist/collection/components/xv-toggle-tip/xv-toggle-tip.js.map +1 -0
- package/dist/collection/components/xv-tooltip/xv-tooltip.css +31 -147
- package/dist/collection/components/xv-tooltip/xv-tooltip.js +59 -34
- package/dist/collection/components/xv-tooltip/xv-tooltip.js.map +1 -1
- package/dist/esm/{index-Datpns0U.js → index-DLYJiP99.js} +349 -8
- package/dist/esm/index-DLYJiP99.js.map +1 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{xv-accordion-v2_27.entry.js → xv-accordion-v2_33.entry.js} +2209 -88
- package/dist/esm/xv-accordion-v2_33.entry.js.map +1 -0
- package/dist/esm/xv-breadcrumbs-v2.entry.js +1 -1
- package/dist/esm/xv-webcomponents.js +4 -4
- package/dist/esm/xv-webcomponents.js.map +1 -1
- package/dist/types/components/xv-button/xv-button.d.ts +21 -12
- package/dist/types/components/xv-data-table/xv-data-table-cell/xv-data-table-cell.d.ts +6 -0
- package/dist/types/components/xv-data-table/xv-data-table-row/xv-data-table-row.d.ts +4 -0
- package/dist/types/components/xv-data-table/xv-data-table.d.ts +9 -0
- package/dist/types/components/xv-dropdown/xv-dropdown.d.ts +1 -0
- package/dist/types/components/xv-file-uploader/_vars.d.ts +4 -0
- package/dist/types/components/xv-file-uploader/xv-file-uploader.d.ts +36 -0
- package/dist/types/components/xv-number-input/xv-number-input.d.ts +26 -0
- package/dist/types/components/xv-text-input/xv-text-input.d.ts +10 -11
- package/dist/types/components/xv-toggle-tip/xv-toggle-tip.d.ts +19 -0
- package/dist/types/components/xv-tooltip/xv-tooltip.d.ts +10 -8
- package/dist/types/components.d.ts +605 -49
- package/dist/xv-webcomponents/{p-054f5d59.entry.js → p-5b63a259.entry.js} +2 -2
- package/dist/xv-webcomponents/p-DLYJiP99.js +3 -0
- package/dist/xv-webcomponents/p-DLYJiP99.js.map +1 -0
- package/dist/xv-webcomponents/p-ec72208c.entry.js +2 -0
- package/dist/xv-webcomponents/p-ec72208c.entry.js.map +1 -0
- package/dist/xv-webcomponents/xv-webcomponents.esm.js +1 -1
- package/dist/xv-webcomponents/xv-webcomponents.esm.js.map +1 -1
- package/package.json +6 -4
- package/dist/cjs/index-D41mMXvd.js.map +0 -1
- package/dist/cjs/xv-accordion-v2_27.cjs.entry.js.map +0 -1
- package/dist/collection/components/xv-text-input/_vars.js +0 -7
- package/dist/collection/components/xv-text-input/_vars.js.map +0 -1
- package/dist/esm/index-Datpns0U.js.map +0 -1
- package/dist/esm/xv-accordion-v2_27.entry.js.map +0 -1
- package/dist/types/components/xv-text-input/_vars.d.ts +0 -5
- package/dist/xv-webcomponents/p-6a4cc790.entry.js +0 -2
- package/dist/xv-webcomponents/p-6a4cc790.entry.js.map +0 -1
- package/dist/xv-webcomponents/p-Datpns0U.js +0 -3
- package/dist/xv-webcomponents/p-Datpns0U.js.map +0 -1
- /package/dist/xv-webcomponents/{p-054f5d59.entry.js.map → p-5b63a259.entry.js.map} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-MLh9SbX2.js');
|
|
4
4
|
var index$1 = require('./index-BE3kw7I4.js');
|
|
5
5
|
|
|
6
6
|
const xvAccordionCss = ":host{display:block}";
|
|
@@ -67,32 +67,81 @@ const XvAccordionItem = class {
|
|
|
67
67
|
};
|
|
68
68
|
XvAccordionItem.style = xvAccordionItemCss;
|
|
69
69
|
|
|
70
|
-
|
|
70
|
+
var SIZE_VAR;
|
|
71
|
+
(function (SIZE_VAR) {
|
|
72
|
+
SIZE_VAR["XS"] = "xs";
|
|
73
|
+
SIZE_VAR["SM"] = "sm";
|
|
74
|
+
SIZE_VAR["MD"] = "md";
|
|
75
|
+
SIZE_VAR["LG"] = "lg";
|
|
76
|
+
SIZE_VAR["XL"] = "xl";
|
|
77
|
+
})(SIZE_VAR || (SIZE_VAR = {}));
|
|
78
|
+
|
|
79
|
+
const xvButtonV2Css = ":host{display:inline-block}:host([block]){display:block;width:100%}.xv-button{all:unset;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;border-radius:3px;font-size:var(--fz-md);font-family:var(--ff-body, Tahoma);font-style:normal;font-weight:700;line-height:128.571%;letter-spacing:0.16px;cursor:pointer;position:relative;transition:background 0.2s, color 0.2s, border-color 0.2s;user-select:none;width:100%}.xv-button:focus-visible{outline:2px solid var(--focus);outline-offset:2px}.xv-button--xs{--xv-button-icon-size:16px;padding:var(--spacing-02);height:var(--xv-button-icon-size)}.xv-button--sm{--xv-button-icon-size:32px;padding:var(--spacing-03);height:var(--xv-button-icon-size)}.xv-button--md{--xv-button-icon-size:40px;padding:var(--spacing-04);height:var(--xv-button-icon-size)}.xv-button--lg{--xv-button-icon-size:48px;padding:var(--spacing-05);height:var(--xv-button-icon-size)}.xv-button--xl{--xv-button-icon-size:60px;font-size:1.1em;padding:var(--spacing-06);height:auto}.xv-button--primary{background-color:var(--button-primary);color:var(--text-on-color)}.xv-button--primary:hover{background-color:var(--button-primary-hover)}.xv-button--primary:active{background-color:var(--button-primary-active)}.xv-button--accent{background-color:var(--button-accent);color:var(--text-on-color)}.xv-button--accent:hover{background-color:var(--button-accent-hover)}.xv-button--accent:active{background-color:var(--button-accent-active)}.xv-button--secondary{background-color:var(--button-secondary);border:1px solid var(--border-subtle-01)}.xv-button--secondary:hover{background-color:var(--button-secondary-hover)}.xv-button--secondary:active{background-color:var(--button-secondary-active)}.xv-button--danger{background:var(--support-error);color:white}.xv-button--danger:hover{background-color:#ba1b23}.xv-button--danger:active{background-color:#750e13}.xv-button--danger:disabled{background-color:var(--button-disabled);border-color:transparent;color:var(--text-on-color-disabled, #8B8B8B)}.xv-button--tertiary{background-color:transparent;border:1px solid var(--button-tertiary)}.xv-button--tertiary:hover{background-color:var(--button-tertiary-hover)}.xv-button--tertiary:active{background-color:var(--button-tertiary-active)}.xv-button--tertiary:disabled{color:var(--text-disabled);border-color:var(--button-disabled, #D1D1D1);background-color:transparent}.xv-button--ghost{background-color:transparent;color:var(--text-primary)}.xv-button--ghost:hover{background-color:transparent}.xv-button--ghost:active{background-color:rgba(139, 139, 139, 0.5)}.xv-button--ghost:disabled{color:var(--text-disabled);border-color:transparent;background-color:transparent}.xv-button--primary:disabled,.xv-button--accent:disabled,.xv-button--secondary:disabled,.xv-button--danger:disabled{border-color:var(--border-subtle-01, #D1D1D1);background-color:var(--button-disabled, #D1D1D1);color:var(--text-on-color-disabled, #8B8B8B)}.xv-button--disabled{cursor:not-allowed}.xv-button--loading{pointer-events:none;opacity:0.8}.xv-button__label{display:inline-flex;align-items:center}.xv-button__loader{position:absolute;left:50%;transform:translateX(-50%)}.xv-button__icon{display:inline-flex;align-items:center}.xv-button--icon-left .xv-button__icon--left{margin-inline-end:var(--spacing-05)}.xv-button--icon-right .xv-button__icon--right{margin-inline-start:var(--spacing-05)}.xv-button--icon-only{padding:0;width:var(--xv-button-icon-size, 40px);height:var(--xv-button-icon-size, 40px);justify-content:center}.xv-button--icon-only .xv-button__icon{margin:0}";
|
|
71
80
|
|
|
72
81
|
const XvButton = class {
|
|
73
82
|
constructor(hostRef) {
|
|
74
83
|
index.registerInstance(this, hostRef);
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
84
|
+
if (hostRef.$hostElement$["s-ei"]) {
|
|
85
|
+
this.internals = hostRef.$hostElement$["s-ei"];
|
|
86
|
+
}
|
|
87
|
+
else {
|
|
88
|
+
this.internals = hostRef.$hostElement$.attachInternals();
|
|
89
|
+
hostRef.$hostElement$["s-ei"] = this.internals;
|
|
90
|
+
}
|
|
91
|
+
/** Button variants */
|
|
92
|
+
this.variant = 'primary';
|
|
93
|
+
/** Button size */
|
|
94
|
+
this.size = SIZE_VAR.MD;
|
|
95
|
+
/** Button disabled state */
|
|
96
|
+
this.disabled = false;
|
|
97
|
+
/** Button loading state */
|
|
98
|
+
this.loading = false;
|
|
99
|
+
/** Button for full width */
|
|
79
100
|
this.block = false;
|
|
80
101
|
/** Button type */
|
|
81
102
|
this.type = 'button';
|
|
82
|
-
|
|
83
|
-
this.
|
|
84
|
-
|
|
85
|
-
this.
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
103
|
+
this.hasLeftIcon = false;
|
|
104
|
+
this.hasRightIcon = false;
|
|
105
|
+
this.hasContent = false;
|
|
106
|
+
this.handleSlotChangeLeft = (event) => {
|
|
107
|
+
this.hasLeftIcon = event.target.assignedElements().length > 0;
|
|
108
|
+
};
|
|
109
|
+
this.handleSlotChangeContent = (event) => {
|
|
110
|
+
this.hasContent = event.target.assignedNodes().some(node => {
|
|
111
|
+
var _a;
|
|
112
|
+
return node.nodeType === Node.ELEMENT_NODE ||
|
|
113
|
+
(node.nodeType === Node.TEXT_NODE && ((_a = node.textContent) === null || _a === void 0 ? void 0 : _a.trim()) !== '');
|
|
114
|
+
});
|
|
115
|
+
};
|
|
116
|
+
this.handleSlotChangeRight = (event) => {
|
|
117
|
+
this.hasRightIcon = event.target.assignedElements().length > 0;
|
|
118
|
+
};
|
|
119
|
+
this.handleClick = () => {
|
|
120
|
+
var _a, _b;
|
|
121
|
+
if (this.type === 'submit') {
|
|
122
|
+
(_a = this.internals.form) === null || _a === void 0 ? void 0 : _a.requestSubmit();
|
|
123
|
+
}
|
|
124
|
+
else if (this.type === 'reset') {
|
|
125
|
+
(_b = this.internals.form) === null || _b === void 0 ? void 0 : _b.reset();
|
|
126
|
+
}
|
|
91
127
|
};
|
|
92
128
|
}
|
|
93
129
|
render() {
|
|
94
|
-
|
|
130
|
+
var _a;
|
|
131
|
+
return (index.h(index.Host, { key: 'ad8e2051c6023d13626e65861099114e2ff06db2' }, index.h("button", { key: '1f2b8e13a29a63b3f50ced928a83e92d0eb5c0ea', class: {
|
|
132
|
+
'xv-button': true,
|
|
133
|
+
[`xv-button--${this.variant}`]: !!this.variant,
|
|
134
|
+
[`xv-button--${this.size}`]: !!this.size,
|
|
135
|
+
'xv-button--disabled': this.disabled || this.loading,
|
|
136
|
+
'xv-button--block': this.block,
|
|
137
|
+
'xv-button--loading': this.loading,
|
|
138
|
+
'xv-button--icon-left': this.hasLeftIcon,
|
|
139
|
+
'xv-button--icon-right': this.hasRightIcon,
|
|
140
|
+
'xv-button--icon-only': !this.hasContent,
|
|
141
|
+
}, part: "button", onClick: this.handleClick, type: this.type, disabled: this.disabled || this.loading, "aria-disabled": this.disabled ? 'true' : undefined, "aria-label": ((_a = this.el) === null || _a === void 0 ? void 0 : _a.ariaLabel) || 'XV button' }, this.loading && (index.h("xv-loader-v2", { key: 'a7c55e4823b233f845f1a9e5e654f2c98a88001d', class: "xv-button__loader", size: this.size !== SIZE_VAR.XL ? this.size : SIZE_VAR.LG })), index.h("span", { key: '57f0ced69f7022ba8b602083b69fa2804061ccef', class: "xv-button__icon xv-button__icon--left" }, index.h("slot", { key: '8c6c0c1a12bfafe6a3674352b5e8ba77e0562eb3', name: "icon-left", onSlotchange: this.handleSlotChangeLeft })), index.h("span", { key: '8e19d4691b333a0d70a76ed476f59bacfeefa963', class: "xv-button__label" }, index.h("slot", { key: 'c9d9896b34e3137442b11db5d4f44d097d952d37', onSlotchange: this.handleSlotChangeContent }, this.label)), index.h("span", { key: '25a3256dff8ec326c081601dd46cff45149a7683', class: "xv-button__icon xv-button__icon--right" }, index.h("slot", { key: '90505c36d3620fa19c3d01fc1e66cc57e705a8db', name: "icon-right", onSlotchange: this.handleSlotChangeRight })))));
|
|
95
142
|
}
|
|
143
|
+
static get formAssociated() { return true; }
|
|
144
|
+
get el() { return index.getElement(this); }
|
|
96
145
|
};
|
|
97
146
|
XvButton.style = xvButtonV2Css;
|
|
98
147
|
|
|
@@ -104,12 +153,12 @@ const XvCard = class {
|
|
|
104
153
|
this.variant = 'vertical';
|
|
105
154
|
}
|
|
106
155
|
render() {
|
|
107
|
-
return (index.h(index.Host, { key: '
|
|
156
|
+
return (index.h(index.Host, { key: '7c19e1d91f9040c116dc18d6f58be859e66b0629', class: `xv-card xv-card_${this.variant}`, part: this.variant }, index.h("div", { key: '8ef942983bc31d278810372bfed3fe4cb8f1922a', class: "xv-card_media" }, index.h("slot", { key: '86bc68bcb80c563a91448c15ab1ebd89c1e5b245', name: "media" }, this.media && index.h("img", { key: 'c4351a7426b5b73ed37f038f1f355dcf46dae597', class: "xv-card_media__content", src: this.media, alt: this.header }))), index.h("div", { key: '906393c52bb7c27bfbc9527dfba34f712ec8a420', class: "xv-card_content" }, index.h("div", { key: 'd703353d99066a4f395f126f0ec8aa462c7a5c7b', class: "xv-card_header" }, index.h("slot", { key: '4fb9c65d701629dce6f99c8ad871adbd7659ecdd', name: "header" }, this.header && index.h("p", { key: 'e4a3f971b5dca8cdf3e44c9ba2a37baeff67fd59', class: "xv-card_header__content" }, this.header))), index.h("div", { key: '7029219d670fe9a94e5c50f657f5f2f2d45a2edb', class: "xv-card_body" }, index.h("slot", { key: '0f570bb3938b6c44e8cc3fb004ed1d7c487fb5a7', name: "body" }, this.body && index.h("p", { key: '02fc0abdc52c3a0bf833c0bfe24ec573f1457f21', class: "xv-card_body__content" }, this.header))), index.h("div", { key: '9734dca4512ace0e29e332acce27bf01c8a05e24', class: "xv-card_footer" }, index.h("slot", { key: '3cf0141845baf68e0149b823b921705978953ade', name: "footer" }, this.footer)))));
|
|
108
157
|
}
|
|
109
158
|
};
|
|
110
159
|
XvCard.style = xvCardCss;
|
|
111
160
|
|
|
112
|
-
const xvCheckboxCss = ":host{--checkbox-size:max(1rem, 16px);box-sizing:border-box;display:inline-flex;flex-direction:column}:host([error]) .xv-checkbox .checkmark{border-color:var(--text-error, #D62512)}.error,[name=info]{display:inline-flex;align-items:center;justify-content:flex-start;font-size:var(--fz-sm, 12px);font-family:var(--ff-body, Tahoma);line-height:133.333%;letter-spacing:0.32px}.error{margin-top:var(--gap-xs, 5px);color:var(--text-error, #D62512)}.error::before{margin-right:var(--gap-xs, 5px);content:\"!\";display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;font-size:var(--fz-sm, 12px);font-weight:bold;color:white;background-color:var(--text-error, #D62512);border-radius:50%}.xv-checkbox{display:inline-flex;align-items:center;cursor:pointer;user-select:none}.xv-checkbox input[type=checkbox]{position:absolute;width:var(--checkbox-size);height:var(--checkbox-size);margin:0;padding:0;opacity:0;pointer-events:none;box-sizing:border-box}.xv-checkbox .checkmark{width:var(--checkbox-size);min-width:var(--checkbox-size);height:var(--checkbox-size);min-height:var(--checkbox-size);box-sizing:border-box;margin:0;padding:0;border:1.4px solid var(--icon-primary, #D1D1D1);border-radius:2px;background-color:var(--background, #FFF);transition:all 0.2s ease;display:inline-flex;align-items:center;justify-content:center}.xv-checkbox input:checked+.checkmark{background-color:var(--background-brand, #97BF0D);border-color:var(--background-brand, #97BF0D)}.xv-checkbox input:checked+.checkmark:not(.checkmark-partial)::after{content:\"\";width:calc(var(--checkbox-size) / 4);height:calc(var(--checkbox-size) / 2.5);border:solid var(--background, #FFF);margin-bottom:calc(var(--checkbox-size) / 10);border-width:0 2px 2px 0;transform:rotate(45deg);display:block}.xv-checkbox input:checked+.checkmark.checkmark-partial::after{content:\"\";width:calc(var(--checkbox-size) / 3);height:calc(var(--checkbox-size) / 10);background-color:var(--background, #FFF)}.xv-checkbox input:focus+.checkmark{outline:1.4px solid var(--focus, #8B8B8B)}.xv-checkbox .label{color:var(--text-primary, #333);font-family:var(--ff-body, Tahoma);font-size:var(--fz-md, 14px);line-height:128.571%;letter-spacing:0.16px}.xv-checkbox .label_str,.xv-checkbox .label ::slotted(*){margin-left:8px}.xv-checkbox.readonly{cursor:initial}.xv-checkbox.readonly input:checked+.checkmark{background-color:var(--background, #FFF);border:1.4px solid var(--icon-disabled, #D1D1D1)}.xv-checkbox.readonly input:checked+.checkmark:after{border-color:var(--icon-primary, #131313)}.xv-checkbox.readonly input:checked+.checkmark-partial:after{background-color:var(--icon-primary, #131313)}.xv-checkbox.readonly .checkmark{border:1.4px solid var(--icon-disabled, #D1D1D1)}.xv-checkbox.readonly .label{color:var(--text-primary, #333)}.xv-checkbox.disabled{cursor:not-allowed}.xv-checkbox.disabled .checkmark{border:1.4px solid var(--icon-disabled, #D1D1D1)}.xv-checkbox.disabled .label{color:var(--text-disabled, rgba(19, 19, 19, 0.25))}";
|
|
161
|
+
const xvCheckboxCss = ":host{--checkbox-size:max(1rem, 16px);box-sizing:border-box;display:inline-flex;flex-direction:column;overflow:visible !important}:host([error]) .xv-checkbox .checkmark{border-color:var(--text-error, #D62512)}.error,[name=info]{display:inline-flex;align-items:center;justify-content:flex-start;font-size:var(--fz-sm, 12px);font-family:var(--ff-body, Tahoma);line-height:133.333%;letter-spacing:0.32px}.error{margin-top:var(--gap-xs, 5px);color:var(--text-error, #D62512)}.error::before{margin-right:var(--gap-xs, 5px);content:\"!\";display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;font-size:var(--fz-sm, 12px);font-weight:bold;color:white;background-color:var(--text-error, #D62512);border-radius:50%}.xv-checkbox{display:inline-flex;align-items:center;cursor:pointer;user-select:none}.xv-checkbox input[type=checkbox]{position:absolute;width:var(--checkbox-size);height:var(--checkbox-size);margin:0;padding:0;opacity:0;pointer-events:none;box-sizing:border-box}.xv-checkbox .checkmark{width:var(--checkbox-size);min-width:var(--checkbox-size);height:var(--checkbox-size);min-height:var(--checkbox-size);box-sizing:border-box;margin:0;padding:0;border:1.4px solid var(--icon-primary, #D1D1D1);border-radius:2px;background-color:var(--background, #FFF);transition:all 0.2s ease;display:inline-flex;align-items:center;justify-content:center}.xv-checkbox input:checked+.checkmark{background-color:var(--background-brand, #97BF0D);border-color:var(--background-brand, #97BF0D)}.xv-checkbox input:checked+.checkmark:not(.checkmark-partial)::after{content:\"\";position:absolute;width:calc(var(--checkbox-size) / 4);height:calc(var(--checkbox-size) / 2.5);border:solid var(--background, #FFF);margin-bottom:calc(var(--checkbox-size) / 10);border-width:0 2px 2px 0;transform:rotate(45deg);display:block}.xv-checkbox input:checked+.checkmark.checkmark-partial::after{content:\"\";position:absolute;width:calc(var(--checkbox-size) / 3);height:calc(var(--checkbox-size) / 10);background-color:var(--background, #FFF)}.xv-checkbox input:focus+.checkmark{outline:1.4px solid var(--focus, #8B8B8B)}.xv-checkbox .label{color:var(--text-primary, #333);font-family:var(--ff-body, Tahoma);font-size:var(--fz-md, 14px);line-height:128.571%;letter-spacing:0.16px}.xv-checkbox .label_str,.xv-checkbox .label ::slotted(*){margin-left:8px}.xv-checkbox.readonly{cursor:initial}.xv-checkbox.readonly input:checked+.checkmark{background-color:var(--background, #FFF);border:1.4px solid var(--icon-disabled, #D1D1D1)}.xv-checkbox.readonly input:checked+.checkmark:after{border-color:var(--icon-primary, #131313)}.xv-checkbox.readonly input:checked+.checkmark-partial:after{background-color:var(--icon-primary, #131313)}.xv-checkbox.readonly .checkmark{border:1.4px solid var(--icon-disabled, #D1D1D1)}.xv-checkbox.readonly .label{color:var(--text-primary, #333)}.xv-checkbox.disabled{cursor:not-allowed}.xv-checkbox.disabled .checkmark{border:1.4px solid var(--icon-disabled, #D1D1D1)}.xv-checkbox.disabled .label{color:var(--text-disabled, rgba(19, 19, 19, 0.25))}";
|
|
113
162
|
|
|
114
163
|
const XvCheckbox = class {
|
|
115
164
|
constructor(hostRef) {
|
|
@@ -183,7 +232,7 @@ const XvCheckbox = class {
|
|
|
183
232
|
}
|
|
184
233
|
}
|
|
185
234
|
render() {
|
|
186
|
-
return (index.h(index.Host, { key: '
|
|
235
|
+
return (index.h(index.Host, { key: '9eb988ec6a7a02392b4ed77685eed2bc5814c137' }, index.h("label", { key: '3e4c7112c959897c5b61cbcff890eaf437e476fc', class: { 'xv-checkbox': true, disabled: this.disabled, readonly: this.readonly } }, index.h("input", { key: '3a2e68b5780ae3951f86d30f9b2e8d9af1805e97', ref: el => (this.inputEl = el), type: "checkbox", readonly: this.readonly, name: this.name, value: this.value, checked: this.checked, disabled: this.disabled || this.readonly, required: this.required, indeterminate: this.indeterminate, onInput: this.onInput, onChange: this.onChange, onFocus: this.onFocus, onBlur: this.onBlur }), index.h("span", { key: 'b57f073a258a1ea15d04969a68eab7c36023e596', class: `checkmark ${this.partial ? 'checkmark-partial' : ''}` }), index.h("div", { key: '1abe0c133bf203b228b86bd68053856b79cdf170', class: "label" }, index.h("slot", { key: '155a80701f1a050a73a0079308de0b932407549e' }, this.label && index.h("span", { key: 'f9d493bfb663fcf91712b754b4c1b841d10beb05', class: "label_str" }, this.label)))), index.h("slot", { key: 'fae7055dc73235126a633a705b6e8f045a20954c', name: "info" }), !!this.error && index.h("span", { key: '5c3bb7d31289862bf421614ee9906671e65c1b7c', class: "error" }, this.error)));
|
|
187
236
|
}
|
|
188
237
|
componentDidLoad() {
|
|
189
238
|
if (this.indeterminate) {
|
|
@@ -209,18 +258,47 @@ const XvCheckbox = class {
|
|
|
209
258
|
};
|
|
210
259
|
XvCheckbox.style = xvCheckboxCss;
|
|
211
260
|
|
|
212
|
-
var
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
}
|
|
261
|
+
const xvDataTableCss = ":host{--xv-data-table-border-width:1px;--xv-data-table-border-color:var(--border-subtle-01);--xv-data-table-padding-x:var(--spacing-05);--xv-data-table-padding-y:var(--spacing-05);--xv-data-table-row-bg:transparent;display:contents;width:inherit;color:var(--text-primary, #333);font-family:var(--ff-body, Tahoma);font-size:var(--fz-md, 14px);line-height:18px;letter-spacing:0.16px}:host>table{width:inherit;border-collapse:collapse;table-layout:fixed}:host([block]){width:100%}:host([block])>table{table-layout:fixed}:host([size=xs]){--xv-data-table-padding-x:var(--spacing-02);--xv-data-table-padding-y:var(--spacing-02)}:host([size=sm]){--xv-data-table-padding-x:var(--spacing-04);--xv-data-table-padding-y:var(--spacing-03)}:host([size=md]){--xv-data-table-padding-x:var(--spacing-05);--xv-data-table-padding-y:var(--spacing-05)}:host([size=lg]){--xv-data-table-padding-x:var(--spacing-05);--xv-data-table-padding-y:var(--spacing-06)}:host([size=xl]){--xv-data-table-padding-x:var(--spacing-06);--xv-data-table-padding-y:var(--spacing-07)}";
|
|
262
|
+
|
|
263
|
+
const XvDataTable = class {
|
|
264
|
+
constructor(hostRef) {
|
|
265
|
+
index.registerInstance(this, hostRef);
|
|
266
|
+
this.size = SIZE_VAR.MD;
|
|
267
|
+
this.columnWidths = [];
|
|
268
|
+
}
|
|
269
|
+
render() {
|
|
270
|
+
return (index.h(index.Host, { key: '3a2756875f87f6567ff283eea651938490687cdd', class: "xv-data-table" }, index.h("table", { key: '1a19f09a2fdd28eee4428e0a4de23dea10fa81b6', role: "table" }, (this.label || this.description) && (index.h("caption", { key: 'cbedfcf8303442fa5b9f7464edc723deecf9fa90' }, this.label || this.description)), this.columnWidths.length > 0 && (index.h("colgroup", { key: '54761e043642758379753ac03c8066684b0dee0e' }, this.columnWidths.map((width = 'auto') => index.h("col", { style: { width } })))), index.h("slot", { key: 'b7c01a7fc0ae0f078ba796635214c32eb15977ad' }))));
|
|
271
|
+
}
|
|
272
|
+
};
|
|
273
|
+
XvDataTable.style = xvDataTableCss;
|
|
274
|
+
|
|
275
|
+
const xvDataTableCellCss = ":host{display:table-cell;border-style:solid;border-width:var(--xv-data-table-border-width, 0);border-color:var(--xv-data-table-border-color, transparent);padding-inline:var(--xv-data-table-padding-x, 0);padding-block:var(--xv-data-table-padding-y, 0);vertical-align:middle;word-break:break-all;font-style:normal;font-weight:400}:host .line-clamp{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}:host(:not(.multiline)){white-space:nowrap;overflow:hidden;text-overflow:ellipsis}:host(:not(.multiline)) ::slotted(*){white-space:nowrap;overflow:hidden;text-overflow:ellipsis}";
|
|
276
|
+
|
|
277
|
+
const XvDataTableCell = class {
|
|
278
|
+
constructor(hostRef) {
|
|
279
|
+
index.registerInstance(this, hostRef);
|
|
280
|
+
}
|
|
281
|
+
render() {
|
|
282
|
+
return (index.h(index.Host, { key: 'c505212113c232e8e4aca82338f6f799e26e943b', role: "cell", style: { width: this.width }, class: { multiline: this.multiline !== undefined } }, !this.multiline || isNaN(this.multiline) ? index.h("slot", null) : (index.h("div", { class: "line-clamp", style: { ['-webkit-line-clamp']: `${this.multiline}` } }, index.h("slot", null)))));
|
|
283
|
+
}
|
|
284
|
+
};
|
|
285
|
+
XvDataTableCell.style = xvDataTableCellCss;
|
|
286
|
+
|
|
287
|
+
const xvDataTableRowCss = ":host{display:table-row;background-color:var(--xv-data-table-row-bg, transparent)}";
|
|
288
|
+
|
|
289
|
+
const XvDataTableRow = class {
|
|
290
|
+
constructor(hostRef) {
|
|
291
|
+
index.registerInstance(this, hostRef);
|
|
292
|
+
}
|
|
293
|
+
render() {
|
|
294
|
+
return (index.h(index.Host, { key: '46d3f061051182e865d1a0088653a1af509da94f', role: "row" }, this.variant === 'checkbox' && (index.h("xv-data-table-cell", { key: '461f71088337deeb60e307bf715a83d950414a16', width: "1.98%" }, index.h("xv-checkbox-v2", { key: '9b1b6487545b48659f61dfd4b47a0ddd803472dc' }))), index.h("slot", { key: 'd59814118146a679ff7c1f690ccb5836924ef3d2' })));
|
|
295
|
+
}
|
|
296
|
+
};
|
|
297
|
+
XvDataTableRow.style = xvDataTableRowCss;
|
|
220
298
|
|
|
221
299
|
const DropdownItemSelector = '.xv-dropdown-item';
|
|
222
300
|
|
|
223
|
-
const xvDropdownCss = ":host{--dropdown-padding-x:16px;--dropdown-padding-y:11px;--dropdown-max-width:300px;display:block;position:relative;text-align:left;max-width:min(var(--dropdown-max-width), 100%)}:host .label{color:var(--text-secondary, #515151);font-family:var(--ff-body, Tahoma);font-size:12px;font-style:normal;font-weight:700;line-height:16px;letter-spacing:0.32px}:host .label ::slotted([slot=label]){color:var(--text-secondary, #515151);font-family:var(--ff-body, Tahoma);font-size:12px;font-style:normal;font-weight:700;line-height:16px;letter-spacing:0.32px}:host .control{background-blend-mode:multiply;border-radius:3px;box-shadow:0 0 0 1px #8B8B8B inset;transition:0.2s ease-in-out background-color;cursor:pointer;margin:0;box-sizing:border-box;font-family:inherit;font-size:100%;padding:0;border:0;appearance:none;background-color:var(--field-02, #FFF);text-align:start;inline-size:100%;position:relative;display:inline-flex;overflow:hidden;align-items:center;block-size:calc(100% + 1px);outline:none;padding-block:var(--dropdown-padding-y);padding-inline:var(--dropdown-padding-x);text-overflow:ellipsis;vertical-align:top;white-space:nowrap}:host .control_value,:host .control_placeholder{flex:1;margin:0;overflow:hidden;color:var(--text-primary, #333);user-select:none;text-overflow:ellipsis;white-space:nowrap;font-family:var(--fz-body, Tahoma);font-size:14px;font-style:normal;font-weight:400;line-height:18px;letter-spacing:0.16px;padding-inline:0 1rem}:host .control_placeholder{color:var(--text-placeholder, #ACACAC)}:host .control_icon{width:18px;height:18px}:host .control_icon.error{color:var(--support-error, #F1290E)}:host .control_icon.warning{color:var(--support-warning, #FF7F04)}:host .control_arrow{box-sizing:border-box;margin:0;font-size:100%;vertical-align:baseline;padding:0;border:0;appearance:none;background:none;text-align:start;display:flex;align-items:center;justify-content:center;block-size:1.5rem;inline-size:1.5rem;inset-inline-end:0.75rem;outline:none;transition:transform 70ms cubic-bezier(0.2, 0, 0.38, 0.9)}:host .control:hover{background-color:var(--field-hover-02, #E9E9E9)}:host .control:active{background-color:var(--layer-selected-02, #E3E3E3)}:host .options{inset-block-start:100%;margin-block-start:1px;display:block;max-block-size:13.75rem;box-shadow:0 2px 6px rgba(0, 0, 0, 0.3);position:absolute;z-index:10;inline-size:100%;inset-inline:0;overflow-y:auto;transition:max-height 0.11s cubic-bezier(0.2, 0, 0.38, 0.9);border-radius:3px;background-color:var(--field-02, #FFF);scrollbar-width:thin;scrollbar-color:var(--layer-accent-03) transparent}:host .options ::slotted(.xv-dropdown-item){display:block;max-block-size:13.75rem;inset-inline:0;box-sizing:border-box;padding:var(--dropdown-padding-y) calc(var(--dropdown-padding-x) + 16px) var(--dropdown-padding-y) var(--dropdown-padding-x);position:relative;cursor:pointer;overflow:hidden;color:var(--text-secondary, #515151);text-overflow:ellipsis;white-space:nowrap;font-family:var(--ff-body, Tahoma);font-size:var(--fz-md, 14px);font-style:normal;font-weight:400;line-height:18px;letter-spacing:0.16px;transition:0.2s ease-in-out background-color;user-select:none}:host .options ::slotted(.xv-dropdown-item):after{content:\"\";position:absolute;bottom:0;height:1px;left:10px;width:calc(100% - 20px);background-color:var(--border-subtle-01)}:host .options ::slotted(.xv-dropdown-item:hover){background-color:var(--layer-hover-02, #F7F7F7)}:host .options ::slotted(.xv-dropdown-item:active){background-color:var(--layer-selected-hover-02, #DADADA)}:host .options ::slotted(.xv-dropdown-item[selected]){background-color:var(--layer-selected-02, #E3E3E3)}:host .options ::slotted(.xv-dropdown-item[selected]:hover){background-color:var(--layer-selected-hover-02, #DADADA)}:host .options ::slotted(.xv-dropdown-item[disabled]){background-color:transparent;opacity:0.4;cursor:not-allowed}:host .helper{color:var(--text-helper, #646464);font-family:var(--ff-heading, \"IBM Plex Sans\");font-size:12px;font-style:normal;font-weight:400;line-height:16px;letter-spacing:0.32px;margin:0;padding:0}:host([open]) .control_arrow{transform:rotate(180deg)}:host([disabled]){opacity:0.4;cursor:not-allowed}:host([disabled]) .control{cursor:inherit}:host([disabled]) .control:hover,:host([disabled]) .control:active,:host([disabled]) .control:focus-within{background-color:transparent}:host([error]) .control{box-shadow:none;outline:2px solid var(--support-support-error, #F1290E)}:host([error]) .helper{color:var(--text-error, #D62512)}:host([size=xs]){--dropdown-padding-y:4px}:host([size=sm]){--dropdown-padding-y:7px}:host([size=md]){--dropdown-padding-y:11px}:host([size=lg]){--dropdown-padding-y:15px}:host([size=xl]){--dropdown-padding-y:16px}";
|
|
301
|
+
const xvDropdownCss = ":host{--dropdown-padding-x:16px;--dropdown-padding-y:11px;--dropdown-max-width:300px;display:block;position:relative;text-align:left;max-width:min(var(--dropdown-max-width), 100%)}:host .label{display:block;color:var(--text-secondary, #515151);font-family:var(--ff-body, Tahoma);font-size:12px;font-style:normal;font-weight:700;line-height:16px;letter-spacing:0.32px;margin-bottom:8px}:host .label ::slotted([slot=label]){color:var(--text-secondary, #515151);font-family:var(--ff-body, Tahoma);font-size:12px;font-style:normal;font-weight:700;line-height:16px;letter-spacing:0.32px}:host .label_info{margin-left:var(--spacing-02)}:host .control{background-blend-mode:multiply;border-radius:3px;box-shadow:0 0 0 1px #8B8B8B inset;transition:0.2s ease-in-out background-color;cursor:pointer;margin:0;box-sizing:border-box;font-family:inherit;font-size:100%;padding:0;border:0;appearance:none;background-color:var(--field-02, #FFF);text-align:start;inline-size:100%;position:relative;display:inline-flex;overflow:hidden;align-items:center;block-size:calc(100% + 1px);outline:none;padding-block:var(--dropdown-padding-y);padding-inline:var(--dropdown-padding-x);text-overflow:ellipsis;vertical-align:top;white-space:nowrap}:host .control_value,:host .control_placeholder{flex:1;margin:0;overflow:hidden;color:var(--text-primary, #333);user-select:none;text-overflow:ellipsis;white-space:nowrap;font-family:var(--fz-body, Tahoma);font-size:14px;font-style:normal;font-weight:400;line-height:18px;letter-spacing:0.16px;padding-inline:0 1rem}:host .control_placeholder{color:var(--text-placeholder, #ACACAC)}:host .control_icon{width:18px;height:18px}:host .control_icon.error{color:var(--support-error, #F1290E)}:host .control_icon.warning{color:var(--support-warning, #FF7F04)}:host .control_arrow{box-sizing:border-box;margin:0;font-size:100%;vertical-align:baseline;padding:0;border:0;appearance:none;background:none;text-align:start;display:flex;align-items:center;justify-content:center;block-size:1.5rem;inline-size:1.5rem;inset-inline-end:0.75rem;outline:none;transition:transform 70ms cubic-bezier(0.2, 0, 0.38, 0.9)}:host .control:hover{background-color:var(--field-hover-02, #E9E9E9)}:host .control:active{background-color:var(--layer-selected-02, #E3E3E3)}:host .options{inset-block-start:100%;margin-block-start:1px;display:block;max-block-size:13.75rem;box-shadow:0 2px 6px rgba(0, 0, 0, 0.3);position:absolute;z-index:10;inline-size:100%;inset-inline:0;overflow-y:auto;transition:max-height 0.11s cubic-bezier(0.2, 0, 0.38, 0.9);border-radius:3px;background-color:var(--field-02, #FFF);scrollbar-width:thin;scrollbar-color:var(--layer-accent-03) transparent}:host .options ::slotted(.xv-dropdown-item){display:block;max-block-size:13.75rem;inset-inline:0;box-sizing:border-box;padding:var(--dropdown-padding-y) calc(var(--dropdown-padding-x) + 16px) var(--dropdown-padding-y) var(--dropdown-padding-x);position:relative;cursor:pointer;overflow:hidden;color:var(--text-secondary, #515151);text-overflow:ellipsis;white-space:nowrap;font-family:var(--ff-body, Tahoma);font-size:var(--fz-md, 14px);font-style:normal;font-weight:400;line-height:18px;letter-spacing:0.16px;transition:0.2s ease-in-out background-color;user-select:none}:host .options ::slotted(.xv-dropdown-item):after{content:\"\";position:absolute;bottom:0;height:1px;left:10px;width:calc(100% - 20px);background-color:var(--border-subtle-01)}:host .options ::slotted(.xv-dropdown-item:hover){background-color:var(--layer-hover-02, #F7F7F7)}:host .options ::slotted(.xv-dropdown-item:active){background-color:var(--layer-selected-hover-02, #DADADA)}:host .options ::slotted(.xv-dropdown-item[selected]){background-color:var(--layer-selected-02, #E3E3E3)}:host .options ::slotted(.xv-dropdown-item[selected]:hover){background-color:var(--layer-selected-hover-02, #DADADA)}:host .options ::slotted(.xv-dropdown-item[disabled]){background-color:transparent;opacity:0.4;cursor:not-allowed}:host .helper{color:var(--text-helper, #646464);font-family:var(--ff-heading, \"IBM Plex Sans\");font-size:12px;font-style:normal;font-weight:400;line-height:16px;letter-spacing:0.32px;margin:4px 0 0;padding:0}:host([open]) .control_arrow{transform:rotate(180deg)}:host([disabled]){opacity:0.4;cursor:not-allowed}:host([disabled]) .control{cursor:inherit}:host([disabled]) .control:hover,:host([disabled]) .control:active,:host([disabled]) .control:focus-within{background-color:transparent}:host([error]) .control{box-shadow:none;outline:2px solid var(--support-support-error, #F1290E)}:host([error]) .helper{color:var(--text-error, #D62512)}:host([size=xs]){--dropdown-padding-y:4px}:host([size=sm]){--dropdown-padding-y:7px}:host([size=md]){--dropdown-padding-y:11px}:host([size=lg]){--dropdown-padding-y:15px}:host([size=xl]){--dropdown-padding-y:16px}";
|
|
224
302
|
|
|
225
303
|
const XvDropdown = class {
|
|
226
304
|
constructor(hostRef) {
|
|
@@ -316,7 +394,7 @@ const XvDropdown = class {
|
|
|
316
394
|
this.changeSelection.emit(this.setSelected(this.selectedMap, optionElements));
|
|
317
395
|
}
|
|
318
396
|
render() {
|
|
319
|
-
return (index.h(index.Host, { key: '
|
|
397
|
+
return (index.h(index.Host, { key: 'cf4b8675fda5fc256ecfa65392ce7d9b84e60001', class: "xv-dropdown", role: "combobox", size: this.size, open: this.open, error: this.error, disabled: this.disabled, tabindex: this.disabled ? -1 : false }, index.h("label", { key: '6abb497a5433793d78fa6b97cf5352ad504f0701', class: "label" }, index.h("slot", { key: '79f5a85651877363fe9dacfd94a9fa9cf976427f', name: "label" }, this.label), this.info && index.h("xv-tooltip-v2", { key: 'a59e782b561fd1211712c01c2cdd9b51179de50e', class: "label_info", message: this.info })), index.h("div", { key: '225fc111e3fd2d4859f25d9e89d576b6159397bb', class: "xv-dropdown-control control", onClick: this.handleOpen }, this.selected.length ? (index.h("p", { class: "control_value" }, this.selected.join(', '))) : (index.h("p", { class: "control_placeholder" }, this.placeholder || '')), this.renderIcon(), index.h("svg", { key: '43f6747c6e9b62d50805850ab2a26bf7e394abd5', class: "control_arrow", focusable: "false", preserveAspectRatio: "xMidYMid meet", xmlns: "http://www.w3.org/2000/svg", fill: "currentColor", "aria-hidden": "true", width: "16", height: "16", viewBox: "0 0 16 16" }, index.h("path", { key: 'df561b1bd2769206ff430822e3bc2d3090aacb0c', d: "M8 11L3 6 3.7 5.3 8 9.6 12.3 5.3 13 6z" }))), this.open && index.h("div", { key: '29bc50da8263de51f8b4d699bccde8c827b10a55', class: "options" }, index.h("slot", { key: "xv-dropdown-options" })), (this.helper || this.error || this.warning) && (index.h("p", { key: '8c912b8acbd55f49f6626112a4f38890906ddf03', class: "helper" }, this.error || this.warning || this.helper))));
|
|
320
398
|
}
|
|
321
399
|
componentWillLoad() {
|
|
322
400
|
this.setDefaultValues();
|
|
@@ -366,7 +444,7 @@ const XvDropdownItem = class {
|
|
|
366
444
|
});
|
|
367
445
|
}
|
|
368
446
|
render() {
|
|
369
|
-
return (index.h(index.Host, { key: '
|
|
447
|
+
return (index.h(index.Host, { key: '74a8a783a58af3d074bf888e3f520214910761e7', class: "xv-dropdown-item", value: this.value, role: "option", tabindex: this.disabled ? -1 : false }, index.h("slot", { key: '7b404292d6992ca6c260c488ba8668f214741399' }), this.selected && index.h("span", { key: '46ab6ec0b6b699af0325924a42b51166640d079a', class: "checkmark" })));
|
|
370
448
|
}
|
|
371
449
|
componentWillLoad() {
|
|
372
450
|
if (!this.value)
|
|
@@ -376,6 +454,129 @@ const XvDropdownItem = class {
|
|
|
376
454
|
};
|
|
377
455
|
XvDropdownItem.style = xvDropdownItemCss;
|
|
378
456
|
|
|
457
|
+
var XvFileUploaderVariants;
|
|
458
|
+
(function (XvFileUploaderVariants) {
|
|
459
|
+
XvFileUploaderVariants["BUTTON"] = "button";
|
|
460
|
+
XvFileUploaderVariants["DRAG_DROP"] = "drag-drop";
|
|
461
|
+
})(XvFileUploaderVariants || (XvFileUploaderVariants = {}));
|
|
462
|
+
|
|
463
|
+
const xvFileUploaderCss = ":host{font-family:inherit;display:flex;flex-direction:column;gap:var(--spacing-05);font-size:14px}:host .label{font-weight:600;font-size:1em;color:var(--text-primary)}:host .description{font-size:1em;margin:0;color:var(--text-secondary)}:host .upload-btn{padding:0 1.14em;border-radius:0.285em;background-color:var(--background-inverse);color:var(--text-inverse);border:none;cursor:pointer;font-size:1em;height:2.86em;transition:250ms ease-in-out background-color}:host .upload-btn:hover{background-color:var(--background-inverse-hover)}:host .drop-zone{border:1px dashed var(--border-strong-01);background-color:transparent;padding:1.14em;border-radius:0.285em;transition:border-color 0.2s ease, background-color 0.2s ease;font-size:1em;cursor:pointer}:host .drop-zone.active{border-color:var(--border-interactive);background-color:var(--background-active)}:host .drop-zone:hover{background-color:var(--background-hover)}:host .file-list{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:8px}:host .file-list .file{border-radius:3px;background-color:var(--layer-01, #F7F7F7);font-size:1em}:host .file-list .file_container{padding:var(--spacing-04) var(--spacing-05);display:flex;justify-content:space-between;align-items:center}:host .file-list .file_container_name{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;color:var(--text-primary, #333);font-style:normal;font-weight:400;line-height:128.571%;letter-spacing:0.16px;padding-right:var(--spacing-04)}:host .file-list .file_container_errorIcon{color:var(--text-error);margin-right:var(--spacing-03)}:host .file-list .file.withError{outline:2px solid var(--support-error)}:host .error-container{padding:var(--spacing-04) var(--spacing-05);border-top:1px solid var(--border-subtle-01);font-size:0.858em;font-style:normal;font-weight:400;color:var(--text-error)}:host .error-container_primary,:host .error-container_secondary{margin:0;padding:0}:host .error-container__secondary{color:var(--text-secondary, #515151)}:host(.disabled){pointer-events:none;opacity:0.6}:host(.disabled) .upload-btn,:host(.disabled) .drop-zone{cursor:not-allowed;background-color:var(--button-disabled-background, #ccc);color:var(--button-disabled-text, #666);border-color:var(--border-disabled, #bbb)}:host(.disabled) .remove-btn{display:none}:host([size=xs]){font-size:10px}:host([size=sm]){font-size:12px}:host([size=md]){font-size:14px}:host([size=lg]){font-size:18px}:host([size=xl]){font-size:22px}";
|
|
464
|
+
|
|
465
|
+
const XvFileUploader = class {
|
|
466
|
+
constructor(hostRef) {
|
|
467
|
+
index.registerInstance(this, hostRef);
|
|
468
|
+
this.filesChange = index.createEvent(this, "filesChange");
|
|
469
|
+
this.variant = XvFileUploaderVariants.BUTTON;
|
|
470
|
+
this.size = SIZE_VAR.MD;
|
|
471
|
+
this.accept = [];
|
|
472
|
+
this.maxFileSizeMB = 5;
|
|
473
|
+
this.maxFiles = 20;
|
|
474
|
+
this.multiple = true;
|
|
475
|
+
this.files = [];
|
|
476
|
+
this.loadingStates = [];
|
|
477
|
+
this.errors = [];
|
|
478
|
+
this.dragActive = false;
|
|
479
|
+
this.errorMessages = [];
|
|
480
|
+
this.onFileSelect = (event) => {
|
|
481
|
+
const input = event.target;
|
|
482
|
+
const selectedFiles = Array.from(input.files || []);
|
|
483
|
+
this.handleFiles(selectedFiles);
|
|
484
|
+
};
|
|
485
|
+
this.onDrop = (event) => {
|
|
486
|
+
var _a;
|
|
487
|
+
event.preventDefault();
|
|
488
|
+
this.dragActive = false;
|
|
489
|
+
const droppedFiles = Array.from(((_a = event.dataTransfer) === null || _a === void 0 ? void 0 : _a.files) || []);
|
|
490
|
+
this.handleFiles(droppedFiles);
|
|
491
|
+
};
|
|
492
|
+
this.handleFiles = (files) => {
|
|
493
|
+
this.files = this.validation(this.multiple ? [...this.files, ...files] : files);
|
|
494
|
+
this.filesChange.emit(this.files);
|
|
495
|
+
};
|
|
496
|
+
this.onDragOver = (event) => {
|
|
497
|
+
event.preventDefault();
|
|
498
|
+
this.dragActive = true;
|
|
499
|
+
};
|
|
500
|
+
this.onDragLeave = () => {
|
|
501
|
+
this.dragActive = false;
|
|
502
|
+
};
|
|
503
|
+
}
|
|
504
|
+
validation(files) {
|
|
505
|
+
var _a;
|
|
506
|
+
const maxSize = this.maxFileSizeMB * 1024 * 1024;
|
|
507
|
+
const seenFileNames = new Set();
|
|
508
|
+
const errorMessages = [];
|
|
509
|
+
const uniqueFiles = [];
|
|
510
|
+
for (const file of files) {
|
|
511
|
+
let error = null;
|
|
512
|
+
if (!seenFileNames.has(file.name)) {
|
|
513
|
+
seenFileNames.add(file.name);
|
|
514
|
+
uniqueFiles.push(file);
|
|
515
|
+
}
|
|
516
|
+
const extension = (_a = file.name.split('.').pop()) === null || _a === void 0 ? void 0 : _a.toLowerCase();
|
|
517
|
+
const isAccepted = this.accept.length === 0 ||
|
|
518
|
+
this.accept.some(type => {
|
|
519
|
+
const normalized = type.toLowerCase().replace(/^\./, '');
|
|
520
|
+
return normalized === extension;
|
|
521
|
+
});
|
|
522
|
+
if (!isAccepted) {
|
|
523
|
+
error = 'Unsupported file type.';
|
|
524
|
+
}
|
|
525
|
+
else if (file.size > maxSize) {
|
|
526
|
+
error = `File ${file.name} is too large.`;
|
|
527
|
+
}
|
|
528
|
+
errorMessages.push(error);
|
|
529
|
+
}
|
|
530
|
+
this.error = uniqueFiles.length > this.maxFiles
|
|
531
|
+
? `Only ${this.maxFiles} file(s) allowed.`
|
|
532
|
+
: null;
|
|
533
|
+
this.errorMessages = errorMessages;
|
|
534
|
+
return uniqueFiles;
|
|
535
|
+
}
|
|
536
|
+
removeFile(index) {
|
|
537
|
+
this.files = this.validation([...this.files.slice(0, index), ...this.files.slice(index + 1)]);
|
|
538
|
+
this.filesChange.emit(this.files);
|
|
539
|
+
if (this.fileInput) {
|
|
540
|
+
this.fileInput.value = '';
|
|
541
|
+
}
|
|
542
|
+
}
|
|
543
|
+
render() {
|
|
544
|
+
var _a;
|
|
545
|
+
return (index.h(index.Host, { key: '92aef18b84c7ff27bffa4e08f277037b8c980269', class: { 'upload-wrapper': true, [`uploader-${this.size}`]: true, disabled: !!this.disabled } }, this.label && index.h("label", { key: 'a1249cbce402d895e28417f0ea3b7be0432939a5', class: "label" }, this.label), this.description && index.h("p", { key: '5c3000bcdeea9a0952f67e6f09b38f476eb5380d', class: "description" }, this.description), this.variant === 'button' ? (index.h("button", { disabled: this.disabled, class: "upload-btn", onClick: () => this.fileInput.click() }, this.addText || 'Dateien auswählen')) : (index.h("div", { class: { 'drop-zone': true, active: this.dragActive }, onDrop: this.onDrop, onDragOver: this.onDragOver, onDragLeave: this.onDragLeave, onClick: () => this.fileInput.click() }, this.addText || 'Dateien hierher ziehen oder darauf klicken, um eine Datei auszuwählen.', ((_a = this.accept) === null || _a === void 0 ? void 0 : _a.length) > 0 && index.h("span", null, " (", this.accept.join(', '), ")"))), index.h("input", { key: '0b0d4765dacd6dd3d0a9afb5b761976018728502', ref: el => (this.fileInput = el), type: "file", hidden: true, onChange: this.onFileSelect, multiple: this.multiple, accept: this.accept.map(type => `.${type}`).join(',') }), index.h("ul", { key: 'f6f1a14ab1d2a705018ffed46ff6b3439bcedd1b', class: "file-list" }, this.files.map((file, index$1) => {
|
|
546
|
+
var _a, _b;
|
|
547
|
+
return (index.h("li", { class: { file: true, withError: !!(((_a = this.errors) === null || _a === void 0 ? void 0 : _a[index$1]) || ((_b = this.errorMessages) === null || _b === void 0 ? void 0 : _b[index$1])) } }, index.h("div", { class: "file_container" }, index.h("span", { class: "file_container_name" }, file.name), this._renderLoaderState(index$1)), this._renderError(index$1)));
|
|
548
|
+
})), this.error && (index.h("div", { key: 'aa38b9ddbcebdd48c166dcc1a007549b6665b718', class: "error-container" }, index.h("p", { key: 'a421c517fe2681b089ac13d88a4bca1c6edde44c', class: "error-container_primary" }, this.error)))));
|
|
549
|
+
}
|
|
550
|
+
_renderLoaderState(index$1) {
|
|
551
|
+
var _a, _b, _c;
|
|
552
|
+
const state = ((_a = this.loadingStates) === null || _a === void 0 ? void 0 : _a[index$1]) || null;
|
|
553
|
+
const errorIcon = ((_b = this.errors) === null || _b === void 0 ? void 0 : _b[index$1]) || ((_c = this.errorMessages) === null || _c === void 0 ? void 0 : _c[index$1]) ? (index.h("svg", { class: "file_container_errorIcon", width: "16", height: "16", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512" }, index.h("path", { fill: "currentColor", d: "M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm0-384c13.3 0 24 10.7 24 24l0 112c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-112c0-13.3 10.7-24 24-24zM224 352a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z" }))) : null;
|
|
554
|
+
switch (state) {
|
|
555
|
+
case 'loading':
|
|
556
|
+
return (index.h(index.Fragment, null, errorIcon, index.h("xv-loader-v2", { size: SIZE_VAR.XS })));
|
|
557
|
+
case 'success':
|
|
558
|
+
return (index.h(index.Fragment, null, errorIcon, index.h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 18 16", fill: "none" }, index.h("path", { d: "M9 16C6.125 16 3.5 14.5 2.0625 12C0.625 9.53125 0.625 6.5 2.0625 4C3.5 1.53125 6.125 0 9 0C11.8438 0 14.4688 1.53125 15.9062 4C17.3438 6.5 17.3438 9.53125 15.9062 12C14.4688 14.5 11.8438 16 9 16ZM12.5312 6.53125H12.5C12.8125 6.25 12.8125 5.78125 12.5 5.46875C12.2188 5.1875 11.75 5.1875 11.4688 5.46875L8 8.96875L6.53125 7.5C6.21875 7.1875 5.75 7.1875 5.46875 7.5C5.15625 7.78125 5.15625 8.25 5.46875 8.53125L7.46875 10.5312C7.75 10.8438 8.21875 10.8438 8.53125 10.5312L12.5312 6.53125Z", fill: "#97BF0D" }))));
|
|
559
|
+
case 'uploaded':
|
|
560
|
+
default:
|
|
561
|
+
return (index.h(index.Fragment, null, errorIcon, index.h("xv-button-v2", { variant: "ghost", size: SIZE_VAR.XS, onClick: () => this.removeFile(index$1) }, index.h("span", { slot: "icon-left" }, "\u00D7"))));
|
|
562
|
+
}
|
|
563
|
+
}
|
|
564
|
+
_renderError(index$1) {
|
|
565
|
+
var _a, _b;
|
|
566
|
+
const error = ((_a = this.errors) === null || _a === void 0 ? void 0 : _a[index$1]) || ((_b = this.errorMessages) === null || _b === void 0 ? void 0 : _b[index$1]);
|
|
567
|
+
if (!error)
|
|
568
|
+
return;
|
|
569
|
+
if (typeof error === 'object') {
|
|
570
|
+
return (index.h("div", { class: "error-container" }, index.h("p", { class: "error-container_primary" }, error.primary), index.h("p", { class: "error-container_secondary" }, error.secondary)));
|
|
571
|
+
}
|
|
572
|
+
if (typeof error === 'string') {
|
|
573
|
+
return (index.h("div", { class: "error-container" }, index.h("p", { class: "error-container_primary" }, error)));
|
|
574
|
+
}
|
|
575
|
+
return null;
|
|
576
|
+
}
|
|
577
|
+
};
|
|
578
|
+
XvFileUploader.style = xvFileUploaderCss;
|
|
579
|
+
|
|
379
580
|
const xvFooterCss = ".svg-assets--src--project--images--svg-sprite--youtube,.svg-assets--src--project--images--svg-sprite--xing,.svg-assets--src--project--images--svg-sprite--vorkasse,.svg-assets--src--project--images--svg-sprite--visa,.svg-assets--src--project--images--svg-sprite--sepa,.svg-assets--src--project--images--svg-sprite--paypal,.svg-assets--src--project--images--svg-sprite--mastercard,.svg-assets--src--project--images--svg-sprite--linkedin,.svg-assets--src--project--images--svg-sprite--kauf-auf-rechnung,.svg-assets--src--project--images--svg-sprite--instagram,.svg-assets--src--project--images--svg-sprite--facebook{background:url(\"https://crossvertise.blob.core.windows.net/assets/images/xv-sprite.svg\") no-repeat}.svg-assets--src--project--images--svg-sprite--facebook{background-position:0 100%;width:32px;height:32px}.svg-assets--src--project--images--svg-sprite--instagram{background-position:14.5454545455% 100%;width:32px;height:32px}.svg-assets--src--project--images--svg-sprite--kauf-auf-rechnung{background-position:0 0;width:84px;height:58px}.svg-assets--src--project--images--svg-sprite--linkedin{background-position:29.0909090909% 100%;width:32px;height:32px}.svg-assets--src--project--images--svg-sprite--mastercard{background-position:50% 0;width:84px;height:58px}.svg-assets--src--project--images--svg-sprite--paypal{background-position:0 64.4444444444%;width:84px;height:58px}.svg-assets--src--project--images--svg-sprite--sepa{background-position:50% 64.4444444444%;width:84px;height:58px}.svg-assets--src--project--images--svg-sprite--visa{background-position:100% 0;width:84px;height:58px}.svg-assets--src--project--images--svg-sprite--vorkasse{background-position:100% 64.4444444444%;width:84px;height:58px}.svg-assets--src--project--images--svg-sprite--xing{background-position:43.6363636364% 100%;width:32px;height:32px}.svg-assets--src--project--images--svg-sprite--youtube{background-position:58.1818181818% 100%;width:32px;height:32px}.sprite-icon-beachten{background-image:url(https://crossvertise.blob.core.windows.net/assets/images/xv-sprite.png?1739974291120);background-position:-90px 0px;width:80px;height:80px}.sprite-icon-buchen{background-image:url(https://crossvertise.blob.core.windows.net/assets/images/xv-sprite.png?1739974291120);background-position:0px -82px;width:80px;height:80px}.sprite-icon-direct{background-image:url(https://crossvertise.blob.core.windows.net/assets/images/xv-sprite.png?1739974291120);background-position:-284px -99px;width:21px;height:21px}.sprite-icon-downloads{background-image:url(https://crossvertise.blob.core.windows.net/assets/images/xv-sprite.png?1739974291120);background-position:-80px -82px;width:80px;height:80px}.sprite-icon-kino{background-image:url(https://crossvertise.blob.core.windows.net/assets/images/xv-sprite.png?1739974291120);background-position:-305px -99px;width:21px;height:21px}.sprite-icon-kosten{background-image:url(https://crossvertise.blob.core.windows.net/assets/images/xv-sprite.png?1739974291120);background-position:-170px 0px;width:80px;height:80px}.sprite-icon-kreation{background-image:url(https://crossvertise.blob.core.windows.net/assets/images/xv-sprite.png?1739974291120);background-position:-170px -80px;width:80px;height:80px}.sprite-icon-logo-full{background-image:url(https://crossvertise.blob.core.windows.net/assets/images/xv-sprite.png?1739974291120);background-position:0px -242px;width:189px;height:32px}.sprite-icon-logo-small{background-image:url(https://crossvertise.blob.core.windows.net/assets/images/xv-sprite.png?1739974291120);background-position:-250px -99px;width:34px;height:34px}.sprite-icon-mobile{background-image:url(https://crossvertise.blob.core.windows.net/assets/images/xv-sprite.png?1739974291120);background-position:-326px -99px;width:21px;height:21px}.sprite-icon-online{background-image:url(https://crossvertise.blob.core.windows.net/assets/images/xv-sprite.png?1739974291120);background-position:-347px -99px;width:21px;height:21px}.sprite-icon-partner-agma{background-image:url(https://crossvertise.blob.core.windows.net/assets/images/xv-sprite.png?1739974291120);background-position:-250px -66px;width:88px;height:33px}.sprite-icon-partner-bvdw{background-image:url(https://crossvertise.blob.core.windows.net/assets/images/xv-sprite.png?1739974291120);background-position:-338px -66px;width:88px;height:33px}.sprite-icon-partner-climate{background-image:url(https://crossvertise.blob.core.windows.net/assets/images/xv-sprite.png?1739974291120);background-position:-250px 0px;width:186px;height:33px}.sprite-icon-partner-google{background-image:url(https://crossvertise.blob.core.windows.net/assets/images/xv-sprite.png?1739974291120);background-position:0px 0px;width:90px;height:82px}.sprite-icon-partner-microsoft{background-image:url(https://crossvertise.blob.core.windows.net/assets/images/xv-sprite.png?1739974291120);background-position:-250px -33px;width:186px;height:33px}.sprite-icon-plakat{background-image:url(https://crossvertise.blob.core.windows.net/assets/images/xv-sprite.png?1739974291120);background-position:-368px -99px;width:21px;height:21px}.sprite-icon-print{background-image:url(https://crossvertise.blob.core.windows.net/assets/images/xv-sprite.png?1739974291120);background-position:-389px -99px;width:21px;height:21px}.sprite-icon-radio{background-image:url(https://crossvertise.blob.core.windows.net/assets/images/xv-sprite.png?1739974291120);background-position:-410px -99px;width:21px;height:21px}.sprite-icon-services{background-image:url(https://crossvertise.blob.core.windows.net/assets/images/xv-sprite.png?1739974291120);background-position:-250px -133px;width:21px;height:21px}.sprite-icon-topangebote{background-image:url(https://crossvertise.blob.core.windows.net/assets/images/xv-sprite.png?1739974291120);background-position:-271px -133px;width:21px;height:21px}.sprite-icon-tv{background-image:url(https://crossvertise.blob.core.windows.net/assets/images/xv-sprite.png?1739974291120);background-position:-292px -133px;width:21px;height:21px}.sprite-icon-werbeformen{background-image:url(https://crossvertise.blob.core.windows.net/assets/images/xv-sprite.png?1739974291120);background-position:0px -162px;width:80px;height:80px}";
|
|
380
581
|
|
|
381
582
|
const Xvfooter = class {
|
|
@@ -394,7 +595,7 @@ const Xvfooter = class {
|
|
|
394
595
|
}
|
|
395
596
|
}
|
|
396
597
|
render() {
|
|
397
|
-
return (index.h("footer", { key: '
|
|
598
|
+
return (index.h("footer", { key: '25f7acefd3d83e3f85547e0c3165eba04cae14bc' }, index.h("div", { key: 'df924fadef964c0736fc9d88de8e27f034e0da16', innerHTML: this.htmlContent })));
|
|
398
599
|
}
|
|
399
600
|
get el() { return index.getElement(this); }
|
|
400
601
|
};
|
|
@@ -434,7 +635,7 @@ const XvHeader = class {
|
|
|
434
635
|
}
|
|
435
636
|
}
|
|
436
637
|
render() {
|
|
437
|
-
return (index.h("div", { key: '
|
|
638
|
+
return (index.h("div", { key: 'f1fa7a66f5646c91c3bec60242259aa47b9916db', id: "nav-container", class: "xv-header" }, index.h("nav", { key: '93c1d68ba793edb98ff140ab2cb3be7a3a14b4aa', class: "navbar navbar-default navbar-fixed-top backend-force-relative" }, index.h("div", { key: 'b031c74cb7fa6803bc5d18c3dbff11adb4b51ef6', class: "container" }, index.h("div", { key: 'ab24ec15ae5109b66b93ac2c66cc85a0c5bc997d', class: "row" }, index.h("div", { key: '40e7c0208009bdb2011e4ec38a31dda850622dd3', class: "col-sm-3 col-xs-3 col-xxs-4 no-padding-right" }, index.h("div", { key: '3e73dead56efa1c7c0a2f8feff92321306a40755', class: "navbar-header" }, index.h("button", { key: 'edbd2b2b4270f600043ba51284ea871131e0f2d9', class: "btn btn-default navbar-toggle pull-left navbar-btn", "data-toggle": "collapse", "data-target": "#main-menu" }, index.h("i", { key: '2fb6c9fbc127eac495fff5c0f93d250c980b58b1', class: "fa fa-bars fa-lg", "aria-hidden": "true" })), index.h("div", { key: 'adfe681e34aa6c609557641e9af0df662e78ffd3', class: "visible-xs-inline" }, index.h("a", { key: '932c99d3e3ddba203ea97fd576fe9152d9f72a16', href: "https://www.crossvertise.com/", class: "navbar-brand" }, index.h("img", { key: 'e05d25ae3af59d77590e43a132ad9e97ff546fae', src: "https://www.crossvertise.com/ResourcePackages/Bootstrap/assets/dist/images/logo-small.svg", alt: "Crossvertise" }))), index.h("div", { key: '8484fe0e888857d086989e9f4cc7caef8bf58fe8', class: "hidden-xs" }, index.h("a", { key: '9b000a2b4efc8a60f3b0f18278cabd28e021b972', href: "https://www.crossvertise.com/", class: "navbar-brand" }, index.h("img", { key: 'a96d1afff0c35c21c51475205fa7094fdd803f13', loading: "lazy", src: "https://www.crossvertise.com/ResourcePackages/Bootstrap/assets/dist/images/logo.svg", alt: "Crossvertise" }))))), index.h("div", { key: '920f52e74137ae786c32b4f15d4da2d48824082e', class: "col-sm-9 col-xs-9 col-xxs-8 no-padding-left" }, index.h("ul", { key: '098d6fa397ce40a65e7d0e56beebf9b855683e74', class: "nav nav-pills nav-meta pull-right" }, index.h("li", { key: 'e69db80df8e0fdce4dbdfaf3460a6baa85b7455f' }, index.h("a", { key: '1bd1de4852603bcc7380cbb0b13943b7c46f3a18', class: "btn btn-link navbar-btn hidden-xs", href: "#" }, index.h("i", { key: '03059f6b70ddf78c0eab55fb57291a5dfdefdaab', class: "fa fa-user" }), index.h("i", { key: 'cf8e0d2f1533be362ae2d44379bf81ffeca94a62', class: "fa fa-exchange-alt" }))), index.h("li", { key: '5508f231657ec2ecb34d26f1fbdfe1bcd81c9bfc' }, index.h("a", { key: '81ac0da6631bc11aea5620dc949c856495cda486', class: "btn btn-link navbar-btn hidden-xs", href: "#" }, "Kontakt"), index.h("a", { key: 'af1b609f44b88f51dbaad88bb035171d491f30c7', href: "https://www.crossvertise.com/contact", class: "btn btn-link navbar-btn hidden-xs", style: { display: 'none' } }, "Kontakt"), index.h("a", { key: '25ab2f195433651bc6c46f0e04825b21c1e857fd', class: "btn btn-default btn-link navbar-btn visible-xs hidden-xxs", href: "#" }, index.h("i", { key: 'cb595bdb1fc64f93da1de0072b9cd2e9d22e7f54', class: "fa fa-phone" }))), index.h("li", { key: 'd817905dac3ad0ad06ff2222b5e6cf5cf1588850', class: "dropdown", id: "my-xv-menu" }, index.h("a", { key: '89d84fa4b57677b6da2f9760c596e726be3d7840', href: "#", class: "dropdown-toggle btn btn-default navbar-btn btn-link", "data-toggle": "dropdown" }, index.h("i", { key: '3cc519aa50ff205461f272880218eaa147ae3c2c', class: "fa fa-user fa-lg text-success", "aria-hidden": "true" }), "\u00A0", index.h("span", { key: '54e5571967500594d1d81b94d3344ebfc43d5e76', class: "hidden-xs" }, "Mein Bereich"), index.h("span", { key: 'd94f684d2e92cae8fbfa7801096fb9cf68a77a0d', class: "caret" })), index.h("ul", { key: '3fc48bc0efea55e776c3090ecfa11488b7b3b660', class: "dropdown-menu-left dropdown-menu navbar-myxv" }, index.h("li", { key: 'fdc28d4743e5ff08a7ad82aa832ce4b2b0cda2c9' }, index.h("a", { key: 'd6299037715fd7334908cf46aa1363c7c6b93628', href: "#" }, index.h("i", { key: 'bbef2ea537e2ac45ddb96b9a1c75385b74ab27bd', class: "fa fa-tachometer-alt fa-fw" }), "\u00A0Cockpitfunktionen\u00A0", index.h("i", { key: '3180f5eb463d952208c5dab92df10bf1d91188d4', class: "fa fa-caret-down" }))), index.h("li", { key: 'ab0801ac2ce1accdd4f3181bae621ceb5622085d' }, index.h("a", { key: 'c301aa9512a9e10a8e75714143cdc79b133f0f79', href: "#" }, index.h("i", { key: 'c66fc798ef7c26fd578bd4dfb52aad0fe0058079', class: "fa fa-cubes" }), "\u00A0Entit\u00E4ten\u00A0", index.h("i", { key: 'f4d020afc421e0da2825952c1734c2527ed768b3', class: "fa fa-caret-down" }))), index.h("li", { key: 'dad4a83d6d3b5a3fe2ae83f85c09c1482fd6c029', role: "separator", class: "divider" }), index.h("li", { key: '1227163cae5a535c37b314c10dddfe57d26def4d' }, index.h("a", { key: '4c1421bfd184e329f0502b8c63b0b40f54f6417b', href: "#" }, index.h("i", { key: 'acee487f4eca767f942a8ca77a1fe848c793f6af', class: "fa fa-user" }), "\u00A0Mein Crossvertise\u00A0", index.h("span", { key: '237f3d89333d7325043ea34c9bbb65eebe734768', class: "badge" }, "0"), index.h("i", { key: '6470c884f34df3018a14a61dd872d101fdc693f4', class: "fa fa-caret-down" }))), index.h("li", { key: '280fef33a19151ba180aeeba866cb006027515d0' }, index.h("a", { key: '00136d3e0a8742f546051400117f6a62cc4561d3', href: "https://www.crossvertise.com/de-de/mycrossvertise/account/logoff?returnUrl=https%3A%2F%2Fwww.crossvertise.com" }, index.h("i", { key: 'acda646a3b0e50dcc65002faf717effadc73b2eb', class: "fa fa-sign-out-alt fa-fw", "aria-hidden": "true" }), "\u00A0Logout")))), index.h("li", { key: '97f77e84bf17ef45a321590f4092a1e8efbce5d3', class: "visible-sm-block visible-xs-block hidden-xxs" }, index.h("a", { key: 'cbd99563d2a807763386d8d11dc9b5c8500e06f1', class: "btn btn-default navbar-btn btn-link", "data-toggle": "collapse", "data-target": "#search-collapse" }, index.h("i", { key: 'dcda6727eca7a6d323e5a8b222fe5d9cf1f51e3b', class: "fa fa-search", "aria-hidden": "true" }))), index.h("li", { key: 'f4f79c26e331795f069863e9d808c25ba826d909', class: "hidden-xs hidden-sm" }, index.h("a", { key: '8cc458cced48ab651861abc7cb3392e78a7f2d82', role: "button", onClick: this.openLoginModal, class: "btn btn-default navbar-btn btn-link" }, index.h("i", { key: 'fc4ad896ef0c0133e7cd5e004f4305232c2f8736', class: "fa fa-user fa-lg", "aria-hidden": "true" }), index.h("span", { key: '3a18b0ada04b3dc59c745bac9fbb9c913a1f285b' }, "Login"))), index.h("xv-login-modal", { key: 'eb76a226443b6ce861c90ebdc42b4dd18487a7ea', visible: this.showLoginModal, onClose: this.closeLoginModal }), index.h("li", { key: '3926d6711fadd3101a47fd5ad44dd34e1b4ea41f', class: "hidden-xs" }, index.h("a", { key: '54c7d9a8880732540ccaea643f08e55df857c80a', class: "btn btn-default navbar-btn btn-link", href: "https://market.crossvertise.com/de-de/mycrossvertise/account/register" }, index.h("span", { key: 'a886fd9515fd42a787a0bee5782739100ba2a874' }, "Registrieren"))), index.h("li", { key: 'bb728014870b1ee825ae44e05e435b4f249ae943', class: "navbar-divider hidden-xs" }), index.h("li", { key: '686a75dc0b4f4d544e2e4a58bceb9220bf584401' }, index.h("a", { key: '7a5501d91d1e80ecbf3e1cff254d9ed8404cb4a6', class: "btn btn-success navbar-btn", href: "https://market.crossvertise.com/de-de/mycrossvertise/shoppingcart/activecart" }, index.h("span", { key: '3907db53aca750a7af24a40f30078c8cb3f12f0a', class: "xv-font-icon-warenkorb fa-lg fa-fw", "aria-hidden": "true" }), index.h("span", { key: '0f9fbbe251f1f95dcfd7a55af4613b119291a1c5', class: "hidden-xs hidden-sm" }, "\u00A0Warenkorb\u00A0"), index.h("span", { key: '9a5a84b9ee050a8a2d9cd8a51a63a6bcecef6f72', class: "badge badge-success" }, "0"))))))), index.h("div", { key: 'd558a444b34b0c9b78eb2ffba68cfb4cad2783e7', class: "collapse hidden-md hidden-lg", id: "search-collapse" }, index.h("div", { key: 'cdfdc3c8481eed737bc36d0cc559ec0cfa60a431', class: "container" }, index.h("form", { key: 'fe2253d8cb3d211b59a7898d696631a9f74ec6f6', action: "https://market.crossvertise.com/de-de/media/search", class: "navbar-form", method: "get", role: "search" }, index.h("div", { key: '8d0722f3ba685197514c2c7f0d255c7dd59fb40e', class: "input-group" }, index.h("input", { key: '3827a888727f94f7e84920f544a50235a5c10bec', class: "form-control", name: "Q", placeholder: "Suche", type: "text", autocomplete: "off" }), index.h("span", { key: '93748c9301681f31497cbcedc0a989e794bbd2d7', class: "input-group-btn force-full-width" }, index.h("button", { key: 'cf00efc17ded1365ee4f5dfdbed70e2e309c8ccc', class: "btn btn-default search-addon", type: "submit" }, index.h("i", { key: '38f9d4c2cf46da5fbc8ff31f5ee4e1e7f93ee5eb', class: "fa fa-search", "aria-hidden": "true" })))))))), index.h("div", { key: '9885522bb7260b13e95036e79c181b5924f41bc9', innerHTML: this.htmlContent })));
|
|
438
639
|
}
|
|
439
640
|
get el() { return index.getElement(this); }
|
|
440
641
|
};
|
|
@@ -456,7 +657,7 @@ const XvLink = class {
|
|
|
456
657
|
e.stopPropagation();
|
|
457
658
|
}
|
|
458
659
|
render() {
|
|
459
|
-
return (index.h(index.Host, { key: '
|
|
660
|
+
return (index.h(index.Host, { key: 'a1abb193eeb641ee9e3b8fea49799d1ea6a245bd', class: `xv-link_${this.variant}` }, index.h("a", { key: '64f2b949fd2069201c5b046b6d1ac5dfc645859f', href: this.href, onClick: this.preventLinkHandler.bind(this), class: `xv-link ${this.disabled ? 'xv-link_disabled' : ''} ${this.size}`, target: this.target }, index.h("slot", { key: '7fc045a8dceb6c8682b4e8b1711d5fc26a8acebf', name: "icon-left" }), index.h("slot", { key: '9034c94df501fcf307b3e5f56161ac3cf128862a' }), index.h("slot", { key: '67290ba58714e87e92f4a4b7a9f13050a0ee6ed4', name: "icon-right" }))));
|
|
460
661
|
}
|
|
461
662
|
};
|
|
462
663
|
XvLink.style = xvLinkCss;
|
|
@@ -632,7 +833,7 @@ const XvModal = class {
|
|
|
632
833
|
}
|
|
633
834
|
render() {
|
|
634
835
|
var _a;
|
|
635
|
-
return (index.h(index.Host, { key: '
|
|
836
|
+
return (index.h(index.Host, { key: '7d7317c22e0ad0318e3f2dd191bfb77c75cd714e', role: "dialog", size: this.size, id: this.el.id }, index.h("slot", { key: '33f447364a130b66b01d2c15e14dd8e9c5524abe', name: "trigger", onSlotchange: this.setupTrigger }), index.h("div", { key: '102daec2e60b1062b3e7e60c9885697ac809b3f2', class: { backdrop: true }, onClick: this.onBackdropClick }, index.h("div", { key: '37b9a20e62e333b7ed0b2acfdadeb328c78af618', class: "modal" }, index.h("button", { key: 'c670eb2fa28e16089f01b4c3760f83cf4fbcd3d9', class: "modal_close", onClick: this.closeModal.bind(this) }, "\u00D7"), index.h("div", { key: '9dda2d815674cc8c49247a65c1ec95dea29da54b', class: "modal_header" }, index.h("slot", { key: '1eab44b952ff237e74a4d6833db585e3b2ffdab2', name: "header" }, ((_a = this.el) === null || _a === void 0 ? void 0 : _a.title) && index.h("h5", { key: '2aba68d70d04b62cb6551e4f133a0d774df34064', class: "modal_header__title" }, this.el.title))), index.h("div", { key: 'a832e12c09482a9f4007a2381a23695ceea82759', class: { 'modal_content': true, overflow: this.overflow } }, index.h("slot", { key: '1da580e3d2116360d429bdea2e9697a66932c50e' })), index.h("div", { key: 'cd5fd0aa543ef9a5777b2b8553cdc0909bd22eb0', class: "modal_footer" }, index.h("slot", { key: '3b168cb8474a2aa407fbb8b35e6c49c115038fe5', name: "footer" }))))));
|
|
636
837
|
}
|
|
637
838
|
disconnectedCallback() {
|
|
638
839
|
this.removeTriggerListener();
|
|
@@ -649,7 +850,7 @@ var NOTIFICATION_VARIANTS;
|
|
|
649
850
|
NOTIFICATION_VARIANTS["ERROR"] = "error";
|
|
650
851
|
})(NOTIFICATION_VARIANTS || (NOTIFICATION_VARIANTS = {}));
|
|
651
852
|
|
|
652
|
-
const xvNotificationCss = ":host{--notification-icon-size:20px;display:flex;flex-direction:row;align-items:flex-start;justify-content:flex-start;border-radius:3px;padding:var(--gap-md, 16px);column-gap:var(--gap-md, 16px);border:1px solid}:host .content{flex:1;text-align:left;color:var(--text-primary, #333);font-family:var(--ff-body, Tahoma);font-size:var(--fz-md, 14px);line-height:128%;letter-spacing:0.16px;display:flex;flex-direction:column;row-gap:var(--spacing-06, 24px)}:host .content_title{text-align:left;margin:0;padding:0;font-weight:700;line-height:var(--notification-icon-size)}:host .icon{width:var(--notification-icon-size);height:var(--notification-icon-size);font-size:var(--notification-icon-size);fill:currentColor}:host .close{--notification-close-size:16px;background-color:transparent;border:none;width:var(--notification-close-size);height:var(--notification-close-size);min-width:var(--notification-close-size);min-height:var(--notification-close-size);position:relative;padding:0;margin:0;box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;transition:300ms ease-in-out opacity}:host .close:after,:host .close:before{content:\"\";position:absolute;top:calc(50% - var(--notification-close-size) / 2);left:calc(50% - 1px);display:inline-block;width:2px;height:90%;background-color:var(--button-tertiary, #273435)}:host .close:after{transform:rotate(45deg)}:host .close:before{transform:rotate(-45deg)}:host .close:hover{opacity:0.7}:host .close:active{opacity:0.3}:host ::slotted([slot=footer]){margin:0;padding:0}:host([type=info]){border-color:var(--support-info, #1B87B2);background-color:var(--support-info-background, #E2F5F8)}:host([type=info]) .icon{color:var(--support-info, #1B87B2)}:host([type=success]){border-color:var(--support-success, #97BF0D);background-color:var(--support-success-background, #F4F7E5)}:host([type=success]) .icon{color:var(--support-success, #1B87B2)}:host([type=warning]){border-color:var(--support-warning, #FF7F04);background-color:var(--support-warning-backround, #FFF9C2)}:host([type=warning]) .icon{color:var(--support-warning, #FF7F04)}:host([type=error]){border-color:var(--support-error, #F1290E);background-color:var(--support-error-background, #FEE9E8)}:host([type=error]) .icon{color:var(--support-error, #F1290E)}";
|
|
853
|
+
const xvNotificationCss = ":host{--notification-icon-size:20px;display:flex;flex-direction:row;align-items:flex-start;justify-content:flex-start;border-radius:3px;padding:var(--gap-md, 16px);column-gap:var(--gap-md, 16px);border:1px solid}:host .content{flex:1;text-align:left;color:var(--text-primary, #333);font-family:var(--ff-body, Tahoma);font-size:var(--fz-md, 14px);line-height:128%;letter-spacing:0.16px;display:flex;flex-direction:column;row-gap:var(--spacing-06, 24px);word-break:break-all}:host .content_title{text-align:left;margin:0;padding:0;font-weight:700;line-height:var(--notification-icon-size)}:host .icon{width:var(--notification-icon-size);height:var(--notification-icon-size);font-size:var(--notification-icon-size);fill:currentColor}:host .close{--notification-close-size:16px;background-color:transparent;border:none;width:var(--notification-close-size);height:var(--notification-close-size);min-width:var(--notification-close-size);min-height:var(--notification-close-size);position:relative;padding:0;margin:0;box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;transition:300ms ease-in-out opacity}:host .close:after,:host .close:before{content:\"\";position:absolute;top:calc(50% - var(--notification-close-size) / 2);left:calc(50% - 1px);display:inline-block;width:2px;height:90%;background-color:var(--button-tertiary, #273435)}:host .close:after{transform:rotate(45deg)}:host .close:before{transform:rotate(-45deg)}:host .close:hover{opacity:0.7}:host .close:active{opacity:0.3}:host ::slotted([slot=footer]){margin:0;padding:0}:host([type=info]){border-color:var(--support-info, #1B87B2);background-color:var(--support-info-background, #E2F5F8)}:host([type=info]) .icon{color:var(--support-info, #1B87B2)}:host([type=success]){border-color:var(--support-success, #97BF0D);background-color:var(--support-success-background, #F4F7E5)}:host([type=success]) .icon{color:var(--support-success, #1B87B2)}:host([type=warning]){border-color:var(--support-warning, #FF7F04);background-color:var(--support-warning-backround, #FFF9C2)}:host([type=warning]) .icon{color:var(--support-warning, #FF7F04)}:host([type=error]){border-color:var(--support-error, #F1290E);background-color:var(--support-error-background, #FEE9E8)}:host([type=error]) .icon{color:var(--support-error, #F1290E)}";
|
|
653
854
|
|
|
654
855
|
const XvNotification = class {
|
|
655
856
|
constructor(hostRef) {
|
|
@@ -678,13 +879,67 @@ const XvNotification = class {
|
|
|
678
879
|
};
|
|
679
880
|
}
|
|
680
881
|
render() {
|
|
681
|
-
return (index.h(index.Host, { key: '
|
|
882
|
+
return (index.h(index.Host, { key: '8e31924e48581db6ff89b5500fb8467aa9be2314', class: "xv-notification", type: this.variant }, this.renderIcon(this.variant), index.h("div", { key: '2c23995a9f4fb150969826871451bbb7a4310595', class: "content" }, index.h("div", { key: '78bdf254268d1860c628a960dcf9146fc231153a', class: "content_wrapper" }, this.el.title && index.h("h5", { key: '3004f153ee078aea0189101f0b98d3fa6a0970c1', class: "content_title" }, this.el.title), index.h("slot", { key: '1f3dafa38f5f87a35cf8b23433a853c318dd6df0' })), index.h("slot", { key: '04ccf160451a11797f5d927403c531bbd55d7cfe', name: "footer" })), this.dismissible && index.h("button", { key: '6ac59409e46187eacae93f728f695c8e1d28dc21', class: "close", onClick: this.closeHandle })));
|
|
682
883
|
}
|
|
683
884
|
static get assetsDirs() { return ["xv-notification/icons"]; }
|
|
684
885
|
get el() { return index.getElement(this); }
|
|
685
886
|
};
|
|
686
887
|
XvNotification.style = xvNotificationCss;
|
|
687
888
|
|
|
889
|
+
const xvNumberInputCss = ":host{display:inline-block;text-align:left}:host .control_label{display:block;margin-bottom:var(--spacing-03);color:var(--text-secondary, #515151);font-family:var(--ff-body, Tahoma);font-size:var(--fz-sm, 12px);font-style:normal;font-weight:700;line-height:var(--fz-md);letter-spacing:0.32px}:host .control_input{display:flex;border:1px solid var(--border-subtle-01);outline:2px solid transparent;background-color:transparent;border-radius:3px;transition:250ms ease-in-out border-color, 250ms ease-in-out outline-color}:host .control_input:hover{border-color:var(--border-subtle-selected-01)}:host .control_input:focus-within{outline-color:var(--focus)}:host .control_input.error{outline-color:var(--support-error)}:host .control_input.readonly{border-radius:0;border-top-width:0;border-left-width:0;border-right-width:0;outline-color:transparent}:host .control_input input[type=number]{flex:1;border:none;outline:none;-moz-appearance:textfield;background-color:transparent;margin:0;padding-block:0;padding-inline:var(--spacing-05);box-sizing:border-box;color:var(--text-primary);min-width:20px;font-style:normal;font-weight:400;letter-spacing:0.16px}:host .control_input input[type=number]::-webkit-inner-spin-button,:host .control_input input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}:host .control_input__icons{display:inline-flex;align-items:stretch;column-gap:2px}:host .control_input__icons .status-icon{display:inline-flex;align-items:center;align-self:center;font-size:1.35em}:host .control_input__icons .status-icon.error{background-color:var(--support-error);color:white;width:16px;height:16px;border-radius:8px;font-size:12px;font-weight:bold;align-items:center;justify-content:center}:host .control_input__icons .status-icon.warning{color:var(--support-warning)}:host .control_input__icons hr{border:none;outline:none;width:2px;height:60%;align-self:center;background-color:var(--border-subtle-01);display:inline-flex}:host .message{margin:var(--spacing-02) 0 0;color:var(--text-helper, #646464);font-size:var(--fz-sm, 12px);font-style:normal;font-weight:400;line-height:var(--fz-md, 16px);letter-spacing:0.32px}:host .message.error{color:var(--text-error)}:host .message.warning{color:var(--text-secondary, #515151)}:host(.disabled){cursor:not-allowed}:host(.disabled) .control_label,:host(.disabled) .control_input input[type=number],:host(.disabled) .control_input input[type=number]::placeholder,:host(.disabled) .message:not(.error){color:var(--text-disabled);cursor:not-allowed}:host(.disabled) .control_input__icons,:host(.disabled) .message.error{opacity:0.5;cursor:not-allowed}:host([block]){display:block}";
|
|
890
|
+
|
|
891
|
+
const XvNumberInput = class {
|
|
892
|
+
constructor(hostRef) {
|
|
893
|
+
index.registerInstance(this, hostRef);
|
|
894
|
+
this.valueChange = index.createEvent(this, "valueChange");
|
|
895
|
+
if (hostRef.$hostElement$["s-ei"]) {
|
|
896
|
+
this.internals = hostRef.$hostElement$["s-ei"];
|
|
897
|
+
}
|
|
898
|
+
else {
|
|
899
|
+
this.internals = hostRef.$hostElement$.attachInternals();
|
|
900
|
+
hostRef.$hostElement$["s-ei"] = this.internals;
|
|
901
|
+
}
|
|
902
|
+
this.step = 10;
|
|
903
|
+
this.loading = false;
|
|
904
|
+
this.size = SIZE_VAR.MD;
|
|
905
|
+
this.increment = () => {
|
|
906
|
+
const newValue = (this.value || 0) + this.step;
|
|
907
|
+
if (this.max !== undefined && newValue > this.max)
|
|
908
|
+
return;
|
|
909
|
+
this.setValue(newValue);
|
|
910
|
+
};
|
|
911
|
+
this.decrement = () => {
|
|
912
|
+
const newValue = (this.value || 0) - this.step;
|
|
913
|
+
if (this.min !== undefined && newValue < this.min)
|
|
914
|
+
return;
|
|
915
|
+
this.setValue(newValue);
|
|
916
|
+
};
|
|
917
|
+
this.handleInput = (event) => {
|
|
918
|
+
const input = event.target;
|
|
919
|
+
const num = parseFloat(input.value) || 0;
|
|
920
|
+
if (isNaN(num))
|
|
921
|
+
return;
|
|
922
|
+
this.setValue(num);
|
|
923
|
+
};
|
|
924
|
+
}
|
|
925
|
+
setValue(value) {
|
|
926
|
+
var _a;
|
|
927
|
+
this.value = value;
|
|
928
|
+
this.internals.setFormValue((_a = this.value) === null || _a === void 0 ? void 0 : _a.toString());
|
|
929
|
+
this.valueChange.emit(this.value);
|
|
930
|
+
}
|
|
931
|
+
render() {
|
|
932
|
+
return (index.h(index.Host, { key: '110699b94aabcbb96f29a63a893f6fd0c4c2724b', class: { disabled: !!this.disabled } }, index.h("label", { key: '05c864b467c85fd2c35605b2c4d35e158345df19', class: "control" }, this.label && index.h("span", { key: 'ee1f92578bd90677b54d49154286ff83a1e0106c', class: "control_label" }, this.label), index.h("div", { key: 'a4745ad74f55576f06587f162baf581373e630a6', class: {
|
|
933
|
+
'control_input': true,
|
|
934
|
+
readonly: !!this.readonly,
|
|
935
|
+
error: !!this.error,
|
|
936
|
+
warning: !!this.warning
|
|
937
|
+
} }, index.h("input", { key: 'b797225274e669683326b747e7c4a3f7dadd618d', type: "number", placeholder: this.placeholder, disabled: this.disabled, readonly: this.readonly, onInput: this.handleInput, name: this.name, min: this.min, max: this.max, step: this.step, value: this.value }), index.h("div", { key: '8f6632ad50ff3e2eb143f6e5d8f5897e86e65f9e', class: "control_input__icons" }, this.loading ? (index.h("xv-loader-v2", { size: SIZE_VAR.XS })) : !!this.error ? (index.h("span", { class: "status-icon error", "aria-hidden": "true" }, "!")) : !!this.warning ? (index.h("span", { class: "status-icon warning", "aria-hidden": "true" }, "\u26A0")) : null, index.h("xv-button-v2", { key: 'feb522703f489f47ef80cf50f513c4c13a8c4c9e', size: this.size, variant: "ghost", disabled: this.disabled || this.readonly, onClick: this.decrement, "aria-label": "Decrease" }, index.h("span", { key: '12be1db37508f37eb4f02e3e160a502918099fe4', slot: "icon-left", class: "status-icon" }, "\u2212")), index.h("hr", { key: '7b92c8e9f6123064f909a8263e26bb08f5557f47' }), index.h("xv-button-v2", { key: '0c6bc01f56b2e95e7f493b9183b2dda86311e030', size: this.size, variant: "ghost", disabled: this.disabled || this.readonly, onClick: this.increment, "aria-label": "Increase" }, index.h("span", { key: '8e72d1a977743731c5cd5a186e014510fc046839', slot: "icon-left", class: "status-icon" }, "+"))))), this.helper && index.h("p", { key: '09a014e9b38ce4f3a8e98722401234642d57b51f', class: "message" }, this.helper), typeof this.error === 'string' ? (index.h("p", { class: "message error" }, this.error)) : typeof this.warning === 'string' ? (index.h("p", { class: "message warning" }, this.warning)) : null));
|
|
938
|
+
}
|
|
939
|
+
static get formAssociated() { return true; }
|
|
940
|
+
};
|
|
941
|
+
XvNumberInput.style = xvNumberInputCss;
|
|
942
|
+
|
|
688
943
|
const xvOverflowMenuCss = ":host{--overflow-menu-size:40px;--overflow-menu-item-padding:11px 16px;display:inline-flex;flex-direction:column;position:relative}:host .btn{display:inline-flex;align-items:center;justify-content:center;width:var(--overflow-menu-size);height:var(--overflow-menu-size);background-color:transparent;border:1px solid transparent;transition:300ms ease-in-out color, 300ms ease-in-out background-color, 200ms ease box-shadow;font-size:calc(var(--overflow-menu-size) / 2);color:var(--icon-primary);border-radius:5%;margin:0;padding:0}:host .btn:hover{cursor:pointer;color:var(--link-primary-hover);background-color:var(--background-hover)}:host .btn:active{background-color:var(--background-active);color:var(--icon-disabled)}:host .btn:disabled{background-color:transparent;opacity:0.5;cursor:not-allowed}:host .list{display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;background-color:var(--layer-01);position:absolute;top:100%;left:0;max-height:0;overflow:hidden;border-radius:3px;transition:200ms ease-in-out max-height, 100ms ease box-shadow;min-width:128px;max-width:50vw;width:max-content}:host .list.open{overflow:visible}:host .list ::slotted(xv-overflow-menu-v2-item){padding:var(--overflow-menu-item-padding)}:host .list.position-right{left:initial;right:0;border-top-right-radius:0}:host .list.position-left{border-top-left-radius:0}:host([size=xs]){--overflow-menu-item-padding:4px 16px;--overflow-menu-size:24px}:host([size=sm]){--overflow-menu-size:32px;--overflow-menu-item-padding:7px 16px}:host([size=md]){--overflow-menu-size:40px;--overflow-menu-item-padding:11px 16px}:host([size=lg]){--overflow-menu-size:48px;--overflow-menu-item-padding:16px}:host([size=xl]){--overflow-menu-size:56px;--overflow-menu-item-padding:16px}:host([open]) .btn{border-bottom-left-radius:0;border-bottom-right-radius:0;background-color:var(--layer-01);box-shadow:-2px 2px 2px 0 rgba(0, 0, 0, 0.1);z-index:1}:host([open]) .list{max-height:500px;z-index:2;box-shadow:-2px 2px 2px 0 rgba(0, 0, 0, 0.1)}";
|
|
689
944
|
|
|
690
945
|
const XvOverflowMenu = class {
|
|
@@ -737,7 +992,7 @@ const XvOverflowMenu = class {
|
|
|
737
992
|
}
|
|
738
993
|
}
|
|
739
994
|
render() {
|
|
740
|
-
return (index.h(index.Host, { key: '
|
|
995
|
+
return (index.h(index.Host, { key: '1dc9416f0d046119e11b2c99bb3eb6d333304ee0', class: "xv-overflow-menu", size: this.size, role: "menu", tabindex: -1 }, index.h("button", { key: 'df078f87e1b9b2e9fdb057f6186599f86873aa6f', class: { btn: true, open: this.open }, onClick: this.onOpenToggle, disabled: this.disabled }, index.h("svg", { key: 'd89ae23334072ed22358920a9a8e909c5572936b', xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em", viewBox: "0 0 128 512" }, index.h("path", { key: '3a4aaf227ca86efbdf2655c34c8cc7dc05e55b21', d: "M64 368a48 48 0 1 0 0 96 48 48 0 1 0 0-96zm0-160a48 48 0 1 0 0 96 48 48 0 1 0 0-96zM112 96A48 48 0 1 0 16 96a48 48 0 1 0 96 0z" }))), index.h("div", { key: '8370f57fe6a9dc79ae90980f68b9ac91364bcdd1', class: { list: true, open: this.open, [`position-${this.position}`]: true } }, index.h("slot", { key: '8a40ab08790a23db858c8e5d393dbb555f7f8d52' }))));
|
|
741
996
|
}
|
|
742
997
|
componentDidLoad() {
|
|
743
998
|
this.openChangeHandle();
|
|
@@ -773,7 +1028,7 @@ const XvOverflowMenuItem = class {
|
|
|
773
1028
|
this.itemClick.emit({ event, value: this.value });
|
|
774
1029
|
}
|
|
775
1030
|
render() {
|
|
776
|
-
return (index.h(index.Host, { key: '
|
|
1031
|
+
return (index.h(index.Host, { key: 'b77fdd436fb29e1619c91dd9199496b712209978', class: "xv-overflow-menu-item", role: "menuitem", disabled: this.disabled }, index.h("slot", { key: '79ad627095559eaafc17c24658969bbe74ce200b' })));
|
|
777
1032
|
}
|
|
778
1033
|
};
|
|
779
1034
|
XvOverflowMenuItem.style = xvOverflowMenuItemCss;
|
|
@@ -847,7 +1102,7 @@ const XvProgressIndicator = class {
|
|
|
847
1102
|
this.updateChildItems();
|
|
848
1103
|
}
|
|
849
1104
|
render() {
|
|
850
|
-
return (index.h(index.Host, { key: '
|
|
1105
|
+
return (index.h(index.Host, { key: '3e05f1ba497e8c471d93122e6bce9da9520fb41e', variant: this.variant, size: this.size, class: { 'xv-progress-indicator': true } }, index.h("slot", { key: 'dbefc5482792a6cbab611aef15e32709125b85b3' })));
|
|
851
1106
|
}
|
|
852
1107
|
get el() { return index.getElement(this); }
|
|
853
1108
|
static get watchers() { return {
|
|
@@ -864,7 +1119,7 @@ const XvProgressIndicatorItem = class {
|
|
|
864
1119
|
this.status = PROGRESS_ITEM_STATUS.NO_STARTED;
|
|
865
1120
|
}
|
|
866
1121
|
render() {
|
|
867
|
-
return (index.h(index.Host, { key: '
|
|
1122
|
+
return (index.h(index.Host, { key: 'aa7a93c986dad88003765936698bd0a9b9ab69c9', status: this.status, class: { 'xv-progress-indicator-item': true } }, index.h("span", { key: '0858a4714f47c017768c565e97686edba8d01fac', class: "line" }), index.h("span", { key: 'a4984429a6fa6d24b102ff1f547e6b02060a2ace', class: "icon" }, index.h("svg", { key: 'aaafe9512fcbd04c6eb08df1cac3abe3a9672187', xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 448 512" }, index.h("path", { key: 'e2016e50eea686b070bee9060ae08b428ac9166c', fill: "currentColor", d: "M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z" }))), index.h("p", { key: '31231bac86472ec197f1f777fafa409c3be4f3fe', class: "label" }, index.h("slot", { key: '2aa765f1e87050f1398d31fbae3cfd1c79729bc4' }))));
|
|
868
1123
|
}
|
|
869
1124
|
get el() { return index.getElement(this); }
|
|
870
1125
|
};
|
|
@@ -879,7 +1134,7 @@ const XvTab = class {
|
|
|
879
1134
|
this.loading = false;
|
|
880
1135
|
}
|
|
881
1136
|
render() {
|
|
882
|
-
return (index.h(index.Host, { key: '
|
|
1137
|
+
return (index.h(index.Host, { key: '560790ac18797ba2238cff26a7ef87eb8b53d483', disabled: this.disabled, name: this.name }, this.loading ? index.h("xv-loader-v2", { size: SIZE_VAR.LG }) : index.h("slot", null)));
|
|
883
1138
|
}
|
|
884
1139
|
};
|
|
885
1140
|
XvTab.style = xvTabCss;
|
|
@@ -918,7 +1173,7 @@ const XvTable = class {
|
|
|
918
1173
|
.join(' ') + ' repeat(auto-fit, minmax(0, 1fr))');
|
|
919
1174
|
}
|
|
920
1175
|
render() {
|
|
921
|
-
return (index.h(index.Host, { key: '
|
|
1176
|
+
return (index.h(index.Host, { key: '173110599b9a11fec560bfa5f648f5fed235175f', class: { batchVisible: !!this.selectedCount } }, index.h("slot", { key: '3966a6ba192313ab9cbe5b26cadd765c12b08262', name: "title" }, !!this.el.title && index.h("h2", { key: '51bf9b76da8f3605f1254ff3df0e9bf68751ec2c', class: "xv-table-title" }, this.el.title)), index.h("slot", { key: '9276e8836c4086bc2b8d1dc4aacdc2b447b31f57', name: "toolbar" }), index.h("div", { key: '8fa9c349b7d377cd2860054de08fdea4061462cd', class: "xv-table" }, index.h("div", { key: '0dd60cd039409d66e6c024a46e9c7353b825fc39', class: "batch-actions" }, index.h(index.Fragment, { key: '5b2b17c1ba82cb36c57fb7c99c54f1a66f4146e0' }, index.h("div", { key: '6fbdb8faad086fe53fe9dc277065db514327a498', class: "batch-actions_content" }, index.h("slot", { key: 'e8769e3dfe0e539dbfc14033079636f364556e31', name: "batch" })), index.h("p", { key: '857f33d3595cf5e5f0a0ffc4474e801ea9e4aeaa', class: "batch-actions_count" }, !!this.selectedCount && `${this.selectedCount} ${this.selectedCount === 1 ? 'Position ausgewählt' : 'Positionen ausgewählt'}`))), index.h("div", { key: '4f0d41aabd8f78f04c0ded187c2dc117794802a8', class: "xv-table_wrapper" }, index.h("slot", { key: '7de743d320da2d68f9835b0dacd3db192b5e12b9' }), index.h("slot", { key: 'b0fb15c2fb82e94a249d2f0be12a04066ff244ea', name: "footer" })), !!this.loading && (index.h("div", { key: 'bd3947a1ad4d34bb0ea57a4648336d40d2b4499b', class: "xv-table_loading" }, index.h("xv-loader-v2", { key: '0991ecbde1fae86b8a7da8b348594a76e176fc09', size: SIZE_VAR.LG }))))));
|
|
922
1177
|
}
|
|
923
1178
|
componentWillLoad() {
|
|
924
1179
|
this.setColsSizeTemplate();
|
|
@@ -966,7 +1221,7 @@ const XvTableCell = class {
|
|
|
966
1221
|
}
|
|
967
1222
|
;
|
|
968
1223
|
render() {
|
|
969
|
-
return (index.h(index.Host, { key: '
|
|
1224
|
+
return (index.h(index.Host, { key: '49c2faf25ce05c90ba4813108cfe4fc73fa165ce' }, index.h("slot", { key: '885295db92236d22b675d3fdf40a68f828d3ca1a' })));
|
|
970
1225
|
}
|
|
971
1226
|
get el() { return index.getElement(this); }
|
|
972
1227
|
};
|
|
@@ -984,7 +1239,7 @@ const XvTableExpand = class {
|
|
|
984
1239
|
};
|
|
985
1240
|
}
|
|
986
1241
|
render() {
|
|
987
|
-
return (index.h(index.Host, { key: '
|
|
1242
|
+
return (index.h(index.Host, { key: '1cdc6260aa3933b453fb16211c28d6fbea2a0350' }, index.h("button", { key: '53dbd31f7c4a47190af4963bf8437c061ca59827', class: { 'expand-btn': true, open: this.open }, disabled: this.disabled, onClick: this.handleExpand }), index.h("slot", { key: 'ba53a344f92e28fa173bba7fa49e0b9c8a3036db', name: XV_EXPANDABLE_KEY }), index.h("div", { key: '24b785baa2b308a46414b14f5fbe87a88bb91deb', class: { expandableContent: true, open: this.open } }, index.h("slot", { key: '8dbc793cd4e27694dac3cf240b9dd919bac0f36b' }))));
|
|
988
1243
|
}
|
|
989
1244
|
componentDidLoad() {
|
|
990
1245
|
index$1.setAttr(this.el.parentElement, XV_EXPANDABLE_KEY, true);
|
|
@@ -1039,7 +1294,7 @@ const XvTableRow = class {
|
|
|
1039
1294
|
}
|
|
1040
1295
|
}
|
|
1041
1296
|
render() {
|
|
1042
|
-
return (index.h(index.Host, { key: '
|
|
1297
|
+
return (index.h(index.Host, { key: 'bbf22a27e0dad429a6b78add5cc7582af2c9fb05' }, this.variant !== undefined && (index.h("xv-table-v2-cell", { key: '55c69e4d4b996db975015a5c4583e7b47e08a84a', class: "cell-control" }, this.variant === 'checkbox' && (index.h("xv-checkbox-v2", { key: 'ab88c9827b708e849088214eb26a83157f4775aa', name: this.name, partial: this.partial, checked: this.checked || this.partial, disabled: this.disabled, required: this.required, readonly: this.readonly, onEventChange: this.checkHandle })), this.variant === 'radio' && (index.h("input", { key: 'dbb9e381633828073940e32bf5b40231e3e34857', type: "radio", name: this.name, checked: this.checked || this.partial, disabled: this.disabled, required: this.required, readonly: this.readonly })))), index.h("slot", { key: 'a2043f89fb359453c4839c000fdcead5ab8769ae' })));
|
|
1043
1298
|
}
|
|
1044
1299
|
componentWillLoad() {
|
|
1045
1300
|
this.setInitialAttrs();
|
|
@@ -1133,8 +1388,7 @@ const XvTabs = class {
|
|
|
1133
1388
|
const nextTab = this.tabElements[nextIdx];
|
|
1134
1389
|
if (!nextTab || nextTab.hasAttribute('disabled'))
|
|
1135
1390
|
return;
|
|
1136
|
-
this.
|
|
1137
|
-
this.scrollToActiveTab();
|
|
1391
|
+
this.handleTabClick(nextTab.getAttribute('name') || nextIdx);
|
|
1138
1392
|
}
|
|
1139
1393
|
render() {
|
|
1140
1394
|
var _a, _b, _c;
|
|
@@ -1171,19 +1425,12 @@ const XvTag = class {
|
|
|
1171
1425
|
this.closeClick.emit(e);
|
|
1172
1426
|
}
|
|
1173
1427
|
render() {
|
|
1174
|
-
return (index.h(index.Host, { key: '
|
|
1428
|
+
return (index.h(index.Host, { key: '0f30c136dab805c0c443c6ca81d8245d4ec6f0b5', style: { color: this.color, background: this.bg }, class: `xv-tag ${this.disabled ? 'disabled' : ''} ${this.size}` }, index.h("div", { key: 'ac1ee723f78ed280af64ea13b8475d7f0ddd01ee', class: "xv-tag_content" }, index.h("slot", { key: 'b808df5553d25f32bbe875c1ff68f68b6a6d4c73' })), this.closeable && (index.h("button", { key: '23784cc30119255ad0e7f80a8d23322922e2c633', onClick: this.closeHandler.bind(this), class: "xv-tag_close" }))));
|
|
1175
1429
|
}
|
|
1176
1430
|
};
|
|
1177
1431
|
XvTag.style = xvTagCss;
|
|
1178
1432
|
|
|
1179
|
-
var
|
|
1180
|
-
(function (TextInputStatus) {
|
|
1181
|
-
TextInputStatus["ERROR"] = "error";
|
|
1182
|
-
TextInputStatus["WARNING"] = "warning";
|
|
1183
|
-
TextInputStatus["DEF"] = "";
|
|
1184
|
-
})(TextInputStatus || (TextInputStatus = {}));
|
|
1185
|
-
|
|
1186
|
-
const xvTextInputCss = ":host{--text-input-padding-x:16px;--text-input-padding-y:11px;display:inline-flex;flex-direction:column;row-gap:calc(var(--text-input-padding-y) / 2);text-align:left;font-family:var(--ff-body, Tahoma)}:host .label{margin:0;color:var(--text-secondary, #515151);font-size:var(--fz-sm, 12px);font-weight:700;line-height:133.333%;letter-spacing:0.32px}:host .control{margin:0;position:relative;box-sizing:border-box;display:flex;column-gap:5px;align-items:center;flex-direction:row}:host .control input{width:100%;background-color:var(--field-02, #FFF);border:1px solid var(--border-strong-01, #E3E3E3);border-radius:3px;padding-block:var(--text-input-padding-y);padding-inline-start:var(--text-input-padding-x);padding-inline-end:var(--text-input-padding-x);flex:1;outline:2px solid transparent;color:var(--text-primary, #333);font-size:var(--fz-md, 14px);font-style:normal;font-weight:400;line-height:128.571%;letter-spacing:0.16px;transition:0.2s ease-in-out border-color, 0.2s ease-in-out outline-color}:host .control input.withIcon{padding-inline-end:calc(var(--text-input-padding-x) + 22px)}:host .control input::placeholder{color:var(--text-placeholder, #ACACAC)}:host .control input:focus{outline:2px solid var(--focus, #273435)}:host .control_icon{position:absolute;top:calc(50% - 9px);right:var(--text-input-padding-y);width:18px;height:18px}:host .control_icon.error{color:var(--support-error, #F1290E)}:host .control_icon.warning{color:var(--support-warning, #FF7F04)}:host .helper{margin:0;color:var(--text-helper, #646464);font-size:var(--fz-sm, 12px);line-height:133.333%;letter-spacing:0.32px}:host([status=error]) .control input{border-color:var(--support-error, #F1290E)}:host([status=error]) .control input:focus{outline-color:var(--support-error, #F1290E)}:host([status=error]) .helper{color:var(--text-error, #D62512)}:host([readonly]) .control input{border-top-color:transparent;border-right-color:transparent;border-left-color:transparent;cursor:default;background-color:transparent}:host([readonly]) .control input:focus{outline-color:transparent}:host([disabled]){opacity:0.4}:host([disabled]) .control input{cursor:not-allowed}:host([size=xs]){--text-input-padding-y:4px;--text-input-padding-x:6px}:host([size=sm]){--text-input-padding-y:7px}:host([size=md]){--text-input-padding-y:11px}:host([size=lg]){--text-input-padding-y:15px}:host([size=xl]){--text-input-padding-y:16px;--text-input-padding-x:18px}";
|
|
1433
|
+
const xvTextInputCss = ":host{display:inline-block;text-align:left}:host .control_label{display:block;margin-bottom:var(--spacing-03);color:var(--text-secondary, #515151);font-family:var(--ff-body, Tahoma);font-size:var(--fz-sm, 12px);font-style:normal;font-weight:700;line-height:var(--fz-md);letter-spacing:0.32px}:host .control_input{display:flex;border:1px solid var(--border-subtle-01);outline:2px solid transparent;background-color:transparent;border-radius:3px;transition:250ms ease-in-out border-color, 250ms ease-in-out outline-color}:host .control_input:hover{border-color:var(--border-subtle-selected-01)}:host .control_input:focus-within{outline-color:var(--focus)}:host .control_input.error{outline-color:var(--support-error)}:host .control_input.readonly{border-radius:0;border-top-width:0;border-left-width:0;border-right-width:0;outline-color:transparent}:host .control_input input[type=text]{flex:1;border:none;outline:none;-moz-appearance:textfield;background-color:transparent;margin:0;padding-block:0;padding-inline:var(--spacing-05);box-sizing:border-box;color:var(--text-primary);min-width:20px;font-style:normal;font-weight:400;letter-spacing:0.16px}:host .control_input input[type=text]::-webkit-inner-spin-button,:host .control_input input[type=text]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}:host .control_input__icons{display:inline-flex;align-items:stretch;column-gap:2px;padding-right:var(--spacing-05)}:host .control_input__icons .status-icon{display:inline-flex;align-items:center;align-self:center;font-size:1.35em}:host .control_input__icons .status-icon.error{background-color:var(--support-error);color:white;width:16px;height:16px;border-radius:8px;font-size:12px;font-weight:bold;align-items:center;justify-content:center}:host .control_input__icons .status-icon.warning{color:var(--support-warning)}:host .control_input__icons hr{border:none;outline:none;width:2px;height:60%;align-self:center;background-color:var(--border-subtle-01);display:inline-flex}:host .control_input.xs{height:16px}:host .control_input.sm{height:32px}:host .control_input.md{height:40px}:host .control_input.lg{height:48px}:host .control_input.xl{height:60px}:host .message{margin:var(--spacing-02) 0 0;color:var(--text-helper, #646464);font-size:var(--fz-sm, 12px);font-style:normal;font-weight:400;line-height:var(--fz-md, 16px);letter-spacing:0.32px}:host .message.error{color:var(--text-error)}:host .message.warning{color:var(--text-secondary, #515151)}:host(.disabled){cursor:not-allowed}:host(.disabled) .control_label,:host(.disabled) .control_input input[type=text],:host(.disabled) .control_input input[type=text]::placeholder,:host(.disabled) .message:not(.error){color:var(--text-disabled);cursor:not-allowed}:host(.disabled) .control_input__icons,:host(.disabled) .message.error{opacity:0.5;cursor:not-allowed}:host([block]){display:block}";
|
|
1187
1434
|
|
|
1188
1435
|
const XvTextInput = class {
|
|
1189
1436
|
constructor(hostRef) {
|
|
@@ -1196,59 +1443,1933 @@ const XvTextInput = class {
|
|
|
1196
1443
|
this.internals = hostRef.$hostElement$.attachInternals();
|
|
1197
1444
|
hostRef.$hostElement$["s-ei"] = this.internals;
|
|
1198
1445
|
}
|
|
1199
|
-
this.
|
|
1200
|
-
this.size = SIZE_VAR.MD;
|
|
1201
|
-
this.status = TextInputStatus.DEF;
|
|
1446
|
+
this.type = 'text';
|
|
1202
1447
|
this.value = '';
|
|
1203
|
-
this.disabled = false;
|
|
1204
|
-
this.readonly = false;
|
|
1205
1448
|
this.loading = false;
|
|
1449
|
+
this.size = SIZE_VAR.MD;
|
|
1206
1450
|
this.handleInput = (e) => {
|
|
1207
1451
|
const target = e.target;
|
|
1208
1452
|
this.value = target.value;
|
|
1209
1453
|
this.valueChange.emit(this.value);
|
|
1210
1454
|
this.internals.setFormValue(target.value);
|
|
1211
1455
|
};
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1456
|
+
}
|
|
1457
|
+
render() {
|
|
1458
|
+
return (index.h(index.Host, { key: 'b6a0c46c10d556b41af3b2699b0cf75f54d38215', class: { disabled: !!this.disabled } }, index.h("label", { key: '39863902604461d77cefe6e11958f09e14d00007', class: "control" }, this.label && index.h("span", { key: '88d1301fa0f1cb47d391ef3932bdeb084d3df0b7', class: "control_label" }, this.label), index.h("div", { key: '0e8dff5c41c7375ae4d77af5c5c60312a74ae319', class: {
|
|
1459
|
+
'control_input': true,
|
|
1460
|
+
readonly: !!this.readonly,
|
|
1461
|
+
[this.size]: true,
|
|
1462
|
+
error: !!this.error,
|
|
1463
|
+
warning: !!this.warning,
|
|
1464
|
+
} }, index.h("input", { key: 'c8bb49371f49c3b42c83472f9a9e68d05a28801d', type: this.type, placeholder: this.placeholder, disabled: this.disabled, readonly: this.readonly, onInput: this.handleInput, name: this.name, value: this.value }), index.h("div", { key: 'c0af21628c89dc843ad00168a539327fb47a9ed2', class: "control_input__icons" }, this.loading && index.h("xv-loader-v2", { key: '2916d327464f17ff4bb140c54dd209101ef90f07', size: SIZE_VAR.XS }), !!this.error ? (index.h("span", { class: "status-icon error", "aria-hidden": "true" }, "!")) : !!this.warning ? (index.h("span", { class: "status-icon warning", "aria-hidden": "true" }, "\u26A0")) : null))), this.helper && index.h("p", { key: 'c67ce9f2f5fdfeddf3f42bc1dda62ff4ac9b9801', class: "message" }, this.helper), typeof this.error === 'string' ? (index.h("p", { class: "message error" }, this.error)) : typeof this.warning === 'string' ? (index.h("p", { class: "message warning" }, this.warning)) : null));
|
|
1465
|
+
}
|
|
1466
|
+
static get formAssociated() { return true; }
|
|
1467
|
+
};
|
|
1468
|
+
XvTextInput.style = xvTextInputCss;
|
|
1469
|
+
|
|
1470
|
+
var top = 'top';
|
|
1471
|
+
var bottom = 'bottom';
|
|
1472
|
+
var right = 'right';
|
|
1473
|
+
var left = 'left';
|
|
1474
|
+
var auto = 'auto';
|
|
1475
|
+
var basePlacements = [top, bottom, right, left];
|
|
1476
|
+
var start = 'start';
|
|
1477
|
+
var end = 'end';
|
|
1478
|
+
var clippingParents = 'clippingParents';
|
|
1479
|
+
var viewport = 'viewport';
|
|
1480
|
+
var popper = 'popper';
|
|
1481
|
+
var reference = 'reference';
|
|
1482
|
+
var variationPlacements = /*#__PURE__*/basePlacements.reduce(function (acc, placement) {
|
|
1483
|
+
return acc.concat([placement + "-" + start, placement + "-" + end]);
|
|
1484
|
+
}, []);
|
|
1485
|
+
var placements = /*#__PURE__*/[].concat(basePlacements, [auto]).reduce(function (acc, placement) {
|
|
1486
|
+
return acc.concat([placement, placement + "-" + start, placement + "-" + end]);
|
|
1487
|
+
}, []); // modifiers that need to read the DOM
|
|
1488
|
+
|
|
1489
|
+
var beforeRead = 'beforeRead';
|
|
1490
|
+
var read = 'read';
|
|
1491
|
+
var afterRead = 'afterRead'; // pure-logic modifiers
|
|
1492
|
+
|
|
1493
|
+
var beforeMain = 'beforeMain';
|
|
1494
|
+
var main = 'main';
|
|
1495
|
+
var afterMain = 'afterMain'; // modifier with the purpose to write to the DOM (or write into a framework state)
|
|
1496
|
+
|
|
1497
|
+
var beforeWrite = 'beforeWrite';
|
|
1498
|
+
var write = 'write';
|
|
1499
|
+
var afterWrite = 'afterWrite';
|
|
1500
|
+
var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite];
|
|
1501
|
+
|
|
1502
|
+
function getNodeName(element) {
|
|
1503
|
+
return element ? (element.nodeName || '').toLowerCase() : null;
|
|
1504
|
+
}
|
|
1505
|
+
|
|
1506
|
+
function getWindow(node) {
|
|
1507
|
+
if (node == null) {
|
|
1508
|
+
return window;
|
|
1509
|
+
}
|
|
1510
|
+
|
|
1511
|
+
if (node.toString() !== '[object Window]') {
|
|
1512
|
+
var ownerDocument = node.ownerDocument;
|
|
1513
|
+
return ownerDocument ? ownerDocument.defaultView || window : window;
|
|
1514
|
+
}
|
|
1515
|
+
|
|
1516
|
+
return node;
|
|
1517
|
+
}
|
|
1518
|
+
|
|
1519
|
+
function isElement(node) {
|
|
1520
|
+
var OwnElement = getWindow(node).Element;
|
|
1521
|
+
return node instanceof OwnElement || node instanceof Element;
|
|
1522
|
+
}
|
|
1523
|
+
|
|
1524
|
+
function isHTMLElement(node) {
|
|
1525
|
+
var OwnElement = getWindow(node).HTMLElement;
|
|
1526
|
+
return node instanceof OwnElement || node instanceof HTMLElement;
|
|
1527
|
+
}
|
|
1528
|
+
|
|
1529
|
+
function isShadowRoot(node) {
|
|
1530
|
+
// IE 11 has no ShadowRoot
|
|
1531
|
+
if (typeof ShadowRoot === 'undefined') {
|
|
1532
|
+
return false;
|
|
1533
|
+
}
|
|
1534
|
+
|
|
1535
|
+
var OwnElement = getWindow(node).ShadowRoot;
|
|
1536
|
+
return node instanceof OwnElement || node instanceof ShadowRoot;
|
|
1537
|
+
}
|
|
1538
|
+
|
|
1539
|
+
// and applies them to the HTMLElements such as popper and arrow
|
|
1540
|
+
|
|
1541
|
+
function applyStyles(_ref) {
|
|
1542
|
+
var state = _ref.state;
|
|
1543
|
+
Object.keys(state.elements).forEach(function (name) {
|
|
1544
|
+
var style = state.styles[name] || {};
|
|
1545
|
+
var attributes = state.attributes[name] || {};
|
|
1546
|
+
var element = state.elements[name]; // arrow is optional + virtual elements
|
|
1547
|
+
|
|
1548
|
+
if (!isHTMLElement(element) || !getNodeName(element)) {
|
|
1549
|
+
return;
|
|
1550
|
+
} // Flow doesn't support to extend this property, but it's the most
|
|
1551
|
+
// effective way to apply styles to an HTMLElement
|
|
1552
|
+
// $FlowFixMe[cannot-write]
|
|
1553
|
+
|
|
1554
|
+
|
|
1555
|
+
Object.assign(element.style, style);
|
|
1556
|
+
Object.keys(attributes).forEach(function (name) {
|
|
1557
|
+
var value = attributes[name];
|
|
1558
|
+
|
|
1559
|
+
if (value === false) {
|
|
1560
|
+
element.removeAttribute(name);
|
|
1561
|
+
} else {
|
|
1562
|
+
element.setAttribute(name, value === true ? '' : value);
|
|
1563
|
+
}
|
|
1564
|
+
});
|
|
1565
|
+
});
|
|
1566
|
+
}
|
|
1567
|
+
|
|
1568
|
+
function effect$2(_ref2) {
|
|
1569
|
+
var state = _ref2.state;
|
|
1570
|
+
var initialStyles = {
|
|
1571
|
+
popper: {
|
|
1572
|
+
position: state.options.strategy,
|
|
1573
|
+
left: '0',
|
|
1574
|
+
top: '0',
|
|
1575
|
+
margin: '0'
|
|
1576
|
+
},
|
|
1577
|
+
arrow: {
|
|
1578
|
+
position: 'absolute'
|
|
1579
|
+
},
|
|
1580
|
+
reference: {}
|
|
1581
|
+
};
|
|
1582
|
+
Object.assign(state.elements.popper.style, initialStyles.popper);
|
|
1583
|
+
state.styles = initialStyles;
|
|
1584
|
+
|
|
1585
|
+
if (state.elements.arrow) {
|
|
1586
|
+
Object.assign(state.elements.arrow.style, initialStyles.arrow);
|
|
1587
|
+
}
|
|
1588
|
+
|
|
1589
|
+
return function () {
|
|
1590
|
+
Object.keys(state.elements).forEach(function (name) {
|
|
1591
|
+
var element = state.elements[name];
|
|
1592
|
+
var attributes = state.attributes[name] || {};
|
|
1593
|
+
var styleProperties = Object.keys(state.styles.hasOwnProperty(name) ? state.styles[name] : initialStyles[name]); // Set all values to an empty string to unset them
|
|
1594
|
+
|
|
1595
|
+
var style = styleProperties.reduce(function (style, property) {
|
|
1596
|
+
style[property] = '';
|
|
1597
|
+
return style;
|
|
1598
|
+
}, {}); // arrow is optional + virtual elements
|
|
1599
|
+
|
|
1600
|
+
if (!isHTMLElement(element) || !getNodeName(element)) {
|
|
1601
|
+
return;
|
|
1602
|
+
}
|
|
1603
|
+
|
|
1604
|
+
Object.assign(element.style, style);
|
|
1605
|
+
Object.keys(attributes).forEach(function (attribute) {
|
|
1606
|
+
element.removeAttribute(attribute);
|
|
1607
|
+
});
|
|
1608
|
+
});
|
|
1609
|
+
};
|
|
1610
|
+
} // eslint-disable-next-line import/no-unused-modules
|
|
1611
|
+
|
|
1612
|
+
|
|
1613
|
+
var applyStyles$1 = {
|
|
1614
|
+
name: 'applyStyles',
|
|
1615
|
+
enabled: true,
|
|
1616
|
+
phase: 'write',
|
|
1617
|
+
fn: applyStyles,
|
|
1618
|
+
effect: effect$2,
|
|
1619
|
+
requires: ['computeStyles']
|
|
1620
|
+
};
|
|
1621
|
+
|
|
1622
|
+
function getBasePlacement(placement) {
|
|
1623
|
+
return placement.split('-')[0];
|
|
1624
|
+
}
|
|
1625
|
+
|
|
1626
|
+
var max = Math.max;
|
|
1627
|
+
var min = Math.min;
|
|
1628
|
+
var round = Math.round;
|
|
1629
|
+
|
|
1630
|
+
function getUAString() {
|
|
1631
|
+
var uaData = navigator.userAgentData;
|
|
1632
|
+
|
|
1633
|
+
if (uaData != null && uaData.brands && Array.isArray(uaData.brands)) {
|
|
1634
|
+
return uaData.brands.map(function (item) {
|
|
1635
|
+
return item.brand + "/" + item.version;
|
|
1636
|
+
}).join(' ');
|
|
1637
|
+
}
|
|
1638
|
+
|
|
1639
|
+
return navigator.userAgent;
|
|
1640
|
+
}
|
|
1641
|
+
|
|
1642
|
+
function isLayoutViewport() {
|
|
1643
|
+
return !/^((?!chrome|android).)*safari/i.test(getUAString());
|
|
1644
|
+
}
|
|
1645
|
+
|
|
1646
|
+
function getBoundingClientRect(element, includeScale, isFixedStrategy) {
|
|
1647
|
+
if (includeScale === void 0) {
|
|
1648
|
+
includeScale = false;
|
|
1649
|
+
}
|
|
1650
|
+
|
|
1651
|
+
if (isFixedStrategy === void 0) {
|
|
1652
|
+
isFixedStrategy = false;
|
|
1653
|
+
}
|
|
1654
|
+
|
|
1655
|
+
var clientRect = element.getBoundingClientRect();
|
|
1656
|
+
var scaleX = 1;
|
|
1657
|
+
var scaleY = 1;
|
|
1658
|
+
|
|
1659
|
+
if (includeScale && isHTMLElement(element)) {
|
|
1660
|
+
scaleX = element.offsetWidth > 0 ? round(clientRect.width) / element.offsetWidth || 1 : 1;
|
|
1661
|
+
scaleY = element.offsetHeight > 0 ? round(clientRect.height) / element.offsetHeight || 1 : 1;
|
|
1662
|
+
}
|
|
1663
|
+
|
|
1664
|
+
var _ref = isElement(element) ? getWindow(element) : window,
|
|
1665
|
+
visualViewport = _ref.visualViewport;
|
|
1666
|
+
|
|
1667
|
+
var addVisualOffsets = !isLayoutViewport() && isFixedStrategy;
|
|
1668
|
+
var x = (clientRect.left + (addVisualOffsets && visualViewport ? visualViewport.offsetLeft : 0)) / scaleX;
|
|
1669
|
+
var y = (clientRect.top + (addVisualOffsets && visualViewport ? visualViewport.offsetTop : 0)) / scaleY;
|
|
1670
|
+
var width = clientRect.width / scaleX;
|
|
1671
|
+
var height = clientRect.height / scaleY;
|
|
1672
|
+
return {
|
|
1673
|
+
width: width,
|
|
1674
|
+
height: height,
|
|
1675
|
+
top: y,
|
|
1676
|
+
right: x + width,
|
|
1677
|
+
bottom: y + height,
|
|
1678
|
+
left: x,
|
|
1679
|
+
x: x,
|
|
1680
|
+
y: y
|
|
1681
|
+
};
|
|
1682
|
+
}
|
|
1683
|
+
|
|
1684
|
+
// means it doesn't take into account transforms.
|
|
1685
|
+
|
|
1686
|
+
function getLayoutRect(element) {
|
|
1687
|
+
var clientRect = getBoundingClientRect(element); // Use the clientRect sizes if it's not been transformed.
|
|
1688
|
+
// Fixes https://github.com/popperjs/popper-core/issues/1223
|
|
1689
|
+
|
|
1690
|
+
var width = element.offsetWidth;
|
|
1691
|
+
var height = element.offsetHeight;
|
|
1692
|
+
|
|
1693
|
+
if (Math.abs(clientRect.width - width) <= 1) {
|
|
1694
|
+
width = clientRect.width;
|
|
1695
|
+
}
|
|
1696
|
+
|
|
1697
|
+
if (Math.abs(clientRect.height - height) <= 1) {
|
|
1698
|
+
height = clientRect.height;
|
|
1699
|
+
}
|
|
1700
|
+
|
|
1701
|
+
return {
|
|
1702
|
+
x: element.offsetLeft,
|
|
1703
|
+
y: element.offsetTop,
|
|
1704
|
+
width: width,
|
|
1705
|
+
height: height
|
|
1706
|
+
};
|
|
1707
|
+
}
|
|
1708
|
+
|
|
1709
|
+
function contains(parent, child) {
|
|
1710
|
+
var rootNode = child.getRootNode && child.getRootNode(); // First, attempt with faster native method
|
|
1711
|
+
|
|
1712
|
+
if (parent.contains(child)) {
|
|
1713
|
+
return true;
|
|
1714
|
+
} // then fallback to custom implementation with Shadow DOM support
|
|
1715
|
+
else if (rootNode && isShadowRoot(rootNode)) {
|
|
1716
|
+
var next = child;
|
|
1717
|
+
|
|
1718
|
+
do {
|
|
1719
|
+
if (next && parent.isSameNode(next)) {
|
|
1720
|
+
return true;
|
|
1721
|
+
} // $FlowFixMe[prop-missing]: need a better way to handle this...
|
|
1722
|
+
|
|
1723
|
+
|
|
1724
|
+
next = next.parentNode || next.host;
|
|
1725
|
+
} while (next);
|
|
1726
|
+
} // Give up, the result is false
|
|
1727
|
+
|
|
1728
|
+
|
|
1729
|
+
return false;
|
|
1730
|
+
}
|
|
1731
|
+
|
|
1732
|
+
function getComputedStyle(element) {
|
|
1733
|
+
return getWindow(element).getComputedStyle(element);
|
|
1734
|
+
}
|
|
1735
|
+
|
|
1736
|
+
function isTableElement(element) {
|
|
1737
|
+
return ['table', 'td', 'th'].indexOf(getNodeName(element)) >= 0;
|
|
1738
|
+
}
|
|
1739
|
+
|
|
1740
|
+
function getDocumentElement(element) {
|
|
1741
|
+
// $FlowFixMe[incompatible-return]: assume body is always available
|
|
1742
|
+
return ((isElement(element) ? element.ownerDocument : // $FlowFixMe[prop-missing]
|
|
1743
|
+
element.document) || window.document).documentElement;
|
|
1744
|
+
}
|
|
1745
|
+
|
|
1746
|
+
function getParentNode(element) {
|
|
1747
|
+
if (getNodeName(element) === 'html') {
|
|
1748
|
+
return element;
|
|
1749
|
+
}
|
|
1750
|
+
|
|
1751
|
+
return (// this is a quicker (but less type safe) way to save quite some bytes from the bundle
|
|
1752
|
+
// $FlowFixMe[incompatible-return]
|
|
1753
|
+
// $FlowFixMe[prop-missing]
|
|
1754
|
+
element.assignedSlot || // step into the shadow DOM of the parent of a slotted node
|
|
1755
|
+
element.parentNode || ( // DOM Element detected
|
|
1756
|
+
isShadowRoot(element) ? element.host : null) || // ShadowRoot detected
|
|
1757
|
+
// $FlowFixMe[incompatible-call]: HTMLElement is a Node
|
|
1758
|
+
getDocumentElement(element) // fallback
|
|
1759
|
+
|
|
1760
|
+
);
|
|
1761
|
+
}
|
|
1762
|
+
|
|
1763
|
+
function getTrueOffsetParent(element) {
|
|
1764
|
+
if (!isHTMLElement(element) || // https://github.com/popperjs/popper-core/issues/837
|
|
1765
|
+
getComputedStyle(element).position === 'fixed') {
|
|
1766
|
+
return null;
|
|
1767
|
+
}
|
|
1768
|
+
|
|
1769
|
+
return element.offsetParent;
|
|
1770
|
+
} // `.offsetParent` reports `null` for fixed elements, while absolute elements
|
|
1771
|
+
// return the containing block
|
|
1772
|
+
|
|
1773
|
+
|
|
1774
|
+
function getContainingBlock(element) {
|
|
1775
|
+
var isFirefox = /firefox/i.test(getUAString());
|
|
1776
|
+
var isIE = /Trident/i.test(getUAString());
|
|
1777
|
+
|
|
1778
|
+
if (isIE && isHTMLElement(element)) {
|
|
1779
|
+
// In IE 9, 10 and 11 fixed elements containing block is always established by the viewport
|
|
1780
|
+
var elementCss = getComputedStyle(element);
|
|
1781
|
+
|
|
1782
|
+
if (elementCss.position === 'fixed') {
|
|
1783
|
+
return null;
|
|
1784
|
+
}
|
|
1785
|
+
}
|
|
1786
|
+
|
|
1787
|
+
var currentNode = getParentNode(element);
|
|
1788
|
+
|
|
1789
|
+
if (isShadowRoot(currentNode)) {
|
|
1790
|
+
currentNode = currentNode.host;
|
|
1791
|
+
}
|
|
1792
|
+
|
|
1793
|
+
while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {
|
|
1794
|
+
var css = getComputedStyle(currentNode); // This is non-exhaustive but covers the most common CSS properties that
|
|
1795
|
+
// create a containing block.
|
|
1796
|
+
// https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block
|
|
1797
|
+
|
|
1798
|
+
if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {
|
|
1799
|
+
return currentNode;
|
|
1800
|
+
} else {
|
|
1801
|
+
currentNode = currentNode.parentNode;
|
|
1802
|
+
}
|
|
1803
|
+
}
|
|
1804
|
+
|
|
1805
|
+
return null;
|
|
1806
|
+
} // Gets the closest ancestor positioned element. Handles some edge cases,
|
|
1807
|
+
// such as table ancestors and cross browser bugs.
|
|
1808
|
+
|
|
1809
|
+
|
|
1810
|
+
function getOffsetParent(element) {
|
|
1811
|
+
var window = getWindow(element);
|
|
1812
|
+
var offsetParent = getTrueOffsetParent(element);
|
|
1813
|
+
|
|
1814
|
+
while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === 'static') {
|
|
1815
|
+
offsetParent = getTrueOffsetParent(offsetParent);
|
|
1816
|
+
}
|
|
1817
|
+
|
|
1818
|
+
if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle(offsetParent).position === 'static')) {
|
|
1819
|
+
return window;
|
|
1820
|
+
}
|
|
1821
|
+
|
|
1822
|
+
return offsetParent || getContainingBlock(element) || window;
|
|
1823
|
+
}
|
|
1824
|
+
|
|
1825
|
+
function getMainAxisFromPlacement(placement) {
|
|
1826
|
+
return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';
|
|
1827
|
+
}
|
|
1828
|
+
|
|
1829
|
+
function within(min$1, value, max$1) {
|
|
1830
|
+
return max(min$1, min(value, max$1));
|
|
1831
|
+
}
|
|
1832
|
+
function withinMaxClamp(min, value, max) {
|
|
1833
|
+
var v = within(min, value, max);
|
|
1834
|
+
return v > max ? max : v;
|
|
1835
|
+
}
|
|
1836
|
+
|
|
1837
|
+
function getFreshSideObject() {
|
|
1838
|
+
return {
|
|
1839
|
+
top: 0,
|
|
1840
|
+
right: 0,
|
|
1841
|
+
bottom: 0,
|
|
1842
|
+
left: 0
|
|
1843
|
+
};
|
|
1844
|
+
}
|
|
1845
|
+
|
|
1846
|
+
function mergePaddingObject(paddingObject) {
|
|
1847
|
+
return Object.assign({}, getFreshSideObject(), paddingObject);
|
|
1848
|
+
}
|
|
1849
|
+
|
|
1850
|
+
function expandToHashMap(value, keys) {
|
|
1851
|
+
return keys.reduce(function (hashMap, key) {
|
|
1852
|
+
hashMap[key] = value;
|
|
1853
|
+
return hashMap;
|
|
1854
|
+
}, {});
|
|
1855
|
+
}
|
|
1856
|
+
|
|
1857
|
+
var toPaddingObject = function toPaddingObject(padding, state) {
|
|
1858
|
+
padding = typeof padding === 'function' ? padding(Object.assign({}, state.rects, {
|
|
1859
|
+
placement: state.placement
|
|
1860
|
+
})) : padding;
|
|
1861
|
+
return mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));
|
|
1862
|
+
};
|
|
1863
|
+
|
|
1864
|
+
function arrow(_ref) {
|
|
1865
|
+
var _state$modifiersData$;
|
|
1866
|
+
|
|
1867
|
+
var state = _ref.state,
|
|
1868
|
+
name = _ref.name,
|
|
1869
|
+
options = _ref.options;
|
|
1870
|
+
var arrowElement = state.elements.arrow;
|
|
1871
|
+
var popperOffsets = state.modifiersData.popperOffsets;
|
|
1872
|
+
var basePlacement = getBasePlacement(state.placement);
|
|
1873
|
+
var axis = getMainAxisFromPlacement(basePlacement);
|
|
1874
|
+
var isVertical = [left, right].indexOf(basePlacement) >= 0;
|
|
1875
|
+
var len = isVertical ? 'height' : 'width';
|
|
1876
|
+
|
|
1877
|
+
if (!arrowElement || !popperOffsets) {
|
|
1878
|
+
return;
|
|
1879
|
+
}
|
|
1880
|
+
|
|
1881
|
+
var paddingObject = toPaddingObject(options.padding, state);
|
|
1882
|
+
var arrowRect = getLayoutRect(arrowElement);
|
|
1883
|
+
var minProp = axis === 'y' ? top : left;
|
|
1884
|
+
var maxProp = axis === 'y' ? bottom : right;
|
|
1885
|
+
var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets[axis] - state.rects.popper[len];
|
|
1886
|
+
var startDiff = popperOffsets[axis] - state.rects.reference[axis];
|
|
1887
|
+
var arrowOffsetParent = getOffsetParent(arrowElement);
|
|
1888
|
+
var clientSize = arrowOffsetParent ? axis === 'y' ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0;
|
|
1889
|
+
var centerToReference = endDiff / 2 - startDiff / 2; // Make sure the arrow doesn't overflow the popper if the center point is
|
|
1890
|
+
// outside of the popper bounds
|
|
1891
|
+
|
|
1892
|
+
var min = paddingObject[minProp];
|
|
1893
|
+
var max = clientSize - arrowRect[len] - paddingObject[maxProp];
|
|
1894
|
+
var center = clientSize / 2 - arrowRect[len] / 2 + centerToReference;
|
|
1895
|
+
var offset = within(min, center, max); // Prevents breaking syntax highlighting...
|
|
1896
|
+
|
|
1897
|
+
var axisProp = axis;
|
|
1898
|
+
state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset, _state$modifiersData$.centerOffset = offset - center, _state$modifiersData$);
|
|
1899
|
+
}
|
|
1900
|
+
|
|
1901
|
+
function effect$1(_ref2) {
|
|
1902
|
+
var state = _ref2.state,
|
|
1903
|
+
options = _ref2.options;
|
|
1904
|
+
var _options$element = options.element,
|
|
1905
|
+
arrowElement = _options$element === void 0 ? '[data-popper-arrow]' : _options$element;
|
|
1906
|
+
|
|
1907
|
+
if (arrowElement == null) {
|
|
1908
|
+
return;
|
|
1909
|
+
} // CSS selector
|
|
1910
|
+
|
|
1911
|
+
|
|
1912
|
+
if (typeof arrowElement === 'string') {
|
|
1913
|
+
arrowElement = state.elements.popper.querySelector(arrowElement);
|
|
1914
|
+
|
|
1915
|
+
if (!arrowElement) {
|
|
1916
|
+
return;
|
|
1917
|
+
}
|
|
1918
|
+
}
|
|
1919
|
+
|
|
1920
|
+
if (!contains(state.elements.popper, arrowElement)) {
|
|
1921
|
+
return;
|
|
1922
|
+
}
|
|
1923
|
+
|
|
1924
|
+
state.elements.arrow = arrowElement;
|
|
1925
|
+
} // eslint-disable-next-line import/no-unused-modules
|
|
1926
|
+
|
|
1927
|
+
|
|
1928
|
+
var arrow$1 = {
|
|
1929
|
+
name: 'arrow',
|
|
1930
|
+
enabled: true,
|
|
1931
|
+
phase: 'main',
|
|
1932
|
+
fn: arrow,
|
|
1933
|
+
effect: effect$1,
|
|
1934
|
+
requires: ['popperOffsets'],
|
|
1935
|
+
requiresIfExists: ['preventOverflow']
|
|
1936
|
+
};
|
|
1937
|
+
|
|
1938
|
+
function getVariation(placement) {
|
|
1939
|
+
return placement.split('-')[1];
|
|
1940
|
+
}
|
|
1941
|
+
|
|
1942
|
+
var unsetSides = {
|
|
1943
|
+
top: 'auto',
|
|
1944
|
+
right: 'auto',
|
|
1945
|
+
bottom: 'auto',
|
|
1946
|
+
left: 'auto'
|
|
1947
|
+
}; // Round the offsets to the nearest suitable subpixel based on the DPR.
|
|
1948
|
+
// Zooming can change the DPR, but it seems to report a value that will
|
|
1949
|
+
// cleanly divide the values into the appropriate subpixels.
|
|
1950
|
+
|
|
1951
|
+
function roundOffsetsByDPR(_ref, win) {
|
|
1952
|
+
var x = _ref.x,
|
|
1953
|
+
y = _ref.y;
|
|
1954
|
+
var dpr = win.devicePixelRatio || 1;
|
|
1955
|
+
return {
|
|
1956
|
+
x: round(x * dpr) / dpr || 0,
|
|
1957
|
+
y: round(y * dpr) / dpr || 0
|
|
1958
|
+
};
|
|
1959
|
+
}
|
|
1960
|
+
|
|
1961
|
+
function mapToStyles(_ref2) {
|
|
1962
|
+
var _Object$assign2;
|
|
1963
|
+
|
|
1964
|
+
var popper = _ref2.popper,
|
|
1965
|
+
popperRect = _ref2.popperRect,
|
|
1966
|
+
placement = _ref2.placement,
|
|
1967
|
+
variation = _ref2.variation,
|
|
1968
|
+
offsets = _ref2.offsets,
|
|
1969
|
+
position = _ref2.position,
|
|
1970
|
+
gpuAcceleration = _ref2.gpuAcceleration,
|
|
1971
|
+
adaptive = _ref2.adaptive,
|
|
1972
|
+
roundOffsets = _ref2.roundOffsets,
|
|
1973
|
+
isFixed = _ref2.isFixed;
|
|
1974
|
+
var _offsets$x = offsets.x,
|
|
1975
|
+
x = _offsets$x === void 0 ? 0 : _offsets$x,
|
|
1976
|
+
_offsets$y = offsets.y,
|
|
1977
|
+
y = _offsets$y === void 0 ? 0 : _offsets$y;
|
|
1978
|
+
|
|
1979
|
+
var _ref3 = typeof roundOffsets === 'function' ? roundOffsets({
|
|
1980
|
+
x: x,
|
|
1981
|
+
y: y
|
|
1982
|
+
}) : {
|
|
1983
|
+
x: x,
|
|
1984
|
+
y: y
|
|
1985
|
+
};
|
|
1986
|
+
|
|
1987
|
+
x = _ref3.x;
|
|
1988
|
+
y = _ref3.y;
|
|
1989
|
+
var hasX = offsets.hasOwnProperty('x');
|
|
1990
|
+
var hasY = offsets.hasOwnProperty('y');
|
|
1991
|
+
var sideX = left;
|
|
1992
|
+
var sideY = top;
|
|
1993
|
+
var win = window;
|
|
1994
|
+
|
|
1995
|
+
if (adaptive) {
|
|
1996
|
+
var offsetParent = getOffsetParent(popper);
|
|
1997
|
+
var heightProp = 'clientHeight';
|
|
1998
|
+
var widthProp = 'clientWidth';
|
|
1999
|
+
|
|
2000
|
+
if (offsetParent === getWindow(popper)) {
|
|
2001
|
+
offsetParent = getDocumentElement(popper);
|
|
2002
|
+
|
|
2003
|
+
if (getComputedStyle(offsetParent).position !== 'static' && position === 'absolute') {
|
|
2004
|
+
heightProp = 'scrollHeight';
|
|
2005
|
+
widthProp = 'scrollWidth';
|
|
2006
|
+
}
|
|
2007
|
+
} // $FlowFixMe[incompatible-cast]: force type refinement, we compare offsetParent with window above, but Flow doesn't detect it
|
|
2008
|
+
|
|
2009
|
+
|
|
2010
|
+
offsetParent = offsetParent;
|
|
2011
|
+
|
|
2012
|
+
if (placement === top || (placement === left || placement === right) && variation === end) {
|
|
2013
|
+
sideY = bottom;
|
|
2014
|
+
var offsetY = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.height : // $FlowFixMe[prop-missing]
|
|
2015
|
+
offsetParent[heightProp];
|
|
2016
|
+
y -= offsetY - popperRect.height;
|
|
2017
|
+
y *= gpuAcceleration ? 1 : -1;
|
|
2018
|
+
}
|
|
2019
|
+
|
|
2020
|
+
if (placement === left || (placement === top || placement === bottom) && variation === end) {
|
|
2021
|
+
sideX = right;
|
|
2022
|
+
var offsetX = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.width : // $FlowFixMe[prop-missing]
|
|
2023
|
+
offsetParent[widthProp];
|
|
2024
|
+
x -= offsetX - popperRect.width;
|
|
2025
|
+
x *= gpuAcceleration ? 1 : -1;
|
|
2026
|
+
}
|
|
2027
|
+
}
|
|
2028
|
+
|
|
2029
|
+
var commonStyles = Object.assign({
|
|
2030
|
+
position: position
|
|
2031
|
+
}, adaptive && unsetSides);
|
|
2032
|
+
|
|
2033
|
+
var _ref4 = roundOffsets === true ? roundOffsetsByDPR({
|
|
2034
|
+
x: x,
|
|
2035
|
+
y: y
|
|
2036
|
+
}, getWindow(popper)) : {
|
|
2037
|
+
x: x,
|
|
2038
|
+
y: y
|
|
2039
|
+
};
|
|
2040
|
+
|
|
2041
|
+
x = _ref4.x;
|
|
2042
|
+
y = _ref4.y;
|
|
2043
|
+
|
|
2044
|
+
if (gpuAcceleration) {
|
|
2045
|
+
var _Object$assign;
|
|
2046
|
+
|
|
2047
|
+
return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1) <= 1 ? "translate(" + x + "px, " + y + "px)" : "translate3d(" + x + "px, " + y + "px, 0)", _Object$assign));
|
|
2048
|
+
}
|
|
2049
|
+
|
|
2050
|
+
return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + "px" : '', _Object$assign2[sideX] = hasX ? x + "px" : '', _Object$assign2.transform = '', _Object$assign2));
|
|
2051
|
+
}
|
|
2052
|
+
|
|
2053
|
+
function computeStyles(_ref5) {
|
|
2054
|
+
var state = _ref5.state,
|
|
2055
|
+
options = _ref5.options;
|
|
2056
|
+
var _options$gpuAccelerat = options.gpuAcceleration,
|
|
2057
|
+
gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat,
|
|
2058
|
+
_options$adaptive = options.adaptive,
|
|
2059
|
+
adaptive = _options$adaptive === void 0 ? true : _options$adaptive,
|
|
2060
|
+
_options$roundOffsets = options.roundOffsets,
|
|
2061
|
+
roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets;
|
|
2062
|
+
var commonStyles = {
|
|
2063
|
+
placement: getBasePlacement(state.placement),
|
|
2064
|
+
variation: getVariation(state.placement),
|
|
2065
|
+
popper: state.elements.popper,
|
|
2066
|
+
popperRect: state.rects.popper,
|
|
2067
|
+
gpuAcceleration: gpuAcceleration,
|
|
2068
|
+
isFixed: state.options.strategy === 'fixed'
|
|
2069
|
+
};
|
|
2070
|
+
|
|
2071
|
+
if (state.modifiersData.popperOffsets != null) {
|
|
2072
|
+
state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, {
|
|
2073
|
+
offsets: state.modifiersData.popperOffsets,
|
|
2074
|
+
position: state.options.strategy,
|
|
2075
|
+
adaptive: adaptive,
|
|
2076
|
+
roundOffsets: roundOffsets
|
|
2077
|
+
})));
|
|
2078
|
+
}
|
|
2079
|
+
|
|
2080
|
+
if (state.modifiersData.arrow != null) {
|
|
2081
|
+
state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, {
|
|
2082
|
+
offsets: state.modifiersData.arrow,
|
|
2083
|
+
position: 'absolute',
|
|
2084
|
+
adaptive: false,
|
|
2085
|
+
roundOffsets: roundOffsets
|
|
2086
|
+
})));
|
|
2087
|
+
}
|
|
2088
|
+
|
|
2089
|
+
state.attributes.popper = Object.assign({}, state.attributes.popper, {
|
|
2090
|
+
'data-popper-placement': state.placement
|
|
2091
|
+
});
|
|
2092
|
+
} // eslint-disable-next-line import/no-unused-modules
|
|
2093
|
+
|
|
2094
|
+
|
|
2095
|
+
var computeStyles$1 = {
|
|
2096
|
+
name: 'computeStyles',
|
|
2097
|
+
enabled: true,
|
|
2098
|
+
phase: 'beforeWrite',
|
|
2099
|
+
fn: computeStyles,
|
|
2100
|
+
data: {}
|
|
2101
|
+
};
|
|
2102
|
+
|
|
2103
|
+
var passive = {
|
|
2104
|
+
passive: true
|
|
2105
|
+
};
|
|
2106
|
+
|
|
2107
|
+
function effect(_ref) {
|
|
2108
|
+
var state = _ref.state,
|
|
2109
|
+
instance = _ref.instance,
|
|
2110
|
+
options = _ref.options;
|
|
2111
|
+
var _options$scroll = options.scroll,
|
|
2112
|
+
scroll = _options$scroll === void 0 ? true : _options$scroll,
|
|
2113
|
+
_options$resize = options.resize,
|
|
2114
|
+
resize = _options$resize === void 0 ? true : _options$resize;
|
|
2115
|
+
var window = getWindow(state.elements.popper);
|
|
2116
|
+
var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper);
|
|
2117
|
+
|
|
2118
|
+
if (scroll) {
|
|
2119
|
+
scrollParents.forEach(function (scrollParent) {
|
|
2120
|
+
scrollParent.addEventListener('scroll', instance.update, passive);
|
|
2121
|
+
});
|
|
2122
|
+
}
|
|
2123
|
+
|
|
2124
|
+
if (resize) {
|
|
2125
|
+
window.addEventListener('resize', instance.update, passive);
|
|
2126
|
+
}
|
|
2127
|
+
|
|
2128
|
+
return function () {
|
|
2129
|
+
if (scroll) {
|
|
2130
|
+
scrollParents.forEach(function (scrollParent) {
|
|
2131
|
+
scrollParent.removeEventListener('scroll', instance.update, passive);
|
|
2132
|
+
});
|
|
2133
|
+
}
|
|
2134
|
+
|
|
2135
|
+
if (resize) {
|
|
2136
|
+
window.removeEventListener('resize', instance.update, passive);
|
|
2137
|
+
}
|
|
2138
|
+
};
|
|
2139
|
+
} // eslint-disable-next-line import/no-unused-modules
|
|
2140
|
+
|
|
2141
|
+
|
|
2142
|
+
var eventListeners = {
|
|
2143
|
+
name: 'eventListeners',
|
|
2144
|
+
enabled: true,
|
|
2145
|
+
phase: 'write',
|
|
2146
|
+
fn: function fn() {},
|
|
2147
|
+
effect: effect,
|
|
2148
|
+
data: {}
|
|
2149
|
+
};
|
|
2150
|
+
|
|
2151
|
+
var hash$1 = {
|
|
2152
|
+
left: 'right',
|
|
2153
|
+
right: 'left',
|
|
2154
|
+
bottom: 'top',
|
|
2155
|
+
top: 'bottom'
|
|
2156
|
+
};
|
|
2157
|
+
function getOppositePlacement(placement) {
|
|
2158
|
+
return placement.replace(/left|right|bottom|top/g, function (matched) {
|
|
2159
|
+
return hash$1[matched];
|
|
2160
|
+
});
|
|
2161
|
+
}
|
|
2162
|
+
|
|
2163
|
+
var hash = {
|
|
2164
|
+
start: 'end',
|
|
2165
|
+
end: 'start'
|
|
2166
|
+
};
|
|
2167
|
+
function getOppositeVariationPlacement(placement) {
|
|
2168
|
+
return placement.replace(/start|end/g, function (matched) {
|
|
2169
|
+
return hash[matched];
|
|
2170
|
+
});
|
|
2171
|
+
}
|
|
2172
|
+
|
|
2173
|
+
function getWindowScroll(node) {
|
|
2174
|
+
var win = getWindow(node);
|
|
2175
|
+
var scrollLeft = win.pageXOffset;
|
|
2176
|
+
var scrollTop = win.pageYOffset;
|
|
2177
|
+
return {
|
|
2178
|
+
scrollLeft: scrollLeft,
|
|
2179
|
+
scrollTop: scrollTop
|
|
2180
|
+
};
|
|
2181
|
+
}
|
|
2182
|
+
|
|
2183
|
+
function getWindowScrollBarX(element) {
|
|
2184
|
+
// If <html> has a CSS width greater than the viewport, then this will be
|
|
2185
|
+
// incorrect for RTL.
|
|
2186
|
+
// Popper 1 is broken in this case and never had a bug report so let's assume
|
|
2187
|
+
// it's not an issue. I don't think anyone ever specifies width on <html>
|
|
2188
|
+
// anyway.
|
|
2189
|
+
// Browsers where the left scrollbar doesn't cause an issue report `0` for
|
|
2190
|
+
// this (e.g. Edge 2019, IE11, Safari)
|
|
2191
|
+
return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft;
|
|
2192
|
+
}
|
|
2193
|
+
|
|
2194
|
+
function getViewportRect(element, strategy) {
|
|
2195
|
+
var win = getWindow(element);
|
|
2196
|
+
var html = getDocumentElement(element);
|
|
2197
|
+
var visualViewport = win.visualViewport;
|
|
2198
|
+
var width = html.clientWidth;
|
|
2199
|
+
var height = html.clientHeight;
|
|
2200
|
+
var x = 0;
|
|
2201
|
+
var y = 0;
|
|
2202
|
+
|
|
2203
|
+
if (visualViewport) {
|
|
2204
|
+
width = visualViewport.width;
|
|
2205
|
+
height = visualViewport.height;
|
|
2206
|
+
var layoutViewport = isLayoutViewport();
|
|
2207
|
+
|
|
2208
|
+
if (layoutViewport || !layoutViewport && strategy === 'fixed') {
|
|
2209
|
+
x = visualViewport.offsetLeft;
|
|
2210
|
+
y = visualViewport.offsetTop;
|
|
2211
|
+
}
|
|
2212
|
+
}
|
|
2213
|
+
|
|
2214
|
+
return {
|
|
2215
|
+
width: width,
|
|
2216
|
+
height: height,
|
|
2217
|
+
x: x + getWindowScrollBarX(element),
|
|
2218
|
+
y: y
|
|
2219
|
+
};
|
|
2220
|
+
}
|
|
2221
|
+
|
|
2222
|
+
// of the `<html>` and `<body>` rect bounds if horizontally scrollable
|
|
2223
|
+
|
|
2224
|
+
function getDocumentRect(element) {
|
|
2225
|
+
var _element$ownerDocumen;
|
|
2226
|
+
|
|
2227
|
+
var html = getDocumentElement(element);
|
|
2228
|
+
var winScroll = getWindowScroll(element);
|
|
2229
|
+
var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;
|
|
2230
|
+
var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);
|
|
2231
|
+
var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);
|
|
2232
|
+
var x = -winScroll.scrollLeft + getWindowScrollBarX(element);
|
|
2233
|
+
var y = -winScroll.scrollTop;
|
|
2234
|
+
|
|
2235
|
+
if (getComputedStyle(body || html).direction === 'rtl') {
|
|
2236
|
+
x += max(html.clientWidth, body ? body.clientWidth : 0) - width;
|
|
2237
|
+
}
|
|
2238
|
+
|
|
2239
|
+
return {
|
|
2240
|
+
width: width,
|
|
2241
|
+
height: height,
|
|
2242
|
+
x: x,
|
|
2243
|
+
y: y
|
|
2244
|
+
};
|
|
2245
|
+
}
|
|
2246
|
+
|
|
2247
|
+
function isScrollParent(element) {
|
|
2248
|
+
// Firefox wants us to check `-x` and `-y` variations as well
|
|
2249
|
+
var _getComputedStyle = getComputedStyle(element),
|
|
2250
|
+
overflow = _getComputedStyle.overflow,
|
|
2251
|
+
overflowX = _getComputedStyle.overflowX,
|
|
2252
|
+
overflowY = _getComputedStyle.overflowY;
|
|
2253
|
+
|
|
2254
|
+
return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);
|
|
2255
|
+
}
|
|
2256
|
+
|
|
2257
|
+
function getScrollParent(node) {
|
|
2258
|
+
if (['html', 'body', '#document'].indexOf(getNodeName(node)) >= 0) {
|
|
2259
|
+
// $FlowFixMe[incompatible-return]: assume body is always available
|
|
2260
|
+
return node.ownerDocument.body;
|
|
2261
|
+
}
|
|
2262
|
+
|
|
2263
|
+
if (isHTMLElement(node) && isScrollParent(node)) {
|
|
2264
|
+
return node;
|
|
2265
|
+
}
|
|
2266
|
+
|
|
2267
|
+
return getScrollParent(getParentNode(node));
|
|
2268
|
+
}
|
|
2269
|
+
|
|
2270
|
+
/*
|
|
2271
|
+
given a DOM element, return the list of all scroll parents, up the list of ancesors
|
|
2272
|
+
until we get to the top window object. This list is what we attach scroll listeners
|
|
2273
|
+
to, because if any of these parent elements scroll, we'll need to re-calculate the
|
|
2274
|
+
reference element's position.
|
|
2275
|
+
*/
|
|
2276
|
+
|
|
2277
|
+
function listScrollParents(element, list) {
|
|
2278
|
+
var _element$ownerDocumen;
|
|
2279
|
+
|
|
2280
|
+
if (list === void 0) {
|
|
2281
|
+
list = [];
|
|
2282
|
+
}
|
|
2283
|
+
|
|
2284
|
+
var scrollParent = getScrollParent(element);
|
|
2285
|
+
var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);
|
|
2286
|
+
var win = getWindow(scrollParent);
|
|
2287
|
+
var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent;
|
|
2288
|
+
var updatedList = list.concat(target);
|
|
2289
|
+
return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here
|
|
2290
|
+
updatedList.concat(listScrollParents(getParentNode(target)));
|
|
2291
|
+
}
|
|
2292
|
+
|
|
2293
|
+
function rectToClientRect(rect) {
|
|
2294
|
+
return Object.assign({}, rect, {
|
|
2295
|
+
left: rect.x,
|
|
2296
|
+
top: rect.y,
|
|
2297
|
+
right: rect.x + rect.width,
|
|
2298
|
+
bottom: rect.y + rect.height
|
|
2299
|
+
});
|
|
2300
|
+
}
|
|
2301
|
+
|
|
2302
|
+
function getInnerBoundingClientRect(element, strategy) {
|
|
2303
|
+
var rect = getBoundingClientRect(element, false, strategy === 'fixed');
|
|
2304
|
+
rect.top = rect.top + element.clientTop;
|
|
2305
|
+
rect.left = rect.left + element.clientLeft;
|
|
2306
|
+
rect.bottom = rect.top + element.clientHeight;
|
|
2307
|
+
rect.right = rect.left + element.clientWidth;
|
|
2308
|
+
rect.width = element.clientWidth;
|
|
2309
|
+
rect.height = element.clientHeight;
|
|
2310
|
+
rect.x = rect.left;
|
|
2311
|
+
rect.y = rect.top;
|
|
2312
|
+
return rect;
|
|
2313
|
+
}
|
|
2314
|
+
|
|
2315
|
+
function getClientRectFromMixedType(element, clippingParent, strategy) {
|
|
2316
|
+
return clippingParent === viewport ? rectToClientRect(getViewportRect(element, strategy)) : isElement(clippingParent) ? getInnerBoundingClientRect(clippingParent, strategy) : rectToClientRect(getDocumentRect(getDocumentElement(element)));
|
|
2317
|
+
} // A "clipping parent" is an overflowable container with the characteristic of
|
|
2318
|
+
// clipping (or hiding) overflowing elements with a position different from
|
|
2319
|
+
// `initial`
|
|
2320
|
+
|
|
2321
|
+
|
|
2322
|
+
function getClippingParents(element) {
|
|
2323
|
+
var clippingParents = listScrollParents(getParentNode(element));
|
|
2324
|
+
var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0;
|
|
2325
|
+
var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;
|
|
2326
|
+
|
|
2327
|
+
if (!isElement(clipperElement)) {
|
|
2328
|
+
return [];
|
|
2329
|
+
} // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414
|
|
2330
|
+
|
|
2331
|
+
|
|
2332
|
+
return clippingParents.filter(function (clippingParent) {
|
|
2333
|
+
return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';
|
|
2334
|
+
});
|
|
2335
|
+
} // Gets the maximum area that the element is visible in due to any number of
|
|
2336
|
+
// clipping parents
|
|
2337
|
+
|
|
2338
|
+
|
|
2339
|
+
function getClippingRect(element, boundary, rootBoundary, strategy) {
|
|
2340
|
+
var mainClippingParents = boundary === 'clippingParents' ? getClippingParents(element) : [].concat(boundary);
|
|
2341
|
+
var clippingParents = [].concat(mainClippingParents, [rootBoundary]);
|
|
2342
|
+
var firstClippingParent = clippingParents[0];
|
|
2343
|
+
var clippingRect = clippingParents.reduce(function (accRect, clippingParent) {
|
|
2344
|
+
var rect = getClientRectFromMixedType(element, clippingParent, strategy);
|
|
2345
|
+
accRect.top = max(rect.top, accRect.top);
|
|
2346
|
+
accRect.right = min(rect.right, accRect.right);
|
|
2347
|
+
accRect.bottom = min(rect.bottom, accRect.bottom);
|
|
2348
|
+
accRect.left = max(rect.left, accRect.left);
|
|
2349
|
+
return accRect;
|
|
2350
|
+
}, getClientRectFromMixedType(element, firstClippingParent, strategy));
|
|
2351
|
+
clippingRect.width = clippingRect.right - clippingRect.left;
|
|
2352
|
+
clippingRect.height = clippingRect.bottom - clippingRect.top;
|
|
2353
|
+
clippingRect.x = clippingRect.left;
|
|
2354
|
+
clippingRect.y = clippingRect.top;
|
|
2355
|
+
return clippingRect;
|
|
2356
|
+
}
|
|
2357
|
+
|
|
2358
|
+
function computeOffsets(_ref) {
|
|
2359
|
+
var reference = _ref.reference,
|
|
2360
|
+
element = _ref.element,
|
|
2361
|
+
placement = _ref.placement;
|
|
2362
|
+
var basePlacement = placement ? getBasePlacement(placement) : null;
|
|
2363
|
+
var variation = placement ? getVariation(placement) : null;
|
|
2364
|
+
var commonX = reference.x + reference.width / 2 - element.width / 2;
|
|
2365
|
+
var commonY = reference.y + reference.height / 2 - element.height / 2;
|
|
2366
|
+
var offsets;
|
|
2367
|
+
|
|
2368
|
+
switch (basePlacement) {
|
|
2369
|
+
case top:
|
|
2370
|
+
offsets = {
|
|
2371
|
+
x: commonX,
|
|
2372
|
+
y: reference.y - element.height
|
|
2373
|
+
};
|
|
2374
|
+
break;
|
|
2375
|
+
|
|
2376
|
+
case bottom:
|
|
2377
|
+
offsets = {
|
|
2378
|
+
x: commonX,
|
|
2379
|
+
y: reference.y + reference.height
|
|
2380
|
+
};
|
|
2381
|
+
break;
|
|
2382
|
+
|
|
2383
|
+
case right:
|
|
2384
|
+
offsets = {
|
|
2385
|
+
x: reference.x + reference.width,
|
|
2386
|
+
y: commonY
|
|
2387
|
+
};
|
|
2388
|
+
break;
|
|
2389
|
+
|
|
2390
|
+
case left:
|
|
2391
|
+
offsets = {
|
|
2392
|
+
x: reference.x - element.width,
|
|
2393
|
+
y: commonY
|
|
2394
|
+
};
|
|
2395
|
+
break;
|
|
2396
|
+
|
|
2397
|
+
default:
|
|
2398
|
+
offsets = {
|
|
2399
|
+
x: reference.x,
|
|
2400
|
+
y: reference.y
|
|
2401
|
+
};
|
|
2402
|
+
}
|
|
2403
|
+
|
|
2404
|
+
var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null;
|
|
2405
|
+
|
|
2406
|
+
if (mainAxis != null) {
|
|
2407
|
+
var len = mainAxis === 'y' ? 'height' : 'width';
|
|
2408
|
+
|
|
2409
|
+
switch (variation) {
|
|
2410
|
+
case start:
|
|
2411
|
+
offsets[mainAxis] = offsets[mainAxis] - (reference[len] / 2 - element[len] / 2);
|
|
2412
|
+
break;
|
|
2413
|
+
|
|
2414
|
+
case end:
|
|
2415
|
+
offsets[mainAxis] = offsets[mainAxis] + (reference[len] / 2 - element[len] / 2);
|
|
2416
|
+
break;
|
|
2417
|
+
}
|
|
2418
|
+
}
|
|
2419
|
+
|
|
2420
|
+
return offsets;
|
|
2421
|
+
}
|
|
2422
|
+
|
|
2423
|
+
function detectOverflow(state, options) {
|
|
2424
|
+
if (options === void 0) {
|
|
2425
|
+
options = {};
|
|
2426
|
+
}
|
|
2427
|
+
|
|
2428
|
+
var _options = options,
|
|
2429
|
+
_options$placement = _options.placement,
|
|
2430
|
+
placement = _options$placement === void 0 ? state.placement : _options$placement,
|
|
2431
|
+
_options$strategy = _options.strategy,
|
|
2432
|
+
strategy = _options$strategy === void 0 ? state.strategy : _options$strategy,
|
|
2433
|
+
_options$boundary = _options.boundary,
|
|
2434
|
+
boundary = _options$boundary === void 0 ? clippingParents : _options$boundary,
|
|
2435
|
+
_options$rootBoundary = _options.rootBoundary,
|
|
2436
|
+
rootBoundary = _options$rootBoundary === void 0 ? viewport : _options$rootBoundary,
|
|
2437
|
+
_options$elementConte = _options.elementContext,
|
|
2438
|
+
elementContext = _options$elementConte === void 0 ? popper : _options$elementConte,
|
|
2439
|
+
_options$altBoundary = _options.altBoundary,
|
|
2440
|
+
altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary,
|
|
2441
|
+
_options$padding = _options.padding,
|
|
2442
|
+
padding = _options$padding === void 0 ? 0 : _options$padding;
|
|
2443
|
+
var paddingObject = mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));
|
|
2444
|
+
var altContext = elementContext === popper ? reference : popper;
|
|
2445
|
+
var popperRect = state.rects.popper;
|
|
2446
|
+
var element = state.elements[altBoundary ? altContext : elementContext];
|
|
2447
|
+
var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary, strategy);
|
|
2448
|
+
var referenceClientRect = getBoundingClientRect(state.elements.reference);
|
|
2449
|
+
var popperOffsets = computeOffsets({
|
|
2450
|
+
reference: referenceClientRect,
|
|
2451
|
+
element: popperRect,
|
|
2452
|
+
placement: placement
|
|
2453
|
+
});
|
|
2454
|
+
var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets));
|
|
2455
|
+
var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect; // positive = overflowing the clipping rect
|
|
2456
|
+
// 0 or negative = within the clipping rect
|
|
2457
|
+
|
|
2458
|
+
var overflowOffsets = {
|
|
2459
|
+
top: clippingClientRect.top - elementClientRect.top + paddingObject.top,
|
|
2460
|
+
bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom,
|
|
2461
|
+
left: clippingClientRect.left - elementClientRect.left + paddingObject.left,
|
|
2462
|
+
right: elementClientRect.right - clippingClientRect.right + paddingObject.right
|
|
2463
|
+
};
|
|
2464
|
+
var offsetData = state.modifiersData.offset; // Offsets can be applied only to the popper element
|
|
2465
|
+
|
|
2466
|
+
if (elementContext === popper && offsetData) {
|
|
2467
|
+
var offset = offsetData[placement];
|
|
2468
|
+
Object.keys(overflowOffsets).forEach(function (key) {
|
|
2469
|
+
var multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1;
|
|
2470
|
+
var axis = [top, bottom].indexOf(key) >= 0 ? 'y' : 'x';
|
|
2471
|
+
overflowOffsets[key] += offset[axis] * multiply;
|
|
2472
|
+
});
|
|
2473
|
+
}
|
|
2474
|
+
|
|
2475
|
+
return overflowOffsets;
|
|
2476
|
+
}
|
|
2477
|
+
|
|
2478
|
+
function computeAutoPlacement(state, options) {
|
|
2479
|
+
if (options === void 0) {
|
|
2480
|
+
options = {};
|
|
2481
|
+
}
|
|
2482
|
+
|
|
2483
|
+
var _options = options,
|
|
2484
|
+
placement = _options.placement,
|
|
2485
|
+
boundary = _options.boundary,
|
|
2486
|
+
rootBoundary = _options.rootBoundary,
|
|
2487
|
+
padding = _options.padding,
|
|
2488
|
+
flipVariations = _options.flipVariations,
|
|
2489
|
+
_options$allowedAutoP = _options.allowedAutoPlacements,
|
|
2490
|
+
allowedAutoPlacements = _options$allowedAutoP === void 0 ? placements : _options$allowedAutoP;
|
|
2491
|
+
var variation = getVariation(placement);
|
|
2492
|
+
var placements$1 = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function (placement) {
|
|
2493
|
+
return getVariation(placement) === variation;
|
|
2494
|
+
}) : basePlacements;
|
|
2495
|
+
var allowedPlacements = placements$1.filter(function (placement) {
|
|
2496
|
+
return allowedAutoPlacements.indexOf(placement) >= 0;
|
|
2497
|
+
});
|
|
2498
|
+
|
|
2499
|
+
if (allowedPlacements.length === 0) {
|
|
2500
|
+
allowedPlacements = placements$1;
|
|
2501
|
+
} // $FlowFixMe[incompatible-type]: Flow seems to have problems with two array unions...
|
|
2502
|
+
|
|
2503
|
+
|
|
2504
|
+
var overflows = allowedPlacements.reduce(function (acc, placement) {
|
|
2505
|
+
acc[placement] = detectOverflow(state, {
|
|
2506
|
+
placement: placement,
|
|
2507
|
+
boundary: boundary,
|
|
2508
|
+
rootBoundary: rootBoundary,
|
|
2509
|
+
padding: padding
|
|
2510
|
+
})[getBasePlacement(placement)];
|
|
2511
|
+
return acc;
|
|
2512
|
+
}, {});
|
|
2513
|
+
return Object.keys(overflows).sort(function (a, b) {
|
|
2514
|
+
return overflows[a] - overflows[b];
|
|
2515
|
+
});
|
|
2516
|
+
}
|
|
2517
|
+
|
|
2518
|
+
function getExpandedFallbackPlacements(placement) {
|
|
2519
|
+
if (getBasePlacement(placement) === auto) {
|
|
2520
|
+
return [];
|
|
2521
|
+
}
|
|
2522
|
+
|
|
2523
|
+
var oppositePlacement = getOppositePlacement(placement);
|
|
2524
|
+
return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)];
|
|
2525
|
+
}
|
|
2526
|
+
|
|
2527
|
+
function flip(_ref) {
|
|
2528
|
+
var state = _ref.state,
|
|
2529
|
+
options = _ref.options,
|
|
2530
|
+
name = _ref.name;
|
|
2531
|
+
|
|
2532
|
+
if (state.modifiersData[name]._skip) {
|
|
2533
|
+
return;
|
|
2534
|
+
}
|
|
2535
|
+
|
|
2536
|
+
var _options$mainAxis = options.mainAxis,
|
|
2537
|
+
checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,
|
|
2538
|
+
_options$altAxis = options.altAxis,
|
|
2539
|
+
checkAltAxis = _options$altAxis === void 0 ? true : _options$altAxis,
|
|
2540
|
+
specifiedFallbackPlacements = options.fallbackPlacements,
|
|
2541
|
+
padding = options.padding,
|
|
2542
|
+
boundary = options.boundary,
|
|
2543
|
+
rootBoundary = options.rootBoundary,
|
|
2544
|
+
altBoundary = options.altBoundary,
|
|
2545
|
+
_options$flipVariatio = options.flipVariations,
|
|
2546
|
+
flipVariations = _options$flipVariatio === void 0 ? true : _options$flipVariatio,
|
|
2547
|
+
allowedAutoPlacements = options.allowedAutoPlacements;
|
|
2548
|
+
var preferredPlacement = state.options.placement;
|
|
2549
|
+
var basePlacement = getBasePlacement(preferredPlacement);
|
|
2550
|
+
var isBasePlacement = basePlacement === preferredPlacement;
|
|
2551
|
+
var fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [getOppositePlacement(preferredPlacement)] : getExpandedFallbackPlacements(preferredPlacement));
|
|
2552
|
+
var placements = [preferredPlacement].concat(fallbackPlacements).reduce(function (acc, placement) {
|
|
2553
|
+
return acc.concat(getBasePlacement(placement) === auto ? computeAutoPlacement(state, {
|
|
2554
|
+
placement: placement,
|
|
2555
|
+
boundary: boundary,
|
|
2556
|
+
rootBoundary: rootBoundary,
|
|
2557
|
+
padding: padding,
|
|
2558
|
+
flipVariations: flipVariations,
|
|
2559
|
+
allowedAutoPlacements: allowedAutoPlacements
|
|
2560
|
+
}) : placement);
|
|
2561
|
+
}, []);
|
|
2562
|
+
var referenceRect = state.rects.reference;
|
|
2563
|
+
var popperRect = state.rects.popper;
|
|
2564
|
+
var checksMap = new Map();
|
|
2565
|
+
var makeFallbackChecks = true;
|
|
2566
|
+
var firstFittingPlacement = placements[0];
|
|
2567
|
+
|
|
2568
|
+
for (var i = 0; i < placements.length; i++) {
|
|
2569
|
+
var placement = placements[i];
|
|
2570
|
+
|
|
2571
|
+
var _basePlacement = getBasePlacement(placement);
|
|
2572
|
+
|
|
2573
|
+
var isStartVariation = getVariation(placement) === start;
|
|
2574
|
+
var isVertical = [top, bottom].indexOf(_basePlacement) >= 0;
|
|
2575
|
+
var len = isVertical ? 'width' : 'height';
|
|
2576
|
+
var overflow = detectOverflow(state, {
|
|
2577
|
+
placement: placement,
|
|
2578
|
+
boundary: boundary,
|
|
2579
|
+
rootBoundary: rootBoundary,
|
|
2580
|
+
altBoundary: altBoundary,
|
|
2581
|
+
padding: padding
|
|
2582
|
+
});
|
|
2583
|
+
var mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : top;
|
|
2584
|
+
|
|
2585
|
+
if (referenceRect[len] > popperRect[len]) {
|
|
2586
|
+
mainVariationSide = getOppositePlacement(mainVariationSide);
|
|
2587
|
+
}
|
|
2588
|
+
|
|
2589
|
+
var altVariationSide = getOppositePlacement(mainVariationSide);
|
|
2590
|
+
var checks = [];
|
|
2591
|
+
|
|
2592
|
+
if (checkMainAxis) {
|
|
2593
|
+
checks.push(overflow[_basePlacement] <= 0);
|
|
2594
|
+
}
|
|
2595
|
+
|
|
2596
|
+
if (checkAltAxis) {
|
|
2597
|
+
checks.push(overflow[mainVariationSide] <= 0, overflow[altVariationSide] <= 0);
|
|
2598
|
+
}
|
|
2599
|
+
|
|
2600
|
+
if (checks.every(function (check) {
|
|
2601
|
+
return check;
|
|
2602
|
+
})) {
|
|
2603
|
+
firstFittingPlacement = placement;
|
|
2604
|
+
makeFallbackChecks = false;
|
|
2605
|
+
break;
|
|
2606
|
+
}
|
|
2607
|
+
|
|
2608
|
+
checksMap.set(placement, checks);
|
|
2609
|
+
}
|
|
2610
|
+
|
|
2611
|
+
if (makeFallbackChecks) {
|
|
2612
|
+
// `2` may be desired in some cases – research later
|
|
2613
|
+
var numberOfChecks = flipVariations ? 3 : 1;
|
|
2614
|
+
|
|
2615
|
+
var _loop = function _loop(_i) {
|
|
2616
|
+
var fittingPlacement = placements.find(function (placement) {
|
|
2617
|
+
var checks = checksMap.get(placement);
|
|
2618
|
+
|
|
2619
|
+
if (checks) {
|
|
2620
|
+
return checks.slice(0, _i).every(function (check) {
|
|
2621
|
+
return check;
|
|
2622
|
+
});
|
|
2623
|
+
}
|
|
2624
|
+
});
|
|
2625
|
+
|
|
2626
|
+
if (fittingPlacement) {
|
|
2627
|
+
firstFittingPlacement = fittingPlacement;
|
|
2628
|
+
return "break";
|
|
2629
|
+
}
|
|
2630
|
+
};
|
|
2631
|
+
|
|
2632
|
+
for (var _i = numberOfChecks; _i > 0; _i--) {
|
|
2633
|
+
var _ret = _loop(_i);
|
|
2634
|
+
|
|
2635
|
+
if (_ret === "break") break;
|
|
2636
|
+
}
|
|
2637
|
+
}
|
|
2638
|
+
|
|
2639
|
+
if (state.placement !== firstFittingPlacement) {
|
|
2640
|
+
state.modifiersData[name]._skip = true;
|
|
2641
|
+
state.placement = firstFittingPlacement;
|
|
2642
|
+
state.reset = true;
|
|
2643
|
+
}
|
|
2644
|
+
} // eslint-disable-next-line import/no-unused-modules
|
|
2645
|
+
|
|
2646
|
+
|
|
2647
|
+
var flip$1 = {
|
|
2648
|
+
name: 'flip',
|
|
2649
|
+
enabled: true,
|
|
2650
|
+
phase: 'main',
|
|
2651
|
+
fn: flip,
|
|
2652
|
+
requiresIfExists: ['offset'],
|
|
2653
|
+
data: {
|
|
2654
|
+
_skip: false
|
|
2655
|
+
}
|
|
2656
|
+
};
|
|
2657
|
+
|
|
2658
|
+
function getSideOffsets(overflow, rect, preventedOffsets) {
|
|
2659
|
+
if (preventedOffsets === void 0) {
|
|
2660
|
+
preventedOffsets = {
|
|
2661
|
+
x: 0,
|
|
2662
|
+
y: 0
|
|
2663
|
+
};
|
|
2664
|
+
}
|
|
2665
|
+
|
|
2666
|
+
return {
|
|
2667
|
+
top: overflow.top - rect.height - preventedOffsets.y,
|
|
2668
|
+
right: overflow.right - rect.width + preventedOffsets.x,
|
|
2669
|
+
bottom: overflow.bottom - rect.height + preventedOffsets.y,
|
|
2670
|
+
left: overflow.left - rect.width - preventedOffsets.x
|
|
2671
|
+
};
|
|
2672
|
+
}
|
|
2673
|
+
|
|
2674
|
+
function isAnySideFullyClipped(overflow) {
|
|
2675
|
+
return [top, right, bottom, left].some(function (side) {
|
|
2676
|
+
return overflow[side] >= 0;
|
|
2677
|
+
});
|
|
2678
|
+
}
|
|
2679
|
+
|
|
2680
|
+
function hide(_ref) {
|
|
2681
|
+
var state = _ref.state,
|
|
2682
|
+
name = _ref.name;
|
|
2683
|
+
var referenceRect = state.rects.reference;
|
|
2684
|
+
var popperRect = state.rects.popper;
|
|
2685
|
+
var preventedOffsets = state.modifiersData.preventOverflow;
|
|
2686
|
+
var referenceOverflow = detectOverflow(state, {
|
|
2687
|
+
elementContext: 'reference'
|
|
2688
|
+
});
|
|
2689
|
+
var popperAltOverflow = detectOverflow(state, {
|
|
2690
|
+
altBoundary: true
|
|
2691
|
+
});
|
|
2692
|
+
var referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect);
|
|
2693
|
+
var popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets);
|
|
2694
|
+
var isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets);
|
|
2695
|
+
var hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets);
|
|
2696
|
+
state.modifiersData[name] = {
|
|
2697
|
+
referenceClippingOffsets: referenceClippingOffsets,
|
|
2698
|
+
popperEscapeOffsets: popperEscapeOffsets,
|
|
2699
|
+
isReferenceHidden: isReferenceHidden,
|
|
2700
|
+
hasPopperEscaped: hasPopperEscaped
|
|
2701
|
+
};
|
|
2702
|
+
state.attributes.popper = Object.assign({}, state.attributes.popper, {
|
|
2703
|
+
'data-popper-reference-hidden': isReferenceHidden,
|
|
2704
|
+
'data-popper-escaped': hasPopperEscaped
|
|
2705
|
+
});
|
|
2706
|
+
} // eslint-disable-next-line import/no-unused-modules
|
|
2707
|
+
|
|
2708
|
+
|
|
2709
|
+
var hide$1 = {
|
|
2710
|
+
name: 'hide',
|
|
2711
|
+
enabled: true,
|
|
2712
|
+
phase: 'main',
|
|
2713
|
+
requiresIfExists: ['preventOverflow'],
|
|
2714
|
+
fn: hide
|
|
2715
|
+
};
|
|
2716
|
+
|
|
2717
|
+
function distanceAndSkiddingToXY(placement, rects, offset) {
|
|
2718
|
+
var basePlacement = getBasePlacement(placement);
|
|
2719
|
+
var invertDistance = [left, top].indexOf(basePlacement) >= 0 ? -1 : 1;
|
|
2720
|
+
|
|
2721
|
+
var _ref = typeof offset === 'function' ? offset(Object.assign({}, rects, {
|
|
2722
|
+
placement: placement
|
|
2723
|
+
})) : offset,
|
|
2724
|
+
skidding = _ref[0],
|
|
2725
|
+
distance = _ref[1];
|
|
2726
|
+
|
|
2727
|
+
skidding = skidding || 0;
|
|
2728
|
+
distance = (distance || 0) * invertDistance;
|
|
2729
|
+
return [left, right].indexOf(basePlacement) >= 0 ? {
|
|
2730
|
+
x: distance,
|
|
2731
|
+
y: skidding
|
|
2732
|
+
} : {
|
|
2733
|
+
x: skidding,
|
|
2734
|
+
y: distance
|
|
2735
|
+
};
|
|
2736
|
+
}
|
|
2737
|
+
|
|
2738
|
+
function offset(_ref2) {
|
|
2739
|
+
var state = _ref2.state,
|
|
2740
|
+
options = _ref2.options,
|
|
2741
|
+
name = _ref2.name;
|
|
2742
|
+
var _options$offset = options.offset,
|
|
2743
|
+
offset = _options$offset === void 0 ? [0, 0] : _options$offset;
|
|
2744
|
+
var data = placements.reduce(function (acc, placement) {
|
|
2745
|
+
acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset);
|
|
2746
|
+
return acc;
|
|
2747
|
+
}, {});
|
|
2748
|
+
var _data$state$placement = data[state.placement],
|
|
2749
|
+
x = _data$state$placement.x,
|
|
2750
|
+
y = _data$state$placement.y;
|
|
2751
|
+
|
|
2752
|
+
if (state.modifiersData.popperOffsets != null) {
|
|
2753
|
+
state.modifiersData.popperOffsets.x += x;
|
|
2754
|
+
state.modifiersData.popperOffsets.y += y;
|
|
2755
|
+
}
|
|
2756
|
+
|
|
2757
|
+
state.modifiersData[name] = data;
|
|
2758
|
+
} // eslint-disable-next-line import/no-unused-modules
|
|
2759
|
+
|
|
2760
|
+
|
|
2761
|
+
var offset$1 = {
|
|
2762
|
+
name: 'offset',
|
|
2763
|
+
enabled: true,
|
|
2764
|
+
phase: 'main',
|
|
2765
|
+
requires: ['popperOffsets'],
|
|
2766
|
+
fn: offset
|
|
2767
|
+
};
|
|
2768
|
+
|
|
2769
|
+
function popperOffsets(_ref) {
|
|
2770
|
+
var state = _ref.state,
|
|
2771
|
+
name = _ref.name;
|
|
2772
|
+
// Offsets are the actual position the popper needs to have to be
|
|
2773
|
+
// properly positioned near its reference element
|
|
2774
|
+
// This is the most basic placement, and will be adjusted by
|
|
2775
|
+
// the modifiers in the next step
|
|
2776
|
+
state.modifiersData[name] = computeOffsets({
|
|
2777
|
+
reference: state.rects.reference,
|
|
2778
|
+
element: state.rects.popper,
|
|
2779
|
+
placement: state.placement
|
|
2780
|
+
});
|
|
2781
|
+
} // eslint-disable-next-line import/no-unused-modules
|
|
2782
|
+
|
|
2783
|
+
|
|
2784
|
+
var popperOffsets$1 = {
|
|
2785
|
+
name: 'popperOffsets',
|
|
2786
|
+
enabled: true,
|
|
2787
|
+
phase: 'read',
|
|
2788
|
+
fn: popperOffsets,
|
|
2789
|
+
data: {}
|
|
2790
|
+
};
|
|
2791
|
+
|
|
2792
|
+
function getAltAxis(axis) {
|
|
2793
|
+
return axis === 'x' ? 'y' : 'x';
|
|
2794
|
+
}
|
|
2795
|
+
|
|
2796
|
+
function preventOverflow(_ref) {
|
|
2797
|
+
var state = _ref.state,
|
|
2798
|
+
options = _ref.options,
|
|
2799
|
+
name = _ref.name;
|
|
2800
|
+
var _options$mainAxis = options.mainAxis,
|
|
2801
|
+
checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,
|
|
2802
|
+
_options$altAxis = options.altAxis,
|
|
2803
|
+
checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis,
|
|
2804
|
+
boundary = options.boundary,
|
|
2805
|
+
rootBoundary = options.rootBoundary,
|
|
2806
|
+
altBoundary = options.altBoundary,
|
|
2807
|
+
padding = options.padding,
|
|
2808
|
+
_options$tether = options.tether,
|
|
2809
|
+
tether = _options$tether === void 0 ? true : _options$tether,
|
|
2810
|
+
_options$tetherOffset = options.tetherOffset,
|
|
2811
|
+
tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset;
|
|
2812
|
+
var overflow = detectOverflow(state, {
|
|
2813
|
+
boundary: boundary,
|
|
2814
|
+
rootBoundary: rootBoundary,
|
|
2815
|
+
padding: padding,
|
|
2816
|
+
altBoundary: altBoundary
|
|
2817
|
+
});
|
|
2818
|
+
var basePlacement = getBasePlacement(state.placement);
|
|
2819
|
+
var variation = getVariation(state.placement);
|
|
2820
|
+
var isBasePlacement = !variation;
|
|
2821
|
+
var mainAxis = getMainAxisFromPlacement(basePlacement);
|
|
2822
|
+
var altAxis = getAltAxis(mainAxis);
|
|
2823
|
+
var popperOffsets = state.modifiersData.popperOffsets;
|
|
2824
|
+
var referenceRect = state.rects.reference;
|
|
2825
|
+
var popperRect = state.rects.popper;
|
|
2826
|
+
var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign({}, state.rects, {
|
|
2827
|
+
placement: state.placement
|
|
2828
|
+
})) : tetherOffset;
|
|
2829
|
+
var normalizedTetherOffsetValue = typeof tetherOffsetValue === 'number' ? {
|
|
2830
|
+
mainAxis: tetherOffsetValue,
|
|
2831
|
+
altAxis: tetherOffsetValue
|
|
2832
|
+
} : Object.assign({
|
|
2833
|
+
mainAxis: 0,
|
|
2834
|
+
altAxis: 0
|
|
2835
|
+
}, tetherOffsetValue);
|
|
2836
|
+
var offsetModifierState = state.modifiersData.offset ? state.modifiersData.offset[state.placement] : null;
|
|
2837
|
+
var data = {
|
|
2838
|
+
x: 0,
|
|
2839
|
+
y: 0
|
|
2840
|
+
};
|
|
2841
|
+
|
|
2842
|
+
if (!popperOffsets) {
|
|
2843
|
+
return;
|
|
2844
|
+
}
|
|
2845
|
+
|
|
2846
|
+
if (checkMainAxis) {
|
|
2847
|
+
var _offsetModifierState$;
|
|
2848
|
+
|
|
2849
|
+
var mainSide = mainAxis === 'y' ? top : left;
|
|
2850
|
+
var altSide = mainAxis === 'y' ? bottom : right;
|
|
2851
|
+
var len = mainAxis === 'y' ? 'height' : 'width';
|
|
2852
|
+
var offset = popperOffsets[mainAxis];
|
|
2853
|
+
var min$1 = offset + overflow[mainSide];
|
|
2854
|
+
var max$1 = offset - overflow[altSide];
|
|
2855
|
+
var additive = tether ? -popperRect[len] / 2 : 0;
|
|
2856
|
+
var minLen = variation === start ? referenceRect[len] : popperRect[len];
|
|
2857
|
+
var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go
|
|
2858
|
+
// outside the reference bounds
|
|
2859
|
+
|
|
2860
|
+
var arrowElement = state.elements.arrow;
|
|
2861
|
+
var arrowRect = tether && arrowElement ? getLayoutRect(arrowElement) : {
|
|
2862
|
+
width: 0,
|
|
2863
|
+
height: 0
|
|
2864
|
+
};
|
|
2865
|
+
var arrowPaddingObject = state.modifiersData['arrow#persistent'] ? state.modifiersData['arrow#persistent'].padding : getFreshSideObject();
|
|
2866
|
+
var arrowPaddingMin = arrowPaddingObject[mainSide];
|
|
2867
|
+
var arrowPaddingMax = arrowPaddingObject[altSide]; // If the reference length is smaller than the arrow length, we don't want
|
|
2868
|
+
// to include its full size in the calculation. If the reference is small
|
|
2869
|
+
// and near the edge of a boundary, the popper can overflow even if the
|
|
2870
|
+
// reference is not overflowing as well (e.g. virtual elements with no
|
|
2871
|
+
// width or height)
|
|
2872
|
+
|
|
2873
|
+
var arrowLen = within(0, referenceRect[len], arrowRect[len]);
|
|
2874
|
+
var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis;
|
|
2875
|
+
var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis;
|
|
2876
|
+
var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow);
|
|
2877
|
+
var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0;
|
|
2878
|
+
var offsetModifierValue = (_offsetModifierState$ = offsetModifierState == null ? void 0 : offsetModifierState[mainAxis]) != null ? _offsetModifierState$ : 0;
|
|
2879
|
+
var tetherMin = offset + minOffset - offsetModifierValue - clientOffset;
|
|
2880
|
+
var tetherMax = offset + maxOffset - offsetModifierValue;
|
|
2881
|
+
var preventedOffset = within(tether ? min(min$1, tetherMin) : min$1, offset, tether ? max(max$1, tetherMax) : max$1);
|
|
2882
|
+
popperOffsets[mainAxis] = preventedOffset;
|
|
2883
|
+
data[mainAxis] = preventedOffset - offset;
|
|
2884
|
+
}
|
|
2885
|
+
|
|
2886
|
+
if (checkAltAxis) {
|
|
2887
|
+
var _offsetModifierState$2;
|
|
2888
|
+
|
|
2889
|
+
var _mainSide = mainAxis === 'x' ? top : left;
|
|
2890
|
+
|
|
2891
|
+
var _altSide = mainAxis === 'x' ? bottom : right;
|
|
2892
|
+
|
|
2893
|
+
var _offset = popperOffsets[altAxis];
|
|
2894
|
+
|
|
2895
|
+
var _len = altAxis === 'y' ? 'height' : 'width';
|
|
2896
|
+
|
|
2897
|
+
var _min = _offset + overflow[_mainSide];
|
|
2898
|
+
|
|
2899
|
+
var _max = _offset - overflow[_altSide];
|
|
2900
|
+
|
|
2901
|
+
var isOriginSide = [top, left].indexOf(basePlacement) !== -1;
|
|
2902
|
+
|
|
2903
|
+
var _offsetModifierValue = (_offsetModifierState$2 = offsetModifierState == null ? void 0 : offsetModifierState[altAxis]) != null ? _offsetModifierState$2 : 0;
|
|
2904
|
+
|
|
2905
|
+
var _tetherMin = isOriginSide ? _min : _offset - referenceRect[_len] - popperRect[_len] - _offsetModifierValue + normalizedTetherOffsetValue.altAxis;
|
|
2906
|
+
|
|
2907
|
+
var _tetherMax = isOriginSide ? _offset + referenceRect[_len] + popperRect[_len] - _offsetModifierValue - normalizedTetherOffsetValue.altAxis : _max;
|
|
2908
|
+
|
|
2909
|
+
var _preventedOffset = tether && isOriginSide ? withinMaxClamp(_tetherMin, _offset, _tetherMax) : within(tether ? _tetherMin : _min, _offset, tether ? _tetherMax : _max);
|
|
2910
|
+
|
|
2911
|
+
popperOffsets[altAxis] = _preventedOffset;
|
|
2912
|
+
data[altAxis] = _preventedOffset - _offset;
|
|
2913
|
+
}
|
|
2914
|
+
|
|
2915
|
+
state.modifiersData[name] = data;
|
|
2916
|
+
} // eslint-disable-next-line import/no-unused-modules
|
|
2917
|
+
|
|
2918
|
+
|
|
2919
|
+
var preventOverflow$1 = {
|
|
2920
|
+
name: 'preventOverflow',
|
|
2921
|
+
enabled: true,
|
|
2922
|
+
phase: 'main',
|
|
2923
|
+
fn: preventOverflow,
|
|
2924
|
+
requiresIfExists: ['offset']
|
|
2925
|
+
};
|
|
2926
|
+
|
|
2927
|
+
function getHTMLElementScroll(element) {
|
|
2928
|
+
return {
|
|
2929
|
+
scrollLeft: element.scrollLeft,
|
|
2930
|
+
scrollTop: element.scrollTop
|
|
2931
|
+
};
|
|
2932
|
+
}
|
|
2933
|
+
|
|
2934
|
+
function getNodeScroll(node) {
|
|
2935
|
+
if (node === getWindow(node) || !isHTMLElement(node)) {
|
|
2936
|
+
return getWindowScroll(node);
|
|
2937
|
+
} else {
|
|
2938
|
+
return getHTMLElementScroll(node);
|
|
2939
|
+
}
|
|
2940
|
+
}
|
|
2941
|
+
|
|
2942
|
+
function isElementScaled(element) {
|
|
2943
|
+
var rect = element.getBoundingClientRect();
|
|
2944
|
+
var scaleX = round(rect.width) / element.offsetWidth || 1;
|
|
2945
|
+
var scaleY = round(rect.height) / element.offsetHeight || 1;
|
|
2946
|
+
return scaleX !== 1 || scaleY !== 1;
|
|
2947
|
+
} // Returns the composite rect of an element relative to its offsetParent.
|
|
2948
|
+
// Composite means it takes into account transforms as well as layout.
|
|
2949
|
+
|
|
2950
|
+
|
|
2951
|
+
function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {
|
|
2952
|
+
if (isFixed === void 0) {
|
|
2953
|
+
isFixed = false;
|
|
2954
|
+
}
|
|
2955
|
+
|
|
2956
|
+
var isOffsetParentAnElement = isHTMLElement(offsetParent);
|
|
2957
|
+
var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);
|
|
2958
|
+
var documentElement = getDocumentElement(offsetParent);
|
|
2959
|
+
var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled, isFixed);
|
|
2960
|
+
var scroll = {
|
|
2961
|
+
scrollLeft: 0,
|
|
2962
|
+
scrollTop: 0
|
|
2963
|
+
};
|
|
2964
|
+
var offsets = {
|
|
2965
|
+
x: 0,
|
|
2966
|
+
y: 0
|
|
2967
|
+
};
|
|
2968
|
+
|
|
2969
|
+
if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {
|
|
2970
|
+
if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078
|
|
2971
|
+
isScrollParent(documentElement)) {
|
|
2972
|
+
scroll = getNodeScroll(offsetParent);
|
|
2973
|
+
}
|
|
2974
|
+
|
|
2975
|
+
if (isHTMLElement(offsetParent)) {
|
|
2976
|
+
offsets = getBoundingClientRect(offsetParent, true);
|
|
2977
|
+
offsets.x += offsetParent.clientLeft;
|
|
2978
|
+
offsets.y += offsetParent.clientTop;
|
|
2979
|
+
} else if (documentElement) {
|
|
2980
|
+
offsets.x = getWindowScrollBarX(documentElement);
|
|
2981
|
+
}
|
|
2982
|
+
}
|
|
2983
|
+
|
|
2984
|
+
return {
|
|
2985
|
+
x: rect.left + scroll.scrollLeft - offsets.x,
|
|
2986
|
+
y: rect.top + scroll.scrollTop - offsets.y,
|
|
2987
|
+
width: rect.width,
|
|
2988
|
+
height: rect.height
|
|
2989
|
+
};
|
|
2990
|
+
}
|
|
2991
|
+
|
|
2992
|
+
function order(modifiers) {
|
|
2993
|
+
var map = new Map();
|
|
2994
|
+
var visited = new Set();
|
|
2995
|
+
var result = [];
|
|
2996
|
+
modifiers.forEach(function (modifier) {
|
|
2997
|
+
map.set(modifier.name, modifier);
|
|
2998
|
+
}); // On visiting object, check for its dependencies and visit them recursively
|
|
2999
|
+
|
|
3000
|
+
function sort(modifier) {
|
|
3001
|
+
visited.add(modifier.name);
|
|
3002
|
+
var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []);
|
|
3003
|
+
requires.forEach(function (dep) {
|
|
3004
|
+
if (!visited.has(dep)) {
|
|
3005
|
+
var depModifier = map.get(dep);
|
|
3006
|
+
|
|
3007
|
+
if (depModifier) {
|
|
3008
|
+
sort(depModifier);
|
|
3009
|
+
}
|
|
3010
|
+
}
|
|
3011
|
+
});
|
|
3012
|
+
result.push(modifier);
|
|
3013
|
+
}
|
|
3014
|
+
|
|
3015
|
+
modifiers.forEach(function (modifier) {
|
|
3016
|
+
if (!visited.has(modifier.name)) {
|
|
3017
|
+
// check for visited object
|
|
3018
|
+
sort(modifier);
|
|
3019
|
+
}
|
|
3020
|
+
});
|
|
3021
|
+
return result;
|
|
3022
|
+
}
|
|
3023
|
+
|
|
3024
|
+
function orderModifiers(modifiers) {
|
|
3025
|
+
// order based on dependencies
|
|
3026
|
+
var orderedModifiers = order(modifiers); // order based on phase
|
|
3027
|
+
|
|
3028
|
+
return modifierPhases.reduce(function (acc, phase) {
|
|
3029
|
+
return acc.concat(orderedModifiers.filter(function (modifier) {
|
|
3030
|
+
return modifier.phase === phase;
|
|
3031
|
+
}));
|
|
3032
|
+
}, []);
|
|
3033
|
+
}
|
|
3034
|
+
|
|
3035
|
+
function debounce(fn) {
|
|
3036
|
+
var pending;
|
|
3037
|
+
return function () {
|
|
3038
|
+
if (!pending) {
|
|
3039
|
+
pending = new Promise(function (resolve) {
|
|
3040
|
+
Promise.resolve().then(function () {
|
|
3041
|
+
pending = undefined;
|
|
3042
|
+
resolve(fn());
|
|
3043
|
+
});
|
|
3044
|
+
});
|
|
3045
|
+
}
|
|
3046
|
+
|
|
3047
|
+
return pending;
|
|
3048
|
+
};
|
|
3049
|
+
}
|
|
3050
|
+
|
|
3051
|
+
function mergeByName(modifiers) {
|
|
3052
|
+
var merged = modifiers.reduce(function (merged, current) {
|
|
3053
|
+
var existing = merged[current.name];
|
|
3054
|
+
merged[current.name] = existing ? Object.assign({}, existing, current, {
|
|
3055
|
+
options: Object.assign({}, existing.options, current.options),
|
|
3056
|
+
data: Object.assign({}, existing.data, current.data)
|
|
3057
|
+
}) : current;
|
|
3058
|
+
return merged;
|
|
3059
|
+
}, {}); // IE11 does not support Object.values
|
|
3060
|
+
|
|
3061
|
+
return Object.keys(merged).map(function (key) {
|
|
3062
|
+
return merged[key];
|
|
3063
|
+
});
|
|
3064
|
+
}
|
|
3065
|
+
|
|
3066
|
+
var DEFAULT_OPTIONS = {
|
|
3067
|
+
placement: 'bottom',
|
|
3068
|
+
modifiers: [],
|
|
3069
|
+
strategy: 'absolute'
|
|
3070
|
+
};
|
|
3071
|
+
|
|
3072
|
+
function areValidElements() {
|
|
3073
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
3074
|
+
args[_key] = arguments[_key];
|
|
3075
|
+
}
|
|
3076
|
+
|
|
3077
|
+
return !args.some(function (element) {
|
|
3078
|
+
return !(element && typeof element.getBoundingClientRect === 'function');
|
|
3079
|
+
});
|
|
3080
|
+
}
|
|
3081
|
+
|
|
3082
|
+
function popperGenerator(generatorOptions) {
|
|
3083
|
+
if (generatorOptions === void 0) {
|
|
3084
|
+
generatorOptions = {};
|
|
3085
|
+
}
|
|
3086
|
+
|
|
3087
|
+
var _generatorOptions = generatorOptions,
|
|
3088
|
+
_generatorOptions$def = _generatorOptions.defaultModifiers,
|
|
3089
|
+
defaultModifiers = _generatorOptions$def === void 0 ? [] : _generatorOptions$def,
|
|
3090
|
+
_generatorOptions$def2 = _generatorOptions.defaultOptions,
|
|
3091
|
+
defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2;
|
|
3092
|
+
return function createPopper(reference, popper, options) {
|
|
3093
|
+
if (options === void 0) {
|
|
3094
|
+
options = defaultOptions;
|
|
3095
|
+
}
|
|
3096
|
+
|
|
3097
|
+
var state = {
|
|
3098
|
+
placement: 'bottom',
|
|
3099
|
+
orderedModifiers: [],
|
|
3100
|
+
options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions),
|
|
3101
|
+
modifiersData: {},
|
|
3102
|
+
elements: {
|
|
3103
|
+
reference: reference,
|
|
3104
|
+
popper: popper
|
|
3105
|
+
},
|
|
3106
|
+
attributes: {},
|
|
3107
|
+
styles: {}
|
|
3108
|
+
};
|
|
3109
|
+
var effectCleanupFns = [];
|
|
3110
|
+
var isDestroyed = false;
|
|
3111
|
+
var instance = {
|
|
3112
|
+
state: state,
|
|
3113
|
+
setOptions: function setOptions(setOptionsAction) {
|
|
3114
|
+
var options = typeof setOptionsAction === 'function' ? setOptionsAction(state.options) : setOptionsAction;
|
|
3115
|
+
cleanupModifierEffects();
|
|
3116
|
+
state.options = Object.assign({}, defaultOptions, state.options, options);
|
|
3117
|
+
state.scrollParents = {
|
|
3118
|
+
reference: isElement(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [],
|
|
3119
|
+
popper: listScrollParents(popper)
|
|
3120
|
+
}; // Orders the modifiers based on their dependencies and `phase`
|
|
3121
|
+
// properties
|
|
3122
|
+
|
|
3123
|
+
var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers, state.options.modifiers))); // Strip out disabled modifiers
|
|
3124
|
+
|
|
3125
|
+
state.orderedModifiers = orderedModifiers.filter(function (m) {
|
|
3126
|
+
return m.enabled;
|
|
3127
|
+
});
|
|
3128
|
+
runModifierEffects();
|
|
3129
|
+
return instance.update();
|
|
3130
|
+
},
|
|
3131
|
+
// Sync update – it will always be executed, even if not necessary. This
|
|
3132
|
+
// is useful for low frequency updates where sync behavior simplifies the
|
|
3133
|
+
// logic.
|
|
3134
|
+
// For high frequency updates (e.g. `resize` and `scroll` events), always
|
|
3135
|
+
// prefer the async Popper#update method
|
|
3136
|
+
forceUpdate: function forceUpdate() {
|
|
3137
|
+
if (isDestroyed) {
|
|
3138
|
+
return;
|
|
3139
|
+
}
|
|
3140
|
+
|
|
3141
|
+
var _state$elements = state.elements,
|
|
3142
|
+
reference = _state$elements.reference,
|
|
3143
|
+
popper = _state$elements.popper; // Don't proceed if `reference` or `popper` are not valid elements
|
|
3144
|
+
// anymore
|
|
3145
|
+
|
|
3146
|
+
if (!areValidElements(reference, popper)) {
|
|
3147
|
+
return;
|
|
3148
|
+
} // Store the reference and popper rects to be read by modifiers
|
|
3149
|
+
|
|
3150
|
+
|
|
3151
|
+
state.rects = {
|
|
3152
|
+
reference: getCompositeRect(reference, getOffsetParent(popper), state.options.strategy === 'fixed'),
|
|
3153
|
+
popper: getLayoutRect(popper)
|
|
3154
|
+
}; // Modifiers have the ability to reset the current update cycle. The
|
|
3155
|
+
// most common use case for this is the `flip` modifier changing the
|
|
3156
|
+
// placement, which then needs to re-run all the modifiers, because the
|
|
3157
|
+
// logic was previously ran for the previous placement and is therefore
|
|
3158
|
+
// stale/incorrect
|
|
3159
|
+
|
|
3160
|
+
state.reset = false;
|
|
3161
|
+
state.placement = state.options.placement; // On each update cycle, the `modifiersData` property for each modifier
|
|
3162
|
+
// is filled with the initial data specified by the modifier. This means
|
|
3163
|
+
// it doesn't persist and is fresh on each update.
|
|
3164
|
+
// To ensure persistent data, use `${name}#persistent`
|
|
3165
|
+
|
|
3166
|
+
state.orderedModifiers.forEach(function (modifier) {
|
|
3167
|
+
return state.modifiersData[modifier.name] = Object.assign({}, modifier.data);
|
|
3168
|
+
});
|
|
3169
|
+
|
|
3170
|
+
for (var index = 0; index < state.orderedModifiers.length; index++) {
|
|
3171
|
+
if (state.reset === true) {
|
|
3172
|
+
state.reset = false;
|
|
3173
|
+
index = -1;
|
|
3174
|
+
continue;
|
|
3175
|
+
}
|
|
3176
|
+
|
|
3177
|
+
var _state$orderedModifie = state.orderedModifiers[index],
|
|
3178
|
+
fn = _state$orderedModifie.fn,
|
|
3179
|
+
_state$orderedModifie2 = _state$orderedModifie.options,
|
|
3180
|
+
_options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2,
|
|
3181
|
+
name = _state$orderedModifie.name;
|
|
3182
|
+
|
|
3183
|
+
if (typeof fn === 'function') {
|
|
3184
|
+
state = fn({
|
|
3185
|
+
state: state,
|
|
3186
|
+
options: _options,
|
|
3187
|
+
name: name,
|
|
3188
|
+
instance: instance
|
|
3189
|
+
}) || state;
|
|
3190
|
+
}
|
|
3191
|
+
}
|
|
3192
|
+
},
|
|
3193
|
+
// Async and optimistically optimized update – it will not be executed if
|
|
3194
|
+
// not necessary (debounced to run at most once-per-tick)
|
|
3195
|
+
update: debounce(function () {
|
|
3196
|
+
return new Promise(function (resolve) {
|
|
3197
|
+
instance.forceUpdate();
|
|
3198
|
+
resolve(state);
|
|
3199
|
+
});
|
|
3200
|
+
}),
|
|
3201
|
+
destroy: function destroy() {
|
|
3202
|
+
cleanupModifierEffects();
|
|
3203
|
+
isDestroyed = true;
|
|
3204
|
+
}
|
|
3205
|
+
};
|
|
3206
|
+
|
|
3207
|
+
if (!areValidElements(reference, popper)) {
|
|
3208
|
+
return instance;
|
|
3209
|
+
}
|
|
3210
|
+
|
|
3211
|
+
instance.setOptions(options).then(function (state) {
|
|
3212
|
+
if (!isDestroyed && options.onFirstUpdate) {
|
|
3213
|
+
options.onFirstUpdate(state);
|
|
3214
|
+
}
|
|
3215
|
+
}); // Modifiers have the ability to execute arbitrary code before the first
|
|
3216
|
+
// update cycle runs. They will be executed in the same order as the update
|
|
3217
|
+
// cycle. This is useful when a modifier adds some persistent data that
|
|
3218
|
+
// other modifiers need to use, but the modifier is run after the dependent
|
|
3219
|
+
// one.
|
|
3220
|
+
|
|
3221
|
+
function runModifierEffects() {
|
|
3222
|
+
state.orderedModifiers.forEach(function (_ref) {
|
|
3223
|
+
var name = _ref.name,
|
|
3224
|
+
_ref$options = _ref.options,
|
|
3225
|
+
options = _ref$options === void 0 ? {} : _ref$options,
|
|
3226
|
+
effect = _ref.effect;
|
|
3227
|
+
|
|
3228
|
+
if (typeof effect === 'function') {
|
|
3229
|
+
var cleanupFn = effect({
|
|
3230
|
+
state: state,
|
|
3231
|
+
name: name,
|
|
3232
|
+
instance: instance,
|
|
3233
|
+
options: options
|
|
3234
|
+
});
|
|
3235
|
+
|
|
3236
|
+
var noopFn = function noopFn() {};
|
|
3237
|
+
|
|
3238
|
+
effectCleanupFns.push(cleanupFn || noopFn);
|
|
3239
|
+
}
|
|
3240
|
+
});
|
|
3241
|
+
}
|
|
3242
|
+
|
|
3243
|
+
function cleanupModifierEffects() {
|
|
3244
|
+
effectCleanupFns.forEach(function (fn) {
|
|
3245
|
+
return fn();
|
|
3246
|
+
});
|
|
3247
|
+
effectCleanupFns = [];
|
|
3248
|
+
}
|
|
3249
|
+
|
|
3250
|
+
return instance;
|
|
3251
|
+
};
|
|
3252
|
+
}
|
|
3253
|
+
|
|
3254
|
+
var defaultModifiers = [eventListeners, popperOffsets$1, computeStyles$1, applyStyles$1, offset$1, flip$1, preventOverflow$1, arrow$1, hide$1];
|
|
3255
|
+
var createPopper = /*#__PURE__*/popperGenerator({
|
|
3256
|
+
defaultModifiers: defaultModifiers
|
|
3257
|
+
}); // eslint-disable-next-line import/no-unused-modules
|
|
3258
|
+
|
|
3259
|
+
const xvToggleTipCss = ":host{display:inline-block;font-family:inherit}:host .trigger{display:inline-flex;align-items:center;cursor:pointer;transition:250ms ease-in-out color;color:var(--icon-secondary)}:host .trigger_icon{color:inherit}:host .trigger ::slotted([slot=trigger]){transition:250ms ease-in-out color;color:var(--icon-secondary)}:host .trigger:hover,:host .trigger:active,:host .trigger ::slotted([slot=trigger]:hover),:host .trigger ::slotted([slot=trigger]:active){color:var(--icon-primary)}:host .trigger:focus,:host .trigger ::slotted([slot=trigger]:focus){color:var(--focus)}:host .popover{opacity:1;z-index:1000;position:absolute;background-color:var(--background-inverse);color:var(--text-inverse);border-radius:4px;box-shadow:0 2px 8px rgba(0, 0, 0, 0.25);max-width:288px;font-size:0.875rem;line-height:1.5;margin-top:8px;flex-direction:column;display:flex}:host .popover[data-popper-placement^=top] .popover-tip{bottom:-4px}:host .popover[data-popper-placement^=bottom] .popover-tip{top:-4px}:host .popover[data-popper-placement^=left] .popover-tip{right:-4px}:host .popover[data-popper-placement^=right] .popover-tip{left:-4px}:host .popover .popover-tip{width:10px;height:10px;background-color:transparent;z-index:-1}:host .popover .popover-tip:before{content:\"\";transform:rotate(45deg);background-color:var(--background-inverse);width:inherit;height:inherit;display:inline-block}:host .popover .popover-content{padding:var(--gap-md);display:flex;flex-direction:column;gap:var(--spacing-04)}:host .popover .popover-content ::slotted([slot=header]){font-size:0.875rem;font-weight:600;color:var(--text-secondary)}:host .popover .popover-content ::slotted([slot=body]){font-size:0.875rem;color:var(--text-inverse)}:host .popover .popover-content ::slotted([slot=footer]){font-size:0.75rem;color:var(--text-inverse);opacity:0.8}:host(:not([open])) .popover{opacity:0;z-index:-1;user-select:none;pointer-events:none}";
|
|
3260
|
+
|
|
3261
|
+
const XvToggleTip = class {
|
|
3262
|
+
constructor(hostRef) {
|
|
3263
|
+
index.registerInstance(this, hostRef);
|
|
3264
|
+
this.openChange = index.createEvent(this, "openChange");
|
|
3265
|
+
this.open = false;
|
|
3266
|
+
this.position = 'auto';
|
|
3267
|
+
this.destroyPopper = () => {
|
|
3268
|
+
if (this.popperInstance) {
|
|
3269
|
+
this.popperInstance.destroy();
|
|
3270
|
+
this.popperInstance = undefined;
|
|
1223
3271
|
}
|
|
1224
3272
|
};
|
|
1225
3273
|
}
|
|
3274
|
+
openChangeHandle() {
|
|
3275
|
+
if (this.open) {
|
|
3276
|
+
requestAnimationFrame(() => this.createPopper());
|
|
3277
|
+
}
|
|
3278
|
+
else {
|
|
3279
|
+
this.destroyPopper();
|
|
3280
|
+
}
|
|
3281
|
+
this.openChange.emit(this.open);
|
|
3282
|
+
}
|
|
3283
|
+
handleClickOutside(e) {
|
|
3284
|
+
if (this.open && !this.el.contains(e.target)) {
|
|
3285
|
+
this.open = false;
|
|
3286
|
+
}
|
|
3287
|
+
}
|
|
3288
|
+
;
|
|
3289
|
+
handleKeyDown(e) {
|
|
3290
|
+
if (e.key === 'Escape' && this.open) {
|
|
3291
|
+
this.open = false;
|
|
3292
|
+
}
|
|
3293
|
+
}
|
|
3294
|
+
;
|
|
3295
|
+
async setPopover(open) {
|
|
3296
|
+
if (open === this.open)
|
|
3297
|
+
return;
|
|
3298
|
+
this.open = open;
|
|
3299
|
+
return this.open;
|
|
3300
|
+
}
|
|
3301
|
+
;
|
|
3302
|
+
createPopper() {
|
|
3303
|
+
if (!this.triggerEl || !this.popoverEl) {
|
|
3304
|
+
console.warn('XvToggleTip can`t find the trigger or popover container!');
|
|
3305
|
+
return;
|
|
3306
|
+
}
|
|
3307
|
+
this.popperInstance = createPopper(this.triggerEl, this.popoverEl, {
|
|
3308
|
+
placement: this.position,
|
|
3309
|
+
modifiers: [
|
|
3310
|
+
{
|
|
3311
|
+
name: 'offset',
|
|
3312
|
+
options: {
|
|
3313
|
+
offset: [0, 8],
|
|
3314
|
+
},
|
|
3315
|
+
},
|
|
3316
|
+
{
|
|
3317
|
+
name: 'preventOverflow',
|
|
3318
|
+
options: {
|
|
3319
|
+
boundary: 'viewport',
|
|
3320
|
+
padding: 8,
|
|
3321
|
+
},
|
|
3322
|
+
},
|
|
3323
|
+
],
|
|
3324
|
+
});
|
|
3325
|
+
}
|
|
3326
|
+
;
|
|
1226
3327
|
render() {
|
|
1227
|
-
return (index.h(index.Host, { key: '
|
|
3328
|
+
return (index.h(index.Host, { key: '098a12a12ea834fdbe0e05ad416df079991392a9', class: "xv-toggle-tip" }, index.h("div", { key: '0916aafb4d45b1cc40b3358c56c66e2156fb6e1f', class: "trigger", role: "button", tabindex: "0", "aria-expanded": this.open ? 'true' : 'false', "aria-controls": "popover", onClick: () => this.setPopover(!this.open), ref: (el) => (this.triggerEl = el) }, index.h("slot", { key: '3e848492e91f580a70181779f1ea689f646b9df7', name: "trigger" }, index.h("svg", { key: 'd9d4c1d33299c5ef0d07d1bcb18e725935b23de3', class: "trigger_icon", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512", width: 16, height: 16 }, index.h("path", { key: '0d0002339eab33a4061d02e4d2108129c4df045d', fill: "currentColor", d: "M256 48a208 208 0 1 1 0 416 208 208 0 1 1 0-416zm0 464A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM216 336c-13.3 0-24 10.7-24 24s10.7 24 24 24l80 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-8 0 0-88c0-13.3-10.7-24-24-24l-48 0c-13.3 0-24 10.7-24 24s10.7 24 24 24l24 0 0 64-24 0zm40-144a32 32 0 1 0 0-64 32 32 0 1 0 0 64z" })))), index.h("div", { key: 'bdcadfb1cf28b0efe06bad4d8182e736798c5c9c', class: { popover: true }, role: "tooltip", tabindex: "-1", ref: (el) => (this.popoverEl = el) }, index.h("div", { key: '8a0f4c62e5774f085b7dd155f4858eb967195c8a', class: "popover-tip", part: "tip", "data-popper-arrow": "" }), index.h("div", { key: '76e30305c8a0147c8dffcba69666f81ddf8943f6', class: "popover-content" }, index.h("slot", { key: 'a1082ff655a936449a14560771f0b8d1b09c83b5', name: "header" }), index.h("slot", { key: 'dab04aa698b7169d2ddce0326f7ac8ab5911f48a', name: "body" }), index.h("slot", { key: 'a31ece6410d5dd8eb16fcf059713e460f1e58e1f', name: "footer" })))));
|
|
1228
3329
|
}
|
|
1229
|
-
|
|
1230
|
-
this.
|
|
3330
|
+
disconnectedCallback() {
|
|
3331
|
+
this.destroyPopper();
|
|
1231
3332
|
}
|
|
1232
|
-
static get formAssociated() { return true; }
|
|
1233
3333
|
get el() { return index.getElement(this); }
|
|
3334
|
+
static get watchers() { return {
|
|
3335
|
+
"open": ["openChangeHandle"]
|
|
3336
|
+
}; }
|
|
1234
3337
|
};
|
|
1235
|
-
|
|
3338
|
+
XvToggleTip.style = xvToggleTipCss;
|
|
1236
3339
|
|
|
1237
|
-
const xvTooltipCss = ":host{position:relative;display:
|
|
3340
|
+
const xvTooltipCss = ":host{position:relative;display:contents}.xv-tooltip[role=tooltip]{position:absolute;background-color:var(--background-inverse);color:var(--text-on-color);padding:var(--spacing-03) var(--spacing-04);border-radius:3px;font-size:var(--fz-md);z-index:999;max-width:min(400px, 90vw);overflow:visible}.xv-tooltip[role=tooltip] [data-popper-arrow]{position:absolute;width:10px;height:10px;background-color:transparent;z-index:-1}.xv-tooltip[role=tooltip] [data-popper-arrow]:before{content:\"\";transform:rotate(45deg);background-color:var(--background-inverse);width:inherit;height:inherit;display:inline-block}.xv-tooltip[role=tooltip][data-popper-placement^=top] [data-popper-arrow]{bottom:1px}.xv-tooltip[role=tooltip][data-popper-placement^=bottom] [data-popper-arrow]{top:-10px}.xv-tooltip[role=tooltip][data-popper-placement^=left] [data-popper-arrow]{right:-4px}.xv-tooltip[role=tooltip][data-popper-placement^=right] [data-popper-arrow]{left:-4px}";
|
|
1238
3341
|
|
|
1239
3342
|
const XvTooltip = class {
|
|
1240
3343
|
constructor(hostRef) {
|
|
1241
3344
|
index.registerInstance(this, hostRef);
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
this.
|
|
3345
|
+
this.position = 'auto';
|
|
3346
|
+
this.visible = false;
|
|
3347
|
+
}
|
|
3348
|
+
onMouseEnter() {
|
|
3349
|
+
this.visible = true;
|
|
3350
|
+
requestAnimationFrame(() => this.createPopper());
|
|
3351
|
+
}
|
|
3352
|
+
onMouseLeave() {
|
|
3353
|
+
this.visible = false;
|
|
3354
|
+
this.destroyPopper();
|
|
3355
|
+
}
|
|
3356
|
+
createPopper() {
|
|
3357
|
+
if (this.tooltipEl) {
|
|
3358
|
+
this.popperInstance = createPopper(this.el, this.tooltipEl, {
|
|
3359
|
+
placement: this.position,
|
|
3360
|
+
modifiers: [{ name: 'offset', options: { offset: [0, 8] } }],
|
|
3361
|
+
});
|
|
3362
|
+
}
|
|
3363
|
+
}
|
|
3364
|
+
destroyPopper() {
|
|
3365
|
+
var _a;
|
|
3366
|
+
(_a = this.popperInstance) === null || _a === void 0 ? void 0 : _a.destroy();
|
|
3367
|
+
this.popperInstance = null;
|
|
1248
3368
|
}
|
|
1249
3369
|
render() {
|
|
1250
|
-
return (index.h(index.Host, { key: '
|
|
3370
|
+
return (index.h(index.Host, { key: 'b7871e2953badde14480725af497d081a3491314' }, index.h("slot", { key: 'f68977960275b860b5168d129a7344126c7dc72b' }, index.h("svg", { key: '65a8ff73f41537fe2f3fff8d2ccd66bd3f9b00da', xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512", width: 16, height: 16 }, index.h("path", { key: '446cbb1da8cd575eac8a3c72ad3798214d9211c4', fill: "currentColor", d: "M256 48a208 208 0 1 1 0 416 208 208 0 1 1 0-416zm0 464A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM216 336c-13.3 0-24 10.7-24 24s10.7 24 24 24l80 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-8 0 0-88c0-13.3-10.7-24-24-24l-48 0c-13.3 0-24 10.7-24 24s10.7 24 24 24l24 0 0 64-24 0zm40-144a32 32 0 1 0 0-64 32 32 0 1 0 0 64z" }))), this.visible && (index.h("div", { key: 'e4e277dc8df6ba32a0a09d64f385671a2ce0185d', class: "xv-tooltip", ref: (el) => (this.tooltipEl = el), role: "tooltip" }, this.message, index.h("div", { key: '446e10ddc1b2b00aef2b472143f168f88fc0991c', class: "xv-tooltip-arrow", "data-popper-arrow": "" })))));
|
|
1251
3371
|
}
|
|
3372
|
+
get el() { return index.getElement(this); }
|
|
1252
3373
|
};
|
|
1253
3374
|
XvTooltip.style = xvTooltipCss;
|
|
1254
3375
|
|
|
@@ -1257,8 +3378,12 @@ exports.xv_accordion_v2_item = XvAccordionItem;
|
|
|
1257
3378
|
exports.xv_button_v2 = XvButton;
|
|
1258
3379
|
exports.xv_card_v2 = XvCard;
|
|
1259
3380
|
exports.xv_checkbox_v2 = XvCheckbox;
|
|
3381
|
+
exports.xv_data_table = XvDataTable;
|
|
3382
|
+
exports.xv_data_table_cell = XvDataTableCell;
|
|
3383
|
+
exports.xv_data_table_row = XvDataTableRow;
|
|
1260
3384
|
exports.xv_dropdown_v2 = XvDropdown;
|
|
1261
3385
|
exports.xv_dropdown_v2_item = XvDropdownItem;
|
|
3386
|
+
exports.xv_file_uploader = XvFileUploader;
|
|
1262
3387
|
exports.xv_footer = Xvfooter;
|
|
1263
3388
|
exports.xv_header = XvHeader;
|
|
1264
3389
|
exports.xv_link_v2 = XvLink;
|
|
@@ -1266,6 +3391,7 @@ exports.xv_loader_v2 = XvLoader;
|
|
|
1266
3391
|
exports.xv_login_modal = XvLoginModal;
|
|
1267
3392
|
exports.xv_modal_v2 = XvModal;
|
|
1268
3393
|
exports.xv_notification_v2 = XvNotification;
|
|
3394
|
+
exports.xv_number_input_v2 = XvNumberInput;
|
|
1269
3395
|
exports.xv_overflow_menu_v2 = XvOverflowMenu;
|
|
1270
3396
|
exports.xv_overflow_menu_v2_item = XvOverflowMenuItem;
|
|
1271
3397
|
exports.xv_progress_indicator_v2 = XvProgressIndicator;
|
|
@@ -1278,7 +3404,8 @@ exports.xv_table_v2_row = XvTableRow;
|
|
|
1278
3404
|
exports.xv_tabs_v2 = XvTabs;
|
|
1279
3405
|
exports.xv_tag_v2 = XvTag;
|
|
1280
3406
|
exports.xv_text_input_v2 = XvTextInput;
|
|
3407
|
+
exports.xv_toggle_tip = XvToggleTip;
|
|
1281
3408
|
exports.xv_tooltip_v2 = XvTooltip;
|
|
1282
|
-
//# sourceMappingURL=xv-accordion-v2.xv-accordion-v2-item.xv-button-v2.xv-card-v2.xv-checkbox-v2.xv-dropdown-v2.xv-dropdown-v2-item.xv-footer.xv-header.xv-link-v2.xv-loader-v2.xv-login-modal.xv-modal-v2.xv-notification-v2.xv-overflow-menu-v2.xv-overflow-menu-v2-item.xv-progress-indicator-v2.xv-progress-indicator-v2-item.xv-tab-v2.xv-table-v2.xv-table-v2-cell.xv-table-v2-expand.xv-table-v2-row.xv-tabs-v2.xv-tag-v2.xv-text-input-v2.xv-tooltip-v2.entry.cjs.js.map
|
|
3409
|
+
//# sourceMappingURL=xv-accordion-v2.xv-accordion-v2-item.xv-button-v2.xv-card-v2.xv-checkbox-v2.xv-data-table.xv-data-table-cell.xv-data-table-row.xv-dropdown-v2.xv-dropdown-v2-item.xv-file-uploader.xv-footer.xv-header.xv-link-v2.xv-loader-v2.xv-login-modal.xv-modal-v2.xv-notification-v2.xv-number-input-v2.xv-overflow-menu-v2.xv-overflow-menu-v2-item.xv-progress-indicator-v2.xv-progress-indicator-v2-item.xv-tab-v2.xv-table-v2.xv-table-v2-cell.xv-table-v2-expand.xv-table-v2-row.xv-tabs-v2.xv-tag-v2.xv-text-input-v2.xv-toggle-tip.xv-tooltip-v2.entry.cjs.js.map
|
|
1283
3410
|
|
|
1284
|
-
//# sourceMappingURL=xv-accordion-
|
|
3411
|
+
//# sourceMappingURL=xv-accordion-v2_33.cjs.entry.js.map
|