@getflip/swirl-components 0.403.0 → 0.405.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components.json +200 -17
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/swirl-app-layout_5.cjs.entry.js +4 -2
- package/dist/cjs/swirl-components.cjs.js +1 -1
- package/dist/cjs/swirl-icon-arrow-left_4.cjs.entry.js +1 -1
- package/dist/cjs/swirl-icon-error_3.cjs.entry.js +1 -1
- package/dist/cjs/swirl-search.cjs.entry.js +1 -1
- package/dist/cjs/swirl-shell-layout.cjs.entry.js +6 -6
- package/dist/cjs/swirl-shell-navigation-item.cjs.entry.js +2 -2
- package/dist/cjs/swirl-skeleton-box.cjs.entry.js +2 -2
- package/dist/cjs/swirl-skeleton-text.cjs.entry.js +1 -1
- package/dist/cjs/swirl-status-indicator.cjs.entry.js +1 -1
- package/dist/cjs/swirl-switch.cjs.entry.js +2 -2
- package/dist/cjs/swirl-tab-bar.cjs.entry.js +1 -1
- package/dist/cjs/swirl-tab.cjs.entry.js +1 -1
- package/dist/cjs/swirl-table-column.cjs.entry.js +1 -1
- package/dist/cjs/swirl-table.cjs.entry.js +1 -1
- package/dist/cjs/swirl-tag.cjs.entry.js +1 -1
- package/dist/cjs/swirl-text.cjs.entry.js +1 -1
- package/dist/cjs/swirl-toast-provider.cjs.entry.js +1 -1
- package/dist/cjs/swirl-toast.cjs.entry.js +1 -1
- package/dist/cjs/swirl-toggle-group.cjs.entry.js +1 -1
- package/dist/cjs/swirl-toolbar.cjs.entry.js +1 -1
- package/dist/cjs/swirl-tooltip.cjs.entry.js +42 -40
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/swirl-resource-list-item/swirl-resource-list-item.css +0 -1
- package/dist/collection/components/swirl-resource-list-item/swirl-resource-list-item.js +48 -1
- package/dist/collection/components/swirl-search/swirl-search.js +1 -1
- package/dist/collection/components/swirl-shell-layout/swirl-shell-layout.js +6 -6
- package/dist/collection/components/swirl-shell-navigation-item/swirl-shell-navigation-item.js +2 -2
- package/dist/collection/components/swirl-skeleton-box/swirl-skeleton-box.js +2 -2
- package/dist/collection/components/swirl-skeleton-text/swirl-skeleton-text.js +1 -1
- package/dist/collection/components/swirl-spinner/swirl-spinner.js +1 -1
- package/dist/collection/components/swirl-status-indicator/swirl-status-indicator.js +1 -1
- package/dist/collection/components/swirl-switch/swirl-switch.js +2 -2
- package/dist/collection/components/swirl-tab/swirl-tab.js +1 -1
- package/dist/collection/components/swirl-tab-bar/swirl-tab-bar.js +1 -1
- package/dist/collection/components/swirl-table/swirl-table.js +1 -1
- package/dist/collection/components/swirl-table-column/swirl-table-column.js +1 -1
- package/dist/collection/components/swirl-tag/swirl-tag.js +1 -1
- package/dist/collection/components/swirl-text/swirl-text.js +1 -1
- package/dist/collection/components/swirl-thumbnail/swirl-thumbnail.js +1 -1
- package/dist/collection/components/swirl-toast/swirl-toast.js +1 -1
- package/dist/collection/components/swirl-toast-provider/swirl-toast-provider.js +1 -1
- package/dist/collection/components/swirl-toggle-group/swirl-toggle-group.js +1 -1
- package/dist/collection/components/swirl-toolbar/swirl-toolbar.js +1 -1
- package/dist/collection/components/swirl-tooltip/swirl-tooltip.css +3 -4
- package/dist/collection/components/swirl-tooltip/swirl-tooltip.js +124 -50
- package/dist/components/assets/pdfjs/pdf.worker.min.mjs +1 -1
- package/dist/components/file-manager.js +64 -58
- package/dist/components/swirl-resource-list-item2.js +20 -10
- package/dist/components/swirl-search.js +1 -1
- package/dist/components/swirl-shell-layout.js +6 -6
- package/dist/components/swirl-shell-navigation-item.js +2 -2
- package/dist/components/swirl-skeleton-box2.js +2 -2
- package/dist/components/swirl-skeleton-text.js +1 -1
- package/dist/components/swirl-spinner2.js +1 -1
- package/dist/components/swirl-status-indicator.js +1 -1
- package/dist/components/swirl-switch.js +2 -2
- package/dist/components/swirl-tab-bar2.js +1 -1
- package/dist/components/swirl-tab.js +1 -1
- package/dist/components/swirl-table-column.js +1 -1
- package/dist/components/swirl-table.js +1 -1
- package/dist/components/swirl-tag2.js +1 -1
- package/dist/components/swirl-text2.js +1 -1
- package/dist/components/swirl-thumbnail2.js +1 -1
- package/dist/components/swirl-toast-provider.js +1 -1
- package/dist/components/swirl-toast2.js +1 -1
- package/dist/components/swirl-toggle-group.js +1 -1
- package/dist/components/swirl-toolbar.js +1 -1
- package/dist/components/swirl-tooltip2.js +47 -43
- package/dist/esm/loader.js +1 -1
- package/dist/esm/swirl-app-layout_5.entry.js +4 -2
- package/dist/esm/swirl-components.js +1 -1
- package/dist/esm/swirl-icon-arrow-left_4.entry.js +1 -1
- package/dist/esm/swirl-icon-error_3.entry.js +1 -1
- package/dist/esm/swirl-search.entry.js +1 -1
- package/dist/esm/swirl-shell-layout.entry.js +6 -6
- package/dist/esm/swirl-shell-navigation-item.entry.js +2 -2
- package/dist/esm/swirl-skeleton-box.entry.js +2 -2
- package/dist/esm/swirl-skeleton-text.entry.js +1 -1
- package/dist/esm/swirl-status-indicator.entry.js +1 -1
- package/dist/esm/swirl-switch.entry.js +2 -2
- package/dist/esm/swirl-tab-bar.entry.js +1 -1
- package/dist/esm/swirl-tab.entry.js +1 -1
- package/dist/esm/swirl-table-column.entry.js +1 -1
- package/dist/esm/swirl-table.entry.js +1 -1
- package/dist/esm/swirl-tag.entry.js +1 -1
- package/dist/esm/swirl-text.entry.js +1 -1
- package/dist/esm/swirl-toast-provider.entry.js +1 -1
- package/dist/esm/swirl-toast.entry.js +1 -1
- package/dist/esm/swirl-toggle-group.entry.js +1 -1
- package/dist/esm/swirl-toolbar.entry.js +1 -1
- package/dist/esm/swirl-tooltip.entry.js +43 -41
- package/dist/swirl-components/{p-25a0bc6f.entry.js → p-0d86713d.entry.js} +1 -1
- package/dist/swirl-components/{p-93bb3365.entry.js → p-251853c7.entry.js} +2 -2
- package/dist/swirl-components/{p-b23edf69.entry.js → p-2dd48f2d.entry.js} +1 -1
- package/dist/swirl-components/{p-046c85df.entry.js → p-2fbbff16.entry.js} +1 -1
- package/dist/swirl-components/p-31157c43.entry.js +1 -0
- package/dist/swirl-components/{p-b98cc8ee.entry.js → p-32205cb6.entry.js} +1 -1
- package/dist/swirl-components/{p-00b0bcdf.entry.js → p-4fe92179.entry.js} +1 -1
- package/dist/swirl-components/{p-362cf5cd.entry.js → p-525eccb7.entry.js} +1 -1
- package/dist/swirl-components/{p-66f57e69.entry.js → p-6058e144.entry.js} +1 -1
- package/dist/swirl-components/{p-900b7395.entry.js → p-61f63eb1.entry.js} +1 -1
- package/dist/swirl-components/p-6294b4b8.entry.js +1 -0
- package/dist/swirl-components/{p-68f1fc93.entry.js → p-8e15adb5.entry.js} +1 -1
- package/dist/swirl-components/{p-25937c0c.entry.js → p-9116eac5.entry.js} +1 -1
- package/dist/swirl-components/{p-38205c0f.entry.js → p-91d81ff7.entry.js} +1 -1
- package/dist/swirl-components/{p-e79a2b2f.entry.js → p-b56f08dd.entry.js} +1 -1
- package/dist/swirl-components/{p-55342fef.entry.js → p-bb3bf811.entry.js} +1 -1
- package/dist/swirl-components/{p-62a94658.entry.js → p-d8201d5b.entry.js} +1 -1
- package/dist/swirl-components/{p-a3709d0e.entry.js → p-d82c10a6.entry.js} +1 -1
- package/dist/swirl-components/{p-5067665a.entry.js → p-e24e9424.entry.js} +1 -1
- package/dist/swirl-components/{p-f4cd2bc8.entry.js → p-eccc6946.entry.js} +1 -1
- package/dist/swirl-components/{p-db2de234.entry.js → p-f49848d1.entry.js} +1 -1
- package/dist/swirl-components/swirl-components.esm.js +1 -1
- package/dist/types/components/swirl-resource-list-item/swirl-resource-list-item.d.ts +3 -0
- package/dist/types/components/swirl-tooltip/swirl-tooltip.d.ts +8 -9
- package/dist/types/components.d.ts +30 -10
- package/package.json +1 -1
- package/vscode-data.json +36 -2
- package/dist/swirl-components/p-da93355a.entry.js +0 -1
- package/dist/swirl-components/p-fef8e82f.entry.js +0 -1
|
@@ -62,9 +62,9 @@ const SwirlShellNavigationItem = class {
|
|
|
62
62
|
const tooltipContent = this.description
|
|
63
63
|
? `${this.label} ${this.description}`
|
|
64
64
|
: this.label;
|
|
65
|
-
return (h(Host, { key: '
|
|
65
|
+
return (h(Host, { key: '449f8152f3e43b5286253b3cad88b97e7e7511fa' }, h("swirl-tooltip", { key: 'c38fd294886949488ebb68e44243dedf4b9353cb', active: this.hideLabel, content: tooltipContent, delay: 100, position: "right", positioning: "fixed" }, h(Tag, { key: 'b109c272afaa8d81406c77f9a383eb0265ba0abe', class: tagClassNames, href: this.href, target: this.target, type: isLink ? undefined : "button", title: !this.hideLabel ? this.label : undefined }, h("span", { key: 'e798c1c7fd44a3f60969649f377dc569ef790d14', class: "shell-navigation-item__icon" }, h("slot", { key: '74253d57363c4ab083e1df01bcc8ff3a39dc875b', name: "icon" })), !this.hideLabel ? (this.variant !== "default" ? (h("span", { class: labelClassNames }, this.label)) : (h("div", { class: "shell-navigation-item__text-wrapper" }, h("span", { class: labelClassNames }, this.label), this.description && (h("span", { class: "shell-navigation-item__description" }, this.description))))) : (h("swirl-visually-hidden", null, h("span", { class: labelClassNames }, this.label))), hasBadge && (h("span", { key: '314a39b2198bc28f55ee94a14eec540ac465924a', class: "shell-navigation-item__badge-wrapper" }, h("swirl-badge", { key: '67e82dd1cf4e5097fb8572aefba5c6c43808a0f7', "aria-label": this.badgeLabel, class: classnames("shell-navigation-item__badge", {
|
|
66
66
|
"shell-navigation-item__badge--dot": this.badgeLabel === "",
|
|
67
|
-
}), label: this.badgeLabel, size: "xs", variant: this.badgeLabel === "" ? "dot" : "default" }))), showIsNewTag && (h("swirl-tag", { key: '
|
|
67
|
+
}), label: this.badgeLabel, size: "xs", variant: this.badgeLabel === "" ? "dot" : "default" }))), showIsNewTag && (h("swirl-tag", { key: 'e4c5c0f2efa1237f658c3a0378046e5c16188228', class: "shell-navigation-item__is-new-tag", intent: "info", label: this.markAsNewLabel.toLocaleUpperCase(), size: "s", variant: "strong" })), showIsNewBadge && (h("swirl-badge", { key: '21aac8cdecddb54b7c654d119c5a07eeadf5d216', class: "shell-navigation-item__is-new-badge", intent: "info", label: this.markAsNewLabel.toLocaleUpperCase(), size: "xs", variant: "dot" }))))));
|
|
68
68
|
}
|
|
69
69
|
get el() { return getElement(this); }
|
|
70
70
|
};
|
|
@@ -11,11 +11,11 @@ const SwirlSkeletonBox = class {
|
|
|
11
11
|
}
|
|
12
12
|
render() {
|
|
13
13
|
const className = classnames("skeleton-box", `skeleton-box--border-radius-${this.borderRadius}`, { "skeleton-box--static": !this.animated });
|
|
14
|
-
return (h(Host, { key: '
|
|
14
|
+
return (h(Host, { key: '0766d24e9c6dd8b47f0cde12acc961798539a663', style: {
|
|
15
15
|
width: !Boolean(this.width) && !Boolean(this.aspectRatio)
|
|
16
16
|
? "100%"
|
|
17
17
|
: undefined,
|
|
18
|
-
} }, h("div", { key: '
|
|
18
|
+
} }, h("div", { key: '78ef731b5c403dfe74d3034ac8bcef63e0bac16c', class: className, style: {
|
|
19
19
|
aspectRatio: this.aspectRatio,
|
|
20
20
|
borderRadius: this.borderRadius !== "pill" && this.borderRadius !== "none"
|
|
21
21
|
? `var(--s-border-radius-${this.borderRadius})`
|
|
@@ -13,7 +13,7 @@ const SwirlSkeletonText = class {
|
|
|
13
13
|
render() {
|
|
14
14
|
const className = classnames("skeleton-text", `skeleton-text--size-${this.size}`, { "skeleton-text--static": !this.animated });
|
|
15
15
|
const lineClassName = classnames("skeleton-text__line", `skeleton-text__line--size-${this.size}`);
|
|
16
|
-
return (h(Host, { key: '
|
|
16
|
+
return (h(Host, { key: '77301b4779d053d7485e3fc056093c8aca75d56c' }, h("div", { key: 'd48fb445adb540f5fcc2a3c0fcfe64c263ef2be9', class: className, part: className }, new Array(this.lines).fill(undefined).map((_, index) => (h("div", { class: lineClassName, key: index, part: lineClassName }))))));
|
|
17
17
|
}
|
|
18
18
|
};
|
|
19
19
|
SwirlSkeletonText.style = swirlSkeletonTextCss;
|
|
@@ -9,7 +9,7 @@ const SwirlStatusIndicator = class {
|
|
|
9
9
|
}
|
|
10
10
|
render() {
|
|
11
11
|
const className = classnames("status-indicator", `status-indicator--intent-${this.intent}`);
|
|
12
|
-
return (h(Host, { key: '
|
|
12
|
+
return (h(Host, { key: '62f371ab1f733071a33215f1b2d618f352932906' }, h("div", { key: 'de36fa200de899dfa926b58506ebfe498095d65b', class: className }, h("span", { key: '70097360cd5d8f107768409986891c0e4759c768', class: "status-indicator__dot" }), h("span", { key: 'bb9a68874c9ea67161d73291315974c449688723', class: "status-indicator__label" }, this.label))));
|
|
13
13
|
}
|
|
14
14
|
};
|
|
15
15
|
SwirlStatusIndicator.style = swirlStatusIndicatorCss;
|
|
@@ -31,9 +31,9 @@ const SwirlSwitch = class {
|
|
|
31
31
|
"switch--disabled": this.disabled,
|
|
32
32
|
"switch--hide-content": this.hideLabel && (!this.description || this.hideDescription),
|
|
33
33
|
});
|
|
34
|
-
return (h(Host, { key: '
|
|
34
|
+
return (h(Host, { key: '50b3357b11531b7b54760da2a757c5d20c2456a7' }, h("label", { key: '2fb84e079c1e250042827d4b727ede8fb1d8dfbf', class: className, htmlFor: this.inputId }, h("span", { key: '272a48201fab35cdf5e9e5e2048369a864403b34', class: "switch__control" }, h("swirl-visually-hidden", { key: '66e44c3a9b42cd634cf87e399b37436c9c250fa6' }, h("input", { key: 'ae147b742a03936b5cb7e3337a9ad8ace135b6f7', "aria-checked": ariaCheckedLabel, "aria-label": !this.hideLabel && this.swirlAriaLabel
|
|
35
35
|
? this.swirlAriaLabel
|
|
36
|
-
: undefined, checked: on, class: "switch__input", disabled: this.disabled, id: this.inputId, name: this.inputName, onChange: this.onChange, ref: (el) => (this.inputEl = el), role: "switch", type: "checkbox", value: this.value })), h("span", { key: '
|
|
36
|
+
: undefined, checked: on, class: "switch__input", disabled: this.disabled, id: this.inputId, name: this.inputName, onChange: this.onChange, ref: (el) => (this.inputEl = el), role: "switch", type: "checkbox", value: this.value })), h("span", { key: '0e8bc773fa78d82f17e84b43d59d804246879619', "aria-hidden": "true", class: "switch__thumb" })), h("swirl-stack", { key: 'd9bec995417f915c3219ed3ff4d4eaa10d23f4b9', class: "switch__content" }, this.label && !this.hideLabel && (h("span", { key: 'bcb1123bdf250a15454fbed0cc0fcd3b484887bd', class: "switch__label" }, this.label)), this.hideLabel && (h("swirl-visually-hidden", { key: 'd8e3e5bc029e05b8f73500ab70d3fb73b1420b6a' }, this.swirlAriaLabel || this.label)), this.description && !this.hideDescription && (h("span", { key: 'a46ecfe95969643500e26224f8b021985f461fa9', class: "switch__description" }, this.description)), this.description && this.hideDescription && (h("swirl-visually-hidden", { key: '71c99b5f29ab55c5c9a48e4ae1e009e326a39729' }, this.description))))));
|
|
37
37
|
}
|
|
38
38
|
get el() { return getElement(this); }
|
|
39
39
|
};
|
|
@@ -61,7 +61,7 @@ const SwirlTabBar = class {
|
|
|
61
61
|
? `var(--s-space-${this.paddingBlockStart})`
|
|
62
62
|
: undefined,
|
|
63
63
|
};
|
|
64
|
-
return (h(Host, { key: '
|
|
64
|
+
return (h(Host, { key: '281aeb39ec1dad585e2d528867b95eae025954d4' }, h("div", { key: '0563370c98c70a77e0fb2b763fa1314e71f629e9', "aria-label": this.label, class: className, onKeyDown: this.onKeyDown, role: this.disableTabSemantics ? undefined : "tablist", style: styles }, this.tabs.map((tab) => {
|
|
65
65
|
const className = classnames("tab-bar__tab", {
|
|
66
66
|
"tab-bar__tab--active": tab.active,
|
|
67
67
|
"tab-bar__tab--variant-pill": this.variant === "pill",
|
|
@@ -10,7 +10,7 @@ const SwirlTab = class {
|
|
|
10
10
|
}
|
|
11
11
|
render() {
|
|
12
12
|
const className = classnames("tab", { "tab--active": this.active });
|
|
13
|
-
return (h(Host, { key: '
|
|
13
|
+
return (h(Host, { key: '4dcaa666ac2c76ef69a3db108fec8d9261f0c2c9', "aria-labelledby": `tab-${this.tabId}`, id: this.tabId, role: "tabpanel", tabIndex: this.active ? 0 : -1, class: className, style: { padding: `var(--s-space-${this.padding})` } }, h("slot", { key: 'd4be897cca0b201d4b72b400f6a7433ccf86921c' })));
|
|
14
14
|
}
|
|
15
15
|
};
|
|
16
16
|
SwirlTab.style = swirlTabCss;
|
|
@@ -18,7 +18,7 @@ const SwirlTableColumn = class {
|
|
|
18
18
|
maxWidth: this.maxWidth || "",
|
|
19
19
|
minWidth: this.minWidth || "",
|
|
20
20
|
};
|
|
21
|
-
return (h(Host, { key: '
|
|
21
|
+
return (h(Host, { key: '7b44381a58a3166a253085ad49e9dfd2c789a6cb', "aria-sort": this.sort, class: "table-column", role: "columnheader", style: styles }, h("span", { key: 'bbd36f836c804b7705a4734146d75b0947c60d0e' }, h("slot", { key: '31bd5ea3ad4241e3220982b3b6b09177b1797815' })), this.sortable && (h("span", { key: 'f1412c8cfee58866f449cb188a2def485af9066d', class: "table-column__sort-indicator" }, this.sort === "ascending" && (h("swirl-icon-arrow-upward", { key: 'bb54544c676dcfb0f13f93354d6438a635fa028d', "aria-hidden": "true", size: 20 })), this.sort === "descending" && (h("swirl-icon-arrow-downward", { key: 'cfb63e3e1edc6c6d99da43eed402b467f3ca7770', "aria-hidden": "true", size: 20 })), !Boolean(this.sort) && " "))));
|
|
22
22
|
}
|
|
23
23
|
get el() { return getElement(this); }
|
|
24
24
|
};
|
|
@@ -578,7 +578,7 @@ const SwirlTable = class {
|
|
|
578
578
|
"table--show-empty-state": this.empty && !this.loading,
|
|
579
579
|
"table--keyboard-move": this.movingViaKeyboard,
|
|
580
580
|
});
|
|
581
|
-
return (h(Host, { key: '
|
|
581
|
+
return (h(Host, { key: '58cb39e970718c947af8fb05e49327f69ce52406' }, h("div", { key: 'ccc4d4c35f16a0250bca6473848ec928a20d69f1', class: className }, this.enableDragDrop && (h("swirl-visually-hidden", { key: '984ee69c68a1f7ede7c68d11e08ab87677c75d8c' }, h("span", { key: '7a27389724c8c0d877c79af23589b637e44d5669', "aria-live": "assertive" }, this.liveRegionText))), h("div", { key: 'd17f542eac55c6da592fc2ab12d838e30ef318e6', class: "table__container", onFocusin: this.onFocus, onFocusout: this.onBlur, onKeyDown: this.onKeyDown, onScroll: this.onScroll, ref: (el) => (this.container = el), tabIndex: -1 }, h("div", { key: 'dd983c262ce853828b3040c9f97c510c769662e3', "aria-describedby": Boolean(this.caption) ? "caption" : undefined, "aria-label": this.label, role: "table", class: "table__table" }, this.caption && (h("swirl-visually-hidden", { key: '031594755193d7ca2e0f8624afd79ec38ac0dec7' }, h("div", { key: '7b76523681ef767eb7a5805cc45da2259d6b9ce5', id: "caption" }, this.caption))), h("div", { key: 'ac6f9ffa3703cbadb12b7384e8f897c5af9d0bc1', role: "rowgroup" }, h("div", { key: '5263be7e317340491ee5890a1a2e5d25fcba06d5', class: "table__header", ref: (el) => (this.headerEl = el), role: "row" }, h("slot", { key: '3171ffdd4027b3f32d2d2b110f55209c8bdc5e7e', name: "columns" }))), h("div", { key: '32c054e3e9f63439efb8f9cf9633f5b628a789e0', class: "table__body", ref: (el) => (this.bodyEl = el) }, h("slot", { key: '2f5b748c60f91dbe4df98d0f18b367f8292100d0', name: "rows" }), h("div", { key: 'b51e7e34b4d4e1c4044f9480a0a115393064d221', class: "table__empty-row", role: "row" }, h("div", { key: '1cb8061bef8a30965ea023b31dd0fcfac0276f26', "aria-colspan": this.getColumns().length, class: "table__empty-row-cell", role: "cell" }, h("slot", { key: 'e512da95e312bb19dca9b36e0092a0001810eda7', name: "empty" }), !hasEmptyStateSlotAssignment && (h("swirl-text", { key: 'ab17ca80ff8a609d5eaa4addee7d3358791bc11d', align: "center", size: "sm" }, this.emptyStateLabel))))))))));
|
|
582
582
|
}
|
|
583
583
|
get el() { return getElement(this); }
|
|
584
584
|
static get watchers() { return {
|
|
@@ -37,7 +37,7 @@ const SwirlTag = class {
|
|
|
37
37
|
}
|
|
38
38
|
render() {
|
|
39
39
|
const className = classnames("tag", `tag--icon-position-${this.iconPosition}`, `tag--intent-${this.intent}`, `tag--size-${this.size}`, `tag--variant-${this.variant}`, { "tag--hide-label": this.hideLabel });
|
|
40
|
-
return (h(Host, { key: '
|
|
40
|
+
return (h(Host, { key: 'a3ade00e730b9c5a0bf70ce18555894162efcdb9' }, h("span", { key: '9adecf537f7923514ec8eca45badc8560a1448b8', class: className, part: "tag" }, this.icon && (h("span", { key: '0adc214659f1680182981e70724fcbc1782f01d0', class: "tag__icon", innerHTML: this.icon, ref: (el) => (this.iconEl = el) })), !this.hideLabel ? (h("span", { class: "tag__label" }, this.label)) : (h("swirl-visually-hidden", null, this.label)), this.removable && (h("button", { key: 'e1981afdf9819c222ca92f08fdf57cdd7e4f3f26', "aria-label": this.removalButtonLabel, class: "tag__removal-button", onClick: this.onRemove, tabIndex: this.el.ariaHidden === "true" ? -1 : undefined, type: "button" }, h("swirl-icon-close", { key: '6b06d0db7dcd182742f5399cd20d2d7532b9ff0c', size: 16 }))))));
|
|
41
41
|
}
|
|
42
42
|
get el() { return getElement(this); }
|
|
43
43
|
};
|
|
@@ -986,7 +986,7 @@ const SwirlText = class {
|
|
|
986
986
|
const styles = {
|
|
987
987
|
whiteSpace: truncate ? "nowrap" : this.whiteSpace,
|
|
988
988
|
};
|
|
989
|
-
return (h(Host, { key: '
|
|
989
|
+
return (h(Host, { key: '56f7218ef3a537fec98997d1b14ca35c2c479676' }, h(Tag, { key: 'b921b87fd42122292d4db0368a5aba72e0975f7a', class: className, ref: (el) => (this.textEl = el), style: styles }, h("slot", { key: '7e8f3315ebe21dc4e598c375d300143a519b697e' }))));
|
|
990
990
|
}
|
|
991
991
|
get el() { return getElement(this); }
|
|
992
992
|
};
|
|
@@ -43,7 +43,7 @@ const SwirlToastProvider = class {
|
|
|
43
43
|
return newToastWithId;
|
|
44
44
|
}
|
|
45
45
|
render() {
|
|
46
|
-
return (h(Host, { key: '
|
|
46
|
+
return (h(Host, { key: 'ed46f2145bfb6a36b7d7e66206f92aa048b0b0ff', role: "status" }, h("swirl-stack", { key: 'd3302dba7a8f2cd47b77adacb1d6ee51d32b4b85', spacing: "12" }, this.toasts.map((toast) => {
|
|
47
47
|
const props = { ...toast, content: undefined };
|
|
48
48
|
return (h("swirl-toast", { key: toast.toastId, onDismiss: this.onDismiss, ...props }, toast.content));
|
|
49
49
|
}))));
|
|
@@ -52,7 +52,7 @@ const SwirlToast = class {
|
|
|
52
52
|
}
|
|
53
53
|
render() {
|
|
54
54
|
const className = classnames("toast", `toast--intent-${this.intent}`);
|
|
55
|
-
return (h(Host, { key: '
|
|
55
|
+
return (h(Host, { key: '7fea68476343a3a1036bcf9f7594a6e1a79cff8d' }, h("div", { key: 'fbffb818800e9a1a09d152b304247d2d4f142011', class: className }, this.icon && (h("span", { key: '3dd08af863ab3e470b04382280e48898b1855df5', class: "toast__icon", innerHTML: this.icon, part: "toast__icon", ref: (el) => (this.iconEl = el) })), h("span", { key: 'cb7f747663e9abac62571814a39d4295e33cba5c', class: "toast__content", innerHTML: this.content, part: "toast__content" }, h("slot", { key: 'fe656f4eb9dc33af885d7b41f8a1b846bc1e5649' })), h("button", { key: '974e2f354db147b74fd5e88e4fb17a8b611f1fa9', "aria-label": this.dismissLabel || this.accessibleDismissLabel, class: "toast__dismiss-button", onClick: this.onDismiss, type: "button" }, this.dismissLabel, !Boolean(this.dismissLabel) && (h("swirl-icon-close", { key: '26d3e2c61a864953c15e1ca071a00cb33bdc412b', ref: (el) => (this.dismissIconEl = el) }))))));
|
|
56
56
|
}
|
|
57
57
|
static get watchers() { return {
|
|
58
58
|
"duration": ["watchDuration"]
|
|
@@ -60,7 +60,7 @@ const SwirlToggleGroup = class {
|
|
|
60
60
|
const className = classnames("toggle-group", `toggle-group--variant-${this.variant}`, {
|
|
61
61
|
"toggle-group--elevated": this.elevated,
|
|
62
62
|
});
|
|
63
|
-
return (h("swirl-stack", { key: '
|
|
63
|
+
return (h("swirl-stack", { key: '53d1ed77435d8b176d2ecd9f17a91d7ce898089c', class: className, "aria-label": this.swirlAriaLabel, spacing: "4", orientation: "horizontal", align: "center", role: "group" }, h("slot", { key: '86d94274de5474cd95c7a8e9bc00470a769f0338', onSlotchange: this.onSlotChange })));
|
|
64
64
|
}
|
|
65
65
|
get el() { return getElement(this); }
|
|
66
66
|
static get watchers() { return {
|
|
@@ -69,7 +69,7 @@ const SwirlToolbar = class {
|
|
|
69
69
|
});
|
|
70
70
|
}
|
|
71
71
|
render() {
|
|
72
|
-
return (h(Host, { key: '
|
|
72
|
+
return (h(Host, { key: '68b45bf033f288bfcc91816113e4a9dc1ef3969f' }, h("swirl-stack", { key: '5e47332dbd0f692c105a8271b381b474e87e6a79', align: "center", "aria-label": this.label, "aria-orientation": this.orientation, role: "toolbar", onKeyDown: this.onKeyDown, orientation: this.orientation, spacing: "8", wrap: true }, h("slot", { key: 'fcd391ebc21c6b829394c28b2968c5007f3be389' }))));
|
|
73
73
|
}
|
|
74
74
|
get el() { return getElement(this); }
|
|
75
75
|
};
|
|
@@ -1,27 +1,32 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host, d as getElement } from './index-g4wOnHIT.js';
|
|
2
|
-
import { u, P,
|
|
2
|
+
import { u, P, D, k, b, N } from './floating-ui.dom.browser.min-BtsCuEVE.js';
|
|
3
3
|
import { c as classnames } from './index-orsBiyT_.js';
|
|
4
4
|
import { o as getPixelsFromRemToken } from './utils-wi_3Z3FQ.js';
|
|
5
5
|
|
|
6
|
-
const swirlTooltipCss = ":host{display:contents;font-weight:var(--s-font-weight-normal)}:host *{box-sizing:border-box}.tooltip{display:contents}.tooltip--active .tooltip__popper{display:block}.tooltip--visible .tooltip__popper{animation:tooltip-fade-in 0.15s;animation-delay:0.1s;animation-fill-mode:forwards;opacity:0}.tooltip--actual-placement-top .tooltip__arrow{top:calc(100% - 0.0625rem);transform:translate3d(0, -50%, 0) rotate(45deg)}.tooltip--actual-placement-bottom .tooltip__arrow{bottom:calc(100% - 0.0625rem);transform:translate3d(0, 50%, 0) rotate(45deg)}.tooltip--actual-placement-left .tooltip__arrow{left:calc(100% - 0.0625rem);transform:translate3d(-50%, 0, 0) rotate(45deg)}.tooltip--actual-placement-right .tooltip__arrow{right:calc(100% - 0.0625rem);transform:translate3d(50%, 0, 0) rotate(45deg)}.tooltip .tooltip__reference{display:contents}.tooltip__popper{position:absolute;z-index:var(--s-z-40);display:none;max-width:17.5rem;opacity:0}.tooltip__bubble{position:relative;display:block;padding-top:var(--s-space-8);padding-right:var(--s-space-12);padding-bottom:calc(var(--s-space-8) + 0.0625rem);padding-left:var(--s-space-12);border-radius:var(--s-border-radius-sm);color:var(--s-text-on-status);background-color:var(--s-surface-neutral-default);line-height:var(--s-line-height-base);box-shadow:var(--s-shadow-level-2)}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.tooltip__bubble{font-size:var(--s-font-size-sm);line-height:var(--s-line-height-sm)}}.tooltip__content{white-space:normal}.tooltip__arrow{position:absolute;width:0.6875rem;height:0.6875rem;border-radius:0.125rem;background-color:var(--s-surface-neutral-default)}.tooltip--
|
|
6
|
+
const swirlTooltipCss = ":host{display:contents;font-weight:var(--s-font-weight-normal)}:host *{box-sizing:border-box}.tooltip{display:contents}.tooltip--active .tooltip__popper{display:block}.tooltip--visible .tooltip__popper{animation:tooltip-fade-in 0.15s;animation-delay:0.1s;animation-fill-mode:forwards;opacity:0}.tooltip--actual-placement-top .tooltip__arrow{top:calc(100% - 0.0625rem);transform:translate3d(0, -50%, 0) rotate(45deg)}.tooltip--actual-placement-bottom .tooltip__arrow{bottom:calc(100% - 0.0625rem);transform:translate3d(0, 50%, 0) rotate(45deg)}.tooltip--actual-placement-left .tooltip__arrow{left:calc(100% - 0.0625rem);transform:translate3d(-50%, 0, 0) rotate(45deg)}.tooltip--actual-placement-right .tooltip__arrow{right:calc(100% - 0.0625rem);transform:translate3d(50%, 0, 0) rotate(45deg)}.tooltip .tooltip__reference{display:contents}.tooltip__popper{position:absolute;z-index:var(--s-z-40);display:none;max-width:17.5rem;opacity:0}.tooltip__bubble{position:relative;display:block;padding-top:var(--s-space-8);padding-right:var(--s-space-12);padding-bottom:calc(var(--s-space-8) + 0.0625rem);padding-left:var(--s-space-12);border-radius:var(--s-border-radius-sm);color:var(--s-text-on-status);background-color:var(--s-surface-neutral-default);line-height:var(--s-line-height-base);box-shadow:var(--s-shadow-level-2)}@media (min-width: 992px) and (max-width: 1439px) and (hover: hover),(min-width: 1440px){.tooltip__bubble{font-size:var(--s-font-size-sm);line-height:var(--s-line-height-sm)}}.tooltip__content{white-space:normal}.tooltip__arrow{position:absolute;width:0.6875rem;height:0.6875rem;border-radius:0.125rem;background-color:var(--s-surface-neutral-default)}.tooltip--intent-info .tooltip__bubble,.tooltip--intent-info .tooltip__arrow{background-color:var(--s-surface-info-default)}@keyframes tooltip-fade-in{from{opacity:0}to{opacity:1}}";
|
|
7
7
|
|
|
8
8
|
const SwirlTooltip = class {
|
|
9
9
|
constructor(hostRef) {
|
|
10
10
|
registerInstance(this, hostRef);
|
|
11
11
|
this.active = true;
|
|
12
12
|
this.delay = 200;
|
|
13
|
+
this.intent = "default";
|
|
13
14
|
this.position = "top";
|
|
14
15
|
this.positioning = "absolute";
|
|
15
|
-
|
|
16
|
-
* If set to true, tooltip will be initially visible.
|
|
17
|
-
* It will only be dismissible via a click and will not reappear.
|
|
18
|
-
* Tooltip will have a blue background color.
|
|
19
|
-
*/
|
|
20
|
-
this.isPromo = false;
|
|
16
|
+
this.trigger = ["focus", "hover"];
|
|
21
17
|
this.visible = false;
|
|
22
|
-
this.isPromoShown = false;
|
|
23
18
|
this.onKeydown = (event) => {
|
|
24
|
-
if (event.code === "Escape"
|
|
19
|
+
if (event.code === "Escape") {
|
|
20
|
+
this.hide();
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
this.onFocusIn = () => {
|
|
24
|
+
if (this.trigger.includes("focus")) {
|
|
25
|
+
this.show();
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
this.onFocusOut = () => {
|
|
29
|
+
if (this.trigger.includes("focus")) {
|
|
25
30
|
this.hide();
|
|
26
31
|
}
|
|
27
32
|
};
|
|
@@ -42,20 +47,6 @@ const SwirlTooltip = class {
|
|
|
42
47
|
top: Boolean(arrowY) ? arrowY + "px" : undefined,
|
|
43
48
|
};
|
|
44
49
|
};
|
|
45
|
-
this.show = () => {
|
|
46
|
-
if (!this.active || (this.isPromo && this.isPromoShown)) {
|
|
47
|
-
return;
|
|
48
|
-
}
|
|
49
|
-
this.visible = true;
|
|
50
|
-
requestAnimationFrame(() => {
|
|
51
|
-
const referenceElement = this.el.children[0];
|
|
52
|
-
if (!Boolean(referenceElement)) {
|
|
53
|
-
return;
|
|
54
|
-
}
|
|
55
|
-
this.reposition();
|
|
56
|
-
this.disableAutoUpdate = N(referenceElement, this.popperEl, this.reposition.bind(this));
|
|
57
|
-
});
|
|
58
|
-
};
|
|
59
50
|
this.showWithDelay = () => {
|
|
60
51
|
if (!this.active) {
|
|
61
52
|
return;
|
|
@@ -68,14 +59,6 @@ const SwirlTooltip = class {
|
|
|
68
59
|
this.show();
|
|
69
60
|
}, this.delay);
|
|
70
61
|
};
|
|
71
|
-
this.hide = () => {
|
|
72
|
-
if (Boolean(this.showTimeout)) {
|
|
73
|
-
clearTimeout(this.showTimeout);
|
|
74
|
-
this.showTimeout = undefined;
|
|
75
|
-
}
|
|
76
|
-
this.visible = false;
|
|
77
|
-
this.disableAutoUpdate?.();
|
|
78
|
-
};
|
|
79
62
|
this.updateOptions = () => {
|
|
80
63
|
const margin = getPixelsFromRemToken("--s-space-12");
|
|
81
64
|
const shiftPaddingY = getPixelsFromRemToken("--s-space-8");
|
|
@@ -102,10 +85,12 @@ const SwirlTooltip = class {
|
|
|
102
85
|
this.updateOptions();
|
|
103
86
|
}
|
|
104
87
|
onMouseEnter() {
|
|
105
|
-
this.
|
|
88
|
+
if (this.trigger.includes("hover")) {
|
|
89
|
+
this.showWithDelay();
|
|
90
|
+
}
|
|
106
91
|
}
|
|
107
92
|
onMouseLeave() {
|
|
108
|
-
if (
|
|
93
|
+
if (this.trigger.includes("hover")) {
|
|
109
94
|
this.hide();
|
|
110
95
|
}
|
|
111
96
|
}
|
|
@@ -126,18 +111,35 @@ const SwirlTooltip = class {
|
|
|
126
111
|
}
|
|
127
112
|
componentDidLoad() {
|
|
128
113
|
this.updateOptions();
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
114
|
+
}
|
|
115
|
+
async show() {
|
|
116
|
+
if (!this.active) {
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
this.visible = true;
|
|
120
|
+
requestAnimationFrame(() => {
|
|
121
|
+
const referenceElement = this.el.children[0];
|
|
122
|
+
if (!Boolean(referenceElement)) {
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
this.reposition();
|
|
126
|
+
this.disableAutoUpdate = N(referenceElement, this.popperEl, this.reposition.bind(this));
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
async hide() {
|
|
130
|
+
if (Boolean(this.showTimeout)) {
|
|
131
|
+
clearTimeout(this.showTimeout);
|
|
132
|
+
this.showTimeout = undefined;
|
|
132
133
|
}
|
|
134
|
+
this.visible = false;
|
|
135
|
+
this.disableAutoUpdate?.();
|
|
133
136
|
}
|
|
134
137
|
render() {
|
|
135
|
-
const className = classnames("tooltip", `tooltip--actual-placement-${this.actualPosition?.placement}`, {
|
|
138
|
+
const className = classnames("tooltip", `tooltip--actual-placement-${this.actualPosition?.placement}`, `tooltip--intent-${this.intent}`, {
|
|
136
139
|
"tooltip--active": this.active,
|
|
137
140
|
"tooltip--visible": this.visible,
|
|
138
|
-
"tooltip--promo": this.isPromo,
|
|
139
141
|
});
|
|
140
|
-
return (h(Host, { key: '
|
|
142
|
+
return (h(Host, { key: 'e418f075955973796c17ba8994cfb63284b99d13', onKeydown: this.onKeydown }, h("span", { key: '410ac8bc16773617287b73b4676682b4e887eeb3', class: className }, h("span", { key: 'e111062966a91142006124131819095cd3e41e69', class: "tooltip__reference", "aria-describedby": "tooltip", onFocusout: this.onFocusOut, onClick: this.hide, onFocusin: this.onFocusIn }, h("slot", { key: 'fc43ad1b5a655a0512157a6cc6c9877c592caa1c' })), h("span", { key: '360545df93f2ea5b655166769d1a3d95c8dca299', class: "tooltip__popper", ref: (el) => (this.popperEl = el), style: {
|
|
141
143
|
top: Boolean(this.actualPosition)
|
|
142
144
|
? `${this.actualPosition?.y}px`
|
|
143
145
|
: "",
|
|
@@ -145,7 +147,7 @@ const SwirlTooltip = class {
|
|
|
145
147
|
? `${this.actualPosition?.x}px`
|
|
146
148
|
: "",
|
|
147
149
|
position: this.positioning,
|
|
148
|
-
} }, this.visible && (h("span", { key: '
|
|
150
|
+
} }, this.visible && (h("span", { key: 'b4af0145c86950a1a863f73d63f77000bd98f95a', class: "tooltip__bubble", id: "tooltip", part: "tooltip__bubble", role: "tooltip" }, h("span", { key: '84a35eb842594411f9deac1c47b04034bdd64362', class: "tooltip__content", innerHTML: this.content }))), h("span", { key: 'c6796dee53c0fd6d1fbc2a39d6495f91360671fc', class: "tooltip__arrow", ref: (el) => (this.arrowElement = el), style: {
|
|
149
151
|
...this.arrowStyles,
|
|
150
152
|
visibility: this.visible ? "visible" : "hidden",
|
|
151
153
|
} })))));
|